@ordersune/crm-web-sdk 1.1.0 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/ordersune-crm-web-sdk-1.1.3.tgz +0 -0
- package/dist/src/types/index.d.ts +4 -0
- package/dist/src/web-sdk.d.ts +2 -0
- package/package.json +2 -2
- package/dist/index.d.ts +0 -2
- package/dist/ordersune-crm-web-sdk-1.1.0.tgz +0 -0
- package/dist/types/index.d.ts +0 -85
- package/dist/types/index.js +0 -3
- package/dist/utils/index.d.ts +0 -1
- package/dist/utils/index.js +0 -9
- package/dist/web-sdk.d.ts +0 -51
- package/dist/web-sdk.js +0 -599
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function a0_0x5813(){const _0x277c97=['URL','trim','purchaseBatch','WebSDK','cursor','__esModule','getStoredDeviceId','rgba(0,\x200,\x200,\x200.5)','959850OJYnTZ','position','randomUUID','timezone','keys','messageColor','borderRadius','marginBottom','API\x20key\x20and\x20endpoint\x20are\x20required','none','platform','identify','width','SDK\x20Initialized','14px','default','webOnClickAction','Error\x20processing\x20campaign\x20click:','clearUserData','createElement','batchSize','Failed\x20to\x20detect\x20timezone','Initialization\x20failed','Purchase\x20event\x20queued','logClick','endpoint','click','debug','dismissMessageInSeconds','button1','508818bgLFcg','00000000-0000-0000-0000-000000000000','clockseq','deeplink_into_app','flex','flexDirection','.custom_attributes','dismissMessageAutomatically','_v6','sdkVersion','updateV1State','User\x20ID\x20must\x20be\x20a\x20string','button2','trackCustomAttribute','6ba7b811-9dad-11d1-80b4-00c04fd430c8','DateTimeFormat','attributeQueue','8px','removeItem','Async\x20initialization\x20failed','img','12px','showInAppMessage','set','setItem','×','absolute','9999','border','/analytics/data','batchProcessingInterval','header','purchases','body','now','100px','modal','storeUserProfile','node','eventQueue','fixed','json','marginTop','div','borderColor','parse','src','justifyContent','batchInterval','logInAppMessageClick','Identifying\x20user','addEventListener','140px','UUID\x20byte\x20range\x20','setToken','zIndex','center','getItem','8px\x200\x2024px\x200','nsecs','rng','openWebUrl','defineProperty','backgroundColor','Event\x20name\x20is\x20required\x20and\x20must\x20be\x20a\x20string','unshift','updateV7State','buildCampaignPayload','104WjonGE','22px','trackEvent','500','9897tRUtuy','Invalid\x20UUID','version','catch','deviceId','100%','Batch\x20processing\x20failed','Namespace\x20must\x20be\x20array-like\x20(16\x20iterable\x20integer\x20values,\x200-255)','type','apiKey','2px\x20solid\x20','getStoredUserProfile','maxBatchSize','guestUserId','resolvedOptions','unsafeStringify','onclick','DNS','validate','currentUser','fontWeight','floor','length','pointer','log','v1ToV6','getRandomValues','Batch\x20dispatched\x20successfully:\x20','removeChild','guest_user_','toLowerCase','\x20purchases,\x20','gap','msecs','textAlign','fontSize','color','web','height','undefined','/analytics/clicks','display','storeCustomAttributes','Sending\x20batch\x20to\x20server','maxWidth','object','button','getUserProfile','replace','startBatchProcessing','redirect_to_web_url','random','ceil','OrdersuneCRMWebSDK','NIL','User\x20data\x20cleared,\x20new\x20device\x20ID\x20generated','16858510BRsBIG','{\x22name\x22:\x22@ordersune/crm-web-sdk\x22,\x22version\x22:\x221.1.0\x22,\x22main\x22:\x22dist/index.js\x22,\x22types\x22:\x22dist/index.d.ts\x22,\x22publishConfig\x22:{\x22access\x22:\x22public\x22},\x22scripts\x22:{\x22build\x22:\x22npm\x20run\x20build:bundle\x20&&\x20npm\x20run\x20build:types\x22,\x22build:bundle\x22:\x22webpack\x20--config\x20webpack.config.js\x22,\x22build:types\x22:\x22tsc\x20--emitDeclarationOnly\x20--outDir\x20dist\x22,\x22prepare\x22:\x22npm\x20run\x20build\x20&&\x20husky\x22,\x22release\x22:\x22bash\x20-c\x20\x27read\x20-p\x20\x5c\x22Enter\x20OTP\x20from\x20authenticator:\x20\x5c\x22\x20OTP\x20&&\x20GIT_AUTHOR_NAME=\x5c\x22$(git\x20config\x20user.name)\x5c\x22\x20GIT_AUTHOR_EMAIL=\x5c\x22$(git\x20config\x20user.email)\x5c\x22\x20GIT_COMMITTER_NAME=\x5c\x22$(git\x20config\x20user.name)\x5c\x22\x20GIT_COMMITTER_EMAIL=\x5c\x22$(git\x20config\x20user.email)\x5c\x22\x20NPM_CONFIG_OTP=$OTP\x20semantic-release\x20--no-ci\x27\x22,\x22lint:commit\x22:\x22commitlint\x20--edit\x22},\x22files\x22:[\x22dist\x22,\x22README.md\x22],\x22dependencies\x22:{\x22uuid\x22:\x22^11.0.3\x22},\x22devDependencies\x22:{\x22@commitlint/cli\x22:\x22^20.1.0\x22,\x22@commitlint/config-conventional\x22:\x22^20.0.0\x22,\x22@semantic-release/changelog\x22:\x22^6.0.3\x22,\x22@semantic-release/git\x22:\x22^10.0.1\x22,\x22@semantic-release/npm\x22:\x22^13.1.2\x22,\x22@types/uuid\x22:\x22^9.0.0\x22,\x22husky\x22:\x22^9.1.7\x22,\x22javascript-obfuscator\x22:\x22^4.1.1\x22,\x22semantic-release\x22:\x22^25.0.2\x22,\x22terser-webpack-plugin\x22:\x22^5.3.14\x22,\x22ts-loader\x22:\x22^9.5.4\x22,\x22typescript\x22:\x22^5.0.0\x22,\x22webpack\x22:\x22^5.103.0\x22,\x22webpack-cli\x22:\x22^6.0.1\x22,\x22webpack-obfuscator\x22:\x22^3.5.1\x22}}','push','20px','isProcessingQueue','bind','userAttributes','toString','deviceDetails','stringify','loadCustomAttributes','Failed\x20to\x20send\x20payload\x20to\x20server','initializeDeviceDetails','function','slice','storeDeviceId','POST','application/json','alignItems','600','.current_user','displayInAppMessage','getGuestUserId','.device_id','SDK\x20not\x20fully\x20initialized,\x20waiting\x20for\x20initialization','right','292fqEauO','Random\x20bytes\x20length\x20must\x20be\x20>=\x2016','style','4598478xqBGWC','background','events','margin','20ULsMiR','closeColor','400px','pow','inAppImage','top','16px','padding','processCampaignClick','textContent','toUpperCase','initialize','284295EBjvYA','v6ToV1','stringToBytes','webOnClickValue','HTTP\x20error!\x20status:\x20','exports','seq','column','265937slgLxT','appendChild','string','timestamp','left','forceSend','Attribute\x20name\x20is\x20required\x20and\x20must\x20be\x20a\x20string','requestId','substring','\x20attributes','os.','fill','buildPurchasePayload','hexToColor','queueEvent','MAX','white','_blank','mediaConfig','amd','textColor','processBatch'];a0_0x5813=function(){return _0x277c97;};return a0_0x5813();}function a0_0x33a9(_0x5c1587,_0x17e574){const _0x581320=a0_0x5813();return a0_0x33a9=function(_0x33a96a,_0x486e19){_0x33a96a=_0x33a96a-0x76;let _0x2952d0=_0x581320[_0x33a96a];return _0x2952d0;},a0_0x33a9(_0x5c1587,_0x17e574);}(function(_0x5067d3,_0x54a36){const _0x3cfe8a=a0_0x33a9,_0xd296a1=_0x5067d3();while(!![]){try{const _0x3704a3=parseInt(_0x3cfe8a(0x158))/0x1+-parseInt(_0x3cfe8a(0x8d))/0x2+parseInt(_0x3cfe8a(0xf3))/0x3*(parseInt(_0x3cfe8a(0x145))/0x4)+parseInt(_0x3cfe8a(0x14c))/0x5*(-parseInt(_0x3cfe8a(0xab))/0x6)+parseInt(_0x3cfe8a(0x160))/0x7*(-parseInt(_0x3cfe8a(0xef))/0x8)+-parseInt(_0x3cfe8a(0x148))/0x9+parseInt(_0x3cfe8a(0x12b))/0xa;if(_0x3704a3===_0x54a36)break;else _0xd296a1['push'](_0xd296a1['shift']());}catch(_0x2069a8){_0xd296a1['push'](_0xd296a1['shift']());}}}(a0_0x5813,0x5e7c3),!function webpackUniversalModuleDefinition(_0x315a3d,_0x1463cd){const _0x3427a2=a0_0x33a9;_0x3427a2(0x120)==typeof exports&&_0x3427a2(0x120)==typeof module?module['exports']=_0x1463cd():_0x3427a2(0x138)==typeof define&&define[_0x3427a2(0x82)]?define('OrdersuneCRMWebSDK',[],_0x1463cd):_0x3427a2(0x120)==typeof exports?exports['OrdersuneCRMWebSDK']=_0x1463cd():_0x315a3d[_0x3427a2(0x128)]=_0x1463cd();}(this,()=>((()=>{'use strict';var _0x542268={0xb:(_0x82404e,_0x47e8e3,_0x1f3877)=>{const _0x16bc48=a0_0x33a9;Object[_0x16bc48(0xe9)](_0x47e8e3,'__esModule',{'value':!0x0}),_0x47e8e3[_0x16bc48(0x102)]=void 0x0;const _0x26e679=_0x1f3877(0x2ea),_0x5837df=[];for(let _0x5f5f8c=0x0;_0x5f5f8c<0x100;++_0x5f5f8c)_0x5837df['push']((_0x5f5f8c+0x100)[_0x16bc48(0x132)](0x10)[_0x16bc48(0x139)](0x1));function _0x3a354f(_0x76cbfc,_0x4c0233=0x0){const _0x1e327f=_0x16bc48;return(_0x5837df[_0x76cbfc[_0x4c0233+0x0]]+_0x5837df[_0x76cbfc[_0x4c0233+0x1]]+_0x5837df[_0x76cbfc[_0x4c0233+0x2]]+_0x5837df[_0x76cbfc[_0x4c0233+0x3]]+'-'+_0x5837df[_0x76cbfc[_0x4c0233+0x4]]+_0x5837df[_0x76cbfc[_0x4c0233+0x5]]+'-'+_0x5837df[_0x76cbfc[_0x4c0233+0x6]]+_0x5837df[_0x76cbfc[_0x4c0233+0x7]]+'-'+_0x5837df[_0x76cbfc[_0x4c0233+0x8]]+_0x5837df[_0x76cbfc[_0x4c0233+0x9]]+'-'+_0x5837df[_0x76cbfc[_0x4c0233+0xa]]+_0x5837df[_0x76cbfc[_0x4c0233+0xb]]+_0x5837df[_0x76cbfc[_0x4c0233+0xc]]+_0x5837df[_0x76cbfc[_0x4c0233+0xd]]+_0x5837df[_0x76cbfc[_0x4c0233+0xe]]+_0x5837df[_0x76cbfc[_0x4c0233+0xf]])[_0x1e327f(0x111)]();}_0x47e8e3[_0x16bc48(0x102)]=_0x3a354f,_0x47e8e3[_0x16bc48(0x9c)]=function _0x4e04c6(_0x514a84,_0x3f1506=0x0){const _0x5639d3=_0x3a354f(_0x514a84,_0x3f1506);if(!(0x0,_0x26e679['default'])(_0x5639d3))throw TypeError('Stringified\x20UUID\x20is\x20invalid');return _0x5639d3;};},0xb6:(_0x1b90ed,_0x45acd2,_0x10ee34)=>{const _0x45af49=a0_0x33a9;Object[_0x45af49(0xe9)](_0x45acd2,_0x45af49(0x8a),{'value':!0x0}),_0x45acd2['version']=_0x45acd2[_0x45af49(0x105)]=_0x45acd2['v7']=_0x45acd2['v6ToV1']=_0x45acd2['v6']=_0x45acd2['v5']=_0x45acd2['v4']=_0x45acd2['v3']=_0x45acd2[_0x45af49(0x10c)]=_0x45acd2['v1']=_0x45acd2[_0x45af49(0x134)]=_0x45acd2[_0x45af49(0xd8)]=_0x45acd2['NIL']=_0x45acd2[_0x45af49(0x7e)]=void 0x0;var _0x74dfdb=_0x10ee34(0xc4);Object[_0x45af49(0xe9)](_0x45acd2,_0x45af49(0x7e),{'enumerable':!0x0,'get':function(){return _0x74dfdb['default'];}});var _0x158376=_0x10ee34(0x1d1);Object[_0x45af49(0xe9)](_0x45acd2,_0x45af49(0x129),{'enumerable':!0x0,'get':function(){const _0x13b377=_0x45af49;return _0x158376[_0x13b377(0x9c)];}});var _0x1bfdad=_0x10ee34(0x31d);Object[_0x45af49(0xe9)](_0x45acd2,_0x45af49(0xd8),{'enumerable':!0x0,'get':function(){return _0x1bfdad['default'];}});var _0x1a4196=_0x10ee34(0xb);Object[_0x45af49(0xe9)](_0x45acd2,_0x45af49(0x134),{'enumerable':!0x0,'get':function(){const _0x1fc839=_0x45af49;return _0x1a4196[_0x1fc839(0x9c)];}});var _0x48d0fa=_0x10ee34(0x1a9);Object[_0x45af49(0xe9)](_0x45acd2,'v1',{'enumerable':!0x0,'get':function(){const _0x403091=_0x45af49;return _0x48d0fa[_0x403091(0x9c)];}});var _0x317127=_0x10ee34(0x238);Object[_0x45af49(0xe9)](_0x45acd2,_0x45af49(0x10c),{'enumerable':!0x0,'get':function(){const _0x22c5aa=_0x45af49;return _0x317127[_0x22c5aa(0x9c)];}});var _0x5e441f=_0x10ee34(0x24f);Object[_0x45af49(0xe9)](_0x45acd2,'v3',{'enumerable':!0x0,'get':function(){const _0xe0ad25=_0x45af49;return _0x5e441f[_0xe0ad25(0x9c)];}});var _0x517ade=_0x10ee34(0x11e);Object['defineProperty'](_0x45acd2,'v4',{'enumerable':!0x0,'get':function(){return _0x517ade['default'];}});var _0xb5a6d0=_0x10ee34(0x22d);Object['defineProperty'](_0x45acd2,'v5',{'enumerable':!0x0,'get':function(){return _0xb5a6d0['default'];}});var _0x1c1fa4=_0x10ee34(0x164);Object['defineProperty'](_0x45acd2,'v6',{'enumerable':!0x0,'get':function(){const _0x24b59e=_0x45af49;return _0x1c1fa4[_0x24b59e(0x9c)];}});var _0x51103e=_0x10ee34(0x10c);Object['defineProperty'](_0x45acd2,_0x45af49(0x159),{'enumerable':!0x0,'get':function(){const _0x1c0250=_0x45af49;return _0x51103e[_0x1c0250(0x9c)];}});var _0x1f3aee=_0x10ee34(0x12b);Object[_0x45af49(0xe9)](_0x45acd2,'v7',{'enumerable':!0x0,'get':function(){const _0x14b2aa=_0x45af49;return _0x1f3aee[_0x14b2aa(0x9c)];}});var _0x581ae1=_0x10ee34(0x2ea);Object[_0x45af49(0xe9)](_0x45acd2,_0x45af49(0x105),{'enumerable':!0x0,'get':function(){return _0x581ae1['default'];}});var _0x137cfe=_0x10ee34(0x302);Object['defineProperty'](_0x45acd2,_0x45af49(0xf5),{'enumerable':!0x0,'get':function(){const _0x1d7495=_0x45af49;return _0x137cfe[_0x1d7495(0x9c)];}});},0xc4:(_0x59d570,_0x3c9268)=>{const _0x1ce981=a0_0x33a9;Object[_0x1ce981(0xe9)](_0x3c9268,'__esModule',{'value':!0x0}),_0x3c9268[_0x1ce981(0x9c)]='ffffffff-ffff-ffff-ffff-ffffffffffff';},0x10a:(_0x1b43b9,_0x27ce75)=>{const _0x4401a4=a0_0x33a9;Object[_0x4401a4(0xe9)](_0x27ce75,_0x4401a4(0x8a),{'value':!0x0}),_0x27ce75['log']=void 0x0,_0x27ce75[_0x4401a4(0x10b)]=(_0x2a6ca3,_0xd670ac,..._0x4ccd0e)=>{const _0x10ee0a=_0x4401a4;_0x2a6ca3&&console[_0x10ee0a(0x10b)]('[OrderSune\x20CRM]',_0xd670ac,..._0x4ccd0e);};},0x10c:(_0xbe18a,_0x420652,_0x2dd145)=>{const _0x2ff14b=a0_0x33a9;Object['defineProperty'](_0x420652,'__esModule',{'value':!0x0});const _0x5f5b4=_0x2dd145(0x31d),_0x4fed47=_0x2dd145(0xb);_0x420652[_0x2ff14b(0x9c)]=function _0x2bd34b(_0x44f840){const _0xb4e11e=_0x2ff14b,_0x2f33e2=function _0x2f9d0e(_0x353bce){return Uint8Array['of']((0xf&_0x353bce[0x3])<<0x4|_0x353bce[0x4]>>0x4&0xf,(0xf&_0x353bce[0x4])<<0x4|(0xf0&_0x353bce[0x5])>>0x4,(0xf&_0x353bce[0x5])<<0x4|0xf&_0x353bce[0x6],_0x353bce[0x7],(0xf&_0x353bce[0x1])<<0x4|(0xf0&_0x353bce[0x2])>>0x4,(0xf&_0x353bce[0x2])<<0x4|(0xf0&_0x353bce[0x3])>>0x4,0x10|(0xf0&_0x353bce[0x0])>>0x4,(0xf&_0x353bce[0x0])<<0x4|(0xf0&_0x353bce[0x1])>>0x4,_0x353bce[0x8],_0x353bce[0x9],_0x353bce[0xa],_0x353bce[0xb],_0x353bce[0xc],_0x353bce[0xd],_0x353bce[0xe],_0x353bce[0xf]);}(_0xb4e11e(0x162)==typeof _0x44f840?(0x0,_0x5f5b4[_0xb4e11e(0x9c)])(_0x44f840):_0x44f840);return _0xb4e11e(0x162)==typeof _0x44f840?(0x0,_0x4fed47[_0xb4e11e(0x102)])(_0x2f33e2):_0x2f33e2;};},0x11e:(_0x16dce1,_0x2aab43,_0xfcd9b4)=>{const _0x75ca3d=a0_0x33a9;Object['defineProperty'](_0x2aab43,_0x75ca3d(0x8a),{'value':!0x0});const _0x476be0=_0xfcd9b4(0x30b),_0x145aa3=_0xfcd9b4(0x123),_0x1d5e8d=_0xfcd9b4(0xb);_0x2aab43[_0x75ca3d(0x9c)]=function _0x169825(_0x5a7dd4,_0x189524,_0x4d8872){const _0x26b5d7=_0x75ca3d;if(_0x476be0[_0x26b5d7(0x9c)][_0x26b5d7(0x8f)]&&!_0x189524&&!_0x5a7dd4)return _0x476be0[_0x26b5d7(0x9c)][_0x26b5d7(0x8f)]();const _0x57cfa8=(_0x5a7dd4=_0x5a7dd4||{})['random']??_0x5a7dd4['rng']?.()??(0x0,_0x145aa3[_0x26b5d7(0x9c)])();if(_0x57cfa8[_0x26b5d7(0x109)]<0x10)throw new Error(_0x26b5d7(0x146));if(_0x57cfa8[0x6]=0xf&_0x57cfa8[0x6]|0x40,_0x57cfa8[0x8]=0x3f&_0x57cfa8[0x8]|0x80,_0x189524){if((_0x4d8872=_0x4d8872||0x0)<0x0||_0x4d8872+0x10>_0x189524[_0x26b5d7(0x109)])throw new RangeError(_0x26b5d7(0xe0)+_0x4d8872+':'+(_0x4d8872+0xf)+'\x20is\x20out\x20of\x20buffer\x20bounds');for(let _0xc89453=0x0;_0xc89453<0x10;++_0xc89453)_0x189524[_0x4d8872+_0xc89453]=_0x57cfa8[_0xc89453];return _0x189524;}return(0x0,_0x1d5e8d[_0x26b5d7(0x102)])(_0x57cfa8);};},0x123:(_0x210e00,_0x5e7509)=>{const _0x4448d8=a0_0x33a9;let _0x47a420;Object['defineProperty'](_0x5e7509,_0x4448d8(0x8a),{'value':!0x0});const _0x26f8cc=new Uint8Array(0x10);_0x5e7509[_0x4448d8(0x9c)]=function _0x546e68(){const _0x10acae=_0x4448d8;if(!_0x47a420){if(_0x10acae(0x11a)==typeof crypto||!crypto[_0x10acae(0x10d)])throw new Error('crypto.getRandomValues()\x20not\x20supported.\x20See\x20https://github.com/uuidjs/uuid#getrandomvalues-not-supported');_0x47a420=crypto[_0x10acae(0x10d)][_0x10acae(0x130)](crypto);}return _0x47a420(_0x26f8cc);};},0x12b:(_0xd9d820,_0x11118b,_0x5f02e7)=>{const _0x3495f8=a0_0x33a9;Object['defineProperty'](_0x11118b,_0x3495f8(0x8a),{'value':!0x0}),_0x11118b[_0x3495f8(0xed)]=void 0x0;const _0x102a44=_0x5f02e7(0x123),_0x3bd09e=_0x5f02e7(0xb),_0x2f4250={};function _0x2e7366(_0x36957b,_0xb1bd23,_0x2383b5){const _0x479dcf=_0x3495f8;return _0x36957b['msecs']??=-0x1/0x0,_0x36957b[_0x479dcf(0x15e)]??=0x0,_0xb1bd23>_0x36957b['msecs']?(_0x36957b[_0x479dcf(0x15e)]=_0x2383b5[0x6]<<0x17|_0x2383b5[0x7]<<0x10|_0x2383b5[0x8]<<0x8|_0x2383b5[0x9],_0x36957b[_0x479dcf(0x114)]=_0xb1bd23):(_0x36957b[_0x479dcf(0x15e)]=_0x36957b['seq']+0x1|0x0,0x0===_0x36957b[_0x479dcf(0x15e)]&&_0x36957b[_0x479dcf(0x114)]++),_0x36957b;}function _0x3600a0(_0x5461fc,_0x26c350,_0x1dcf07,_0x436dca,_0x43f2b1=0x0){const _0x2210ce=_0x3495f8;if(_0x5461fc[_0x2210ce(0x109)]<0x10)throw new Error(_0x2210ce(0x146));if(_0x436dca){if(_0x43f2b1<0x0||_0x43f2b1+0x10>_0x436dca[_0x2210ce(0x109)])throw new RangeError(_0x2210ce(0xe0)+_0x43f2b1+':'+(_0x43f2b1+0xf)+'\x20is\x20out\x20of\x20buffer\x20bounds');}else _0x436dca=new Uint8Array(0x10),_0x43f2b1=0x0;return _0x26c350??=Date[_0x2210ce(0xcd)](),_0x1dcf07??=0x7f*_0x5461fc[0x6]<<0x18|_0x5461fc[0x7]<<0x10|_0x5461fc[0x8]<<0x8|_0x5461fc[0x9],_0x436dca[_0x43f2b1++]=_0x26c350/0x10000000000&0xff,_0x436dca[_0x43f2b1++]=_0x26c350/0x100000000&0xff,_0x436dca[_0x43f2b1++]=_0x26c350/0x1000000&0xff,_0x436dca[_0x43f2b1++]=_0x26c350/0x10000&0xff,_0x436dca[_0x43f2b1++]=_0x26c350/0x100&0xff,_0x436dca[_0x43f2b1++]=0xff&_0x26c350,_0x436dca[_0x43f2b1++]=0x70|_0x1dcf07>>>0x1c&0xf,_0x436dca[_0x43f2b1++]=_0x1dcf07>>>0x14&0xff,_0x436dca[_0x43f2b1++]=0x80|_0x1dcf07>>>0xe&0x3f,_0x436dca[_0x43f2b1++]=_0x1dcf07>>>0x6&0xff,_0x436dca[_0x43f2b1++]=_0x1dcf07<<0x2&0xff|0x3&_0x5461fc[0xa],_0x436dca[_0x43f2b1++]=_0x5461fc[0xb],_0x436dca[_0x43f2b1++]=_0x5461fc[0xc],_0x436dca[_0x43f2b1++]=_0x5461fc[0xd],_0x436dca[_0x43f2b1++]=_0x5461fc[0xe],_0x436dca[_0x43f2b1++]=_0x5461fc[0xf],_0x436dca;}_0x11118b[_0x3495f8(0xed)]=_0x2e7366,_0x11118b[_0x3495f8(0x9c)]=function _0xf6bf0c(_0x10ad5d,_0x180f43,_0x42aa7f){const _0x1b1317=_0x3495f8;let _0x324fd7;if(_0x10ad5d)_0x324fd7=_0x3600a0(_0x10ad5d[_0x1b1317(0x126)]??_0x10ad5d['rng']?.()??(0x0,_0x102a44[_0x1b1317(0x9c)])(),_0x10ad5d['msecs'],_0x10ad5d[_0x1b1317(0x15e)],_0x180f43,_0x42aa7f);else{const _0x5b2419=Date[_0x1b1317(0xcd)](),_0x5488af=(0x0,_0x102a44[_0x1b1317(0x9c)])();_0x2e7366(_0x2f4250,_0x5b2419,_0x5488af),_0x324fd7=_0x3600a0(_0x5488af,_0x2f4250[_0x1b1317(0x114)],_0x2f4250['seq'],_0x180f43,_0x42aa7f);}return _0x180f43??(0x0,_0x3bd09e['unsafeStringify'])(_0x324fd7);};},0x14a:_0x4d8be6=>{const _0x45310f=a0_0x33a9;_0x4d8be6[_0x45310f(0x15d)]=JSON[_0x45310f(0xd8)](_0x45310f(0x12c));},0x152:(_0x45d654,_0x16f5b8)=>{const _0x291883=a0_0x33a9;function _0x432477(_0x1a1f11){return 0xe+(_0x1a1f11+0x40>>>0x9<<0x4)+0x1;}function _0x579794(_0x2a3360,_0x1e5001){const _0x552745=(0xffff&_0x2a3360)+(0xffff&_0x1e5001);return(_0x2a3360>>0x10)+(_0x1e5001>>0x10)+(_0x552745>>0x10)<<0x10|0xffff&_0x552745;}function _0x19225f(_0x162f03,_0x4402c0,_0x238bbb,_0x5df370,_0x5247f0,_0x28f191){return _0x579794(function _0x1c4687(_0x5630c3,_0x5eaa23){return _0x5630c3<<_0x5eaa23|_0x5630c3>>>0x20-_0x5eaa23;}(_0x579794(_0x579794(_0x4402c0,_0x162f03),_0x579794(_0x5df370,_0x28f191)),_0x5247f0),_0x238bbb);}function _0x2e30a6(_0x36c8e4,_0x2c6ea0,_0x5abe54,_0x597cc5,_0x1cda0f,_0x28d5ec,_0x1eb20c){return _0x19225f(_0x2c6ea0&_0x5abe54|~_0x2c6ea0&_0x597cc5,_0x36c8e4,_0x2c6ea0,_0x1cda0f,_0x28d5ec,_0x1eb20c);}function _0xc65882(_0x1dd9ed,_0x266517,_0x4cfb59,_0x27c4ec,_0x2f6943,_0x41cb9f,_0x47ff0f){return _0x19225f(_0x266517&_0x27c4ec|_0x4cfb59&~_0x27c4ec,_0x1dd9ed,_0x266517,_0x2f6943,_0x41cb9f,_0x47ff0f);}function _0x34be4c(_0x43cda9,_0x211f1d,_0xe20186,_0x37866c,_0x4bce23,_0x122b3d,_0x4ff10b){return _0x19225f(_0x211f1d^_0xe20186^_0x37866c,_0x43cda9,_0x211f1d,_0x4bce23,_0x122b3d,_0x4ff10b);}function _0x1135f2(_0xb195a1,_0x23ec35,_0x50b772,_0x19f008,_0x5f01ad,_0x2e0885,_0xbe1e1){return _0x19225f(_0x50b772^(_0x23ec35|~_0x19f008),_0xb195a1,_0x23ec35,_0x5f01ad,_0x2e0885,_0xbe1e1);}Object[_0x291883(0xe9)](_0x16f5b8,'__esModule',{'value':!0x0}),_0x16f5b8['default']=function _0xada5fa(_0x20dcb2){return function _0x497b8b(_0x1da3f1){const _0x11cce6=a0_0x33a9,_0x35932b=new Uint8Array(0x4*_0x1da3f1[_0x11cce6(0x109)]);for(let _0x2c0330=0x0;_0x2c0330<0x4*_0x1da3f1[_0x11cce6(0x109)];_0x2c0330++)_0x35932b[_0x2c0330]=_0x1da3f1[_0x2c0330>>0x2]>>>_0x2c0330%0x4*0x8&0xff;return _0x35932b;}(function _0x33a4d4(_0x5bfbfc,_0x471968){const _0x32b21a=a0_0x33a9,_0x454296=new Uint32Array(_0x432477(_0x471968))[_0x32b21a(0x7a)](0x0);_0x454296[_0x32b21a(0xc2)](_0x5bfbfc),_0x454296[_0x471968>>0x5]|=0x80<<_0x471968%0x20,_0x454296[_0x454296[_0x32b21a(0x109)]-0x1]=_0x471968,_0x5bfbfc=_0x454296;let _0x2d3a27=0x67452301,_0x4344bb=-0x10325477,_0x440cf6=-0x67452302,_0x18d16b=0x10325476;for(let _0x399011=0x0;_0x399011<_0x5bfbfc[_0x32b21a(0x109)];_0x399011+=0x10){const _0x4735de=_0x2d3a27,_0x3ef3f4=_0x4344bb,_0x462ad8=_0x440cf6,_0x5ce9eb=_0x18d16b;_0x2d3a27=_0x2e30a6(_0x2d3a27,_0x4344bb,_0x440cf6,_0x18d16b,_0x5bfbfc[_0x399011],0x7,-0x28955b88),_0x18d16b=_0x2e30a6(_0x18d16b,_0x2d3a27,_0x4344bb,_0x440cf6,_0x5bfbfc[_0x399011+0x1],0xc,-0x173848aa),_0x440cf6=_0x2e30a6(_0x440cf6,_0x18d16b,_0x2d3a27,_0x4344bb,_0x5bfbfc[_0x399011+0x2],0x11,0x242070db),_0x4344bb=_0x2e30a6(_0x4344bb,_0x440cf6,_0x18d16b,_0x2d3a27,_0x5bfbfc[_0x399011+0x3],0x16,-0x3e423112),_0x2d3a27=_0x2e30a6(_0x2d3a27,_0x4344bb,_0x440cf6,_0x18d16b,_0x5bfbfc[_0x399011+0x4],0x7,-0xa83f051),_0x18d16b=_0x2e30a6(_0x18d16b,_0x2d3a27,_0x4344bb,_0x440cf6,_0x5bfbfc[_0x399011+0x5],0xc,0x4787c62a),_0x440cf6=_0x2e30a6(_0x440cf6,_0x18d16b,_0x2d3a27,_0x4344bb,_0x5bfbfc[_0x399011+0x6],0x11,-0x57cfb9ed),_0x4344bb=_0x2e30a6(_0x4344bb,_0x440cf6,_0x18d16b,_0x2d3a27,_0x5bfbfc[_0x399011+0x7],0x16,-0x2b96aff),_0x2d3a27=_0x2e30a6(_0x2d3a27,_0x4344bb,_0x440cf6,_0x18d16b,_0x5bfbfc[_0x399011+0x8],0x7,0x698098d8),_0x18d16b=_0x2e30a6(_0x18d16b,_0x2d3a27,_0x4344bb,_0x440cf6,_0x5bfbfc[_0x399011+0x9],0xc,-0x74bb0851),_0x440cf6=_0x2e30a6(_0x440cf6,_0x18d16b,_0x2d3a27,_0x4344bb,_0x5bfbfc[_0x399011+0xa],0x11,-0xa44f),_0x4344bb=_0x2e30a6(_0x4344bb,_0x440cf6,_0x18d16b,_0x2d3a27,_0x5bfbfc[_0x399011+0xb],0x16,-0x76a32842),_0x2d3a27=_0x2e30a6(_0x2d3a27,_0x4344bb,_0x440cf6,_0x18d16b,_0x5bfbfc[_0x399011+0xc],0x7,0x6b901122),_0x18d16b=_0x2e30a6(_0x18d16b,_0x2d3a27,_0x4344bb,_0x440cf6,_0x5bfbfc[_0x399011+0xd],0xc,-0x2678e6d),_0x440cf6=_0x2e30a6(_0x440cf6,_0x18d16b,_0x2d3a27,_0x4344bb,_0x5bfbfc[_0x399011+0xe],0x11,-0x5986bc72),_0x4344bb=_0x2e30a6(_0x4344bb,_0x440cf6,_0x18d16b,_0x2d3a27,_0x5bfbfc[_0x399011+0xf],0x16,0x49b40821),_0x2d3a27=_0xc65882(_0x2d3a27,_0x4344bb,_0x440cf6,_0x18d16b,_0x5bfbfc[_0x399011+0x1],0x5,-0x9e1da9e),_0x18d16b=_0xc65882(_0x18d16b,_0x2d3a27,_0x4344bb,_0x440cf6,_0x5bfbfc[_0x399011+0x6],0x9,-0x3fbf4cc0),_0x440cf6=_0xc65882(_0x440cf6,_0x18d16b,_0x2d3a27,_0x4344bb,_0x5bfbfc[_0x399011+0xb],0xe,0x265e5a51),_0x4344bb=_0xc65882(_0x4344bb,_0x440cf6,_0x18d16b,_0x2d3a27,_0x5bfbfc[_0x399011],0x14,-0x16493856),_0x2d3a27=_0xc65882(_0x2d3a27,_0x4344bb,_0x440cf6,_0x18d16b,_0x5bfbfc[_0x399011+0x5],0x5,-0x29d0efa3),_0x18d16b=_0xc65882(_0x18d16b,_0x2d3a27,_0x4344bb,_0x440cf6,_0x5bfbfc[_0x399011+0xa],0x9,0x2441453),_0x440cf6=_0xc65882(_0x440cf6,_0x18d16b,_0x2d3a27,_0x4344bb,_0x5bfbfc[_0x399011+0xf],0xe,-0x275e197f),_0x4344bb=_0xc65882(_0x4344bb,_0x440cf6,_0x18d16b,_0x2d3a27,_0x5bfbfc[_0x399011+0x4],0x14,-0x182c0438),_0x2d3a27=_0xc65882(_0x2d3a27,_0x4344bb,_0x440cf6,_0x18d16b,_0x5bfbfc[_0x399011+0x9],0x5,0x21e1cde6),_0x18d16b=_0xc65882(_0x18d16b,_0x2d3a27,_0x4344bb,_0x440cf6,_0x5bfbfc[_0x399011+0xe],0x9,-0x3cc8f82a),_0x440cf6=_0xc65882(_0x440cf6,_0x18d16b,_0x2d3a27,_0x4344bb,_0x5bfbfc[_0x399011+0x3],0xe,-0xb2af279),_0x4344bb=_0xc65882(_0x4344bb,_0x440cf6,_0x18d16b,_0x2d3a27,_0x5bfbfc[_0x399011+0x8],0x14,0x455a14ed),_0x2d3a27=_0xc65882(_0x2d3a27,_0x4344bb,_0x440cf6,_0x18d16b,_0x5bfbfc[_0x399011+0xd],0x5,-0x561c16fb),_0x18d16b=_0xc65882(_0x18d16b,_0x2d3a27,_0x4344bb,_0x440cf6,_0x5bfbfc[_0x399011+0x2],0x9,-0x3105c08),_0x440cf6=_0xc65882(_0x440cf6,_0x18d16b,_0x2d3a27,_0x4344bb,_0x5bfbfc[_0x399011+0x7],0xe,0x676f02d9),_0x4344bb=_0xc65882(_0x4344bb,_0x440cf6,_0x18d16b,_0x2d3a27,_0x5bfbfc[_0x399011+0xc],0x14,-0x72d5b376),_0x2d3a27=_0x34be4c(_0x2d3a27,_0x4344bb,_0x440cf6,_0x18d16b,_0x5bfbfc[_0x399011+0x5],0x4,-0x5c6be),_0x18d16b=_0x34be4c(_0x18d16b,_0x2d3a27,_0x4344bb,_0x440cf6,_0x5bfbfc[_0x399011+0x8],0xb,-0x788e097f),_0x440cf6=_0x34be4c(_0x440cf6,_0x18d16b,_0x2d3a27,_0x4344bb,_0x5bfbfc[_0x399011+0xb],0x10,0x6d9d6122),_0x4344bb=_0x34be4c(_0x4344bb,_0x440cf6,_0x18d16b,_0x2d3a27,_0x5bfbfc[_0x399011+0xe],0x17,-0x21ac7f4),_0x2d3a27=_0x34be4c(_0x2d3a27,_0x4344bb,_0x440cf6,_0x18d16b,_0x5bfbfc[_0x399011+0x1],0x4,-0x5b4115bc),_0x18d16b=_0x34be4c(_0x18d16b,_0x2d3a27,_0x4344bb,_0x440cf6,_0x5bfbfc[_0x399011+0x4],0xb,0x4bdecfa9),_0x440cf6=_0x34be4c(_0x440cf6,_0x18d16b,_0x2d3a27,_0x4344bb,_0x5bfbfc[_0x399011+0x7],0x10,-0x944b4a0),_0x4344bb=_0x34be4c(_0x4344bb,_0x440cf6,_0x18d16b,_0x2d3a27,_0x5bfbfc[_0x399011+0xa],0x17,-0x41404390),_0x2d3a27=_0x34be4c(_0x2d3a27,_0x4344bb,_0x440cf6,_0x18d16b,_0x5bfbfc[_0x399011+0xd],0x4,0x289b7ec6),_0x18d16b=_0x34be4c(_0x18d16b,_0x2d3a27,_0x4344bb,_0x440cf6,_0x5bfbfc[_0x399011],0xb,-0x155ed806),_0x440cf6=_0x34be4c(_0x440cf6,_0x18d16b,_0x2d3a27,_0x4344bb,_0x5bfbfc[_0x399011+0x3],0x10,-0x2b10cf7b),_0x4344bb=_0x34be4c(_0x4344bb,_0x440cf6,_0x18d16b,_0x2d3a27,_0x5bfbfc[_0x399011+0x6],0x17,0x4881d05),_0x2d3a27=_0x34be4c(_0x2d3a27,_0x4344bb,_0x440cf6,_0x18d16b,_0x5bfbfc[_0x399011+0x9],0x4,-0x262b2fc7),_0x18d16b=_0x34be4c(_0x18d16b,_0x2d3a27,_0x4344bb,_0x440cf6,_0x5bfbfc[_0x399011+0xc],0xb,-0x1924661b),_0x440cf6=_0x34be4c(_0x440cf6,_0x18d16b,_0x2d3a27,_0x4344bb,_0x5bfbfc[_0x399011+0xf],0x10,0x1fa27cf8),_0x4344bb=_0x34be4c(_0x4344bb,_0x440cf6,_0x18d16b,_0x2d3a27,_0x5bfbfc[_0x399011+0x2],0x17,-0x3b53a99b),_0x2d3a27=_0x1135f2(_0x2d3a27,_0x4344bb,_0x440cf6,_0x18d16b,_0x5bfbfc[_0x399011],0x6,-0xbd6ddbc),_0x18d16b=_0x1135f2(_0x18d16b,_0x2d3a27,_0x4344bb,_0x440cf6,_0x5bfbfc[_0x399011+0x7],0xa,0x432aff97),_0x440cf6=_0x1135f2(_0x440cf6,_0x18d16b,_0x2d3a27,_0x4344bb,_0x5bfbfc[_0x399011+0xe],0xf,-0x546bdc59),_0x4344bb=_0x1135f2(_0x4344bb,_0x440cf6,_0x18d16b,_0x2d3a27,_0x5bfbfc[_0x399011+0x5],0x15,-0x36c5fc7),_0x2d3a27=_0x1135f2(_0x2d3a27,_0x4344bb,_0x440cf6,_0x18d16b,_0x5bfbfc[_0x399011+0xc],0x6,0x655b59c3),_0x18d16b=_0x1135f2(_0x18d16b,_0x2d3a27,_0x4344bb,_0x440cf6,_0x5bfbfc[_0x399011+0x3],0xa,-0x70f3336e),_0x440cf6=_0x1135f2(_0x440cf6,_0x18d16b,_0x2d3a27,_0x4344bb,_0x5bfbfc[_0x399011+0xa],0xf,-0x100b83),_0x4344bb=_0x1135f2(_0x4344bb,_0x440cf6,_0x18d16b,_0x2d3a27,_0x5bfbfc[_0x399011+0x1],0x15,-0x7a7ba22f),_0x2d3a27=_0x1135f2(_0x2d3a27,_0x4344bb,_0x440cf6,_0x18d16b,_0x5bfbfc[_0x399011+0x8],0x6,0x6fa87e4f),_0x18d16b=_0x1135f2(_0x18d16b,_0x2d3a27,_0x4344bb,_0x440cf6,_0x5bfbfc[_0x399011+0xf],0xa,-0x1d31920),_0x440cf6=_0x1135f2(_0x440cf6,_0x18d16b,_0x2d3a27,_0x4344bb,_0x5bfbfc[_0x399011+0x6],0xf,-0x5cfebcec),_0x4344bb=_0x1135f2(_0x4344bb,_0x440cf6,_0x18d16b,_0x2d3a27,_0x5bfbfc[_0x399011+0xd],0x15,0x4e0811a1),_0x2d3a27=_0x1135f2(_0x2d3a27,_0x4344bb,_0x440cf6,_0x18d16b,_0x5bfbfc[_0x399011+0x4],0x6,-0x8ac817e),_0x18d16b=_0x1135f2(_0x18d16b,_0x2d3a27,_0x4344bb,_0x440cf6,_0x5bfbfc[_0x399011+0xb],0xa,-0x42c50dcb),_0x440cf6=_0x1135f2(_0x440cf6,_0x18d16b,_0x2d3a27,_0x4344bb,_0x5bfbfc[_0x399011+0x2],0xf,0x2ad7d2bb),_0x4344bb=_0x1135f2(_0x4344bb,_0x440cf6,_0x18d16b,_0x2d3a27,_0x5bfbfc[_0x399011+0x9],0x15,-0x14792c6f),_0x2d3a27=_0x579794(_0x2d3a27,_0x4735de),_0x4344bb=_0x579794(_0x4344bb,_0x3ef3f4),_0x440cf6=_0x579794(_0x440cf6,_0x462ad8),_0x18d16b=_0x579794(_0x18d16b,_0x5ce9eb);}return Uint32Array['of'](_0x2d3a27,_0x4344bb,_0x440cf6,_0x18d16b);}(function _0x4f40d7(_0x320a35){const _0x393776=a0_0x33a9;if(0x0===_0x320a35[_0x393776(0x109)])return new Uint32Array();const _0x2207ed=new Uint32Array(_0x432477(0x8*_0x320a35[_0x393776(0x109)]))[_0x393776(0x7a)](0x0);for(let _0x503b53=0x0;_0x503b53<_0x320a35['length'];_0x503b53++)_0x2207ed[_0x503b53>>0x2]|=(0xff&_0x320a35[_0x503b53])<<_0x503b53%0x4*0x8;return _0x2207ed;}(_0x20dcb2),0x8*_0x20dcb2['length']));};},0x164:(_0x51cc9b,_0x328dae,_0x4615c3)=>{const _0x180482=a0_0x33a9;Object[_0x180482(0xe9)](_0x328dae,_0x180482(0x8a),{'value':!0x0});const _0x34472f=_0x4615c3(0xb),_0x1f58c1=_0x4615c3(0x1a9),_0xffb314=_0x4615c3(0x238);_0x328dae[_0x180482(0x9c)]=function _0x286aca(_0x1c4580,_0x3321f7,_0xe3e58e){const _0xa8b73f=_0x180482;_0x1c4580??={},_0xe3e58e??=0x0;let _0x21fee0=(0x0,_0x1f58c1[_0xa8b73f(0x9c)])({..._0x1c4580,'_v6':!0x0},new Uint8Array(0x10));if(_0x21fee0=(0x0,_0xffb314[_0xa8b73f(0x9c)])(_0x21fee0),_0x3321f7){for(let _0x47d679=0x0;_0x47d679<0x10;_0x47d679++)_0x3321f7[_0xe3e58e+_0x47d679]=_0x21fee0[_0x47d679];return _0x3321f7;}return(0x0,_0x34472f[_0xa8b73f(0x102)])(_0x21fee0);};},0x1a7:(_0x348975,_0x3dcbb6,_0x1774e7)=>{const _0x353e3b=a0_0x33a9;Object['defineProperty'](_0x3dcbb6,_0x353e3b(0x8a),{'value':!0x0}),_0x3dcbb6['WebSDK']=void 0x0;const _0x23388e=_0x1774e7(0x10a),_0xf35d0e=_0x1774e7(0xb6),_0x17e48f=_0x1774e7(0x14a),_0x4b80ea=_0x353e3b(0x79),_0x20978a=_0x17e48f['version'];_0x3dcbb6['WebSDK']=class WebSDK{constructor(_0x5ce1bb){const _0xb0a8a9=_0x353e3b;var _0x301ad1,_0x106450,_0x7b41e0,_0x3d0955;if(this[_0xb0a8a9(0xff)]=0xa,this[_0xb0a8a9(0xdb)]=0x2710,this[_0xb0a8a9(0xb4)]=_0x20978a,this[_0xb0a8a9(0xd2)]=[],this[_0xb0a8a9(0x87)]=[],this[_0xb0a8a9(0xbb)]={},this[_0xb0a8a9(0x12f)]=!0x1,this[_0xb0a8a9(0x97)]=_0xb0a8a9(0x118),!_0x5ce1bb['apiKey']||!_0x5ce1bb[_0xb0a8a9(0xa6)])throw new Error(_0xb0a8a9(0x95));this[_0xb0a8a9(0xfc)]=_0x5ce1bb[_0xb0a8a9(0xfc)],this[_0xb0a8a9(0xa6)]=_0x5ce1bb['endpoint'],this[_0xb0a8a9(0xa8)]=null!==(_0x301ad1=_0x5ce1bb['debug'])&&void 0x0!==_0x301ad1&&_0x301ad1,this[_0xb0a8a9(0xff)]=null!==(_0x106450=_0x5ce1bb[_0xb0a8a9(0xa1)])&&void 0x0!==_0x106450?_0x106450:0xa,this[_0xb0a8a9(0xdb)]=null!==(_0x7b41e0=_0x5ce1bb[_0xb0a8a9(0xdb)])&&void 0x0!==_0x7b41e0?_0x7b41e0:0x2710,this[_0xb0a8a9(0x97)]=null!==(_0x3d0955=_0x5ce1bb['platform'])&&void 0x0!==_0x3d0955?_0x3d0955:_0xb0a8a9(0x118),this[_0xb0a8a9(0xf7)]=this[_0xb0a8a9(0x8b)]()||(0x0,_0xf35d0e['v4'])(),this[_0xb0a8a9(0x100)]=this[_0xb0a8a9(0x141)](),this[_0xb0a8a9(0x157)]()['catch'](_0x558d86=>{const _0x55ada8=_0xb0a8a9;(0x0,_0x23388e[_0x55ada8(0x10b)])(this[_0x55ada8(0xa8)],_0x55ada8(0xbe),_0x558d86);});}async[_0x353e3b(0x157)](){const _0x3ff8d4=_0x353e3b;try{(0x0,_0x23388e[_0x3ff8d4(0x10b)])(this[_0x3ff8d4(0xa8)],_0x3ff8d4(0x9a)),this[_0x3ff8d4(0x13a)](),await this['initializeDeviceDetails'](),await this[_0x3ff8d4(0x135)]();const _0x2a05f3=this[_0x3ff8d4(0xfe)]();_0x2a05f3?(this[_0x3ff8d4(0x106)]=_0x2a05f3,(0x0,_0x23388e[_0x3ff8d4(0x10b)])(this[_0x3ff8d4(0xa8)],'Loaded\x20user\x20profile',this['currentUser'])):this[_0x3ff8d4(0x98)]('');try{const _0x51aeeb=Intl[_0x3ff8d4(0xba)]()[_0x3ff8d4(0x101)]()['timeZone'];this[_0x3ff8d4(0xb8)](_0x3ff8d4(0x90),_0x51aeeb);}catch(_0x2d4400){(0x0,_0x23388e[_0x3ff8d4(0x10b)])(this[_0x3ff8d4(0xa8)],_0x3ff8d4(0xa2),_0x2d4400);}this[_0x3ff8d4(0x124)](),this[_0x3ff8d4(0xf1)]('app_started',{});}catch(_0x65ae72){throw(0x0,_0x23388e[_0x3ff8d4(0x10b)])(this[_0x3ff8d4(0xa8)],_0x3ff8d4(0xa3),_0x65ae72),_0x65ae72;}}[_0x353e3b(0x98)](_0x48abdf){const _0x11abfe=_0x353e3b;if(_0x11abfe(0x162)!=typeof _0x48abdf)throw new Error(_0x11abfe(0xb6));const _0x2bfbe9=this['getStoredUserProfile']();(null==_0x2bfbe9?void 0x0:_0x2bfbe9['id'])!==_0x48abdf&&((0x0,_0x23388e[_0x11abfe(0x10b)])(this[_0x11abfe(0xa8)],_0x11abfe(0xdd),_0x48abdf),this[_0x11abfe(0x106)]=_0x48abdf?{'id':_0x48abdf,'guestUserId':this[_0x11abfe(0x100)]}:{'id':this[_0x11abfe(0x100)],'guestUserId':this[_0x11abfe(0x100)]},this[_0x11abfe(0xd0)]());}[_0x353e3b(0x9f)](){const _0x356afc=_0x353e3b;this[_0x356afc(0xf7)]=(0x0,_0xf35d0e['v4'])(),this[_0x356afc(0x100)]=this['getGuestUserId'](),this[_0x356afc(0x137)](),this[_0x356afc(0x106)]={'id':this[_0x356afc(0x100)],'guestUserId':this[_0x356afc(0x100)]},this['attributeQueue']={},this[_0x356afc(0xd2)]=[],this[_0x356afc(0x87)]=[],this[_0x356afc(0x13a)](),sessionStorage['setItem'](''+_0x4b80ea+this[_0x356afc(0xfc)]+_0x356afc(0x13f),JSON['stringify'](this['currentUser'])),sessionStorage[_0x356afc(0xbd)](''+_0x4b80ea+this[_0x356afc(0xfc)]+_0x356afc(0xb1)),this[_0x356afc(0xa8)]&&(0x0,_0x23388e[_0x356afc(0x10b)])(this[_0x356afc(0xa8)],_0x356afc(0x12a));}[_0x353e3b(0xf1)](_0x291b8d,_0x3e71ed={},_0x4abc55={}){const _0xd1e904=_0x353e3b;if(!_0x291b8d||_0xd1e904(0x162)!=typeof _0x291b8d)throw new Error(_0xd1e904(0xeb));const _0x47cf40={'deviceId':this[_0xd1e904(0xf7)],'eventName':_0x291b8d,'timestamp':_0x4abc55[_0xd1e904(0x163)]||Date['now'](),'requestId':_0x4abc55[_0xd1e904(0x76)]||(0x0,_0xf35d0e['v4'])(),'properties':_0x3e71ed};this[_0xd1e904(0x7d)](_0x47cf40);}[_0x353e3b(0xe1)](_0x2c5644){const _0x7d23e1=_0x353e3b;this[_0x7d23e1(0x133)]&&(this[_0x7d23e1(0x133)]={...this[_0x7d23e1(0x133)],'pushToken':_0x2c5644});}['trackCustomAttribute'](_0x1c7220,_0x1473ed){const _0x621358=_0x353e3b;if(!_0x1c7220||_0x621358(0x162)!=typeof _0x1c7220)throw new Error(_0x621358(0x166));this[_0x621358(0xbb)]={...this['attributeQueue'],[_0x1c7220]:_0x1473ed},(0x0,_0x23388e['log'])(this['debug'],'Custom\x20attribute\x20queued',_0x1c7220,_0x1473ed),this[_0x621358(0x11d)]();}['logProductPurchase'](_0x564c8e,_0x2981b0,_0xcb6e84,_0x15156a,_0x54ef97,_0x328aa5,_0x5b3c04,_0x5f4c7d){const _0x15776e=_0x353e3b,_0x447dc9=this['buildPurchasePayload']({'externalId':_0x564c8e,'itemId':_0x2981b0,'itemName':_0xcb6e84,'unitPrice':_0x15156a,'quantity':_0x54ef97,'source':_0x328aa5,'channel':_0x5b3c04,'itemCategory':_0x5f4c7d});this[_0x15776e(0x87)][_0x15776e(0x12d)](_0x447dc9),this[_0x15776e(0xa8)]&&(0x0,_0x23388e[_0x15776e(0x10b)])(this[_0x15776e(0xa8)],_0x15776e(0xa4),_0x447dc9);}[_0x353e3b(0x122)](){const _0x4be3cb=_0x353e3b;return this[_0x4be3cb(0x106)];}async[_0x353e3b(0x165)](){const _0x2ff567=_0x353e3b;(this[_0x2ff567(0xd2)][_0x2ff567(0x109)]>0x0||this['purchaseBatch'][_0x2ff567(0x109)]>0x0||this[_0x2ff567(0xbb)][_0x2ff567(0x109)]>0x0)&&await this[_0x2ff567(0x84)]();}['dispose'](){const _0x38b2ea=_0x353e3b;this[_0x38b2ea(0xc9)]&&clearInterval(this['batchProcessingInterval']),(this[_0x38b2ea(0xd2)]['length']>0x0||this[_0x38b2ea(0x87)]['length']>0x0||this['attributeQueue'][_0x38b2ea(0x109)]>0x0)&&this[_0x38b2ea(0x84)]()[_0x38b2ea(0xf6)](_0x2df100=>{const _0xd4bca4=_0x38b2ea;(0x0,_0x23388e[_0xd4bca4(0x10b)])(this[_0xd4bca4(0xa8)],'Error\x20during\x20disposal',_0x2df100);});}[_0x353e3b(0x8b)](){const _0x4e1438=_0x353e3b;return sessionStorage[_0x4e1438(0xe4)](''+_0x4b80ea+this[_0x4e1438(0xfc)]+_0x4e1438(0x142));}['getStoredUserProfile'](){const _0x2b617d=_0x353e3b,_0x2f608d=sessionStorage[_0x2b617d(0xe4)](''+_0x4b80ea+this[_0x2b617d(0xfc)]+_0x2b617d(0x13f));return _0x2f608d?JSON['parse'](_0x2f608d):null;}[_0x353e3b(0x13a)](){const _0x5ccfff=_0x353e3b;sessionStorage[_0x5ccfff(0xc3)](''+_0x4b80ea+this['apiKey']+_0x5ccfff(0x142),this['deviceId']);}[_0x353e3b(0xd0)](){const _0xc18fa4=_0x353e3b;this['currentUser']&&sessionStorage['setItem'](''+_0x4b80ea+this[_0xc18fa4(0xfc)]+_0xc18fa4(0x13f),JSON[_0xc18fa4(0x134)](this['currentUser']));}[_0x353e3b(0x11d)](){const _0x3c141b=_0x353e3b,_0x2bf09=sessionStorage[_0x3c141b(0xe4)](''+_0x4b80ea+this[_0x3c141b(0xfc)]+_0x3c141b(0xb1)),_0x16d495={..._0x2bf09?JSON[_0x3c141b(0xd8)](_0x2bf09):{},...this[_0x3c141b(0xbb)]};sessionStorage[_0x3c141b(0xc3)](''+_0x4b80ea+this[_0x3c141b(0xfc)]+_0x3c141b(0xb1),JSON['stringify'](_0x16d495));}async['loadCustomAttributes'](){const _0x587ac6=_0x353e3b,_0x43378c=sessionStorage[_0x587ac6(0xe4)](''+_0x4b80ea+this['apiKey']+'.custom_attributes');_0x43378c&&(this[_0x587ac6(0xbb)]={...this[_0x587ac6(0xbb)],...JSON['parse'](_0x43378c)});}['getGuestUserId'](){const _0x54fd53=_0x353e3b;return _0x54fd53(0x110)+this['deviceId'];}[_0x353e3b(0x7b)]({externalId:_0xf61016,itemId:_0x321170,itemName:_0x3ee0ca,unitPrice:_0x4a7cc8,quantity:_0x525f83,source:_0x43b32f,channel:_0x45d2e8,itemCategory:_0x49676b}){const _0x4769bc=_0x353e3b;return{'external_id':_0xf61016,'item_id':_0x321170,'item_name':_0x3ee0ca,'item_category':_0x49676b,'quantity':_0x525f83,'unit_price':_0x4a7cc8,'total_price':_0x4a7cc8*_0x525f83,'source':_0x43b32f,'channel':_0x45d2e8,'purchased_at':Date[_0x4769bc(0xcd)]()};}async['initializeDeviceDetails'](){const _0x4f9ae1=_0x353e3b;this[_0x4f9ae1(0x133)]={'deviceId':this[_0x4f9ae1(0xf7)],'platform':this[_0x4f9ae1(0x97)]};}['startBatchProcessing'](){const _0x295ee4=_0x353e3b;this[_0x295ee4(0xc9)]=setInterval(()=>{const _0x1ca532=_0x295ee4;(this[_0x1ca532(0xd2)][_0x1ca532(0x109)]>0x0||this[_0x1ca532(0x87)][_0x1ca532(0x109)]>0x0||this[_0x1ca532(0xbb)][_0x1ca532(0x109)]>0x0)&&this['processBatch']()[_0x1ca532(0xf6)](_0x5d7300=>{const _0x5e6bb8=_0x1ca532;(0x0,_0x23388e[_0x5e6bb8(0x10b)])(this['debug'],'Batch\x20processing\x20failed',_0x5d7300);});},this[_0x295ee4(0xdb)]);}[_0x353e3b(0x7d)](_0x1065aa){const _0x57bdb3=_0x353e3b;this[_0x57bdb3(0xd2)][_0x57bdb3(0x12d)](_0x1065aa),(0x0,_0x23388e['log'])(this[_0x57bdb3(0xa8)],'Event\x20queued',_0x1065aa),this[_0x57bdb3(0xd2)]['length']>=this['maxBatchSize']&&this[_0x57bdb3(0x84)]()[_0x57bdb3(0xf6)](_0x437193=>{const _0x42f2c9=_0x57bdb3;(0x0,_0x23388e[_0x42f2c9(0x10b)])(this[_0x42f2c9(0xa8)],_0x42f2c9(0xf9),_0x437193);});}async[_0x353e3b(0x84)](){const _0xfc2a84=_0x353e3b;if(this[_0xfc2a84(0x12f)])return;this[_0xfc2a84(0x12f)]=!0x0;const _0x5b18a2=[...this['eventQueue']],_0x31b9b3=[...this['purchaseBatch']],_0x170eb7={...this[_0xfc2a84(0xbb)]};this['eventQueue']=[],this[_0xfc2a84(0x87)]=[],this[_0xfc2a84(0xbb)]={};try{await this['sendBatchToServer'](_0x5b18a2,_0x31b9b3,_0x170eb7);}catch(_0x2eaed0){throw this['eventQueue'][_0xfc2a84(0xec)](..._0x5b18a2),this[_0xfc2a84(0x87)][_0xfc2a84(0xec)](..._0x31b9b3),this[_0xfc2a84(0xbb)]={...this[_0xfc2a84(0xbb)],..._0x170eb7},(0x0,_0x23388e[_0xfc2a84(0x10b)])(this[_0xfc2a84(0xa8)],_0xfc2a84(0xf9),_0x2eaed0),_0x2eaed0;}finally{this[_0xfc2a84(0x12f)]=!0x1;}}async['sendBatchToServer'](_0x1606d5,_0x1e94dc,_0x6a72a){const _0x3e74f8=_0x353e3b;var _0x1109cc,_0x142bfe;this[_0x3e74f8(0x133)]||await this[_0x3e74f8(0x137)]();const _0x3ca68d={'sdkVersion':this['sdkVersion'],'deviceInfo':this[_0x3e74f8(0x133)],'userId':null===(_0x1109cc=this[_0x3e74f8(0x106)])||void 0x0===_0x1109cc?void 0x0:_0x1109cc['id'],'guestUserId':null===(_0x142bfe=this[_0x3e74f8(0x106)])||void 0x0===_0x142bfe?void 0x0:_0x142bfe[_0x3e74f8(0x100)],'time':Date[_0x3e74f8(0xcd)](),'events':_0x1606d5,'purchases':_0x1e94dc,'userAttributes':_0x6a72a};(0x0,_0x23388e[_0x3e74f8(0x10b)])(this['debug'],_0x3e74f8(0x11e),_0x3ca68d);try{const _0x5ac6d4=await fetch(this['endpoint']+_0x3e74f8(0xc8),{'method':_0x3e74f8(0x13b),'headers':{'Content-Type':_0x3e74f8(0x13c),'x-api-key':this['apiKey']},'body':JSON['stringify'](_0x3ca68d)});if(!_0x5ac6d4['ok'])throw new Error(_0x3e74f8(0x15c)+_0x5ac6d4['status']);this['debug']&&(0x0,_0x23388e[_0x3e74f8(0x10b)])(this[_0x3e74f8(0xa8)],_0x3e74f8(0x10e)+_0x3ca68d[_0x3e74f8(0x14a)]['length']+'\x20events,\x20'+_0x3ca68d[_0x3e74f8(0xcb)][_0x3e74f8(0x109)]+_0x3e74f8(0x112)+Object[_0x3e74f8(0x91)](_0x3ca68d[_0x3e74f8(0x131)])['length']+_0x3e74f8(0x78)),await _0x5ac6d4[_0x3e74f8(0xd4)](),Object['keys'](_0x6a72a)[_0x3e74f8(0x109)]>0x0&&(this[_0x3e74f8(0xbb)]={},sessionStorage[_0x3e74f8(0xbd)](''+_0x4b80ea+this['apiKey']+_0x3e74f8(0xb1)));}catch(_0x418c82){throw(0x0,_0x23388e[_0x3e74f8(0x10b)])(this['debug'],_0x3e74f8(0x136),_0x418c82),_0x418c82;}}[_0x353e3b(0x140)](_0x23bc23,_0x2150e5,_0x4428b9){const _0x2bccca=_0x353e3b,_0x977098=JSON[_0x2bccca(0xd8)](_0x23bc23),_0x36e2=_0x977098[_0x2bccca(0xca)],_0x4a3c23=_0x977098['message'],_0x981228=_0x977098['modal'][_0x2bccca(0xaa)],_0x6f10e7=_0x977098['modal'][_0x2bccca(0xb7)],_0x36d15b=_0x981228['type']||'',_0x406b21=_0x6f10e7[_0x2bccca(0xfb)]||'',_0x1b685b=_0x977098[_0x2bccca(0x81)][_0x2bccca(0x150)];this[_0x2bccca(0xc1)]({'context':_0x4428b9,'title':_0x36e2,'body':_0x4a3c23,'primaryButtonText':_0x36d15b,'secondaryButtonText':_0x406b21,'imageUrl':_0x1b685b,'buttonPropertiesPrimary':_0x981228,'buttonPropertiesSecondary':_0x6f10e7,'dismissMessageAutomatically':_0x977098[_0x2bccca(0xcf)][_0x2bccca(0xb2)],'dismissMessageInSeconds':_0x977098[_0x2bccca(0xcf)][_0x2bccca(0xa9)],'headerColor':_0x977098[_0x2bccca(0xcf)]['headerColor'],'messageColor':_0x977098[_0x2bccca(0xcf)][_0x2bccca(0x92)],'closeColor':_0x977098[_0x2bccca(0xcf)][_0x2bccca(0x14d)],'campaignId':_0x2150e5});}[_0x353e3b(0x7c)](_0x5d9f19){const _0xe70e0f=_0x353e3b;return 0x6===(_0x5d9f19=_0x5d9f19[_0xe70e0f(0x156)]()[_0xe70e0f(0x123)]('#',''))[_0xe70e0f(0x109)]?'#'+_0x5d9f19:'#'+_0x5d9f19[_0xe70e0f(0x77)](0x2);}[_0x353e3b(0xe8)](_0x1df576){const _0x16773f=_0x353e3b;_0x1df576&&window['open'](_0x1df576,_0x16773f(0x80));}[_0x353e3b(0xc1)](_0x4dfc3e){const _0x586c89=_0x353e3b,{title:_0x2aed9f,body:_0x2d2881,primaryButtonText:_0x2c7035,secondaryButtonText:_0x29519e,imageUrl:_0x2fbf37,onClose:_0x52d5fa,buttonPropertiesPrimary:_0x223237,buttonPropertiesSecondary:_0x5f182b,dismissMessageAutomatically:_0x5e790f,dismissMessageInSeconds:_0x3d22b1,headerColor:_0x236d64,messageColor:_0x299302,closeColor:_0x4ffabd,campaignId:_0x7620dc}=_0x4dfc3e,_0x440a7a=document['createElement'](_0x586c89(0xd6));_0x440a7a['style'][_0x586c89(0x8e)]=_0x586c89(0xd3),_0x440a7a[_0x586c89(0x147)][_0x586c89(0x151)]='0',_0x440a7a[_0x586c89(0x147)][_0x586c89(0x164)]='0',_0x440a7a['style'][_0x586c89(0x99)]='100%',_0x440a7a[_0x586c89(0x147)][_0x586c89(0x119)]=_0x586c89(0xf8),_0x440a7a[_0x586c89(0x147)][_0x586c89(0xea)]=_0x586c89(0x8c),_0x440a7a['style'][_0x586c89(0x11c)]='flex',_0x440a7a[_0x586c89(0x147)][_0x586c89(0xda)]='center',_0x440a7a[_0x586c89(0x147)][_0x586c89(0x13d)]=_0x586c89(0xe3),_0x440a7a[_0x586c89(0x147)][_0x586c89(0xe2)]=_0x586c89(0xc6);const _0x1757c5=document[_0x586c89(0xa0)](_0x586c89(0xd6));_0x1757c5[_0x586c89(0x147)][_0x586c89(0xea)]=_0x586c89(0x7f),_0x1757c5[_0x586c89(0x147)][_0x586c89(0x93)]=_0x586c89(0xc0),_0x1757c5['style']['padding']='16px',_0x1757c5[_0x586c89(0x147)][_0x586c89(0x11f)]=_0x586c89(0x14e),_0x1757c5['style']['width']='90%',_0x1757c5['style']['boxShadow']='0\x204px\x206px\x20rgba(0,\x200,\x200,\x200.1)',_0x1757c5[_0x586c89(0x147)][_0x586c89(0x8e)]='relative';const _0x3d4a53=document[_0x586c89(0xa0)](_0x586c89(0x121));_0x3d4a53['innerHTML']=_0x586c89(0xc4),_0x3d4a53[_0x586c89(0x147)][_0x586c89(0x8e)]=_0x586c89(0xc5),_0x3d4a53['style'][_0x586c89(0x151)]=_0x586c89(0xbc),_0x3d4a53[_0x586c89(0x147)][_0x586c89(0x144)]=_0x586c89(0xbc),_0x3d4a53[_0x586c89(0x147)][_0x586c89(0x149)]=_0x586c89(0x96),_0x3d4a53[_0x586c89(0x147)][_0x586c89(0xc7)]=_0x586c89(0x96),_0x3d4a53[_0x586c89(0x147)]['fontSize']=_0x586c89(0x12e),_0x3d4a53['style']['cursor']=_0x586c89(0x10a),_0x3d4a53[_0x586c89(0x147)][_0x586c89(0x117)]=this[_0x586c89(0x7c)](_0x4ffabd),_0x3d4a53['onclick']=()=>{const _0x4bfc87=_0x586c89;_0x52d5fa&&_0x52d5fa(),this[_0x4bfc87(0xdc)](_0x7620dc,!0x1,!0x0,!0x0),document[_0x4bfc87(0xcc)][_0x4bfc87(0x10f)](_0x440a7a);};const _0x5f1cfd=document[_0x586c89(0xa0)]('div');if(_0x5f1cfd[_0x586c89(0x147)][_0x586c89(0x11c)]=_0x586c89(0xaf),_0x5f1cfd['style'][_0x586c89(0xb0)]=_0x586c89(0x15f),_0x5f1cfd[_0x586c89(0x147)][_0x586c89(0x13d)]=_0x586c89(0xe3),_0x5f1cfd['style'][_0x586c89(0x115)]=_0x586c89(0xe3),_0x2fbf37&&''!==_0x2fbf37[_0x586c89(0x86)]()){const _0x59f370=document[_0x586c89(0xa0)](_0x586c89(0xbf));_0x59f370[_0x586c89(0xd9)]=_0x2fbf37,_0x59f370[_0x586c89(0x147)]['width']=_0x586c89(0xce),_0x59f370[_0x586c89(0x147)][_0x586c89(0x119)]=_0x586c89(0xce),_0x59f370[_0x586c89(0x147)][_0x586c89(0x94)]='16px',_0x59f370[_0x586c89(0x147)][_0x586c89(0xd5)]='16px',_0x59f370['onerror']=()=>{const _0x4cae71=_0x586c89;_0x59f370[_0x4cae71(0x147)][_0x4cae71(0x11c)]=_0x4cae71(0x96);},_0x5f1cfd[_0x586c89(0x161)](_0x59f370);}const _0x39e51d=document[_0x586c89(0xa0)]('h2');_0x39e51d[_0x586c89(0x155)]=_0x2aed9f,_0x39e51d['style'][_0x586c89(0x116)]=_0x586c89(0xf0),_0x39e51d[_0x586c89(0x147)][_0x586c89(0x107)]=_0x586c89(0x13e),_0x39e51d[_0x586c89(0x147)]['color']=this['hexToColor'](_0x236d64),_0x39e51d[_0x586c89(0x147)][_0x586c89(0x14b)]='8px\x200',_0x5f1cfd[_0x586c89(0x161)](_0x39e51d);const _0x6657d2=document[_0x586c89(0xa0)]('p');_0x6657d2['textContent']=_0x2d2881,_0x6657d2[_0x586c89(0x147)][_0x586c89(0x116)]=_0x586c89(0x9b),_0x6657d2['style'][_0x586c89(0x117)]=this[_0x586c89(0x7c)](_0x299302),_0x6657d2[_0x586c89(0x147)][_0x586c89(0x107)]=_0x586c89(0xf2),_0x6657d2['style'][_0x586c89(0x14b)]=_0x586c89(0xe5),_0x5f1cfd[_0x586c89(0x161)](_0x6657d2);const _0x371b94=()=>{const _0x1d74f5=_0x586c89;_0x1d74f5(0x125)!==_0x223237[_0x1d74f5(0x15b)]&&'deeplink_into_app'!==_0x223237[_0x1d74f5(0x15b)]||this['openWebUrl'](_0x223237[_0x1d74f5(0x9d)]||'');},_0x5c8b11=()=>{const _0x25e80c=_0x586c89;_0x25e80c(0x125)!==_0x5f182b[_0x25e80c(0x15b)]&&_0x25e80c(0xae)!==_0x5f182b[_0x25e80c(0x15b)]||this[_0x25e80c(0xe8)](_0x5f182b[_0x25e80c(0x9d)]||'');},_0x10608d=document[_0x586c89(0xa0)](_0x586c89(0xd6));if(_0x10608d[_0x586c89(0x147)][_0x586c89(0x11c)]=_0x586c89(0xaf),_0x10608d[_0x586c89(0x147)][_0x586c89(0xda)]=_0x586c89(0xe3),_0x10608d[_0x586c89(0x147)][_0x586c89(0x99)]=_0x586c89(0xf8),_0x10608d[_0x586c89(0x147)][_0x586c89(0x113)]=_0x586c89(0x152),_0x29519e&&''!==_0x29519e[_0x586c89(0x86)]()){const _0x48ed39=document[_0x586c89(0xa0)](_0x586c89(0x121));_0x48ed39[_0x586c89(0x155)]=_0x2c7035,_0x48ed39[_0x586c89(0x147)][_0x586c89(0xaf)]='1',_0x48ed39[_0x586c89(0x147)][_0x586c89(0x11f)]=_0x586c89(0xdf),_0x48ed39[_0x586c89(0x147)][_0x586c89(0x153)]='12px',_0x48ed39[_0x586c89(0x147)][_0x586c89(0xea)]=this[_0x586c89(0x7c)](_0x223237[_0x586c89(0xea)]),_0x48ed39['style'][_0x586c89(0x117)]=this['hexToColor'](_0x223237[_0x586c89(0x83)]),_0x48ed39['style']['border']='2px\x20solid\x20'+this[_0x586c89(0x7c)](_0x223237[_0x586c89(0xd7)]),_0x48ed39[_0x586c89(0x147)][_0x586c89(0x93)]=_0x586c89(0xbc),_0x48ed39[_0x586c89(0x147)][_0x586c89(0x116)]=_0x586c89(0x152),_0x48ed39[_0x586c89(0x147)][_0x586c89(0x107)]=_0x586c89(0x13e),_0x48ed39[_0x586c89(0x147)]['cursor']='pointer',_0x48ed39['onclick']=()=>{const _0xbcdfbe=_0x586c89;document[_0xbcdfbe(0xcc)]['removeChild'](_0x440a7a),_0x371b94();},_0x10608d['appendChild'](_0x48ed39);const _0x4fda79=document['createElement'](_0x586c89(0x121));_0x4fda79['textContent']=_0x29519e,_0x4fda79[_0x586c89(0x147)][_0x586c89(0xaf)]='1',_0x4fda79[_0x586c89(0x147)][_0x586c89(0x11f)]='140px',_0x4fda79[_0x586c89(0x147)][_0x586c89(0x153)]='12px',_0x4fda79[_0x586c89(0x147)][_0x586c89(0xea)]=this['hexToColor'](_0x5f182b[_0x586c89(0xea)]),_0x4fda79['style'][_0x586c89(0x117)]=this['hexToColor'](_0x5f182b[_0x586c89(0x83)]),_0x4fda79[_0x586c89(0x147)]['border']='2px\x20solid\x20'+this['hexToColor'](_0x5f182b[_0x586c89(0xd7)]),_0x4fda79[_0x586c89(0x147)][_0x586c89(0x93)]=_0x586c89(0xbc),_0x4fda79[_0x586c89(0x147)]['fontSize']=_0x586c89(0x152),_0x4fda79['style']['fontWeight']=_0x586c89(0x13e),_0x4fda79[_0x586c89(0x147)][_0x586c89(0x89)]=_0x586c89(0x10a),_0x4fda79[_0x586c89(0x103)]=()=>{const _0x1d03a1=_0x586c89;document['body']['removeChild'](_0x440a7a),this[_0x1d03a1(0xdc)](_0x7620dc,!0x0,!0x0,!0x1),_0x5c8b11();},_0x10608d[_0x586c89(0x161)](_0x4fda79);}else{if(_0x2c7035&&''!==_0x2c7035['trim']()){const _0x2ed2b4=document[_0x586c89(0xa0)]('button');_0x2ed2b4[_0x586c89(0x155)]=_0x2c7035,_0x2ed2b4[_0x586c89(0x147)][_0x586c89(0x99)]=_0x586c89(0xf8),_0x2ed2b4['style'][_0x586c89(0x153)]='12px',_0x2ed2b4['style'][_0x586c89(0xea)]=this['hexToColor'](_0x223237[_0x586c89(0xea)]),_0x2ed2b4[_0x586c89(0x147)][_0x586c89(0x117)]=this[_0x586c89(0x7c)](_0x223237['textColor']),_0x2ed2b4[_0x586c89(0x147)][_0x586c89(0xc7)]=_0x586c89(0xfd)+this['hexToColor'](_0x223237[_0x586c89(0xd7)]),_0x2ed2b4[_0x586c89(0x147)]['borderRadius']='8px',_0x2ed2b4['style'][_0x586c89(0x116)]=_0x586c89(0x152),_0x2ed2b4[_0x586c89(0x147)][_0x586c89(0x107)]='600',_0x2ed2b4[_0x586c89(0x147)][_0x586c89(0x89)]=_0x586c89(0x10a),_0x2ed2b4[_0x586c89(0x103)]=()=>{const _0x239ac2=_0x586c89;document[_0x239ac2(0xcc)][_0x239ac2(0x10f)](_0x440a7a),this[_0x239ac2(0xdc)](_0x7620dc,!0x0,!0x0,!0x1),_0x371b94();},_0x10608d['appendChild'](_0x2ed2b4);}}_0x1757c5[_0x586c89(0x161)](_0x3d4a53),_0x1757c5['appendChild'](_0x5f1cfd),_0x5f1cfd[_0x586c89(0x161)](_0x10608d),_0x440a7a[_0x586c89(0x161)](_0x1757c5),document[_0x586c89(0xcc)][_0x586c89(0x161)](_0x440a7a),_0x5e790f&&setTimeout(()=>{const _0x50c3e6=_0x586c89;document['body']['contains'](_0x440a7a)&&document[_0x50c3e6(0xcc)]['removeChild'](_0x440a7a);},0x3e8*parseInt(_0x3d22b1)),_0x440a7a[_0x586c89(0xde)](_0x586c89(0xa7),_0x5e8067=>{const _0x5dd574=_0x586c89;_0x5e8067['target']===_0x440a7a&&document[_0x5dd574(0xcc)][_0x5dd574(0x10f)](_0x440a7a);});}async[_0x353e3b(0xdc)](_0x5848ef,_0x237186,_0x13efc7,_0x29f7c0){const _0x5497b7=_0x353e3b,_0x3d395d=await this[_0x5497b7(0xee)](_0x5848ef,_0x13efc7,_0x237186,_0x29f7c0);await this['processCampaignClick'](_0x3d395d);}async[_0x353e3b(0xa5)](_0xc4ae32){const _0x17f8b6=_0x353e3b;this[_0x17f8b6(0x106)]&&this[_0x17f8b6(0x133)]||((0x0,_0x23388e[_0x17f8b6(0x10b)])(this['debug'],_0x17f8b6(0x143)),await this[_0x17f8b6(0x157)]()),(this[_0x17f8b6(0xd2)][_0x17f8b6(0x109)]>0x0||this[_0x17f8b6(0x87)]['length']>0x0||Object[_0x17f8b6(0x91)](this['attributeQueue'])[_0x17f8b6(0x109)]>0x0)&&await this[_0x17f8b6(0x165)]();const _0x34b8e3=await this[_0x17f8b6(0xee)](_0xc4ae32,!0x0,!0x0);await this[_0x17f8b6(0x154)](_0x34b8e3);}async[_0x353e3b(0x154)](_0x23cadc){const _0x4f92e9=_0x353e3b;try{const _0x4d39c4=await fetch(this[_0x4f92e9(0xa6)]+_0x4f92e9(0x11b),{'method':'POST','headers':{'Content-Type':_0x4f92e9(0x13c),'x-api-key':this[_0x4f92e9(0xfc)]},'body':JSON[_0x4f92e9(0x134)](_0x23cadc)});if(!_0x4d39c4['ok'])throw new Error(_0x4f92e9(0x15c)+_0x4d39c4['status']);this[_0x4f92e9(0xa8)]&&(0x0,_0x23388e[_0x4f92e9(0x10b)])(this['debug'],'process\x20campaign\x20click\x20dispatched\x20successfully:\x20'+_0x23cadc['campaignId']);}catch(_0x2b4b9e){throw(0x0,_0x23388e['log'])(this['debug'],_0x4f92e9(0x9e),_0x2b4b9e),_0x2b4b9e;}}async[_0x353e3b(0xee)](_0x2f59ac,_0x3f8490,_0x1d02e0,_0x3f92c4){const _0x458443=_0x353e3b,_0x218001=Date[_0x458443(0xcd)](),_0x2db5a9={'campaignId':_0x2f59ac,'opened':_0x3f8490,'clicked':_0x1d02e0,'deviceId':this[_0x458443(0xf7)],'timestamp':_0x218001};return void 0x0!==_0x3f92c4&&(_0x2db5a9['dismissed']=_0x3f92c4),_0x2db5a9;}};},0x1a9:(_0x2e575d,_0xf81ec9,_0x268d1c)=>{const _0xb1c20b=a0_0x33a9;Object['defineProperty'](_0xf81ec9,_0xb1c20b(0x8a),{'value':!0x0}),_0xf81ec9['updateV1State']=void 0x0;const _0x322474=_0x268d1c(0x123),_0x37bdaf=_0x268d1c(0xb),_0x349ccb={};function _0x54ee92(_0x5412db,_0x2b0b6d,_0x280b17){const _0x5409b9=_0xb1c20b;return _0x5412db['msecs']??=-0x1/0x0,_0x5412db[_0x5409b9(0xe6)]??=0x0,_0x2b0b6d===_0x5412db['msecs']?(_0x5412db[_0x5409b9(0xe6)]++,_0x5412db[_0x5409b9(0xe6)]>=0x2710&&(_0x5412db[_0x5409b9(0xd1)]=void 0x0,_0x5412db[_0x5409b9(0xe6)]=0x0)):_0x2b0b6d>_0x5412db[_0x5409b9(0x114)]?_0x5412db['nsecs']=0x0:_0x2b0b6d<_0x5412db[_0x5409b9(0x114)]&&(_0x5412db[_0x5409b9(0xd1)]=void 0x0),_0x5412db['node']||(_0x5412db[_0x5409b9(0xd1)]=_0x280b17['slice'](0xa,0x10),_0x5412db[_0x5409b9(0xd1)][0x0]|=0x1,_0x5412db[_0x5409b9(0xad)]=0x3fff&(_0x280b17[0x8]<<0x8|_0x280b17[0x9])),_0x5412db[_0x5409b9(0x114)]=_0x2b0b6d,_0x5412db;}function _0x224557(_0x23983f,_0x1e4adf,_0x9e2f99,_0x3fc3d6,_0x4e9243,_0x4fbf22,_0x295692=0x0){const _0x56997c=_0xb1c20b;if(_0x23983f[_0x56997c(0x109)]<0x10)throw new Error(_0x56997c(0x146));if(_0x4fbf22){if(_0x295692<0x0||_0x295692+0x10>_0x4fbf22[_0x56997c(0x109)])throw new RangeError(_0x56997c(0xe0)+_0x295692+':'+(_0x295692+0xf)+'\x20is\x20out\x20of\x20buffer\x20bounds');}else _0x4fbf22=new Uint8Array(0x10),_0x295692=0x0;_0x1e4adf??=Date['now'](),_0x9e2f99??=0x0,_0x3fc3d6??=0x3fff&(_0x23983f[0x8]<<0x8|_0x23983f[0x9]),_0x4e9243??=_0x23983f[_0x56997c(0x139)](0xa,0x10);const _0x5eafd4=(0x2710*(0xfffffff&(_0x1e4adf+=0xb1d069b5400))+_0x9e2f99)%0x100000000;_0x4fbf22[_0x295692++]=_0x5eafd4>>>0x18&0xff,_0x4fbf22[_0x295692++]=_0x5eafd4>>>0x10&0xff,_0x4fbf22[_0x295692++]=_0x5eafd4>>>0x8&0xff,_0x4fbf22[_0x295692++]=0xff&_0x5eafd4;const _0x5195dc=_0x1e4adf/0x100000000*0x2710&0xfffffff;_0x4fbf22[_0x295692++]=_0x5195dc>>>0x8&0xff,_0x4fbf22[_0x295692++]=0xff&_0x5195dc,_0x4fbf22[_0x295692++]=_0x5195dc>>>0x18&0xf|0x10,_0x4fbf22[_0x295692++]=_0x5195dc>>>0x10&0xff,_0x4fbf22[_0x295692++]=_0x3fc3d6>>>0x8|0x80,_0x4fbf22[_0x295692++]=0xff&_0x3fc3d6;for(let _0x4f4e8e=0x0;_0x4f4e8e<0x6;++_0x4f4e8e)_0x4fbf22[_0x295692++]=_0x4e9243[_0x4f4e8e];return _0x4fbf22;}_0xf81ec9[_0xb1c20b(0xb5)]=_0x54ee92,_0xf81ec9['default']=function _0x3d5e23(_0x5f3318,_0x3fd657,_0xeeef6b){const _0x187261=_0xb1c20b;let _0x35a313;const _0xccf87a=_0x5f3318?.[_0x187261(0xb3)]??!0x1;if(_0x5f3318){const _0x3426bb=Object[_0x187261(0x91)](_0x5f3318);0x1===_0x3426bb[_0x187261(0x109)]&&_0x187261(0xb3)===_0x3426bb[0x0]&&(_0x5f3318=void 0x0);}if(_0x5f3318)_0x35a313=_0x224557(_0x5f3318[_0x187261(0x126)]??_0x5f3318[_0x187261(0xe7)]?.()??(0x0,_0x322474[_0x187261(0x9c)])(),_0x5f3318[_0x187261(0x114)],_0x5f3318[_0x187261(0xe6)],_0x5f3318[_0x187261(0xad)],_0x5f3318[_0x187261(0xd1)],_0x3fd657,_0xeeef6b);else{const _0x3c3c85=Date[_0x187261(0xcd)](),_0x343a79=(0x0,_0x322474[_0x187261(0x9c)])();_0x54ee92(_0x349ccb,_0x3c3c85,_0x343a79),_0x35a313=_0x224557(_0x343a79,_0x349ccb[_0x187261(0x114)],_0x349ccb[_0x187261(0xe6)],_0xccf87a?void 0x0:_0x349ccb[_0x187261(0xad)],_0xccf87a?void 0x0:_0x349ccb['node'],_0x3fd657,_0xeeef6b);}return _0x3fd657??(0x0,_0x37bdaf[_0x187261(0x102)])(_0x35a313);};},0x1d1:(_0x2aa653,_0x4ac7c6)=>{const _0x37a7ba=a0_0x33a9;Object[_0x37a7ba(0xe9)](_0x4ac7c6,_0x37a7ba(0x8a),{'value':!0x0}),_0x4ac7c6['default']=_0x37a7ba(0xac);},0x22d:(_0x1a49ba,_0xdad9e2,_0x116806)=>{const _0x52e1ae=a0_0x33a9;Object[_0x52e1ae(0xe9)](_0xdad9e2,_0x52e1ae(0x8a),{'value':!0x0}),_0xdad9e2[_0x52e1ae(0x85)]=_0xdad9e2['DNS']=void 0x0;const _0x4f1e2c=_0x116806(0x33d),_0x24aff0=_0x116806(0x3dc);var _0x34d750=_0x116806(0x3dc);function _0x29f3d6(_0x48ecad,_0x4b9bef,_0x43e23f,_0x3fc4f6){const _0x2867be=_0x52e1ae;return(0x0,_0x24aff0[_0x2867be(0x9c)])(0x50,_0x4f1e2c[_0x2867be(0x9c)],_0x48ecad,_0x4b9bef,_0x43e23f,_0x3fc4f6);}Object['defineProperty'](_0xdad9e2,'DNS',{'enumerable':!0x0,'get':function(){return _0x34d750['DNS'];}}),Object['defineProperty'](_0xdad9e2,_0x52e1ae(0x85),{'enumerable':!0x0,'get':function(){const _0x3ce120=_0x52e1ae;return _0x34d750[_0x3ce120(0x85)];}}),_0x29f3d6[_0x52e1ae(0x104)]=_0x24aff0[_0x52e1ae(0x104)],_0x29f3d6['URL']=_0x24aff0['URL'],_0xdad9e2[_0x52e1ae(0x9c)]=_0x29f3d6;},0x238:(_0x192a5c,_0x1634b5,_0x4f3fb9)=>{Object['defineProperty'](_0x1634b5,'__esModule',{'value':!0x0});const _0xf29964=_0x4f3fb9(0x31d),_0xde71d=_0x4f3fb9(0xb);_0x1634b5['default']=function _0x3b4c11(_0x26883f){const _0x3448dd=a0_0x33a9,_0x2fcc71=function _0xd27263(_0xb90733){return Uint8Array['of']((0xf&_0xb90733[0x6])<<0x4|_0xb90733[0x7]>>0x4&0xf,(0xf&_0xb90733[0x7])<<0x4|(0xf0&_0xb90733[0x4])>>0x4,(0xf&_0xb90733[0x4])<<0x4|(0xf0&_0xb90733[0x5])>>0x4,(0xf&_0xb90733[0x5])<<0x4|(0xf0&_0xb90733[0x0])>>0x4,(0xf&_0xb90733[0x0])<<0x4|(0xf0&_0xb90733[0x1])>>0x4,(0xf&_0xb90733[0x1])<<0x4|(0xf0&_0xb90733[0x2])>>0x4,0x60|0xf&_0xb90733[0x2],_0xb90733[0x3],_0xb90733[0x8],_0xb90733[0x9],_0xb90733[0xa],_0xb90733[0xb],_0xb90733[0xc],_0xb90733[0xd],_0xb90733[0xe],_0xb90733[0xf]);}(_0x3448dd(0x162)==typeof _0x26883f?(0x0,_0xf29964['default'])(_0x26883f):_0x26883f);return'string'==typeof _0x26883f?(0x0,_0xde71d[_0x3448dd(0x102)])(_0x2fcc71):_0x2fcc71;};},0x24f:(_0x423beb,_0x5d0b0e,_0x268d73)=>{const _0x2070aa=a0_0x33a9;Object[_0x2070aa(0xe9)](_0x5d0b0e,'__esModule',{'value':!0x0}),_0x5d0b0e['URL']=_0x5d0b0e[_0x2070aa(0x104)]=void 0x0;const _0x88f4a2=_0x268d73(0x152),_0x51e17f=_0x268d73(0x3dc);var _0x2e7315=_0x268d73(0x3dc);function _0x38252f(_0x5e9556,_0x561611,_0x5ad9fa,_0x1908a7){const _0x51f27e=_0x2070aa;return(0x0,_0x51e17f['default'])(0x30,_0x88f4a2[_0x51f27e(0x9c)],_0x5e9556,_0x561611,_0x5ad9fa,_0x1908a7);}Object[_0x2070aa(0xe9)](_0x5d0b0e,_0x2070aa(0x104),{'enumerable':!0x0,'get':function(){const _0x2372c4=_0x2070aa;return _0x2e7315[_0x2372c4(0x104)];}}),Object[_0x2070aa(0xe9)](_0x5d0b0e,_0x2070aa(0x85),{'enumerable':!0x0,'get':function(){const _0x13c2ec=_0x2070aa;return _0x2e7315[_0x13c2ec(0x85)];}}),_0x38252f[_0x2070aa(0x104)]=_0x51e17f[_0x2070aa(0x104)],_0x38252f[_0x2070aa(0x85)]=_0x51e17f[_0x2070aa(0x85)],_0x5d0b0e[_0x2070aa(0x9c)]=_0x38252f;},0x2b9:(_0x39d9b0,_0x2a6d0b)=>{const _0x630476=a0_0x33a9;Object[_0x630476(0xe9)](_0x2a6d0b,_0x630476(0x8a),{'value':!0x0}),_0x2a6d0b[_0x630476(0x9c)]=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;},0x2ea:(_0xa5fb67,_0x37ca79,_0x507d21)=>{const _0xf01955=a0_0x33a9;Object[_0xf01955(0xe9)](_0x37ca79,_0xf01955(0x8a),{'value':!0x0});const _0x2d6527=_0x507d21(0x2b9);_0x37ca79['default']=function _0xb14e3(_0x13b897){const _0x31b461=_0xf01955;return'string'==typeof _0x13b897&&_0x2d6527[_0x31b461(0x9c)]['test'](_0x13b897);};},0x302:(_0x1b2fd8,_0x16713a,_0x4c73cc)=>{const _0x5a882a=a0_0x33a9;Object[_0x5a882a(0xe9)](_0x16713a,_0x5a882a(0x8a),{'value':!0x0});const _0x5e2ab3=_0x4c73cc(0x2ea);_0x16713a[_0x5a882a(0x9c)]=function _0x4035db(_0x46c6e6){const _0x1584a7=_0x5a882a;if(!(0x0,_0x5e2ab3[_0x1584a7(0x9c)])(_0x46c6e6))throw TypeError(_0x1584a7(0xf4));return parseInt(_0x46c6e6['slice'](0xe,0xf),0x10);};},0x30b:(_0x3fde0b,_0x3896e6)=>{const _0x5c3698=a0_0x33a9;Object['defineProperty'](_0x3896e6,'__esModule',{'value':!0x0});const _0x30656c=_0x5c3698(0x11a)!=typeof crypto&&crypto['randomUUID']&&crypto[_0x5c3698(0x8f)]['bind'](crypto);_0x3896e6[_0x5c3698(0x9c)]={'randomUUID':_0x30656c};},0x31d:(_0x442222,_0x4a49da,_0x42d118)=>{const _0x3f8167=a0_0x33a9;Object['defineProperty'](_0x4a49da,'__esModule',{'value':!0x0});const _0x1bd4e6=_0x42d118(0x2ea);_0x4a49da[_0x3f8167(0x9c)]=function _0x4297c7(_0x3a0fa8){const _0x4a64e7=_0x3f8167;if(!(0x0,_0x1bd4e6[_0x4a64e7(0x9c)])(_0x3a0fa8))throw TypeError('Invalid\x20UUID');let _0x34cf82;return Uint8Array['of']((_0x34cf82=parseInt(_0x3a0fa8['slice'](0x0,0x8),0x10))>>>0x18,_0x34cf82>>>0x10&0xff,_0x34cf82>>>0x8&0xff,0xff&_0x34cf82,(_0x34cf82=parseInt(_0x3a0fa8[_0x4a64e7(0x139)](0x9,0xd),0x10))>>>0x8,0xff&_0x34cf82,(_0x34cf82=parseInt(_0x3a0fa8[_0x4a64e7(0x139)](0xe,0x12),0x10))>>>0x8,0xff&_0x34cf82,(_0x34cf82=parseInt(_0x3a0fa8['slice'](0x13,0x17),0x10))>>>0x8,0xff&_0x34cf82,(_0x34cf82=parseInt(_0x3a0fa8[_0x4a64e7(0x139)](0x18,0x24),0x10))/0x10000000000&0xff,_0x34cf82/0x100000000&0xff,_0x34cf82>>>0x18&0xff,_0x34cf82>>>0x10&0xff,_0x34cf82>>>0x8&0xff,0xff&_0x34cf82);};},0x33d:(_0x5232bb,_0xd6f2a3)=>{const _0x339ce4=a0_0x33a9;function _0x40db3d(_0x5dbd33,_0x2fe3e3,_0x1719fa,_0x403159){switch(_0x5dbd33){case 0x0:return _0x2fe3e3&_0x1719fa^~_0x2fe3e3&_0x403159;case 0x1:case 0x3:return _0x2fe3e3^_0x1719fa^_0x403159;case 0x2:return _0x2fe3e3&_0x1719fa^_0x2fe3e3&_0x403159^_0x1719fa&_0x403159;}}function _0x590695(_0x187602,_0x4533ed){return _0x187602<<_0x4533ed|_0x187602>>>0x20-_0x4533ed;}Object[_0x339ce4(0xe9)](_0xd6f2a3,_0x339ce4(0x8a),{'value':!0x0}),_0xd6f2a3[_0x339ce4(0x9c)]=function _0x5c43be(_0x7d5fd7){const _0x1eda61=_0x339ce4,_0x21c9ba=[0x5a827999,0x6ed9eba1,0x8f1bbcdc,0xca62c1d6],_0x54860f=[0x67452301,0xefcdab89,0x98badcfe,0x10325476,0xc3d2e1f0],_0x487ebe=new Uint8Array(_0x7d5fd7[_0x1eda61(0x109)]+0x1);_0x487ebe['set'](_0x7d5fd7),_0x487ebe[_0x7d5fd7[_0x1eda61(0x109)]]=0x80;const _0x485749=(_0x7d5fd7=_0x487ebe)['length']/0x4+0x2,_0x26e71a=Math[_0x1eda61(0x127)](_0x485749/0x10),_0x4d2e0d=new Array(_0x26e71a);for(let _0x427989=0x0;_0x427989<_0x26e71a;++_0x427989){const _0x5b52b0=new Uint32Array(0x10);for(let _0x464bc1=0x0;_0x464bc1<0x10;++_0x464bc1)_0x5b52b0[_0x464bc1]=_0x7d5fd7[0x40*_0x427989+0x4*_0x464bc1]<<0x18|_0x7d5fd7[0x40*_0x427989+0x4*_0x464bc1+0x1]<<0x10|_0x7d5fd7[0x40*_0x427989+0x4*_0x464bc1+0x2]<<0x8|_0x7d5fd7[0x40*_0x427989+0x4*_0x464bc1+0x3];_0x4d2e0d[_0x427989]=_0x5b52b0;}_0x4d2e0d[_0x26e71a-0x1][0xe]=0x8*(_0x7d5fd7[_0x1eda61(0x109)]-0x1)/Math[_0x1eda61(0x14f)](0x2,0x20),_0x4d2e0d[_0x26e71a-0x1][0xe]=Math[_0x1eda61(0x108)](_0x4d2e0d[_0x26e71a-0x1][0xe]),_0x4d2e0d[_0x26e71a-0x1][0xf]=0x8*(_0x7d5fd7[_0x1eda61(0x109)]-0x1)&0xffffffff;for(let _0x3730b0=0x0;_0x3730b0<_0x26e71a;++_0x3730b0){const _0x346ecc=new Uint32Array(0x50);for(let _0x4c1948=0x0;_0x4c1948<0x10;++_0x4c1948)_0x346ecc[_0x4c1948]=_0x4d2e0d[_0x3730b0][_0x4c1948];for(let _0x2d579d=0x10;_0x2d579d<0x50;++_0x2d579d)_0x346ecc[_0x2d579d]=_0x590695(_0x346ecc[_0x2d579d-0x3]^_0x346ecc[_0x2d579d-0x8]^_0x346ecc[_0x2d579d-0xe]^_0x346ecc[_0x2d579d-0x10],0x1);let _0x3fcad9=_0x54860f[0x0],_0x41fc11=_0x54860f[0x1],_0x5b5bf7=_0x54860f[0x2],_0x32e01f=_0x54860f[0x3],_0x383953=_0x54860f[0x4];for(let _0x2f4bba=0x0;_0x2f4bba<0x50;++_0x2f4bba){const _0x204ea4=Math[_0x1eda61(0x108)](_0x2f4bba/0x14),_0x191428=_0x590695(_0x3fcad9,0x5)+_0x40db3d(_0x204ea4,_0x41fc11,_0x5b5bf7,_0x32e01f)+_0x383953+_0x21c9ba[_0x204ea4]+_0x346ecc[_0x2f4bba]>>>0x0;_0x383953=_0x32e01f,_0x32e01f=_0x5b5bf7,_0x5b5bf7=_0x590695(_0x41fc11,0x1e)>>>0x0,_0x41fc11=_0x3fcad9,_0x3fcad9=_0x191428;}_0x54860f[0x0]=_0x54860f[0x0]+_0x3fcad9>>>0x0,_0x54860f[0x1]=_0x54860f[0x1]+_0x41fc11>>>0x0,_0x54860f[0x2]=_0x54860f[0x2]+_0x5b5bf7>>>0x0,_0x54860f[0x3]=_0x54860f[0x3]+_0x32e01f>>>0x0,_0x54860f[0x4]=_0x54860f[0x4]+_0x383953>>>0x0;}return Uint8Array['of'](_0x54860f[0x0]>>0x18,_0x54860f[0x0]>>0x10,_0x54860f[0x0]>>0x8,_0x54860f[0x0],_0x54860f[0x1]>>0x18,_0x54860f[0x1]>>0x10,_0x54860f[0x1]>>0x8,_0x54860f[0x1],_0x54860f[0x2]>>0x18,_0x54860f[0x2]>>0x10,_0x54860f[0x2]>>0x8,_0x54860f[0x2],_0x54860f[0x3]>>0x18,_0x54860f[0x3]>>0x10,_0x54860f[0x3]>>0x8,_0x54860f[0x3],_0x54860f[0x4]>>0x18,_0x54860f[0x4]>>0x10,_0x54860f[0x4]>>0x8,_0x54860f[0x4]);};},0x3dc:(_0x851717,_0x3fc386,_0x18f1b2)=>{const _0x206527=a0_0x33a9;Object[_0x206527(0xe9)](_0x3fc386,_0x206527(0x8a),{'value':!0x0}),_0x3fc386['URL']=_0x3fc386[_0x206527(0x104)]=_0x3fc386[_0x206527(0x15a)]=void 0x0;const _0x3c2178=_0x18f1b2(0x31d),_0x13e2eb=_0x18f1b2(0xb);function _0x4850f4(_0x2b0624){const _0x11299a=_0x206527;_0x2b0624=unescape(encodeURIComponent(_0x2b0624));const _0x3ec3b2=new Uint8Array(_0x2b0624[_0x11299a(0x109)]);for(let _0x17f7cf=0x0;_0x17f7cf<_0x2b0624['length'];++_0x17f7cf)_0x3ec3b2[_0x17f7cf]=_0x2b0624['charCodeAt'](_0x17f7cf);return _0x3ec3b2;}_0x3fc386[_0x206527(0x15a)]=_0x4850f4,_0x3fc386['DNS']='6ba7b810-9dad-11d1-80b4-00c04fd430c8',_0x3fc386[_0x206527(0x85)]=_0x206527(0xb9),_0x3fc386[_0x206527(0x9c)]=function _0x426d1c(_0x31acfa,_0xd709b9,_0x431749,_0x1d433d,_0x3368ed,_0x28ef73){const _0x1e161a=_0x206527,_0xf74b00=_0x1e161a(0x162)==typeof _0x431749?_0x4850f4(_0x431749):_0x431749,_0x4c12a8=_0x1e161a(0x162)==typeof _0x1d433d?(0x0,_0x3c2178[_0x1e161a(0x9c)])(_0x1d433d):_0x1d433d;if(_0x1e161a(0x162)==typeof _0x1d433d&&(_0x1d433d=(0x0,_0x3c2178['default'])(_0x1d433d)),0x10!==_0x1d433d?.[_0x1e161a(0x109)])throw TypeError(_0x1e161a(0xfa));let _0x270351=new Uint8Array(0x10+_0xf74b00['length']);if(_0x270351[_0x1e161a(0xc2)](_0x4c12a8),_0x270351['set'](_0xf74b00,_0x4c12a8[_0x1e161a(0x109)]),_0x270351=_0xd709b9(_0x270351),_0x270351[0x6]=0xf&_0x270351[0x6]|_0x31acfa,_0x270351[0x8]=0x3f&_0x270351[0x8]|0x80,_0x3368ed){_0x28ef73=_0x28ef73||0x0;for(let _0x3bd6a9=0x0;_0x3bd6a9<0x10;++_0x3bd6a9)_0x3368ed[_0x28ef73+_0x3bd6a9]=_0x270351[_0x3bd6a9];return _0x3368ed;}return(0x0,_0x13e2eb['unsafeStringify'])(_0x270351);};}},_0x366d3a={};function _0x50985a(_0x1b56d1){const _0x13c273=a0_0x33a9;var _0x3ee8ea=_0x366d3a[_0x1b56d1];if(void 0x0!==_0x3ee8ea)return _0x3ee8ea[_0x13c273(0x15d)];var _0x17cefe=_0x366d3a[_0x1b56d1]={'exports':{}};return _0x542268[_0x1b56d1](_0x17cefe,_0x17cefe[_0x13c273(0x15d)],_0x50985a),_0x17cefe[_0x13c273(0x15d)];}var _0x2717b7={};return((()=>{const _0x46f111=a0_0x33a9;var _0x33b110=_0x2717b7;Object[_0x46f111(0xe9)](_0x33b110,_0x46f111(0x8a),{'value':!0x0}),_0x33b110[_0x46f111(0x88)]=void 0x0;var _0x3a6ab5=_0x50985a(0x1a7);Object[_0x46f111(0xe9)](_0x33b110,_0x46f111(0x88),{'enumerable':!0x0,'get':function(){return _0x3a6ab5['WebSDK'];}});})()),_0x2717b7;})())));
|
|
1
|
+
function a0_0x4d5d(){const _0x4ed667=['3163952MpMOCg','fill','catch','body','12px','createElement','13308yJumms','6831510ZVaxIL','2px\x20solid\x20','string','NIL','deeplink_into_app','substring','Failed\x20to\x20detect\x20timezone','apiKey','setItem','localStorage','35FpYIUv','Random\x20bytes\x20length\x20must\x20be\x20>=\x2016','clearUserData','loadCustomAttributes','×','onclick','0\x204px\x206px\x20rgba(0,\x200,\x200,\x200.1)','parse','POST','16px','alignItems','processBatch','MAX','maxBatchSize','justifyContent','600','storeDeviceId','Purchase\x20event\x20queued','none','fontWeight','batchInterval','Failed\x20to\x20send\x20payload\x20to\x20server','.custom_attributes','[OrderSune\x20CRM]','pow','undefined','set','processCampaignClick','slice','test','.current_user','startBatchProcessing','unshift','appendChild','sendBatchToServer','UUID\x20byte\x20range\x20','guest_user_','log','Storage\x20type','msecs','guestUserId','Custom\x20attribute\x20queued','platform','174905QGWPiT','/analytics/data','\x20events,\x20','marginTop','open','Batch\x20processing\x20failed','9999','maxWidth','9qudOGf','removeItem','6ba7b810-9dad-11d1-80b4-00c04fd430c8','URL','8px\x200\x2024px\x200','addEventListener','stringToBytes','__esModule','amd','deviceDetails','_blank','push','webOnClickValue','padding','14px','User\x20data\x20cleared,\x20new\x20device\x20ID\x20generated','getStoredDeviceId','debug','displayInAppMessage','852088jdJSCO','defineProperty','99lEjmcC','borderRadius','inAppImage','3MXSgFd','toLowerCase','HTTP\x20error!\x20status:\x20','Initialization\x20failed','type','requestId','random','Loaded\x20user\x20profile','Namespace\x20must\x20be\x20array-like\x20(16\x20iterable\x20integer\x20values,\x200-255)','userAttributes','stringify','currentUser','trackCustomAttribute','button2','deviceId','cursor','100%','toUpperCase','relative','webOnClickAction','flex','contains','validate','sdkVersion','500','button','DNS','storage','v1ToV6','flexDirection','logClick','center','boxShadow','_v6','logInAppMessageClick','redirect_to_web_url','batchSize','WebSDK','app_started','headerColor','border','Invalid\x20UUID','updateV1State','12FPVnvn','column','seq','height','application/json','queueEvent','\x20is\x20out\x20of\x20buffer\x20bounds','charCodeAt','ceil','position','/analytics/clicks','top','bind','storeUserProfile','replace','div','getGuestUserId','Event\x20name\x20is\x20required\x20and\x20must\x20be\x20a\x20string','Attribute\x20name\x20is\x20required\x20and\x20must\x20be\x20a\x20string','button1','20px','139708LZylfe','now','textColor','attributeQueue','clockseq','140px','width','innerHTML','json','buildPurchasePayload','closeColor','left','73160gzIpMf','resolvedOptions','zIndex','Sending\x20batch\x20to\x20server','fontSize','length','default','gap','onerror','object','node','getUserProfile','mediaConfig','trim','rng','right','forceSend','400px','OrdersuneCRMWebSDK','img','dismissed','background','display','unsafeStringify','rgba(0,\x200,\x200,\x200.5)','margin','purchaseBatch','Identifying\x20user','header','randomUUID','DateTimeFormat','8px','20800nuesDv','borderColor','pointer','eventQueue','timeZone','modal','buildCampaignPayload','isProcessingQueue','floor','initialize','openWebUrl','endpoint','backgroundColor','dispose','v6ToV1','batchProcessingInterval','nsecs','timestamp','textContent','storeCustomAttributes','Async\x20initialization\x20failed','exports','web','style','\x20purchases,\x20','initializeDeviceDetails','removeChild','SDK\x20not\x20fully\x20initialized,\x20waiting\x20for\x20initialization','fixed','message','crypto.getRandomValues()\x20not\x20supported.\x20See\x20https://github.com/uuidjs/uuid#getrandomvalues-not-supported','version','hexToColor','{\x22name\x22:\x22@ordersune/crm-web-sdk\x22,\x22version\x22:\x221.1.3\x22,\x22main\x22:\x22dist/index.js\x22,\x22types\x22:\x22dist/index.d.ts\x22,\x22publishConfig\x22:{\x22access\x22:\x22public\x22},\x22scripts\x22:{\x22build\x22:\x22npm\x20run\x20build:bundle\x20&&\x20npm\x20run\x20build:types\x22,\x22build:bundle\x22:\x22webpack\x20--config\x20webpack.config.js\x22,\x22build:types\x22:\x22tsc\x20--emitDeclarationOnly\x20--outDir\x20dist\x22,\x22prepare\x22:\x22npm\x20run\x20build\x20&&\x20husky\x22,\x22release\x22:\x22bash\x20-c\x20\x27read\x20-p\x20\x5c\x22Enter\x20NPM\x20token:\x20\x5c\x22\x20NPM_TOKEN\x20&&\x20GIT_AUTHOR_NAME=\x5c\x22$(git\x20config\x20user.name)\x5c\x22\x20GIT_AUTHOR_EMAIL=\x5c\x22$(git\x20config\x20user.email)\x5c\x22\x20GIT_COMMITTER_NAME=\x5c\x22$(git\x20config\x20user.name)\x5c\x22\x20GIT_COMMITTER_EMAIL=\x5c\x22$(git\x20config\x20user.email)\x5c\x22\x20NPM_TOKEN=$NPM_TOKEN\x20semantic-release\x20--no-ci\x27\x22,\x22lint:commit\x22:\x22commitlint\x20--edit\x22},\x22files\x22:[\x22dist\x22,\x22README.md\x22],\x22dependencies\x22:{\x22uuid\x22:\x22^11.0.3\x22},\x22devDependencies\x22:{\x22@commitlint/cli\x22:\x22^20.1.0\x22,\x22@commitlint/config-conventional\x22:\x22^20.0.0\x22,\x22@semantic-release/changelog\x22:\x22^6.0.3\x22,\x22@semantic-release/git\x22:\x22^10.0.1\x22,\x22@semantic-release/npm\x22:\x22^13.1.2\x22,\x22@types/uuid\x22:\x22^9.0.0\x22,\x22husky\x22:\x22^9.1.7\x22,\x22javascript-obfuscator\x22:\x22^4.1.1\x22,\x22semantic-release\x22:\x22^25.0.2\x22,\x22terser-webpack-plugin\x22:\x22^5.3.14\x22,\x22ts-loader\x22:\x22^9.5.4\x22,\x22typescript\x22:\x22^5.0.0\x22,\x22webpack\x22:\x22^5.103.0\x22,\x22webpack-cli\x22:\x22^6.0.1\x22,\x22webpack-obfuscator\x22:\x22^3.5.1\x22}}','Error\x20processing\x20campaign\x20click:','absolute','color','trackEvent','getStorage','showInAppMessage','getItem','keys','SDK\x20Initialized','updateV7State'];a0_0x4d5d=function(){return _0x4ed667;};return a0_0x4d5d();}function a0_0xac42(_0x46f2c9,_0x1a3385){const _0x4d5ddc=a0_0x4d5d();return a0_0xac42=function(_0xac42d9,_0x70f827){_0xac42d9=_0xac42d9-0x1d5;let _0xaec5bc=_0x4d5ddc[_0xac42d9];return _0xaec5bc;},a0_0xac42(_0x46f2c9,_0x1a3385);}(function(_0x35c280,_0x583e6a){const _0x2dc769=a0_0xac42,_0x58b6ef=_0x35c280();while(!![]){try{const _0x4715fa=-parseInt(_0x2dc769(0x1e8))/0x1*(-parseInt(_0x2dc769(0x228))/0x2)+-parseInt(_0x2dc769(0x1e5))/0x3*(parseInt(_0x2dc769(0x234))/0x4)+parseInt(_0x2dc769(0x2bc))/0x5*(-parseInt(_0x2dc769(0x213))/0x6)+-parseInt(_0x2dc769(0x291))/0x7*(parseInt(_0x2dc769(0x1e3))/0x8)+parseInt(_0x2dc769(0x2c4))/0x9*(-parseInt(_0x2dc769(0x287))/0xa)+parseInt(_0x2dc769(0x280))/0xb+-parseInt(_0x2dc769(0x286))/0xc*(-parseInt(_0x2dc769(0x254))/0xd);if(_0x4715fa===_0x583e6a)break;else _0x58b6ef['push'](_0x58b6ef['shift']());}catch(_0x56c89){_0x58b6ef['push'](_0x58b6ef['shift']());}}}(a0_0x4d5d,0x5d594),!function webpackUniversalModuleDefinition(_0x3faa55,_0x2c9b74){const _0x43fc19=a0_0xac42;'object'==typeof exports&&_0x43fc19(0x23d)==typeof module?module['exports']=_0x2c9b74():'function'==typeof define&&define[_0x43fc19(0x1d8)]?define('OrdersuneCRMWebSDK',[],_0x2c9b74):_0x43fc19(0x23d)==typeof exports?exports[_0x43fc19(0x246)]=_0x2c9b74():_0x3faa55[_0x43fc19(0x246)]=_0x2c9b74();}(this,()=>((()=>{'use strict';var _0x17068f={0x10a(_0x5e58de,_0x3c7804){const _0x4db5ce=a0_0xac42;Object[_0x4db5ce(0x1e4)](_0x3c7804,'__esModule',{'value':!0x0}),_0x3c7804['log']=void 0x0,_0x3c7804['log']=(_0x8f4632,_0x19563d,..._0x5c278d)=>{const _0x505a9b=_0x4db5ce;_0x8f4632&&console[_0x505a9b(0x2b6)](_0x505a9b(0x2a8),_0x19563d,..._0x5c278d);};},0x1a7(_0x846866,_0x5779ef,_0x3d88bf){const _0x1e52a2=a0_0xac42;Object[_0x1e52a2(0x1e4)](_0x5779ef,_0x1e52a2(0x1d7),{'value':!0x0}),_0x5779ef[_0x1e52a2(0x20d)]=void 0x0;const _0x2d124f=_0x3d88bf(0x10a),_0xbb5119=_0x3d88bf(0xb6),_0xf55c53=_0x3d88bf(0x14a),_0x316ed1='os.',_0xc2169b=_0xf55c53[_0x1e52a2(0x273)];_0x5779ef[_0x1e52a2(0x20d)]=class WebSDK{constructor(_0x2c7ffa){const _0x39ed3d=_0x1e52a2;var _0x58ade0,_0x4ae633,_0x47b589,_0x143e6e,_0x39758c;if(this[_0x39ed3d(0x29e)]=0xa,this[_0x39ed3d(0x2a5)]=0x2710,this[_0x39ed3d(0x1ff)]=_0xc2169b,this[_0x39ed3d(0x257)]=[],this['purchaseBatch']=[],this[_0x39ed3d(0x22b)]={},this[_0x39ed3d(0x25b)]=!0x1,this[_0x39ed3d(0x2bb)]=_0x39ed3d(0x26a),!_0x2c7ffa[_0x39ed3d(0x28e)]||!_0x2c7ffa[_0x39ed3d(0x25f)])throw new Error('API\x20key\x20and\x20endpoint\x20are\x20required');this['apiKey']=_0x2c7ffa['apiKey'],this[_0x39ed3d(0x25f)]=_0x2c7ffa[_0x39ed3d(0x25f)],this['debug']=null!==(_0x58ade0=_0x2c7ffa[_0x39ed3d(0x1e1)])&&void 0x0!==_0x58ade0&&_0x58ade0,this['maxBatchSize']=null!==(_0x4ae633=_0x2c7ffa[_0x39ed3d(0x20c)])&&void 0x0!==_0x4ae633?_0x4ae633:0xa,this[_0x39ed3d(0x2a5)]=null!==(_0x47b589=_0x2c7ffa['batchInterval'])&&void 0x0!==_0x47b589?_0x47b589:0x2710,this['platform']=null!==(_0x143e6e=_0x2c7ffa[_0x39ed3d(0x2bb)])&&void 0x0!==_0x143e6e?_0x143e6e:_0x39ed3d(0x26a),this['storage']=this[_0x39ed3d(0x27a)](null!==(_0x39758c=_0x2c7ffa['storageType'])&&void 0x0!==_0x39758c?_0x39758c:'sessionStorage'),this[_0x39ed3d(0x1f6)]=this['getStoredDeviceId']()||(0x0,_0xbb5119['v4'])(),this[_0x39ed3d(0x2b9)]=this[_0x39ed3d(0x223)](),this[_0x39ed3d(0x25d)]()[_0x39ed3d(0x282)](_0x39a0d5=>{const _0x5271ac=_0x39ed3d;(0x0,_0x2d124f['log'])(this[_0x5271ac(0x1e1)],_0x5271ac(0x268),_0x39a0d5);});}[_0x1e52a2(0x27a)](_0x21788a){const _0x5aaf3e=_0x1e52a2;return console['log'](this[_0x5aaf3e(0x1e1)],_0x5aaf3e(0x2b7),_0x21788a),_0x5aaf3e(0x290)===_0x21788a?window['localStorage']:window['sessionStorage'];}async[_0x1e52a2(0x25d)](){const _0x13b02e=_0x1e52a2;try{(0x0,_0x2d124f['log'])(this[_0x13b02e(0x1e1)],_0x13b02e(0x27e)),this[_0x13b02e(0x2a1)](),await this['initializeDeviceDetails'](),await this[_0x13b02e(0x294)]();const _0x948a48=this['getStoredUserProfile']();_0x948a48?(this[_0x13b02e(0x1f3)]=_0x948a48,(0x0,_0x2d124f['log'])(this[_0x13b02e(0x1e1)],_0x13b02e(0x1ef),this[_0x13b02e(0x1f3)])):this['identify']('');try{const _0x18f315=Intl[_0x13b02e(0x252)]()[_0x13b02e(0x235)]()[_0x13b02e(0x258)];this[_0x13b02e(0x1f4)]('timezone',_0x18f315);}catch(_0x29c568){(0x0,_0x2d124f[_0x13b02e(0x2b6)])(this['debug'],_0x13b02e(0x28d),_0x29c568);}this[_0x13b02e(0x2b0)](),this[_0x13b02e(0x279)](_0x13b02e(0x20e),{});}catch(_0x857eeb){throw(0x0,_0x2d124f[_0x13b02e(0x2b6)])(this['debug'],_0x13b02e(0x1eb),_0x857eeb),_0x857eeb;}}['identify'](_0x4120fa){const _0x217042=_0x1e52a2;if(_0x217042(0x289)!=typeof _0x4120fa)throw new Error('User\x20ID\x20must\x20be\x20a\x20string');const _0x173301=this['getStoredUserProfile']();(null==_0x173301?void 0x0:_0x173301['id'])!==_0x4120fa&&((0x0,_0x2d124f[_0x217042(0x2b6)])(this['debug'],_0x217042(0x24f),_0x4120fa),this[_0x217042(0x1f3)]=_0x4120fa?{'id':_0x4120fa,'guestUserId':this['guestUserId']}:{'id':this[_0x217042(0x2b9)],'guestUserId':this[_0x217042(0x2b9)]},this[_0x217042(0x220)]());}[_0x1e52a2(0x293)](){const _0x5f0ff2=_0x1e52a2;this[_0x5f0ff2(0x1f6)]=(0x0,_0xbb5119['v4'])(),this['guestUserId']=this[_0x5f0ff2(0x223)](),this['initializeDeviceDetails'](),this['currentUser']={'id':this[_0x5f0ff2(0x2b9)],'guestUserId':this[_0x5f0ff2(0x2b9)]},this['attributeQueue']={},this[_0x5f0ff2(0x257)]=[],this[_0x5f0ff2(0x24e)]=[],this['storeDeviceId'](),this[_0x5f0ff2(0x203)]['setItem'](''+_0x316ed1+this['apiKey']+_0x5f0ff2(0x2af),JSON['stringify'](this['currentUser'])),this['storage'][_0x5f0ff2(0x2c5)](''+_0x316ed1+this['apiKey']+_0x5f0ff2(0x2a7)),this[_0x5f0ff2(0x1e1)]&&(0x0,_0x2d124f[_0x5f0ff2(0x2b6)])(this[_0x5f0ff2(0x1e1)],_0x5f0ff2(0x1df));}[_0x1e52a2(0x279)](_0xbce394,_0xdea9d5={},_0x54405f={}){const _0x345105=_0x1e52a2;if(!_0xbce394||_0x345105(0x289)!=typeof _0xbce394)throw new Error(_0x345105(0x224));const _0x8b4eb8={'deviceId':this[_0x345105(0x1f6)],'eventName':_0xbce394,'timestamp':_0x54405f[_0x345105(0x265)]||Date[_0x345105(0x229)](),'requestId':_0x54405f[_0x345105(0x1ed)]||(0x0,_0xbb5119['v4'])(),'properties':_0xdea9d5};this[_0x345105(0x218)](_0x8b4eb8);}['setToken'](_0x417cf0){const _0x4d0ab9=_0x1e52a2;this[_0x4d0ab9(0x1d9)]&&(this[_0x4d0ab9(0x1d9)]={...this[_0x4d0ab9(0x1d9)],'pushToken':_0x417cf0});}[_0x1e52a2(0x1f4)](_0x46cab7,_0x44c999){const _0x4e5c95=_0x1e52a2;if(!_0x46cab7||_0x4e5c95(0x289)!=typeof _0x46cab7)throw new Error(_0x4e5c95(0x225));this[_0x4e5c95(0x22b)]={...this[_0x4e5c95(0x22b)],[_0x46cab7]:_0x44c999},(0x0,_0x2d124f[_0x4e5c95(0x2b6)])(this['debug'],_0x4e5c95(0x2ba),_0x46cab7,_0x44c999),this[_0x4e5c95(0x267)]();}['logProductPurchase'](_0x34cf2e,_0x5726a8,_0x5627bb,_0x548c36,_0x2c1fde,_0x3e3114,_0x5107b2,_0x5cd74b){const _0x33632d=_0x1e52a2,_0x54ce0d=this[_0x33632d(0x231)]({'externalId':_0x34cf2e,'itemId':_0x5726a8,'itemName':_0x5627bb,'unitPrice':_0x548c36,'quantity':_0x2c1fde,'source':_0x3e3114,'channel':_0x5107b2,'itemCategory':_0x5cd74b});this[_0x33632d(0x24e)][_0x33632d(0x1db)](_0x54ce0d),this['debug']&&(0x0,_0x2d124f[_0x33632d(0x2b6)])(this[_0x33632d(0x1e1)],_0x33632d(0x2a2),_0x54ce0d);}[_0x1e52a2(0x23f)](){const _0x1fce27=_0x1e52a2;return this[_0x1fce27(0x1f3)];}async[_0x1e52a2(0x244)](){const _0x11669f=_0x1e52a2;(this[_0x11669f(0x257)][_0x11669f(0x239)]>0x0||this[_0x11669f(0x24e)][_0x11669f(0x239)]>0x0||this[_0x11669f(0x22b)][_0x11669f(0x239)]>0x0)&&await this[_0x11669f(0x29c)]();}[_0x1e52a2(0x261)](){const _0x1d0562=_0x1e52a2;this[_0x1d0562(0x263)]&&clearInterval(this[_0x1d0562(0x263)]),(this[_0x1d0562(0x257)]['length']>0x0||this[_0x1d0562(0x24e)][_0x1d0562(0x239)]>0x0||this['attributeQueue'][_0x1d0562(0x239)]>0x0)&&this[_0x1d0562(0x29c)]()[_0x1d0562(0x282)](_0x47449a=>{const _0x1768dc=_0x1d0562;(0x0,_0x2d124f[_0x1768dc(0x2b6)])(this[_0x1768dc(0x1e1)],'Error\x20during\x20disposal',_0x47449a);});}[_0x1e52a2(0x1e0)](){const _0x23af18=_0x1e52a2;return this[_0x23af18(0x203)][_0x23af18(0x27c)](''+_0x316ed1+this[_0x23af18(0x28e)]+'.device_id');}['getStoredUserProfile'](){const _0x1177c8=_0x1e52a2,_0xe80a5e=this[_0x1177c8(0x203)]['getItem'](''+_0x316ed1+this[_0x1177c8(0x28e)]+'.current_user');return _0xe80a5e?JSON[_0x1177c8(0x298)](_0xe80a5e):null;}[_0x1e52a2(0x2a1)](){const _0x1ba3c8=_0x1e52a2;this['storage'][_0x1ba3c8(0x28f)](''+_0x316ed1+this['apiKey']+'.device_id',this['deviceId']);}[_0x1e52a2(0x220)](){const _0x43a841=_0x1e52a2;this[_0x43a841(0x1f3)]&&this[_0x43a841(0x203)][_0x43a841(0x28f)](''+_0x316ed1+this[_0x43a841(0x28e)]+_0x43a841(0x2af),JSON[_0x43a841(0x1f2)](this[_0x43a841(0x1f3)]));}['storeCustomAttributes'](){const _0x155f40=_0x1e52a2,_0x1af87d=this[_0x155f40(0x203)][_0x155f40(0x27c)](''+_0x316ed1+this[_0x155f40(0x28e)]+_0x155f40(0x2a7)),_0x7924af={..._0x1af87d?JSON['parse'](_0x1af87d):{},...this['attributeQueue']};this['storage']['setItem'](''+_0x316ed1+this[_0x155f40(0x28e)]+_0x155f40(0x2a7),JSON['stringify'](_0x7924af));}async[_0x1e52a2(0x294)](){const _0x634bba=_0x1e52a2,_0x3a74c9=this[_0x634bba(0x203)][_0x634bba(0x27c)](''+_0x316ed1+this['apiKey']+'.custom_attributes');_0x3a74c9&&(this[_0x634bba(0x22b)]={...this[_0x634bba(0x22b)],...JSON[_0x634bba(0x298)](_0x3a74c9)});}[_0x1e52a2(0x223)](){const _0xa1b8a1=_0x1e52a2;return _0xa1b8a1(0x2b5)+this[_0xa1b8a1(0x1f6)];}[_0x1e52a2(0x231)]({externalId:_0x2220ca,itemId:_0x36c977,itemName:_0xd2174f,unitPrice:_0x20c3ed,quantity:_0xab3de9,source:_0x38b3e0,channel:_0x427b7e,itemCategory:_0x4606e3}){return{'external_id':_0x2220ca,'item_id':_0x36c977,'item_name':_0xd2174f,'item_category':_0x4606e3,'quantity':_0xab3de9,'unit_price':_0x20c3ed,'total_price':_0x20c3ed*_0xab3de9,'source':_0x38b3e0,'channel':_0x427b7e,'purchased_at':Date['now']()};}async[_0x1e52a2(0x26d)](){const _0x33ff1e=_0x1e52a2;this[_0x33ff1e(0x1d9)]={'deviceId':this[_0x33ff1e(0x1f6)],'platform':this[_0x33ff1e(0x2bb)]};}['startBatchProcessing'](){const _0x23ca71=_0x1e52a2;this[_0x23ca71(0x263)]=setInterval(()=>{const _0x4953fe=_0x23ca71;(this[_0x4953fe(0x257)][_0x4953fe(0x239)]>0x0||this[_0x4953fe(0x24e)]['length']>0x0||this['attributeQueue']['length']>0x0)&&this[_0x4953fe(0x29c)]()[_0x4953fe(0x282)](_0x2e0fed=>{const _0x532290=_0x4953fe;(0x0,_0x2d124f[_0x532290(0x2b6)])(this[_0x532290(0x1e1)],_0x532290(0x2c1),_0x2e0fed);});},this[_0x23ca71(0x2a5)]);}[_0x1e52a2(0x218)](_0x59a063){const _0x17c0c9=_0x1e52a2;this['eventQueue'][_0x17c0c9(0x1db)](_0x59a063),(0x0,_0x2d124f['log'])(this[_0x17c0c9(0x1e1)],'Event\x20queued',_0x59a063),this[_0x17c0c9(0x257)]['length']>=this[_0x17c0c9(0x29e)]&&this[_0x17c0c9(0x29c)]()['catch'](_0x40876b=>{const _0x58a3a8=_0x17c0c9;(0x0,_0x2d124f['log'])(this[_0x58a3a8(0x1e1)],'Batch\x20processing\x20failed',_0x40876b);});}async[_0x1e52a2(0x29c)](){const _0x32469c=_0x1e52a2;if(this[_0x32469c(0x25b)])return;this['isProcessingQueue']=!0x0;const _0x29ef9a=[...this['eventQueue']],_0x3eb12b=[...this['purchaseBatch']],_0x3c31d5={...this[_0x32469c(0x22b)]};this[_0x32469c(0x257)]=[],this[_0x32469c(0x24e)]=[],this[_0x32469c(0x22b)]={};try{await this['sendBatchToServer'](_0x29ef9a,_0x3eb12b,_0x3c31d5);}catch(_0x1aaff5){throw this[_0x32469c(0x257)][_0x32469c(0x2b1)](..._0x29ef9a),this[_0x32469c(0x24e)][_0x32469c(0x2b1)](..._0x3eb12b),this['attributeQueue']={...this[_0x32469c(0x22b)],..._0x3c31d5},(0x0,_0x2d124f[_0x32469c(0x2b6)])(this[_0x32469c(0x1e1)],'Batch\x20processing\x20failed',_0x1aaff5),_0x1aaff5;}finally{this[_0x32469c(0x25b)]=!0x1;}}async[_0x1e52a2(0x2b3)](_0x46f981,_0x3c480f,_0x28b825){const _0x586ffc=_0x1e52a2;var _0x4cf589,_0x399356;this[_0x586ffc(0x1d9)]||await this[_0x586ffc(0x26d)]();const _0x13fe8a={'sdkVersion':this[_0x586ffc(0x1ff)],'deviceInfo':this['deviceDetails'],'userId':null===(_0x4cf589=this['currentUser'])||void 0x0===_0x4cf589?void 0x0:_0x4cf589['id'],'guestUserId':null===(_0x399356=this['currentUser'])||void 0x0===_0x399356?void 0x0:_0x399356[_0x586ffc(0x2b9)],'time':Date['now'](),'events':_0x46f981,'purchases':_0x3c480f,'userAttributes':_0x28b825};(0x0,_0x2d124f['log'])(this[_0x586ffc(0x1e1)],_0x586ffc(0x237),_0x13fe8a);try{const _0x307b26=await fetch(this[_0x586ffc(0x25f)]+_0x586ffc(0x2bd),{'method':'POST','headers':{'Content-Type':_0x586ffc(0x217),'x-api-key':this[_0x586ffc(0x28e)]},'body':JSON[_0x586ffc(0x1f2)](_0x13fe8a)});if(!_0x307b26['ok'])throw new Error('HTTP\x20error!\x20status:\x20'+_0x307b26['status']);this[_0x586ffc(0x1e1)]&&(0x0,_0x2d124f[_0x586ffc(0x2b6)])(this[_0x586ffc(0x1e1)],'Batch\x20dispatched\x20successfully:\x20'+_0x13fe8a['events'][_0x586ffc(0x239)]+_0x586ffc(0x2be)+_0x13fe8a['purchases'][_0x586ffc(0x239)]+_0x586ffc(0x26c)+Object[_0x586ffc(0x27d)](_0x13fe8a[_0x586ffc(0x1f1)])[_0x586ffc(0x239)]+'\x20attributes'),await _0x307b26[_0x586ffc(0x230)](),Object[_0x586ffc(0x27d)](_0x28b825)[_0x586ffc(0x239)]>0x0&&(this[_0x586ffc(0x22b)]={},this[_0x586ffc(0x203)]['removeItem'](''+_0x316ed1+this[_0x586ffc(0x28e)]+_0x586ffc(0x2a7)));}catch(_0x2ebd7d){throw(0x0,_0x2d124f['log'])(this[_0x586ffc(0x1e1)],_0x586ffc(0x2a6),_0x2ebd7d),_0x2ebd7d;}}[_0x1e52a2(0x1e2)](_0x120fb7,_0xa1c48b,_0x50724f){const _0x409cf1=_0x1e52a2,_0x26e5a9=JSON[_0x409cf1(0x298)](_0x120fb7),_0x3056f7=_0x26e5a9[_0x409cf1(0x250)],_0x1b4659=_0x26e5a9[_0x409cf1(0x271)],_0x3370d6=_0x26e5a9[_0x409cf1(0x259)][_0x409cf1(0x226)],_0x2d9ddc=_0x26e5a9[_0x409cf1(0x259)][_0x409cf1(0x1f5)],_0x46d341=_0x3370d6[_0x409cf1(0x1ec)]||'',_0x1897cc=_0x2d9ddc['type']||'',_0x2e0e49=_0x26e5a9[_0x409cf1(0x240)][_0x409cf1(0x1e7)];this[_0x409cf1(0x27b)]({'context':_0x50724f,'title':_0x3056f7,'body':_0x1b4659,'primaryButtonText':_0x46d341,'secondaryButtonText':_0x1897cc,'imageUrl':_0x2e0e49,'buttonPropertiesPrimary':_0x3370d6,'buttonPropertiesSecondary':_0x2d9ddc,'dismissMessageAutomatically':_0x26e5a9['modal']['dismissMessageAutomatically'],'dismissMessageInSeconds':_0x26e5a9[_0x409cf1(0x259)]['dismissMessageInSeconds'],'headerColor':_0x26e5a9[_0x409cf1(0x259)][_0x409cf1(0x20f)],'messageColor':_0x26e5a9[_0x409cf1(0x259)]['messageColor'],'closeColor':_0x26e5a9['modal'][_0x409cf1(0x232)],'campaignId':_0xa1c48b});}[_0x1e52a2(0x274)](_0x57688d){const _0x1ea867=_0x1e52a2;return 0x6===(_0x57688d=_0x57688d[_0x1ea867(0x1f9)]()[_0x1ea867(0x221)]('#',''))['length']?'#'+_0x57688d:'#'+_0x57688d[_0x1ea867(0x28c)](0x2);}[_0x1e52a2(0x25e)](_0x39b004){const _0x230ab8=_0x1e52a2;_0x39b004&&window[_0x230ab8(0x2c0)](_0x39b004,_0x230ab8(0x1da));}[_0x1e52a2(0x27b)](_0x4c24f9){const _0x537445=_0x1e52a2,{title:_0x51df88,body:_0x19c2c0,primaryButtonText:_0x145e81,secondaryButtonText:_0x37889f,imageUrl:_0x3cd600,onClose:_0x4dd54a,buttonPropertiesPrimary:_0x6cb6b4,buttonPropertiesSecondary:_0x44159f,dismissMessageAutomatically:_0x1ddb73,dismissMessageInSeconds:_0x391908,headerColor:_0x3133e3,messageColor:_0x1ad283,closeColor:_0x501b49,campaignId:_0x3bae9f}=_0x4c24f9,_0x2fdede=document['createElement'](_0x537445(0x222));_0x2fdede[_0x537445(0x26b)]['position']=_0x537445(0x270),_0x2fdede[_0x537445(0x26b)][_0x537445(0x21e)]='0',_0x2fdede[_0x537445(0x26b)][_0x537445(0x233)]='0',_0x2fdede[_0x537445(0x26b)]['width']=_0x537445(0x1f8),_0x2fdede[_0x537445(0x26b)][_0x537445(0x216)]=_0x537445(0x1f8),_0x2fdede[_0x537445(0x26b)][_0x537445(0x260)]=_0x537445(0x24c),_0x2fdede[_0x537445(0x26b)][_0x537445(0x24a)]=_0x537445(0x1fc),_0x2fdede[_0x537445(0x26b)][_0x537445(0x29f)]=_0x537445(0x207),_0x2fdede[_0x537445(0x26b)]['alignItems']=_0x537445(0x207),_0x2fdede[_0x537445(0x26b)][_0x537445(0x236)]=_0x537445(0x2c2);const _0x11ebe9=document[_0x537445(0x285)](_0x537445(0x222));_0x11ebe9[_0x537445(0x26b)][_0x537445(0x260)]='white',_0x11ebe9[_0x537445(0x26b)][_0x537445(0x1e6)]=_0x537445(0x284),_0x11ebe9[_0x537445(0x26b)][_0x537445(0x1dd)]=_0x537445(0x29a),_0x11ebe9[_0x537445(0x26b)]['maxWidth']=_0x537445(0x245),_0x11ebe9[_0x537445(0x26b)]['width']='90%',_0x11ebe9['style'][_0x537445(0x208)]=_0x537445(0x297),_0x11ebe9[_0x537445(0x26b)][_0x537445(0x21c)]=_0x537445(0x1fa);const _0x5541e4=document[_0x537445(0x285)](_0x537445(0x201));_0x5541e4[_0x537445(0x22f)]=_0x537445(0x295),_0x5541e4['style'][_0x537445(0x21c)]=_0x537445(0x277),_0x5541e4['style'][_0x537445(0x21e)]='8px',_0x5541e4['style'][_0x537445(0x243)]=_0x537445(0x253),_0x5541e4['style'][_0x537445(0x249)]=_0x537445(0x2a3),_0x5541e4[_0x537445(0x26b)]['border']=_0x537445(0x2a3),_0x5541e4[_0x537445(0x26b)][_0x537445(0x238)]=_0x537445(0x227),_0x5541e4[_0x537445(0x26b)][_0x537445(0x1f7)]=_0x537445(0x256),_0x5541e4[_0x537445(0x26b)][_0x537445(0x278)]=this[_0x537445(0x274)](_0x501b49),_0x5541e4['onclick']=()=>{const _0x493de9=_0x537445;_0x4dd54a&&_0x4dd54a(),this[_0x493de9(0x20a)](_0x3bae9f,!0x1,!0x0,!0x0),document[_0x493de9(0x283)][_0x493de9(0x26e)](_0x2fdede);};const _0x1f31a2=document[_0x537445(0x285)](_0x537445(0x222));if(_0x1f31a2[_0x537445(0x26b)][_0x537445(0x24a)]=_0x537445(0x1fc),_0x1f31a2['style'][_0x537445(0x205)]=_0x537445(0x214),_0x1f31a2[_0x537445(0x26b)][_0x537445(0x29b)]=_0x537445(0x207),_0x1f31a2[_0x537445(0x26b)]['textAlign']=_0x537445(0x207),_0x3cd600&&''!==_0x3cd600[_0x537445(0x241)]()){const _0x13d31f=document[_0x537445(0x285)](_0x537445(0x247));_0x13d31f['src']=_0x3cd600,_0x13d31f[_0x537445(0x26b)][_0x537445(0x22e)]='100px',_0x13d31f['style'][_0x537445(0x216)]='100px',_0x13d31f[_0x537445(0x26b)]['marginBottom']=_0x537445(0x29a),_0x13d31f['style'][_0x537445(0x2bf)]=_0x537445(0x29a),_0x13d31f[_0x537445(0x23c)]=()=>{const _0x256fb3=_0x537445;_0x13d31f['style'][_0x256fb3(0x24a)]=_0x256fb3(0x2a3);},_0x1f31a2[_0x537445(0x2b2)](_0x13d31f);}const _0x4e06fb=document[_0x537445(0x285)]('h2');_0x4e06fb[_0x537445(0x266)]=_0x51df88,_0x4e06fb['style'][_0x537445(0x238)]='22px',_0x4e06fb[_0x537445(0x26b)][_0x537445(0x2a4)]=_0x537445(0x2a0),_0x4e06fb[_0x537445(0x26b)][_0x537445(0x278)]=this[_0x537445(0x274)](_0x3133e3),_0x4e06fb['style'][_0x537445(0x24d)]='8px\x200',_0x1f31a2['appendChild'](_0x4e06fb);const _0x2af6a0=document[_0x537445(0x285)]('p');_0x2af6a0['textContent']=_0x19c2c0,_0x2af6a0[_0x537445(0x26b)][_0x537445(0x238)]=_0x537445(0x1de),_0x2af6a0['style'][_0x537445(0x278)]=this[_0x537445(0x274)](_0x1ad283),_0x2af6a0[_0x537445(0x26b)][_0x537445(0x2a4)]=_0x537445(0x200),_0x2af6a0[_0x537445(0x26b)]['margin']=_0x537445(0x2c8),_0x1f31a2[_0x537445(0x2b2)](_0x2af6a0);const _0x1c0907=()=>{const _0x218c4f=_0x537445;_0x218c4f(0x20b)!==_0x6cb6b4[_0x218c4f(0x1dc)]&&_0x218c4f(0x28b)!==_0x6cb6b4[_0x218c4f(0x1dc)]||this['openWebUrl'](_0x6cb6b4[_0x218c4f(0x1fb)]||'');},_0x5ec6bd=()=>{const _0x4dd2ce=_0x537445;'redirect_to_web_url'!==_0x44159f['webOnClickValue']&&_0x4dd2ce(0x28b)!==_0x44159f['webOnClickValue']||this['openWebUrl'](_0x44159f[_0x4dd2ce(0x1fb)]||'');},_0x4e7d5d=document[_0x537445(0x285)](_0x537445(0x222));if(_0x4e7d5d[_0x537445(0x26b)]['display']=_0x537445(0x1fc),_0x4e7d5d[_0x537445(0x26b)]['justifyContent']=_0x537445(0x207),_0x4e7d5d[_0x537445(0x26b)]['width']='100%',_0x4e7d5d['style'][_0x537445(0x23b)]='16px',_0x37889f&&''!==_0x37889f['trim']()){const _0x462429=document[_0x537445(0x285)](_0x537445(0x201));_0x462429[_0x537445(0x266)]=_0x145e81,_0x462429['style']['flex']='1',_0x462429[_0x537445(0x26b)]['maxWidth']=_0x537445(0x22d),_0x462429[_0x537445(0x26b)]['padding']=_0x537445(0x284),_0x462429[_0x537445(0x26b)][_0x537445(0x260)]=this['hexToColor'](_0x6cb6b4[_0x537445(0x260)]),_0x462429[_0x537445(0x26b)][_0x537445(0x278)]=this['hexToColor'](_0x6cb6b4[_0x537445(0x22a)]),_0x462429[_0x537445(0x26b)][_0x537445(0x210)]='2px\x20solid\x20'+this[_0x537445(0x274)](_0x6cb6b4[_0x537445(0x255)]),_0x462429[_0x537445(0x26b)][_0x537445(0x1e6)]=_0x537445(0x253),_0x462429[_0x537445(0x26b)][_0x537445(0x238)]=_0x537445(0x29a),_0x462429[_0x537445(0x26b)][_0x537445(0x2a4)]=_0x537445(0x2a0),_0x462429['style']['cursor']=_0x537445(0x256),_0x462429[_0x537445(0x296)]=()=>{const _0x1dca79=_0x537445;document[_0x1dca79(0x283)][_0x1dca79(0x26e)](_0x2fdede),_0x1c0907();},_0x4e7d5d[_0x537445(0x2b2)](_0x462429);const _0x5d937f=document[_0x537445(0x285)](_0x537445(0x201));_0x5d937f[_0x537445(0x266)]=_0x37889f,_0x5d937f[_0x537445(0x26b)][_0x537445(0x1fc)]='1',_0x5d937f[_0x537445(0x26b)][_0x537445(0x2c3)]=_0x537445(0x22d),_0x5d937f['style'][_0x537445(0x1dd)]=_0x537445(0x284),_0x5d937f['style']['backgroundColor']=this[_0x537445(0x274)](_0x44159f[_0x537445(0x260)]),_0x5d937f[_0x537445(0x26b)][_0x537445(0x278)]=this['hexToColor'](_0x44159f['textColor']),_0x5d937f['style'][_0x537445(0x210)]=_0x537445(0x288)+this[_0x537445(0x274)](_0x44159f[_0x537445(0x255)]),_0x5d937f['style'][_0x537445(0x1e6)]=_0x537445(0x253),_0x5d937f[_0x537445(0x26b)][_0x537445(0x238)]=_0x537445(0x29a),_0x5d937f['style'][_0x537445(0x2a4)]=_0x537445(0x2a0),_0x5d937f[_0x537445(0x26b)]['cursor']=_0x537445(0x256),_0x5d937f[_0x537445(0x296)]=()=>{const _0xb311cf=_0x537445;document['body'][_0xb311cf(0x26e)](_0x2fdede),this[_0xb311cf(0x20a)](_0x3bae9f,!0x0,!0x0,!0x1),_0x5ec6bd();},_0x4e7d5d['appendChild'](_0x5d937f);}else{if(_0x145e81&&''!==_0x145e81['trim']()){const _0x49fa60=document[_0x537445(0x285)]('button');_0x49fa60[_0x537445(0x266)]=_0x145e81,_0x49fa60[_0x537445(0x26b)][_0x537445(0x22e)]=_0x537445(0x1f8),_0x49fa60[_0x537445(0x26b)]['padding']=_0x537445(0x284),_0x49fa60[_0x537445(0x26b)][_0x537445(0x260)]=this[_0x537445(0x274)](_0x6cb6b4['backgroundColor']),_0x49fa60[_0x537445(0x26b)][_0x537445(0x278)]=this[_0x537445(0x274)](_0x6cb6b4['textColor']),_0x49fa60['style']['border']=_0x537445(0x288)+this[_0x537445(0x274)](_0x6cb6b4[_0x537445(0x255)]),_0x49fa60[_0x537445(0x26b)]['borderRadius']=_0x537445(0x253),_0x49fa60[_0x537445(0x26b)][_0x537445(0x238)]=_0x537445(0x29a),_0x49fa60[_0x537445(0x26b)][_0x537445(0x2a4)]=_0x537445(0x2a0),_0x49fa60[_0x537445(0x26b)][_0x537445(0x1f7)]=_0x537445(0x256),_0x49fa60['onclick']=()=>{const _0x42fd35=_0x537445;document[_0x42fd35(0x283)][_0x42fd35(0x26e)](_0x2fdede),this[_0x42fd35(0x20a)](_0x3bae9f,!0x0,!0x0,!0x1),_0x1c0907();},_0x4e7d5d[_0x537445(0x2b2)](_0x49fa60);}}_0x11ebe9[_0x537445(0x2b2)](_0x5541e4),_0x11ebe9[_0x537445(0x2b2)](_0x1f31a2),_0x1f31a2[_0x537445(0x2b2)](_0x4e7d5d),_0x2fdede[_0x537445(0x2b2)](_0x11ebe9),document[_0x537445(0x283)][_0x537445(0x2b2)](_0x2fdede),_0x1ddb73&&setTimeout(()=>{const _0x404c08=_0x537445;document['body'][_0x404c08(0x1fd)](_0x2fdede)&&document['body']['removeChild'](_0x2fdede);},0x3e8*parseInt(_0x391908)),_0x2fdede[_0x537445(0x1d5)]('click',_0x50278c=>{const _0x428f65=_0x537445;_0x50278c['target']===_0x2fdede&&document[_0x428f65(0x283)][_0x428f65(0x26e)](_0x2fdede);});}async[_0x1e52a2(0x20a)](_0x25aea0,_0x432cbe,_0x552629,_0xe84616){const _0x2f1556=_0x1e52a2,_0x2302be=await this[_0x2f1556(0x25a)](_0x25aea0,_0x552629,_0x432cbe,_0xe84616);await this[_0x2f1556(0x2ac)](_0x2302be);}async[_0x1e52a2(0x206)](_0x586126){const _0x4efcdf=_0x1e52a2;this['currentUser']&&this[_0x4efcdf(0x1d9)]||((0x0,_0x2d124f['log'])(this[_0x4efcdf(0x1e1)],_0x4efcdf(0x26f)),await this['initialize']()),(this[_0x4efcdf(0x257)][_0x4efcdf(0x239)]>0x0||this['purchaseBatch']['length']>0x0||Object['keys'](this[_0x4efcdf(0x22b)])[_0x4efcdf(0x239)]>0x0)&&await this[_0x4efcdf(0x244)]();const _0x2f91a0=await this[_0x4efcdf(0x25a)](_0x586126,!0x0,!0x0);await this['processCampaignClick'](_0x2f91a0);}async[_0x1e52a2(0x2ac)](_0x2db03e){const _0x14f809=_0x1e52a2;try{const _0x4e6b0b=await fetch(this[_0x14f809(0x25f)]+_0x14f809(0x21d),{'method':_0x14f809(0x299),'headers':{'Content-Type':_0x14f809(0x217),'x-api-key':this['apiKey']},'body':JSON[_0x14f809(0x1f2)](_0x2db03e)});if(!_0x4e6b0b['ok'])throw new Error(_0x14f809(0x1ea)+_0x4e6b0b['status']);this[_0x14f809(0x1e1)]&&(0x0,_0x2d124f[_0x14f809(0x2b6)])(this['debug'],'process\x20campaign\x20click\x20dispatched\x20successfully:\x20'+_0x2db03e['campaignId']);}catch(_0x5ce406){throw(0x0,_0x2d124f[_0x14f809(0x2b6)])(this[_0x14f809(0x1e1)],_0x14f809(0x276),_0x5ce406),_0x5ce406;}}async['buildCampaignPayload'](_0x1ab526,_0x466eac,_0x558e4b,_0x2b178b){const _0x2bf97c=_0x1e52a2;var _0x17a64d,_0x41097a;const _0x365d5e=Date['now'](),_0x4715cd={'campaignId':_0x1ab526,'opened':_0x466eac,'clicked':_0x558e4b,'deviceId':this[_0x2bf97c(0x1f6)],'timestamp':_0x365d5e,'userId':null===(_0x17a64d=this[_0x2bf97c(0x1f3)])||void 0x0===_0x17a64d?void 0x0:_0x17a64d['id'],'guestUserId':null===(_0x41097a=this[_0x2bf97c(0x1f3)])||void 0x0===_0x41097a?void 0x0:_0x41097a[_0x2bf97c(0x2b9)],'deviceInfo':this[_0x2bf97c(0x1d9)]};return void 0x0!==_0x2b178b&&(_0x4715cd[_0x2bf97c(0x248)]=_0x2b178b),_0x4715cd;}};},0xb6(_0x462da1,_0x25f2e4,_0x5756a5){const _0x3e8e3f=a0_0xac42;Object[_0x3e8e3f(0x1e4)](_0x25f2e4,_0x3e8e3f(0x1d7),{'value':!0x0}),_0x25f2e4['version']=_0x25f2e4[_0x3e8e3f(0x1fe)]=_0x25f2e4['v7']=_0x25f2e4[_0x3e8e3f(0x262)]=_0x25f2e4['v6']=_0x25f2e4['v5']=_0x25f2e4['v4']=_0x25f2e4['v3']=_0x25f2e4[_0x3e8e3f(0x204)]=_0x25f2e4['v1']=_0x25f2e4[_0x3e8e3f(0x1f2)]=_0x25f2e4['parse']=_0x25f2e4[_0x3e8e3f(0x28a)]=_0x25f2e4[_0x3e8e3f(0x29d)]=void 0x0;var _0x2c82da=_0x5756a5(0xc4);Object[_0x3e8e3f(0x1e4)](_0x25f2e4,_0x3e8e3f(0x29d),{'enumerable':!0x0,'get':function(){const _0x476a2f=_0x3e8e3f;return _0x2c82da[_0x476a2f(0x23a)];}});var _0x4b1104=_0x5756a5(0x1d1);Object['defineProperty'](_0x25f2e4,_0x3e8e3f(0x28a),{'enumerable':!0x0,'get':function(){return _0x4b1104['default'];}});var _0x1ac90f=_0x5756a5(0x31d);Object[_0x3e8e3f(0x1e4)](_0x25f2e4,_0x3e8e3f(0x298),{'enumerable':!0x0,'get':function(){return _0x1ac90f['default'];}});var _0x2a9062=_0x5756a5(0xb);Object[_0x3e8e3f(0x1e4)](_0x25f2e4,'stringify',{'enumerable':!0x0,'get':function(){const _0x33e643=_0x3e8e3f;return _0x2a9062[_0x33e643(0x23a)];}});var _0xe82edd=_0x5756a5(0x1a9);Object[_0x3e8e3f(0x1e4)](_0x25f2e4,'v1',{'enumerable':!0x0,'get':function(){const _0x37f177=_0x3e8e3f;return _0xe82edd[_0x37f177(0x23a)];}});var _0x365ee7=_0x5756a5(0x238);Object['defineProperty'](_0x25f2e4,_0x3e8e3f(0x204),{'enumerable':!0x0,'get':function(){const _0x41188f=_0x3e8e3f;return _0x365ee7[_0x41188f(0x23a)];}});var _0x45367a=_0x5756a5(0x24f);Object[_0x3e8e3f(0x1e4)](_0x25f2e4,'v3',{'enumerable':!0x0,'get':function(){const _0x470f2a=_0x3e8e3f;return _0x45367a[_0x470f2a(0x23a)];}});var _0x33b5f5=_0x5756a5(0x11e);Object[_0x3e8e3f(0x1e4)](_0x25f2e4,'v4',{'enumerable':!0x0,'get':function(){return _0x33b5f5['default'];}});var _0x5c9ac5=_0x5756a5(0x22d);Object[_0x3e8e3f(0x1e4)](_0x25f2e4,'v5',{'enumerable':!0x0,'get':function(){const _0x323582=_0x3e8e3f;return _0x5c9ac5[_0x323582(0x23a)];}});var _0x4bc965=_0x5756a5(0x164);Object[_0x3e8e3f(0x1e4)](_0x25f2e4,'v6',{'enumerable':!0x0,'get':function(){const _0x136826=_0x3e8e3f;return _0x4bc965[_0x136826(0x23a)];}});var _0x10a366=_0x5756a5(0x10c);Object['defineProperty'](_0x25f2e4,_0x3e8e3f(0x262),{'enumerable':!0x0,'get':function(){return _0x10a366['default'];}});var _0x37d94a=_0x5756a5(0x12b);Object[_0x3e8e3f(0x1e4)](_0x25f2e4,'v7',{'enumerable':!0x0,'get':function(){const _0x3ef984=_0x3e8e3f;return _0x37d94a[_0x3ef984(0x23a)];}});var _0x5a280e=_0x5756a5(0x2ea);Object[_0x3e8e3f(0x1e4)](_0x25f2e4,_0x3e8e3f(0x1fe),{'enumerable':!0x0,'get':function(){const _0x51066c=_0x3e8e3f;return _0x5a280e[_0x51066c(0x23a)];}});var _0x32969f=_0x5756a5(0x302);Object[_0x3e8e3f(0x1e4)](_0x25f2e4,_0x3e8e3f(0x273),{'enumerable':!0x0,'get':function(){return _0x32969f['default'];}});},0xc4(_0x51fabd,_0x5dcd2a){const _0x114513=a0_0xac42;Object[_0x114513(0x1e4)](_0x5dcd2a,_0x114513(0x1d7),{'value':!0x0}),_0x5dcd2a['default']='ffffffff-ffff-ffff-ffff-ffffffffffff';},0x152(_0x46ea57,_0x19f80b){const _0x24079b=a0_0xac42;function _0x46b27e(_0x4df0be){return 0xe+(_0x4df0be+0x40>>>0x9<<0x4)+0x1;}function _0x38a964(_0x377d6c,_0x11b7fd){const _0x3dcca5=(0xffff&_0x377d6c)+(0xffff&_0x11b7fd);return(_0x377d6c>>0x10)+(_0x11b7fd>>0x10)+(_0x3dcca5>>0x10)<<0x10|0xffff&_0x3dcca5;}function _0x1b6aa7(_0x23debf,_0x1f0897,_0x19221c,_0x4dba63,_0x236f48,_0x199a4d){return _0x38a964(function _0x57dc28(_0x243832,_0x29131c){return _0x243832<<_0x29131c|_0x243832>>>0x20-_0x29131c;}(_0x38a964(_0x38a964(_0x1f0897,_0x23debf),_0x38a964(_0x4dba63,_0x199a4d)),_0x236f48),_0x19221c);}function _0x58a62d(_0x1fd378,_0x3b483e,_0x4a0211,_0x1fe2af,_0x1c30f5,_0x360548,_0x2366eb){return _0x1b6aa7(_0x3b483e&_0x4a0211|~_0x3b483e&_0x1fe2af,_0x1fd378,_0x3b483e,_0x1c30f5,_0x360548,_0x2366eb);}function _0x17ce76(_0x459a52,_0x4bd37c,_0x57a13d,_0x6d7b36,_0x45cc9d,_0x1facb3,_0x1ae039){return _0x1b6aa7(_0x4bd37c&_0x6d7b36|_0x57a13d&~_0x6d7b36,_0x459a52,_0x4bd37c,_0x45cc9d,_0x1facb3,_0x1ae039);}function _0x2e7014(_0x5c870a,_0x397315,_0x1b2732,_0x1d9365,_0x2b2fb4,_0x383ec8,_0x5c4e9c){return _0x1b6aa7(_0x397315^_0x1b2732^_0x1d9365,_0x5c870a,_0x397315,_0x2b2fb4,_0x383ec8,_0x5c4e9c);}function _0x5ba823(_0x4a6799,_0x30ec5e,_0x384684,_0xabfc97,_0x55cc7f,_0x15cd6e,_0x38f7c2){return _0x1b6aa7(_0x384684^(_0x30ec5e|~_0xabfc97),_0x4a6799,_0x30ec5e,_0x55cc7f,_0x15cd6e,_0x38f7c2);}Object[_0x24079b(0x1e4)](_0x19f80b,_0x24079b(0x1d7),{'value':!0x0}),_0x19f80b[_0x24079b(0x23a)]=function _0x50a114(_0x4c2a6e){return function _0x14a2f5(_0xd99ee6){const _0x19d4d0=a0_0xac42,_0x39cce1=new Uint8Array(0x4*_0xd99ee6['length']);for(let _0x2ddce4=0x0;_0x2ddce4<0x4*_0xd99ee6[_0x19d4d0(0x239)];_0x2ddce4++)_0x39cce1[_0x2ddce4]=_0xd99ee6[_0x2ddce4>>0x2]>>>_0x2ddce4%0x4*0x8&0xff;return _0x39cce1;}(function _0x3f3c82(_0x3ee7be,_0x163ca3){const _0x1a08ab=a0_0xac42,_0x344e3a=new Uint32Array(_0x46b27e(_0x163ca3))[_0x1a08ab(0x281)](0x0);_0x344e3a[_0x1a08ab(0x2ab)](_0x3ee7be),_0x344e3a[_0x163ca3>>0x5]|=0x80<<_0x163ca3%0x20,_0x344e3a[_0x344e3a[_0x1a08ab(0x239)]-0x1]=_0x163ca3,_0x3ee7be=_0x344e3a;let _0x4f38e7=0x67452301,_0xb40027=-0x10325477,_0x3b3604=-0x67452302,_0x19257b=0x10325476;for(let _0x47de6a=0x0;_0x47de6a<_0x3ee7be[_0x1a08ab(0x239)];_0x47de6a+=0x10){const _0x45c1fd=_0x4f38e7,_0x911ed2=_0xb40027,_0x2556bc=_0x3b3604,_0x62e143=_0x19257b;_0x4f38e7=_0x58a62d(_0x4f38e7,_0xb40027,_0x3b3604,_0x19257b,_0x3ee7be[_0x47de6a],0x7,-0x28955b88),_0x19257b=_0x58a62d(_0x19257b,_0x4f38e7,_0xb40027,_0x3b3604,_0x3ee7be[_0x47de6a+0x1],0xc,-0x173848aa),_0x3b3604=_0x58a62d(_0x3b3604,_0x19257b,_0x4f38e7,_0xb40027,_0x3ee7be[_0x47de6a+0x2],0x11,0x242070db),_0xb40027=_0x58a62d(_0xb40027,_0x3b3604,_0x19257b,_0x4f38e7,_0x3ee7be[_0x47de6a+0x3],0x16,-0x3e423112),_0x4f38e7=_0x58a62d(_0x4f38e7,_0xb40027,_0x3b3604,_0x19257b,_0x3ee7be[_0x47de6a+0x4],0x7,-0xa83f051),_0x19257b=_0x58a62d(_0x19257b,_0x4f38e7,_0xb40027,_0x3b3604,_0x3ee7be[_0x47de6a+0x5],0xc,0x4787c62a),_0x3b3604=_0x58a62d(_0x3b3604,_0x19257b,_0x4f38e7,_0xb40027,_0x3ee7be[_0x47de6a+0x6],0x11,-0x57cfb9ed),_0xb40027=_0x58a62d(_0xb40027,_0x3b3604,_0x19257b,_0x4f38e7,_0x3ee7be[_0x47de6a+0x7],0x16,-0x2b96aff),_0x4f38e7=_0x58a62d(_0x4f38e7,_0xb40027,_0x3b3604,_0x19257b,_0x3ee7be[_0x47de6a+0x8],0x7,0x698098d8),_0x19257b=_0x58a62d(_0x19257b,_0x4f38e7,_0xb40027,_0x3b3604,_0x3ee7be[_0x47de6a+0x9],0xc,-0x74bb0851),_0x3b3604=_0x58a62d(_0x3b3604,_0x19257b,_0x4f38e7,_0xb40027,_0x3ee7be[_0x47de6a+0xa],0x11,-0xa44f),_0xb40027=_0x58a62d(_0xb40027,_0x3b3604,_0x19257b,_0x4f38e7,_0x3ee7be[_0x47de6a+0xb],0x16,-0x76a32842),_0x4f38e7=_0x58a62d(_0x4f38e7,_0xb40027,_0x3b3604,_0x19257b,_0x3ee7be[_0x47de6a+0xc],0x7,0x6b901122),_0x19257b=_0x58a62d(_0x19257b,_0x4f38e7,_0xb40027,_0x3b3604,_0x3ee7be[_0x47de6a+0xd],0xc,-0x2678e6d),_0x3b3604=_0x58a62d(_0x3b3604,_0x19257b,_0x4f38e7,_0xb40027,_0x3ee7be[_0x47de6a+0xe],0x11,-0x5986bc72),_0xb40027=_0x58a62d(_0xb40027,_0x3b3604,_0x19257b,_0x4f38e7,_0x3ee7be[_0x47de6a+0xf],0x16,0x49b40821),_0x4f38e7=_0x17ce76(_0x4f38e7,_0xb40027,_0x3b3604,_0x19257b,_0x3ee7be[_0x47de6a+0x1],0x5,-0x9e1da9e),_0x19257b=_0x17ce76(_0x19257b,_0x4f38e7,_0xb40027,_0x3b3604,_0x3ee7be[_0x47de6a+0x6],0x9,-0x3fbf4cc0),_0x3b3604=_0x17ce76(_0x3b3604,_0x19257b,_0x4f38e7,_0xb40027,_0x3ee7be[_0x47de6a+0xb],0xe,0x265e5a51),_0xb40027=_0x17ce76(_0xb40027,_0x3b3604,_0x19257b,_0x4f38e7,_0x3ee7be[_0x47de6a],0x14,-0x16493856),_0x4f38e7=_0x17ce76(_0x4f38e7,_0xb40027,_0x3b3604,_0x19257b,_0x3ee7be[_0x47de6a+0x5],0x5,-0x29d0efa3),_0x19257b=_0x17ce76(_0x19257b,_0x4f38e7,_0xb40027,_0x3b3604,_0x3ee7be[_0x47de6a+0xa],0x9,0x2441453),_0x3b3604=_0x17ce76(_0x3b3604,_0x19257b,_0x4f38e7,_0xb40027,_0x3ee7be[_0x47de6a+0xf],0xe,-0x275e197f),_0xb40027=_0x17ce76(_0xb40027,_0x3b3604,_0x19257b,_0x4f38e7,_0x3ee7be[_0x47de6a+0x4],0x14,-0x182c0438),_0x4f38e7=_0x17ce76(_0x4f38e7,_0xb40027,_0x3b3604,_0x19257b,_0x3ee7be[_0x47de6a+0x9],0x5,0x21e1cde6),_0x19257b=_0x17ce76(_0x19257b,_0x4f38e7,_0xb40027,_0x3b3604,_0x3ee7be[_0x47de6a+0xe],0x9,-0x3cc8f82a),_0x3b3604=_0x17ce76(_0x3b3604,_0x19257b,_0x4f38e7,_0xb40027,_0x3ee7be[_0x47de6a+0x3],0xe,-0xb2af279),_0xb40027=_0x17ce76(_0xb40027,_0x3b3604,_0x19257b,_0x4f38e7,_0x3ee7be[_0x47de6a+0x8],0x14,0x455a14ed),_0x4f38e7=_0x17ce76(_0x4f38e7,_0xb40027,_0x3b3604,_0x19257b,_0x3ee7be[_0x47de6a+0xd],0x5,-0x561c16fb),_0x19257b=_0x17ce76(_0x19257b,_0x4f38e7,_0xb40027,_0x3b3604,_0x3ee7be[_0x47de6a+0x2],0x9,-0x3105c08),_0x3b3604=_0x17ce76(_0x3b3604,_0x19257b,_0x4f38e7,_0xb40027,_0x3ee7be[_0x47de6a+0x7],0xe,0x676f02d9),_0xb40027=_0x17ce76(_0xb40027,_0x3b3604,_0x19257b,_0x4f38e7,_0x3ee7be[_0x47de6a+0xc],0x14,-0x72d5b376),_0x4f38e7=_0x2e7014(_0x4f38e7,_0xb40027,_0x3b3604,_0x19257b,_0x3ee7be[_0x47de6a+0x5],0x4,-0x5c6be),_0x19257b=_0x2e7014(_0x19257b,_0x4f38e7,_0xb40027,_0x3b3604,_0x3ee7be[_0x47de6a+0x8],0xb,-0x788e097f),_0x3b3604=_0x2e7014(_0x3b3604,_0x19257b,_0x4f38e7,_0xb40027,_0x3ee7be[_0x47de6a+0xb],0x10,0x6d9d6122),_0xb40027=_0x2e7014(_0xb40027,_0x3b3604,_0x19257b,_0x4f38e7,_0x3ee7be[_0x47de6a+0xe],0x17,-0x21ac7f4),_0x4f38e7=_0x2e7014(_0x4f38e7,_0xb40027,_0x3b3604,_0x19257b,_0x3ee7be[_0x47de6a+0x1],0x4,-0x5b4115bc),_0x19257b=_0x2e7014(_0x19257b,_0x4f38e7,_0xb40027,_0x3b3604,_0x3ee7be[_0x47de6a+0x4],0xb,0x4bdecfa9),_0x3b3604=_0x2e7014(_0x3b3604,_0x19257b,_0x4f38e7,_0xb40027,_0x3ee7be[_0x47de6a+0x7],0x10,-0x944b4a0),_0xb40027=_0x2e7014(_0xb40027,_0x3b3604,_0x19257b,_0x4f38e7,_0x3ee7be[_0x47de6a+0xa],0x17,-0x41404390),_0x4f38e7=_0x2e7014(_0x4f38e7,_0xb40027,_0x3b3604,_0x19257b,_0x3ee7be[_0x47de6a+0xd],0x4,0x289b7ec6),_0x19257b=_0x2e7014(_0x19257b,_0x4f38e7,_0xb40027,_0x3b3604,_0x3ee7be[_0x47de6a],0xb,-0x155ed806),_0x3b3604=_0x2e7014(_0x3b3604,_0x19257b,_0x4f38e7,_0xb40027,_0x3ee7be[_0x47de6a+0x3],0x10,-0x2b10cf7b),_0xb40027=_0x2e7014(_0xb40027,_0x3b3604,_0x19257b,_0x4f38e7,_0x3ee7be[_0x47de6a+0x6],0x17,0x4881d05),_0x4f38e7=_0x2e7014(_0x4f38e7,_0xb40027,_0x3b3604,_0x19257b,_0x3ee7be[_0x47de6a+0x9],0x4,-0x262b2fc7),_0x19257b=_0x2e7014(_0x19257b,_0x4f38e7,_0xb40027,_0x3b3604,_0x3ee7be[_0x47de6a+0xc],0xb,-0x1924661b),_0x3b3604=_0x2e7014(_0x3b3604,_0x19257b,_0x4f38e7,_0xb40027,_0x3ee7be[_0x47de6a+0xf],0x10,0x1fa27cf8),_0xb40027=_0x2e7014(_0xb40027,_0x3b3604,_0x19257b,_0x4f38e7,_0x3ee7be[_0x47de6a+0x2],0x17,-0x3b53a99b),_0x4f38e7=_0x5ba823(_0x4f38e7,_0xb40027,_0x3b3604,_0x19257b,_0x3ee7be[_0x47de6a],0x6,-0xbd6ddbc),_0x19257b=_0x5ba823(_0x19257b,_0x4f38e7,_0xb40027,_0x3b3604,_0x3ee7be[_0x47de6a+0x7],0xa,0x432aff97),_0x3b3604=_0x5ba823(_0x3b3604,_0x19257b,_0x4f38e7,_0xb40027,_0x3ee7be[_0x47de6a+0xe],0xf,-0x546bdc59),_0xb40027=_0x5ba823(_0xb40027,_0x3b3604,_0x19257b,_0x4f38e7,_0x3ee7be[_0x47de6a+0x5],0x15,-0x36c5fc7),_0x4f38e7=_0x5ba823(_0x4f38e7,_0xb40027,_0x3b3604,_0x19257b,_0x3ee7be[_0x47de6a+0xc],0x6,0x655b59c3),_0x19257b=_0x5ba823(_0x19257b,_0x4f38e7,_0xb40027,_0x3b3604,_0x3ee7be[_0x47de6a+0x3],0xa,-0x70f3336e),_0x3b3604=_0x5ba823(_0x3b3604,_0x19257b,_0x4f38e7,_0xb40027,_0x3ee7be[_0x47de6a+0xa],0xf,-0x100b83),_0xb40027=_0x5ba823(_0xb40027,_0x3b3604,_0x19257b,_0x4f38e7,_0x3ee7be[_0x47de6a+0x1],0x15,-0x7a7ba22f),_0x4f38e7=_0x5ba823(_0x4f38e7,_0xb40027,_0x3b3604,_0x19257b,_0x3ee7be[_0x47de6a+0x8],0x6,0x6fa87e4f),_0x19257b=_0x5ba823(_0x19257b,_0x4f38e7,_0xb40027,_0x3b3604,_0x3ee7be[_0x47de6a+0xf],0xa,-0x1d31920),_0x3b3604=_0x5ba823(_0x3b3604,_0x19257b,_0x4f38e7,_0xb40027,_0x3ee7be[_0x47de6a+0x6],0xf,-0x5cfebcec),_0xb40027=_0x5ba823(_0xb40027,_0x3b3604,_0x19257b,_0x4f38e7,_0x3ee7be[_0x47de6a+0xd],0x15,0x4e0811a1),_0x4f38e7=_0x5ba823(_0x4f38e7,_0xb40027,_0x3b3604,_0x19257b,_0x3ee7be[_0x47de6a+0x4],0x6,-0x8ac817e),_0x19257b=_0x5ba823(_0x19257b,_0x4f38e7,_0xb40027,_0x3b3604,_0x3ee7be[_0x47de6a+0xb],0xa,-0x42c50dcb),_0x3b3604=_0x5ba823(_0x3b3604,_0x19257b,_0x4f38e7,_0xb40027,_0x3ee7be[_0x47de6a+0x2],0xf,0x2ad7d2bb),_0xb40027=_0x5ba823(_0xb40027,_0x3b3604,_0x19257b,_0x4f38e7,_0x3ee7be[_0x47de6a+0x9],0x15,-0x14792c6f),_0x4f38e7=_0x38a964(_0x4f38e7,_0x45c1fd),_0xb40027=_0x38a964(_0xb40027,_0x911ed2),_0x3b3604=_0x38a964(_0x3b3604,_0x2556bc),_0x19257b=_0x38a964(_0x19257b,_0x62e143);}return Uint32Array['of'](_0x4f38e7,_0xb40027,_0x3b3604,_0x19257b);}(function _0x236ab1(_0x3635c1){const _0x22723d=a0_0xac42;if(0x0===_0x3635c1[_0x22723d(0x239)])return new Uint32Array();const _0x35dcd8=new Uint32Array(_0x46b27e(0x8*_0x3635c1[_0x22723d(0x239)]))[_0x22723d(0x281)](0x0);for(let _0x522930=0x0;_0x522930<_0x3635c1['length'];_0x522930++)_0x35dcd8[_0x522930>>0x2]|=(0xff&_0x3635c1[_0x522930])<<_0x522930%0x4*0x8;return _0x35dcd8;}(_0x4c2a6e),0x8*_0x4c2a6e['length']));};},0x30b(_0x11914c,_0x1e130f){const _0x3caa78=a0_0xac42;Object[_0x3caa78(0x1e4)](_0x1e130f,'__esModule',{'value':!0x0});const _0x12fed6='undefined'!=typeof crypto&&crypto['randomUUID']&&crypto[_0x3caa78(0x251)][_0x3caa78(0x21f)](crypto);_0x1e130f[_0x3caa78(0x23a)]={'randomUUID':_0x12fed6};},0x1d1(_0x1a79b4,_0x16c0bb){const _0x2abcae=a0_0xac42;Object[_0x2abcae(0x1e4)](_0x16c0bb,_0x2abcae(0x1d7),{'value':!0x0}),_0x16c0bb['default']='00000000-0000-0000-0000-000000000000';},0x31d(_0xcbb1e2,_0x344d02,_0xb7ea69){const _0x37d76a=a0_0xac42;Object['defineProperty'](_0x344d02,_0x37d76a(0x1d7),{'value':!0x0});const _0x16d6a0=_0xb7ea69(0x2ea);_0x344d02[_0x37d76a(0x23a)]=function _0x355a7a(_0x56483d){const _0x2fa449=_0x37d76a;if(!(0x0,_0x16d6a0[_0x2fa449(0x23a)])(_0x56483d))throw TypeError(_0x2fa449(0x211));let _0x354c3d;return Uint8Array['of']((_0x354c3d=parseInt(_0x56483d['slice'](0x0,0x8),0x10))>>>0x18,_0x354c3d>>>0x10&0xff,_0x354c3d>>>0x8&0xff,0xff&_0x354c3d,(_0x354c3d=parseInt(_0x56483d[_0x2fa449(0x2ad)](0x9,0xd),0x10))>>>0x8,0xff&_0x354c3d,(_0x354c3d=parseInt(_0x56483d['slice'](0xe,0x12),0x10))>>>0x8,0xff&_0x354c3d,(_0x354c3d=parseInt(_0x56483d[_0x2fa449(0x2ad)](0x13,0x17),0x10))>>>0x8,0xff&_0x354c3d,(_0x354c3d=parseInt(_0x56483d['slice'](0x18,0x24),0x10))/0x10000000000&0xff,_0x354c3d/0x100000000&0xff,_0x354c3d>>>0x18&0xff,_0x354c3d>>>0x10&0xff,_0x354c3d>>>0x8&0xff,0xff&_0x354c3d);};},0x2b9(_0x151f4b,_0x213229){const _0x3cc991=a0_0xac42;Object['defineProperty'](_0x213229,'__esModule',{'value':!0x0}),_0x213229[_0x3cc991(0x23a)]=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;},0x123(_0x906e0d,_0x11829d){const _0x418b64=a0_0xac42;let _0x238225;Object[_0x418b64(0x1e4)](_0x11829d,'__esModule',{'value':!0x0});const _0x1f0919=new Uint8Array(0x10);_0x11829d[_0x418b64(0x23a)]=function _0x10144f(){const _0x45eb0a=_0x418b64;if(!_0x238225){if(_0x45eb0a(0x2aa)==typeof crypto||!crypto['getRandomValues'])throw new Error(_0x45eb0a(0x272));_0x238225=crypto['getRandomValues'][_0x45eb0a(0x21f)](crypto);}return _0x238225(_0x1f0919);};},0x33d(_0x43e483,_0xc942f7){const _0x50a0ae=a0_0xac42;function _0x569d10(_0x4edcf1,_0x7c13bb,_0x563593,_0x200c56){switch(_0x4edcf1){case 0x0:return _0x7c13bb&_0x563593^~_0x7c13bb&_0x200c56;case 0x1:case 0x3:return _0x7c13bb^_0x563593^_0x200c56;case 0x2:return _0x7c13bb&_0x563593^_0x7c13bb&_0x200c56^_0x563593&_0x200c56;}}function _0x120c43(_0xf79643,_0x4801b5){return _0xf79643<<_0x4801b5|_0xf79643>>>0x20-_0x4801b5;}Object[_0x50a0ae(0x1e4)](_0xc942f7,'__esModule',{'value':!0x0}),_0xc942f7[_0x50a0ae(0x23a)]=function _0x4cc295(_0x208bae){const _0x2ac771=_0x50a0ae,_0x12228e=[0x5a827999,0x6ed9eba1,0x8f1bbcdc,0xca62c1d6],_0x299dd9=[0x67452301,0xefcdab89,0x98badcfe,0x10325476,0xc3d2e1f0],_0x554e9c=new Uint8Array(_0x208bae[_0x2ac771(0x239)]+0x1);_0x554e9c[_0x2ac771(0x2ab)](_0x208bae),_0x554e9c[_0x208bae[_0x2ac771(0x239)]]=0x80;const _0xe73011=(_0x208bae=_0x554e9c)[_0x2ac771(0x239)]/0x4+0x2,_0x20e3fd=Math[_0x2ac771(0x21b)](_0xe73011/0x10),_0x51061b=new Array(_0x20e3fd);for(let _0x185727=0x0;_0x185727<_0x20e3fd;++_0x185727){const _0x3e7430=new Uint32Array(0x10);for(let _0x1c47a0=0x0;_0x1c47a0<0x10;++_0x1c47a0)_0x3e7430[_0x1c47a0]=_0x208bae[0x40*_0x185727+0x4*_0x1c47a0]<<0x18|_0x208bae[0x40*_0x185727+0x4*_0x1c47a0+0x1]<<0x10|_0x208bae[0x40*_0x185727+0x4*_0x1c47a0+0x2]<<0x8|_0x208bae[0x40*_0x185727+0x4*_0x1c47a0+0x3];_0x51061b[_0x185727]=_0x3e7430;}_0x51061b[_0x20e3fd-0x1][0xe]=0x8*(_0x208bae[_0x2ac771(0x239)]-0x1)/Math[_0x2ac771(0x2a9)](0x2,0x20),_0x51061b[_0x20e3fd-0x1][0xe]=Math[_0x2ac771(0x25c)](_0x51061b[_0x20e3fd-0x1][0xe]),_0x51061b[_0x20e3fd-0x1][0xf]=0x8*(_0x208bae[_0x2ac771(0x239)]-0x1)&0xffffffff;for(let _0x2bfa65=0x0;_0x2bfa65<_0x20e3fd;++_0x2bfa65){const _0x5ebe8d=new Uint32Array(0x50);for(let _0xc68573=0x0;_0xc68573<0x10;++_0xc68573)_0x5ebe8d[_0xc68573]=_0x51061b[_0x2bfa65][_0xc68573];for(let _0x190b73=0x10;_0x190b73<0x50;++_0x190b73)_0x5ebe8d[_0x190b73]=_0x120c43(_0x5ebe8d[_0x190b73-0x3]^_0x5ebe8d[_0x190b73-0x8]^_0x5ebe8d[_0x190b73-0xe]^_0x5ebe8d[_0x190b73-0x10],0x1);let _0x27d99d=_0x299dd9[0x0],_0xdd8f52=_0x299dd9[0x1],_0x3da0b7=_0x299dd9[0x2],_0x367c84=_0x299dd9[0x3],_0x388462=_0x299dd9[0x4];for(let _0x260e1e=0x0;_0x260e1e<0x50;++_0x260e1e){const _0x18cb8e=Math[_0x2ac771(0x25c)](_0x260e1e/0x14),_0x11efab=_0x120c43(_0x27d99d,0x5)+_0x569d10(_0x18cb8e,_0xdd8f52,_0x3da0b7,_0x367c84)+_0x388462+_0x12228e[_0x18cb8e]+_0x5ebe8d[_0x260e1e]>>>0x0;_0x388462=_0x367c84,_0x367c84=_0x3da0b7,_0x3da0b7=_0x120c43(_0xdd8f52,0x1e)>>>0x0,_0xdd8f52=_0x27d99d,_0x27d99d=_0x11efab;}_0x299dd9[0x0]=_0x299dd9[0x0]+_0x27d99d>>>0x0,_0x299dd9[0x1]=_0x299dd9[0x1]+_0xdd8f52>>>0x0,_0x299dd9[0x2]=_0x299dd9[0x2]+_0x3da0b7>>>0x0,_0x299dd9[0x3]=_0x299dd9[0x3]+_0x367c84>>>0x0,_0x299dd9[0x4]=_0x299dd9[0x4]+_0x388462>>>0x0;}return Uint8Array['of'](_0x299dd9[0x0]>>0x18,_0x299dd9[0x0]>>0x10,_0x299dd9[0x0]>>0x8,_0x299dd9[0x0],_0x299dd9[0x1]>>0x18,_0x299dd9[0x1]>>0x10,_0x299dd9[0x1]>>0x8,_0x299dd9[0x1],_0x299dd9[0x2]>>0x18,_0x299dd9[0x2]>>0x10,_0x299dd9[0x2]>>0x8,_0x299dd9[0x2],_0x299dd9[0x3]>>0x18,_0x299dd9[0x3]>>0x10,_0x299dd9[0x3]>>0x8,_0x299dd9[0x3],_0x299dd9[0x4]>>0x18,_0x299dd9[0x4]>>0x10,_0x299dd9[0x4]>>0x8,_0x299dd9[0x4]);};},0xb(_0x3c12ff,_0x2da549,_0x4417ed){const _0x3b49df=a0_0xac42;Object['defineProperty'](_0x2da549,_0x3b49df(0x1d7),{'value':!0x0}),_0x2da549[_0x3b49df(0x24b)]=void 0x0;const _0xc1b2b8=_0x4417ed(0x2ea),_0x2915e5=[];for(let _0x8bf5f6=0x0;_0x8bf5f6<0x100;++_0x8bf5f6)_0x2915e5['push']((_0x8bf5f6+0x100)['toString'](0x10)['slice'](0x1));function _0x3586cc(_0x1b89a1,_0x12e1f7=0x0){const _0x2e10a0=_0x3b49df;return(_0x2915e5[_0x1b89a1[_0x12e1f7+0x0]]+_0x2915e5[_0x1b89a1[_0x12e1f7+0x1]]+_0x2915e5[_0x1b89a1[_0x12e1f7+0x2]]+_0x2915e5[_0x1b89a1[_0x12e1f7+0x3]]+'-'+_0x2915e5[_0x1b89a1[_0x12e1f7+0x4]]+_0x2915e5[_0x1b89a1[_0x12e1f7+0x5]]+'-'+_0x2915e5[_0x1b89a1[_0x12e1f7+0x6]]+_0x2915e5[_0x1b89a1[_0x12e1f7+0x7]]+'-'+_0x2915e5[_0x1b89a1[_0x12e1f7+0x8]]+_0x2915e5[_0x1b89a1[_0x12e1f7+0x9]]+'-'+_0x2915e5[_0x1b89a1[_0x12e1f7+0xa]]+_0x2915e5[_0x1b89a1[_0x12e1f7+0xb]]+_0x2915e5[_0x1b89a1[_0x12e1f7+0xc]]+_0x2915e5[_0x1b89a1[_0x12e1f7+0xd]]+_0x2915e5[_0x1b89a1[_0x12e1f7+0xe]]+_0x2915e5[_0x1b89a1[_0x12e1f7+0xf]])[_0x2e10a0(0x1e9)]();}_0x2da549[_0x3b49df(0x24b)]=_0x3586cc,_0x2da549[_0x3b49df(0x23a)]=function _0x58a869(_0x25492f,_0x1fff56=0x0){const _0x3ae72e=_0x3b49df,_0x2923e3=_0x3586cc(_0x25492f,_0x1fff56);if(!(0x0,_0xc1b2b8[_0x3ae72e(0x23a)])(_0x2923e3))throw TypeError('Stringified\x20UUID\x20is\x20invalid');return _0x2923e3;};},0x1a9(_0x19266e,_0x3ec4cd,_0x5eae0e){const _0x53a3b2=a0_0xac42;Object[_0x53a3b2(0x1e4)](_0x3ec4cd,_0x53a3b2(0x1d7),{'value':!0x0}),_0x3ec4cd[_0x53a3b2(0x212)]=void 0x0;const _0x1e8ade=_0x5eae0e(0x123),_0x59bbcb=_0x5eae0e(0xb),_0x18ec92={};function _0x3b3b44(_0xec6764,_0x2abcf4,_0xc631c6){const _0x3697e5=_0x53a3b2;return _0xec6764[_0x3697e5(0x2b8)]??=-0x1/0x0,_0xec6764[_0x3697e5(0x264)]??=0x0,_0x2abcf4===_0xec6764['msecs']?(_0xec6764[_0x3697e5(0x264)]++,_0xec6764[_0x3697e5(0x264)]>=0x2710&&(_0xec6764[_0x3697e5(0x23e)]=void 0x0,_0xec6764[_0x3697e5(0x264)]=0x0)):_0x2abcf4>_0xec6764['msecs']?_0xec6764[_0x3697e5(0x264)]=0x0:_0x2abcf4<_0xec6764['msecs']&&(_0xec6764[_0x3697e5(0x23e)]=void 0x0),_0xec6764[_0x3697e5(0x23e)]||(_0xec6764[_0x3697e5(0x23e)]=_0xc631c6[_0x3697e5(0x2ad)](0xa,0x10),_0xec6764[_0x3697e5(0x23e)][0x0]|=0x1,_0xec6764[_0x3697e5(0x22c)]=0x3fff&(_0xc631c6[0x8]<<0x8|_0xc631c6[0x9])),_0xec6764[_0x3697e5(0x2b8)]=_0x2abcf4,_0xec6764;}function _0x3658e4(_0xff1666,_0x2a727c,_0x1801a0,_0xbf9dc8,_0x4c4b7e,_0x363972,_0x326abf=0x0){const _0x5f3f6a=_0x53a3b2;if(_0xff1666[_0x5f3f6a(0x239)]<0x10)throw new Error(_0x5f3f6a(0x292));if(_0x363972){if(_0x326abf<0x0||_0x326abf+0x10>_0x363972[_0x5f3f6a(0x239)])throw new RangeError(_0x5f3f6a(0x2b4)+_0x326abf+':'+(_0x326abf+0xf)+_0x5f3f6a(0x219));}else _0x363972=new Uint8Array(0x10),_0x326abf=0x0;_0x2a727c??=Date[_0x5f3f6a(0x229)](),_0x1801a0??=0x0,_0xbf9dc8??=0x3fff&(_0xff1666[0x8]<<0x8|_0xff1666[0x9]),_0x4c4b7e??=_0xff1666[_0x5f3f6a(0x2ad)](0xa,0x10);const _0x5e3aaa=(0x2710*(0xfffffff&(_0x2a727c+=0xb1d069b5400))+_0x1801a0)%0x100000000;_0x363972[_0x326abf++]=_0x5e3aaa>>>0x18&0xff,_0x363972[_0x326abf++]=_0x5e3aaa>>>0x10&0xff,_0x363972[_0x326abf++]=_0x5e3aaa>>>0x8&0xff,_0x363972[_0x326abf++]=0xff&_0x5e3aaa;const _0x5dea07=_0x2a727c/0x100000000*0x2710&0xfffffff;_0x363972[_0x326abf++]=_0x5dea07>>>0x8&0xff,_0x363972[_0x326abf++]=0xff&_0x5dea07,_0x363972[_0x326abf++]=_0x5dea07>>>0x18&0xf|0x10,_0x363972[_0x326abf++]=_0x5dea07>>>0x10&0xff,_0x363972[_0x326abf++]=_0xbf9dc8>>>0x8|0x80,_0x363972[_0x326abf++]=0xff&_0xbf9dc8;for(let _0x39119d=0x0;_0x39119d<0x6;++_0x39119d)_0x363972[_0x326abf++]=_0x4c4b7e[_0x39119d];return _0x363972;}_0x3ec4cd[_0x53a3b2(0x212)]=_0x3b3b44,_0x3ec4cd[_0x53a3b2(0x23a)]=function _0x3fc94a(_0x5cea27,_0x34d796,_0x18e28c){const _0x48f3f9=_0x53a3b2;let _0x5b7b63;const _0x564a7b=_0x5cea27?.[_0x48f3f9(0x209)]??!0x1;if(_0x5cea27){const _0x5a2ff5=Object[_0x48f3f9(0x27d)](_0x5cea27);0x1===_0x5a2ff5[_0x48f3f9(0x239)]&&_0x48f3f9(0x209)===_0x5a2ff5[0x0]&&(_0x5cea27=void 0x0);}if(_0x5cea27)_0x5b7b63=_0x3658e4(_0x5cea27[_0x48f3f9(0x1ee)]??_0x5cea27[_0x48f3f9(0x242)]?.()??(0x0,_0x1e8ade[_0x48f3f9(0x23a)])(),_0x5cea27[_0x48f3f9(0x2b8)],_0x5cea27['nsecs'],_0x5cea27[_0x48f3f9(0x22c)],_0x5cea27['node'],_0x34d796,_0x18e28c);else{const _0x423174=Date[_0x48f3f9(0x229)](),_0x147744=(0x0,_0x1e8ade[_0x48f3f9(0x23a)])();_0x3b3b44(_0x18ec92,_0x423174,_0x147744),_0x5b7b63=_0x3658e4(_0x147744,_0x18ec92[_0x48f3f9(0x2b8)],_0x18ec92['nsecs'],_0x564a7b?void 0x0:_0x18ec92[_0x48f3f9(0x22c)],_0x564a7b?void 0x0:_0x18ec92['node'],_0x34d796,_0x18e28c);}return _0x34d796??(0x0,_0x59bbcb['unsafeStringify'])(_0x5b7b63);};},0x238(_0x1c7fdd,_0x27541e,_0x5167f3){const _0x1e3f73=a0_0xac42;Object[_0x1e3f73(0x1e4)](_0x27541e,_0x1e3f73(0x1d7),{'value':!0x0});const _0x355956=_0x5167f3(0x31d),_0x5a1f21=_0x5167f3(0xb);_0x27541e[_0x1e3f73(0x23a)]=function _0x35fba5(_0xdbf0d2){const _0x1e876d=_0x1e3f73,_0xf0fa90=function _0x33130c(_0x315c5e){return Uint8Array['of']((0xf&_0x315c5e[0x6])<<0x4|_0x315c5e[0x7]>>0x4&0xf,(0xf&_0x315c5e[0x7])<<0x4|(0xf0&_0x315c5e[0x4])>>0x4,(0xf&_0x315c5e[0x4])<<0x4|(0xf0&_0x315c5e[0x5])>>0x4,(0xf&_0x315c5e[0x5])<<0x4|(0xf0&_0x315c5e[0x0])>>0x4,(0xf&_0x315c5e[0x0])<<0x4|(0xf0&_0x315c5e[0x1])>>0x4,(0xf&_0x315c5e[0x1])<<0x4|(0xf0&_0x315c5e[0x2])>>0x4,0x60|0xf&_0x315c5e[0x2],_0x315c5e[0x3],_0x315c5e[0x8],_0x315c5e[0x9],_0x315c5e[0xa],_0x315c5e[0xb],_0x315c5e[0xc],_0x315c5e[0xd],_0x315c5e[0xe],_0x315c5e[0xf]);}('string'==typeof _0xdbf0d2?(0x0,_0x355956[_0x1e876d(0x23a)])(_0xdbf0d2):_0xdbf0d2);return _0x1e876d(0x289)==typeof _0xdbf0d2?(0x0,_0x5a1f21['unsafeStringify'])(_0xf0fa90):_0xf0fa90;};},0x24f(_0x2bd7b0,_0x52cc69,_0x104959){const _0x4e43bf=a0_0xac42;Object[_0x4e43bf(0x1e4)](_0x52cc69,_0x4e43bf(0x1d7),{'value':!0x0}),_0x52cc69[_0x4e43bf(0x2c7)]=_0x52cc69[_0x4e43bf(0x202)]=void 0x0;const _0x1d805e=_0x104959(0x152),_0x384f9b=_0x104959(0x3dc);var _0x39ee8b=_0x104959(0x3dc);function _0x2334a2(_0x2210a3,_0x21c782,_0x200f8f,_0x40312b){const _0x1c95c9=_0x4e43bf;return(0x0,_0x384f9b[_0x1c95c9(0x23a)])(0x30,_0x1d805e[_0x1c95c9(0x23a)],_0x2210a3,_0x21c782,_0x200f8f,_0x40312b);}Object[_0x4e43bf(0x1e4)](_0x52cc69,_0x4e43bf(0x202),{'enumerable':!0x0,'get':function(){return _0x39ee8b['DNS'];}}),Object[_0x4e43bf(0x1e4)](_0x52cc69,'URL',{'enumerable':!0x0,'get':function(){const _0x45ea86=_0x4e43bf;return _0x39ee8b[_0x45ea86(0x2c7)];}}),_0x2334a2[_0x4e43bf(0x202)]=_0x384f9b[_0x4e43bf(0x202)],_0x2334a2['URL']=_0x384f9b[_0x4e43bf(0x2c7)],_0x52cc69[_0x4e43bf(0x23a)]=_0x2334a2;},0x3dc(_0x539576,_0x3556f2,_0x445fcd){const _0x388a66=a0_0xac42;Object[_0x388a66(0x1e4)](_0x3556f2,_0x388a66(0x1d7),{'value':!0x0}),_0x3556f2[_0x388a66(0x2c7)]=_0x3556f2['DNS']=_0x3556f2[_0x388a66(0x1d6)]=void 0x0;const _0x5efa1b=_0x445fcd(0x31d),_0x325d1b=_0x445fcd(0xb);function _0x4ba659(_0x57c53d){const _0x107489=_0x388a66;_0x57c53d=unescape(encodeURIComponent(_0x57c53d));const _0x41cf6d=new Uint8Array(_0x57c53d['length']);for(let _0x1c4617=0x0;_0x1c4617<_0x57c53d[_0x107489(0x239)];++_0x1c4617)_0x41cf6d[_0x1c4617]=_0x57c53d[_0x107489(0x21a)](_0x1c4617);return _0x41cf6d;}_0x3556f2[_0x388a66(0x1d6)]=_0x4ba659,_0x3556f2[_0x388a66(0x202)]=_0x388a66(0x2c6),_0x3556f2['URL']='6ba7b811-9dad-11d1-80b4-00c04fd430c8',_0x3556f2[_0x388a66(0x23a)]=function _0x6848ad(_0x5386dc,_0x33e13e,_0x480eca,_0x108981,_0x37a442,_0x3a0684){const _0x43f016=_0x388a66,_0x2c05bc=_0x43f016(0x289)==typeof _0x480eca?_0x4ba659(_0x480eca):_0x480eca,_0x157871=_0x43f016(0x289)==typeof _0x108981?(0x0,_0x5efa1b['default'])(_0x108981):_0x108981;if(_0x43f016(0x289)==typeof _0x108981&&(_0x108981=(0x0,_0x5efa1b[_0x43f016(0x23a)])(_0x108981)),0x10!==_0x108981?.['length'])throw TypeError(_0x43f016(0x1f0));let _0x1f72e1=new Uint8Array(0x10+_0x2c05bc['length']);if(_0x1f72e1[_0x43f016(0x2ab)](_0x157871),_0x1f72e1[_0x43f016(0x2ab)](_0x2c05bc,_0x157871['length']),_0x1f72e1=_0x33e13e(_0x1f72e1),_0x1f72e1[0x6]=0xf&_0x1f72e1[0x6]|_0x5386dc,_0x1f72e1[0x8]=0x3f&_0x1f72e1[0x8]|0x80,_0x37a442){_0x3a0684=_0x3a0684||0x0;for(let _0x2d8c8c=0x0;_0x2d8c8c<0x10;++_0x2d8c8c)_0x37a442[_0x3a0684+_0x2d8c8c]=_0x1f72e1[_0x2d8c8c];return _0x37a442;}return(0x0,_0x325d1b['unsafeStringify'])(_0x1f72e1);};},0x11e(_0x2bc92d,_0x15e809,_0x8a6583){const _0x57feb2=a0_0xac42;Object[_0x57feb2(0x1e4)](_0x15e809,_0x57feb2(0x1d7),{'value':!0x0});const _0x235b7e=_0x8a6583(0x30b),_0x4990d1=_0x8a6583(0x123),_0x83d26d=_0x8a6583(0xb);_0x15e809[_0x57feb2(0x23a)]=function _0x4f553f(_0x565510,_0x10dd7b,_0x414122){const _0x4ab4e8=_0x57feb2;if(_0x235b7e[_0x4ab4e8(0x23a)]['randomUUID']&&!_0x10dd7b&&!_0x565510)return _0x235b7e[_0x4ab4e8(0x23a)][_0x4ab4e8(0x251)]();const _0x56abbf=(_0x565510=_0x565510||{})[_0x4ab4e8(0x1ee)]??_0x565510[_0x4ab4e8(0x242)]?.()??(0x0,_0x4990d1[_0x4ab4e8(0x23a)])();if(_0x56abbf[_0x4ab4e8(0x239)]<0x10)throw new Error(_0x4ab4e8(0x292));if(_0x56abbf[0x6]=0xf&_0x56abbf[0x6]|0x40,_0x56abbf[0x8]=0x3f&_0x56abbf[0x8]|0x80,_0x10dd7b){if((_0x414122=_0x414122||0x0)<0x0||_0x414122+0x10>_0x10dd7b[_0x4ab4e8(0x239)])throw new RangeError(_0x4ab4e8(0x2b4)+_0x414122+':'+(_0x414122+0xf)+_0x4ab4e8(0x219));for(let _0x533457=0x0;_0x533457<0x10;++_0x533457)_0x10dd7b[_0x414122+_0x533457]=_0x56abbf[_0x533457];return _0x10dd7b;}return(0x0,_0x83d26d[_0x4ab4e8(0x24b)])(_0x56abbf);};},0x22d(_0x2dee59,_0x14112f,_0x19b787){const _0x56f8c9=a0_0xac42;Object[_0x56f8c9(0x1e4)](_0x14112f,_0x56f8c9(0x1d7),{'value':!0x0}),_0x14112f[_0x56f8c9(0x2c7)]=_0x14112f[_0x56f8c9(0x202)]=void 0x0;const _0x5d9b3d=_0x19b787(0x33d),_0x116782=_0x19b787(0x3dc);var _0x28ce18=_0x19b787(0x3dc);function _0x2e08c4(_0x44c748,_0x27605a,_0x1345ed,_0x1f2e0a){const _0x4f091=_0x56f8c9;return(0x0,_0x116782[_0x4f091(0x23a)])(0x50,_0x5d9b3d['default'],_0x44c748,_0x27605a,_0x1345ed,_0x1f2e0a);}Object[_0x56f8c9(0x1e4)](_0x14112f,_0x56f8c9(0x202),{'enumerable':!0x0,'get':function(){const _0x240181=_0x56f8c9;return _0x28ce18[_0x240181(0x202)];}}),Object[_0x56f8c9(0x1e4)](_0x14112f,_0x56f8c9(0x2c7),{'enumerable':!0x0,'get':function(){const _0x6bac66=_0x56f8c9;return _0x28ce18[_0x6bac66(0x2c7)];}}),_0x2e08c4[_0x56f8c9(0x202)]=_0x116782[_0x56f8c9(0x202)],_0x2e08c4['URL']=_0x116782[_0x56f8c9(0x2c7)],_0x14112f[_0x56f8c9(0x23a)]=_0x2e08c4;},0x164(_0x2385e7,_0x322643,_0x58e8ab){const _0x36fed1=a0_0xac42;Object[_0x36fed1(0x1e4)](_0x322643,_0x36fed1(0x1d7),{'value':!0x0});const _0x1cb9dd=_0x58e8ab(0xb),_0x462ceb=_0x58e8ab(0x1a9),_0xb784e=_0x58e8ab(0x238);_0x322643[_0x36fed1(0x23a)]=function _0x2089c8(_0x572394,_0x52f807,_0x20e19a){const _0x4e1fbd=_0x36fed1;_0x572394??={},_0x20e19a??=0x0;let _0x395839=(0x0,_0x462ceb['default'])({..._0x572394,'_v6':!0x0},new Uint8Array(0x10));if(_0x395839=(0x0,_0xb784e[_0x4e1fbd(0x23a)])(_0x395839),_0x52f807){for(let _0x2c017a=0x0;_0x2c017a<0x10;_0x2c017a++)_0x52f807[_0x20e19a+_0x2c017a]=_0x395839[_0x2c017a];return _0x52f807;}return(0x0,_0x1cb9dd[_0x4e1fbd(0x24b)])(_0x395839);};},0x10c(_0x529031,_0x121a91,_0x7b5eef){const _0x427cf2=a0_0xac42;Object['defineProperty'](_0x121a91,'__esModule',{'value':!0x0});const _0x562638=_0x7b5eef(0x31d),_0x124077=_0x7b5eef(0xb);_0x121a91[_0x427cf2(0x23a)]=function _0x106856(_0x527ea7){const _0x451846=_0x427cf2,_0x43f17a=function _0x15bf11(_0x2c1f99){return Uint8Array['of']((0xf&_0x2c1f99[0x3])<<0x4|_0x2c1f99[0x4]>>0x4&0xf,(0xf&_0x2c1f99[0x4])<<0x4|(0xf0&_0x2c1f99[0x5])>>0x4,(0xf&_0x2c1f99[0x5])<<0x4|0xf&_0x2c1f99[0x6],_0x2c1f99[0x7],(0xf&_0x2c1f99[0x1])<<0x4|(0xf0&_0x2c1f99[0x2])>>0x4,(0xf&_0x2c1f99[0x2])<<0x4|(0xf0&_0x2c1f99[0x3])>>0x4,0x10|(0xf0&_0x2c1f99[0x0])>>0x4,(0xf&_0x2c1f99[0x0])<<0x4|(0xf0&_0x2c1f99[0x1])>>0x4,_0x2c1f99[0x8],_0x2c1f99[0x9],_0x2c1f99[0xa],_0x2c1f99[0xb],_0x2c1f99[0xc],_0x2c1f99[0xd],_0x2c1f99[0xe],_0x2c1f99[0xf]);}(_0x451846(0x289)==typeof _0x527ea7?(0x0,_0x562638[_0x451846(0x23a)])(_0x527ea7):_0x527ea7);return _0x451846(0x289)==typeof _0x527ea7?(0x0,_0x124077[_0x451846(0x24b)])(_0x43f17a):_0x43f17a;};},0x12b(_0x52e768,_0x24f6ce,_0x445cf8){const _0x2d4f0e=a0_0xac42;Object[_0x2d4f0e(0x1e4)](_0x24f6ce,_0x2d4f0e(0x1d7),{'value':!0x0}),_0x24f6ce['updateV7State']=void 0x0;const _0x37e266=_0x445cf8(0x123),_0x44fd8e=_0x445cf8(0xb),_0x2454db={};function _0x1f162b(_0x54a8e8,_0x222013,_0x58074d){const _0x3b368c=_0x2d4f0e;return _0x54a8e8[_0x3b368c(0x2b8)]??=-0x1/0x0,_0x54a8e8[_0x3b368c(0x215)]??=0x0,_0x222013>_0x54a8e8['msecs']?(_0x54a8e8[_0x3b368c(0x215)]=_0x58074d[0x6]<<0x17|_0x58074d[0x7]<<0x10|_0x58074d[0x8]<<0x8|_0x58074d[0x9],_0x54a8e8[_0x3b368c(0x2b8)]=_0x222013):(_0x54a8e8[_0x3b368c(0x215)]=_0x54a8e8['seq']+0x1|0x0,0x0===_0x54a8e8[_0x3b368c(0x215)]&&_0x54a8e8[_0x3b368c(0x2b8)]++),_0x54a8e8;}function _0x3d2875(_0x56f549,_0x14f159,_0x195e62,_0x5ad1a2,_0x133e2e=0x0){const _0x5a5ccb=_0x2d4f0e;if(_0x56f549[_0x5a5ccb(0x239)]<0x10)throw new Error(_0x5a5ccb(0x292));if(_0x5ad1a2){if(_0x133e2e<0x0||_0x133e2e+0x10>_0x5ad1a2[_0x5a5ccb(0x239)])throw new RangeError('UUID\x20byte\x20range\x20'+_0x133e2e+':'+(_0x133e2e+0xf)+_0x5a5ccb(0x219));}else _0x5ad1a2=new Uint8Array(0x10),_0x133e2e=0x0;return _0x14f159??=Date[_0x5a5ccb(0x229)](),_0x195e62??=0x7f*_0x56f549[0x6]<<0x18|_0x56f549[0x7]<<0x10|_0x56f549[0x8]<<0x8|_0x56f549[0x9],_0x5ad1a2[_0x133e2e++]=_0x14f159/0x10000000000&0xff,_0x5ad1a2[_0x133e2e++]=_0x14f159/0x100000000&0xff,_0x5ad1a2[_0x133e2e++]=_0x14f159/0x1000000&0xff,_0x5ad1a2[_0x133e2e++]=_0x14f159/0x10000&0xff,_0x5ad1a2[_0x133e2e++]=_0x14f159/0x100&0xff,_0x5ad1a2[_0x133e2e++]=0xff&_0x14f159,_0x5ad1a2[_0x133e2e++]=0x70|_0x195e62>>>0x1c&0xf,_0x5ad1a2[_0x133e2e++]=_0x195e62>>>0x14&0xff,_0x5ad1a2[_0x133e2e++]=0x80|_0x195e62>>>0xe&0x3f,_0x5ad1a2[_0x133e2e++]=_0x195e62>>>0x6&0xff,_0x5ad1a2[_0x133e2e++]=_0x195e62<<0x2&0xff|0x3&_0x56f549[0xa],_0x5ad1a2[_0x133e2e++]=_0x56f549[0xb],_0x5ad1a2[_0x133e2e++]=_0x56f549[0xc],_0x5ad1a2[_0x133e2e++]=_0x56f549[0xd],_0x5ad1a2[_0x133e2e++]=_0x56f549[0xe],_0x5ad1a2[_0x133e2e++]=_0x56f549[0xf],_0x5ad1a2;}_0x24f6ce[_0x2d4f0e(0x27f)]=_0x1f162b,_0x24f6ce['default']=function _0x2a40a0(_0x16953d,_0x4ba78d,_0x325b93){const _0x18eb0a=_0x2d4f0e;let _0x1fa880;if(_0x16953d)_0x1fa880=_0x3d2875(_0x16953d[_0x18eb0a(0x1ee)]??_0x16953d['rng']?.()??(0x0,_0x37e266[_0x18eb0a(0x23a)])(),_0x16953d[_0x18eb0a(0x2b8)],_0x16953d['seq'],_0x4ba78d,_0x325b93);else{const _0x30269d=Date[_0x18eb0a(0x229)](),_0x198949=(0x0,_0x37e266[_0x18eb0a(0x23a)])();_0x1f162b(_0x2454db,_0x30269d,_0x198949),_0x1fa880=_0x3d2875(_0x198949,_0x2454db[_0x18eb0a(0x2b8)],_0x2454db['seq'],_0x4ba78d,_0x325b93);}return _0x4ba78d??(0x0,_0x44fd8e[_0x18eb0a(0x24b)])(_0x1fa880);};},0x2ea(_0x4b5cfc,_0x1ebd26,_0x7421ee){const _0x1b926e=a0_0xac42;Object[_0x1b926e(0x1e4)](_0x1ebd26,_0x1b926e(0x1d7),{'value':!0x0});const _0x513f60=_0x7421ee(0x2b9);_0x1ebd26[_0x1b926e(0x23a)]=function _0xc6488d(_0x3587d5){const _0x207e6d=_0x1b926e;return _0x207e6d(0x289)==typeof _0x3587d5&&_0x513f60['default'][_0x207e6d(0x2ae)](_0x3587d5);};},0x302(_0x13755c,_0x240e50,_0x56872b){const _0x171495=a0_0xac42;Object[_0x171495(0x1e4)](_0x240e50,'__esModule',{'value':!0x0});const _0x1ff391=_0x56872b(0x2ea);_0x240e50['default']=function _0x2713d8(_0xe24293){const _0x30e11f=_0x171495;if(!(0x0,_0x1ff391[_0x30e11f(0x23a)])(_0xe24293))throw TypeError(_0x30e11f(0x211));return parseInt(_0xe24293['slice'](0xe,0xf),0x10);};},0x14a(_0x229bf2){const _0x25f645=a0_0xac42;_0x229bf2[_0x25f645(0x269)]=JSON[_0x25f645(0x298)](_0x25f645(0x275));}},_0x1d7c6b={};function _0x4c75d4(_0x518bee){const _0x4ca886=a0_0xac42;var _0x442924=_0x1d7c6b[_0x518bee];if(void 0x0!==_0x442924)return _0x442924[_0x4ca886(0x269)];var _0x3829a6=_0x1d7c6b[_0x518bee]={'exports':{}};return _0x17068f[_0x518bee](_0x3829a6,_0x3829a6['exports'],_0x4c75d4),_0x3829a6['exports'];}var _0x387df7={};return((()=>{const _0x363f98=a0_0xac42;var _0x3f8076=_0x387df7;Object['defineProperty'](_0x3f8076,_0x363f98(0x1d7),{'value':!0x0}),_0x3f8076[_0x363f98(0x20d)]=void 0x0;var _0x50246f=_0x4c75d4(0x1a7);Object['defineProperty'](_0x3f8076,_0x363f98(0x20d),{'enumerable':!0x0,'get':function(){const _0x2f2518=_0x363f98;return _0x50246f[_0x2f2518(0x20d)];}});})()),_0x387df7;})())));
|
|
Binary file
|
|
@@ -13,6 +13,7 @@ export interface SDKConfig {
|
|
|
13
13
|
batchSize?: number;
|
|
14
14
|
batchInterval?: number;
|
|
15
15
|
platform?: string;
|
|
16
|
+
storageType?: 'localStorage' | 'sessionStorage';
|
|
16
17
|
}
|
|
17
18
|
export interface PurchasePayload {
|
|
18
19
|
externalId: string;
|
|
@@ -82,4 +83,7 @@ export interface CampaignPayload {
|
|
|
82
83
|
deviceId: string;
|
|
83
84
|
timestamp: number;
|
|
84
85
|
dismissed?: boolean;
|
|
86
|
+
userId?: string;
|
|
87
|
+
guestUserId?: string;
|
|
88
|
+
deviceInfo?: DeviceDetails;
|
|
85
89
|
}
|
package/dist/src/web-sdk.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export declare class WebSDK {
|
|
|
6
6
|
private readonly maxBatchSize;
|
|
7
7
|
private readonly batchInterval;
|
|
8
8
|
private readonly sdkVersion;
|
|
9
|
+
private readonly storage;
|
|
9
10
|
private deviceId;
|
|
10
11
|
private guestUserId;
|
|
11
12
|
private deviceDetails?;
|
|
@@ -17,6 +18,7 @@ export declare class WebSDK {
|
|
|
17
18
|
private batchProcessingInterval?;
|
|
18
19
|
private platform;
|
|
19
20
|
constructor(config: SDKConfig);
|
|
21
|
+
private getStorage;
|
|
20
22
|
private initialize;
|
|
21
23
|
identify(userId: string): void;
|
|
22
24
|
clearUserData(): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ordersune/crm-web-sdk",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"publishConfig": {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"build:bundle": "webpack --config webpack.config.js",
|
|
12
12
|
"build:types": "tsc --emitDeclarationOnly --outDir dist",
|
|
13
13
|
"prepare": "npm run build && husky",
|
|
14
|
-
"release": "bash -c 'read -p \"Enter
|
|
14
|
+
"release": "bash -c 'read -p \"Enter NPM token: \" NPM_TOKEN && GIT_AUTHOR_NAME=\"$(git config user.name)\" GIT_AUTHOR_EMAIL=\"$(git config user.email)\" GIT_COMMITTER_NAME=\"$(git config user.name)\" GIT_COMMITTER_EMAIL=\"$(git config user.email)\" NPM_TOKEN=$NPM_TOKEN semantic-release --no-ci'",
|
|
15
15
|
"lint:commit": "commitlint --edit"
|
|
16
16
|
},
|
|
17
17
|
"files": [
|
package/dist/index.d.ts
DELETED
|
Binary file
|
package/dist/types/index.d.ts
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
export interface UserProfile {
|
|
2
|
-
id: string;
|
|
3
|
-
guestUserId?: string;
|
|
4
|
-
}
|
|
5
|
-
export interface EventOptions {
|
|
6
|
-
timestamp?: string;
|
|
7
|
-
requestId?: string;
|
|
8
|
-
}
|
|
9
|
-
export interface SDKConfig {
|
|
10
|
-
apiKey: string;
|
|
11
|
-
endpoint: string;
|
|
12
|
-
debug?: boolean;
|
|
13
|
-
batchSize?: number;
|
|
14
|
-
batchInterval?: number;
|
|
15
|
-
platform?: string;
|
|
16
|
-
}
|
|
17
|
-
export interface PurchasePayload {
|
|
18
|
-
externalId: string;
|
|
19
|
-
itemId: string;
|
|
20
|
-
itemName: string;
|
|
21
|
-
unitPrice: number;
|
|
22
|
-
quantity: number;
|
|
23
|
-
source: string;
|
|
24
|
-
channel: string;
|
|
25
|
-
itemCategory?: string;
|
|
26
|
-
}
|
|
27
|
-
export interface DeviceDetails {
|
|
28
|
-
deviceId: string;
|
|
29
|
-
platform: string;
|
|
30
|
-
pushToken?: string;
|
|
31
|
-
}
|
|
32
|
-
export interface ButtonProperties {
|
|
33
|
-
backgroundColor: string;
|
|
34
|
-
borderColor: string;
|
|
35
|
-
textColor: string;
|
|
36
|
-
androidOnClickValue?: string;
|
|
37
|
-
androidOnClickAction?: string;
|
|
38
|
-
iOSOnClickValue?: string;
|
|
39
|
-
iOSOnClickAction?: string;
|
|
40
|
-
type?: string;
|
|
41
|
-
[key: string]: any;
|
|
42
|
-
}
|
|
43
|
-
export interface ModalConfig {
|
|
44
|
-
button1: ButtonProperties;
|
|
45
|
-
button2: ButtonProperties;
|
|
46
|
-
dismissMessageAutomatically: boolean;
|
|
47
|
-
dismissMessageInSeconds: string;
|
|
48
|
-
headerColor: string;
|
|
49
|
-
messageColor: string;
|
|
50
|
-
closeColor: string;
|
|
51
|
-
}
|
|
52
|
-
export interface MediaConfig {
|
|
53
|
-
inAppImage: string;
|
|
54
|
-
}
|
|
55
|
-
export interface InAppMessageData {
|
|
56
|
-
header: string;
|
|
57
|
-
message: string;
|
|
58
|
-
modal: ModalConfig;
|
|
59
|
-
mediaConfig: MediaConfig;
|
|
60
|
-
}
|
|
61
|
-
export interface ShowInAppMessageOptions {
|
|
62
|
-
context?: any;
|
|
63
|
-
title: string;
|
|
64
|
-
body: string;
|
|
65
|
-
primaryButtonText: string;
|
|
66
|
-
secondaryButtonText?: string;
|
|
67
|
-
imageUrl: string;
|
|
68
|
-
onClose?: () => void;
|
|
69
|
-
buttonPropertiesPrimary: ButtonProperties;
|
|
70
|
-
buttonPropertiesSecondary: ButtonProperties;
|
|
71
|
-
dismissMessageAutomatically: boolean;
|
|
72
|
-
dismissMessageInSeconds: string;
|
|
73
|
-
headerColor: string;
|
|
74
|
-
messageColor: string;
|
|
75
|
-
closeColor: string;
|
|
76
|
-
campaignId: string;
|
|
77
|
-
}
|
|
78
|
-
export interface CampaignPayload {
|
|
79
|
-
campaignId: string;
|
|
80
|
-
opened: boolean;
|
|
81
|
-
clicked: boolean;
|
|
82
|
-
deviceId: string;
|
|
83
|
-
timestamp: number;
|
|
84
|
-
dismissed?: boolean;
|
|
85
|
-
}
|
package/dist/types/index.js
DELETED
package/dist/utils/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const log: (debug: boolean, message: string, ...args: any[]) => void;
|
package/dist/utils/index.js
DELETED
package/dist/web-sdk.d.ts
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { SDKConfig, EventOptions, UserProfile } from "./types";
|
|
2
|
-
export declare class WebSDK {
|
|
3
|
-
private readonly apiKey;
|
|
4
|
-
private readonly endpoint;
|
|
5
|
-
private readonly debug;
|
|
6
|
-
private readonly maxBatchSize;
|
|
7
|
-
private readonly batchInterval;
|
|
8
|
-
private readonly sdkVersion;
|
|
9
|
-
private deviceId;
|
|
10
|
-
private guestUserId;
|
|
11
|
-
private deviceDetails?;
|
|
12
|
-
private currentUser?;
|
|
13
|
-
private eventQueue;
|
|
14
|
-
private purchaseBatch;
|
|
15
|
-
private attributeQueue;
|
|
16
|
-
private isProcessingQueue;
|
|
17
|
-
private batchProcessingInterval?;
|
|
18
|
-
private platform;
|
|
19
|
-
constructor(config: SDKConfig);
|
|
20
|
-
private initialize;
|
|
21
|
-
identify(userId: string): void;
|
|
22
|
-
clearUserData(): void;
|
|
23
|
-
trackEvent(eventName: string, properties?: Record<string, any>, options?: EventOptions): void;
|
|
24
|
-
setToken(token: string): void;
|
|
25
|
-
trackCustomAttribute(attributeName: string, attributeValue: any): void;
|
|
26
|
-
logProductPurchase(orderId: string, itemId: string, itemName: string, unitPrice: number, quantity: number, source: string, channel: string, itemCategory?: string): void;
|
|
27
|
-
getUserProfile(): UserProfile | undefined;
|
|
28
|
-
forceSend(): Promise<void>;
|
|
29
|
-
dispose(): void;
|
|
30
|
-
private getStoredDeviceId;
|
|
31
|
-
private getStoredUserProfile;
|
|
32
|
-
private storeDeviceId;
|
|
33
|
-
private storeUserProfile;
|
|
34
|
-
private storeCustomAttributes;
|
|
35
|
-
private loadCustomAttributes;
|
|
36
|
-
private getGuestUserId;
|
|
37
|
-
private buildPurchasePayload;
|
|
38
|
-
private initializeDeviceDetails;
|
|
39
|
-
private startBatchProcessing;
|
|
40
|
-
private queueEvent;
|
|
41
|
-
private processBatch;
|
|
42
|
-
private sendBatchToServer;
|
|
43
|
-
displayInAppMessage(inAppMessageData: string, campaignId: string, context?: any): void;
|
|
44
|
-
private hexToColor;
|
|
45
|
-
private openWebUrl;
|
|
46
|
-
private showInAppMessage;
|
|
47
|
-
private logInAppMessageClick;
|
|
48
|
-
logClick(campaignId: string): Promise<void>;
|
|
49
|
-
private processCampaignClick;
|
|
50
|
-
private buildCampaignPayload;
|
|
51
|
-
}
|
package/dist/web-sdk.js
DELETED
|
@@ -1,599 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WebSDK = void 0;
|
|
4
|
-
const utils_1 = require("./utils");
|
|
5
|
-
const uuid_1 = require("uuid");
|
|
6
|
-
const STORAGE_PREFIX = "os.";
|
|
7
|
-
const DEFAULT_BATCH_SIZE = 10;
|
|
8
|
-
const DEFAULT_BATCH_INTERVAL = 10000;
|
|
9
|
-
const SDK_VERSION = "1.0.7";
|
|
10
|
-
class WebSDK {
|
|
11
|
-
constructor(config) {
|
|
12
|
-
var _a, _b, _c, _d;
|
|
13
|
-
this.maxBatchSize = DEFAULT_BATCH_SIZE;
|
|
14
|
-
this.batchInterval = DEFAULT_BATCH_INTERVAL;
|
|
15
|
-
this.sdkVersion = SDK_VERSION;
|
|
16
|
-
this.eventQueue = [];
|
|
17
|
-
this.purchaseBatch = [];
|
|
18
|
-
this.attributeQueue = {};
|
|
19
|
-
this.isProcessingQueue = false;
|
|
20
|
-
this.platform = "web";
|
|
21
|
-
if (!config.apiKey || !config.endpoint) {
|
|
22
|
-
throw new Error("API key and endpoint are required");
|
|
23
|
-
}
|
|
24
|
-
this.apiKey = config.apiKey;
|
|
25
|
-
this.endpoint = config.endpoint;
|
|
26
|
-
this.debug = (_a = config.debug) !== null && _a !== void 0 ? _a : false;
|
|
27
|
-
this.maxBatchSize = (_b = config.batchSize) !== null && _b !== void 0 ? _b : DEFAULT_BATCH_SIZE;
|
|
28
|
-
this.batchInterval = (_c = config.batchInterval) !== null && _c !== void 0 ? _c : DEFAULT_BATCH_INTERVAL;
|
|
29
|
-
this.platform = (_d = config.platform) !== null && _d !== void 0 ? _d : "web";
|
|
30
|
-
this.deviceId = this.getStoredDeviceId() || (0, uuid_1.v4)();
|
|
31
|
-
this.guestUserId = this.getGuestUserId();
|
|
32
|
-
// Initialize async
|
|
33
|
-
this.initialize().catch((error) => {
|
|
34
|
-
(0, utils_1.log)(this.debug, "Async initialization failed", error);
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
async initialize() {
|
|
38
|
-
try {
|
|
39
|
-
(0, utils_1.log)(this.debug, "SDK Initialized");
|
|
40
|
-
this.storeDeviceId();
|
|
41
|
-
await this.initializeDeviceDetails();
|
|
42
|
-
await this.loadCustomAttributes();
|
|
43
|
-
const storedUser = this.getStoredUserProfile();
|
|
44
|
-
if (storedUser) {
|
|
45
|
-
this.currentUser = storedUser;
|
|
46
|
-
(0, utils_1.log)(this.debug, "Loaded user profile", this.currentUser);
|
|
47
|
-
}
|
|
48
|
-
else {
|
|
49
|
-
this.identify("");
|
|
50
|
-
}
|
|
51
|
-
try {
|
|
52
|
-
const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
53
|
-
this.trackCustomAttribute("timezone", timezone);
|
|
54
|
-
}
|
|
55
|
-
catch (error) {
|
|
56
|
-
(0, utils_1.log)(this.debug, "Failed to detect timezone", error);
|
|
57
|
-
}
|
|
58
|
-
this.startBatchProcessing();
|
|
59
|
-
this.trackEvent("app_started", {});
|
|
60
|
-
}
|
|
61
|
-
catch (error) {
|
|
62
|
-
(0, utils_1.log)(this.debug, "Initialization failed", error);
|
|
63
|
-
throw error;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
identify(userId) {
|
|
67
|
-
if (typeof userId !== "string") {
|
|
68
|
-
throw new Error("User ID must be a string");
|
|
69
|
-
}
|
|
70
|
-
const storedUser = this.getStoredUserProfile();
|
|
71
|
-
if ((storedUser === null || storedUser === void 0 ? void 0 : storedUser.id) === userId)
|
|
72
|
-
return;
|
|
73
|
-
(0, utils_1.log)(this.debug, "Identifying user", userId);
|
|
74
|
-
// If userId is empty or matches guest pattern, use guest user
|
|
75
|
-
if (!userId) {
|
|
76
|
-
this.currentUser = {
|
|
77
|
-
id: this.guestUserId,
|
|
78
|
-
guestUserId: this.guestUserId
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
else {
|
|
82
|
-
// Real user identification - include both userId and guestUserId
|
|
83
|
-
this.currentUser = {
|
|
84
|
-
id: userId,
|
|
85
|
-
guestUserId: this.guestUserId
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
this.storeUserProfile();
|
|
89
|
-
}
|
|
90
|
-
clearUserData() {
|
|
91
|
-
// Generate new device ID
|
|
92
|
-
this.deviceId = (0, uuid_1.v4)();
|
|
93
|
-
this.guestUserId = this.getGuestUserId();
|
|
94
|
-
this.initializeDeviceDetails();
|
|
95
|
-
this.currentUser = {
|
|
96
|
-
id: this.guestUserId,
|
|
97
|
-
guestUserId: this.guestUserId
|
|
98
|
-
};
|
|
99
|
-
this.attributeQueue = {};
|
|
100
|
-
this.eventQueue = [];
|
|
101
|
-
this.purchaseBatch = [];
|
|
102
|
-
this.storeDeviceId();
|
|
103
|
-
sessionStorage.setItem(`${STORAGE_PREFIX}${this.apiKey}.current_user`, JSON.stringify(this.currentUser));
|
|
104
|
-
sessionStorage.removeItem(`${STORAGE_PREFIX}${this.apiKey}.custom_attributes`);
|
|
105
|
-
if (this.debug) {
|
|
106
|
-
(0, utils_1.log)(this.debug, "User data cleared, new device ID generated");
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
trackEvent(eventName, properties = {}, options = {}) {
|
|
110
|
-
if (!eventName || typeof eventName !== "string") {
|
|
111
|
-
throw new Error("Event name is required and must be a string");
|
|
112
|
-
}
|
|
113
|
-
const payload = {
|
|
114
|
-
deviceId: this.deviceId,
|
|
115
|
-
eventName,
|
|
116
|
-
timestamp: options.timestamp || Date.now(),
|
|
117
|
-
requestId: options.requestId || (0, uuid_1.v4)(),
|
|
118
|
-
properties: properties,
|
|
119
|
-
};
|
|
120
|
-
this.queueEvent(payload);
|
|
121
|
-
}
|
|
122
|
-
setToken(token) {
|
|
123
|
-
if (this.deviceDetails) {
|
|
124
|
-
this.deviceDetails = {
|
|
125
|
-
...this.deviceDetails,
|
|
126
|
-
pushToken: token,
|
|
127
|
-
};
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
trackCustomAttribute(attributeName, attributeValue) {
|
|
131
|
-
if (!attributeName || typeof attributeName !== "string") {
|
|
132
|
-
throw new Error("Attribute name is required and must be a string");
|
|
133
|
-
}
|
|
134
|
-
this.attributeQueue = {
|
|
135
|
-
...this.attributeQueue,
|
|
136
|
-
[attributeName]: attributeValue,
|
|
137
|
-
};
|
|
138
|
-
(0, utils_1.log)(this.debug, "Custom attribute queued", attributeName, attributeValue);
|
|
139
|
-
this.storeCustomAttributes();
|
|
140
|
-
}
|
|
141
|
-
logProductPurchase(orderId, itemId, itemName, unitPrice, quantity, source, channel, itemCategory) {
|
|
142
|
-
const purchasePayload = this.buildPurchasePayload({
|
|
143
|
-
externalId: orderId,
|
|
144
|
-
itemId,
|
|
145
|
-
itemName,
|
|
146
|
-
unitPrice,
|
|
147
|
-
quantity,
|
|
148
|
-
source,
|
|
149
|
-
channel,
|
|
150
|
-
itemCategory,
|
|
151
|
-
});
|
|
152
|
-
this.purchaseBatch.push(purchasePayload);
|
|
153
|
-
if (this.debug) {
|
|
154
|
-
(0, utils_1.log)(this.debug, "Purchase event queued", purchasePayload);
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
getUserProfile() {
|
|
158
|
-
return this.currentUser;
|
|
159
|
-
}
|
|
160
|
-
async forceSend() {
|
|
161
|
-
if (this.eventQueue.length > 0 ||
|
|
162
|
-
this.purchaseBatch.length > 0 ||
|
|
163
|
-
this.attributeQueue.length > 0) {
|
|
164
|
-
await this.processBatch();
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
dispose() {
|
|
168
|
-
if (this.batchProcessingInterval) {
|
|
169
|
-
clearInterval(this.batchProcessingInterval);
|
|
170
|
-
}
|
|
171
|
-
if (this.eventQueue.length > 0 ||
|
|
172
|
-
this.purchaseBatch.length > 0 ||
|
|
173
|
-
this.attributeQueue.length > 0) {
|
|
174
|
-
this.processBatch().catch((error) => {
|
|
175
|
-
(0, utils_1.log)(this.debug, "Error during disposal", error);
|
|
176
|
-
});
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
getStoredDeviceId() {
|
|
180
|
-
return sessionStorage.getItem(`${STORAGE_PREFIX}${this.apiKey}.device_id`);
|
|
181
|
-
}
|
|
182
|
-
getStoredUserProfile() {
|
|
183
|
-
const storedUser = sessionStorage.getItem(`${STORAGE_PREFIX}${this.apiKey}.current_user`);
|
|
184
|
-
return storedUser ? JSON.parse(storedUser) : null;
|
|
185
|
-
}
|
|
186
|
-
storeDeviceId() {
|
|
187
|
-
sessionStorage.setItem(`${STORAGE_PREFIX}${this.apiKey}.device_id`, this.deviceId);
|
|
188
|
-
}
|
|
189
|
-
storeUserProfile() {
|
|
190
|
-
if (this.currentUser) {
|
|
191
|
-
sessionStorage.setItem(`${STORAGE_PREFIX}${this.apiKey}.current_user`, JSON.stringify(this.currentUser));
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
storeCustomAttributes() {
|
|
195
|
-
const existingAttributes = sessionStorage.getItem(`${STORAGE_PREFIX}${this.apiKey}.custom_attributes`);
|
|
196
|
-
const existingParsed = existingAttributes
|
|
197
|
-
? JSON.parse(existingAttributes)
|
|
198
|
-
: {};
|
|
199
|
-
const mergedAttributes = {
|
|
200
|
-
...existingParsed,
|
|
201
|
-
...this.attributeQueue,
|
|
202
|
-
};
|
|
203
|
-
sessionStorage.setItem(`${STORAGE_PREFIX}${this.apiKey}.custom_attributes`, JSON.stringify(mergedAttributes));
|
|
204
|
-
}
|
|
205
|
-
async loadCustomAttributes() {
|
|
206
|
-
const stored = sessionStorage.getItem(`${STORAGE_PREFIX}${this.apiKey}.custom_attributes`);
|
|
207
|
-
if (stored) {
|
|
208
|
-
this.attributeQueue = {
|
|
209
|
-
...this.attributeQueue,
|
|
210
|
-
...JSON.parse(stored),
|
|
211
|
-
};
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
getGuestUserId() {
|
|
215
|
-
return `guest_user_${this.deviceId}`;
|
|
216
|
-
}
|
|
217
|
-
buildPurchasePayload({ externalId, itemId, itemName, unitPrice, quantity, source, channel, itemCategory, }) {
|
|
218
|
-
const timestamp = Date.now();
|
|
219
|
-
return {
|
|
220
|
-
external_id: externalId,
|
|
221
|
-
item_id: itemId,
|
|
222
|
-
item_name: itemName,
|
|
223
|
-
item_category: itemCategory,
|
|
224
|
-
quantity: quantity,
|
|
225
|
-
unit_price: unitPrice,
|
|
226
|
-
total_price: unitPrice * quantity,
|
|
227
|
-
source: source,
|
|
228
|
-
channel: channel,
|
|
229
|
-
purchased_at: timestamp,
|
|
230
|
-
};
|
|
231
|
-
}
|
|
232
|
-
async initializeDeviceDetails() {
|
|
233
|
-
this.deviceDetails = {
|
|
234
|
-
deviceId: this.deviceId,
|
|
235
|
-
platform: this.platform,
|
|
236
|
-
};
|
|
237
|
-
}
|
|
238
|
-
startBatchProcessing() {
|
|
239
|
-
this.batchProcessingInterval = setInterval(() => {
|
|
240
|
-
if (this.eventQueue.length > 0 ||
|
|
241
|
-
this.purchaseBatch.length > 0 ||
|
|
242
|
-
this.attributeQueue.length > 0) {
|
|
243
|
-
this.processBatch().catch((error) => {
|
|
244
|
-
(0, utils_1.log)(this.debug, "Batch processing failed", error);
|
|
245
|
-
});
|
|
246
|
-
}
|
|
247
|
-
}, this.batchInterval);
|
|
248
|
-
}
|
|
249
|
-
queueEvent(payload) {
|
|
250
|
-
this.eventQueue.push(payload);
|
|
251
|
-
(0, utils_1.log)(this.debug, "Event queued", payload);
|
|
252
|
-
if (this.eventQueue.length >= this.maxBatchSize) {
|
|
253
|
-
this.processBatch().catch((error) => {
|
|
254
|
-
(0, utils_1.log)(this.debug, "Batch processing failed", error);
|
|
255
|
-
});
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
async processBatch() {
|
|
259
|
-
if (this.isProcessingQueue)
|
|
260
|
-
return;
|
|
261
|
-
this.isProcessingQueue = true;
|
|
262
|
-
const eventsToSend = [...this.eventQueue];
|
|
263
|
-
const purchasesToSend = [...this.purchaseBatch];
|
|
264
|
-
const attributesToSend = { ...this.attributeQueue };
|
|
265
|
-
this.eventQueue = [];
|
|
266
|
-
this.purchaseBatch = [];
|
|
267
|
-
this.attributeQueue = {};
|
|
268
|
-
try {
|
|
269
|
-
await this.sendBatchToServer(eventsToSend, purchasesToSend, attributesToSend);
|
|
270
|
-
}
|
|
271
|
-
catch (error) {
|
|
272
|
-
this.eventQueue.unshift(...eventsToSend);
|
|
273
|
-
this.purchaseBatch.unshift(...purchasesToSend);
|
|
274
|
-
this.attributeQueue = { ...this.attributeQueue, ...attributesToSend };
|
|
275
|
-
(0, utils_1.log)(this.debug, "Batch processing failed", error);
|
|
276
|
-
throw error;
|
|
277
|
-
}
|
|
278
|
-
finally {
|
|
279
|
-
this.isProcessingQueue = false;
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
async sendBatchToServer(events, purchases, currentAttributes) {
|
|
283
|
-
var _a, _b;
|
|
284
|
-
if (!this.deviceDetails) {
|
|
285
|
-
await this.initializeDeviceDetails();
|
|
286
|
-
}
|
|
287
|
-
const payload = {
|
|
288
|
-
sdkVersion: this.sdkVersion,
|
|
289
|
-
deviceInfo: this.deviceDetails,
|
|
290
|
-
userId: (_a = this.currentUser) === null || _a === void 0 ? void 0 : _a.id,
|
|
291
|
-
guestUserId: (_b = this.currentUser) === null || _b === void 0 ? void 0 : _b.guestUserId,
|
|
292
|
-
time: Date.now(),
|
|
293
|
-
events: events,
|
|
294
|
-
purchases: purchases,
|
|
295
|
-
userAttributes: currentAttributes,
|
|
296
|
-
};
|
|
297
|
-
(0, utils_1.log)(this.debug, "Sending batch to server", payload);
|
|
298
|
-
try {
|
|
299
|
-
const response = await fetch(`${this.endpoint}/analytics/data`, {
|
|
300
|
-
method: "POST",
|
|
301
|
-
headers: {
|
|
302
|
-
"Content-Type": "application/json",
|
|
303
|
-
"x-api-key": this.apiKey,
|
|
304
|
-
},
|
|
305
|
-
body: JSON.stringify(payload),
|
|
306
|
-
});
|
|
307
|
-
if (!response.ok) {
|
|
308
|
-
throw new Error(`HTTP error! status: ${response.status}`);
|
|
309
|
-
}
|
|
310
|
-
if (this.debug) {
|
|
311
|
-
(0, utils_1.log)(this.debug, `Batch dispatched successfully: ${payload.events.length} events, ${payload.purchases.length} purchases, ${Object.keys(payload.userAttributes).length} attributes`);
|
|
312
|
-
}
|
|
313
|
-
await response.json();
|
|
314
|
-
if (Object.keys(currentAttributes).length > 0) {
|
|
315
|
-
this.attributeQueue = {};
|
|
316
|
-
sessionStorage.removeItem(`${STORAGE_PREFIX}${this.apiKey}.custom_attributes`);
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
catch (error) {
|
|
320
|
-
(0, utils_1.log)(this.debug, "Failed to send payload to server", error);
|
|
321
|
-
throw error;
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
displayInAppMessage(inAppMessageData, campaignId, context) {
|
|
325
|
-
(0, utils_1.log)(this.debug, "Displaying in-app message", inAppMessageData);
|
|
326
|
-
const transformedData = JSON.parse(inAppMessageData);
|
|
327
|
-
(0, utils_1.log)(this.debug, "Displaying in-app message", transformedData);
|
|
328
|
-
const title = transformedData.header;
|
|
329
|
-
const body = transformedData.message;
|
|
330
|
-
const buttonDataPrimary = transformedData.modal.button1;
|
|
331
|
-
const buttonDataSecondary = transformedData.modal.button2;
|
|
332
|
-
const buttonTextPrimary = buttonDataPrimary.type || "";
|
|
333
|
-
const buttonTextSecondary = buttonDataSecondary.type || "";
|
|
334
|
-
const imageUrl = transformedData.mediaConfig.inAppImage;
|
|
335
|
-
this.showInAppMessage({
|
|
336
|
-
context,
|
|
337
|
-
title,
|
|
338
|
-
body,
|
|
339
|
-
primaryButtonText: buttonTextPrimary,
|
|
340
|
-
secondaryButtonText: buttonTextSecondary,
|
|
341
|
-
imageUrl,
|
|
342
|
-
buttonPropertiesPrimary: buttonDataPrimary,
|
|
343
|
-
buttonPropertiesSecondary: buttonDataSecondary,
|
|
344
|
-
dismissMessageAutomatically: transformedData.modal.dismissMessageAutomatically,
|
|
345
|
-
dismissMessageInSeconds: transformedData.modal.dismissMessageInSeconds,
|
|
346
|
-
headerColor: transformedData.modal.headerColor,
|
|
347
|
-
messageColor: transformedData.modal.messageColor,
|
|
348
|
-
closeColor: transformedData.modal.closeColor,
|
|
349
|
-
campaignId: campaignId,
|
|
350
|
-
});
|
|
351
|
-
}
|
|
352
|
-
hexToColor(hexColor) {
|
|
353
|
-
hexColor = hexColor.toUpperCase().replace("#", "");
|
|
354
|
-
if (hexColor.length === 6) {
|
|
355
|
-
return `#${hexColor}`;
|
|
356
|
-
}
|
|
357
|
-
return `#${hexColor.substring(2)}`;
|
|
358
|
-
}
|
|
359
|
-
openWebUrl(url) {
|
|
360
|
-
if (url) {
|
|
361
|
-
window.open(url, '_blank');
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
showInAppMessage(options) {
|
|
365
|
-
const { title, body, primaryButtonText, secondaryButtonText, imageUrl, onClose, buttonPropertiesPrimary, buttonPropertiesSecondary, dismissMessageAutomatically, dismissMessageInSeconds, headerColor, messageColor, closeColor, campaignId, } = options;
|
|
366
|
-
// Create modal container
|
|
367
|
-
const modalOverlay = document.createElement('div');
|
|
368
|
-
modalOverlay.style.position = 'fixed';
|
|
369
|
-
modalOverlay.style.top = '0';
|
|
370
|
-
modalOverlay.style.left = '0';
|
|
371
|
-
modalOverlay.style.width = '100%';
|
|
372
|
-
modalOverlay.style.height = '100%';
|
|
373
|
-
modalOverlay.style.backgroundColor = 'rgba(0, 0, 0, 0.5)';
|
|
374
|
-
modalOverlay.style.display = 'flex';
|
|
375
|
-
modalOverlay.style.justifyContent = 'center';
|
|
376
|
-
modalOverlay.style.alignItems = 'center';
|
|
377
|
-
modalOverlay.style.zIndex = '9999';
|
|
378
|
-
// Create modal dialog
|
|
379
|
-
const modalDialog = document.createElement('div');
|
|
380
|
-
modalDialog.style.backgroundColor = 'white';
|
|
381
|
-
modalDialog.style.borderRadius = '12px';
|
|
382
|
-
modalDialog.style.padding = '16px';
|
|
383
|
-
modalDialog.style.maxWidth = '400px';
|
|
384
|
-
modalDialog.style.width = '90%';
|
|
385
|
-
modalDialog.style.boxShadow = '0 4px 6px rgba(0, 0, 0, 0.1)';
|
|
386
|
-
modalDialog.style.position = 'relative';
|
|
387
|
-
// Close button
|
|
388
|
-
const closeButton = document.createElement('button');
|
|
389
|
-
closeButton.innerHTML = '×';
|
|
390
|
-
closeButton.style.position = 'absolute';
|
|
391
|
-
closeButton.style.top = '8px';
|
|
392
|
-
closeButton.style.right = '8px';
|
|
393
|
-
closeButton.style.background = 'none';
|
|
394
|
-
closeButton.style.border = 'none';
|
|
395
|
-
closeButton.style.fontSize = '20px';
|
|
396
|
-
closeButton.style.cursor = 'pointer';
|
|
397
|
-
closeButton.style.color = this.hexToColor(closeColor);
|
|
398
|
-
closeButton.onclick = () => {
|
|
399
|
-
if (onClose) {
|
|
400
|
-
onClose();
|
|
401
|
-
}
|
|
402
|
-
this.logInAppMessageClick(campaignId, false, true, true);
|
|
403
|
-
document.body.removeChild(modalOverlay);
|
|
404
|
-
};
|
|
405
|
-
// Create content
|
|
406
|
-
const contentContainer = document.createElement('div');
|
|
407
|
-
contentContainer.style.display = 'flex';
|
|
408
|
-
contentContainer.style.flexDirection = 'column';
|
|
409
|
-
contentContainer.style.alignItems = 'center';
|
|
410
|
-
contentContainer.style.textAlign = 'center';
|
|
411
|
-
// Image
|
|
412
|
-
if (imageUrl && imageUrl.trim() !== '') {
|
|
413
|
-
const image = document.createElement('img');
|
|
414
|
-
image.src = imageUrl;
|
|
415
|
-
image.style.width = '100px';
|
|
416
|
-
image.style.height = '100px';
|
|
417
|
-
image.style.marginBottom = '16px';
|
|
418
|
-
image.style.marginTop = '16px';
|
|
419
|
-
image.onerror = () => {
|
|
420
|
-
image.style.display = 'none';
|
|
421
|
-
};
|
|
422
|
-
contentContainer.appendChild(image);
|
|
423
|
-
}
|
|
424
|
-
// Title
|
|
425
|
-
const titleElement = document.createElement('h2');
|
|
426
|
-
titleElement.textContent = title;
|
|
427
|
-
titleElement.style.fontSize = '22px';
|
|
428
|
-
titleElement.style.fontWeight = '600';
|
|
429
|
-
titleElement.style.color = this.hexToColor(headerColor);
|
|
430
|
-
titleElement.style.margin = '8px 0';
|
|
431
|
-
contentContainer.appendChild(titleElement);
|
|
432
|
-
// Body
|
|
433
|
-
const bodyElement = document.createElement('p');
|
|
434
|
-
bodyElement.textContent = body;
|
|
435
|
-
bodyElement.style.fontSize = '14px';
|
|
436
|
-
bodyElement.style.color = this.hexToColor(messageColor);
|
|
437
|
-
bodyElement.style.fontWeight = '500';
|
|
438
|
-
bodyElement.style.margin = '8px 0 24px 0';
|
|
439
|
-
contentContainer.appendChild(bodyElement);
|
|
440
|
-
// Button handlers
|
|
441
|
-
const onPrimaryButtonPress = () => {
|
|
442
|
-
if (buttonPropertiesPrimary.webOnClickValue === "redirect_to_web_url" ||
|
|
443
|
-
buttonPropertiesPrimary.webOnClickValue === "deeplink_into_app") {
|
|
444
|
-
this.openWebUrl(buttonPropertiesPrimary.webOnClickAction || '');
|
|
445
|
-
}
|
|
446
|
-
};
|
|
447
|
-
const onSecondaryButtonPress = () => {
|
|
448
|
-
if (buttonPropertiesSecondary.webOnClickValue === "redirect_to_web_url" ||
|
|
449
|
-
buttonPropertiesSecondary.webOnClickValue === "deeplink_into_app") {
|
|
450
|
-
this.openWebUrl(buttonPropertiesSecondary.webOnClickAction || '');
|
|
451
|
-
}
|
|
452
|
-
};
|
|
453
|
-
// Create buttons
|
|
454
|
-
const buttonsContainer = document.createElement('div');
|
|
455
|
-
buttonsContainer.style.display = 'flex';
|
|
456
|
-
buttonsContainer.style.justifyContent = 'center';
|
|
457
|
-
buttonsContainer.style.width = '100%';
|
|
458
|
-
buttonsContainer.style.gap = '16px';
|
|
459
|
-
if (secondaryButtonText && secondaryButtonText.trim() !== '') {
|
|
460
|
-
// Primary button
|
|
461
|
-
const primaryButton = document.createElement('button');
|
|
462
|
-
primaryButton.textContent = primaryButtonText;
|
|
463
|
-
primaryButton.style.flex = '1';
|
|
464
|
-
primaryButton.style.maxWidth = '140px';
|
|
465
|
-
primaryButton.style.padding = '12px';
|
|
466
|
-
primaryButton.style.backgroundColor = this.hexToColor(buttonPropertiesPrimary.backgroundColor);
|
|
467
|
-
primaryButton.style.color = this.hexToColor(buttonPropertiesPrimary.textColor);
|
|
468
|
-
primaryButton.style.border = `2px solid ${this.hexToColor(buttonPropertiesPrimary.borderColor)}`;
|
|
469
|
-
primaryButton.style.borderRadius = '8px';
|
|
470
|
-
primaryButton.style.fontSize = '16px';
|
|
471
|
-
primaryButton.style.fontWeight = '600';
|
|
472
|
-
primaryButton.style.cursor = 'pointer';
|
|
473
|
-
primaryButton.onclick = () => {
|
|
474
|
-
document.body.removeChild(modalOverlay);
|
|
475
|
-
onPrimaryButtonPress();
|
|
476
|
-
};
|
|
477
|
-
buttonsContainer.appendChild(primaryButton);
|
|
478
|
-
// Secondary button
|
|
479
|
-
const secondaryButton = document.createElement('button');
|
|
480
|
-
secondaryButton.textContent = secondaryButtonText;
|
|
481
|
-
secondaryButton.style.flex = '1';
|
|
482
|
-
secondaryButton.style.maxWidth = '140px';
|
|
483
|
-
secondaryButton.style.padding = '12px';
|
|
484
|
-
secondaryButton.style.backgroundColor = this.hexToColor(buttonPropertiesSecondary.backgroundColor);
|
|
485
|
-
secondaryButton.style.color = this.hexToColor(buttonPropertiesSecondary.textColor);
|
|
486
|
-
secondaryButton.style.border = `2px solid ${this.hexToColor(buttonPropertiesSecondary.borderColor)}`;
|
|
487
|
-
secondaryButton.style.borderRadius = '8px';
|
|
488
|
-
secondaryButton.style.fontSize = '16px';
|
|
489
|
-
secondaryButton.style.fontWeight = '600';
|
|
490
|
-
secondaryButton.style.cursor = 'pointer';
|
|
491
|
-
secondaryButton.onclick = () => {
|
|
492
|
-
document.body.removeChild(modalOverlay);
|
|
493
|
-
this.logInAppMessageClick(campaignId, true, true, false);
|
|
494
|
-
onSecondaryButtonPress();
|
|
495
|
-
};
|
|
496
|
-
buttonsContainer.appendChild(secondaryButton);
|
|
497
|
-
}
|
|
498
|
-
else {
|
|
499
|
-
// Single button
|
|
500
|
-
if (primaryButtonText && primaryButtonText.trim() !== '') {
|
|
501
|
-
const primaryButton = document.createElement('button');
|
|
502
|
-
primaryButton.textContent = primaryButtonText;
|
|
503
|
-
primaryButton.style.width = '100%';
|
|
504
|
-
primaryButton.style.padding = '12px';
|
|
505
|
-
primaryButton.style.backgroundColor = this.hexToColor(buttonPropertiesPrimary.backgroundColor);
|
|
506
|
-
primaryButton.style.color = this.hexToColor(buttonPropertiesPrimary.textColor);
|
|
507
|
-
primaryButton.style.border = `2px solid ${this.hexToColor(buttonPropertiesPrimary.borderColor)}`;
|
|
508
|
-
primaryButton.style.borderRadius = '8px';
|
|
509
|
-
primaryButton.style.fontSize = '16px';
|
|
510
|
-
primaryButton.style.fontWeight = '600';
|
|
511
|
-
primaryButton.style.cursor = 'pointer';
|
|
512
|
-
primaryButton.onclick = () => {
|
|
513
|
-
document.body.removeChild(modalOverlay);
|
|
514
|
-
this.logInAppMessageClick(campaignId, true, true, false);
|
|
515
|
-
onPrimaryButtonPress();
|
|
516
|
-
};
|
|
517
|
-
buttonsContainer.appendChild(primaryButton);
|
|
518
|
-
}
|
|
519
|
-
}
|
|
520
|
-
// Add all elements to the modal
|
|
521
|
-
modalDialog.appendChild(closeButton);
|
|
522
|
-
modalDialog.appendChild(contentContainer);
|
|
523
|
-
contentContainer.appendChild(buttonsContainer);
|
|
524
|
-
modalOverlay.appendChild(modalDialog);
|
|
525
|
-
// Add to document
|
|
526
|
-
document.body.appendChild(modalOverlay);
|
|
527
|
-
// Auto dismiss if enabled
|
|
528
|
-
if (dismissMessageAutomatically) {
|
|
529
|
-
setTimeout(() => {
|
|
530
|
-
if (document.body.contains(modalOverlay)) {
|
|
531
|
-
document.body.removeChild(modalOverlay);
|
|
532
|
-
}
|
|
533
|
-
}, parseInt(dismissMessageInSeconds) * 1000);
|
|
534
|
-
}
|
|
535
|
-
// Add click event to close when clicking outside
|
|
536
|
-
modalOverlay.addEventListener('click', (event) => {
|
|
537
|
-
if (event.target === modalOverlay) {
|
|
538
|
-
document.body.removeChild(modalOverlay);
|
|
539
|
-
}
|
|
540
|
-
});
|
|
541
|
-
}
|
|
542
|
-
async logInAppMessageClick(campaignId, clicked, opened, dismissed) {
|
|
543
|
-
const campaignClickPayload = await this.buildCampaignPayload(campaignId, opened, clicked, dismissed);
|
|
544
|
-
await this.processCampaignClick(campaignClickPayload);
|
|
545
|
-
}
|
|
546
|
-
async logClick(campaignId) {
|
|
547
|
-
// Ensure SDK is initialized before processing click
|
|
548
|
-
if (!this.currentUser || !this.deviceDetails) {
|
|
549
|
-
(0, utils_1.log)(this.debug, "SDK not fully initialized, waiting for initialization");
|
|
550
|
-
await this.initialize();
|
|
551
|
-
}
|
|
552
|
-
// Force send any pending events/attributes before processing click
|
|
553
|
-
if (this.eventQueue.length > 0 ||
|
|
554
|
-
this.purchaseBatch.length > 0 ||
|
|
555
|
-
Object.keys(this.attributeQueue).length > 0) {
|
|
556
|
-
await this.forceSend();
|
|
557
|
-
}
|
|
558
|
-
const pushCampaignClickPayload = await this.buildCampaignPayload(campaignId, true, true);
|
|
559
|
-
await this.processCampaignClick(pushCampaignClickPayload);
|
|
560
|
-
}
|
|
561
|
-
async processCampaignClick(payload) {
|
|
562
|
-
try {
|
|
563
|
-
const response = await fetch(`${this.endpoint}/analytics/clicks`, {
|
|
564
|
-
method: "POST",
|
|
565
|
-
headers: {
|
|
566
|
-
"Content-Type": "application/json",
|
|
567
|
-
"x-api-key": this.apiKey,
|
|
568
|
-
},
|
|
569
|
-
body: JSON.stringify(payload),
|
|
570
|
-
});
|
|
571
|
-
if (!response.ok) {
|
|
572
|
-
throw new Error(`HTTP error! status: ${response.status}`);
|
|
573
|
-
}
|
|
574
|
-
if (this.debug) {
|
|
575
|
-
(0, utils_1.log)(this.debug, `process campaign click dispatched successfully: ${payload.campaignId}`);
|
|
576
|
-
}
|
|
577
|
-
}
|
|
578
|
-
catch (error) {
|
|
579
|
-
(0, utils_1.log)(this.debug, "Error processing campaign click:", error);
|
|
580
|
-
throw error;
|
|
581
|
-
}
|
|
582
|
-
}
|
|
583
|
-
async buildCampaignPayload(campaignId, opened, clicked, dismissed) {
|
|
584
|
-
const timestamp = Date.now();
|
|
585
|
-
const deviceId = this.deviceId;
|
|
586
|
-
const payload = {
|
|
587
|
-
campaignId,
|
|
588
|
-
opened,
|
|
589
|
-
clicked,
|
|
590
|
-
deviceId,
|
|
591
|
-
timestamp,
|
|
592
|
-
};
|
|
593
|
-
if (dismissed !== undefined) {
|
|
594
|
-
payload.dismissed = dismissed;
|
|
595
|
-
}
|
|
596
|
-
return payload;
|
|
597
|
-
}
|
|
598
|
-
}
|
|
599
|
-
exports.WebSDK = WebSDK;
|