@transmitsecurity/platform-web-sdk 1.15.0

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.
Files changed (74) hide show
  1. package/CHANGELOG.md +479 -0
  2. package/README.md +72 -0
  3. package/VITE_CONFIG.md +107 -0
  4. package/build/drs-entry.d.ts +20 -0
  5. package/build/drs-entry.js +19 -0
  6. package/build/drs-only.d.ts +22 -0
  7. package/build/drs-only.js +25 -0
  8. package/build/drs.d.ts +13 -0
  9. package/build/drs.js +45 -0
  10. package/build/ido-entry.d.ts +17 -0
  11. package/build/ido-entry.js +19 -0
  12. package/build/ido.d.ts +8 -0
  13. package/build/ido.js +27 -0
  14. package/build/idv-entry.d.ts +17 -0
  15. package/build/idv-entry.js +19 -0
  16. package/build/idv.d.ts +8 -0
  17. package/build/idv.js +27 -0
  18. package/build/initialize-only.d.ts +7 -0
  19. package/build/initialize-only.js +40 -0
  20. package/build/initialize.d.ts +1 -0
  21. package/build/initialize.js +2 -0
  22. package/build/mainExport.d.ts +16 -0
  23. package/build/mainExport.js +43 -0
  24. package/build/sdk-factory.d.ts +109 -0
  25. package/build/sdk-factory.js +108 -0
  26. package/build/shared-state.d.ts +4 -0
  27. package/build/shared-state.js +32 -0
  28. package/build/webauthn-entry.d.ts +19 -0
  29. package/build/webauthn-entry.js +19 -0
  30. package/build/webauthn.d.ts +12 -0
  31. package/build/webauthn.js +44 -0
  32. package/bundler-config.json +15 -0
  33. package/dist/docs/.nojekyll +1 -0
  34. package/dist/docs/README.md +72 -0
  35. package/dist/docs/enums/ErrorCode.md +113 -0
  36. package/dist/docs/interfaces/ActionEventOptions.md +44 -0
  37. package/dist/docs/interfaces/ActionResponse.md +9 -0
  38. package/dist/docs/interfaces/AuthenticationAutofillActivateHandlers.md +61 -0
  39. package/dist/docs/interfaces/AutofillHandlers.md +50 -0
  40. package/dist/docs/interfaces/CrossDeviceController.md +27 -0
  41. package/dist/docs/interfaces/SdkError.md +28 -0
  42. package/dist/docs/interfaces/WebauthnApis.md +73 -0
  43. package/dist/docs/interfaces/WebauthnAuthenticationFlows.md +52 -0
  44. package/dist/docs/interfaces/WebauthnCrossDeviceFlows.md +107 -0
  45. package/dist/docs/interfaces/WebauthnCrossDeviceRegistrationOptions.md +23 -0
  46. package/dist/docs/interfaces/WebauthnRegistrationOptions.md +55 -0
  47. package/dist/docs/interfaces/initConfigParams.md +7 -0
  48. package/dist/docs/modules/drs.md +92 -0
  49. package/dist/docs/modules/idv.md +106 -0
  50. package/dist/docs/modules/webauthn.md +197 -0
  51. package/dist/docs/modules.md +146 -0
  52. package/dist/drs.cjs +1 -0
  53. package/dist/drs.d.ts +241 -0
  54. package/dist/drs.js +1 -0
  55. package/dist/ido.cjs +1 -0
  56. package/dist/ido.d.ts +8 -0
  57. package/dist/ido.js +1 -0
  58. package/dist/idv.cjs +1 -0
  59. package/dist/idv.d.ts +68 -0
  60. package/dist/idv.js +1 -0
  61. package/dist/index.cjs +1 -0
  62. package/dist/index.esm.js +1 -0
  63. package/dist/index.umd.js +1 -0
  64. package/dist/ts-platform-websdk.js +1 -0
  65. package/dist/web-sdk-drs+idv+webauthn+ido.js +1 -0
  66. package/dist/web-sdk.d.ts +1737 -0
  67. package/dist/webauthn.cjs +1 -0
  68. package/dist/webauthn.d.ts +461 -0
  69. package/dist/webauthn.js +1 -0
  70. package/package.json +98 -0
  71. package/scripts/make-semver-aliases.sh +11 -0
  72. package/scripts/upload-dist.sh +6 -0
  73. package/src/mainExport.ts +75 -0
  74. package/src/tsconfig.json +14 -0
