@inploi/sdk 0.4.2 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cdn/sdk.js +2 -9
- package/dist/sdk.d.mts +1 -1
- package/dist/sdk.d.ts +1 -1
- package/dist/sdk.js +1 -1
- package/dist/sdk.js.map +1 -1
- package/dist/sdk.mjs +1 -1
- package/dist/sdk.mjs.map +1 -1
- package/package.json +1 -1
package/cdn/sdk.js
CHANGED
|
@@ -90,14 +90,6 @@
|
|
|
90
90
|
log: (message) => console.log(CONSOLE_PREFIX, CONSOLE_STYLE, message)
|
|
91
91
|
};
|
|
92
92
|
|
|
93
|
-
// ../core/dist/chunk-H7ZOE7ZC.mjs
|
|
94
|
-
function invariant(condition, message) {
|
|
95
|
-
if (condition) {
|
|
96
|
-
return;
|
|
97
|
-
}
|
|
98
|
-
throw new Error(message);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
93
|
// src/sdk.ts
|
|
102
94
|
function initialiseSdk({
|
|
103
95
|
publishableKey,
|
|
@@ -105,7 +97,8 @@
|
|
|
105
97
|
plugins,
|
|
106
98
|
logger = inploiBrandedLogger
|
|
107
99
|
}) {
|
|
108
|
-
|
|
100
|
+
if (typeof window === "undefined")
|
|
101
|
+
return null;
|
|
109
102
|
const apiClient = createApiClient({ baseUrl: ENV_TO_API_URL[env], publishableKey });
|
|
110
103
|
const pluginsObj = plugins.reduce((acc, plugin) => {
|
|
111
104
|
acc[plugin.pluginName] = plugin.initialise({ apiClient, logger });
|
package/dist/sdk.d.mts
CHANGED
|
@@ -26,6 +26,6 @@ declare function initialiseSdk<TPlugin extends Plugin<any, any>>({ publishableKe
|
|
|
26
26
|
pluginName: K;
|
|
27
27
|
} extends infer T ? { [k in keyof T]: (TPlugin & {
|
|
28
28
|
pluginName: K;
|
|
29
|
-
})[k]; } : never)["initialise"]>; };
|
|
29
|
+
})[k]; } : never)["initialise"]>; } | null;
|
|
30
30
|
|
|
31
31
|
export { InitialiseInploiSdkParams, Logger, Plugin, initialiseSdk };
|
package/dist/sdk.d.ts
CHANGED
|
@@ -26,6 +26,6 @@ declare function initialiseSdk<TPlugin extends Plugin<any, any>>({ publishableKe
|
|
|
26
26
|
pluginName: K;
|
|
27
27
|
} extends infer T ? { [k in keyof T]: (TPlugin & {
|
|
28
28
|
pluginName: K;
|
|
29
|
-
})[k]; } : never)["initialise"]>; };
|
|
29
|
+
})[k]; } : never)["initialise"]>; } | null;
|
|
30
30
|
|
|
31
31
|
export { InitialiseInploiSdkParams, Logger, Plugin, initialiseSdk };
|
package/dist/sdk.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var l=Object.defineProperty,T=Object.defineProperties,E=Object.getOwnPropertyDescriptor,b=Object.getOwnPropertyDescriptors,C=Object.getOwnPropertyNames,P=Object.getOwnPropertySymbols;var x=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable;var f=(e,n,o)=>n in e?l(e,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[n]=o,u=(e,n)=>{for(var o in n||(n={}))x.call(n,o)&&f(e,o,n[o]);if(P)for(var o of P(n))v.call(n,o)&&f(e,o,n[o]);return e},h=(e,n)=>T(e,b(n));var I=(e,n)=>{for(var o in n)l(e,o,{get:n[o],enumerable:!0})},N=(e,n,o,t)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of C(n))!x.call(e,r)&&r!==o&&l(e,r,{get:()=>n[r],enumerable:!(t=E(n,r))||t.enumerable});return e};var O=e=>N(l({},"__esModule",{value:!0}),e);var y=(e,n,o)=>new Promise((t,r)=>{var d=s=>{try{i(o.next(s))}catch(m){r(m)}},a=s=>{try{i(o.throw(s))}catch(m){r(m)}},i=s=>s.done?t(s.value):Promise.resolve(s.value).then(d,a);i((o=o.apply(e,n)).next())});var U={};I(U,{CONSOLE_PREFIX:()=>p,CONSOLE_STYLE:()=>g,createPlugin:()=>A,initialiseSdk:()=>S,inploiBrandedLogger:()=>c,noLogging:()=>R});module.exports=O(U);var L={sandbox:"https://preview.api.inploi.com",production:"https://api.inploi.com"};var _="Unauthenticated",M="This action is unauthorized.",w=e=>{let n={Accept:"application/json","Content-Type":"application/json","x-publishable-key":e.publishableKey};return{fetch:(r,...d)=>y(void 0,[r,...d],function*(o,t={}){let a=h(u({},t),{headers:u(u({},t.headers),n)}),i=yield fetch(`${e.baseUrl}${o}`,a).then(s=>s.json());if("message"in i){if(i.message===_)throw new Error("You are not authenticated.");if(i.message===M)throw new Error("You are not authenticated.");if("exception"in i)throw new Error(`API error: \u201C${i.message}\u201D`);if("errors"in i)throw new Error(`API error: \u201C${i.message}\u201D`)}return i})}};var p="%c[inploi SDK]",g="color: #65BC67; font-weight: bold;",c={warn:e=>console.warn(p,g,e),error:e=>console.error(p,g,e),info:e=>console.info(p,g,e),log:e=>console.log(p,g,e)},R={info:()=>{},error:()=>{},log:()=>{},warn:()=>{}};var A=(e,{initialise:n})=>({pluginName:e,initialise:n});function S({publishableKey:e,env:n,plugins:o,logger:t=c}){if(typeof window=="undefined")return null;let r=w({baseUrl:L[n],publishableKey:e});return o.reduce((a,i)=>(a[i.pluginName]=i.initialise({apiClient:r,logger:t}),a),{})}0&&(module.exports={CONSOLE_PREFIX,CONSOLE_STYLE,createPlugin,initialiseSdk,inploiBrandedLogger,noLogging});
|
|
2
2
|
//# sourceMappingURL=sdk.js.map
|
package/dist/sdk.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/sdk.ts","../src/journeys/journeys.constants.ts","../src/journeys/journeys.api.ts","../src/common/common.logger.ts","
|
|
1
|
+
{"version":3,"sources":["../src/sdk.ts","../src/journeys/journeys.constants.ts","../src/journeys/journeys.api.ts","../src/common/common.logger.ts","../src/common/common.plugins.ts"],"sourcesContent":["import { ENV_TO_API_URL } from './journeys/journeys.constants';\nimport { createApiClient } from './journeys/journeys.api';\nimport { Logger, inploiBrandedLogger } from './common/common.logger';\n\nimport { Flatten } from '@inploi/core/common';\nimport { AppEnvironment } from './common/common.constants';\nimport { Plugin } from './common/common.plugins';\n\n/** Different loggers so people can use `noLogging` */\nexport * from './common/common.logger';\nexport type { Plugin } from './common/common.plugins';\nexport { createPlugin } from './common/common.plugins';\n\nexport type InitialiseInploiSdkParams<P extends Plugin<any, any>> = {\n\t/** Your public API key for the inploi SDK. */\n\tpublishableKey: string;\n\t/** Add your plugins here. Try importing and passing `journeysPlugin` ;) */\n\tplugins: P[];\n\t/** Which app environment to run. This ultimately affects which inploi endpoints to gather data are going to be used.\n\t * Anything other than `production` should be considered a development environment and the data periodicaly purged. */\n\tenv: AppEnvironment;\n\t/** Logger object that handles logging of different levels.\n\t * You can override this to use your own logger, or to disable logging altogether by importing and passing `noLogging`.\n\t * @default inploiBrandedLogger\n\t * */\n\tlogger?: Logger;\n};\n\nexport function initialiseSdk<TPlugin extends Plugin<any, any>>({\n\tpublishableKey,\n\tenv,\n\tplugins,\n\tlogger = inploiBrandedLogger,\n}: InitialiseInploiSdkParams<TPlugin>) {\n\tif (typeof window === 'undefined') return null;\n\n\tconst apiClient = createApiClient({ baseUrl: ENV_TO_API_URL[env], publishableKey });\n\n\tconst pluginsObj = plugins.reduce((acc, plugin) => {\n\t\tacc[plugin.pluginName as TPlugin['pluginName']] = plugin.initialise({ apiClient, logger });\n\t\treturn acc;\n\t}, {} as { [K in TPlugin['pluginName']]: ReturnType<Flatten<TPlugin & { pluginName: K }>['initialise']> });\n\n\treturn pluginsObj;\n}\n","import { AppEnvironment } from '../common/common.constants';\n\nexport const ENV_TO_API_URL: Record<AppEnvironment, string> = {\n\tsandbox: 'https://preview.api.inploi.com',\n\tproduction: 'https://api.inploi.com',\n};\n\nexport const JOURNEY_PATHNAME = '/journey/log';\n","export const unauthenticatedMessage = 'Unauthenticated';\nexport const unauthorisedMessage = 'This action is unauthorized.';\n\nexport type ApiClient = {\n\tfetch: (pathname: string, options?: RequestInit) => Promise<unknown>;\n};\n\nexport const createApiClient = (params: { baseUrl: string; publishableKey: string }): ApiClient => {\n\tconst defaultHeaders: HeadersInit = {\n\t\tAccept: 'application/json',\n\t\t'Content-Type': 'application/json',\n\t\t'x-publishable-key': params.publishableKey,\n\t};\n\n\treturn {\n\t\tfetch: async (pathname, options = {}) => {\n\t\t\tconst init = { ...options, headers: { ...options.headers, ...defaultHeaders } };\n\t\t\tconst response = await fetch(`${params.baseUrl}${pathname}`, init).then(res => res.json());\n\n\t\t\tif ('message' in response) {\n\t\t\t\tif (response.message === unauthenticatedMessage) {\n\t\t\t\t\tthrow new Error('You are not authenticated.');\n\t\t\t\t}\n\t\t\t\tif (response.message === unauthorisedMessage) {\n\t\t\t\t\tthrow new Error('You are not authenticated.');\n\t\t\t\t}\n\t\t\t\tif ('exception' in response) {\n\t\t\t\t\tthrow new Error(`API error: “${response.message}”`);\n\t\t\t\t}\n\t\t\t\tif ('errors' in response) {\n\t\t\t\t\tthrow new Error(`API error: “${response.message}”`);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn response;\n\t\t},\n\t};\n};\n","export const CONSOLE_PREFIX = '%c[inploi SDK]';\nexport const CONSOLE_STYLE = 'color: #65BC67; font-weight: bold;';\n\ntype LogMessage = (...data: any[]) => void;\nexport type Logger = {\n\twarn: LogMessage;\n\terror: LogMessage;\n\tinfo: LogMessage;\n\tlog: LogMessage;\n};\n\nexport const inploiBrandedLogger: Logger = {\n\twarn: message => console.warn(CONSOLE_PREFIX, CONSOLE_STYLE, message),\n\terror: message => console.error(CONSOLE_PREFIX, CONSOLE_STYLE, message),\n\tinfo: message => console.info(CONSOLE_PREFIX, CONSOLE_STYLE, message),\n\tlog: message => console.log(CONSOLE_PREFIX, CONSOLE_STYLE, message),\n};\n\nexport const noLogging: Logger = { info: () => void 0, error: () => void 0, log: () => void 0, warn: () => void 0 };\n","import { Logger } from './common.logger';\nimport { ApiClient } from '../journeys/journeys.api';\n\nexport type PluginParams = {\n\tapiClient: ApiClient;\n\tlogger?: Logger;\n};\n\nexport type Plugin<T extends string, P> = {\n\tpluginName: T;\n\tinitialise: (params: PluginParams) => P;\n};\n\nexport const createPlugin = <T extends string, P>(\n\tpluginName: T,\n\t{ initialise }: { initialise: (params: PluginParams) => P }\n): Plugin<T, P> => ({\n\tpluginName,\n\tinitialise,\n});\n"],"mappings":"i9BAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,oBAAAE,EAAA,kBAAAC,EAAA,iBAAAC,EAAA,kBAAAC,EAAA,wBAAAC,EAAA,cAAAC,IAAA,eAAAC,EAAAR,GCEO,IAAMS,EAAiD,CAC7D,QAAS,iCACT,WAAY,wBACb,ECLO,IAAMC,EAAyB,kBACzBC,EAAsB,+BAMtBC,EAAmBC,GAAmE,CAClG,IAAMC,EAA8B,CACnC,OAAQ,mBACR,eAAgB,mBAChB,oBAAqBD,EAAO,cAC7B,EAEA,MAAO,CACN,MAAO,CAAOE,KAA2BC,IAAAC,EAAA,QAA3BF,EAA2B,GAAAC,GAAA,UAA3BE,EAAUC,EAAU,CAAC,EAAM,CACxC,IAAMC,EAAOC,EAAAC,EAAA,GAAKH,GAAL,CAAc,QAASG,IAAA,GAAKH,EAAQ,SAAYL,EAAiB,GACxES,EAAW,MAAM,MAAM,GAAGV,EAAO,OAAO,GAAGK,CAAQ,GAAIE,CAAI,EAAE,KAAKI,GAAOA,EAAI,KAAK,CAAC,EAEzF,GAAI,YAAaD,EAAU,CAC1B,GAAIA,EAAS,UAAYb,EACxB,MAAM,IAAI,MAAM,4BAA4B,EAE7C,GAAIa,EAAS,UAAYZ,EACxB,MAAM,IAAI,MAAM,4BAA4B,EAE7C,GAAI,cAAeY,EAClB,MAAM,IAAI,MAAM,oBAAeA,EAAS,OAAO,QAAG,EAEnD,GAAI,WAAYA,EACf,MAAM,IAAI,MAAM,oBAAeA,EAAS,OAAO,QAAG,CAEpD,CACA,OAAOA,CACR,EACD,CACD,ECpCO,IAAME,EAAiB,iBACjBC,EAAgB,qCAUhBC,EAA8B,CAC1C,KAAMC,GAAW,QAAQ,KAAKH,EAAgBC,EAAeE,CAAO,EACpE,MAAOA,GAAW,QAAQ,MAAMH,EAAgBC,EAAeE,CAAO,EACtE,KAAMA,GAAW,QAAQ,KAAKH,EAAgBC,EAAeE,CAAO,EACpE,IAAKA,GAAW,QAAQ,IAAIH,EAAgBC,EAAeE,CAAO,CACnE,EAEaC,EAAoB,CAAE,KAAM,IAAG,GAAW,MAAO,IAAG,GAAW,IAAK,IAAG,GAAW,KAAM,IAAG,EAAU,ECL3G,IAAMC,EAAe,CAC3BC,EACA,CAAE,WAAAC,CAAW,KACM,CACnB,WAAAD,EACA,WAAAC,CACD,GJSO,SAASC,EAAgD,CAC/D,eAAAC,EACA,IAAAC,EACA,QAAAC,EACA,OAAAC,EAASC,CACV,EAAuC,CACtC,GAAI,OAAO,QAAW,YAAa,OAAO,KAE1C,IAAMC,EAAYC,EAAgB,CAAE,QAASC,EAAeN,CAAG,EAAG,eAAAD,CAAe,CAAC,EAOlF,OALmBE,EAAQ,OAAO,CAACM,EAAKC,KACvCD,EAAIC,EAAO,UAAmC,EAAIA,EAAO,WAAW,CAAE,UAAAJ,EAAW,OAAAF,CAAO,CAAC,EAClFK,GACL,CAAC,CAAqG,CAG1G","names":["sdk_exports","__export","CONSOLE_PREFIX","CONSOLE_STYLE","createPlugin","initialiseSdk","inploiBrandedLogger","noLogging","__toCommonJS","ENV_TO_API_URL","unauthenticatedMessage","unauthorisedMessage","createApiClient","params","defaultHeaders","_0","_1","__async","pathname","options","init","__spreadProps","__spreadValues","response","res","CONSOLE_PREFIX","CONSOLE_STYLE","inploiBrandedLogger","message","noLogging","createPlugin","pluginName","initialise","initialiseSdk","publishableKey","env","plugins","logger","inploiBrandedLogger","apiClient","createApiClient","ENV_TO_API_URL","acc","plugin"]}
|
package/dist/sdk.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as i,b as l,c as p,d as u,f as h}from"./chunk-KHVPBEFD.mjs";var P="Unauthenticated",x="This action is unauthorized.",c=e=>{let a={Accept:"application/json","Content-Type":"application/json","x-publishable-key":e.publishableKey};return{fetch:(d,...y)=>p(void 0,[d,...y],function*(g,o={}){let r=l(i({},o),{headers:i(i({},o.headers),a)}),n=yield fetch(`${e.baseUrl}${g}`,r).then(f=>f.json());if("message"in n){if(n.message===P)throw new Error("You are not authenticated.");if(n.message===x)throw new Error("You are not authenticated.");if("exception"in n)throw new Error(`API error: \u201C${n.message}\u201D`);if("errors"in n)throw new Error(`API error: \u201C${n.message}\u201D`)}return n})}};var t="%c[inploi SDK]",s="color: #65BC67; font-weight: bold;",m={warn:e=>console.warn(t,s,e),error:e=>console.error(t,s,e),info:e=>console.info(t,s,e),log:e=>console.log(t,s,e)},b={info:()=>{},error:()=>{},log:()=>{},warn:()=>{}};function v({publishableKey:e,env:a,plugins:g,logger:o=m}){if(typeof window=="undefined")return null;let d=c({baseUrl:u[a],publishableKey:e});return g.reduce((r,n)=>(r[n.pluginName]=n.initialise({apiClient:d,logger:o}),r),{})}export{t as CONSOLE_PREFIX,s as CONSOLE_STYLE,h as createPlugin,v as initialiseSdk,m as inploiBrandedLogger,b as noLogging};
|
|
2
2
|
//# sourceMappingURL=sdk.mjs.map
|
package/dist/sdk.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/journeys/journeys.api.ts","../src/common/common.logger.ts","
|
|
1
|
+
{"version":3,"sources":["../src/journeys/journeys.api.ts","../src/common/common.logger.ts","../src/sdk.ts"],"sourcesContent":["export const unauthenticatedMessage = 'Unauthenticated';\nexport const unauthorisedMessage = 'This action is unauthorized.';\n\nexport type ApiClient = {\n\tfetch: (pathname: string, options?: RequestInit) => Promise<unknown>;\n};\n\nexport const createApiClient = (params: { baseUrl: string; publishableKey: string }): ApiClient => {\n\tconst defaultHeaders: HeadersInit = {\n\t\tAccept: 'application/json',\n\t\t'Content-Type': 'application/json',\n\t\t'x-publishable-key': params.publishableKey,\n\t};\n\n\treturn {\n\t\tfetch: async (pathname, options = {}) => {\n\t\t\tconst init = { ...options, headers: { ...options.headers, ...defaultHeaders } };\n\t\t\tconst response = await fetch(`${params.baseUrl}${pathname}`, init).then(res => res.json());\n\n\t\t\tif ('message' in response) {\n\t\t\t\tif (response.message === unauthenticatedMessage) {\n\t\t\t\t\tthrow new Error('You are not authenticated.');\n\t\t\t\t}\n\t\t\t\tif (response.message === unauthorisedMessage) {\n\t\t\t\t\tthrow new Error('You are not authenticated.');\n\t\t\t\t}\n\t\t\t\tif ('exception' in response) {\n\t\t\t\t\tthrow new Error(`API error: “${response.message}”`);\n\t\t\t\t}\n\t\t\t\tif ('errors' in response) {\n\t\t\t\t\tthrow new Error(`API error: “${response.message}”`);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn response;\n\t\t},\n\t};\n};\n","export const CONSOLE_PREFIX = '%c[inploi SDK]';\nexport const CONSOLE_STYLE = 'color: #65BC67; font-weight: bold;';\n\ntype LogMessage = (...data: any[]) => void;\nexport type Logger = {\n\twarn: LogMessage;\n\terror: LogMessage;\n\tinfo: LogMessage;\n\tlog: LogMessage;\n};\n\nexport const inploiBrandedLogger: Logger = {\n\twarn: message => console.warn(CONSOLE_PREFIX, CONSOLE_STYLE, message),\n\terror: message => console.error(CONSOLE_PREFIX, CONSOLE_STYLE, message),\n\tinfo: message => console.info(CONSOLE_PREFIX, CONSOLE_STYLE, message),\n\tlog: message => console.log(CONSOLE_PREFIX, CONSOLE_STYLE, message),\n};\n\nexport const noLogging: Logger = { info: () => void 0, error: () => void 0, log: () => void 0, warn: () => void 0 };\n","import { ENV_TO_API_URL } from './journeys/journeys.constants';\nimport { createApiClient } from './journeys/journeys.api';\nimport { Logger, inploiBrandedLogger } from './common/common.logger';\n\nimport { Flatten } from '@inploi/core/common';\nimport { AppEnvironment } from './common/common.constants';\nimport { Plugin } from './common/common.plugins';\n\n/** Different loggers so people can use `noLogging` */\nexport * from './common/common.logger';\nexport type { Plugin } from './common/common.plugins';\nexport { createPlugin } from './common/common.plugins';\n\nexport type InitialiseInploiSdkParams<P extends Plugin<any, any>> = {\n\t/** Your public API key for the inploi SDK. */\n\tpublishableKey: string;\n\t/** Add your plugins here. Try importing and passing `journeysPlugin` ;) */\n\tplugins: P[];\n\t/** Which app environment to run. This ultimately affects which inploi endpoints to gather data are going to be used.\n\t * Anything other than `production` should be considered a development environment and the data periodicaly purged. */\n\tenv: AppEnvironment;\n\t/** Logger object that handles logging of different levels.\n\t * You can override this to use your own logger, or to disable logging altogether by importing and passing `noLogging`.\n\t * @default inploiBrandedLogger\n\t * */\n\tlogger?: Logger;\n};\n\nexport function initialiseSdk<TPlugin extends Plugin<any, any>>({\n\tpublishableKey,\n\tenv,\n\tplugins,\n\tlogger = inploiBrandedLogger,\n}: InitialiseInploiSdkParams<TPlugin>) {\n\tif (typeof window === 'undefined') return null;\n\n\tconst apiClient = createApiClient({ baseUrl: ENV_TO_API_URL[env], publishableKey });\n\n\tconst pluginsObj = plugins.reduce((acc, plugin) => {\n\t\tacc[plugin.pluginName as TPlugin['pluginName']] = plugin.initialise({ apiClient, logger });\n\t\treturn acc;\n\t}, {} as { [K in TPlugin['pluginName']]: ReturnType<Flatten<TPlugin & { pluginName: K }>['initialise']> });\n\n\treturn pluginsObj;\n}\n"],"mappings":"qEAAO,IAAMA,EAAyB,kBACzBC,EAAsB,+BAMtBC,EAAmBC,GAAmE,CAClG,IAAMC,EAA8B,CACnC,OAAQ,mBACR,eAAgB,mBAChB,oBAAqBD,EAAO,cAC7B,EAEA,MAAO,CACN,MAAO,CAAOE,KAA2BC,IAAAC,EAAA,QAA3BF,EAA2B,GAAAC,GAAA,UAA3BE,EAAUC,EAAU,CAAC,EAAM,CACxC,IAAMC,EAAOC,EAAAC,EAAA,GAAKH,GAAL,CAAc,QAASG,IAAA,GAAKH,EAAQ,SAAYL,EAAiB,GACxES,EAAW,MAAM,MAAM,GAAGV,EAAO,OAAO,GAAGK,CAAQ,GAAIE,CAAI,EAAE,KAAKI,GAAOA,EAAI,KAAK,CAAC,EAEzF,GAAI,YAAaD,EAAU,CAC1B,GAAIA,EAAS,UAAYb,EACxB,MAAM,IAAI,MAAM,4BAA4B,EAE7C,GAAIa,EAAS,UAAYZ,EACxB,MAAM,IAAI,MAAM,4BAA4B,EAE7C,GAAI,cAAeY,EAClB,MAAM,IAAI,MAAM,oBAAeA,EAAS,OAAO,QAAG,EAEnD,GAAI,WAAYA,EACf,MAAM,IAAI,MAAM,oBAAeA,EAAS,OAAO,QAAG,CAEpD,CACA,OAAOA,CACR,EACD,CACD,ECpCO,IAAME,EAAiB,iBACjBC,EAAgB,qCAUhBC,EAA8B,CAC1C,KAAMC,GAAW,QAAQ,KAAKH,EAAgBC,EAAeE,CAAO,EACpE,MAAOA,GAAW,QAAQ,MAAMH,EAAgBC,EAAeE,CAAO,EACtE,KAAMA,GAAW,QAAQ,KAAKH,EAAgBC,EAAeE,CAAO,EACpE,IAAKA,GAAW,QAAQ,IAAIH,EAAgBC,EAAeE,CAAO,CACnE,EAEaC,EAAoB,CAAE,KAAM,IAAG,GAAW,MAAO,IAAG,GAAW,IAAK,IAAG,GAAW,KAAM,IAAG,EAAU,ECU3G,SAASC,EAAgD,CAC/D,eAAAC,EACA,IAAAC,EACA,QAAAC,EACA,OAAAC,EAASC,CACV,EAAuC,CACtC,GAAI,OAAO,QAAW,YAAa,OAAO,KAE1C,IAAMC,EAAYC,EAAgB,CAAE,QAASC,EAAeN,CAAG,EAAG,eAAAD,CAAe,CAAC,EAOlF,OALmBE,EAAQ,OAAO,CAACM,EAAKC,KACvCD,EAAIC,EAAO,UAAmC,EAAIA,EAAO,WAAW,CAAE,UAAAJ,EAAW,OAAAF,CAAO,CAAC,EAClFK,GACL,CAAC,CAAqG,CAG1G","names":["unauthenticatedMessage","unauthorisedMessage","createApiClient","params","defaultHeaders","_0","_1","__async","pathname","options","init","__spreadProps","__spreadValues","response","res","CONSOLE_PREFIX","CONSOLE_STYLE","inploiBrandedLogger","message","noLogging","initialiseSdk","publishableKey","env","plugins","logger","inploiBrandedLogger","apiClient","createApiClient","ENV_TO_API_URL","acc","plugin"]}
|