### Initiate WhatsApp Call (Python) Source: https://docs.zernio.com/platforms/whatsapp/calling This Python example demonstrates how to initiate a WhatsApp call. You need to have the Zernio Python SDK installed. Remember to replace placeholder values. ```python from zernio.whatsappcalling import initiate_whatsapp_call response = initiate_whatsapp_call( accountId='YOUR_ACCOUNT_ID', to='+13105551234' ) print(response['callId'], response['status']) ``` -------------------------------- ### Get Webhook Settings Example Source: https://docs.zernio.com/webhooks/get-webhook-settings This example shows the structure of the response when retrieving webhook settings. It includes details like the webhook ID, name, URL, and the events it subscribes to. ```json { "webhooks": [ { "_id": "507f1f77bcf86cd799439011", "name": "My Production Webhook", "url": "https://example.com/webhook", "events": [ "post.published", "post.failed" ], "isActive": ``` -------------------------------- ### Basic Webhook Route Setup (Express) Source: https://docs.zernio.com/resources/integrations/chat-sdk Example of setting up a basic webhook route using Express. This snippet demonstrates the basic structure for receiving webhook events. ```javascript import express from "express"; const app = express(); app.use(express.json()); app.post("/webhook", (req, res) => { // Process the webhook event console.log(req.body); res.status(200).send({ received: true }); }); app.listen(3000, () => { console.log("Server listening on port 3000"); }); ``` -------------------------------- ### Get Google Business Services (Ruby) Source: https://docs.zernio.com/google-business/get-google-business-services This Ruby example shows how to fetch Google Business Services. Configure the SDK with your ZERNIO_API_KEY. ```ruby require "zernio-sdk" Zernio.configure do |config| config.access_token = ENV["ZERNIO_API_KEY"] end api = Zernio::GMBServicesApi.new result = api.get_google_business_services("account_abc123") puts result ``` -------------------------------- ### Basic Webhook Route Setup (Next.js App Router) Source: https://docs.zernio.com/resources/integrations/chat-sdk Example of setting up a basic webhook route using Next.js App Router. This snippet demonstrates the basic structure for receiving webhook events. ```javascript import { NextResponse } from "next/server"; export async function POST(request: Request) { const body = await request.json(); // Process the webhook event console.log(body); return NextResponse.json({ received: true }); } ``` -------------------------------- ### Get WhatsApp Templates (.NET) Source: https://docs.zernio.com/whatsapp/get-whatsapp-templates C# example for fetching WhatsApp templates. It configures the Zernio client with the API key from the environment variable ZERNIO_API_KEY. ```csharp using System; using System.Collections.Generic; using Zernio.Api; using Zernio.Client; class Example { static void Main() { var config = new Configuration { BasePath = "https://zernio.com/api", AccessToken = Environment.GetEnvironmentVariable("ZERNIO_API_KEY"), }; var api = new WhatsAppApi(config); var result = api.GetWhatsAppTemplates(); Console.WriteLine(result); } ``` -------------------------------- ### Setting Account Connection Parameters Source: https://docs.zernio.com/guides/connecting-accounts This example demonstrates setting up key parameters for account connection, including page ID, temporary token, and user profile data. ```python page_id = pages["id"] temp_token = "" user_profile = json.loads(urllib.parse.unquote("")) ``` -------------------------------- ### Example Tracking Tag Stats Request Source: https://docs.zernio.com/tracking-tags/get-tracking-tag-stats An example of a JSON request to get tracking tag statistics. This specific example requests data for an 'error' aggregation, with start and end times set to 0, and an empty array for rows, indicating no specific row filtering. ```json { "error": ": ``` -------------------------------- ### Get LinkedIn Aggregate Analytics Example Source: https://docs.zernio.com/analytics/get-linkedin-aggregate-analytics This example demonstrates how to retrieve LinkedIn aggregate analytics. Specify the account ID, start date, end date, and the metrics you want to fetch. Ensure you have the correct authorization header. ```javascript self.__next_f.push([ 1, "21e:[\"$\",\"$L21f\",\"/v1/accounts/{accountId}/linkedin-aggregate-analytics:get\",{\"defaultExampleId\":\"$undefined\",\"route\":\"/v1/accounts/{accountId}/linkedin-aggregate-analytics\",\"examples\":[{\"id\":\"_default\",\"name\":\"Default\",\"description\":\"$undefined\",\"data\":{\"path\":{\"accountId\":\"string\"},\"cookie\":{},\"header\":{},\"query\":{\"startDate\":\"2024-01-01\",\"endDate\":\"2024-01-31\",\"metrics\":\"IMPRESSION,REACTION,COMMENT,POST_SAVE,POST_SEND\"},\"method\":\"GET\"},\"encoded\":{\"method\":\"GET\",\"body\":\"$undefined\",\"bodyMediaType\":\"$undefined\",\"cookie\":{},\"query\":{\"startDate\":{\"value\":\"2024-01-01\"},\"endDate\":{\"value\":\"2024-01-31\"},\"metrics\":{\"value\":\"IMPRESSION,REACTION,COMMENT,POST_SAVE,POST_SEND\"}},\"header\":{},\"path\":{\"accountId\":{\"value\":\"string\"}}}} ]) ``` -------------------------------- ### Initialize a new project Source: https://docs.zernio.com/cli Use the 'init' command to initialize a new project in the current directory. ```bash zernio init ``` -------------------------------- ### Python: Connect Account Example Source: https://docs.zernio.com/guides/connecting-accounts This snippet demonstrates how to initiate an account connection process using Python. Ensure you have the necessary Zernio SDK installed and configured. ```python # 1. Import the necessary library from zernio.api import ZernioAPI # 2. Initialize the Zernio API client api = ZernioAPI(api_key="YOUR_API_KEY") # 3. Define the account details to connect account_data = { "account_name": "My New Account", "account_type": "financial", "credentials": { "username": "user@example.com", "password": "securepassword123" } } # 4. Initiate the account connection try: connection_response = api.connect_account(**account_data) print("Account connected successfully:", connection_response) except Exception as e: print("Error connecting account:", e) ``` -------------------------------- ### Get LinkedIn Mentions in PHP Source: https://docs.zernio.com/linkedin-mentions/get-linkedin-mentions Provides a PHP example for retrieving LinkedIn mentions with the Zernio SDK. Requires the ZERNIO_API_KEY environment variable to be set and the SDK to be installed via Composer. ```php setAccessToken(getenv('ZERNIO_API_KEY')); $api = new Zernio\Api\LinkedInMentionsApi( new GuzzleHttp\Client(), $config ); $result = $api->getLinkedInMentions("account_abc123"); print_r($result); ``` -------------------------------- ### Configure Connection Path and Query Parameters Source: https://docs.zernio.com/guides/connecting-accounts Example configuration for setting the connection path and query parameters, including profile ID and headless mode. ```json { path: { platform: 'facebook' }, query: { profileId: 'prof_abc123', headless: true, redirect_url: ``` -------------------------------- ### Get Google Business Search Keywords (Go) Source: https://docs.zernio.com/analytics/get-google-business-search-keywords Example of fetching Google Business Search Keywords using the Zernio Go SDK. This snippet demonstrates basic setup and context handling. ```go package main import ( "context" "fmt" "log" "net/http" "os" zernio "github.com/zernio-dev/zernio-go/zernio" ) func main() { ctx := ``` -------------------------------- ### Example Conversion Campaign Configuration Source: https://docs.zernio.com/platforms/meta-ads/conversion-campaigns An example of how to configure a conversion campaign with specific parameters like campaign ID, name, goal, and budget. ```json { "id": "act_1234567890", "name": "Spring sale - Purchase optimization", "goal": "conversions", "budgetAmount": } ``` -------------------------------- ### Tracking Tag Attributes Example Source: https://docs.zernio.com/tracking-tags/create-tracking-tag This example illustrates the structure of attributes for a tracking tag, including 'installed', 'creationTime', 'ownerBusinessId', and 'ownerAdAccountId'. The 'installed' status is a boolean derived from 'lastFiredTime'. ```json [ [ "$", "span", "span-11", { "className": "line", "children": [ [ "$", "span", "span-0", { "style": { "--shiki-light": "#005CC5", "--shiki-dark": "#79B8FF" }, "children": " \"installed\"" } ], [ "$", "span", "span-1", { "style": { "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" }, "children": ": " } ], [ "$", "span", "span-2", { "style": { "--shiki-light": "#005CC5", "--shiki-dark": "#79B8FF" }, "children": "true" } ], [ "$", "span", "span-3", { "style": { "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" }, "children": "," } ] ] } ], [ "$", "span", "span-12", { "className": "line", "children": [ [ "$", "span", "span-0", { "style": { "--shiki-light": "#005CC5", "--shiki-dark": "#79B8FF" }, "children": " \"creationTime\"" } ], [ "$", "span", "span-1", { "style": { "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" }, "children": ": " } ], [ "$", "span", "span-2", { "style": { "--shiki-light": "#005CC5", "--shiki-dark": "#79B8FF" }, "children": "0" } ], [ "$", "span", "span-3", { "style": { "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" }, "children": "," } ] ] } ], [ "$", "span", "span-13", { "className": "line", "children": [ [ "$", "span", "span-0", { "style": { "--shiki-light": "#005CC5", "--shiki-dark": "#79B8FF" }, "children": " \"ownerBusinessId\"" } ], [ "$", "span", "span-1", { "style": { "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" }, "children": ": " } ], [ "$", "span", "span-2", { "style": { "--shiki-light": "#032F62", "--shiki-dark": "#9ECBFF" }, "children": "\"string\"" } ], [ "$", "span", "span-3", { "style": { "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" }, "children": "," } ] ] } ], [ "$", "span", "span-14", { "className": "line", "children": [ [ "$", "span", "span-0", { "style": { "--shiki-light": "#005CC5", "--shiki-dark": "#79B8FF" }, "children": " \"ownerAdAccountId\"" } ], [ "$", "span", "span-1", { "style": { "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" }, "children": ": " } ], [ "$", "span", "span-2", { "style": { "--shiki-light": "#032F62", "--shiki-dark": "#9ECBFF" }, "children": "\"string\"" } ] ] } ] ] ``` -------------------------------- ### .NET Example Source: https://docs.zernio.com/google-business/get-google-business-food-menus Shows how to get Google Business food menus using the Zernio .NET client. Requires setting the ZERNIO_API_KEY environment variable and configuring the API client. ```csharp using System; using System.Collections.Generic; using Zernio.Api; using Zernio.Client; class Example { static void Main() { var config = new Configuration { BasePath = "https://zernio.com/api", AccessToken = Environment.GetEnvironmentVariable("ZERNIO_API_KEY"), }; var api = new GMBFoodMenusApi(config); var result = api.GetGoogleBusinessFoodMenus("account_abc123"); Console.WriteLine(result); } } ``` -------------------------------- ### Install Go SDK Source: https://docs.zernio.com/ Install the Zernio Go SDK using go get. ```bash go get github.com/zernio-dev/zernio-go ``` -------------------------------- ### Deploy a project Source: https://docs.zernio.com/cli Use the 'deploy' command to deploy your project. Provide the project path. ```bash zernio deploy my-project ``` -------------------------------- ### Telegram Bot Commands Example (Python) Source: https://docs.zernio.com/account-settings/get-telegram-commands This Python example demonstrates how to set up and handle Telegram bot commands using the 'python-telegram-bot' library. Ensure you have the library installed (`pip install python-telegram-bot`). ```python from telegram import Update, BotCommand from telegram.ext import Application, CommandHandler, MessageHandler, filters, ContextTypes # Replace 'YOUR_TELEGRAM_BOT_TOKEN' with your actual bot token TOKEN = 'YOUR_TELEGRAM_BOT_TOKEN' def start(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None: """Sends a message when the command /start is issued.""" update.message.reply_text('Welcome! Use /help for more info.') def help_command(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None: """Sends a message when the command /help is issued.""" update.message.reply_text('Available commands: /start, /help, /settings') def settings(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None: """Sends a message when the command /settings is issued.""" update.message.reply_text('Opening settings...') def echo(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None: """Echoes the user message when the command is not recognized.""" update.message.reply_text('I received your message. Use commands to interact.') def main() -> None: """Start the bot.""" # Create the Application and pass it your bot's token. application = Application.builder().token(TOKEN).build() # Define commands commands = [ BotCommand("start", "Starts the bot"), BotCommand("help", "Shows help information"), BotCommand("settings", "Opens settings") ] application.bot.set_my_commands(commands) # on different commands - answer in Telegram application.add_handler(CommandHandler("start", start)) application.add_handler(CommandHandler("help", help_command)) application.add_handler(CommandHandler("settings", settings)) # on non-command messages - echo the message on Telegram application.add_handler(MessageHandler(filters.TEXT & ~filters.COMMAND, echo)) # Run the bot until the user presses Ctrl-C application.run_polling() if __name__ == '__main__': main() ``` -------------------------------- ### Java: Get Discord Channels Source: https://docs.zernio.com/discord/get-discord-channels Example in Java to get Discord channels. It requires the Zernio SDK and the ZERNIO_API_KEY to be set as an environment variable. ```java import dev.zernio.*; import dev.zernio.api.DiscordApi; import java.util.*; public class Example { public static void main(String[] args) throws Exception { ApiClient client = Configuration.getDefaultApiClient(); client.setBearerToken(System.getenv("ZERNIO_API_KEY")); DiscordApi api = new DiscordApi(client); Object result = api.getDiscordChannels("account_abc123"); System.out.println(result); } } ``` -------------------------------- ### Create Post with Media (.NET) Source: https://docs.zernio.com/posts/create-post This .NET example shows how to create a post with a title, content, and an image. It requires the ZERNIO_API_KEY to be set as an environment variable. ```csharp using System; using System.Collections.Generic; using Zernio.Api; using Zernio.Client; class Example { static void Main() { var config = new Configuration { BasePath = "https://zernio.com/api", AccessToken = Environment.GetEnvironmentVariable("ZERNIO_API_KEY"), }; var api = new PostsApi(config); var request = new Dictionary { ["title"] = "Example", ["content"] = "Hello, world!", ["mediaItems"] = new List { new Dictionary { ["type"] = "image", ["url"] = "https://example.com", ["title"] = "Example" } } }; var result = api.CreatePost(request); Console.WriteLine(result); } ``` -------------------------------- ### .NET Example Source: https://docs.zernio.com/google-business/get-google-business-location-details This C# example demonstrates how to fetch Google Business Location details using the Zernio API. Configure the API client with your base path and API key. ```csharp using System; using System.Collections.Generic; using Zernio.Api; using Zernio.Client; class Example { static void Main() { var config = new Configuration { BasePath = "https://zernio.com/api", AccessToken = Environment.GetEnvironmentVariable("ZERNIO_API_KEY"), }; var api = new GMBLocationDetailsApi(config); var result = api.GetGoogleBusinessLocationDetails("account_abc123"); Console.WriteLine(result); } ``` -------------------------------- ### Get Messenger Menu with Java Source: https://docs.zernio.com/account-settings/get-messenger-menu A Java example demonstrating how to get the messenger menu. Ensure the ZERNIO_API_KEY environment variable is set for authentication. ```java import dev.zernio.*; import dev.zernio.api.AccountSettingsApi; import java.util.*; public class Example { public static void main(String[] args) throws Exception { ApiClient client = Configuration.getDefaultApiClient(); client.setBearerToken(System.getenv("ZERNIO_API_KEY")); AccountSettingsApi api = new AccountSettingsApi(client); Object result = api.getMessengerMenu("account_abc123"); System.out.println(result); } } ``` -------------------------------- ### Initiate Account Connection (cURL) Source: https://docs.zernio.com/guides/connecting-accounts Example using cURL to request a connection URL. Replace 'YOUR_API_KEY' with your actual Zernio API key and specify the desired platform. ```bash curl -X POST https://api.zernio.com/v1/connect/url \ -H "Authorization: Bearer YOUR_API_KEY" \ -d '{"platform": "stripe"}' ``` -------------------------------- ### Get YouTube Demographics in Ruby Source: https://docs.zernio.com/analytics/get-youtube-demographics This Ruby example shows how to get YouTube demographics. Configure the SDK with your access token and specify the account ID. ```ruby require "zernio-sdk" Zernio.configure do |config| config.access_token = ENV["ZERNIO_API_KEY"] end api = Zernio::AnalyticsApi.new result = api.get_you_tube_demographics({ account_id: "account_abc123" }) puts result ``` -------------------------------- ### Get Pinterest Boards in PHP Source: https://docs.zernio.com/connect/get-pinterest-boards This PHP snippet demonstrates how to get Pinterest boards. Ensure you have the Zernio SDK installed and the ZERNIO_API_KEY environment variable set. ```php setAccessToken(getenv('ZERNIO_API_KEY')); $api = new Zernio\Api\ConnectApi( new GuzzleHttp\Client(), $config ); $result = $api->getPinterestBoards("account_abc123"); print_r($result); ``` -------------------------------- ### Java Example Source: https://docs.zernio.com/google-business/get-google-business-verifications Fetch Google Business verifications in Java. Ensure your ZERNIO_API_KEY is available as an environment variable. ```java import java.util.Collections; import java.util.Map; import com.zernio.api.GMBVerificationsApi; import com.zernio.client.ApiClient; import com.zernio.client.ApiException; import com.zernio.client.Configuration; public class Example { public static void main(String[] args) { ApiClient defaultApiClient = Configuration.getDefaultApiClient(); defaultApiClient.setAccessToken(System.getenv("ZERNIO_API_KEY")); GMBVerificationsApi api = new GMBVerificationsApi(defaultApiClient); try { Object result = api.getGoogleBusinessVerifications("account_abc123"); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling GMBVerificationsApi#getGoogleBusinessVerifications"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } } ``` -------------------------------- ### PHP Example Source: https://docs.zernio.com/google-business/get-google-business-food-menus Demonstrates how to retrieve Google Business food menus using the Zernio PHP SDK. Ensure the ZERNIO_API_KEY environment variable is set. ```php require_once __DIR__ . '/vendor/autoload.php'; $config = Zernio\Configuration::getDefaultConfiguration() ->setAccessToken(getenv('ZERNIO_API_KEY')); $api = new Zernio\Api\GMBFoodMenusApi( new GuzzleHttp\Client(), $config ); $result = $api->getGoogleBusinessFoodMenus("account_abc123"); print_r($result); ``` -------------------------------- ### Get Discord Channels Example Source: https://docs.zernio.com/discord/get-discord-channels This snippet demonstrates how to retrieve a list of Discord channels. It specifies the 'channels' key and includes example channel IDs and names. ```json { "channels": [ { "id": "1234567890123456789", "name": } ] } ``` -------------------------------- ### Get Connect URL in .NET Source: https://docs.zernio.com/connect/get-connect-url This .NET example shows how to get a connect URL. It requires setting the ZERNIO_API_KEY environment variable and configuring the API client. ```csharp using System; using System.Collections.Generic; using Zernio.Api; using Zernio.Client; class Example { static void Main() { var config = new Configuration { BasePath = "https://zernio.com/api", AccessToken = Environment.GetEnvironmentVariable("ZERNIO_API_KEY"), }; var api = new ConnectApi(config); var result = api.GetConnectUrl("facebook"); Console.WriteLine(result); } ``` -------------------------------- ### View project details Source: https://docs.zernio.com/cli Use the 'show' command to view detailed information about a project. Provide the project path. ```bash zernio show my-project ``` -------------------------------- ### Get YouTube Daily Views in Java Source: https://docs.zernio.com/analytics/get-youtube-daily-views A Java example to get daily YouTube views. Ensure your Zernio API client is configured with your bearer token. ```Java import dev.zernio.*; import dev.zernio.api.AnalyticsApi; import java.util.*; public class Example { public static void main(String[] args) throws Exception { ApiClient client = Configuration.getDefaultApiClient(); client.setBearerToken(System.getenv("ZERNIO_API_KEY")); AnalyticsApi api = new AnalyticsApi(client); Object result = api.getYouTubeDailyViews(); System.out.println(result); } } ``` -------------------------------- ### Create Post with CLI Source: https://docs.zernio.com/posts/create-post This command-line interface example shows how to create a post with text content and specify accounts for distribution. Replace 'account_abc123,account_def456' with your actual account IDs. ```bash zernio posts:create \ --text "Hello, world!" \ --accounts account_abc123,account_def456 ``` -------------------------------- ### WhatsApp Business API Setup Source: https://zernio.com/ This snippet demonstrates the initial setup for a WhatsApp Business API account. Ensure you have registered your business and obtained API credentials before use. ```javascript const accountSid = 'ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'; const authToken = 'your_auth_token'; const client = require('twilio')(accountSid, authToken); client.messages .create({ from: 'whatsapp:+14155238886', body: 'Hello! This is your product WhatsApp number.', to: 'whatsapp:+1234567890' }) .then(message => console.log(message.sid)); ``` -------------------------------- ### Get LinkedIn Post Reactions - Go Source: https://docs.zernio.com/analytics/get-linkedin-post-reactions This Go example demonstrates how to get LinkedIn post reactions. It requires setting the ZERNIO_API_KEY environment variable for authentication. ```go package main import ( "context" "fmt" "log" "net/http" "os" zernio "github.com/zernio-dev/zernio-go/zernio" ) func main() { ctx := context.Background() apiKey := os.Getenv("ZERNIO_API_KEY") client, err := zernio.NewClientWithResponses("https://zernio.com/api", zernio.WithRequestEditorFn(func(ctx context.Context, req *http.Request) error { req.Header.Set("Authorization", "Bearer "+apiKey) return nil }), ) if err != nil { log.Fatal(err) } resp, err := client.GetLinkedInPostReactionsWithResponse(ctx, "account_abc123") if err != nil { log.Fatal(err) } fmt.Println(resp) } ``` -------------------------------- ### Loading and Configuring KPSDK Source: https://zernio.com/dashboard/api-keys This snippet demonstrates how to load and configure the KPSDK. It handles script loading, event listeners for SDK readiness, and configuration with provided paths and methods. ```javascript self.__next_f.push([1, "(({protect:e})=>{\nfunction t(e){return new Promise((t,r)=>{if(document.querySelector(`script[src=\"${e}\"]`)){t();return}let n=document.createElement(\"script\");n.src=e,n.async=!0,n.onload=()=>t(),n.onerror=e=>{\nconsole.error(\"Error loading script\",e),r(e)},document.head.appendChild(n)})} var r=class e{#e;#t;#r=0;constructor(){let{promise:t,resolve:r}=e.#n();this.#e=t,this.#t=r,this.#i(),window.addEventListener(\"online\",this.#o),window.addEventListener(\"visibilitychange\",this.#o)} getChallenge=async()=>(await this.#s(),await this.#e.then(e=>\"function\"==typeof e?e():e));#o=()=>{\nif(document.hidden)return;let{promise:t,resolve:r}=e.#n();this.#e=t,this.#t=r,window.V_C=[],window.V_C.push=r;let n=document.querySelector('script[src*=\"c.js\"]');n&&n.remove(),this.#r+=1}; #i=()=>{\nif(window.V_C){let e=window.V_C.pop();e&&this.#t(e)}else window.V_C=[],window.V_C.push=this.#t}; #s=()=>{ let e=new URL(\"/149e9513-01fa-4fb0-aad4-566afd725d1b/2d206a39-8ed7-437e-a3be-862e0f06eea3/a-4-a/c.js\",window.location.origin); e.searchParams.set(\"i\",String(this.#r)),e.searchParams.set(\"v\",String(3)),e.searchParams.set(\"h\",window.location.host); return t(e.pathname+e.search)} #a=()=>{ window.V_C=void 0}; static #n(){let e,t;return{promise:new Promise((r,n)=>{e=r,t=n}),resolve:e,reject:t}}} var n=class e{#e=!1;#t;constructor(e){this.#t=e} get loaded(){return this.#e} load=async()=>{ this.#e||await this.#o()} #r=()=>{ if(typeof globalThis.window>\"u\")throw Error(\"KPSDK is not available in the server\"); if(!window.KPSDK)throw Error(\"KPSDK is not loaded\"); let t=this.#t.map(t=>{ let r=e.#i(t.path); return{domain:r.host,path:r.pathname,method:t.method}}); try{ window.KPSDK.configure(t) }catch(e){ console.error(\"Error configuring KPSDK...\",e)}} #o=async()=>{ let e=this; return new Promise((r,n)=>{ let i=()=>{ document.removeEventListener(\"kpsdk-load\",i),this.#r()} o=()=>{ document.removeEventListener(\"kpsdk-ready\",o),e.#e=!0,r()} document.addEventListener(\"kpsdk-load\",i,{once:!0}),document.addEventListener(\"kpsdk-ready\",o,{once:!0}); t( \"/149e9513-01fa-4fb0-aad4-566afd725d1b/2d206a39-8ed7-437e-a3be-862e0f06eea3/p.js\" ).catch(e=>{ document.removeEventListener(\"kpsdk-load\",i),document.removeEventListener(\"kpsdk-ready\",o),n(e)}) })} static #i(e){let t; try{ t=new URL(e) }catch{ t=new URL(e,location.origin)} return t}} ,i=e=>{ let ```