package/dist/drs.d.ts ADDED
@@ -0,0 +1,241 @@
1
+ declare enum RecommendationType {
2
+ ALLOW = "ALLOW",
3
+ CHALLENGE = "CHALLENGE",
4
+ DENY = "DENY",
5
+ TRUST = "TRUST"
6
+ }
7
+ type EventResponse = {
8
+ actionToken?: string;
9
+ deviceId?: string;
10
+ recommendation?: Recommendation;
11
+ userId?: string;
12
+ };
13
+ type Recommendation = {
14
+ type: RecommendationType;
15
+ };
16
+
17
+ interface ActionResponse {
18
+ /** The token return by the SDK when the action was reported */
19
+ actionToken?: string;
20
+ }
21
+ interface InitOptions {
22
+ /** Opaque identifier of the user in your system */
23
+ userId?: string;
24
+ }
25
+ /**
26
+ * Initial parameters for SDK
27
+ */
28
+ interface ConstructorOptions {
29
+ /** Print logs to console */
30
+ verbose?: boolean;
31
+ /** Your server URL
32
+ *
33
+ * Default value is https://collect.riskid.security */
34
+ serverPath?: string;
35
+ /** Enable session token fetching
36
+ *
37
+ * Default value is false */
38
+ enableSessionToken?: boolean;
39
+ /** First party server url for the identifiers migration
40
+ *
41
+ * Default value is undefined */
42
+ firstPartyMigrationUrl?: string;
43
+ }
44
+ interface TransactionData {
45
+ amount: number;
46
+ currency: string;
47
+ reason?: string;
48
+ transactionDate?: number;
49
+ payer?: {
50
+ name?: string;
51
+ bankIdentifier?: string;
52
+ branchIdentifier?: string;
53
+ accountNumber?: string;
54
+ };
55
+ payee?: {
56
+ name?: string;
57
+ bankIdentifier?: string;
58
+ branchIdentifier?: string;
59
+ accountNumber?: string;
60
+ };
61
+ }
62
+ interface ActionEventOptions {
63
+ /** Any ID that could help relate the action with external context or session */
64
+ correlationId?: string;
65
+ /** User ID of the not yet authenticated user, used to enhance risk and
66
+ * trust assessments. Once the user is authenticated,
67
+ * {@link TSAccountProtection.setAuthenticatedUser} should be called. */
68
+ claimedUserId?: string;
69
+ /**
70
+ * The reported claimedUserId type (if provided), should not contain PII unless it is hashed.
71
+ * Supported values: email, phone_number, account_id, ssn, national_id, passport_number, drivers_license_number, other.
72
+ */
73
+ claimedUserIdType?: string;
74
+ /**
75
+ * A transaction data-points object for transaction-monitoring
76
+ */
77
+ transactionData?: TransactionData;
78
+ /**
79
+ * Custom attributes matching the schema previously defined in the Admin Portal
80
+ */
81
+ customAttributes?: Record<string, string | number | boolean>;
82
+ /**
83
+ * The fields below are supported for Enterprise-IAM sdk usage actions, added `ignore` for avoiding preseting this attribute in the docs
84
+ * @ignore
85
+ */
86
+ publicKey?: string;
87
+ /**
88
+ * @ignore
89
+ */
90
+ extensionMetadata?: string;
91
+ /**
92
+ * @ignore
93
+ */
94
+ extensionDeviceAttributes?: Record<string, string>;
95
+ /**
96
+ * @ignore
97
+ */
98
+ suspiciousSignals?: string[];
99
+ /**
100
+ * @ignore
101
+ */
102
+ suspiciousContext?: string;
103
+ /**
104
+ * @ignore
105
+ */
106
+ downloadFile?: Record<string, boolean | string | number>;
107
+ /**
108
+ * @ignore
109
+ */
110
+ uploadFile?: Record<string, boolean | string | number>;
111
+ }
112
+ declare class TSAccountProtection {
113
+ private static initializedInstance;
114
+ private initializationPromise;
115
+ private isSDKDisabled;
116
+ private enableSessionToken;
117
+ private identifiersMigrationEnabled;
118
+ private firstPartyMigrationUrl;
119
+ private validationManager;
120
+ private storageManager;
121
+ private eventsManager;
122
+ private deviceDataManager;
123
+ private configManager;
124
+ private requestsManager;
125
+ private identityManager;
126
+ private migrationsManager;
127
+ private cryptoBinding;
128
+ private logsReporter;
129
+ private options;
130
+ private clientId;
131
+ /**
132
+ *
133
+ Creates a new Account Protection SDK instance with your client context
134
+ @param clientId Your AccountProtection client identifier
135
+ @param options SDK configuration options
136
+ */
137
+ constructor(clientId: string, options?: ConstructorOptions);
138
+ /** @ignore */
139
+ constructor(serverPath: string, clientId: string);
140
+ /**
141
+ * @ignore
142
+ * @returns List of loaded actions that can be invoked
143
+ */
144
+ get actions(): string[];
145
+ /** @ignore */
146
+ getActions(): Promise<string[]>;
147
+ getSessionToken(): Promise<any>;
148
+ /**
149
+ * Initializes the AccountProtection SDK, which starts automatically tracking and submitting info of the user journey
150
+ * @param options Init options
151
+ * @returns Indicates if the call succeeded
152
+ */
153
+ init(options?: InitOptions | string): Promise<boolean>;
154
+ private isInitialized;
155
+ /**
156
+ * Reports a user action event to the SDK
157
+ * @param actionType Type of user action event that was predefined in the Transmit Security server
158
+ * @returns Indicates if the call succeeded
159
+ */
160
+ triggerActionEvent(actionType: string, options?: ActionEventOptions): Promise<ActionResponse>;
161
+ /**
162
+ * @ignore
163
+ */
164
+ identifyUser(userId: string): Promise<boolean>;
165
+ private updateUserId;
166
+ /**
167
+ * @ignore
168
+ */
169
+ unidentifiedUser(): Promise<boolean>;
170
+ /**
171
+ * Sets the user context for all subsequent events in the browser session (or until the user is explicitly cleared)
172
+ * It should be set only after you've fully authenticated the user (including, for example, any 2FA that was required)
173
+ * @param userId Opaque identifier of the user in your system
174
+ * @param options Reserved for future use
175
+ * @returns Indicates if the call succeeded
176
+ */
177
+ setAuthenticatedUser(userId: string, options?: {}): Promise<boolean>;
178
+ /** @ignore */
179
+ setUser(userId: string, _options?: {}): Promise<boolean>;
180
+ /**
181
+ * Clears the user context for all subsequent events in the browser session
182
+ * @param options Reserved for future use
183
+ * @returns Indicates if the call succeeded
184
+ */
185
+ clearUser(options?: {}): Promise<boolean>;
186
+ }
187
+
188
+ declare module '@transmit-security/web-sdk-common/dist/module-metadata/module-metadata' {
189
+ interface initConfigParams {
190
+ drs?: InitOptions & ConstructorOptions & {
191
+ enabled: boolean;
192
+ };
193
+ }
194
+ }
195
+ /**
196
+ * Reports a user action event to the SDK
197
+ * @param actionType Type of user action event that was predefined in the Transmit Security server
198
+ * @returns Indicates if the call succeeded
199
+ */
200
+ declare const triggerActionEvent: TSAccountProtection['triggerActionEvent'];
201
+ /** @ignore */
202
+ declare const setUser: TSAccountProtection['setUser'];
203
+ /**
204
+ * Sets the user context for all subsequent events in the browser session (or until the user is explicitly cleared)
205
+ * It should be set only after you've fully authenticated the user (including, for example, any 2FA that was required)
206
+ * @param userId Opaque identifier of the user in your system
207
+ * @param options Reserved for future use
208
+ * @returns Indicates if the call succeeded
209
+ */
210
+ declare const setAuthenticatedUser: TSAccountProtection['setAuthenticatedUser'];
211
+ /**
212
+ * Clears the user context for all subsequent events in the browser session
213
+ * @param options Reserved for future use
214
+ * @returns Indicates if the call succeeded
215
+ */
216
+ declare const clearUser: TSAccountProtection['clearUser'];
217
+ /** @ignore */
218
+ declare const identifyUser: TSAccountProtection['identifyUser'];
219
+ /** @ignore */
220
+ declare const unidentifiedUser: TSAccountProtection['unidentifiedUser'];
221
+ /** @ignore */
222
+ declare const getActions: TSAccountProtection['getActions'];
223
+ /** @ignore */
224
+ declare const getSessionToken: TSAccountProtection['getSessionToken'];
225
+ /** @ignore */
226
+ declare const __internal: {
227
+ getDeviceId(): string;
228
+ getClientId(): string;
229
+ flush(): Promise<EventResponse>;
230
+ };
231
+
232
+ declare const PACKAGE_VERSION: string;
233
+ declare namespace drs {
234
+ export function initialize(config: any): void;
235
+ export * from "@transmit-security/riskid_sdk";
236
+ }
237
+
238
+ declare function initialize(config: any): void;
239
+
240
+ export { PACKAGE_VERSION, __internal, clearUser, drs, getActions, getSessionToken, identifyUser, initialize, setAuthenticatedUser, setUser, triggerActionEvent, unidentifiedUser };
241
+ export type { ActionEventOptions, ActionResponse };
package/dist/drs.js ADDED
@@ -0,0 +1 @@
1
+ "undefined"==typeof globalThis&&("undefined"!=typeof window?(window.globalThis=window,window.global=window):"undefined"!=typeof self&&(self.globalThis=self,self.global=self));const t=Symbol("MODULE_INITIALIZED"),e=new Map;function i(t,i){var n,r;null===(n=e.get(t))||void 0===n||n.forEach((r=t=>t(i),function(){try{return r(...arguments)}catch(t){console.log(t)}}))}let n=null;function r(t){n=t}var a=Object.freeze({__proto__:null,getInitConfig:function(){return n},get initConfig(){return n},setInitConfig:r});function s(e){r(e),i(t,void 0)}var o=Object.freeze({__proto__:null,initialize:s});function c(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function l(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?c(Object(i),!0).forEach((function(e){d(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):c(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function x(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}function d(t,e,i){return(e=x(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function h(t,e){if(null==t)return{};var i,n,r=function(t,e){if(null==t)return{};var i,n,r={},a=Object.keys(t);for(n=0;n<a.length;n++)i=a[n],e.indexOf(i)>=0||(r[i]=t[i]);return r}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(n=0;n<a.length;n++)i=a[n],e.indexOf(i)>=0||Object.prototype.propertyIsEnumerable.call(t,i)&&(r[i]=t[i])}return r}function u(t,e){return Object.entries(e).reduce(((e,i)=>{let[n,r]=i;return l(l({},e),{},{[n]:f.isPrototypeOf(r)?new r(t.slug):"function"==typeof r?r.bind(t):"object"==typeof r&&!Array.isArray(r)&&r?u(t,r):r})}),{})}class f{constructor(t){this.slug=t}static create(t){return class extends f{constructor(e){super(e),Object.assign(this,u(this,t(this)))}}}}var g=Object.freeze({__proto__:null,Agent:f}),_=Object.freeze({__proto__:null,MODULE_INITIALIZED:t,emit:i,off:function(t,i){const n=e.get(t);if(!n)return;const r=n.indexOf(i);-1!==r&&n.splice(r,1)},on:function(t,i){var n;e.has(t)?null===(n=e.get(t))||void 0===n||n.push(i):e.set(t,[i])}});function p(t,e){const i=!t||"object"!=typeof t||Array.isArray(t)?{}:t;return[e.reduce(((t,e)=>{if(e in t){const i=t[e];if(null!==i&&"object"==typeof i&&!Array.isArray(i))return i}const i={};return t[e]=i,i}),i),i]}function w(t,e){let i=t;return e.every((t=>!(!i||"object"!=typeof i||Array.isArray(i)||!(t in i))&&(i=i[t],!0)),t)}const y="tsec",m="general";function v(t){return t?m:n.clientId}function b(t){return function(t){if(!t)return{};try{return JSON.parse(t)}catch(t){return{}}}((t?sessionStorage:localStorage).getItem(y))}function S(t,e){const i=t?sessionStorage:localStorage,n=e(b(t));i.setItem(y,JSON.stringify(n))}var E=Object.freeze({__proto__:null,COMMON_STORAGE_KEY:y,GENERAL_ID_KEY:m,getValue:function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=v(!!e.isGeneral),n=b(!!e.sessionOnly),[r]=p(n,[this.slug.toString(),i]);return r[t]},hasValue:function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=v(!!e.isGeneral),n=b(!!e.sessionOnly);return w(n,[this.slug.toString(),i,t])},removeValue:function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=v(!!e.isGeneral);S(!!e.sessionOnly,(e=>{const[n,r]=p(e,[this.slug.toString(),i]);return delete n[t],r}))},setValue:function(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=v(!!i.isGeneral);S(!!i.sessionOnly,(i=>{const[r,a]=p(i,[this.slug.toString(),n]);return r[t]=e,a}))}});const I="RSA-OAEP",T="RSA-PSS",D=async(t,e)=>await window.crypto.subtle.generateKey({name:t,modulusLength:2048,publicExponent:new Uint8Array([1,0,1]),hash:"SHA-256"},!1,e),A=async()=>await D(I,["encrypt","decrypt"]),k=async()=>await D(T,["sign"]),C=async(t,e)=>await window.crypto.subtle.encrypt({name:I},e,t),P=async(t,e)=>{const i=(new TextEncoder).encode(e);return await window.crypto.subtle.sign({name:T,saltLength:32},t,i)};class M{constructor(t,e,i){this.slug=t,this.dbName=e,this.dbVersion=i}queryObjectStore(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=(window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB||window.shimIndexedDB).open(`${this.slug}:${this.dbName}`,this.dbVersion||1);n.onupgradeneeded=()=>{var e;const i=n.result;(null===(e=null==i?void 0:i.objectStoreNames)||void 0===e?void 0:e.contains)&&!i.objectStoreNames.contains(t)&&i.createObjectStore(t,{keyPath:"key"})},n.onsuccess=()=>{const r=n.result,a=r.transaction(t,(null==i?void 0:i.operation)||"readwrite"),s=a.objectStore(t);e(s),a.oncomplete=()=>{r.close()}}}put(t,e,i){return new Promise(((n,r)=>{this.queryObjectStore(t,(t=>{const a=t.put({key:e,value:i});a.onsuccess=()=>{n(a.result)},a.onerror=t=>{r("Failed adding item to objectStore, err: "+t)}}))}))}get(t,e){return new Promise(((i,n)=>{this.queryObjectStore(t,(t=>{const r=t.get(e);r.onsuccess=()=>{var t;r.result?i(null===(t=r.result)||void 0===t?void 0:t.value):i(void 0)},r.onerror=t=>{n("Failed adding item to objectStore, err: "+t)}}))}))}getAll(t,e){return new Promise(((i,n)=>{this.queryObjectStore(t,(t=>{const r=t.getAll(null,e);r.onsuccess=()=>{if(r.result){const t=r.result;(null==t?void 0:t.length)?i(t.map((t=>null==t?void 0:t.value))):i(t)}else i([])},r.onerror=t=>{n("Failed getting items, err: "+t)}}))}))}delete(t,e){return new Promise(((i,n)=>{this.queryObjectStore(t,(t=>{const r=t.delete(e);r.onsuccess=()=>{i()},r.onerror=t=>{n(`Failed deleting key: '${e}' from objectStore, err: `+t)}}))}))}clear(t){return new Promise(((e,i)=>{this.queryObjectStore(t,(t=>{const n=t.clear();n.onsuccess=()=>{e()},n.onerror=t=>{i("Failed clearing objectStore, err: "+t)}}))}))}}const O="platform";class L{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"sign",i=arguments.length>2?arguments[2]:void 0;var r,a,s,o;this.agent=t,this.keysType=e,this.options=i;const c=!(null===(r=this.options)||void 0===r?void 0:r.productScope);this.keysDatabaseName=c||!(null===(a=this.options)||void 0===a?void 0:a.indexedDBName)?"ts_crypto_binding":this.options.indexedDBName,this.dbVersion=c?1:(null===(s=this.options)||void 0===s?void 0:s.dbVersion)||1,this.keysStoreName=c||!(null===(o=this.options)||void 0===o?void 0:o.keysStoreName)?"identifiers_store":this.options.keysStoreName,this.indexedDBClient=new M(c?O:t.slug,this.keysDatabaseName,this.dbVersion),this.indexedDBClientFallback=new M((c?O:t.slug)+`:${n.clientId}`,this.keysDatabaseName,this.dbVersion)}getKeysRecordKey(){return`${this.keysType}_keys`}arrayBufferToBase64(t){return window.btoa(String.fromCharCode(...new Uint8Array(t)))}async getPKRepresentations(t){const e=await crypto.subtle.exportKey("spki",t);return{arrayBufferKey:e,base64Key:this.arrayBufferToBase64(e)}}async generateKeyPair(){return"sign"==this.keysType?await k():await A()}async calcKeyIdentifier(t){const e=await crypto.subtle.digest("SHA-256",t);return Array.from(new Uint8Array(e)).map((t=>t.toString(16).padStart(2,"0"))).join("")}async extractKeysData(){const t=this.getKeysRecordKey();let e=await this.indexedDBClient.get(this.keysStoreName,t);if(!e){if(e=await this.indexedDBClientFallback.get(this.keysStoreName,t),!e){const t=await this.generateKeyPair(),{arrayBufferKey:i,base64Key:n}=await this.getPKRepresentations(t.publicKey);this.publicKeyBase64=n,this.keyIdentifier=await this.calcKeyIdentifier(i),e=l(l({},t),{},{keyIdentifier:this.keyIdentifier})}await this.indexedDBClient.put(this.keysStoreName,t,e)}if(!this.publicKeyBase64){const{base64Key:t}=await this.getPKRepresentations(e.publicKey);this.publicKeyBase64=t,this.keyIdentifier=e.keyIdentifier}return e}async getPublicData(){return this.publicKeyBase64&&this.keyIdentifier||await this.extractKeysData(),{publicKey:this.publicKeyBase64,keyIdentifier:this.keyIdentifier}}async sign(t){if("sign"==this.keysType){const{privateKey:e}=await this.extractKeysData(),i=await P(e,t);return this.arrayBufferToBase64(i)}throw new Error("keysType must be 'sign' in order to use sign keys")}async encrypt(t){if("encrypt"==this.keysType){const{privateKey:e}=await this.extractKeysData();return await C(t,e)}throw new Error("keysType must be 'encrypt' in order to use encryption keys")}async clearKeys(){const t=this.getKeysRecordKey();await this.indexedDBClient.delete(this.keysStoreName,t)}}var z=Object.freeze({__proto__:null,createCryptoBinding:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"sign",e=arguments.length>1?arguments[1]:void 0;return new L(this,t,e)},decryptAssymetric:async(t,e)=>new Uint8Array(await window.crypto.subtle.decrypt({name:I},e,t)),encryptAssymetric:C,generateRSAKeyPair:A,generateRSASignKeyPair:k,signAssymetric:P,verifyAssymetric:async(t,e,i)=>{const n=(new TextEncoder).encode(e);return await window.crypto.subtle.verify(T,t,i,n)}}),N=Object.freeze({__proto__:null});const U=f.create((t=>{class e extends Error{constructor(e,i){super(`${t.slug}-${e} ${i}`)}}return{TsError:e,TsInternalError:class extends e{constructor(t){super(t,"Internal error")}}}}));var R=f.create((()=>l({exceptions:U},g)));class B{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];this.agent=t,this.middlewares=e,this.logs=[]}info(t,e){this.pushLog(3,t,e)}warn(t,e){this.pushLog(4,t,e)}error(t,e){this.pushLog(5,t,e)}pushLog(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.logs.push({timestamp:Date.now(),module:this.agent.slug,severity:t,fields:i,message:e});const n=this.middlewares.map((t=>t(this)));Promise.all(n).catch((()=>{}))}}var K=Object.freeze({__proto__:null,consoleMiddleware:function(t){const e=t.logs[t.logs.length-1];console.log(`${e.severity} ${e.message}`,e.fields)},createSdkLogger:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return new B(this,t)}});function F(t,e){if(!(null==t?void 0:t.trim()))return"";if(function(t){try{return new URL(t),!0}catch(t){return!1}}(t))return t;const i="http://mock.com",n=new URL(i);n.search=(null==e?void 0:e.toString())||"",n.pathname=t;return n.href.replace(i,"")}const j={"Content-Type":"application/json","X-TS-client-time":(new Date).toUTCString(),"X-TS-ua":navigator.userAgent};function Z(t,e,i){var n;const r=(a=e||{},encodeURI(JSON.stringify(a)).split(/%..|./).length-1);var a;return{method:t,headers:l(l(l({},{"X-TS-body-size":String(r)}),j),i||{}),body:null!==(n=e&&JSON.stringify(e||{}))&&void 0!==n?n:void 0}}function V(t,e,i,n,r){const a=F(t,n),s=Z(e,i,r);return fetch(a,s)}async function H(t,e,i,n,r){let a;if(a=await V(t,e,i,n,r),!a.ok)throw new Error("Request failed");return a}var G,W,q,Y,J,$,X,Q,tt,et,it=Object.freeze({__proto__:null,httpDelete:async function(t,e){const i=await H(t,"DELETE",void 0,void 0,e);return l(l({data:await i.json()},i),{},{headers:i.headers})},httpGet:async function(t,e,i){const n=await H(t,"GET",void 0,e,i);return l(l({data:await n.json()},n),{},{headers:n.headers})},httpPost:async function(t,e,i,n){const r=await H(t,"POST",e,i,n);return l(l({data:await r.json()},r),{},{headers:r.headers})},httpPut:async function(t,e,i,n){const r=await H(t,"PUT",e,i,n);return l(l({data:await r.json()},r),{},{headers:r.headers})},init:Z}),nt=f.create((()=>({events:_,moduleMetadata:a,mainEntry:o,utils:R,storage:E,crypto:z,indexedDB:N,logger:K,http:it}))),rt={},at={},st={};function ot(){if(G)return st;G=1;function t(t){let e=t.length;for(;--e>=0;)t[e]=0}const e=256,i=286,n=30,r=15,a=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),s=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),o=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),c=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),l=new Array(576);t(l);const x=new Array(60);t(x);const d=new Array(512);t(d);const h=new Array(256);t(h);const u=new Array(29);t(u);const f=new Array(n);function g(t,e,i,n,r){this.static_tree=t,this.extra_bits=e,this.extra_base=i,this.elems=n,this.max_length=r,this.has_stree=t&&t.length}let _,p,w;function y(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}t(f);const m=t=>t<256?d[t]:d[256+(t>>>7)],v=(t,e)=>{t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},b=(t,e,i)=>{t.bi_valid>16-i?(t.bi_buf|=e<<t.bi_valid&65535,v(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=i-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=i)},S=(t,e,i)=>{b(t,i[2*e],i[2*e+1])},E=(t,e)=>{let i=0;do{i|=1&t,t>>>=1,i<<=1}while(--e>0);return i>>>1},I=(t,e,i)=>{const n=new Array(16);let a,s,o=0;for(a=1;a<=r;a++)n[a]=o=o+i[a-1]<<1;for(s=0;s<=e;s++){let e=t[2*s+1];0!==e&&(t[2*s]=E(n[e]++,e))}},T=t=>{let e;for(e=0;e<i;e++)t.dyn_ltree[2*e]=0;for(e=0;e<n;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0},D=t=>{t.bi_valid>8?v(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},A=(t,e,i,n)=>{const r=2*e,a=2*i;return t[r]<t[a]||t[r]===t[a]&&n[e]<=n[i]},k=(t,e,i)=>{const n=t.heap[i];let r=i<<1;for(;r<=t.heap_len&&(r<t.heap_len&&A(e,t.heap[r+1],t.heap[r],t.depth)&&r++,!A(e,n,t.heap[r],t.depth));)t.heap[i]=t.heap[r],i=r,r<<=1;t.heap[i]=n},C=(t,i,n)=>{let r,o,c,l,x=0;if(0!==t.last_lit)do{r=t.pending_buf[t.d_buf+2*x]<<8|t.pending_buf[t.d_buf+2*x+1],o=t.pending_buf[t.l_buf+x],x++,0===r?S(t,o,i):(c=h[o],S(t,c+e+1,i),l=a[c],0!==l&&(o-=u[c],b(t,o,l)),r--,c=m(r),S(t,c,n),l=s[c],0!==l&&(r-=f[c],b(t,r,l)))}while(x<t.last_lit);S(t,256,i)},P=(t,e)=>{const i=e.dyn_tree,n=e.stat_desc.static_tree,a=e.stat_desc.has_stree,s=e.stat_desc.elems;let o,c,l,x=-1;for(t.heap_len=0,t.heap_max=573,o=0;o<s;o++)0!==i[2*o]?(t.heap[++t.heap_len]=x=o,t.depth[o]=0):i[2*o+1]=0;for(;t.heap_len<2;)l=t.heap[++t.heap_len]=x<2?++x:0,i[2*l]=1,t.depth[l]=0,t.opt_len--,a&&(t.static_len-=n[2*l+1]);for(e.max_code=x,o=t.heap_len>>1;o>=1;o--)k(t,i,o);l=s;do{o=t.heap[1],t.heap[1]=t.heap[t.heap_len--],k(t,i,1),c=t.heap[1],t.heap[--t.heap_max]=o,t.heap[--t.heap_max]=c,i[2*l]=i[2*o]+i[2*c],t.depth[l]=(t.depth[o]>=t.depth[c]?t.depth[o]:t.depth[c])+1,i[2*o+1]=i[2*c+1]=l,t.heap[1]=l++,k(t,i,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],((t,e)=>{const i=e.dyn_tree,n=e.max_code,a=e.stat_desc.static_tree,s=e.stat_desc.has_stree,o=e.stat_desc.extra_bits,c=e.stat_desc.extra_base,l=e.stat_desc.max_length;let x,d,h,u,f,g,_=0;for(u=0;u<=r;u++)t.bl_count[u]=0;for(i[2*t.heap[t.heap_max]+1]=0,x=t.heap_max+1;x<573;x++)d=t.heap[x],u=i[2*i[2*d+1]+1]+1,u>l&&(u=l,_++),i[2*d+1]=u,d>n||(t.bl_count[u]++,f=0,d>=c&&(f=o[d-c]),g=i[2*d],t.opt_len+=g*(u+f),s&&(t.static_len+=g*(a[2*d+1]+f)));if(0!==_){do{for(u=l-1;0===t.bl_count[u];)u--;t.bl_count[u]--,t.bl_count[u+1]+=2,t.bl_count[l]--,_-=2}while(_>0);for(u=l;0!==u;u--)for(d=t.bl_count[u];0!==d;)h=t.heap[--x],h>n||(i[2*h+1]!==u&&(t.opt_len+=(u-i[2*h+1])*i[2*h],i[2*h+1]=u),d--)}})(t,e),I(i,x,t.bl_count)},M=(t,e,i)=>{let n,r,a=-1,s=e[1],o=0,c=7,l=4;for(0===s&&(c=138,l=3),e[2*(i+1)+1]=65535,n=0;n<=i;n++)r=s,s=e[2*(n+1)+1],++o<c&&r===s||(o<l?t.bl_tree[2*r]+=o:0!==r?(r!==a&&t.bl_tree[2*r]++,t.bl_tree[32]++):o<=10?t.bl_tree[34]++:t.bl_tree[36]++,o=0,a=r,0===s?(c=138,l=3):r===s?(c=6,l=3):(c=7,l=4))},O=(t,e,i)=>{let n,r,a=-1,s=e[1],o=0,c=7,l=4;for(0===s&&(c=138,l=3),n=0;n<=i;n++)if(r=s,s=e[2*(n+1)+1],!(++o<c&&r===s)){if(o<l)do{S(t,r,t.bl_tree)}while(0!=--o);else 0!==r?(r!==a&&(S(t,r,t.bl_tree),o--),S(t,16,t.bl_tree),b(t,o-3,2)):o<=10?(S(t,17,t.bl_tree),b(t,o-3,3)):(S(t,18,t.bl_tree),b(t,o-11,7));o=0,a=r,0===s?(c=138,l=3):r===s?(c=6,l=3):(c=7,l=4)}};let L=!1;const z=(t,e,i,n)=>{b(t,0+(n?1:0),3),((t,e,i,n)=>{D(t),n&&(v(t,i),v(t,~i)),t.pending_buf.set(t.window.subarray(e,e+i),t.pending),t.pending+=i})(t,e,i,!0)};return st._tr_init=t=>{L||((()=>{let t,e,c,y,m;const v=new Array(16);for(c=0,y=0;y<28;y++)for(u[y]=c,t=0;t<1<<a[y];t++)h[c++]=y;for(h[c-1]=y,m=0,y=0;y<16;y++)for(f[y]=m,t=0;t<1<<s[y];t++)d[m++]=y;for(m>>=7;y<n;y++)for(f[y]=m<<7,t=0;t<1<<s[y]-7;t++)d[256+m++]=y;for(e=0;e<=r;e++)v[e]=0;for(t=0;t<=143;)l[2*t+1]=8,t++,v[8]++;for(;t<=255;)l[2*t+1]=9,t++,v[9]++;for(;t<=279;)l[2*t+1]=7,t++,v[7]++;for(;t<=287;)l[2*t+1]=8,t++,v[8]++;for(I(l,287,v),t=0;t<n;t++)x[2*t+1]=5,x[2*t]=E(t,5);_=new g(l,a,257,i,r),p=new g(x,s,0,n,r),w=new g(new Array(0),o,0,19,7)})(),L=!0),t.l_desc=new y(t.dyn_ltree,_),t.d_desc=new y(t.dyn_dtree,p),t.bl_desc=new y(t.bl_tree,w),t.bi_buf=0,t.bi_valid=0,T(t)},st._tr_stored_block=z,st._tr_flush_block=(t,i,n,r)=>{let a,s,o=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=(t=>{let i,n=4093624447;for(i=0;i<=31;i++,n>>>=1)if(1&n&&0!==t.dyn_ltree[2*i])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(i=32;i<e;i++)if(0!==t.dyn_ltree[2*i])return 1;return 0})(t)),P(t,t.l_desc),P(t,t.d_desc),o=(t=>{let e;for(M(t,t.dyn_ltree,t.l_desc.max_code),M(t,t.dyn_dtree,t.d_desc.max_code),P(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*c[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e})(t),a=t.opt_len+3+7>>>3,s=t.static_len+3+7>>>3,s<=a&&(a=s)):a=s=n+5,n+4<=a&&-1!==i?z(t,i,n,r):4===t.strategy||s===a?(b(t,2+(r?1:0),3),C(t,l,x)):(b(t,4+(r?1:0),3),((t,e,i,n)=>{let r;for(b(t,e-257,5),b(t,i-1,5),b(t,n-4,4),r=0;r<n;r++)b(t,t.bl_tree[2*c[r]+1],3);O(t,t.dyn_ltree,e-1),O(t,t.dyn_dtree,i-1)})(t,t.l_desc.max_code+1,t.d_desc.max_code+1,o+1),C(t,t.dyn_ltree,t.dyn_dtree)),T(t),r&&D(t)},st._tr_tally=(t,i,n)=>(t.pending_buf[t.d_buf+2*t.last_lit]=i>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&i,t.pending_buf[t.l_buf+t.last_lit]=255&n,t.last_lit++,0===i?t.dyn_ltree[2*n]++:(t.matches++,i--,t.dyn_ltree[2*(h[n]+e+1)]++,t.dyn_dtree[2*m(i)]++),t.last_lit===t.lit_bufsize-1),st._tr_align=t=>{b(t,2,3),S(t,256,l),(t=>{16===t.bi_valid?(v(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)})(t)},st}function ct(){return X?$:(X=1,$={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"})}function lt(){return tt?Q:(tt=1,Q={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8})}function xt(){if(et)return at;et=1;const{_tr_init:t,_tr_stored_block:e,_tr_flush_block:i,_tr_tally:n,_tr_align:r}=ot(),a=(q||(q=1,W=(t,e,i,n)=>{let r=65535&t|0,a=t>>>16&65535|0,s=0;for(;0!==i;){s=i>2e3?2e3:i,i-=s;do{r=r+e[n++]|0,a=a+r|0}while(--s);r%=65521,a%=65521}return r|a<<16|0}),W),s=function(){if(J)return Y;J=1;const t=new Uint32Array((()=>{let t,e=[];for(var i=0;i<256;i++){t=i;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[i]=t}return e})());return Y=(e,i,n,r)=>{const a=t,s=r+n;e^=-1;for(let t=r;t<s;t++)e=e>>>8^a[255&(e^i[t])];return-1^e},Y}(),o=ct(),{Z_NO_FLUSH:c,Z_PARTIAL_FLUSH:l,Z_FULL_FLUSH:x,Z_FINISH:d,Z_BLOCK:h,Z_OK:u,Z_STREAM_END:f,Z_STREAM_ERROR:g,Z_DATA_ERROR:_,Z_BUF_ERROR:p,Z_DEFAULT_COMPRESSION:w,Z_FILTERED:y,Z_HUFFMAN_ONLY:m,Z_RLE:v,Z_FIXED:b,Z_DEFAULT_STRATEGY:S,Z_UNKNOWN:E,Z_DEFLATED:I}=lt(),T=258,D=262,A=103,k=113,C=666,P=(t,e)=>(t.msg=o[e],e),M=t=>(t<<1)-(t>4?9:0),O=t=>{let e=t.length;for(;--e>=0;)t[e]=0};let L=(t,e,i)=>(e<<t.hash_shift^i)&t.hash_mask;const z=t=>{const e=t.state;let i=e.pending;i>t.avail_out&&(i=t.avail_out),0!==i&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+i),t.next_out),t.next_out+=i,e.pending_out+=i,t.total_out+=i,t.avail_out-=i,e.pending-=i,0===e.pending&&(e.pending_out=0))},N=(t,e)=>{i(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,z(t.strm)},U=(t,e)=>{t.pending_buf[t.pending++]=e},R=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},B=(t,e,i,n)=>{let r=t.avail_in;return r>n&&(r=n),0===r?0:(t.avail_in-=r,e.set(t.input.subarray(t.next_in,t.next_in+r),i),1===t.state.wrap?t.adler=a(t.adler,e,r,i):2===t.state.wrap&&(t.adler=s(t.adler,e,r,i)),t.next_in+=r,t.total_in+=r,r)},K=(t,e)=>{let i,n,r=t.max_chain_length,a=t.strstart,s=t.prev_length,o=t.nice_match;const c=t.strstart>t.w_size-D?t.strstart-(t.w_size-D):0,l=t.window,x=t.w_mask,d=t.prev,h=t.strstart+T;let u=l[a+s-1],f=l[a+s];t.prev_length>=t.good_match&&(r>>=2),o>t.lookahead&&(o=t.lookahead);do{if(i=e,l[i+s]===f&&l[i+s-1]===u&&l[i]===l[a]&&l[++i]===l[a+1]){a+=2,i++;do{}while(l[++a]===l[++i]&&l[++a]===l[++i]&&l[++a]===l[++i]&&l[++a]===l[++i]&&l[++a]===l[++i]&&l[++a]===l[++i]&&l[++a]===l[++i]&&l[++a]===l[++i]&&a<h);if(n=T-(h-a),a=h-T,n>s){if(t.match_start=e,s=n,n>=o)break;u=l[a+s-1],f=l[a+s]}}}while((e=d[e&x])>c&&0!=--r);return s<=t.lookahead?s:t.lookahead},F=t=>{const e=t.w_size;let i,n,r,a,s;do{if(a=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-D)){t.window.set(t.window.subarray(e,e+e),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,n=t.hash_size,i=n;do{r=t.head[--i],t.head[i]=r>=e?r-e:0}while(--n);n=e,i=n;do{r=t.prev[--i],t.prev[i]=r>=e?r-e:0}while(--n);a+=e}if(0===t.strm.avail_in)break;if(n=B(t.strm,t.window,t.strstart+t.lookahead,a),t.lookahead+=n,t.lookahead+t.insert>=3)for(s=t.strstart-t.insert,t.ins_h=t.window[s],t.ins_h=L(t,t.ins_h,t.window[s+1]);t.insert&&(t.ins_h=L(t,t.ins_h,t.window[s+3-1]),t.prev[s&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=s,s++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<D&&0!==t.strm.avail_in)},j=(t,e)=>{let i,r;for(;;){if(t.lookahead<D){if(F(t),t.lookahead<D&&e===c)return 1;if(0===t.lookahead)break}if(i=0,t.lookahead>=3&&(t.ins_h=L(t,t.ins_h,t.window[t.strstart+3-1]),i=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==i&&t.strstart-i<=t.w_size-D&&(t.match_length=K(t,i)),t.match_length>=3)if(r=n(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=L(t,t.ins_h,t.window[t.strstart+3-1]),i=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=L(t,t.ins_h,t.window[t.strstart+1]);else r=n(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(r&&(N(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===d?(N(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(N(t,!1),0===t.strm.avail_out)?1:2},Z=(t,e)=>{let i,r,a;for(;;){if(t.lookahead<D){if(F(t),t.lookahead<D&&e===c)return 1;if(0===t.lookahead)break}if(i=0,t.lookahead>=3&&(t.ins_h=L(t,t.ins_h,t.window[t.strstart+3-1]),i=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==i&&t.prev_length<t.max_lazy_match&&t.strstart-i<=t.w_size-D&&(t.match_length=K(t,i),t.match_length<=5&&(t.strategy===y||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){a=t.strstart+t.lookahead-3,r=n(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=a&&(t.ins_h=L(t,t.ins_h,t.window[t.strstart+3-1]),i=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,r&&(N(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if(r=n(t,0,t.window[t.strstart-1]),r&&N(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(r=n(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===d?(N(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(N(t,!1),0===t.strm.avail_out)?1:2};function V(t,e,i,n,r){this.good_length=t,this.max_lazy=e,this.nice_length=i,this.max_chain=n,this.func=r}const H=[new V(0,0,0,0,((t,e)=>{let i=65535;for(i>t.pending_buf_size-5&&(i=t.pending_buf_size-5);;){if(t.lookahead<=1){if(F(t),0===t.lookahead&&e===c)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;const n=t.block_start+i;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,N(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-D&&(N(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===d?(N(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(N(t,!1),t.strm.avail_out),1)})),new V(4,4,8,4,j),new V(4,5,16,8,j),new V(4,6,32,32,j),new V(4,4,16,16,Z),new V(8,16,32,32,Z),new V(8,16,128,128,Z),new V(8,32,128,256,Z),new V(32,128,258,1024,Z),new V(32,258,258,4096,Z)];function G(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=I,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),O(this.dyn_ltree),O(this.dyn_dtree),O(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),O(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),O(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const $=e=>{if(!e||!e.state)return P(e,g);e.total_in=e.total_out=0,e.data_type=E;const i=e.state;return i.pending=0,i.pending_out=0,i.wrap<0&&(i.wrap=-i.wrap),i.status=i.wrap?42:k,e.adler=2===i.wrap?0:1,i.last_flush=c,t(i),u},X=t=>{const e=$(t);return e===u&&(t=>{t.window_size=2*t.w_size,O(t.head),t.max_lazy_match=H[t.level].max_lazy,t.good_match=H[t.level].good_length,t.nice_match=H[t.level].nice_length,t.max_chain_length=H[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=2,t.match_available=0,t.ins_h=0})(t.state),e},Q=(t,e,i,n,r,a)=>{if(!t)return g;let s=1;if(e===w&&(e=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),r<1||r>9||i!==I||n<8||n>15||e<0||e>9||a<0||a>b)return P(t,g);8===n&&(n=9);const o=new G;return t.state=o,o.strm=t,o.wrap=s,o.gzhead=null,o.w_bits=n,o.w_size=1<<o.w_bits,o.w_mask=o.w_size-1,o.hash_bits=r+7,o.hash_size=1<<o.hash_bits,o.hash_mask=o.hash_size-1,o.hash_shift=~~((o.hash_bits+3-1)/3),o.window=new Uint8Array(2*o.w_size),o.head=new Uint16Array(o.hash_size),o.prev=new Uint16Array(o.w_size),o.lit_bufsize=1<<r+6,o.pending_buf_size=4*o.lit_bufsize,o.pending_buf=new Uint8Array(o.pending_buf_size),o.d_buf=1*o.lit_bufsize,o.l_buf=3*o.lit_bufsize,o.level=e,o.strategy=a,o.method=i,X(t)};return at.deflateInit=(t,e)=>Q(t,e,I,15,8,S),at.deflateInit2=Q,at.deflateReset=X,at.deflateResetKeep=$,at.deflateSetHeader=(t,e)=>t&&t.state?2!==t.state.wrap?g:(t.state.gzhead=e,u):g,at.deflate=(t,i)=>{let a,o;if(!t||!t.state||i>h||i<0)return t?P(t,g):g;const _=t.state;if(!t.output||!t.input&&0!==t.avail_in||_.status===C&&i!==d)return P(t,0===t.avail_out?p:g);_.strm=t;const w=_.last_flush;if(_.last_flush=i,42===_.status)if(2===_.wrap)t.adler=0,U(_,31),U(_,139),U(_,8),_.gzhead?(U(_,(_.gzhead.text?1:0)+(_.gzhead.hcrc?2:0)+(_.gzhead.extra?4:0)+(_.gzhead.name?8:0)+(_.gzhead.comment?16:0)),U(_,255&_.gzhead.time),U(_,_.gzhead.time>>8&255),U(_,_.gzhead.time>>16&255),U(_,_.gzhead.time>>24&255),U(_,9===_.level?2:_.strategy>=m||_.level<2?4:0),U(_,255&_.gzhead.os),_.gzhead.extra&&_.gzhead.extra.length&&(U(_,255&_.gzhead.extra.length),U(_,_.gzhead.extra.length>>8&255)),_.gzhead.hcrc&&(t.adler=s(t.adler,_.pending_buf,_.pending,0)),_.gzindex=0,_.status=69):(U(_,0),U(_,0),U(_,0),U(_,0),U(_,0),U(_,9===_.level?2:_.strategy>=m||_.level<2?4:0),U(_,3),_.status=k);else{let e=I+(_.w_bits-8<<4)<<8,i=-1;i=_.strategy>=m||_.level<2?0:_.level<6?1:6===_.level?2:3,e|=i<<6,0!==_.strstart&&(e|=32),e+=31-e%31,_.status=k,R(_,e),0!==_.strstart&&(R(_,t.adler>>>16),R(_,65535&t.adler)),t.adler=1}if(69===_.status)if(_.gzhead.extra){for(a=_.pending;_.gzindex<(65535&_.gzhead.extra.length)&&(_.pending!==_.pending_buf_size||(_.gzhead.hcrc&&_.pending>a&&(t.adler=s(t.adler,_.pending_buf,_.pending-a,a)),z(t),a=_.pending,_.pending!==_.pending_buf_size));)U(_,255&_.gzhead.extra[_.gzindex]),_.gzindex++;_.gzhead.hcrc&&_.pending>a&&(t.adler=s(t.adler,_.pending_buf,_.pending-a,a)),_.gzindex===_.gzhead.extra.length&&(_.gzindex=0,_.status=73)}else _.status=73;if(73===_.status)if(_.gzhead.name){a=_.pending;do{if(_.pending===_.pending_buf_size&&(_.gzhead.hcrc&&_.pending>a&&(t.adler=s(t.adler,_.pending_buf,_.pending-a,a)),z(t),a=_.pending,_.pending===_.pending_buf_size)){o=1;break}o=_.gzindex<_.gzhead.name.length?255&_.gzhead.name.charCodeAt(_.gzindex++):0,U(_,o)}while(0!==o);_.gzhead.hcrc&&_.pending>a&&(t.adler=s(t.adler,_.pending_buf,_.pending-a,a)),0===o&&(_.gzindex=0,_.status=91)}else _.status=91;if(91===_.status)if(_.gzhead.comment){a=_.pending;do{if(_.pending===_.pending_buf_size&&(_.gzhead.hcrc&&_.pending>a&&(t.adler=s(t.adler,_.pending_buf,_.pending-a,a)),z(t),a=_.pending,_.pending===_.pending_buf_size)){o=1;break}o=_.gzindex<_.gzhead.comment.length?255&_.gzhead.comment.charCodeAt(_.gzindex++):0,U(_,o)}while(0!==o);_.gzhead.hcrc&&_.pending>a&&(t.adler=s(t.adler,_.pending_buf,_.pending-a,a)),0===o&&(_.status=A)}else _.status=A;if(_.status===A&&(_.gzhead.hcrc?(_.pending+2>_.pending_buf_size&&z(t),_.pending+2<=_.pending_buf_size&&(U(_,255&t.adler),U(_,t.adler>>8&255),t.adler=0,_.status=k)):_.status=k),0!==_.pending){if(z(t),0===t.avail_out)return _.last_flush=-1,u}else if(0===t.avail_in&&M(i)<=M(w)&&i!==d)return P(t,p);if(_.status===C&&0!==t.avail_in)return P(t,p);if(0!==t.avail_in||0!==_.lookahead||i!==c&&_.status!==C){let a=_.strategy===m?((t,e)=>{let i;for(;;){if(0===t.lookahead&&(F(t),0===t.lookahead)){if(e===c)return 1;break}if(t.match_length=0,i=n(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,i&&(N(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===d?(N(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(N(t,!1),0===t.strm.avail_out)?1:2})(_,i):_.strategy===v?((t,e)=>{let i,r,a,s;const o=t.window;for(;;){if(t.lookahead<=T){if(F(t),t.lookahead<=T&&e===c)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(a=t.strstart-1,r=o[a],r===o[++a]&&r===o[++a]&&r===o[++a])){s=t.strstart+T;do{}while(r===o[++a]&&r===o[++a]&&r===o[++a]&&r===o[++a]&&r===o[++a]&&r===o[++a]&&r===o[++a]&&r===o[++a]&&a<s);t.match_length=T-(s-a),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(i=n(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(i=n(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),i&&(N(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===d?(N(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(N(t,!1),0===t.strm.avail_out)?1:2})(_,i):H[_.level].func(_,i);if(3!==a&&4!==a||(_.status=C),1===a||3===a)return 0===t.avail_out&&(_.last_flush=-1),u;if(2===a&&(i===l?r(_):i!==h&&(e(_,0,0,!1),i===x&&(O(_.head),0===_.lookahead&&(_.strstart=0,_.block_start=0,_.insert=0))),z(t),0===t.avail_out))return _.last_flush=-1,u}return i!==d?u:_.wrap<=0?f:(2===_.wrap?(U(_,255&t.adler),U(_,t.adler>>8&255),U(_,t.adler>>16&255),U(_,t.adler>>24&255),U(_,255&t.total_in),U(_,t.total_in>>8&255),U(_,t.total_in>>16&255),U(_,t.total_in>>24&255)):(R(_,t.adler>>>16),R(_,65535&t.adler)),z(t),_.wrap>0&&(_.wrap=-_.wrap),0!==_.pending?u:f)},at.deflateEnd=t=>{if(!t||!t.state)return g;const e=t.state.status;return 42!==e&&69!==e&&73!==e&&91!==e&&e!==A&&e!==k&&e!==C?P(t,g):(t.state=null,e===k?P(t,_):u)},at.deflateSetDictionary=(t,e)=>{let i=e.length;if(!t||!t.state)return g;const n=t.state,r=n.wrap;if(2===r||1===r&&42!==n.status||n.lookahead)return g;if(1===r&&(t.adler=a(t.adler,e,i,0)),n.wrap=0,i>=n.w_size){0===r&&(O(n.head),n.strstart=0,n.block_start=0,n.insert=0);let t=new Uint8Array(n.w_size);t.set(e.subarray(i-n.w_size,i),0),e=t,i=n.w_size}const s=t.avail_in,o=t.next_in,c=t.input;for(t.avail_in=i,t.next_in=0,t.input=e,F(n);n.lookahead>=3;){let t=n.strstart,e=n.lookahead-2;do{n.ins_h=L(n,n.ins_h,n.window[t+3-1]),n.prev[t&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=t,t++}while(--e);n.strstart=t,n.lookahead=2,F(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,t.next_in=o,t.input=c,t.avail_in=s,n.wrap=r,u},at.deflateInfo="pako deflate (from Nodeca project)",at}var dt,ht={};var ut,ft,gt,_t,pt={};function wt(){if(ut)return pt;ut=1;let t=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){t=!1}const e=new Uint8Array(256);for(let t=0;t<256;t++)e[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;e[254]=e[254]=1,pt.string2buf=t=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,i,n,r,a,s=t.length,o=0;for(r=0;r<s;r++)i=t.charCodeAt(r),55296==(64512&i)&&r+1<s&&(n=t.charCodeAt(r+1),56320==(64512&n)&&(i=65536+(i-55296<<10)+(n-56320),r++)),o+=i<128?1:i<2048?2:i<65536?3:4;for(e=new Uint8Array(o),a=0,r=0;a<o;r++)i=t.charCodeAt(r),55296==(64512&i)&&r+1<s&&(n=t.charCodeAt(r+1),56320==(64512&n)&&(i=65536+(i-55296<<10)+(n-56320),r++)),i<128?e[a++]=i:i<2048?(e[a++]=192|i>>>6,e[a++]=128|63&i):i<65536?(e[a++]=224|i>>>12,e[a++]=128|i>>>6&63,e[a++]=128|63&i):(e[a++]=240|i>>>18,e[a++]=128|i>>>12&63,e[a++]=128|i>>>6&63,e[a++]=128|63&i);return e};return pt.buf2string=(i,n)=>{const r=n||i.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(i.subarray(0,n));let a,s;const o=new Array(2*r);for(s=0,a=0;a<r;){let t=i[a++];if(t<128){o[s++]=t;continue}let n=e[t];if(n>4)o[s++]=65533,a+=n-1;else{for(t&=2===n?31:3===n?15:7;n>1&&a<r;)t=t<<6|63&i[a++],n--;n>1?o[s++]=65533:t<65536?o[s++]=t:(t-=65536,o[s++]=55296|t>>10&1023,o[s++]=56320|1023&t)}}return((e,i)=>{if(i<65534&&e.subarray&&t)return String.fromCharCode.apply(null,e.length===i?e:e.subarray(0,i));let n="";for(let t=0;t<i;t++)n+=String.fromCharCode(e[t]);return n})(o,s)},pt.utf8border=(t,i)=>{(i=i||t.length)>t.length&&(i=t.length);let n=i-1;for(;n>=0&&128==(192&t[n]);)n--;return n<0||0===n?i:n+e[t[n]]>i?n:i},pt}var yt=function(){if(_t)return rt;_t=1;const t=xt(),e=function(){if(dt)return ht;dt=1;const t=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);return ht.assign=function(e){const i=Array.prototype.slice.call(arguments,1);for(;i.length;){const n=i.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(const i in n)t(n,i)&&(e[i]=n[i])}}return e},ht.flattenChunks=t=>{let e=0;for(let i=0,n=t.length;i<n;i++)e+=t[i].length;const i=new Uint8Array(e);for(let e=0,n=0,r=t.length;e<r;e++){let r=t[e];i.set(r,n),n+=r.length}return i},ht}(),i=wt(),n=ct(),r=gt?ft:(gt=1,ft=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}),a=Object.prototype.toString,{Z_NO_FLUSH:s,Z_SYNC_FLUSH:o,Z_FULL_FLUSH:c,Z_FINISH:l,Z_OK:x,Z_STREAM_END:d,Z_DEFAULT_COMPRESSION:h,Z_DEFAULT_STRATEGY:u,Z_DEFLATED:f}=lt();function g(s){this.options=e.assign({level:h,method:f,chunkSize:16384,windowBits:15,memLevel:8,strategy:u},s||{});let o=this.options;o.raw&&o.windowBits>0?o.windowBits=-o.windowBits:o.gzip&&o.windowBits>0&&o.windowBits<16&&(o.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new r,this.strm.avail_out=0;let c=t.deflateInit2(this.strm,o.level,o.method,o.windowBits,o.memLevel,o.strategy);if(c!==x)throw new Error(n[c]);if(o.header&&t.deflateSetHeader(this.strm,o.header),o.dictionary){let e;if(e="string"==typeof o.dictionary?i.string2buf(o.dictionary):"[object ArrayBuffer]"===a.call(o.dictionary)?new Uint8Array(o.dictionary):o.dictionary,c=t.deflateSetDictionary(this.strm,e),c!==x)throw new Error(n[c]);this._dict_set=!0}}function _(t,e){const i=new g(e);if(i.push(t,!0),i.err)throw i.msg||n[i.err];return i.result}return g.prototype.push=function(e,n){const r=this.strm,h=this.options.chunkSize;let u,f;if(this.ended)return!1;for(f=n===~~n?n:!0===n?l:s,"string"==typeof e?r.input=i.string2buf(e):"[object ArrayBuffer]"===a.call(e)?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(h),r.next_out=0,r.avail_out=h),(f===o||f===c)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if(u=t.deflate(r,f),u===d)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),u=t.deflateEnd(this.strm),this.onEnd(u),this.ended=!0,u===x;if(0!==r.avail_out){if(f>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},g.prototype.onData=function(t){this.chunks.push(t)},g.prototype.onEnd=function(t){t===x&&(this.result=e.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},rt.Deflate=g,rt.deflate=_,rt.deflateRaw=function(t,e){return(e=e||{}).raw=!0,_(t,e)},rt.gzip=function(t,e){return(e=e||{}).gzip=!0,_(t,e)},rt.constants=lt(),rt}();const mt=["enabled","userId"];var vt,bt,St=["drs"];vt=St,bt=143,function(t){for(;--t;)vt.push(vt.shift())}(++bt);var Et,It,Tt,Dt=new nt((Et="0x0",St[Et-=0])),At=["removeItemSessionStorageSafe","getItemLocalStorageSafe","setItemLocalStorageSafe","localStorage","removeItem","FALLBACK_SESSION_STORAGE","FALLBACK_LOCAL_STORAGE","clientId","getClientId","setClientId","getFullStorageKey","getItemSessionStorageSafe","sessionStorage","setItem"];It=At,Tt=215,function(t){for(;--t;)It.push(It.shift())}(++Tt);var kt=function(t,e){return At[t-=0]};class Ct{constructor(t){this[kt("0x0")]={},this[kt("0x1")]={},this[kt("0x2")]=t}[kt("0x3")](){return this[kt("0x2")]}[kt("0x4")](t){this[kt("0x2")]=t}[kt("0x5")](t){return this[kt("0x2")]+"_"+t}[kt("0x6")](t){const e=this[kt("0x5")](t);try{return window[kt("0x7")].getItem(e)}catch(t){return this[kt("0x0")][e]}}setItemSessionStorageSafe(t,e){const i=this.getFullStorageKey(t);try{window[kt("0x7")][kt("0x8")](i,e)}catch(t){this[kt("0x0")][i]=e}}[kt("0x9")](t){const e=this.getFullStorageKey(t);try{window[kt("0x7")].removeItem(e)}catch(t){this[kt("0x0")][e]=void 0}}[kt("0xa")](t){const e=this[kt("0x5")](t);try{return window.localStorage.getItem(e)}catch(t){return this[kt("0x1")][e]}}[kt("0xb")](t,e){const i=this[kt("0x5")](t);try{window[kt("0xc")][kt("0x8")](i,e)}catch(t){this[kt("0x1")][i]=e}}removeItemLocalStorageSafe(t){const e=this[kt("0x5")](t);try{window[kt("0xc")][kt("0xd")](e)}catch(t){this[kt("0x1")][e]=void 0}}}var Pt,Mt,Ot=["enabled","[AccountProtection SDK]","logsLimit","logs","middlewares","info","pushLog","warn","error","log","%s %s %s","logPrefix","stringify","push","now","formatter","unshift","map","all","catch"];Pt=Ot,Mt=100,function(t){for(;--t;)Pt.push(Pt.shift())}(++Mt);var Lt=function(t,e){return Ot[t-=0]};class zt{constructor(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this[Lt("0x0")]=t,this.logPrefix=Lt("0x1"),this[Lt("0x2")]=1e4,this[Lt("0x3")]=[],this[Lt("0x4")]=[]}[Lt("0x5")](t,e){this[Lt("0x6")](3,t,e)}[Lt("0x7")](t,e){this.pushLog(4,t,e)}[Lt("0x8")](t,e){this[Lt("0x6")](5,t,e)}flush(){const t=this[Lt("0x3")];return this[Lt("0x3")]=[],t}pushLog(t,e,i){this.enabled&&console[Lt("0x9")](Lt("0xa"),this[Lt("0xb")],e,JSON[Lt("0xc")](i)),this[Lt("0x3")][Lt("0xd")]({timestamp:Date[Lt("0xe")](),severity:t,text:JSON[Lt("0xc")](l(l({},i),{},{message:e}),this[Lt("0xf")])}),this[Lt("0x3")].length>this.logsLimit&&this.logs[Lt("0x10")]();const n=this.middlewares[Lt("0x11")]((t=>t()));Promise[Lt("0x12")](n)[Lt("0x13")]((()=>{}))}formatter(t,e){if(e instanceof Error){const{name:t,stack:i,message:n}=e;return{name:t,stack:i,message:n}}return e}}const Nt=new zt;var Ut,Rt,Bt=["ric","requestsManager","loadConf","fetchConf","getData","error","storageManager","getItemLocalStorageSafe","parse","error loading config","shouldUpdateConf","getConfValue","now","refreshConf","length","setItemLocalStorageSafe","stringify","conf","timestamp"];Ut=Bt,Rt=417,function(t){for(;--t;)Ut.push(Ut.shift())}(++Rt);var Kt=function(t,e){return Bt[t-=0]};const Ft=Kt("0x0"),jt=Kt("0x1");class Zt{constructor(t,e){this.storageManager=t,this[Kt("0x2")]=e,this.conf=this[Kt("0x3")]()}async[Kt("0x4")](t){try{const e="device/conf?tenantId="+t,i=await this[Kt("0x2")][Kt("0x5")](e);return null!=i?i:{}}catch(e){return Nt[Kt("0x6")]("error fetching config",{clientId:t,error:e}),{}}}[Kt("0x3")](){const t=this[Kt("0x7")][Kt("0x8")](jt);if(null!=t)try{return JSON[Kt("0x9")](t)}catch(t){Nt[Kt("0x6")](Kt("0xa"),{error:t})}return{}}[Kt("0xb")](){const t=this[Kt("0xc")](Ft,0);return Date[Kt("0xd")]()-t>36e5}async[Kt("0xe")](t){if(!this.shouldUpdateConf())return!1;let e=await this.fetchConf(t);return 0==Object.keys(e)[Kt("0xf")]?e=this[Kt("0x3")]():this[Kt("0x7")][Kt("0x10")](jt,JSON[Kt("0x11")](e)),this[Kt("0x12")]=e,!0}getConfValue(t,e){const i=void 0!==this[Kt("0x12")]?this.conf[t]:void 0;return null!=i?i:e}}var Vt,Ht,Gt=["EVENT_TYPE_IDENTIFICATION","identification","EVENT_TYPE_ACTION","EVENT_TYPE_DEVICE","device","EVENT_TYPE_INTERACTION"];Vt=Gt,Ht=116,function(t){for(;--t;)Vt.push(Vt.shift())}(++Ht);var Wt,qt,Yt=function(t,e){return Gt[t-=0]};(qt=Wt||(Wt={}))[Yt("0x0")]="action",qt[Yt("0x1")]=Yt("0x2"),qt[Yt("0x3")]="interaction",qt[Yt("0x4")]=Yt("0x5");var Jt,$t,Xt=["length","push","maintainLastXItems"];Jt=Xt,$t=332,function(t){for(;--t;)Jt.push(Jt.shift())}(++$t);var Qt=function(t,e){return Xt[t-=0]};class te{static[Qt("0x0")](t,e,i){return t[Qt("0x1")]>=e&&t.splice(0,1),t[Qt("0x2")](i),t}}var ee,ie,ne=["bufferSize","isTrusted","cancelable","composed","view","shiftKey","metaKey","location","inputType","data","buffer","collect","extractEventData","maintainLastXItems","getData","extractButtonsPressedData","ctrlKey","buttons","now","detail","offsetY","sourceCapabilities","firesTouchEvents","target"];ee=ne,ie=273,function(t){for(;--t;)ee.push(ee.shift())}(++ie);var re=function(t,e){return ne[t-=0]};class ae{constructor(t){this[re("0x0")]=[],this[re("0x1")]=t}[re("0x2")](t){const e=this[re("0x3")](t);te[re("0x4")](this[re("0x0")],this.buffer,e)}[re("0x5")](){return this.data}extractEventData(t){return l({x:t.x,y:t.y,tspl:Date.now()},this[re("0x6")](t))}extractButtonsPressedData(t){return l(l(l(l({},t[re("0x7")]&&{ctrlKey:!0}),t.altKey&&{altKey:!0}),t.shiftKey&&{shiftKey:!0}),0!=t[re("0x8")]&&{buttons:t[re("0x8")]})}}class se{constructor(t){this.data=[],this[re("0x1")]=t}collect(t){var e;const i={x:t.x,y:t.y,timestamp:Date[re("0x9")](),mouseButtonType:t[re("0xa")],offsetX:t.offsetX,offsetY:t[re("0xb")],isPressed:null==(null===(e=t[re("0xc")])||void 0===e?void 0:e[re("0xd")])?null:!t.sourceCapabilities[re("0xd")],target_id:t[re("0xe")].id};te[re("0x4")](this.data,this.buffer,i)}[re("0x5")](){const t=[...this[re("0x0")]];return this[re("0x0")]=[],t}}class oe{constructor(t){this[re("0x0")]=[],this[re("0xf")]=t}[re("0x2")](t){var e;const i={isTrusted:t[re("0x10")],cancelable:t[re("0x11")],composed:t[re("0x12")],isView:!!t[re("0x13")],shiftKey:t[re("0x14")],metaKey:t[re("0x15")],firesTouchEvents:null===(e=t[re("0xc")])||void 0===e?void 0:e[re("0xd")],timestamp:Date[re("0x9")]()};te[re("0x4")](this[re("0x0")],this[re("0xf")],i)}[re("0x5")](){const t=[...this[re("0x0")]];return this[re("0x0")]=[],t}}class ce{constructor(t){this[re("0x0")]=[],this[re("0xf")]=t}[re("0x2")](t){var e;const i={isTrusted:t[re("0x10")],cancelable:t[re("0x11")],composed:t[re("0x12")],isView:!!t[re("0x13")],location:t[re("0x16")],shiftKey:t.shiftKey,firesTouchEvents:null===(e=t[re("0xc")])||void 0===e?void 0:e.firesTouchEvents,timestamp:Date[re("0x9")]()};te[re("0x4")](this[re("0x0")],this[re("0xf")],i)}getData(){const t=this[re("0x0")];return this[re("0x0")]=[],t}}class le{constructor(t){this[re("0x0")]=[],this[re("0xf")]=t}[re("0x2")](t){const e={isTrusted:t[re("0x10")],cancelable:t[re("0x11")],composed:t[re("0x12")],inputType:t[re("0x17")],isView:!!t[re("0x13")],timestamp:Date.now()};te[re("0x4")](this.data,this[re("0xf")],e)}getData(){const t=this[re("0x0")];return this[re("0x0")]=[],t}}class xe{constructor(t){this[re("0x0")]=[],this.bufferSize=t}[re("0x2")](t){const e={isTrusted:t[re("0x10")],cancelable:t[re("0x11")],composed:t[re("0x12")],timestamp:Date[re("0x9")]()};te[re("0x4")](this[re("0x0")],this[re("0xf")],e)}getData(){const t=this[re("0x0")];return this[re("0x0")]=[],t}}var de,he,ue=["keyup","keydown","input","focusout","INPUT","SELECT","TEXTAREA","deviceEventDataCollectionIgnoreList","mouseEventsCollectionBuffer","detail","sourceCapabilities","offsetX","target","cancelable","dropEffect","inputTypeFilter","virtualKeyboard","includes","registerEventListeners","entries","interactionEventsCollectorsData","addSafeInteractionListener","error","Error while adding listener","filter","forEach","getGenericAttributes","getAttachedData","addEventListener","handleEvent","eventTypesToAttach","getData","location","href","change","click","paste","mousemove","mouseup","mousedown","submit"];de=ue,he=321,function(t){for(;--t;)de.push(de.shift())}(++he);var fe=function(t,e){return ue[t-=0]};const ge=fe("0x0"),_e=fe("0x1"),pe=fe("0x2"),we=fe("0x3"),ye=fe("0x4"),me=fe("0x5"),ve=fe("0x6"),be=fe("0x7"),Se=fe("0x8"),Ee=fe("0x9"),Ie=fe("0xa"),Te=[fe("0xb"),fe("0xc"),fe("0xd")];class De{constructor(t,e,i){this[fe("0xe")]=t,this[fe("0xf")]=e,this.safeEventCallback=i,this.interactionEventsCollectorsData={[_e]:{eventTypesToAttach:[we,ye,me],attributesMapper:t=>{var e;return{x:t.x,y:t.y,mouseButtonType:t[fe("0x10")],isPressed:null==(null===(e=t[fe("0x11")])||void 0===e?void 0:e.firesTouchEvents)?null:!t[fe("0x11")].firesTouchEvents,offsetX:t[fe("0x12")],offsetY:t.offsetY,target_id:t[fe("0x13")].id}}},[pe]:{attributesMapper:t=>({target_id:t[fe("0x13")].id,isTrusted:t.isTrusted,cancelable:t[fe("0x14")],composed:t.composed,dropEffect:t.clipboardData[fe("0x15")],effectAllowed:t.clipboardData.effectAllowed})},[ve]:{attributesMapper:t=>({target_id:t[fe("0x13")].id})},[we]:{continousCollectors:[new ae(this[fe("0xf")])]},[ye]:{continousCollectors:[new se(1)]},[me]:{continousCollectors:[new se(1)]},[Ie]:{eventTypesToAttach:[Ee,be,Se,ge],filter:this[fe("0x16")],attributesMapper:t=>{const{target:e,isTrusted:i,cancelable:n,composed:r}=t;return l({target_id:e.id,dataset_keys:Object.keys(e.dataset||{}),isTrusted:i,cancelable:n,composed:r},navigator[fe("0x17")]&&{navigator_virtualKeyboard:navigator[fe("0x17")].overlaysContent})}},[Ee]:{filter:this.inputTypeFilter,continousCollectors:[new le(50)]},[be]:{filter:this.inputTypeFilter,continousCollectors:[new ce(50)]},[Se]:{filter:this[fe("0x16")],continousCollectors:[new oe(50)]},[ge]:{continousCollectors:[new xe(50)]}}}[fe("0x16")](t){var e;const i=null===(e=t[fe("0x13")])||void 0===e?void 0:e.tagName;return Te[fe("0x18")](i)}[fe("0x19")](){for(const[t,e]of Object[fe("0x1a")](this[fe("0x1b")]))if(!this[fe("0xe")][fe("0x18")](t))try{this[fe("0x1c")](t,e)}catch(e){Nt[fe("0x1d")](fe("0x1e"),{error:e,eventType:t})}}[fe("0x1f")](t,e){return!t[fe("0x1f")]||t[fe("0x1f")](e)}async handleEvent(t,e,i){const{attributesMapper:n,continousCollectors:r}=t;if(!this[fe("0x1f")](t,e))return!1;if(r)r[fe("0x20")]((t=>{t.collect(e)}));else{const t=this[fe("0x21")](),r=this[fe("0x22")](i),a=l(l(l({},t),n(e)),r&&{attachedEventsData:r});await this.safeEventCallback(i,a)}return!0}[fe("0x1c")](t,e){window[fe("0x23")](t,(async i=>{try{await this[fe("0x24")](e,i,t)}catch(t){Nt[fe("0x1d")]("error adding interaction listener",{error:t})}}))}[fe("0x22")](t){let e;const i=this[fe("0x1b")][t][fe("0x25")];return i&&(e={},i[fe("0x20")]((t=>{const{continousCollectors:i}=this[fe("0x1b")][t];i&&i.forEach((i=>e[t]=i[fe("0x26")]()))}))),e}getGenericAttributes(){return{location:window[fe("0x27")][fe("0x28")]}}}var Ae,ke,Ce=["executor reached timeout","name","getHighEntropyValues","architecture","model","platform","fullVersionList","bitness","mobile","wow64","uaFullVersion","resolve","catch","setTimeout","race"];Ae=Ce,ke=167,function(t){for(;--t;)Ae.push(Ae.shift())}(++ke);var Pe=function(t,e){return Ce[t-=0]};function Me(){var t;return null===(t=navigator.userAgentData)||void 0===t?void 0:t[Pe("0x0")]([Pe("0x1"),Pe("0x2"),Pe("0x3"),"platformVersion",Pe("0x4"),Pe("0x5"),Pe("0x6"),Pe("0x7"),Pe("0x8")])}function Oe(t,e){let i;const n=[Promise[Pe("0x9")](t())[Pe("0xa")]((()=>{})),new Promise(((t,n)=>i=window[Pe("0xb")](n,e)))];return Promise[Pe("0xc")](n)[Pe("0xa")]((()=>Nt.warn(Pe("0xd"),{fnName:t[Pe("0xe")]}))).finally((()=>clearTimeout(i)))}var Le,ze,Ne=["absolute","left","fontSize","10px","textContent","some","offsetWidth","offsetHeight","body","removeChild","language","deviceMemory","__webdriver_script_func","DateTimeFormat","timeZone","vendor","buildID","textBaseline","alphabetic","#f60","font","Cwm fjordbank gly ","fromCharCode","fillText","fillStyle","rgba(102, 204, 0, 0.2)","18pt Arial","toDataURL","multiply","#f2f","#2ff","#ff2","beginPath","arc","closePath","fill","#f9c","evenodd","rect","isPointInPath","canvas","getContext","charging","chargingTime","dischargingTime","level","getBrave","brave","isBrave","webgl-experimental","getExtension","getParameter","UNMASKED_RENDERER_WEBGL","video","canPlayType",'video/mp4; codecs="avc1.42E01E"',"video/mp4;;Codecs =avc1.42E01E","getCryptoBindingData","cryptoBinding","getPublicData","isMobile","userAgent","only screen and (max-width: 600px)","sdkDeviceDataCollectionIgnoreList","deviceDataCalculationExpiry","abs","storageManager","configManager","calculate","getConfValue","dataPointsExtractor","lastDeviceData","setItemLocalStorageSafe","getItemLocalStorageSafe","now","dataPoints","getBattery","getCanvasFingerprint","getCodesTests","getConnection","getDeviceMemory","getDocumentBasedKeys","getHardwareConcurrency","getFIDOEnabled","getLanguages","getLanguage","getTimezoneOffset","getNavigatorBasedKeys","getNavigatorProduct","getNavigatorUAData","getNavigatorHighEntropyData","navigatorStorageEstimation","navigatorIsUserActive","getMathFingerprint","getMediaMatch","getOpenDatabase","getWindowOrientation","getCpuClass","getOsCpu","getAddBehavior","getProductSub","getMediaDevices","getAudioFingerprint","getAudioFingerprintExtended","getFonts","getPerformanceTiming","getPerformanceMemory","getScreen","hasSequentum","getReferrer","getTimezone","getTouchSupport","getVendor","getBuildID","getWebGlRenderer","getWindowOuter","webRTCDisabled","bind","getNavigatorPermissionsState","notifications","geolocation","isGeoLocationExists","isSendBeaconFunction","getNavigatorPrototype","getInstalledRelatedApps","CDPRuntimeDomainTest","Error","Object","defineProperty","stack","console","getOwnPropertyNames","document","$chrome_asyncScriptInfo","test","values","getOwnPropertyDescriptors","value","cache_","getPrototypeOf","storeItem","sort","Array","Promise","Symbol","name","token","getAsyncToken","collectPromisesData","startPromisesLoop","entries","includes","worker throw error","warn","worker promise rejected","getCookieEnabled","cookieEnabled","resolve","credentials","isUserVerifyingPlatformAuthenticatorAvailable","getCryptoRandomValues","crypto","getRandomValues","from","getWindowBasedKeys","chrome","__gCrWeb","yandex","__yb","__ybro","__firefox__","__edgeTrackingPreventionStatistics","webkit","oprt","ucweb","UCShellJava","puffinDevice","_phantom","__phantomas","callPhantom","Buffer","emit","spawn","domAutomationController","domAutomation","__nightmare","_selenium","calledSelenium","callSelenium","_Selenium_IDE_Recorder","__$webdriverAsyncExecutor","__fxdriver_evaluate","__lastWatirAlert","__lastWatirConfirm","__webdriver__chr","__webdriver_evaluate","__webdriver_script_function","__webdriver_unwrapped","__webdriverFuncgeb","calledPhantom","cdc_adoQpoasnfa76pfcZLmcfl_Array","cdc_adoQpoasnfa76pfcZLmcfl_Symbol","fmget_targets","geb","OSMJIF","spynner_additional_js_loaded","watinExpressionError","watinExpressionResult","push","high","standard","reduce","no-preference","low","more","less","100","active","none","replace","matchMedia","matches","sqrt","log","exp","acos","acosh","asin","asinh","atanh","atan","sin","sinh","cos","cosh","tanh","expm1","hashCodeString","getSessionStorage","sessionStorage","getLocalStorage","localStorage","toString","indexOf","Sequentum","webdriver","__driver_evaluate","__selenium_evaluate","__driver_unwrapped","__selenium_unwrapped","__fxdriver_unwrapped","_WEBDRIVER_ELEM_CACHE","ChromeDriverw","driver-evaluate","selenium-evaluate","webdriver-evaluate-response","__webdriverFunc","__webdriver_script_fn","__lastWatirPrompt","$cdc_asdjflasutopfhvcZLmcfl_","serviceWorker","filter","product","estimate","navigatorOnLine","onLine","userActivation","isActive","state","sendBeacon","function","getOwnPropertyDescriptor","hardwareConcurrency","languages","get","isArray","map","url","referrer","timing","getIndexedDB","indexedDB","DocumentTouch","maxTouchPoints","msMaxTouchPoints","ontouchstart","length","type","plugins","description","screen","availHeight","availWidth","height","width","pixelDepth","orientation","angle","charCodeAt","outerWidth","outerHeight","getWebDriver","getPlatform","platform","oscpu","prototype","addBehavior","productSub","mediaDevices","kind","label","deviceId","groupId","webkitOfflineAudioContext","createOscillator","triangle","createDynamicsCompressor","threshold","knee","ratio","release","connect","destination","start","oncomplete","startRendering","subarray","OfflineAudioContext","frequency","attack","disconnect","frequencyBinCount","fftSize","getFloatTimeDomainData","reduction","getHash","mmMwWLliI0O&1","monospace","sans-serif","serif","sans-serif-thin","ARNO PRO","Agency FB","Arabic Typesetting","Arial Unicode MS","BankGothic Md BT","Batang","Century Gothic","Clarendon","EUROSTILE","Futura Bk BT","Futura Md BT","Gill Sans","HELV","Helvetica Neue","Humanst521 BT","Leelawadee","Letter Gothic","Levenim MT","Lucida Bright","Lucida Sans","MS Mincho","MS Reference Specialty","MS UI Gothic","MT Extra","MYRIAD PRO","Marlett","Meiryo UI","Microsoft Uighur","Pristina","SCRIPTINA","Segoe UI Light","Serifa","Small Fonts","Staccato222 BT","Univers CE 55 Medium","Vrinda","createElement","div","style","visibility","hidden","span","position"];Le=Ne,ze=447,function(t){for(;--t;)Le.push(Le.shift())}(++ze);var Ue=function(t,e){return Ne[t-=0]};const Re=Ue("0x0"),Be=Ue("0x1"),Ke=t=>t?[...t].reduce(((t,e)=>t+Math[Ue("0x2")](e)),0):0;class Fe{constructor(t,e,i){this[Ue("0x3")]=t,this[Ue("0x4")]=e,this.cryptoBinding=i}async[Ue("0x5")](){const t=this[Ue("0x4")][Ue("0x6")](Re,[]),e=this.configManager[Ue("0x6")](Be,36e5),i=await new je(t,this.cryptoBinding)[Ue("0x7")]();return this[Ue("0x8")]=i,this[Ue("0x3")][Ue("0x9")](Be,Date.now()+e),i}async getDeviceData(){return Number(this[Ue("0x3")][Ue("0xa")](Be))<Date[Ue("0xb")]()||!this[Ue("0x8")]?await this.calculate():this[Ue("0x8")]}}class je{constructor(t,e){this[Ue("0x0")]=t,this.cryptoBinding=e,this[Ue("0xc")]={battery:this[Ue("0xd")],brave:this.getBrave,canvas:this[Ue("0xe")],codecs:this[Ue("0xf")],connection:this[Ue("0x10")],cookieEnabled:this.getCookieEnabled,cryptoRandomValues:this.getCryptoRandomValues,deviceMemory:this[Ue("0x11")],documentBasedKeys:this[Ue("0x12")],hardwareConcurrency:this[Ue("0x13")],indexedDB:this.getIndexedDB,fidoEnabled:this[Ue("0x14")],languages:this[Ue("0x15")],language:this[Ue("0x16")],timezoneOffset:this[Ue("0x17")],localStorage:this.getLocalStorage,navigatorBasedKeys:this[Ue("0x18")],navigatorProduct:this[Ue("0x19")],navigatorUserAgent:this.getNavigatorUserAgent,navigatorUAData:this[Ue("0x1a")],navigatorHighEntropyData:this[Ue("0x1b")],navigatorStorageEstimation:this[Ue("0x1c")],navigatorOnLine:this.navigatorOnLine,navigatorIsUserActive:this[Ue("0x1d")],math:this[Ue("0x1e")],mediaMatch:this[Ue("0x1f")],openDatabase:this[Ue("0x20")],windowOrientation:this[Ue("0x21")],platform:this.getPlatform,cpuClass:this[Ue("0x22")],osClass:this[Ue("0x23")],addBehavior:this[Ue("0x24")],productSub:this[Ue("0x25")],mediaDevices:this[Ue("0x26")],audioFingerprint:this[Ue("0x27")],audioFingerprintExtended:this[Ue("0x28")],fonts:this[Ue("0x29")],performanceTiming:this[Ue("0x2a")],performanceMemory:this[Ue("0x2b")],plugins:this.getPlugins,screen:this[Ue("0x2c")],sequentum:this[Ue("0x2d")],sessionStorage:this.getSessionStorage,referrer:this[Ue("0x2e")],timezone:this[Ue("0x2f")],touchSupport:this[Ue("0x30")],vendor:this[Ue("0x31")],buildID:this[Ue("0x32")],webdriver:this.getWebDriver,webGlRenderer:this[Ue("0x33")],windowBasedKeys:this.getWindowBasedKeys,windowOuter:this[Ue("0x34")],webRTCDisabled:this[Ue("0x35")],cryptoBindingData:this.getCryptoBindingData[Ue("0x36")](this),notificationState:this[Ue("0x37")][Ue("0x36")](this,Ue("0x38")),geolocationState:this.getNavigatorPermissionsState[Ue("0x36")](this,Ue("0x39")),isGeoLocationExists:this[Ue("0x3a")],isSendBeaconExists:this[Ue("0x3b")],navigatorPrototype:this[Ue("0x3c")],installedRelatedApps:this[Ue("0x3d")],windowConstructorAliasTest:this.windowConstructorAliasTest,windowDocumentAuxVarsTest:this.windowDocumentAuxVarsTest,CDPRuntimeDomainTest:this[Ue("0x3e")]}}[Ue("0x3e")](){let t=!1;const e=new(window[Ue("0x3f")]);return window[Ue("0x40")][Ue("0x41")](e,Ue("0x42"),{configurable:!1,enumerable:!1,get:function(){return t=!0,""}}),window[Ue("0x43")].debug(e[Ue("0x42")]),t}windowDocumentAuxVarsTest(){for(const t of window[Ue("0x40")][Ue("0x44")](window[Ue("0x45")]))if(t==Ue("0x46")||/^\$cdc_[a-zA-Z0-9]{22}_$/[Ue("0x47")](t))return!0;for(const t of window[Ue("0x40")][Ue("0x48")](window[Ue("0x40")][Ue("0x49")](window.document))){if(!t[Ue("0x4a")]||void 0===t.value[Ue("0x4b")])continue;const e=window[Ue("0x40")].getOwnPropertyNames(window[Ue("0x40")][Ue("0x4c")](t[Ue("0x4a")])),i=[Ue("0x4d"),"retrieveItem","isNodeReachable_"];if(e[Ue("0x4e")](),i.sort(),e.every(((t,e)=>t==i[e])))return!0}return!1}windowConstructorAliasTest(){const t=window[Ue("0x40")][Ue("0x44")](window);for(const e of t){if(/^cdc_[a-zA-Z0-9]{22}_(Array|Promise|Symbol)$/[Ue("0x47")](e))return!0;for(const t of[window[Ue("0x4f")],window[Ue("0x50")],window[Ue("0x51")]])if(e!=(null==t?void 0:t[Ue("0x52")])&&e!=Ue("0x53")&&e!=Ue("0x54")&&window[e]===t)return!0}return!1}async[Ue("0x7")](){const t=this.startPromisesLoop();return await this[Ue("0x55")](t)}[Ue("0x56")](){const t={};for(const[e,i]of Object[Ue("0x57")](this.dataPoints))if(!this[Ue("0x0")][Ue("0x58")](e))try{t[e]=Oe(i,100)}catch(i){Nt.warn(Ue("0x59"),{e:i,key:e}),t[e]=Promise.resolve()}return t}async[Ue("0x55")](t){const e={};for(const[i,n]of Object[Ue("0x57")](t))try{e[i]=await n}catch(t){Nt[Ue("0x5a")](Ue("0x5b"),{e:t,key:i}),e[i]=void 0}return e}[Ue("0x5c")](){const t=navigator[Ue("0x5d")];return Promise[Ue("0x5e")](t)}async getFIDOEnabled(){return!!navigator[Ue("0x5f")]&&await window.PublicKeyCredential[Ue("0x60")]()}[Ue("0x61")](){const t=window[Ue("0x62")][Ue("0x63")](new Uint8Array(16));return Array[Ue("0x64")](t)}[Ue("0x35")](){const t=null==window.RTCPeerConnection;return Promise[Ue("0x5e")](t)}[Ue("0x65")](){const t=[Ue("0x66"),"safari","__crWeb",Ue("0x67"),Ue("0x68"),Ue("0x69"),Ue("0x6a"),Ue("0x6b"),Ue("0x6c"),Ue("0x6d"),Ue("0x6e"),"samsungAr",Ue("0x6f"),Ue("0x70"),Ue("0x71"),Ue("0x72"),Ue("0x73"),Ue("0x74"),Ue("0x75"),Ue("0x76"),Ue("0x77"),Ue("0x78"),Ue("0x79"),Ue("0x7a"),Ue("0x7b"),Ue("0x7c"),Ue("0x7d"),Ue("0x7e"),Ue("0x7f"),"__driver_evaluate","__driver_unwrapped",Ue("0x80"),"__fxdriver_unwrapped",Ue("0x81"),Ue("0x82"),"__lastWatirPrompt","__selenium_evaluate","__selenium_unwrapped",Ue("0x83"),Ue("0x84"),"__webdriver_script_fn","__webdriver_script_func",Ue("0x85"),Ue("0x86"),Ue("0x87"),"awesomium",Ue("0x88"),Ue("0x89"),"cdc_adoQpoasnfa76pfcZLmcfl_Promise",Ue("0x8a"),"chrome_asyncScriptInfo",Ue("0x8b"),Ue("0x8c"),Ue("0x8d"),Ue("0x8e"),Ue("0x8f"),Ue("0x90")],e=[];for(const i of t){const t=window[i];void 0!==t&&null!=t&&e[Ue("0x91")](i)}return Promise[Ue("0x5e")](e)}[Ue("0x1f")](){const t={"dynamic-range":[Ue("0x92"),Ue("0x93")],"prefers-reduced-motion":["no-preference",Ue("0x94")],"prefers-contrast":[Ue("0x95"),Ue("0x92"),Ue("0x96"),Ue("0x97"),Ue("0x98"),"forced"],"max-monochrome":["0","10",Ue("0x99"),"1000"],"forced-colors":[Ue("0x9a"),Ue("0x9b")],"inverted-colors":["inverted",Ue("0x9b")],"color-gamut":["rec2020","p3","srgb"]},e={};for(const[i,n]of Object.entries(t))for(const t of n)e[i[Ue("0x9c")](/-/g,"_")+"_"+t[Ue("0x9c")](/-/g,"_")]=window[Ue("0x9d")]("("+i+": "+t+")")[Ue("0x9e")];return Promise[Ue("0x5e")](e)}[Ue("0x1e")](){const t=[Math[Ue("0xa2")](.12312423423423424),Math[Ue("0xa3")](1e308),(e=1e154,Math.log(e+Math[Ue("0x9f")](e*e-1))),Math[Ue("0xa4")](.12312423423423424),Math[Ue("0xa5")](1),Math[Ue("0xa0")](1+Math[Ue("0x9f")](2)),Math[Ue("0xa6")](.5),Math.log(3)/2,Math[Ue("0xa7")](.5),Math[Ue("0xa8")](-1e300),Math[Ue("0xa9")](1),Math[Ue("0xa1")](1)-1/Math[Ue("0xa1")](1)/2,Math[Ue("0xaa")](10.000000000123),Math[Ue("0xab")](1),(Math[Ue("0xa1")](1)+1/Math.exp(1))/2,Math.tan(-1e300),Math[Ue("0xac")](1),(Math[Ue("0xa1")](2)-1)/(Math[Ue("0xa1")](2)+1),Math[Ue("0xa1")](1),Math[Ue("0xad")](1),Math[Ue("0xa1")](1)-1,Math.log1p(10),Math[Ue("0xa0")](11),Math.PI**-100];var e;let i="";for(let e=0;e<t.length;e++)i+=t[e].toString();return Promise.resolve(je[Ue("0xae")](i))}[Ue("0x10")](){const{connection:t}=navigator,e=(t=>{let{downlink:e,effectiveType:i,rtt:n,saveData:r}=t;return{downlink:e,effectiveType:i,rtt:n,saveData:r}})(t);return Promise[Ue("0x5e")](e)}[Ue("0xaf")](){return Promise[Ue("0x5e")](!!window[Ue("0xb0")])}[Ue("0xb1")](){return Promise[Ue("0x5e")](!!window[Ue("0xb2")])}hasSequentum(){return-1!==window.external[Ue("0xb3")]()[Ue("0xb4")](Ue("0xb5"))}[Ue("0x18")](){return[Ue("0xb6"),Ue("0xb7"),Ue("0x84"),Ue("0xb8"),Ue("0x80"),Ue("0xb9"),"__webdriver_unwrapped",Ue("0xba"),Ue("0xbb"),Ue("0x7e"),Ue("0x7b"),Ue("0x7c"),Ue("0xbc"),Ue("0xbd"),Ue("0xbe"),"webdriver-evaluate",Ue("0xbf"),"webdriverCommand",Ue("0xc0"),Ue("0xc1"),Ue("0xc2"),"__$webdriverAsyncExecutor",Ue("0x81"),"__lastWatirConfirm",Ue("0xc3"),Ue("0x46"),Ue("0xc4"),Ue("0xc5")][Ue("0xc6")]((t=>navigator[t]))}getNavigatorProduct(){const t=navigator[Ue("0xc7")];return Promise.resolve(t)}getNavigatorUserAgent(){return navigator.userAgent}[Ue("0x1a")](){return navigator.userAgentData}getNavigatorHighEntropyData(){return Me()}[Ue("0x1c")](){return navigator.storage[Ue("0xc8")]()}[Ue("0xc9")](){return navigator[Ue("0xca")]}[Ue("0x1d")](){return navigator[Ue("0xcb")][Ue("0xcc")]}async getNavigatorPermissionsState(t){try{const e=await navigator.permissions.query({name:t});return null==e?void 0:e[Ue("0xcd")]}catch(t){}}[Ue("0x3a")](){return!!navigator[Ue("0x39")]}[Ue("0x3b")](){return typeof navigator[Ue("0xce")]===Ue("0xcf")}getNavigatorPrototype(){return{hardwareConcurrency:Object[Ue("0xd0")](Object[Ue("0x4c")](navigator),Ue("0xd1")).get[Ue("0xb3")](),languages:Object.getOwnPropertyDescriptor(Object.getPrototypeOf(navigator),Ue("0xd2"))[Ue("0xd3")].toString()}}async getInstalledRelatedApps(){if(typeof navigator[Ue("0x3d")]===Ue("0xcf"))try{const{related_applications:t}=await navigator[Ue("0x3d")]();if(t&&Array[Ue("0xd4")](t))return t[Ue("0xd5")]((t=>({platform:t.platform,url:t[Ue("0xd6")]})))}catch(t){}}[Ue("0x2e")](){return document[Ue("0xd7")]}getPerformanceTiming(){return performance[Ue("0xd8")]}[Ue("0x2b")](){const{jsHeapSizeLimit:t,totalJSHeapSize:e,usedJSHeapSize:i}=performance.memory;return{jsHeapSizeLimit:t,totalJSHeapSize:e,usedJSHeapSize:i}}[Ue("0xd9")](){return Promise[Ue("0x5e")](!!window[Ue("0xda")])}[Ue("0x20")](){const{openDatabase:t}=window;return Promise[Ue("0x5e")](!!t)}[Ue("0x30")](){const t=window[Ue("0xdb")]&&document instanceof DocumentTouch,e={maxTouchPoints:navigator[Ue("0xdc")]||navigator[Ue("0xdd")]||0,documentTouch:t,ontouchstart:Ue("0xde")in window};return Promise[Ue("0x5e")](e)}getPlugins(){function t(t){const e=[];for(let i=0;i<t[Ue("0xdf")];++i)e[Ue("0x91")]({type:t[i][Ue("0xe0")],suffixes:t[i].suffixes});return e}const e=[];for(let i=0;i<navigator.plugins.length;++i){const n=navigator[Ue("0xe1")][i];n&&e.push({name:n.name,description:n[Ue("0xe2")],mimeTypes:t(n)})}return Promise[Ue("0x5e")](e)}[Ue("0x2c")](){const t=window[Ue("0xe3")]||screen,{availLeft:e}=t,{availTop:i}=t,n={availHeight:t[Ue("0xe4")],availLeft:e,availTop:i,availWidth:t[Ue("0xe5")],colorDepth:t.colorDepth,height:t[Ue("0xe6")],width:t[Ue("0xe7")],pixelDepth:t[Ue("0xe8")],orientationAngle:t[Ue("0xe9")]&&t.orientation[Ue("0xea")],orientationType:t.orientation&&t[Ue("0xe9")].type,devicePixelRatio:window.devicePixelRatio};return Promise[Ue("0x5e")](n)}static[Ue("0xae")](t){if(null==t)return;let e=0,i=0;const n=t[Ue("0xdf")];for(;i<n;)e=(e<<5)-e+t[Ue("0xeb")](i++)|0;return e}[Ue("0x34")](){const t={outerWidth:window[Ue("0xec")],outerHeight:window[Ue("0xed")]};return Promise[Ue("0x5e")](t)}[Ue("0xee")](){const t=navigator.webdriver;return Promise.resolve(t)}[Ue("0x21")](){const t=window[Ue("0xe9")];return Promise[Ue("0x5e")](t)}[Ue("0xef")](){const t=navigator[Ue("0xf0")];return Promise[Ue("0x5e")](t)}[Ue("0x22")](){const t=navigator.cpuClass;return Promise[Ue("0x5e")](t)}[Ue("0x23")](){const t=navigator[Ue("0xf1")];return Promise[Ue("0x5e")](t)}[Ue("0x24")](){const t=!!window.HTMLElement[Ue("0xf2")][Ue("0xf3")];return Promise[Ue("0x5e")](t)}[Ue("0x25")](){const t=navigator[Ue("0xf4")];return Promise[Ue("0x5e")](t)}async getMediaDevices(){const t=await navigator[Ue("0xf5")].enumerateDevices(),e=[];for(const i of t)e[Ue("0x91")]({kind:i[Ue("0xf6")],label:i[Ue("0xf7")],deviceId:i[Ue("0xf8")],groupId:i[Ue("0xf9")]});return e}async[Ue("0x27")](){const t=window.OfflineAudioContext||window[Ue("0xfa")];if(!t)return-1;const e=new t(1,5e3,44100),i=e[Ue("0xfb")]();i.type=Ue("0xfc"),i.frequency[Ue("0x4a")]=1e4;const n=e[Ue("0xfd")]();n[Ue("0xfe")][Ue("0x4a")]=-50,n[Ue("0xff")][Ue("0x4a")]=40,n[Ue("0x100")].value=12,n.attack.value=0,n[Ue("0x101")].value=.25,i[Ue("0x102")](n),n[Ue("0x102")](e[Ue("0x103")]),i[Ue("0x104")](0);const r=new Promise((async(t,i)=>{e[Ue("0x105")]=e=>t(e.renderedBuffer);try{await e[Ue("0x106")]()}catch(t){i(t)}})),a=(await r).getChannelData(0)[Ue("0x107")](4500);return je.getHash(a)}async[Ue("0x28")](){var t;const e=window[Ue("0x108")]||window[Ue("0xfa")];if(!e)return{};const i=new e(1,5e3,44100),n=i[Ue("0xfb")]();n[Ue("0xe0")]=Ue("0xfc"),n[Ue("0x109")][Ue("0x4a")]=1e4;const r=i[Ue("0xfd")]();r[Ue("0xfe")][Ue("0x4a")]=-50,r.knee[Ue("0x4a")]=40,r[Ue("0x10a")][Ue("0x4a")]=0;const a=i.createAnalyser();n[Ue("0x102")](r),r[Ue("0x102")](a),r[Ue("0x102")](i[Ue("0x103")]),n[Ue("0x104")](0);try{await i[Ue("0x106")](),r.disconnect(),n[Ue("0x10b")]();const e=new Float32Array(a[Ue("0x10c")]);null===(t=a.getFloatFrequencyData)||void 0===t||t.call(a,e);const s=new Float32Array(a[Ue("0x10d")]);return Ue("0x10e")in a&&a[Ue("0x10e")](s),{gain:r[Ue("0x10f")].value||r[Ue("0x10f")],freq:Ke(e),time:Ke(s)}}catch(t){return{}}}static[Ue("0x110")](t){let e=0;for(let i=0;i<t.length;++i)e+=Math[Ue("0x2")](t[i]);return e}[Ue("0x29")](){const t=Ue("0x111"),e=[Ue("0x112"),Ue("0x113"),Ue("0x114")],i=[Ue("0x115"),Ue("0x116"),Ue("0x117"),Ue("0x118"),Ue("0x119"),"AvantGarde Bk BT",Ue("0x11a"),Ue("0x11b"),"Bitstream Vera Sans Mono","Calibri","Century",Ue("0x11c"),Ue("0x11d"),Ue("0x11e"),"Franklin Gothic",Ue("0x11f"),Ue("0x120"),"GOTHAM",Ue("0x121"),Ue("0x122"),"Haettenschweiler",Ue("0x123"),Ue("0x124"),Ue("0x125"),Ue("0x126"),Ue("0x127"),Ue("0x128"),Ue("0x129"),"Menlo",Ue("0x12a"),"MS Outlook",Ue("0x12b"),Ue("0x12c"),Ue("0x12d"),Ue("0x12e"),Ue("0x12f"),Ue("0x130"),Ue("0x131"),"Minion Pro","Monotype Corsiva","PMingLiU",Ue("0x132"),Ue("0x133"),Ue("0x134"),Ue("0x135"),"SimHei",Ue("0x136"),Ue("0x137"),"TRAJAN PRO",Ue("0x138"),Ue("0x139"),"ZWAdobeF"],n=document[Ue("0x13a")](Ue("0x13b"));n[Ue("0x13c")][Ue("0x13d")]=Ue("0x13e");const r={},a={},s=e=>{const i=document[Ue("0x13a")](Ue("0x13f")),{style:r}=i;return r[Ue("0x140")]=Ue("0x141"),r.top="0",r[Ue("0x142")]="0",r.fontFamily=e,r[Ue("0x143")]=Ue("0x144"),i[Ue("0x145")]=t,n.appendChild(i),i},o=(t,e)=>s("'"+t+"',"+e),c=e[Ue("0xd5")](s),l=(()=>{const t={};for(const n of i)t[n]=e[Ue("0xd5")]((t=>o(n,t)));return t})();document[Ue("0x149")].appendChild(n);try{for(let t=0;t<e.length;t++)r[e[t]]=c[t][Ue("0x147")],a[e[t]]=c[t].offsetHeight;const t=i[Ue("0xc6")]((t=>{return i=l[t],e[Ue("0x146")](((t,e)=>i[e][Ue("0x147")]!==r[t]||i[e][Ue("0x148")]!==a[t]));var i}));return Promise[Ue("0x5e")](t)}finally{document.body[Ue("0x14a")](n)}}[Ue("0x17")](){const t=(new Date)[Ue("0x17")]();return Promise[Ue("0x5e")](t)}[Ue("0x16")](){const t=navigator[Ue("0x14b")];return Promise[Ue("0x5e")](t)}[Ue("0x15")](){const t=navigator[Ue("0xd2")];return Promise[Ue("0x5e")](t)}[Ue("0x13")](){const t=navigator.hardwareConcurrency;return Promise[Ue("0x5e")](t)}[Ue("0x11")](){const t=navigator[Ue("0x14c")];return Promise[Ue("0x5e")](t)}[Ue("0x12")](){return["__webdriver_evaluate","__selenium_evaluate",Ue("0x85"),Ue("0x14d"),Ue("0xc2"),Ue("0x80"),Ue("0xb9"),Ue("0x86"),"__driver_evaluate","__selenium_unwrapped","__fxdriver_unwrapped"][Ue("0xc6")]((t=>document[t]))}[Ue("0x2f")](){const t=Intl[Ue("0x14e")]().resolvedOptions()[Ue("0x14f")];return Promise[Ue("0x5e")](t)}[Ue("0x31")](){const t=navigator[Ue("0x150")];return Promise[Ue("0x5e")](t)}[Ue("0x32")](){const t=navigator[Ue("0x151")];return Promise[Ue("0x5e")](t)}async getCanvasFingerprint(){const t=document[Ue("0x13a")](Ue("0x169"));t[Ue("0xe7")]=1,t[Ue("0xe6")]=1;const e=t[Ue("0x16a")]("2d"),i={winding:function(t){return t[Ue("0x167")](0,0,10,10),t[Ue("0x167")](2,2,6,6),!t[Ue("0x168")](5,5,"evenodd")}(e),geometry:function(t,e){t[Ue("0xe7")]=122,t[Ue("0xe6")]=110,e.globalCompositeOperation=Ue("0x15d");const i=[[Ue("0x15e"),40,40],[Ue("0x15f"),80,40],[Ue("0x160"),60,80]];for(const[t,n,r]of i)e[Ue("0x159")]=t,e[Ue("0x161")](),e[Ue("0x162")](n,r,40,0,2*Math.PI,!0),e[Ue("0x163")](),e[Ue("0x164")]();return e[Ue("0x159")]=Ue("0x165"),e[Ue("0x162")](60,60,60,0,2*Math.PI,!0),e[Ue("0x162")](60,60,20,0,2*Math.PI,!0),e[Ue("0x164")](Ue("0x166")),je[Ue("0xae")](t.toDataURL())}(t,e),text:function(t,e){t.width=240,t[Ue("0xe6")]=60,e[Ue("0x152")]=Ue("0x153"),e.fillStyle=Ue("0x154"),e.fillRect(100,1,62,20),e.fillStyle="#069",e[Ue("0x155")]='11pt "Times New Roman"';const i=Ue("0x156")+String[Ue("0x157")](55357,56835);return e[Ue("0x158")](i,2,15),e[Ue("0x159")]=Ue("0x15a"),e[Ue("0x155")]=Ue("0x15b"),e.fillText(i,4,45),je.hashCodeString(t[Ue("0x15c")]())}(t,e)};return Promise[Ue("0x5e")](i)}async[Ue("0xd")](){const t=await navigator[Ue("0xd")]();return{charging:t[Ue("0x16b")],chargingTime:t[Ue("0x16c")],dischargingTime:t[Ue("0x16d")],level:t[Ue("0x16e")]}}async[Ue("0x16f")](){return!!navigator.brave&&await navigator[Ue("0x170")][Ue("0x171")]()}async getWebGlRenderer(){const t=document.createElement(Ue("0x169")),e=t[Ue("0x16a")]("webgl")||t[Ue("0x16a")](Ue("0x172")),i=e[Ue("0x173")]("WEBGL_debug_renderer_info");return Promise[Ue("0x5e")](e[Ue("0x174")](i[Ue("0x175")]))}async[Ue("0xf")](){const t=document[Ue("0x13a")](Ue("0x176")),e={basic:""===t[Ue("0x177")](Ue("0x178")),advanced:""===t.canPlayType(Ue("0x179"))};return Promise.resolve(e)}async[Ue("0x17a")](){const{publicKey:t,keyIdentifier:e}=await this[Ue("0x17b")][Ue("0x17c")]();return{publicKey:t,keyIdentifier:e}}static[Ue("0x17d")](){return/iPhone|iPad|iPod|Android|MiuiBrowser/i[Ue("0x47")](navigator[Ue("0x17e")])||null!=window[Ue("0xe9")]||window[Ue("0x9d")](Ue("0x17f"))[Ue("0x9e")]}}var Ze,Ve,He=["compress","uncompressed","ALLOW","CHALLENGE","DENY","TRUST"];Ze=He,Ve=474,function(t){for(;--t;)Ze.push(Ze.shift())}(++Ve);var Ge,We,qe,Ye,Je=function(t,e){return He[t-=0]};(We=Ge||(Ge={}))[Je("0x0")]="compressed",We[Je("0x1")]="uncompressed",(Ye=qe||(qe={}))[Je("0x2")]=Je("0x2"),Ye[Je("0x3")]=Je("0x3"),Ye[Je("0x4")]="DENY",Ye[Je("0x5")]="TRUST";var $e,Xe,Qe=["encryptPayload","string","encode","crypto","getRandomValues","subtle","arrayBufferToBase64","stringify","RSA-OAEP","byteLength","fromCharCode","btoa","importPublicKey","importKey","jwk","parse","crypto is not supported","encryptSymKeyBundle","configManager","generateSymKey","generateKey","AES-GCM","encrypt","decrypt"];$e=Qe,Xe=162,function(t){for(;--t;)$e.push($e.shift())}(++Xe);var ti=function(t,e){return Qe[t-=0]};class ei{constructor(t){this[ti("0x0")]=t}[ti("0x1")](){return window.crypto.subtle[ti("0x2")]({name:ti("0x3"),length:256},!0,[ti("0x4"),ti("0x5")])}async[ti("0x6")](t,e){const i=typeof t===ti("0x7")?(new TextEncoder)[ti("0x8")](t):t,n=window[ti("0x9")][ti("0xa")](new Uint8Array(12)),r={name:ti("0x3"),iv:n},a=await window[ti("0x9")][ti("0xb")][ti("0x4")](r,e,i);return{payloadCipherText:this.arrayBufferToBase64(a),iv:n}}async encryptSymKeyBundle(t,e,i){const n=await window[ti("0x9")][ti("0xb")].exportKey("raw",t),r=this[ti("0xc")](n),a=this[ti("0xc")](e),s=(new TextEncoder)[ti("0x8")](JSON[ti("0xd")]({symKey:r,iv:a})),o=await window.crypto[ti("0xb")][ti("0x4")]({name:ti("0xe")},i,s);return this.arrayBufferToBase64(o)}arrayBufferToBase64(t){let e="";const i=new Uint8Array(t),n=i[ti("0xf")];for(let t=0;t<n;t++)e+=String[ti("0x10")](i[t]);return window[ti("0x11")](e)}[ti("0x12")](t){return window.crypto[ti("0xb")][ti("0x13")](ti("0x14"),JSON[ti("0x15")](t),{name:ti("0xe"),hash:"SHA-256"},!0,[ti("0x4")])}async[ti("0x4")](t,e){if(!window[ti("0x9")]||!window[ti("0x9")].subtle)throw new Error(ti("0x16"));const i=await this[ti("0x1")](),{payloadCipherText:n,iv:r}=await this[ti("0x6")](e,i),a=await this[ti("0x12")](t);return{encryptedData:n,encryptedKey:await this[ti("0x17")](i,r,a)}}}var ii,ni,ri=[", errorSpace: ",", errorCode: ","CLIENT","client","server","COMMUNICATION","communication","error","errorCode","message","name","toString","SDKError: ","errorSpace"];ii=ri,ni=436,function(t){for(;--t;)ii.push(ii.shift())}(++ni);var ai,si,oi=function(t,e){return ri[t-=0]};(si=ai||(ai={}))[oi("0x0")]=oi("0x1"),si.SERVER=oi("0x2"),si[oi("0x3")]=oi("0x4");class ci extends Error{constructor(t,e,i){var n,r;super(),this[oi("0x5")]=t,this.errorSpace=e,this[oi("0x6")]=i,this.message=(null===(n=this[oi("0x5")])||void 0===n?void 0:n[oi("0x7")])||this[oi("0x5")].toString(),this[oi("0x8")]=(null===(r=this[oi("0x5")])||void 0===r?void 0:r.name)||ci[oi("0x8")]}[oi("0x9")](){return oi("0xa")+this[oi("0x7")]+(this[oi("0xb")]?oi("0xc")+this[oi("0xb")]:"")+(this[oi("0x6")]?oi("0xd")+this.errorCode:"")}toLog(){return l(l({name:this[oi("0x8")],message:this.message},this[oi("0xb")]&&{errorSpace:this[oi("0xb")]}),this.errorCode&&{errorCode:this[oi("0x6")]})}}var li,xi,di=["name","registerEventListeners","parse","maintainLastXItems","removeItemLocalStorageSafe","ddls","lastDeviceInDeviceEvent","rei","lse","deviceEventDataCollectionIgnoreList","bufferSize","bufferInterval","EVENT_TYPE_ACTION","EVENT_TYPE_IDENTIFICATION","localStoredEventTypes","maxLocalStoredEvents","configManager","storageManager","deviceDataManager","identityManager","cryptoBinding","serverPath","enableSessionToken","flushTimeoutHandle","EVENT_TYPE_INTERACTION","crypto","interactionEventsManager","getConfValue","safeEventCallback","isMobile","maxEventStored","pollingInterval","pollingSessionToken","emitEvent","toString","platform","tabId","getTabId","timestamp","now","enrichUADataIfDoesNotExist","eventTypesToStore","includes","type","addEventToLocalStorage","eventsQueue","push","error","Error while emitting event","getClientId","errorCode","length","min","flush","catch","Error while emitting event (delayed flush)","toLog","Failed to refresh data","isTokenExpired","refreshSessionToken","Failed to polling data","attributes","navigatorHighEntropyData","fetchEventsFromLocalStorage","pop","sort","popAllEvents","clientId","deviceId","getDeviceId","getUserId","sdkPlatform","events","warn","Crypto-binding is not supported. ","sessionToken","buildEncryptedRequestBody","requestsManager","postData","device/events","setDeviceId","setSessionToken","userId","setUserId","refreshConf","Encryption error - missing public key","COMMUNICATION","stringify","encrypt","compress","uncompressed","CLIENT","increaseEventIndex","eventIndex","getItemLocalStorageSafe","parseInt","isNaN","setItemLocalStorageSafe","sendDeviceDataEvent","shouldSendDeviceEvent","info","no need to send device event","getDeviceData","EVENT_TYPE_DEVICE","sendPageLoadEvent","page_load","extractWindowRespurces","location","referrer","performance","resources","isArray","map"];li=di,xi=457,function(t){for(;--t;)li.push(li.shift())}(++xi);var hi=function(t,e){return di[t-=0]};const ui=hi("0x0"),fi=hi("0x1"),gi=hi("0x2"),_i=hi("0x3"),pi=hi("0x4"),wi=hi("0x5"),yi=hi("0x6"),mi=[Wt[hi("0x7")],Wt[hi("0x8")]],vi=hi("0x9"),bi=hi("0xa");class Si{constructor(t,e,i,n,r,a,s,o){this[hi("0xb")]=t,this[hi("0xc")]=e,this[hi("0xd")]=i,this.requestsManager=n,this[hi("0xe")]=r,this[hi("0xf")]=a,this[hi("0x10")]=s,this[hi("0x11")]=o,this.eventIndex=null,this[hi("0x12")]=null,this.safeEventCallback=async(t,e)=>{try{const i=l({},l({interaction_type:t},e)),n={type:Wt[hi("0x13")],attributes:i};return await this.emitEvent(n)}catch(t){}},this[hi("0x11")]=o,this.eventsQueue=[],this[hi("0x14")]=new ei(t),this[hi("0x15")]=new De(this[hi("0xb")][hi("0x16")](pi,[]),this.configManager[hi("0x16")]("mouseEventsCollectionBuffer",100),this[hi("0x17")]),this[hi("0x18")]=je[hi("0x18")](),this.eventTypesToStore=this[hi("0xb")][hi("0x16")](vi,[Wt[hi("0x7")]]),this[hi("0x19")]=this[hi("0xb")][hi("0x16")](bi,4),this[hi("0x1a")]=36e4,this[hi("0x1b")]()}async[hi("0x1c")](t){t.index=this.increaseEventIndex(),t.location=location[hi("0x1d")](),t[hi("0x1e")]=navigator[hi("0x1e")],t.sdkVersion="1.51.0",t[hi("0x10")]=this.serverPath,t[hi("0x1f")]=this[hi("0xe")][hi("0x20")](),t[hi("0x21")]=Date[hi("0x22")](),await this[hi("0x23")](t);let e=0;this[hi("0x24")][hi("0x25")](t[hi("0x26")])?e=this[hi("0x27")](t):this[hi("0x28")][hi("0x29")](t);const i=this[hi("0xb")][hi("0x16")](wi,2);if(this[hi("0x28")].length+e>=i||mi[hi("0x25")](t.type)){this.flushTimeoutHandle&&(clearTimeout(this[hi("0x12")]),this.flushTimeoutHandle=null);try{return await this.flush()}catch(e){throw Nt[hi("0x2a")](hi("0x2b"),{clientId:this.identityManager[hi("0x2c")](),eventType:t.type,error:e[hi("0x2d")]?e.toLog():e}),e}}if(!this.flushTimeoutHandle&&this[hi("0x28")][hi("0x2e")]>0){const e=this[hi("0xb")][hi("0x16")](yi,2),i=Math[hi("0x2f")](e,30);this[hi("0x12")]=setTimeout((()=>{this[hi("0x12")]=null,this[hi("0x30")]()[hi("0x31")]((e=>{Nt[hi("0x2a")](hi("0x32"),{clientId:this.identityManager.getClientId(),eventType:t.type,error:e.errorCode?e[hi("0x33")]():e})}))}),1e3*i)}return{}}async refreshSessionToken(){try{return this.eventsQueue[hi("0x2e")]>0?await this[hi("0x30")]():(await this.sendDeviceDataEvent(!0),await this.flush())}catch(t){Nt[hi("0x2a")](hi("0x34"),{e:t})}}async[hi("0x1b")](){try{this[hi("0xe")][hi("0x35")]()&&await this[hi("0x36")]()}catch(t){Nt[hi("0x2a")](hi("0x37"),{e:t})}finally{setTimeout((async()=>{await this[hi("0x1b")]()}),this[hi("0x1a")])}}async[hi("0x23")](t){var e;if(!(null===(e=t[hi("0x38")])||void 0===e?void 0:e[hi("0x39")]))try{t[hi("0x38")].navigatorHighEntropyData=await Me()}catch(t){}}popAllEvents(){const t=[],e=this[hi("0x3a")]();for(;this[hi("0x28")][hi("0x2e")];)t.push(this[hi("0x28")][hi("0x3b")]());return(null==e?void 0:e[hi("0x2e")])&&t[hi("0x29")](...e),t[hi("0x3c")](((t,e)=>t[hi("0x21")]-e[hi("0x21")]))}async[hi("0x30")](){const t=this[hi("0x3d")]();if(0===t[hi("0x2e")])return{};const e={};e[hi("0x3e")]=this.identityManager[hi("0x2c")](),e[hi("0x3f")]=this[hi("0xe")][hi("0x40")](),e.userId=this[hi("0xe")][hi("0x41")](),e[hi("0x42")]=this.isMobile?"mobile_web":"desktop_web",e[hi("0x43")]=t;try{const{keyIdentifier:t}=await this[hi("0xf")].getPublicData();e.keyIdentifier=t}catch(t){Nt[hi("0x44")](hi("0x45")+t)}this[hi("0x11")]&&(e[hi("0x46")]=!0);const i=await this[hi("0x47")](e),n=await this[hi("0x48")][hi("0x49")](hi("0x4a"),i);return n[hi("0x3f")]&&this[hi("0xe")][hi("0x4b")](n.deviceId),n[hi("0x46")]&&this[hi("0xe")][hi("0x4c")](n.sessionToken),n[hi("0x4d")]&&this[hi("0xe")][hi("0x4e")](n.userId),this.cleanLocalStorageEvents(),n}async[hi("0x47")](t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const i=this.configManager[hi("0x16")]("publicKey",null);if(null===i&&e)return await this[hi("0xb")][hi("0x4f")](this[hi("0xe")][hi("0x2c")]()),await this[hi("0x47")](t);if(null===i)throw new ci(new Error(hi("0x50")),ai[hi("0x51")]);try{const e=JSON[hi("0x52")](t),n=this.compressData(e),r=n||e,{encryptedData:a,encryptedKey:s}=await this[hi("0x14")][hi("0x53")](i,r);return{data:a,key:s,dataType:n?Ge[hi("0x54")]:Ge[hi("0x55")]}}catch(t){throw new ci(t,ai[hi("0x56")])}}compressData(t){try{return yt.gzip(t)}catch(t){Nt[hi("0x2a")]("Failed to compress data, sending the data to the service uncompressed",{clientId:this[hi("0xe")][hi("0x2c")](),error:t})}}[hi("0x57")](){if(null===this[hi("0x58")]){const t=this[hi("0xc")][hi("0x59")](gi),e=Number[hi("0x5a")](t);this[hi("0x58")]=Number[hi("0x5b")](e)?-1:e}return this[hi("0x58")]++,this[hi("0xc")][hi("0x5c")](gi,this[hi("0x58")][hi("0x1d")]()),this[hi("0x58")]}shouldSendDeviceEvent(){const t=this[hi("0xc")].getItemLocalStorageSafe(ui),e=this.storageManager[hi("0x59")](fi);return!t||!e||Date[hi("0x22")]()-t>864e5||e!=this.identityManager[hi("0x40")]()}async[hi("0x5d")](t){if(!t&&!this[hi("0x5e")]())return Nt[hi("0x5f")](hi("0x60")),!1;const e=await this[hi("0xd")][hi("0x61")](),i={type:Wt[hi("0x62")],attributes:e},n=await this[hi("0x1c")](i);return n&&(this[hi("0xc")][hi("0x5c")](ui,Date[hi("0x22")]()),this[hi("0xc")].setItemLocalStorageSafe(fi,this.identityManager[hi("0x40")]())),n}async[hi("0x63")](){const t=hi("0x64");if(this[hi("0xb")].getConfValue(pi,[]).includes(t))return!1;const e=this[hi("0x65")]();return await this[hi("0x1c")]({type:Wt[hi("0x13")],attributes:l(l({interaction_type:t,location:window[hi("0x66")].href,referrer:document[hi("0x67")]},window.history&&{window_historyLength:window.history[hi("0x2e")]}),e&&{windowResources:e})}),!0}extractWindowRespurces(){try{const t=window[hi("0x68")].getEntriesByType(hi("0x69"));return t&&Array[hi("0x6a")](t)?t[hi("0x6b")]((t=>({name:t[hi("0x6c")],initiatorType:t.initiatorType}))):void 0}catch(t){}}[hi("0x6d")](){this[hi("0x15")][hi("0x6d")](),this[hi("0xe")][hi("0x6d")]()}[hi("0x3a")](){const t=this[hi("0xc")][hi("0x59")](_i);return t?JSON[hi("0x6e")](t):[]}[hi("0x27")](t){const e=this[hi("0x3a")]();return te[hi("0x6f")](e,this[hi("0x19")],t),this[hi("0xc")][hi("0x5c")](_i,JSON[hi("0x52")](e)),e[hi("0x2e")]}cleanLocalStorageEvents(){this[hi("0xc")][hi("0x70")](_i)}}var Ei,Ii,Ti=["Invalid JWT:","rui","rdi","rst","userIdStorageExpiry","storageManager","configManager","clientId","load","loadDeviceId","loadTabId","registerEventListeners","addEventListener","beforeunload","saveTabIdOnUnload","getDeviceId","setDeviceId","deviceId","info","Updating DeviceId","setItemSessionStorageSafe","getItemSessionStorageSafe","setClientId","getItemLocalStorageSafe","getConfValue","now","setUserId","userId","setItemLocalStorageSafe","removeUserId","removeItemSessionStorageSafe","removeItemLocalStorageSafe","tabId","floor","random","MAX_SAFE_INTEGER","toString","getTabId","setSessionToken","isTokenExpired","getSessionToken","parse","split","exp","error"];Ei=Ti,Ii=226,function(t){for(;--t;)Ei.push(Ei.shift())}(++Ii);var Di=function(t,e){return Ti[t-=0]};const Ai=Di("0x0"),ki=Di("0x1"),Ci="rdit",Pi="rti",Mi=Di("0x2"),Oi=Di("0x3");class Li{constructor(t,e,i){this[Di("0x4")]=t,this[Di("0x5")]=e,this[Di("0x6")]=i,this.setClientId(this[Di("0x6")])}[Di("0x7")](){this[Di("0x8")](),this[Di("0x9")]()}[Di("0xa")](){window[Di("0xb")](Di("0xc"),(async()=>this[Di("0xd")]()))}[Di("0xe")](){return this.deviceId}[Di("0xf")](t){this[Di("0x10")]!==t&&(Nt[Di("0x11")](Di("0x12"),{deviceId:t}),this.deviceId=t,this[Di("0x4")][Di("0x13")](ki,t),this[Di("0x4")].setItemLocalStorageSafe(ki,t))}[Di("0x8")](){const t=this[Di("0x4")][Di("0x14")](ki)||this[Di("0x4")].getItemLocalStorageSafe(ki);return null!=t&&this[Di("0xf")](t),t}getClientId(){return this[Di("0x6")]}[Di("0x15")](t){this[Di("0x4")].getClientId()!=t&&this[Di("0x4")].setClientId(t),this[Di("0x4")][Di("0x13")]("rci",t)}getUserId(){if(Number(this[Di("0x4")][Di("0x16")](Ci))+this[Di("0x5")][Di("0x17")](Oi,864e5)<Date[Di("0x18")]())return this.removeUserId(),null;const t=this[Di("0x4")].getItemSessionStorageSafe(Ai);return null!=t?t:this[Di("0x4")][Di("0x16")](Ai)}[Di("0x19")](t){this[Di("0x1a")]=t,this[Di("0x4")].setItemSessionStorageSafe(Ai,t),this[Di("0x4")][Di("0x1b")](Ai,t),this[Di("0x4")].setItemLocalStorageSafe(Ci,Date[Di("0x18")]())}[Di("0x1c")](){this.storageManager[Di("0x1d")](Ai),this[Di("0x4")][Di("0x1e")](Ai),this.storageManager[Di("0x1e")](Ci)}loadTabId(){const t=this.storageManager[Di("0x14")](Pi);t?(this[Di("0x4")][Di("0x1d")](Pi),this.tabId=t):this[Di("0x1f")]=Math[Di("0x20")](Math[Di("0x21")]()*Number[Di("0x22")])[Di("0x23")]()}[Di("0x24")](){return this[Di("0x1f")]}[Di("0xd")](){this.storageManager[Di("0x13")](Pi,this[Di("0x1f")])}[Di("0x25")](t){this.storageManager.setItemLocalStorageSafe(Mi,t)}getSessionToken(){return this[Di("0x4")][Di("0x16")](Mi)||this.storageManager[Di("0x14")](Mi)}[Di("0x26")](){var t;const e=this[Di("0x27")]();if(!e)return!0;try{const i=JSON[Di("0x28")](atob(e[Di("0x29")](".")[1]));let n=(null!==(t=i[Di("0x2a")])&&void 0!==t?t:i.iat)*(i.exp&&i[Di("0x2a")]<1e12?1e3:1);return i[Di("0x2a")]||(n+=9e5),Date[Di("0x18")]()>=n}catch(t){return Nt[Di("0x2b")](Di("0x2c"),{error:t}),!0}}}var zi,Ni,Ui=["COMMUNICATION","serverPath","postData","postDataFromURL","include","application/json","stringify","getData","GET","callServer","fetch","fetch-api is not supported","CLIENT","json","SERVER","status","message"];zi=Ui,Ni=154,function(t){for(;--t;)zi.push(zi.shift())}(++Ni);var Ri=function(t,e){return Ui[t-=0]};class Bi{constructor(t){this[Ri("0x0")]=t}async[Ri("0x1")](t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this[Ri("0x2")](this[Ri("0x0")]+t,e,i)}async[Ri("0x2")](t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n={method:"POST",credentials:Ri("0x3"),headers:new Headers(l({"Content-Type":Ri("0x4")},i)),body:JSON[Ri("0x5")](e)};return await this.callServer(t,n)}async[Ri("0x6")](t){const e=this[Ri("0x0")]+t,i={method:Ri("0x7"),credentials:Ri("0x3")};return await this[Ri("0x8")](e,i)}async callServer(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(Ri("0x9")in window))throw new ci(new Error(Ri("0xa")),ai[Ri("0xb")]);try{const i=await fetch(t,e),n=await i[Ri("0xc")]();if(i.ok)return n;throw new ci(new Error(n.message||i.statusText),ai[Ri("0xd")],i[Ri("0xe")])}catch(t){if(!(t instanceof ci))throw new ci(new Error(t[Ri("0xf")]),ai[Ri("0x10")]);throw t}}}var Ki,Fi,ji=["Invalid SDK params was provided: ","REQUIRED_SDK_PARAMS","throwOrReturnResult","logIfInvalid","throwError","filter"];Ki=ji,Fi=403,function(t){for(;--t;)Ki.push(Ki.shift())}(++Fi);var Zi=function(t,e){return ji[t-=0]};class Vi{constructor(){this[Zi("0x0")]={clientId:"string"}}[Zi("0x1")](t,e,i){if(!t&&((null==e?void 0:e[Zi("0x2")])&&Nt.info(i),null==e?void 0:e[Zi("0x3")]))throw new Error(i);return t}validateSDKParams(t,e){const i=Object.keys(this[Zi("0x0")])[Zi("0x4")]((e=>typeof t[e]!=this[Zi("0x0")][e]));return this[Zi("0x1")](0==i.length,e,Zi("0x5")+JSON.stringify(i))}}var Hi,Gi,Wi=["platform","postData","device/logs","requestsManager","identityManager","configManager","lastTimeLogsSent","logMiddleware","push","reportLogs","getConfValue","logsMinimumDelay","length","now","flush","getClientId","floor"];Hi=Wi,Gi=326,function(t){for(;--t;)Hi.push(Hi.shift())}(++Gi);var qi=function(t,e){return Wi[t-=0]};class Yi{constructor(t,e,i){this[qi("0x0")]=t,this[qi("0x1")]=e,this[qi("0x2")]=i,this[qi("0x3")]=0,this[qi("0x4")]=async()=>{try{await this.reportLogs()}catch(t){}},Nt.middlewares[qi("0x5")](this.logMiddleware)}async[qi("0x6")](){if(!this.configManager.getConfValue("enableLogsReporting",!1))return;const t=this[qi("0x2")][qi("0x7")]("logsMinimumBatch",6),e=this[qi("0x2")][qi("0x7")](qi("0x8"),12e4);if(Nt.logs[qi("0x9")]<t||this[qi("0x3")]+e>Date[qi("0xa")]())return;this[qi("0x3")]=Date[qi("0xa")]();const i=Nt[qi("0xb")](),n=this.identityManager[qi("0xc")](),r=Math[qi("0xd")](Date[qi("0xa")]()/1e3),a={sdkVersion:"1.51.0",platform:navigator[qi("0xe")],clientId:n,timestamp:r,logEntries:i};await this.requestsManager[qi("0xf")](qi("0x10"),a)}}var Ji,$i,Xi=["migrateIdentifiers","true","endsWith","device/migrate-identifiers","requestsManager","postDataFromURL","deviceId","rimd","identityManager","storageManager"];Ji=Xi,$i=417,function(t){for(;--t;)Ji.push(Ji.shift())}(++$i);var Qi=function(t,e){return Xi[t-=0]};const tn=Qi("0x0");class en{constructor(t,e,i){this[Qi("0x1")]=t,this.requestsManager=e,this[Qi("0x2")]=i}async[Qi("0x3")](t){if(this[Qi("0x2")].getItemLocalStorageSafe(tn)!=Qi("0x4")){const e=this[Qi("0x1")].getDeviceId(),i=this[Qi("0x1")].getClientId(),n=(t[Qi("0x5")]("/")?t:t+"/")+Qi("0x6"),r=await this[Qi("0x7")][Qi("0x8")](n,{deviceId:e,clientId:i});r[Qi("0x9")]&&r.deviceId==e&&this[Qi("0x2")].setItemLocalStorageSafe(tn,"true")}}}var nn,rn,an=["setAuthenticatedUser","setUser","clearUser","RiskID","TSAccountProtection","dispatchEvent","RiskIDReady","TSAccountProtectionReady","undefined","sdkEnabled","enableIdentifiersMigration","verbose","email","national_id","other","initializationPromise","enableSessionToken","identifiersMigrationEnabled","firstPartyMigrationUrl","validationManager","initializedInstance","SDK already initialized","clientId","options","serverPath","toString","enabled","mainEntry","initialize","storageManager","cryptoBinding","createCryptoBinding","sign","requestsManager","identityManager","configManager","deviceDataManager","load","logsReporter","getConfValue","getSessionToken","Session token is not enabled","now","info","SDK disabled","isTokenExpired","eventsManager","init","userId","refreshConf","getClientId","isSDKDisabled","migrateIdentifiers","sendDeviceDataEvent","catch","updateUserId","registerEventListeners","isInitialized","triggerActionEvent","includes","warn","_error_'invalid action type - ","Invalid claimedUserIdType","invalid_claimed_user_id_type_","EVENT_TYPE_ACTION","correlationId","claimedUserId","publicKey","extensionMetadata","extensionDeviceAttributes","suspiciousSignals","suspiciousContext","downloadFile","uploadFile","transactionData","customAttributes","Unhandled SDK error. recieved eventResponse: ","object","stringify","slice","CLIENT","SERVER","errorSpace","errorCode","message","unexpected_error_","identifyUser","identifyUser called without a valid userid","setUserId","emitEvent","EVENT_TYPE_IDENTIFICATION","deviceId","unidentifiedUser","getUserId","removeUserId"];nn=an,rn=483,function(t){for(;--t;)nn.push(nn.shift())}(++rn);var sn=function(t,e){return an[t-=0]};const on=[null,void 0,sn("0x0"),"",0],cn=sn("0x1"),ln=sn("0x2"),xn=sn("0x3"),dn=[sn("0x4"),"phone_number","account_id","ssn",sn("0x5"),"passport_number","drivers_license_number",sn("0x6")];class hn{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var i;if(this[sn("0x7")]=null,this.isSDKDisabled=!1,this[sn("0x8")]=!1,this[sn("0x9")]=!1,this[sn("0xa")]=null,this[sn("0xb")]=new Vi,hn[sn("0xc")])throw new Error(sn("0xd"));hn[sn("0xc")]=!0;const n="string"==typeof e;this[sn("0xe")]=n?e:t,this[sn("0xf")]=n?{serverPath:t}:e,(i=this[sn("0xf")])[sn("0x10")]||(i[sn("0x10")]="https://collect.riskid.security/"),this.options.serverPath=new URL(this[sn("0xf")][sn("0x10")])[sn("0x11")](),this[sn("0xa")]=this.options.firstPartyMigrationUrl||null,Nt[sn("0x12")]=!!this[sn("0xf")][sn("0x3")],this[sn("0xb")].validateSDKParams(this,{throwError:!0,logIfInvalid:!0})||(this.isSDKDisabled=!0),this[sn("0x15")]=new Ct(this[sn("0xe")]),this[sn("0x16")]=Dt.crypto[sn("0x17")](sn("0x18")),this[sn("0x19")]=new Bi(this[sn("0xf")][sn("0x10")]),this.configManager=new Zt(this.storageManager,this[sn("0x19")]),this[sn("0x1a")]=new Li(this.storageManager,this[sn("0x1b")],this[sn("0xe")]),this[sn("0x1c")]=new Fe(this.storageManager,this[sn("0x1b")],this.cryptoBinding),this[sn("0x1a")][sn("0x1d")](),this.migrationsManager=new en(this.identityManager,this[sn("0x19")],this.storageManager),this[sn("0x8")]=this[sn("0xf")][sn("0x8")]||!1,this.eventsManager=new Si(this[sn("0x1b")],this.storageManager,this[sn("0x1c")],this[sn("0x19")],this[sn("0x1a")],this[sn("0x16")],this[sn("0xf")][sn("0x10")],this[sn("0x8")]),this[sn("0x1e")]=new Yi(this[sn("0x19")],this.identityManager,this.configManager)}get actions(){return this.configManager[sn("0x1f")]("actions",[])}async getActions(){return await this.isInitialized(),this.actions}async[sn("0x20")](){if(!this[sn("0x8")])throw new Error(sn("0x21"));if(!await this.isInitialized()){const t=Date[sn("0x22")]();return Nt[sn("0x23")](sn("0x24")),{actionToken:"disabled_sdk_"+t}}return this[sn("0x1a")][sn("0x25")]()&&await this[sn("0x26")].refreshSessionToken(),this[sn("0x1a")][sn("0x20")]()}async[sn("0x27")](t){const e="object"!=typeof t?t:null==t?void 0:t[sn("0x28")];return Nt[sn("0x23")]("sdk init started"),this[sn("0x7")]=(async()=>(await this[sn("0x1b")][sn("0x29")](this[sn("0x1a")][sn("0x2a")]()),this[sn("0x2b")]=this[sn("0x2b")]||!this[sn("0x1b")][sn("0x1f")](cn,!1),!this[sn("0x2b")]&&(this[sn("0x9")]=this[sn("0x9")]||this[sn("0x1b")].getConfValue(ln,!1),this[sn("0x9")]&&this[sn("0xa")]&&await this.migrationsManager[sn("0x2c")](this[sn("0xa")]),Nt[sn("0x12")]=Nt[sn("0x12")]||!!this[sn("0x1b")][sn("0x1f")](xn,!1),await this[sn("0x26")][sn("0x2d")]()[sn("0x2e")]((()=>{})),await this[sn("0x26")].sendPageLoadEvent().catch((()=>{})),await this[sn("0x2f")](e).catch((()=>{})),this[sn("0x26")][sn("0x30")](),await this[sn("0x26")].flush()[sn("0x2e")]((()=>{})),Nt.info("sdk init done"),!0)))(),await this[sn("0x7")]}async[sn("0x31")](){return null!==this[sn("0x7")]&&await this.initializationPromise}async[sn("0x32")](t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=Date[sn("0x22")]();if(!await this[sn("0x31")]())return Nt[sn("0x23")](sn("0x24")),{actionToken:"disabled_sdk_"+i};if(!this.actions[sn("0x33")](t))return Nt[sn("0x34")]("Invalid action type",{actionType:t}),{actionToken:ai.CLIENT+sn("0x35")+t+"'_"+i};const n=null==e?void 0:e.claimedUserIdType;if(n&&!dn[sn("0x33")](n))return Nt.warn(sn("0x36"),{claimedUserIdType:n}),{actionToken:sn("0x37")+n+"_"+i};let r;this[sn("0x1b")][sn("0x1f")]("enableDeviceAttributesInActions",!1)&&(r=await this.deviceDataManager.getDeviceData());const a=l({type:Wt[sn("0x38")],attributes:l(l(l(l(l(l(l(l(l(l(l(l({action_type:t},(null==e?void 0:e[sn("0x39")])&&{correlation_id:e[sn("0x39")]}),(null==e?void 0:e[sn("0x3a")])&&{claimed_user_id:e[sn("0x3a")]}),n&&{claimed_user_id_type:n}),(null==e?void 0:e[sn("0x3b")])&&{public_key:e.publicKey}),(null==e?void 0:e[sn("0x3c")])&&{extension_metadata:e[sn("0x3c")]}),(null==e?void 0:e[sn("0x3d")])&&{extension_device_attributes:e.extensionDeviceAttributes}),(null==e?void 0:e[sn("0x3e")])&&{suspicious_signals:e[sn("0x3e")]}),(null==e?void 0:e[sn("0x3f")])&&{suspicious_context:e.suspiciousContext}),(null==e?void 0:e.downloadFile)&&{download_file:e[sn("0x40")]}),(null==e?void 0:e.uploadFile)&&{upload_file:e[sn("0x41")]}),(null==e?void 0:e[sn("0x42")])&&{transactionData:e[sn("0x42")]}),r)},(null==e?void 0:e[sn("0x43")])&&{customAttributes:e[sn("0x43")]});try{const t=await this[sn("0x26")].emitEvent(a),{actionToken:e}=t;if(!e)throw new ci(new Error(sn("0x44")+(typeof t==sn("0x45")?JSON[sn("0x46")](t)[sn("0x47")](15):t)),ai[sn("0x48")]);return t}catch(e){return{actionToken:e instanceof ci?e.errorSpace===ai[sn("0x49")]?e[sn("0x4a")]+"_error_"+t+"_"+e[sn("0x4b")]+"_'"+e[sn("0x4c")]+"'_"+i:e[sn("0x4a")]+"_error_"+t+"_'"+e[sn("0x4c")]+"'_"+i:sn("0x4d")+t+"_"+i}}}async[sn("0x4e")](t){return await this[sn("0x31")]()?this.updateUserId(t):(Nt[sn("0x23")](sn("0x24")),!1)}async[sn("0x2f")](t){if(on.includes(t))return Nt.info(sn("0x4f"),{userId:t}),!1;t=t[sn("0x11")](),Nt.info("identifyUser",{userId:t});const e=this[sn("0x1a")].getUserId();return e===t||(this.identityManager[sn("0x50")](t),!!(await this.eventsManager[sn("0x51")]({type:Wt[sn("0x52")],attributes:{previous_user_id:e,user_id:t}}))[sn("0x53")])}async[sn("0x54")](){if(!await this[sn("0x31")]())return Nt[sn("0x23")](sn("0x24")),!1;const t=this[sn("0x1a")][sn("0x55")]();return null!=t&&this[sn("0x1a")][sn("0x56")](),!!(await this[sn("0x26")][sn("0x51")]({type:Wt[sn("0x52")],attributes:{previous_user_id:t}})).deviceId}async[sn("0x57")](t){return await this.identifyUser(t)}async[sn("0x58")](t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return await this[sn("0x57")](t,e)}async[sn("0x59")](){return await this[sn("0x54")]()}}hn[sn("0xc")]=!1,document[sn("0x5c")](new CustomEvent(sn("0x5e")));var un,fn,gn=["flush","events","MODULE_INITIALIZED","moduleMetadata","getInitConfig","init","utils","exceptions","TsError","setUser","setAuthenticatedUser","clearUser","identifyUser","unidentifiedUser","getSessionToken","identityManager","getDeviceId","getClientId","eventsManager"];un=gn,fn=400,function(t){for(;--t;)un.push(un.shift())}(++fn);var _n=function(t,e){return gn[t-=0]};let pn=null;function wn(t){if(!t)throw new(Dt[_n("0x5")][_n("0x6")][_n("0x7")])("not_initialized","tsPlatform not initialized")}Dt[_n("0x0")].on(Dt[_n("0x0")][_n("0x1")],(()=>{const{clientId:t,drs:e}=Dt[_n("0x2")][_n("0x3")](),i=e||{},{enabled:n,userId:r}=i,a=h(i,mt);!1!==n&&(pn=new hn(t,a),pn[_n("0x4")]({userId:r}))}));const yn=function(){return wn(pn),pn.triggerActionEvent(...arguments)},mn=function(){return wn(pn),pn[_n("0x8")](...arguments)},vn=function(){return wn(pn),pn[_n("0x9")](...arguments)},bn=function(){return wn(pn),pn[_n("0xa")](...arguments)},Sn=function(){return wn(pn),pn[_n("0xb")](...arguments)},En=function(){return wn(pn),pn[_n("0xc")](...arguments)},In=function(){return wn(pn),pn.getActions()},Tn=function(){return wn(pn),pn[_n("0xd")]()},Dn={getDeviceId:()=>pn[_n("0xe")][_n("0xf")](),getClientId:()=>pn.identityManager[_n("0x10")](),flush:()=>pn[_n("0x11")][_n("0x12")]()};const An="1.15.0",kn={initialize:s,...Object.freeze({__proto__:null,__internal:Dn,clearUser:bn,getActions:In,getSessionToken:Tn,identifyUser:Sn,setAuthenticatedUser:vn,setUser:mn,triggerActionEvent:yn,unidentifiedUser:En})};export{An as PACKAGE_VERSION,Dn as __internal,bn as clearUser,kn as drs,In as getActions,Tn as getSessionToken,Sn as identifyUser,s as initialize,vn as setAuthenticatedUser,mn as setUser,yn as triggerActionEvent,En as unidentifiedUser};