@seaverse/track-sdk 0.1.6 → 0.1.7

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.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";var t=require("firebase/app"),e=require("firebase/analytics");function s(t){var e=Object.create(null);return t&&Object.keys(t).forEach(function(s){if("default"!==s){var n=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(e,s,n.get?n:{enumerable:!0,get:function(){return t[s]}})}}),e.default=t,Object.freeze(e)}var n,r=s(require("sa-sdk-javascript"));function i(t,e){return t-=430,o()[t]}function o(){var t=["12glWDsv","FIREBASE","2001590tQDYCx","819981fHKBSZ","91862EZzuxl","1985224OWTheH","1OEGyTL","14mZUTpM","1197891rdCOBi","418630aTPpkc","765344vvtCBA"];return(o=function(){return t})()}function a(){const t=["https://www.googletagmanager.com/ns.html?id=","warn","4xbjJJX","height","[GoogleTagManager] Pushed to dataLayer:","gtm.js?id=","[GoogleTagManager] Error pushing to dataLayer:","style","head","[GTM] Already injected, skip","string","parentNode","push","dataLayer","3632CIaSpN","1205405xJWWIc","21140KuVZpu","from","[GTM] Not in browser environment, skip injection","appendChild","body","[GoogleTagManager] Invalid event name:","firstChild","424IAhoXb","width","some","script","visibility","244473xnDKEm","[GTM] Injection failed:","noscript","src","[GoogleTagManager] dataLayer not initialized","none","log","76GDmEdj","iframe","createElement","includes","126720BJWxam","display","async","1582461jKHBqD","insertBefore","error","2364774HORbGx","querySelectorAll","undefined","https://www.googletagmanager.com/gtm.js?id="];return(a=function(){return t})()}function c(){const t=d;return typeof window!==t(270)&&typeof document!==t(270)}function d(t,e){t-=233;return a()[t]}function l(t){const e=d,s=document[e(260)](e(253)),n=document[e(260)](e(259));n[e(254)]=e(272)+t,n[e(275)]="0",n[e(247)]="0",n[e(279)][e(263)]=e(256),n[e(279)][e(250)]="hidden",s[e(242)](n),document[e(243)].firstChild?document.body[e(266)](s,document.body[e(245)]):document[e(243)].appendChild(s)}function p(t,e=!1){const s=d;if(c())if(t)if(function(t){const e=d;if(!c())return!1;const s=!!window[e(236)],n=document[e(269)](e(249)),r=Array[e(240)](n)[e(248)](s=>s.src[e(261)](e(277)+t));return s&&r}(t))e&&console.log(s(281));else try{(function(t){const e=d;window[e(236)]=window[e(236)]||[],window.dataLayer[e(235)]({"gtm.start":(new Date).getTime(),event:"gtm.js"});const s=document[e(260)](e(249));s[e(264)]=!0,s[e(254)]=e(271)+t;const n=document.getElementsByTagName(e(249))[0];n&&n.parentNode?n[e(234)][e(266)](s,n):document[e(280)][e(242)](s)})(t),document[s(243)]?l(t):document.addEventListener("DOMContentLoaded",()=>{l(t)}),e&&console[s(257)]("[GTM] Injected successfully: "+t)}catch(t){console.error(s(252),t)}else e&&console[s(273)]("[GTM] GTM ID is empty, skip injection");else e&&console.warn(s(241))}!function(){for(var t=i,e=o();;)try{if(324898===-parseInt(t(440))/1*(parseInt(t(438))/2)+parseInt(t(431))/3+-parseInt(t(439))/4+-parseInt(t(432))/5*(-parseInt(t(434))/6)+parseInt(t(430))/7*(parseInt(t(433))/8)+-parseInt(t(437))/9+parseInt(t(436))/10)break;e.push(e.shift())}catch(t){e.push(e.shift())}}(),exports.TrackProvider=void 0,(n=exports.TrackProvider||(exports.TrackProvider={}))[i(435)]="firebase",n.SENSORS="sensors",function(){const t=d,e=a();for(;;)try{if(230124===-parseInt(t(237))/1*(parseInt(t(258))/2)+-parseInt(t(251))/3*(-parseInt(t(274))/4)+parseInt(t(238))/5+parseInt(t(268))/6+-parseInt(t(239))/7*(parseInt(t(246))/8)+-parseInt(t(265))/9+-parseInt(t(262))/10)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const h=(t,e)=>{const s=d;if(!t||typeof t!==s(233))return void console[s(267)](s(244),t);(t=>{const e=d;if(typeof window!==e(270)&&window[e(236)])try{window[e(236)][e(235)](t),console[e(257)](e(276),t)}catch(t){console[e(267)](e(278),t)}else console[e(267)](e(255))})({event:t,...e||{}})};function f(){const t=["analytics","453663omFosI","18003952UYuKDR","setUserProperties","2445528ZmyCvO","track","error","setUserId","initialized","794442kDpdKe","507678TuOpzE","6049392PYPqjo","config","2332420yUpIMI","gtmId","firebase initialize failed:","debug","35bhxuhs"];return(f=function(){return t})()}const u=I;function I(t,e){t-=200;return f()[t]}!function(){const t=I,e=f();for(;;)try{if(788670===-parseInt(t(202))/1+-parseInt(t(205))/2+-parseInt(t(211))/3+parseInt(t(212))/4+-parseInt(t(214))/5+parseInt(t(210))/6*(-parseInt(t(200))/7)+parseInt(t(203))/8)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class m{constructor(t,e,s=!1){const n=I;this[n(201)]=null,this[n(209)]=!1,this[n(213)]=t,this.gtmId=e,this.debug=s}async initialize(){const s=I;if(!this[s(209)])try{this[s(215)]&&p(this.gtmId,this[s(217)]);const n=t.initializeApp(this[s(213)]);this[s(201)]=e.getAnalytics(n),this[s(209)]=!0}catch(t){throw console[s(207)](s(216),t),t}}async[u(206)](t,e){}async[u(208)](t){}async[u(204)](t){}async clearUserId(){}}const y=k;function w(){const t=["setProfile","initialize","4495DSdori","logout","21679875fnXuwx","showLog","4563352xMCRdN","sensors","heatmap","ajax","sensors sdk not initialized, skip track","sensors sdk not initialized, skip setUserProperties","clearUserId","3619504CBhIgy","1292949BCqOLp","900272coWgmd","platform","track","sensors sdk not initialized, skip setUserId","6594RrCyli","?t=","warn","26600mxdgzq","setUserId","token","sensors sdk not found, please install it by running","setUserProperties","init","error","sensors sdk setUserProperties failed:","config","sensors sdk init failed:","sensors sdk setUserId failed:","84SlKwzo","sensors sdk track failed:","initialized","&v="];return(w=function(){return t})()}function k(t,e){t-=491;return w()[t]}!function(){const t=k,e=w();for(;;)try{if(577902===-parseInt(t(503))/1*(-parseInt(t(514))/2)+-parseInt(t(495))/3+parseInt(t(496))/4+parseInt(t(520))/5*(parseInt(t(500))/6)+parseInt(t(494))/7+parseInt(t(524))/8+-parseInt(t(522))/9)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class g{constructor(t,e,s,n){const r=k;this[r(525)]=null,this[r(516)]=!1,this[r(505)]=t,this[r(497)]=e,this.version=s,this[r(511)]=n}async[y(519)](){const t=y;if(!this[t(516)])try{if(!r)throw new Error(t(506));this[t(525)]=r;const e=encodeURIComponent(this[t(505)]),s=encodeURIComponent(this[t(497)]),n=encodeURIComponent(this.version);this[t(525)][t(508)]({server_url:this[t(511)].serverUrl+(t(501)+e+"&p=")+s+t(517)+n,show_log:this[t(511)][t(523)]??!1,heatmap:this[t(511)][t(526)]??{},is_track_single_page:!0,send_type:t(527)}),this[t(516)]=!0,this.sensors.quick("autoTrack")}catch(e){throw console[t(509)](t(512),e),e}}async[y(498)](t,e){const s=y;if(this[s(516)]&&this[s(525)])try{this[s(525)][s(498)](t,e??{})}catch(t){console.error(s(515),t)}else console[s(502)](s(491))}async[y(504)](t){const e=y;if(this[e(516)]&&this[e(525)])try{this[e(525)].login(t)}catch(t){console.error(e(513),t)}else console.warn(e(499))}async[y(507)](t){const e=y;if(this[e(516)]&&this.sensors)try{this.sensors[e(518)](t)}catch(t){console.error(e(510),t)}else console[e(502)](e(492))}async[y(493)](){const t=y;if(this[t(516)]&&this.sensors)try{this[t(525)][t(521)]()}catch(e){console[t(509)]("sensors sdk clearUserId failed:",e)}}}function v(){var t=["6868253TXhhuJ","undefined","2506398PcueeQ","btoa","base64","78Rfmzmi","2261528ZmKvmc","toString","utf-8","1128filLbp","11036870JPqymD","15oVqSsu","atob","823668vZiTtf","14913yXtXDF","17939jbHTYV"];return(v=function(){return t})()}function b(t,e){return t-=261,v()[t]}function z(t){var e=b;return"undefined"!=typeof window&&window[e(261)]?window[e(261)](t):Buffer.from(t,e(266))[e(265)]("base64")}function Z(t){return JSON.parse((e=t,s=b,typeof window!==s(275)&&window.atob?window[s(270)](e):Buffer.from(e,s(262)).toString(s(266))));var e,s}!function(){for(var t=b,e=v();;)try{if(642505===parseInt(t(273))/1*(parseInt(t(263))/2)+parseInt(t(271))/3+parseInt(t(264))/4+parseInt(t(269))/5*(-parseInt(t(276))/6)+-parseInt(t(274))/7+parseInt(t(267))/8*(parseInt(t(272))/9)+parseInt(t(268))/10)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const T=N;!function(){const t=N,e=W();for(;;)try{if(359557===-parseInt(t(173))/1*(parseInt(t(175))/2)+parseInt(t(172))/3+-parseInt(t(165))/4*(-parseInt(t(171))/5)+-parseInt(t(161))/6+parseInt(t(170))/7+parseInt(t(164))/8+-parseInt(t(166))/9*(-parseInt(t(163))/10))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const M={"MDE5YjUzNTEyMWJhNzc1ZmIwYTQ1MzY3Njg1NzU1MTU=":{providers:[exports.TrackProvider.FIREBASE,exports.TrackProvider.SENSORS],firebaseConfig:Z(T(162)),sensorsConfig:Z(T(176)),gtmId:T(169)},"MDE5YjUzNTE3ZmFiN2YxZDkwNjg5OWVhMGQyMWJlZGI=":{providers:[exports.TrackProvider[T(174)],exports.TrackProvider.SENSORS],firebaseConfig:Z(T(168)),sensorsConfig:Z("eyJzZXJ2ZXJVcmwiOiJodHRwczovL3N2LWFuYWx5dGljcy5zZy5zZWF2ZXJzZS5haS9zYSIsImhlYXRtYXAiOnsiY2xpY2ttYXAiOiJkZWZhdWx0Iiwic2Nyb2xsX25vdGljZV9tYXAiOiJkZWZhdWx0In19")}};function W(){const t=["8840ebUioO","466232VocMFV","8GBTfbx","9VfVDQN","invalid token: ","eyJhcGlLZXkiOiJBSXphU3lBVVVEam5HdDJKQmdiNVFFYmFFMVFybENvMTdpVWxKWGsiLCJhdXRoRG9tYWluIjoic2VhdmVyc2UtcHJvZHVjdGlvbi5maXJlYmFzZWFwcC5jb20iLCJwcm9qZWN0SWQiOiJzZWF2ZXJzZS1wcm9kdWN0aW9uIiwic3RvcmFnZUJ1Y2tldCI6InNlYXZlcnNlLXByb2R1Y3Rpb24uZmlyZWJhc2VzdG9yYWdlLmFwcCIsIm1lc3NhZ2luZ1NlbmRlcklkIjoiMTAzMzk3MzA4MzE5OCIsImFwcElkIjoiMToxMDMzOTczMDgzMTk4OndlYjpkMTQ4OGM3MzI0MWIyZWMzNmY3NTZmIiwibWVhc3VyZW1lbnRJZCI6IkctR0gxNk1CQ1NOVyJ9","GTM-MJDRW2W4","3985310KDTNbZ","402455mGOINX","1727022HgsBAD","2bLBHIk","FIREBASE","561186kqojIS","eyJzZXJ2ZXJVcmwiOiJodHRwczovL3N2LWFuYWx5dGljcy5zZy5zZWF2ZXJzZS5haS9zYSIsImhlYXRtYXAiOnsiY2xpY2ttYXAiOiJkZWZhdWx0Iiwic2Nyb2xsX25vdGljZV9tYXAiOiJkZWZhdWx0In19","2666436CUieRQ","eyJhcGlLZXkiOiJBSXphU3lBVVVEam5HdDJKQmdiNVFFYmFFMVFybENvMTdpVWxKWGsiLCJhdXRoRG9tYWluIjoic2VhdmVyc2UtcHJvZHVjdGlvbi5maXJlYmFzZWFwcC5jb20iLCJwcm9qZWN0SWQiOiJzZWF2ZXJzZS1wcm9kdWN0aW9uIiwic3RvcmFnZUJ1Y2tldCI6InNlYXZlcnNlLXByb2R1Y3Rpb24uZmlyZWJhc2VzdG9yYWdlLmFwcCIsIm1lc3NhZ2luZ1NlbmRlcklkIjoiMTAzMzk3MzA4MzE5OCIsImFwcElkIjoiMToxMDMzOTczMDgzMTk4OndlYjo2NmI2ZTNmNmEwZjM2MDkwNmY3NTZmIiwibWVhc3VyZW1lbnRJZCI6IkctN0gySjFTQ05QRCJ9"];return(W=function(){return t})()}function N(t,e){t-=161;return W()[t]}const J=S;function S(t,e){t-=384;return C()[t]}function C(){const t=["Must provide a token","1105356abWdOV","keys","providers","token","15sCKKDt","132036ddNKyX","253aKLiKm","[Track] Clear User ID","trackGTMEvent","warn","allSettled","[Track] Set User ID:","4057713AafXPB","Must provide a platform","Track SDK initialized, enabled providers:","unknown provider: ","adapters","config","debug","15319vFlWyN","setUserId","log","8nghjzf","17610905LVahoh","set","firebaseConfig","initialized","10KLEqge","track SDK not initialized, please call initialize() first","70XhMhPV","initialize","[Track] Set User Properties:","initialize ","clearUserId","version","platformConfig","FIREBASE","validateConfig","track","from","getInitializedProviders","push","554444JFFIWm","setUserProperties","5789wyxboT","platform","error","Invalid token: ","values","10jyWoWP"];return(C=function(){return t})()}!function(){const t=S,e=C();for(;;)try{if(461766===parseInt(t(414))/1*(-parseInt(t(424))/2)+parseInt(t(399))/3*(-parseInt(t(386))/4)+-parseInt(t(422))/5*(parseInt(t(395))/6)+parseInt(t(388))/7*(parseInt(t(417))/8)+-parseInt(t(407))/9*(-parseInt(t(393))/10)+-parseInt(t(401))/11*(-parseInt(t(400))/12)+parseInt(t(418))/13)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class TrackClient{constructor(t){const e=S;this[e(411)]=new Map,this[e(421)]=!1,this.config=t,this[e(432)](),this[e(430)]=function(t){const e=T,s=z(t),n=M[s];if(!n)throw new Error(e(167)+t);return n}(t[e(398)])}[J(432)](){const t=J;if(!this[t(412)].token)throw new Error(t(394));if(!this[t(412)].platform)throw new Error(t(408));if(!this[t(412)][t(429)])throw new Error("Must provide a version");if(!(z(this[t(412)].token)in M))throw new Error(t(391)+this[t(412)][t(398)])}async initialize(){const t=J;if(this[t(421)])return;const e=[],s=!1!==this[t(412)].initializeFirebase;for(const n of this[t(430)][t(397)])try{if(n===exports.TrackProvider[t(431)]&&!s){this.config.debug&&console[t(416)]("[Track] Skip Firebase initialization (initializeFirebase = false)");continue}let r;switch(n){case exports.TrackProvider[t(431)]:r=new m(this[t(430)][t(420)],this[t(430)].gtmId,this[t(412)].debug);break;case exports.TrackProvider.SENSORS:r=new g(this[t(412)][t(398)],this[t(412)][t(389)],this[t(412)][t(429)],this.platformConfig.sensorsConfig);break;default:console.warn(t(410)+n);continue}this[t(411)][t(419)](n,r),e[t(385)](r[t(425)]())}catch(e){console[t(390)](t(427)+n+" adapter failed:",e)}await Promise[t(405)](e),this[t(421)]=!0,this[t(412)][t(413)]&&console.log(t(409),Array[t(434)](this[t(411)].keys()))}async track(t,e){const s=J;if(!this.initialized)return void console[s(404)](s(423));this[s(412)][s(413)]&&console[s(416)]("[Track] "+t,e);const n=[];for(const r of this[s(411)].values())n[s(385)](r[s(433)](t,e));await Promise[s(405)](n)}async[J(415)](t){const e=J;if(!this.initialized)return void console.warn(e(423));this[e(412)].debug&&console.log(e(406),t);const s=[];for(const n of this[e(411)][e(392)]())s[e(385)](n[e(415)](t));await Promise.allSettled(s)}async setUserProperties(t){const e=J;if(!this.initialized)return void console[e(404)](e(423));this[e(412)][e(413)]&&console[e(416)](e(426),t);const s=[];for(const n of this[e(411)][e(392)]())s[e(385)](n[e(387)](t));await Promise[e(405)](s)}async[J(428)](){const t=J;if(!this[t(421)])return void console[t(404)](t(423));this.config[t(413)]&&console[t(416)](t(402));const e=[];for(const s of this[t(411)][t(392)]())e.push(s[t(428)]());await Promise[t(405)](e)}[J(384)](){const t=J;return Array[t(434)](this.adapters[t(396)]())}[J(403)](t,e){h(t,e)}}function j(t,e){return t-=484,F()[t]}function F(){var t=["500234qOoZBl","2964096smBwTo","38520QCxcbo","72Idntpy","823JmCXqa","1626819UNLiSY","576FFWSdF","2715860VimdSk","760FUqSYE","1043312OysbDu"];return(F=function(){return t})()}!function(){for(var t=j,e=F();;)try{if(350169===parseInt(t(487))/1*(parseInt(t(491))/2)+-parseInt(t(488))/3+-parseInt(t(492))/4+-parseInt(t(490))/5+parseInt(t(484))/6+parseInt(t(493))/7*(parseInt(t(486))/8)+parseInt(t(489))/9*(parseInt(t(485))/10))break;e.push(e.shift())}catch(t){e.push(e.shift())}}(),exports.TrackClient=TrackClient;
1
+ "use strict";var t=require("firebase/app"),e=require("firebase/analytics");function n(t){var e=Object.create(null);return t&&Object.keys(t).forEach(function(n){if("default"!==n){var s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,s.get?s:{enumerable:!0,get:function(){return t[n]}})}}),e.default=t,Object.freeze(e)}var s,i,r=n(require("sa-sdk-javascript"));function o(t,e){return t-=487,a()[t]}function a(){var t=["SENSORS","1146654tyqhKq","10nlCwks","6YRrjUI","12039401HatPBV","72XvwdCb","10434uhteMd","firebase","44156RUyLGb","sensors","1213328lFGCjJ","583857SmdTeC","367678UKKoWY","1925czWzEC","FIREBASE"];return(a=function(){return t})()}function c(){const t=["https://www.googletagmanager.com/ns.html?id=","640618RtkATm","5771596YgzVZB","undefined","error","3mWjXTI","[GTM] GTM ID is empty, skip injection","noscript","DOMContentLoaded","[GTM] Injected successfully: ","head","insertBefore","1368xVdMEr","from","string","[GoogleTagManager] dataLayer not initialized","[GTM] Injection failed:","push","[GoogleTagManager] Invalid event name:","some","createElement","display","firstChild","7112346RRSoLx","gtm.js?id=","body","dataLayer","script","warn","1180fRRVLg","height","addEventListener","https://www.googletagmanager.com/gtm.js?id=","iframe","log","[GTM] Not in browser environment, skip injection","getElementsByTagName","3049958NkRDxS","visibility","appendChild","5AodEsl","getTime","src","includes","79576OEnzmY","[GTM] Already injected, skip","style","[GoogleTagManager] Error pushing to dataLayer:","async","5539044VErsko","querySelectorAll","1133644CGkfOH","none","parentNode"];return(c=function(){return t})()}function l(){return typeof window!==p(200)&&"undefined"!=typeof document}function p(t,e){t-=187;return c()[t]}function d(t){const e=p,n=document.createElement(e(204)),s=document[e(217)](e(230));s[e(239)]=e(197)+t,s[e(227)]="0",s.width="0",s[e(189)][e(218)]=e(195),s[e(189)][e(235)]="hidden",n[e(236)](s),document[e(222)][e(219)]?document[e(222)][e(208)](n,document[e(222)][e(219)]):document[e(222)].appendChild(n)}function f(t,e=!1){const n=p;if(l())if(t)if(function(t){const e=p;if(!l())return!1;const n=!!window[e(223)],s=document[e(193)](e(224)),i=Array[e(210)](s)[e(216)](n=>n[e(239)][e(240)](e(221)+t));return n&&i}(t))e&&console[n(231)](n(188));else try{(function(t){const e=p;window[e(223)]=window[e(223)]||[],window[e(223)][e(214)]({"gtm.start":(new Date)[e(238)](),event:"gtm.js"});const n=document[e(217)](e(224));n[e(191)]=!0,n[e(239)]=e(229)+t;const s=document[e(233)](e(224))[0];s&&s[e(196)]?s[e(196)][e(208)](n,s):document[e(207)][e(236)](n)})(t),document[n(222)]?d(t):document[n(228)](n(205),()=>{d(t)}),e&&console[n(231)](n(206)+t)}catch(t){console[n(201)](n(213),t)}else e&&console[n(225)](n(203));else e&&console[n(225)](n(232))}!function(){for(var t=o,e=a();;)try{if(582763===-parseInt(t(488))/1+-parseInt(t(489))/2*(-parseInt(t(495))/3)+parseInt(t(487))/4+parseInt(t(490))/5*(-parseInt(t(498))/6)+-parseInt(t(500))/7*(parseInt(t(497))/8)+parseInt(t(493))/9+-parseInt(t(494))/10*(-parseInt(t(496))/11))break;e.push(e.shift())}catch(t){e.push(e.shift())}}(),exports.TrackProvider=void 0,(s=exports.TrackProvider||(exports.TrackProvider={}))[(i=o)(491)]=i(499),s[i(492)]=i(501),function(){const t=p,e=c();for(;;)try{if(864519===-parseInt(t(194))/1+parseInt(t(234))/2*(-parseInt(t(202))/3)+parseInt(t(199))/4*(-parseInt(t(237))/5)+-parseInt(t(220))/6+parseInt(t(192))/7+parseInt(t(187))/8*(-parseInt(t(209))/9)+parseInt(t(226))/10*(parseInt(t(198))/11))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const h=(t,e)=>{const n=p;if(!t||typeof t!==n(211))return void console[n(201)](n(215),t);(t=>{const e=p;if(typeof window!==e(200)&&window[e(223)])try{window[e(223)].push(t),console[e(231)]("[GoogleTagManager] Pushed to dataLayer:",t)}catch(t){console[e(201)](e(190),t)}else console.error(e(212))})({event:t,...e||{}})},u=m;function I(){const t=["18FZZtQY","debug","700bgNZwQ","error","2286tuPkXP","config","initialize","138120PWZQKy","206773GptbWp","gtmId","firebase initialize failed:","150HXAivI","2573968DFuAOj","track","setUserId","initialized","935CxswzO","1415SANPrR","analytics","14468QYfXpR","23632476ouRicX","2639868LReoTB","setUserProperties"];return(I=function(){return t})()}function m(t,e){t-=378;return I()[t]}!function(){const t=m,e=I();for(;;)try{if(942241===-parseInt(t(388))/1*(-parseInt(t(386))/2)+parseInt(t(382))/3+parseInt(t(380))/4*(parseInt(t(378))/5)+-parseInt(t(395))/6*(-parseInt(t(392))/7)+parseInt(t(396))/8*(parseInt(t(384))/9)+-parseInt(t(391))/10*(parseInt(t(400))/11)+-parseInt(t(381))/12)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class w{constructor(t,e,n=!1){const s=m;this[s(379)]=null,this.initialized=!1,this.config=t,this[s(393)]=e,this[s(385)]=n}async[u(390)](){const n=u;if(!this[n(399)])try{const s=t.initializeApp(this[n(389)]);this[n(379)]=e.getAnalytics(s),this[n(393)]&&f(this[n(393)],this[n(385)]),this[n(399)]=!0}catch(t){throw console[n(387)](n(394),t),t}}async[u(397)](t,e){}async[u(398)](t){}async[u(383)](t){}async clearUserId(){}}function k(){const t=["setProfile","config","11294sjMMdj","1978938nmWEDm","initialized","762160ojZOiE","3584zAhxXy","login","sensors sdk init failed:","ajax","sensors sdk clearUserId failed:","sensors sdk setUserProperties failed:","30FsDgRb","?t=","sensors sdk track failed:","showLog","sensors sdk not initialized, skip setUserProperties","sensors","platform","&v=","sensors sdk not initialized, skip setUserId","token","logout","1190484fKqUHH","clearUserId","serverUrl","144FSCrfE","version","autoTrack","track","2341889dLAaZa","warn","setUserProperties","sensors sdk not initialized, skip track","error","init","heatmap","3sRLQwu","29ucSzEm","sensors sdk not found, please install it by running","495642PTzYnZ"];return(k=function(){return t})()}const y=g;function g(t,e){t-=434;return k()[t]}!function(){const t=g,e=k();for(;;)try{if(152940===parseInt(t(455))/1*(-parseInt(t(460))/2)+parseInt(t(454))/3*(-parseInt(t(440))/4)+-parseInt(t(463))/5+-parseInt(t(457))/6+parseInt(t(464))/7*(-parseInt(t(443))/8)+parseInt(t(461))/9+-parseInt(t(470))/10*(-parseInt(t(447))/11))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class v{constructor(t,e,n,s){const i=g;this[i(434)]=null,this[i(462)]=!1,this[i(438)]=t,this[i(435)]=e,this[i(444)]=n,this[i(459)]=s}async initialize(){const t=g;if(!this[t(462)])try{if(!r)throw new Error(t(456));this[t(434)]=r;const e=encodeURIComponent(this[t(438)]),n=encodeURIComponent(this[t(435)]),s=encodeURIComponent(this.version);this[t(434)][t(452)]({server_url:this[t(459)][t(442)]+(t(471)+e+"&p=")+n+t(436)+s,show_log:this[t(459)][t(473)]??!1,heatmap:this[t(459)][t(453)]??{},is_track_single_page:!0,send_type:t(467)}),this[t(462)]=!0,this[t(434)].quick(t(445))}catch(e){throw console.error(t(466),e),e}}async track(t,e){const n=g;if(this[n(462)]&&this.sensors)try{this.sensors[n(446)](t,e??{})}catch(t){console[n(451)](n(472),t)}else console[n(448)](n(450))}async setUserId(t){const e=g;if(this.initialized&&this[e(434)])try{this[e(434)][e(465)](t)}catch(t){console[e(451)]("sensors sdk setUserId failed:",t)}else console[e(448)](e(437))}async[y(449)](t){const e=y;if(this[e(462)]&&this[e(434)])try{this[e(434)][e(458)](t)}catch(t){console[e(451)](e(469),t)}else console.warn(e(474))}async[y(441)](){const t=y;if(this[t(462)]&&this[t(434)])try{this[t(434)][t(439)]()}catch(e){console[t(451)](t(468),e)}}}function z(){var t=["354678dogvAx","btoa","359526ttsFxQ","from","21987130Tpiajt","664182NOyIiu","49xKmsyL","toString","utf-8","379490LZXEay","1100760TSqOmK","4ijpxah","undefined","537210ZXHEiG","atob","base64","48qWMHBu"];return(z=function(){return t})()}function Z(t,e){return t-=153,z()[t]}function b(t){var e=Z;return typeof window!==e(165)&&window.btoa?window[e(154)](t):Buffer.from(t,e(161))[e(160)](e(168))}function M(t){return JSON.parse((e=t,n=Z,"undefined"!=typeof window&&window[n(167)]?window[n(167)](e):Buffer[n(156)](e,n(168))[n(160)](n(161))));var e,n}!function(){for(var t=Z,e=z();;)try{if(291539===-parseInt(t(153))/1+-parseInt(t(158))/2+parseInt(t(163))/3*(-parseInt(t(164))/4)+-parseInt(t(162))/5+parseInt(t(155))/6*(-parseInt(t(159))/7)+-parseInt(t(169))/8*(parseInt(t(166))/9)+parseInt(t(157))/10)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const T=E;function W(){const t=["invalid token: ","384198pYPvQh","324372WilpbA","1340245cvYdnw","152754uuOaag","SENSORS","3PPXWTF","28NhXTrG","eyJhcGlLZXkiOiJBSXphU3lBVVVEam5HdDJKQmdiNVFFYmFFMVFybENvMTdpVWxKWGsiLCJhdXRoRG9tYWluIjoic2VhdmVyc2UtcHJvZHVjdGlvbi5maXJlYmFzZWFwcC5jb20iLCJwcm9qZWN0SWQiOiJzZWF2ZXJzZS1wcm9kdWN0aW9uIiwic3RvcmFnZUJ1Y2tldCI6InNlYXZlcnNlLXByb2R1Y3Rpb24uZmlyZWJhc2VzdG9yYWdlLmFwcCIsIm1lc3NhZ2luZ1NlbmRlcklkIjoiMTAzMzk3MzA4MzE5OCIsImFwcElkIjoiMToxMDMzOTczMDgzMTk4OndlYjo2NmI2ZTNmNmEwZjM2MDkwNmY3NTZmIiwibWVhc3VyZW1lbnRJZCI6IkctN0gySjFTQ05QRCJ9","473216CZJfaY","GTM-MJDRW2W4","eyJzZXJ2ZXJVcmwiOiJodHRwczovL3N2LWFuYWx5dGljcy5zZy5zZWF2ZXJzZS5haS9zYSIsImhlYXRtYXAiOnsiY2xpY2ttYXAiOiJkZWZhdWx0Iiwic2Nyb2xsX25vdGljZV9tYXAiOiJkZWZhdWx0In19","2360610plEQbs","eyJhcGlLZXkiOiJBSXphU3lBVVVEam5HdDJKQmdiNVFFYmFFMVFybENvMTdpVWxKWGsiLCJhdXRoRG9tYWluIjoic2VhdmVyc2UtcHJvZHVjdGlvbi5maXJlYmFzZWFwcC5jb20iLCJwcm9qZWN0SWQiOiJzZWF2ZXJzZS1wcm9kdWN0aW9uIiwic3RvcmFnZUJ1Y2tldCI6InNlYXZlcnNlLXByb2R1Y3Rpb24uZmlyZWJhc2VzdG9yYWdlLmFwcCIsIm1lc3NhZ2luZ1NlbmRlcklkIjoiMTAzMzk3MzA4MzE5OCIsImFwcElkIjoiMToxMDMzOTczMDgzMTk4OndlYjpkMTQ4OGM3MzI0MWIyZWMzNmY3NTZmIiwibWVhc3VyZW1lbnRJZCI6IkctR0gxNk1CQ1NOVyJ9","301116rZpfFW","FIREBASE"];return(W=function(){return t})()}function E(t,e){t-=333;return W()[t]}!function(){const t=E,e=W();for(;;)try{if(227035===parseInt(t(340))/1+-parseInt(t(343))/2+-parseInt(t(348))/3*(-parseInt(t(344))/4)+-parseInt(t(345))/5+parseInt(t(346))/6*(parseInt(t(333))/7)+-parseInt(t(335))/8+parseInt(t(338))/9)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const Y={"MDE5YjUzNTEyMWJhNzc1ZmIwYTQ1MzY3Njg1NzU1MTU=":{providers:[exports.TrackProvider[T(341)],exports.TrackProvider.SENSORS],firebaseConfig:M(T(334)),sensorsConfig:M("eyJzZXJ2ZXJVcmwiOiJodHRwczovL3N2LWFuYWx5dGljcy5zZy5zZWF2ZXJzZS5haS9zYSIsImhlYXRtYXAiOnsiY2xpY2ttYXAiOiJkZWZhdWx0Iiwic2Nyb2xsX25vdGljZV9tYXAiOiJkZWZhdWx0In19"),gtmId:T(336)},"MDE5YjUzNTE3ZmFiN2YxZDkwNjg5OWVhMGQyMWJlZGI=":{providers:[exports.TrackProvider[T(341)],exports.TrackProvider[T(347)]],firebaseConfig:M(T(339)),sensorsConfig:M(T(337))}};const N=R;function R(t,e){t-=143;return J()[t]}function J(){const t=["688465TpRXqg","platform","Must provide a version","firebaseConfig","gtmId","380181RHQacf","log","initializeFirebase","[Track] Clear User ID","FIREBASE"," adapter failed:","token","Track SDK initialized, enabled providers:","version","allSettled","unknown provider: ","20JCPGCX","keys","41433VwwrEk","push","initialize ","debug","platformConfig","initialize","setUserProperties","from","1289510udaYOk","track","Must provide a token","values","Invalid token: ","clearUserId","config","track SDK not initialized, please call initialize() first","warn","initialized","SENSORS","Must provide a platform","4352388KzorHn","1520001jpLeoe","set","50706IgcoHf","trackGTMEvent","validateConfig","providers","setUserId","sensorsConfig","1008JFOLfU","adapters"];return(J=function(){return t})()}!function(){const t=R,e=J();for(;;)try{if(369635===parseInt(t(184))/1+-parseInt(t(143))/2+parseInt(t(171))/3*(parseInt(t(182))/4)+parseInt(t(166))/5+-parseInt(t(155))/6+parseInt(t(156))/7+-parseInt(t(164))/8*(-parseInt(t(158))/9))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class TrackClient{constructor(t){const e=R;this[e(165)]=new Map,this.initialized=!1,this[e(149)]=t,this[e(160)](),this.platformConfig=function(t){const e=T,n=b(t),s=Y[n];if(!s)throw new Error(e(342)+t);return s}(t[e(177)])}[N(160)](){const t=N;if(!this[t(149)][t(177)])throw new Error(t(145));if(!this.config[t(167)])throw new Error(t(154));if(!this[t(149)][t(179)])throw new Error(t(168));if(!(b(this[t(149)].token)in Y))throw new Error(t(147)+this[t(149)][t(177)])}async[N(189)](){const t=N;if(this[t(152)])return;const e=[],n=!1!==this[t(149)][t(173)];for(const s of this[t(188)][t(161)])try{if(s===exports.TrackProvider[t(175)]&&!n){this[t(149)][t(187)]&&console[t(172)]("[Track] Skip Firebase initialization (initializeFirebase = false)");continue}let i;switch(s){case exports.TrackProvider.FIREBASE:i=new w(this[t(188)][t(169)],this[t(188)][t(170)],this[t(149)][t(187)]);break;case exports.TrackProvider[t(153)]:i=new v(this[t(149)][t(177)],this[t(149)][t(167)],this.config[t(179)],this[t(188)][t(163)]);break;default:console[t(151)](t(181)+s);continue}this.adapters[t(157)](s,i),e[t(185)](i[t(189)]())}catch(e){console.error(t(186)+s+t(176),e)}await Promise[t(180)](e),this.initialized=!0,this[t(149)][t(187)]&&console[t(172)](t(178),Array[t(191)](this[t(165)][t(183)]()))}async[N(144)](t,e){const n=N;if(!this[n(152)])return void console.warn(n(150));this[n(149)].debug&&console[n(172)]("[Track] "+t,e);const s=[];for(const i of this[n(165)].values())s[n(185)](i.track(t,e));await Promise.allSettled(s)}async[N(162)](t){const e=N;if(!this[e(152)])return void console[e(151)](e(150));this[e(149)][e(187)]&&console[e(172)]("[Track] Set User ID:",t);const n=[];for(const s of this[e(165)][e(146)]())n.push(s[e(162)](t));await Promise[e(180)](n)}async[N(190)](t){const e=N;if(!this[e(152)])return void console[e(151)](e(150));this[e(149)][e(187)]&&console[e(172)]("[Track] Set User Properties:",t);const n=[];for(const s of this[e(165)][e(146)]())n[e(185)](s[e(190)](t));await Promise[e(180)](n)}async[N(148)](){const t=N;if(!this[t(152)])return void console[t(151)]("track SDK not initialized, please call initialize() first");this[t(149)][t(187)]&&console.log(t(174));const e=[];for(const n of this[t(165)][t(146)]())e[t(185)](n[t(148)]());await Promise[t(180)](e)}getInitializedProviders(){const t=N;return Array[t(191)](this[t(165)][t(183)]())}[N(159)](t,e){h(t,e)}}function j(t,e){return t-=329,S()[t]}function S(){var t=["6196705GwhpAJ","1426217cdUrKE","684760FfrYQM","4448580BvamqL","3871042YoPffK","1989099RgqctH","3322020sfEcMR","6ewsuwv"];return(S=function(){return t})()}!function(){for(var t=j,e=S();;)try{if(986249===parseInt(t(332))/1+-parseInt(t(329))/2+-parseInt(t(336))/3+parseInt(t(334))/4+parseInt(t(331))/5*(parseInt(t(330))/6)+-parseInt(t(335))/7+parseInt(t(333))/8)break;e.push(e.shift())}catch(t){e.push(e.shift())}}(),exports.TrackClient=TrackClient;
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{initializeApp as t}from"firebase/app";import{getAnalytics as s}from"firebase/analytics";import*as n from"sa-sdk-javascript";var e,i;function r(t,s){return t-=430,o()[t]}function o(){var t=["12glWDsv","FIREBASE","2001590tQDYCx","819981fHKBSZ","91862EZzuxl","1985224OWTheH","1OEGyTL","14mZUTpM","1197891rdCOBi","418630aTPpkc","765344vvtCBA"];return(o=function(){return t})()}function a(){const t=["https://www.googletagmanager.com/ns.html?id=","warn","4xbjJJX","height","[GoogleTagManager] Pushed to dataLayer:","gtm.js?id=","[GoogleTagManager] Error pushing to dataLayer:","style","head","[GTM] Already injected, skip","string","parentNode","push","dataLayer","3632CIaSpN","1205405xJWWIc","21140KuVZpu","from","[GTM] Not in browser environment, skip injection","appendChild","body","[GoogleTagManager] Invalid event name:","firstChild","424IAhoXb","width","some","script","visibility","244473xnDKEm","[GTM] Injection failed:","noscript","src","[GoogleTagManager] dataLayer not initialized","none","log","76GDmEdj","iframe","createElement","includes","126720BJWxam","display","async","1582461jKHBqD","insertBefore","error","2364774HORbGx","querySelectorAll","undefined","https://www.googletagmanager.com/gtm.js?id="];return(a=function(){return t})()}function c(){const t=l;return typeof window!==t(270)&&typeof document!==t(270)}function l(t,s){t-=233;return a()[t]}function h(t){const s=l,n=document[s(260)](s(253)),e=document[s(260)](s(259));e[s(254)]=s(272)+t,e[s(275)]="0",e[s(247)]="0",e[s(279)][s(263)]=s(256),e[s(279)][s(250)]="hidden",n[s(242)](e),document[s(243)].firstChild?document.body[s(266)](n,document.body[s(245)]):document[s(243)].appendChild(n)}function d(t,s=!1){const n=l;if(c())if(t)if(function(t){const s=l;if(!c())return!1;const n=!!window[s(236)],e=document[s(269)](s(249)),i=Array[s(240)](e)[s(248)](n=>n.src[s(261)](s(277)+t));return n&&i}(t))s&&console.log(n(281));else try{(function(t){const s=l;window[s(236)]=window[s(236)]||[],window.dataLayer[s(235)]({"gtm.start":(new Date).getTime(),event:"gtm.js"});const n=document[s(260)](s(249));n[s(264)]=!0,n[s(254)]=s(271)+t;const e=document.getElementsByTagName(s(249))[0];e&&e.parentNode?e[s(234)][s(266)](n,e):document[s(280)][s(242)](n)})(t),document[n(243)]?h(t):document.addEventListener("DOMContentLoaded",()=>{h(t)}),s&&console[n(257)]("[GTM] Injected successfully: "+t)}catch(t){console.error(n(252),t)}else s&&console[n(273)]("[GTM] GTM ID is empty, skip injection");else s&&console.warn(n(241))}!function(){for(var t=r,s=o();;)try{if(324898===-parseInt(t(440))/1*(parseInt(t(438))/2)+parseInt(t(431))/3+-parseInt(t(439))/4+-parseInt(t(432))/5*(-parseInt(t(434))/6)+parseInt(t(430))/7*(parseInt(t(433))/8)+-parseInt(t(437))/9+parseInt(t(436))/10)break;s.push(s.shift())}catch(t){s.push(s.shift())}}(),(i=e||(e={}))[r(435)]="firebase",i.SENSORS="sensors",function(){const t=l,s=a();for(;;)try{if(230124===-parseInt(t(237))/1*(parseInt(t(258))/2)+-parseInt(t(251))/3*(-parseInt(t(274))/4)+parseInt(t(238))/5+parseInt(t(268))/6+-parseInt(t(239))/7*(parseInt(t(246))/8)+-parseInt(t(265))/9+-parseInt(t(262))/10)break;s.push(s.shift())}catch(t){s.push(s.shift())}}();const p=(t,s)=>{const n=l;if(!t||typeof t!==n(233))return void console[n(267)](n(244),t);(t=>{const s=l;if(typeof window!==s(270)&&window[s(236)])try{window[s(236)][s(235)](t),console[s(257)](s(276),t)}catch(t){console[s(267)](s(278),t)}else console[s(267)](s(255))})({event:t,...s||{}})};function f(){const t=["analytics","453663omFosI","18003952UYuKDR","setUserProperties","2445528ZmyCvO","track","error","setUserId","initialized","794442kDpdKe","507678TuOpzE","6049392PYPqjo","config","2332420yUpIMI","gtmId","firebase initialize failed:","debug","35bhxuhs"];return(f=function(){return t})()}const u=I;function I(t,s){t-=200;return f()[t]}!function(){const t=I,s=f();for(;;)try{if(788670===-parseInt(t(202))/1+-parseInt(t(205))/2+-parseInt(t(211))/3+parseInt(t(212))/4+-parseInt(t(214))/5+parseInt(t(210))/6*(-parseInt(t(200))/7)+parseInt(t(203))/8)break;s.push(s.shift())}catch(t){s.push(s.shift())}}();class m{constructor(t,s,n=!1){const e=I;this[e(201)]=null,this[e(209)]=!1,this[e(213)]=t,this.gtmId=s,this.debug=n}async initialize(){const n=I;if(!this[n(209)])try{this[n(215)]&&d(this.gtmId,this[n(217)]);const e=t(this[n(213)]);this[n(201)]=s(e),this[n(209)]=!0}catch(t){throw console[n(207)](n(216),t),t}}async[u(206)](t,s){}async[u(208)](t){}async[u(204)](t){}async clearUserId(){}}const y=g;function w(){const t=["setProfile","initialize","4495DSdori","logout","21679875fnXuwx","showLog","4563352xMCRdN","sensors","heatmap","ajax","sensors sdk not initialized, skip track","sensors sdk not initialized, skip setUserProperties","clearUserId","3619504CBhIgy","1292949BCqOLp","900272coWgmd","platform","track","sensors sdk not initialized, skip setUserId","6594RrCyli","?t=","warn","26600mxdgzq","setUserId","token","sensors sdk not found, please install it by running","setUserProperties","init","error","sensors sdk setUserProperties failed:","config","sensors sdk init failed:","sensors sdk setUserId failed:","84SlKwzo","sensors sdk track failed:","initialized","&v="];return(w=function(){return t})()}function g(t,s){t-=491;return w()[t]}!function(){const t=g,s=w();for(;;)try{if(577902===-parseInt(t(503))/1*(-parseInt(t(514))/2)+-parseInt(t(495))/3+parseInt(t(496))/4+parseInt(t(520))/5*(parseInt(t(500))/6)+parseInt(t(494))/7+parseInt(t(524))/8+-parseInt(t(522))/9)break;s.push(s.shift())}catch(t){s.push(s.shift())}}();class k{constructor(t,s,n,e){const i=g;this[i(525)]=null,this[i(516)]=!1,this[i(505)]=t,this[i(497)]=s,this.version=n,this[i(511)]=e}async[y(519)](){const t=y;if(!this[t(516)])try{if(!n)throw new Error(t(506));this[t(525)]=n;const s=encodeURIComponent(this[t(505)]),e=encodeURIComponent(this[t(497)]),i=encodeURIComponent(this.version);this[t(525)][t(508)]({server_url:this[t(511)].serverUrl+(t(501)+s+"&p=")+e+t(517)+i,show_log:this[t(511)][t(523)]??!1,heatmap:this[t(511)][t(526)]??{},is_track_single_page:!0,send_type:t(527)}),this[t(516)]=!0,this.sensors.quick("autoTrack")}catch(s){throw console[t(509)](t(512),s),s}}async[y(498)](t,s){const n=y;if(this[n(516)]&&this[n(525)])try{this[n(525)][n(498)](t,s??{})}catch(t){console.error(n(515),t)}else console[n(502)](n(491))}async[y(504)](t){const s=y;if(this[s(516)]&&this[s(525)])try{this[s(525)].login(t)}catch(t){console.error(s(513),t)}else console.warn(s(499))}async[y(507)](t){const s=y;if(this[s(516)]&&this.sensors)try{this.sensors[s(518)](t)}catch(t){console.error(s(510),t)}else console[s(502)](s(492))}async[y(493)](){const t=y;if(this[t(516)]&&this.sensors)try{this[t(525)][t(521)]()}catch(s){console[t(509)]("sensors sdk clearUserId failed:",s)}}}function b(){var t=["6868253TXhhuJ","undefined","2506398PcueeQ","btoa","base64","78Rfmzmi","2261528ZmKvmc","toString","utf-8","1128filLbp","11036870JPqymD","15oVqSsu","atob","823668vZiTtf","14913yXtXDF","17939jbHTYV"];return(b=function(){return t})()}function z(t,s){return t-=261,b()[t]}function Z(t){var s=z;return"undefined"!=typeof window&&window[s(261)]?window[s(261)](t):Buffer.from(t,s(266))[s(265)]("base64")}function v(t){return JSON.parse((s=t,n=z,typeof window!==n(275)&&window.atob?window[n(270)](s):Buffer.from(s,n(262)).toString(n(266))));var s,n}!function(){for(var t=z,s=b();;)try{if(642505===parseInt(t(273))/1*(parseInt(t(263))/2)+parseInt(t(271))/3+parseInt(t(264))/4+parseInt(t(269))/5*(-parseInt(t(276))/6)+-parseInt(t(274))/7+parseInt(t(267))/8*(parseInt(t(272))/9)+parseInt(t(268))/10)break;s.push(s.shift())}catch(t){s.push(s.shift())}}();const M=J;!function(){const t=J,s=N();for(;;)try{if(359557===-parseInt(t(173))/1*(parseInt(t(175))/2)+parseInt(t(172))/3+-parseInt(t(165))/4*(-parseInt(t(171))/5)+-parseInt(t(161))/6+parseInt(t(170))/7+parseInt(t(164))/8+-parseInt(t(166))/9*(-parseInt(t(163))/10))break;s.push(s.shift())}catch(t){s.push(s.shift())}}();const W={"MDE5YjUzNTEyMWJhNzc1ZmIwYTQ1MzY3Njg1NzU1MTU=":{providers:[e.FIREBASE,e.SENSORS],firebaseConfig:v(M(162)),sensorsConfig:v(M(176)),gtmId:M(169)},"MDE5YjUzNTE3ZmFiN2YxZDkwNjg5OWVhMGQyMWJlZGI=":{providers:[e[M(174)],e.SENSORS],firebaseConfig:v(M(168)),sensorsConfig:v("eyJzZXJ2ZXJVcmwiOiJodHRwczovL3N2LWFuYWx5dGljcy5zZy5zZWF2ZXJzZS5haS9zYSIsImhlYXRtYXAiOnsiY2xpY2ttYXAiOiJkZWZhdWx0Iiwic2Nyb2xsX25vdGljZV9tYXAiOiJkZWZhdWx0In19")}};function N(){const t=["8840ebUioO","466232VocMFV","8GBTfbx","9VfVDQN","invalid token: ","eyJhcGlLZXkiOiJBSXphU3lBVVVEam5HdDJKQmdiNVFFYmFFMVFybENvMTdpVWxKWGsiLCJhdXRoRG9tYWluIjoic2VhdmVyc2UtcHJvZHVjdGlvbi5maXJlYmFzZWFwcC5jb20iLCJwcm9qZWN0SWQiOiJzZWF2ZXJzZS1wcm9kdWN0aW9uIiwic3RvcmFnZUJ1Y2tldCI6InNlYXZlcnNlLXByb2R1Y3Rpb24uZmlyZWJhc2VzdG9yYWdlLmFwcCIsIm1lc3NhZ2luZ1NlbmRlcklkIjoiMTAzMzk3MzA4MzE5OCIsImFwcElkIjoiMToxMDMzOTczMDgzMTk4OndlYjpkMTQ4OGM3MzI0MWIyZWMzNmY3NTZmIiwibWVhc3VyZW1lbnRJZCI6IkctR0gxNk1CQ1NOVyJ9","GTM-MJDRW2W4","3985310KDTNbZ","402455mGOINX","1727022HgsBAD","2bLBHIk","FIREBASE","561186kqojIS","eyJzZXJ2ZXJVcmwiOiJodHRwczovL3N2LWFuYWx5dGljcy5zZy5zZWF2ZXJzZS5haS9zYSIsImhlYXRtYXAiOnsiY2xpY2ttYXAiOiJkZWZhdWx0Iiwic2Nyb2xsX25vdGljZV9tYXAiOiJkZWZhdWx0In19","2666436CUieRQ","eyJhcGlLZXkiOiJBSXphU3lBVVVEam5HdDJKQmdiNVFFYmFFMVFybENvMTdpVWxKWGsiLCJhdXRoRG9tYWluIjoic2VhdmVyc2UtcHJvZHVjdGlvbi5maXJlYmFzZWFwcC5jb20iLCJwcm9qZWN0SWQiOiJzZWF2ZXJzZS1wcm9kdWN0aW9uIiwic3RvcmFnZUJ1Y2tldCI6InNlYXZlcnNlLXByb2R1Y3Rpb24uZmlyZWJhc2VzdG9yYWdlLmFwcCIsIm1lc3NhZ2luZ1NlbmRlcklkIjoiMTAzMzk3MzA4MzE5OCIsImFwcElkIjoiMToxMDMzOTczMDgzMTk4OndlYjo2NmI2ZTNmNmEwZjM2MDkwNmY3NTZmIiwibWVhc3VyZW1lbnRJZCI6IkctN0gySjFTQ05QRCJ9"];return(N=function(){return t})()}function J(t,s){t-=161;return N()[t]}const T=S;function S(t,s){t-=384;return C()[t]}function C(){const t=["Must provide a token","1105356abWdOV","keys","providers","token","15sCKKDt","132036ddNKyX","253aKLiKm","[Track] Clear User ID","trackGTMEvent","warn","allSettled","[Track] Set User ID:","4057713AafXPB","Must provide a platform","Track SDK initialized, enabled providers:","unknown provider: ","adapters","config","debug","15319vFlWyN","setUserId","log","8nghjzf","17610905LVahoh","set","firebaseConfig","initialized","10KLEqge","track SDK not initialized, please call initialize() first","70XhMhPV","initialize","[Track] Set User Properties:","initialize ","clearUserId","version","platformConfig","FIREBASE","validateConfig","track","from","getInitializedProviders","push","554444JFFIWm","setUserProperties","5789wyxboT","platform","error","Invalid token: ","values","10jyWoWP"];return(C=function(){return t})()}!function(){const t=S,s=C();for(;;)try{if(461766===parseInt(t(414))/1*(-parseInt(t(424))/2)+parseInt(t(399))/3*(-parseInt(t(386))/4)+-parseInt(t(422))/5*(parseInt(t(395))/6)+parseInt(t(388))/7*(parseInt(t(417))/8)+-parseInt(t(407))/9*(-parseInt(t(393))/10)+-parseInt(t(401))/11*(-parseInt(t(400))/12)+parseInt(t(418))/13)break;s.push(s.shift())}catch(t){s.push(s.shift())}}();class TrackClient{constructor(t){const s=S;this[s(411)]=new Map,this[s(421)]=!1,this.config=t,this[s(432)](),this[s(430)]=function(t){const s=M,n=Z(t),e=W[n];if(!e)throw new Error(s(167)+t);return e}(t[s(398)])}[T(432)](){const t=T;if(!this[t(412)].token)throw new Error(t(394));if(!this[t(412)].platform)throw new Error(t(408));if(!this[t(412)][t(429)])throw new Error("Must provide a version");if(!(Z(this[t(412)].token)in W))throw new Error(t(391)+this[t(412)][t(398)])}async initialize(){const t=T;if(this[t(421)])return;const s=[],n=!1!==this[t(412)].initializeFirebase;for(const i of this[t(430)][t(397)])try{if(i===e[t(431)]&&!n){this.config.debug&&console[t(416)]("[Track] Skip Firebase initialization (initializeFirebase = false)");continue}let r;switch(i){case e[t(431)]:r=new m(this[t(430)][t(420)],this[t(430)].gtmId,this[t(412)].debug);break;case e.SENSORS:r=new k(this[t(412)][t(398)],this[t(412)][t(389)],this[t(412)][t(429)],this.platformConfig.sensorsConfig);break;default:console.warn(t(410)+i);continue}this[t(411)][t(419)](i,r),s[t(385)](r[t(425)]())}catch(s){console[t(390)](t(427)+i+" adapter failed:",s)}await Promise[t(405)](s),this[t(421)]=!0,this[t(412)][t(413)]&&console.log(t(409),Array[t(434)](this[t(411)].keys()))}async track(t,s){const n=T;if(!this.initialized)return void console[n(404)](n(423));this[n(412)][n(413)]&&console[n(416)]("[Track] "+t,s);const e=[];for(const i of this[n(411)].values())e[n(385)](i[n(433)](t,s));await Promise[n(405)](e)}async[T(415)](t){const s=T;if(!this.initialized)return void console.warn(s(423));this[s(412)].debug&&console.log(s(406),t);const n=[];for(const e of this[s(411)][s(392)]())n[s(385)](e[s(415)](t));await Promise.allSettled(n)}async setUserProperties(t){const s=T;if(!this.initialized)return void console[s(404)](s(423));this[s(412)][s(413)]&&console[s(416)](s(426),t);const n=[];for(const e of this[s(411)][s(392)]())n[s(385)](e[s(387)](t));await Promise[s(405)](n)}async[T(428)](){const t=T;if(!this[t(421)])return void console[t(404)](t(423));this.config[t(413)]&&console[t(416)](t(402));const s=[];for(const n of this[t(411)][t(392)]())s.push(n[t(428)]());await Promise[t(405)](s)}[T(384)](){const t=T;return Array[t(434)](this.adapters[t(396)]())}[T(403)](t,s){p(t,s)}}function F(t,s){return t-=484,Y()[t]}function Y(){var t=["500234qOoZBl","2964096smBwTo","38520QCxcbo","72Idntpy","823JmCXqa","1626819UNLiSY","576FFWSdF","2715860VimdSk","760FUqSYE","1043312OysbDu"];return(Y=function(){return t})()}!function(){for(var t=F,s=Y();;)try{if(350169===parseInt(t(487))/1*(parseInt(t(491))/2)+-parseInt(t(488))/3+-parseInt(t(492))/4+-parseInt(t(490))/5+parseInt(t(484))/6+parseInt(t(493))/7*(parseInt(t(486))/8)+parseInt(t(489))/9*(parseInt(t(485))/10))break;s.push(s.shift())}catch(t){s.push(s.shift())}}();export{TrackClient,e as TrackProvider};
1
+ import{initializeApp as t}from"firebase/app";import{getAnalytics as n}from"firebase/analytics";import*as s from"sa-sdk-javascript";var e,i,r;function o(t,n){return t-=487,a()[t]}function a(){var t=["SENSORS","1146654tyqhKq","10nlCwks","6YRrjUI","12039401HatPBV","72XvwdCb","10434uhteMd","firebase","44156RUyLGb","sensors","1213328lFGCjJ","583857SmdTeC","367678UKKoWY","1925czWzEC","FIREBASE"];return(a=function(){return t})()}function c(){const t=["https://www.googletagmanager.com/ns.html?id=","640618RtkATm","5771596YgzVZB","undefined","error","3mWjXTI","[GTM] GTM ID is empty, skip injection","noscript","DOMContentLoaded","[GTM] Injected successfully: ","head","insertBefore","1368xVdMEr","from","string","[GoogleTagManager] dataLayer not initialized","[GTM] Injection failed:","push","[GoogleTagManager] Invalid event name:","some","createElement","display","firstChild","7112346RRSoLx","gtm.js?id=","body","dataLayer","script","warn","1180fRRVLg","height","addEventListener","https://www.googletagmanager.com/gtm.js?id=","iframe","log","[GTM] Not in browser environment, skip injection","getElementsByTagName","3049958NkRDxS","visibility","appendChild","5AodEsl","getTime","src","includes","79576OEnzmY","[GTM] Already injected, skip","style","[GoogleTagManager] Error pushing to dataLayer:","async","5539044VErsko","querySelectorAll","1133644CGkfOH","none","parentNode"];return(c=function(){return t})()}function l(){return typeof window!==h(200)&&"undefined"!=typeof document}function h(t,n){t-=187;return c()[t]}function p(t){const n=h,s=document.createElement(n(204)),e=document[n(217)](n(230));e[n(239)]=n(197)+t,e[n(227)]="0",e.width="0",e[n(189)][n(218)]=n(195),e[n(189)][n(235)]="hidden",s[n(236)](e),document[n(222)][n(219)]?document[n(222)][n(208)](s,document[n(222)][n(219)]):document[n(222)].appendChild(s)}function f(t,n=!1){const s=h;if(l())if(t)if(function(t){const n=h;if(!l())return!1;const s=!!window[n(223)],e=document[n(193)](n(224)),i=Array[n(210)](e)[n(216)](s=>s[n(239)][n(240)](n(221)+t));return s&&i}(t))n&&console[s(231)](s(188));else try{(function(t){const n=h;window[n(223)]=window[n(223)]||[],window[n(223)][n(214)]({"gtm.start":(new Date)[n(238)](),event:"gtm.js"});const s=document[n(217)](n(224));s[n(191)]=!0,s[n(239)]=n(229)+t;const e=document[n(233)](n(224))[0];e&&e[n(196)]?e[n(196)][n(208)](s,e):document[n(207)][n(236)](s)})(t),document[s(222)]?p(t):document[s(228)](s(205),()=>{p(t)}),n&&console[s(231)](s(206)+t)}catch(t){console[s(201)](s(213),t)}else n&&console[s(225)](s(203));else n&&console[s(225)](s(232))}!function(){for(var t=o,n=a();;)try{if(582763===-parseInt(t(488))/1+-parseInt(t(489))/2*(-parseInt(t(495))/3)+parseInt(t(487))/4+parseInt(t(490))/5*(-parseInt(t(498))/6)+-parseInt(t(500))/7*(parseInt(t(497))/8)+parseInt(t(493))/9+-parseInt(t(494))/10*(-parseInt(t(496))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(),(i=e||(e={}))[(r=o)(491)]=r(499),i[r(492)]=r(501),function(){const t=h,n=c();for(;;)try{if(864519===-parseInt(t(194))/1+parseInt(t(234))/2*(-parseInt(t(202))/3)+parseInt(t(199))/4*(-parseInt(t(237))/5)+-parseInt(t(220))/6+parseInt(t(192))/7+parseInt(t(187))/8*(-parseInt(t(209))/9)+parseInt(t(226))/10*(parseInt(t(198))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}();const d=(t,n)=>{const s=h;if(!t||typeof t!==s(211))return void console[s(201)](s(215),t);(t=>{const n=h;if(typeof window!==n(200)&&window[n(223)])try{window[n(223)].push(t),console[n(231)]("[GoogleTagManager] Pushed to dataLayer:",t)}catch(t){console[n(201)](n(190),t)}else console.error(n(212))})({event:t,...n||{}})},u=m;function I(){const t=["18FZZtQY","debug","700bgNZwQ","error","2286tuPkXP","config","initialize","138120PWZQKy","206773GptbWp","gtmId","firebase initialize failed:","150HXAivI","2573968DFuAOj","track","setUserId","initialized","935CxswzO","1415SANPrR","analytics","14468QYfXpR","23632476ouRicX","2639868LReoTB","setUserProperties"];return(I=function(){return t})()}function m(t,n){t-=378;return I()[t]}!function(){const t=m,n=I();for(;;)try{if(942241===-parseInt(t(388))/1*(-parseInt(t(386))/2)+parseInt(t(382))/3+parseInt(t(380))/4*(parseInt(t(378))/5)+-parseInt(t(395))/6*(-parseInt(t(392))/7)+parseInt(t(396))/8*(parseInt(t(384))/9)+-parseInt(t(391))/10*(parseInt(t(400))/11)+-parseInt(t(381))/12)break;n.push(n.shift())}catch(t){n.push(n.shift())}}();class w{constructor(t,n,s=!1){const e=m;this[e(379)]=null,this.initialized=!1,this.config=t,this[e(393)]=n,this[e(385)]=s}async[u(390)](){const s=u;if(!this[s(399)])try{const e=t(this[s(389)]);this[s(379)]=n(e),this[s(393)]&&f(this[s(393)],this[s(385)]),this[s(399)]=!0}catch(t){throw console[s(387)](s(394),t),t}}async[u(397)](t,n){}async[u(398)](t){}async[u(383)](t){}async clearUserId(){}}function y(){const t=["setProfile","config","11294sjMMdj","1978938nmWEDm","initialized","762160ojZOiE","3584zAhxXy","login","sensors sdk init failed:","ajax","sensors sdk clearUserId failed:","sensors sdk setUserProperties failed:","30FsDgRb","?t=","sensors sdk track failed:","showLog","sensors sdk not initialized, skip setUserProperties","sensors","platform","&v=","sensors sdk not initialized, skip setUserId","token","logout","1190484fKqUHH","clearUserId","serverUrl","144FSCrfE","version","autoTrack","track","2341889dLAaZa","warn","setUserProperties","sensors sdk not initialized, skip track","error","init","heatmap","3sRLQwu","29ucSzEm","sensors sdk not found, please install it by running","495642PTzYnZ"];return(y=function(){return t})()}const k=g;function g(t,n){t-=434;return y()[t]}!function(){const t=g,n=y();for(;;)try{if(152940===parseInt(t(455))/1*(-parseInt(t(460))/2)+parseInt(t(454))/3*(-parseInt(t(440))/4)+-parseInt(t(463))/5+-parseInt(t(457))/6+parseInt(t(464))/7*(-parseInt(t(443))/8)+parseInt(t(461))/9+-parseInt(t(470))/10*(-parseInt(t(447))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}();class z{constructor(t,n,s,e){const i=g;this[i(434)]=null,this[i(462)]=!1,this[i(438)]=t,this[i(435)]=n,this[i(444)]=s,this[i(459)]=e}async initialize(){const t=g;if(!this[t(462)])try{if(!s)throw new Error(t(456));this[t(434)]=s;const n=encodeURIComponent(this[t(438)]),e=encodeURIComponent(this[t(435)]),i=encodeURIComponent(this.version);this[t(434)][t(452)]({server_url:this[t(459)][t(442)]+(t(471)+n+"&p=")+e+t(436)+i,show_log:this[t(459)][t(473)]??!1,heatmap:this[t(459)][t(453)]??{},is_track_single_page:!0,send_type:t(467)}),this[t(462)]=!0,this[t(434)].quick(t(445))}catch(n){throw console.error(t(466),n),n}}async track(t,n){const s=g;if(this[s(462)]&&this.sensors)try{this.sensors[s(446)](t,n??{})}catch(t){console[s(451)](s(472),t)}else console[s(448)](s(450))}async setUserId(t){const n=g;if(this.initialized&&this[n(434)])try{this[n(434)][n(465)](t)}catch(t){console[n(451)]("sensors sdk setUserId failed:",t)}else console[n(448)](n(437))}async[k(449)](t){const n=k;if(this[n(462)]&&this[n(434)])try{this[n(434)][n(458)](t)}catch(t){console[n(451)](n(469),t)}else console.warn(n(474))}async[k(441)](){const t=k;if(this[t(462)]&&this[t(434)])try{this[t(434)][t(439)]()}catch(n){console[t(451)](t(468),n)}}}function Z(){var t=["354678dogvAx","btoa","359526ttsFxQ","from","21987130Tpiajt","664182NOyIiu","49xKmsyL","toString","utf-8","379490LZXEay","1100760TSqOmK","4ijpxah","undefined","537210ZXHEiG","atob","base64","48qWMHBu"];return(Z=function(){return t})()}function v(t,n){return t-=153,Z()[t]}function M(t){var n=v;return typeof window!==n(165)&&window.btoa?window[n(154)](t):Buffer.from(t,n(161))[n(160)](n(168))}function b(t){return JSON.parse((n=t,s=v,"undefined"!=typeof window&&window[s(167)]?window[s(167)](n):Buffer[s(156)](n,s(168))[s(160)](s(161))));var n,s}!function(){for(var t=v,n=Z();;)try{if(291539===-parseInt(t(153))/1+-parseInt(t(158))/2+parseInt(t(163))/3*(-parseInt(t(164))/4)+-parseInt(t(162))/5+parseInt(t(155))/6*(-parseInt(t(159))/7)+-parseInt(t(169))/8*(parseInt(t(166))/9)+parseInt(t(157))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}();const W=Y;function E(){const t=["invalid token: ","384198pYPvQh","324372WilpbA","1340245cvYdnw","152754uuOaag","SENSORS","3PPXWTF","28NhXTrG","eyJhcGlLZXkiOiJBSXphU3lBVVVEam5HdDJKQmdiNVFFYmFFMVFybENvMTdpVWxKWGsiLCJhdXRoRG9tYWluIjoic2VhdmVyc2UtcHJvZHVjdGlvbi5maXJlYmFzZWFwcC5jb20iLCJwcm9qZWN0SWQiOiJzZWF2ZXJzZS1wcm9kdWN0aW9uIiwic3RvcmFnZUJ1Y2tldCI6InNlYXZlcnNlLXByb2R1Y3Rpb24uZmlyZWJhc2VzdG9yYWdlLmFwcCIsIm1lc3NhZ2luZ1NlbmRlcklkIjoiMTAzMzk3MzA4MzE5OCIsImFwcElkIjoiMToxMDMzOTczMDgzMTk4OndlYjo2NmI2ZTNmNmEwZjM2MDkwNmY3NTZmIiwibWVhc3VyZW1lbnRJZCI6IkctN0gySjFTQ05QRCJ9","473216CZJfaY","GTM-MJDRW2W4","eyJzZXJ2ZXJVcmwiOiJodHRwczovL3N2LWFuYWx5dGljcy5zZy5zZWF2ZXJzZS5haS9zYSIsImhlYXRtYXAiOnsiY2xpY2ttYXAiOiJkZWZhdWx0Iiwic2Nyb2xsX25vdGljZV9tYXAiOiJkZWZhdWx0In19","2360610plEQbs","eyJhcGlLZXkiOiJBSXphU3lBVVVEam5HdDJKQmdiNVFFYmFFMVFybENvMTdpVWxKWGsiLCJhdXRoRG9tYWluIjoic2VhdmVyc2UtcHJvZHVjdGlvbi5maXJlYmFzZWFwcC5jb20iLCJwcm9qZWN0SWQiOiJzZWF2ZXJzZS1wcm9kdWN0aW9uIiwic3RvcmFnZUJ1Y2tldCI6InNlYXZlcnNlLXByb2R1Y3Rpb24uZmlyZWJhc2VzdG9yYWdlLmFwcCIsIm1lc3NhZ2luZ1NlbmRlcklkIjoiMTAzMzk3MzA4MzE5OCIsImFwcElkIjoiMToxMDMzOTczMDgzMTk4OndlYjpkMTQ4OGM3MzI0MWIyZWMzNmY3NTZmIiwibWVhc3VyZW1lbnRJZCI6IkctR0gxNk1CQ1NOVyJ9","301116rZpfFW","FIREBASE"];return(E=function(){return t})()}function Y(t,n){t-=333;return E()[t]}!function(){const t=Y,n=E();for(;;)try{if(227035===parseInt(t(340))/1+-parseInt(t(343))/2+-parseInt(t(348))/3*(-parseInt(t(344))/4)+-parseInt(t(345))/5+parseInt(t(346))/6*(parseInt(t(333))/7)+-parseInt(t(335))/8+parseInt(t(338))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}();const N={"MDE5YjUzNTEyMWJhNzc1ZmIwYTQ1MzY3Njg1NzU1MTU=":{providers:[e[W(341)],e.SENSORS],firebaseConfig:b(W(334)),sensorsConfig:b("eyJzZXJ2ZXJVcmwiOiJodHRwczovL3N2LWFuYWx5dGljcy5zZy5zZWF2ZXJzZS5haS9zYSIsImhlYXRtYXAiOnsiY2xpY2ttYXAiOiJkZWZhdWx0Iiwic2Nyb2xsX25vdGljZV9tYXAiOiJkZWZhdWx0In19"),gtmId:W(336)},"MDE5YjUzNTE3ZmFiN2YxZDkwNjg5OWVhMGQyMWJlZGI=":{providers:[e[W(341)],e[W(347)]],firebaseConfig:b(W(339)),sensorsConfig:b(W(337))}};const R=T;function T(t,n){t-=143;return J()[t]}function J(){const t=["688465TpRXqg","platform","Must provide a version","firebaseConfig","gtmId","380181RHQacf","log","initializeFirebase","[Track] Clear User ID","FIREBASE"," adapter failed:","token","Track SDK initialized, enabled providers:","version","allSettled","unknown provider: ","20JCPGCX","keys","41433VwwrEk","push","initialize ","debug","platformConfig","initialize","setUserProperties","from","1289510udaYOk","track","Must provide a token","values","Invalid token: ","clearUserId","config","track SDK not initialized, please call initialize() first","warn","initialized","SENSORS","Must provide a platform","4352388KzorHn","1520001jpLeoe","set","50706IgcoHf","trackGTMEvent","validateConfig","providers","setUserId","sensorsConfig","1008JFOLfU","adapters"];return(J=function(){return t})()}!function(){const t=T,n=J();for(;;)try{if(369635===parseInt(t(184))/1+-parseInt(t(143))/2+parseInt(t(171))/3*(parseInt(t(182))/4)+parseInt(t(166))/5+-parseInt(t(155))/6+parseInt(t(156))/7+-parseInt(t(164))/8*(-parseInt(t(158))/9))break;n.push(n.shift())}catch(t){n.push(n.shift())}}();class TrackClient{constructor(t){const n=T;this[n(165)]=new Map,this.initialized=!1,this[n(149)]=t,this[n(160)](),this.platformConfig=function(t){const n=W,s=M(t),e=N[s];if(!e)throw new Error(n(342)+t);return e}(t[n(177)])}[R(160)](){const t=R;if(!this[t(149)][t(177)])throw new Error(t(145));if(!this.config[t(167)])throw new Error(t(154));if(!this[t(149)][t(179)])throw new Error(t(168));if(!(M(this[t(149)].token)in N))throw new Error(t(147)+this[t(149)][t(177)])}async[R(189)](){const t=R;if(this[t(152)])return;const n=[],s=!1!==this[t(149)][t(173)];for(const i of this[t(188)][t(161)])try{if(i===e[t(175)]&&!s){this[t(149)][t(187)]&&console[t(172)]("[Track] Skip Firebase initialization (initializeFirebase = false)");continue}let r;switch(i){case e.FIREBASE:r=new w(this[t(188)][t(169)],this[t(188)][t(170)],this[t(149)][t(187)]);break;case e[t(153)]:r=new z(this[t(149)][t(177)],this[t(149)][t(167)],this.config[t(179)],this[t(188)][t(163)]);break;default:console[t(151)](t(181)+i);continue}this.adapters[t(157)](i,r),n[t(185)](r[t(189)]())}catch(n){console.error(t(186)+i+t(176),n)}await Promise[t(180)](n),this.initialized=!0,this[t(149)][t(187)]&&console[t(172)](t(178),Array[t(191)](this[t(165)][t(183)]()))}async[R(144)](t,n){const s=R;if(!this[s(152)])return void console.warn(s(150));this[s(149)].debug&&console[s(172)]("[Track] "+t,n);const e=[];for(const i of this[s(165)].values())e[s(185)](i.track(t,n));await Promise.allSettled(e)}async[R(162)](t){const n=R;if(!this[n(152)])return void console[n(151)](n(150));this[n(149)][n(187)]&&console[n(172)]("[Track] Set User ID:",t);const s=[];for(const e of this[n(165)][n(146)]())s.push(e[n(162)](t));await Promise[n(180)](s)}async[R(190)](t){const n=R;if(!this[n(152)])return void console[n(151)](n(150));this[n(149)][n(187)]&&console[n(172)]("[Track] Set User Properties:",t);const s=[];for(const e of this[n(165)][n(146)]())s[n(185)](e[n(190)](t));await Promise[n(180)](s)}async[R(148)](){const t=R;if(!this[t(152)])return void console[t(151)]("track SDK not initialized, please call initialize() first");this[t(149)][t(187)]&&console.log(t(174));const n=[];for(const s of this[t(165)][t(146)]())n[t(185)](s[t(148)]());await Promise[t(180)](n)}getInitializedProviders(){const t=R;return Array[t(191)](this[t(165)][t(183)]())}[R(159)](t,n){d(t,n)}}function S(t,n){return t-=329,F()[t]}function F(){var t=["6196705GwhpAJ","1426217cdUrKE","684760FfrYQM","4448580BvamqL","3871042YoPffK","1989099RgqctH","3322020sfEcMR","6ewsuwv"];return(F=function(){return t})()}!function(){for(var t=S,n=F();;)try{if(986249===parseInt(t(332))/1+-parseInt(t(329))/2+-parseInt(t(336))/3+parseInt(t(334))/4+parseInt(t(331))/5*(parseInt(t(330))/6)+-parseInt(t(335))/7+parseInt(t(333))/8)break;n.push(n.shift())}catch(t){n.push(n.shift())}}();export{TrackClient,e as TrackProvider};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seaverse/track-sdk",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "Unified analytics SDK for Firebase and Sensors Analytics",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",