rudder-sdk-js 2.51.0 → 2.51.1
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/CHANGELOG.md +10 -0
- package/dist/npm/content-script/index.cjs.js +1 -1
- package/dist/npm/content-script/index.es.js +1 -1
- package/dist/npm/content-script/index.js +1 -1
- package/dist/npm/index.cjs.js +1 -1
- package/dist/npm/index.es.js +1 -1
- package/dist/npm/index.js +1 -1
- package/package.json +1 -1
@@ -1 +1 @@
|
|
1
|
-
"use strict";function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,l(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function r(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=f(e))||t){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function i(e,t,n){return(t=l(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o.apply(null,arguments)}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,s,a=[],u=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t);else for(;!(u=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}}(e,t)||f(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t){return function(t){if(Array.isArray(t))return e(t)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||f(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function f(t,n){if(t){if("string"==typeof t)return e(t,n);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(t,n):void 0}}var d="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function p(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function g(e){return e&&Object.prototype.hasOwnProperty.call(e,"default")&&1===Object.keys(e).length?e.default:e}var v,y={exports:{}};function m(){return v||(v=1,function(e){function t(e){if(e)return function(e){return o(e,t.prototype),e._callbacks=new Map,e}(e);this._callbacks=new Map}t.prototype.on=function(e,t){var n,r=null!==(n=this._callbacks.get(e))&&void 0!==n?n:[];return r.push(t),this._callbacks.set(e,r),this},t.prototype.once=function(e,t){var n=this,r=function(){n.off(e,r);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];t.apply(n,o)};return r.fn=t,this.on(e,r),this},t.prototype.off=function(e,t){if(void 0===e&&void 0===t)return this._callbacks.clear(),this;if(void 0===t)return this._callbacks.delete(e),this;var n=this._callbacks.get(e);if(n){var i,o=r(n.entries());try{for(o.s();!(i=o.n()).done;){var s=u(i.value,2),a=s[0],c=s[1];if(c===t||c.fn===t){n.splice(a,1);break}}}catch(e){o.e(e)}finally{o.f()}0===n.length?this._callbacks.delete(e):this._callbacks.set(e,n)}return this},t.prototype.emit=function(e){var t=this._callbacks.get(e);if(t){for(var n=c(t),i=arguments.length,o=new Array(i>1?i-1:0),s=1;s<i;s++)o[s-1]=arguments[s];var a,u=r(n);try{for(u.s();!(a=u.n()).done;){a.value.apply(this,o)}}catch(e){u.e(e)}finally{u.f()}}return this},t.prototype.listeners=function(e){var t;return null!==(t=this._callbacks.get(e))&&void 0!==t?t:[]},t.prototype.listenerCount=function(e){if(e)return this.listeners(e).length;var t,n=0,i=r(this._callbacks.values());try{for(i.s();!(t=i.n()).done;){n+=t.value.length}}catch(e){i.e(e)}finally{i.f()}return n},t.prototype.hasListeners=function(e){return this.listenerCount(e)>0},t.prototype.addEventListener=t.prototype.on,t.prototype.removeListener=t.prototype.off,t.prototype.removeEventListener=t.prototype.off,t.prototype.removeAllListeners=t.prototype.off,e.exports=t}(y)),y.exports}var I=p(m());function A(e){return null!=e&&"object"===h(e)&&!0===e["@@functional/placeholder"]}function k(e){return function t(n){return 0===arguments.length||A(n)?t:e.apply(this,arguments)}}function b(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return A(n)?t:k((function(t){return e(n,t)}));default:return A(n)&&A(r)?t:A(n)?k((function(t){return e(t,r)})):A(r)?k((function(t){return e(n,t)})):e(n,r)}}}function E(e){return function t(n,r,i){switch(arguments.length){case 0:return t;case 1:return A(n)?t:b((function(t,r){return e(n,t,r)}));case 2:return A(n)&&A(r)?t:A(n)?b((function(t,n){return e(t,r,n)})):A(r)?b((function(t,r){return e(n,t,r)})):k((function(t){return e(n,r,t)}));default:return A(n)&&A(r)&&A(i)?t:A(n)&&A(r)?b((function(t,n){return e(t,n,i)})):A(n)&&A(i)?b((function(t,n){return e(t,r,n)})):A(r)&&A(i)?b((function(t,r){return e(n,t,r)})):A(n)?k((function(t){return e(t,r,i)})):A(r)?k((function(t){return e(n,t,i)})):A(i)?k((function(t){return e(n,r,t)})):e(n,r,i)}}}function S(e,t){return Object.prototype.hasOwnProperty.call(t,e)}var C=k((function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}));function T(e){return"[object Object]"===Object.prototype.toString.call(e)}function w(e,t,n){if(n||(n=new O),function(e){var t=h(e);return null==e||"object"!=t&&"function"!=t}(e))return e;var r,i=function(t){var r=n.get(e);if(r)return r;for(var i in n.set(e,t),e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=w(e[i],!0,n));return t};switch(C(e)){case"Object":return i(Object.create(Object.getPrototypeOf(e)));case"Array":return i(Array(e.length));case"Date":return new Date(e.valueOf());case"RegExp":return r=e,new RegExp(r.source,r.flags?r.flags:(r.global?"g":"")+(r.ignoreCase?"i":"")+(r.multiline?"m":"")+(r.sticky?"y":"")+(r.unicode?"u":"")+(r.dotAll?"s":""));case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":return e.slice();default:return e}}var O=function(){function e(){this.map={},this.length=0}return e.prototype.set=function(e,t){var n=this.hash(e),r=this.map[n];r||(this.map[n]=r=[]),r.push([e,t]),this.length+=1},e.prototype.hash=function(e){var t=[];for(var n in e)t.push(Object.prototype.toString.call(e[n]));return t.join()},e.prototype.get=function(e){if(this.length<=180)for(var t in this.map)for(var n=this.map[t],r=0;r<n.length;r+=1){if((o=n[r])[0]===e)return o[1]}else{var i=this.hash(e);if(n=this.map[i])for(r=0;r<n.length;r+=1){var o;if((o=n[r])[0]===e)return o[1]}}},e}(),_=k((function(e){return null!=e&&"function"==typeof e.clone?e.clone():w(e)})),P=E((function(e,t,n){var r,i={};for(r in n=n||{},t=t||{})S(r,t)&&(i[r]=S(r,n)?e(r,t[r],n[r]):t[r]);for(r in n)S(r,n)&&!S(r,i)&&(i[r]=n[r]);return i})),R=E((function e(t,n,r){return P((function(n,r,i){return T(r)&&T(i)?e(t,r,i):t(n,r,i)}),n,r)})),x=E((function(e,t,n){return R((function(t,n,r){return e(n,r)}),t,n)})),D={HS:"HubSpot",GA:"GA",HOTJAR:"Hotjar",GOOGLEADS:"GoogleAds",VWO:"VWO",GTM:"GoogleTagManager",BRAZE:"Braze",INTERCOM:"INTERCOM",KEEN:"Keen",KISSMETRICS:"Kissmetrics",CUSTOMERIO:"CustomerIO",CHARTBEAT:"Chartbeat",FACEBOOK_PIXEL:"FacebookPixel",LOTAME:"Lotame",OPTIMIZELY:"Optimizely",BUGSNAG:"Bugsnag",FULLSTORY:"Fullstory",TVSQUARED:"TVSquared",GA4:"GA4",GA4_V2:"GA4_V2",MOENGAGE:"MoEngage",AM:"Amplitude",PENDO:"Pendo",LYTICS:"Lytics",APPCUES:"Appcues",POSTHOG:"Posthog",KLAVIYO:"Klaviyo",CLEVERTAP:"Clevertap",BINGADS:"BingAds",PINTEREST_TAG:"PinterestTag",ADOBE_ANALYTICS:"AdobeAnalytics",LINKEDIN_INSIGHT_TAG:"LinkedInInsightTag",REDDIT_PIXEL:"RedditPixel",DRIP:"Drip",HEAP:"Heap",CRITEO:"Criteo",MP:"Mixpanel",QUALTRICS:"Qualtrics",PROFITWELL:"ProfitWell",SENTRY:"Sentry",QUANTUMMETRIC:"QuantumMetric",SNAP_PIXEL:"SnapPixel",POST_AFFILIATE_PRO:"PostAffiliatePro",GOOGLE_OPTIMIZE:"GoogleOptimize",LAUNCHDARKLY:"LaunchDarkly",GA360:"GA360",ADROLL:"Adroll",DCM_FLOODLIGHT:"DCMFloodlight",MATOMO:"Matomo",VERO:"Vero",MOUSEFLOW:"Mouseflow",ROCKERBOX:"Rockerbox",CONVERTFLOW:"ConvertFlow",SNAPENGAGE:"SnapEngage",LIVECHAT:"LiveChat",SHYNET:"Shynet",WOOPRA:"Woopra",ROLLBAR:"RollBar",QUORA_PIXEL:"QuoraPixel",JUNE:"June",ENGAGE:"Engage",ITERABLE:"Iterable",YANDEX_METRICA:"YandexMetrica",REFINER:"Refiner",QUALAROO:"Qualaroo",PODSIGHTS:"Podsights",AXEPTIO:"Axeptio",SATISMETER:"Satismeter",MICROSOFT_CLARITY:"MicrosoftClarity",SENDINBLUE:"Sendinblue",OLARK:"Olark",LEMNISK:"Lemnisk",TIKTOK_ADS:"TiktokAds",ACTIVE_CAMPAIGN:"ActiveCampaign",SPRIG:"Sprig",SPOTIFYPIXEL:"SpotifyPixel",COMMANDBAR:"CommandBar",NINETAILED:"Ninetailed",XPIXEL:"XPixel",GAINSIGHT_PX:"Gainsight_PX"},L="ACTIVE_CAMPAIGN",M="ADOBE_ANALYTICS",B="ADROLL",N="AM",G="APPCUES",F="AXEPTIO",U="BINGADS",j="BRAZE",K="BUGSNAG",H="CHARTBEAT",Q="CLEVERTAP",z="COMMANDBAR",V="CONVERTFLOW",q="CRITEO",X="CUSTOMERIO",W="DCM_FLOODLIGHT",Y="DRIP",J="ENGAGE",$="FACEBOOK_PIXEL",Z="FULLSTORY",ee="GA",te="GA360",ne="GA4",re="GA4_V2",ie="GAINSIGHT_PX",oe="GOOGLE_OPTIMIZE",se="GOOGLEADS",ae="GTM",ue="HEAP",ce="HOTJAR",le="HS",he="INTERCOM",fe="ITERABLE",de="JUNE",pe="KEEN",ge="KISSMETRICS",ve="KLAVIYO",ye="LAUNCHDARKLY",me="LEMNISK",Ie="LINKEDIN_INSIGHT_TAG",Ae="LIVECHAT",ke="LOTAME",be="LYTICS",Ee="MATOMO",Se="MICROSOFT_CLARITY",Ce="MOENGAGE",Te="MOUSEFLOW",we="MP",Oe="NINETAILED",_e="OLARK",Pe="OPTIMIZELY",Re="PENDO",xe="PINTEREST_TAG",De="PODSIGHTS",Le="POST_AFFILIATE_PRO",Me="POSTHOG",Be="PROFITWELL",Ne="QUALAROO",Ge="QUALTRICS",Fe="QUANTUMMETRIC",Ue="QUORA_PIXEL",je="REDDIT_PIXEL",Ke="REFINER",He="ROCKERBOX",Qe="ROLLBAR",ze="SATISMETER",Ve="SENDINBLUE",qe="SENTRY",Xe="SHYNET",We="SNAP_PIXEL",Ye="SNAPENGAGE",Je="SPOTIFYPIXEL",$e="SPRIG",Ze="TIKTOK_ADS",et="TVSQUARED",tt="VERO",nt="VWO",rt="WOOPRA",it="XPIXEL",ot="YANDEX_METRICA";i({},"Adobe Analytics","AdobeAnalytics");var st=i(i(i(i(i(i({"Adobe Analytics":M,ADOBEANALYTICS:M,"ADOBE ANALYTICS":M},M,M),"AdobeAnalytics",M),"adobeanalytics",M),"adobe analytics",M),"Adobe analytics",M),"adobe Analytics",M);i({},"Amplitude","Amplitude");var at=i(i(i(i({},N,N),"AMPLITUDE",N),"Amplitude",N),"am",N);i({},"Appcues","Appcues");var ut=i(i(i(i({},G,G),"Appcues",G),"App Cues",G),"appcues",G);i({},"Bing Ads","BingAds");var ct=i(i(i(i(i(i(i({},U,U),"BingAds",U),"bingads",U),"Bing Ads",U),"Bing ads",U),"bing Ads",U),"bing ads",U);i({},"Braze","Braze");var lt=i(i(i({},j,j),"Braze",j),"braze",j);i({},"Bugsnag","Bugsnag");var ht=i(i(i({},K,K),"bugsnag",K),"Bugsnag",K);i({},"Chartbeat","Chartbeat");var ft=i(i(i(i(i({},H,H),"Chartbeat",H),"chartbeat",H),"Chart Beat",H),"chart beat",H);i({},"CleverTap","Clevertap");var dt=i(i(i({},Q,Q),"Clevertap",Q),"clevertap",Q);i({},"Criteo","Criteo");var pt=i(i(i({},q,q),"Criteo",q),"criteo",q);i({},"Customer IO","CustomerIO");var gt=i(i(i(i(i({},X,X),"Customerio",X),"Customer.io",X),"CUSTOMER.IO",X),"customer.io",X);i({},"Drip","Drip");var vt=i(i(i({},Y,Y),"Drip",Y),"drip",Y);i({},"Facebook Pixel","FacebookPixel");var yt=i(i(i(i(i(i(i({},$,$),"FB Pixel",$),"Facebook Pixel",$),"facebook pixel",$),"fbpixel",$),"FBPIXEL",$),"FB_PIXEL",$);i({},"Fullstory","Fullstory");var mt=i(i(i(i(i(i(i(i({},Z,Z),"Fullstory",Z),"FullStory",Z),"full Story",Z),"Full Story",Z),"Full story",Z),"full story",Z),"fullstory",Z);i({},"Google Analytics","GA");var It=i(i(i(i(i({},ee,ee),"Google Analytics",ee),"GoogleAnalytics",ee),"GOOGLE ANALYTICS",ee),"google analytics",ee);i({},"Google Analytics 4 (GA4)","GA4");var At=i(i(i(i(i(i(i(i(i(i({},ne,ne),"Google Analytics 4",ne),"Google analytics 4",ne),"google analytics 4",ne),"Google Analytics4",ne),"Google analytics4",ne),"google analytics4",ne),"Google Analytics 4 (GA4)",ne),"google analytics 4 (ga4)",ne),"GoogleAnalytics4",ne);i({},"Google Analytics 4 (GA4) V2","GA4_V2");var kt=i(i(i(i(i(i(i(i(i(i({},re,re),"Google Analytics 4 V2",re),"Google analytics 4 V2",re),"google analytics 4 V2",re),"Google Analytics4 V2",re),"Google analytics4 V2",re),"google analytics4 V2",re),"Google Analytics 4 (GA4) V2",re),"google analytics 4 (ga4) V2",re),"GoogleAnalytics4V2",re);i({},"Google Ads","GoogleAds");var bt=i(i(i(i(i(i({},se,se),"Google Ads",se),"GoogleAds",se),"GOOGLE ADS",se),"google ads",se),"googleads",se);i({},"Google Optimize","GoogleOptimize");var Et=i(i(i(i(i(i(i(i({},oe,oe),"Google Optimize",oe),"GoogleOptimize",oe),"Googleoptimize",oe),"GOOGLEOPTIMIZE",oe),"google optimize",oe),"Google optimize",oe),"GOOGLE OPTIMIZE",oe);i({},"Google Tag Manager","GoogleTagManager");var St=i(i(i(i(i({},ae,ae),"Google Tag Manager",ae),"google tag manager",ae),"googletag manager",ae),"googletagmanager",ae);i({},"Heap.io","Heap");var Ct=i(i(i(i({},ue,ue),"Heap",ue),"heap",ue),"Heap.io",ue);i({},"Hotjar","Hotjar");var Tt=i(i(i(i(i({},ce,ce),"Hotjar",ce),"hotjar",ce),"Hot Jar",ce),"hot jar",ce);i({},"HubSpot","HubSpot");var wt=i(i(i(i(i(i({},le,le),"Hubspot",le),"HUBSPOT",le),"hub spot",le),"Hub Spot",le),"Hub spot",le);i({},"Intercom","INTERCOM");var Ot=i(i(i({},he,he),"Intercom",he),"intercom",he);i({},"Keen","Keen");var _t=i(i(i(i(i({},pe,pe),"Keen",pe),"Keen.io",pe),"keen",pe),"keen.io",pe);i({},"Kiss Metrics","Kissmetrics");var Pt=i(i(i({},ge,ge),"Kissmetrics",ge),"kissmetrics",ge);i({},"Klaviyo","Klaviyo");var Rt=i(i(i({},ve,ve),"Klaviyo",ve),"klaviyo",ve);i({},"LaunchDarkly","LaunchDarkly");var xt,Dt=i(i(i(i(i(i({},ye,ye),"LaunchDarkly",ye),"Launch_Darkly",ye),"Launch Darkly",ye),"launchDarkly",ye),"launch darkly",ye);i({},"Linkedin Insight Tag","LinkedInInsightTag");var Lt=(i(i(i(i(i(i(i(i(i(i(xt={},Ie,Ie),"LinkedIn Insight Tag",Ie),"LinkedIn insight tag",Ie),"linkedIn insight tag",Ie),"Linkedin_insight_tag",Ie),"LinkedinInsighttag",Ie),"LinkedinInsightTag",Ie),"LinkedInInsightTag",Ie),"Linkedininsighttag",Ie),"LINKEDININSIGHTTAG",Ie),i(xt,"linkedininsighttag",Ie));i({},"Lotame","Lotame");var Mt=i(i(i({},ke,ke),"Lotame",ke),"lotame",ke);i({},"Lytics","Lytics");var Bt=i(i(i({},be,be),"Lytics",be),"lytics",be);i({},"Mixpanel","Mixpanel");var Nt=i(i(i(i(i(i({},we,we),"MIXPANEL",we),"Mixpanel",we),"MIX PANEL",we),"Mix panel",we),"Mix Panel",we);i({},"MoEngage","MoEngage");var Gt=i(i(i(i(i(i(i({},Ce,Ce),"MoEngage",Ce),"moengage",Ce),"Moengage",Ce),"Mo Engage",Ce),"mo engage",Ce),"Mo engage",Ce);i({},"Optimizely Web","Optimizely");var Ft=i(i(i({},Pe,Pe),"Optimizely",Pe),"optimizely",Pe);i({},"Pendo","Pendo");var Ut,jt=i(i(i({},Re,Re),"Pendo",Re),"pendo",Re);i({},"Pinterest Tag","PinterestTag");var Kt=(i(i(i(i(i(i(i(i(i(i(Ut={},xe,xe),"PinterestTag",xe),"Pinterest_Tag",xe),"PINTERESTTAG",xe),"pinterest",xe),"PinterestAds",xe),"Pinterest_Ads",xe),"Pinterest",xe),"Pinterest Tag",xe),"Pinterest tag",xe),i(i(i(i(Ut,"PINTEREST TAG",xe),"pinterest tag",xe),"Pinterest Ads",xe),"Pinterest ads",xe));i({},"Post Affiliate Pro","PostAffiliatePro");var Ht=i(i(i(i(i(i(i(i({},Le,Le),"PostAffiliatePro",Le),"Post_affiliate_pro",Le),"Post Affiliate Pro",Le),"Post affiliate pro",Le),"post affiliate pro",Le),"postaffiliatepro",Le),"POSTAFFILIATEPRO",Le);i({},"PostHog","Posthog");var Qt=i(i(i(i(i(i(i({},Me,Me),"PostHog",Me),"Posthog",Me),"posthog",Me),"Post Hog",Me),"Post hog",Me),"post hog",Me);i({},"ProfitWell","ProfitWell");var zt=i(i(i(i(i(i(i({},Be,Be),"ProfitWell",Be),"profitwell",Be),"Profitwell",Be),"Profit Well",Be),"profit well",Be),"Profit well",Be);i({},"Qualtrics","Qualtrics");var Vt=i(i(i({},Ge,Ge),"Qualtrics",Ge),"qualtrics",Ge);i({},"Quantum Metric","QuantumMetric");var qt=i(i(i(i(i(i(i(i({},Fe,Fe),"Quantum Metric",Fe),"quantum Metric",Fe),"quantum metric",Fe),"QuantumMetric",Fe),"quantumMetric",Fe),"quantummetric",Fe),"Quantum_Metric",Fe);i({},"Reddit Pixel","RedditPixel");var Xt=i(i(i(i(i(i(i(i({},je,je),"Reddit_Pixel",je),"RedditPixel",je),"REDDITPIXEL",je),"redditpixel",je),"Reddit Pixel",je),"REDDIT PIXEL",je),"reddit pixel",je);i({},"Sentry","Sentry");var Wt=i(i(i({},qe,qe),"sentry",qe),"Sentry",qe);i({},"Snap Pixel","SnapPixel");var Yt=i(i(i(i(i(i(i(i({},We,We),"Snap_Pixel",We),"SnapPixel",We),"SNAPPIXEL",We),"snappixel",We),"Snap Pixel",We),"SNAP PIXEL",We),"snap pixel",We);i({},"TVSquared","TVSquared");var Jt=i(i(i(i(i(i(i(i(i({},et,et),"TVSquared",et),"tvsquared",et),"tvSquared",et),"TvSquared",et),"Tvsquared",et),"TV Squared",et),"tv squared",et),"tv Squared",et);i({},"VWO","VWO");var $t=i(i(i(i(i(i(i(i({},nt,nt),"VisualWebsiteOptimizer",nt),"Visualwebsiteoptimizer",nt),"visualwebsiteoptimizer",nt),"vwo",nt),"Visual Website Optimizer",nt),"Visual website optimizer",nt),"visual website optimizer",nt);i({},"Google Analytics 360","GA360");var Zt=i(i(i(i(i(i(i(i(i({},te,te),"Google Analytics 360",te),"Google analytics 360",te),"google analytics 360",te),"Google Analytics360",te),"Google analytics360",te),"google analytics360",te),"GoogleAnalytics360",te),"GA 360",te);i({},"Adroll","Adroll");var en=i(i(i(i(i({},B,B),"Adroll",B),"Ad roll",B),"ad roll",B),"adroll",B);i({},"DCM Floodlight","DCMFloodlight");var tn=i(i(i(i(i(i(i(i(i({},W,W),"DCM Floodlight",W),"dcm floodlight",W),"Dcm Floodlight",W),"DCMFloodlight",W),"dcmfloodlight",W),"DcmFloodlight",W),"dcm_floodlight",W),"DCM_Floodlight",W);i({},"Matomo","Matomo");var nn=i(i(i({},Ee,Ee),"Matomo",Ee),"matomo",Ee);i({},"Vero","Vero");var rn=i(i(i({},tt,tt),"Vero",tt),"vero",tt);i({},"Mouseflow","Mouseflow");var on=i(i(i(i(i(i(i(i(i({},Te,Te),"Mouseflow",Te),"mouseflow",Te),"mouseFlow",Te),"MouseFlow",Te),"Mouse flow",Te),"mouse flow",Te),"mouse Flow",Te),"Mouse Flow",Te);i({},"Rockerbox","Rockerbox");var sn=i(i(i(i(i(i(i({},He,He),"Rockerbox",He),"rockerbox",He),"RockerBox",He),"Rocker box",He),"rocker box",He),"Rocker Box",He);i({},"Convertflow","ConvertFlow");var an=i(i(i(i(i(i(i(i(i(i({},V,V),"Convertflow",V),"convertflow",V),"convertFlow",V),"ConvertFlow",V),"Convert flow",V),"convert flow",V),"convert Flow",V),"Convert Flow",V),"CONVERT FLOW",V);i({},"SnapEngage","SnapEngage");var un=i(i(i(i(i(i(i({},Ye,Ye),"SnapEngage",Ye),"Snap_Engage",Ye),"snapengage",Ye),"SNAP ENGAGE",Ye),"Snap Engage",Ye),"snap engage",Ye);i({},"livechat","LiveChat");var cn=i(i(i(i(i(i(i({},Ae,Ae),"LiveChat",Ae),"Live_Chat",Ae),"livechat",Ae),"LIVE CHAT",Ae),"Live Chat",Ae),"live chat",Ae);i({},"Shynet","Shynet");var ln=i(i(i(i(i(i(i(i(i({},Xe,Xe),"shynet",Xe),"ShyNet",Xe),"shyNet",Xe),"Shynet",Xe),"shy net",Xe),"Shy Net",Xe),"shy Net",Xe),"Shy net",Xe);i({},"WOOPRA","Woopra");var hn=i(i(i({},rt,rt),"Woopra",rt),"woopra",rt);i({},"rollbar","RollBar");var fn=i(i(i(i(i(i(i(i({},Qe,Qe),"RollBar",Qe),"Roll_Bar",Qe),"rollbar",Qe),"Rollbar",Qe),"ROLL BAR",Qe),"Roll Bar",Qe),"roll bar",Qe);i({},"Quora Pixel","QuoraPixel");var dn=i(i(i(i(i(i(i(i(i(i({},Ue,Ue),"Quora Pixel",Ue),"Quora pixel",Ue),"QUORA PIXEL",Ue),"QuoraPixel",Ue),"Quorapixel",Ue),"QUORAPIXEL",Ue),"Quora_Pixel",Ue),"quora_pixel",Ue),"Quora",Ue);i({},"JUNE","June");var pn=i(i(i({},de,de),"June",de),"june",de);i({},"Engage","Engage");var gn=i(i(i({},J,J),"Engage",J),"engage",J);i({},"Iterable","Iterable");var vn=i(i(i({},fe,fe),"Iterable",fe),"iterable",fe);i({},"Yandex.Metrica","YandexMetrica");var yn=i(i(i(i(i({},ot,ot),"Yandexmetrica",ot),"yandexmetrica",ot),"yandexMetrica",ot),"YandexMetrica",ot);i({},"Refiner","Refiner");var mn=i(i(i({},Ke,Ke),"Refiner",Ke),"refiner",Ke);i({},"Qualaroo","Qualaroo");var In=i(i(i({},Ne,Ne),"Qualaroo",Ne),"qualaroo",Ne);i({},"Podsights","Podsights");var An=i(i(i(i(i(i(i(i({},De,De),"Podsights",De),"PodSights",De),"pod Sights",De),"Pod Sights",De),"pod sights",De),"POD SIGHTS",De),"Pod sights",De);i({},"Axeptio","Axeptio");var kn=i(i(i({},F,F),"Axeptio",F),"axeptio",F);i({},"SatisMeter","Satismeter");var bn=i(i(i({},ze,ze),"Satismeter",ze),"SatisMeter",ze);i({},"Microsoft Clarity","MicrosoftClarity");var En=i(i(i(i(i(i(i(i(i({},Se,Se),"Microsoft Clarity",Se),"Microsoft clarity",Se),"microsoft clarity",Se),"Microsoft_clarity",Se),"MicrosoftClarity",Se),"MICROSOFTCLARITY",Se),"microsoftclarity",Se),"microsoftClarity",Se);i({},"Sendinblue","Sendinblue");var Sn=i(i(i(i({},Ve,Ve),"Sendinblue",Ve),"sendinblue",Ve),"SendinBlue",Ve);i({},"Olark","Olark");var Cn=i(i(i({},_e,_e),"Olark",_e),"olark",_e);i({},"Lemnisk Marketing Automation","Lemnisk");var Tn=i(i(i(i(i(i(i(i({},me,me),"LEMNISK_MARKETING_AUTOMATION",me),"Lemnisk Marketing Automation",me),"LemniskMarketingAutomation",me),"lemniskmarketingautomation",me),"lemniskMarketingAutomation",me),"lemnisk",me),"Lemnisk",me);i({},"TikTok Ads","TiktokAds");var wn=i(i(i(i(i(i(i({},Ze,Ze),"TiktokAds",Ze),"Tiktok ads",Ze),"Tiktok Ads",Ze),"Tik Tok Ads",Ze),"tik tok ads",Ze),"tiktokads",Ze);i({},"ActiveCampaign","ActiveCampaign");var On=i(i(i(i(i(i({ActiveCampaign:L,"Active Campaign":L,"ACTIVE CAMPAIGN":L},L,L),"activecampaign",L),"active campaign",L),"Active campaign",L),"active Campaign",L),"active_campaign",L);i({},"Sprig","Sprig");var _n=i(i(i({},$e,$e),"Sprig",$e),"sprig",$e);i({},"Spotify Pixel","SpotifyPixel");var Pn=i(i(i(i({},Je,Je),"Spotify Pixel",Je),"spotify pixel",Je),"SPOTIFY_PIXEL",Je);i({},"CommandBar","CommandBar");var Rn=i(i(i(i(i({},z,z),"Command Bar",z),"Commandbar",z),"COMMAND_BAR",z),"commandbar",z);i({},"Ninetailed","Ninetailed");var xn=i(i(i(i({},Oe,Oe),"Ninetailed",Oe),"ninetailed",Oe),"NineTailed",Oe);i({},"XPixel","XPixel");var Dn=i(i(i(i(i({},it,it),"XPixel",it),"Xpixel",it),"xpixel",it),"xPixel",it);i({},"Gainsight PX","Gainsight_PX");var Ln=i(i({},ie,ie),"Gainsight_PX",ie),Mn=a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a({All:"All"},st),at),ut),ct),lt),ht),Rn),ft),dt),pt),gt),vt),yt),mt),It),At),kt),Zt),bt),Et),St),Ct),Tt),wt),Ot),_t),Pt),Rt),Dt),Lt),Mt),Bt),Nt),Gt),xn),Ft),jt),Kt),Ht),Qt),zt),Vt),qt),Xt),Wt),Yt),Jt),$t),en),tn),nn),rn),on),an),un),cn),ln),hn),fn),dn),pn),gn),vn),sn),yn),mn),In),An),kn),bn),En),Sn),Cn),Tn),wn),On),_n),Pn),Dn),Ln),Bn=3,Nn={setLogLevel:function(e){switch(e.toUpperCase()){case"INFO":Bn=1;break;case"DEBUG":Bn=2;break;default:Bn=3}},info:function(){var e;Bn<=1&&(e=console).info.apply(e,arguments)},debug:function(){var e;Bn<=2&&(e=console).log.apply(e,arguments)},warn:function(){var e;Bn<=3&&(e=console).warn.apply(e,arguments)},error:function(){var e;Bn<=4&&(e=console).error.apply(e,arguments)}},Gn=1e4,Fn=1e3,Un="RS_JS_SDK",jn="Request failed with status:",Kn=[jn],Hn="errorReporting",Qn=function(e){var t,n=null===(t=window.RudderStackGlobals)||void 0===t?void 0:t[Hn];n&&e instanceof Error&&n.notify(e)},zn=function(e,t){try{return JSON.stringify(e,function(e){var t=[];return function(n,r){if(!e||null!=r){if("object"!==h(r)||null===r)return r;for(;t.length>0&&t[t.length-1]!==this;)t.pop();return t.includes(r)?(Nn.debug("Circular Reference detected for key: ".concat(n)),"[Circular Reference]"):(t.push(r),r)}}}(t))}catch(e){return Nn.warn("Failed to convert the value to a JSON string."),null}},Vn=function(e,t,n){var r,i;try{r="string"==typeof e?e:e instanceof Error||e.message?e.message:zn(e)}catch(e){r=""}if("object"===h(i=e)&&null!==i&&"target"in i){if(e.target&&"script"!==e.target.localName)return"";if(e.target.dataset&&(e.target.dataset.loader!==Un||"true"!==e.target.dataset.isnonnativesdk))return"";if(r="error in script loading:: src:: ".concat(e.target.src," id:: ").concat(e.target.id),"ad-block"===e.target.id)return n.page("RudderJS-Initiated","ad-block page request",{path:"/ad-blocked",title:r},n.sendAdblockPageOptions),""}return"[handleError]::".concat(t||"",' "').concat(r,'"')},qn=function(e,t,n){var r;try{r=Vn(e,t,n)}catch(t){Nn.error("[handleError] Exception:: ",t),Nn.error("[handleError] Original error:: ",zn(e)),Qn(t)}r&&(Nn.error(r),function(e){return!e.message||!Kn.some((function(t){return e.message.includes(t)}))}(e)&&Qn(e))},Xn={exports:{}};var Wn,Yn={exports:{}},Jn=g(Object.freeze({__proto__:null,default:{}}));Yn.exports;function $n(){return Wn||(Wn=1,Yn.exports=(e=e||function(e,t){var n;if("undefined"!=typeof window&&window.crypto&&(n=window.crypto),"undefined"!=typeof self&&self.crypto&&(n=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(n=globalThis.crypto),!n&&"undefined"!=typeof window&&window.msCrypto&&(n=window.msCrypto),!n&&void 0!==d&&d.crypto&&(n=d.crypto),!n)try{n=Jn}catch(e){}var r=function(){if(n){if("function"==typeof n.getRandomValues)try{return n.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof n.randomBytes)try{return n.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},i=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),o={},s=o.lib={},a=s.Base={extend:function(e){var t=i(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},u=s.WordArray=a.extend({init:function(e,n){e=this.words=e||[],this.sigBytes=n!=t?n:4*e.length},toString:function(e){return(e||l).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,i=e.sigBytes;if(this.clamp(),r%4)for(var o=0;o<i;o++){var s=n[o>>>2]>>>24-o%4*8&255;t[r+o>>>2]|=s<<24-(r+o)%4*8}else for(var a=0;a<i;a+=4)t[r+a>>>2]=n[a>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=a.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n<e;n+=4)t.push(r());return new u.init(t,e)}}),c=o.enc={},l=c.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var o=t[i>>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new u.init(n,t/2)}},h=c.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var o=t[i>>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new u.init(n,t)}},f=c.Utf8={stringify:function(e){try{return decodeURIComponent(escape(h.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return h.parse(unescape(encodeURIComponent(e)))}},p=s.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new u.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=f.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n,r=this._data,i=r.words,o=r.sigBytes,s=this.blockSize,a=o/(4*s),c=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*s,l=e.min(4*c,o);if(c){for(var h=0;h<c;h+=s)this._doProcessBlock(i,h);n=i.splice(0,c),r.sigBytes-=l}return new u.init(n,l)},clone:function(){var e=a.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});s.Hasher=p.extend({cfg:a.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){p.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new g.HMAC.init(e,n).finalize(t)}}});var g=o.algo={};return o}(Math),e)),Yn.exports;var e}var Zn,er={exports:{}};er.exports;function tr(){return Zn||(Zn=1,er.exports=(e=$n(),function(){var t=e,n=t.lib.WordArray;function r(e,t,r){for(var i=[],o=0,s=0;s<t;s++)if(s%4){var a=r[e.charCodeAt(s-1)]<<s%4*2|r[e.charCodeAt(s)]>>>6-s%4*2;i[o>>>2]|=a<<24-o%4*8,o++}return n.create(i,o)}t.enc.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,r=this._map;e.clamp();for(var i=[],o=0;o<n;o+=3)for(var s=(t[o>>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,a=0;a<4&&o+.75*a<n;a++)i.push(r.charAt(s>>>6*(3-a)&63));var u=r.charAt(64);if(u)for(;i.length%4;)i.push(u);return i.join("")},parse:function(e){var t=e.length,n=this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var o=0;o<n.length;o++)i[n.charCodeAt(o)]=o}var s=n.charAt(64);if(s){var a=e.indexOf(s);-1!==a&&(t=a)}return r(e,t,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),e.enc.Base64)),er.exports;var e}var nr,rr={exports:{}};rr.exports;function ir(){return nr||(nr=1,rr.exports=(e=$n(),function(t){var n=e,r=n.lib,i=r.WordArray,o=r.Hasher,s=n.algo,a=[];!function(){for(var e=0;e<64;e++)a[e]=4294967296*t.abs(t.sin(e+1))|0}();var u=s.MD5=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,i=e[r];e[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o=this._hash.words,s=e[t+0],u=e[t+1],d=e[t+2],p=e[t+3],g=e[t+4],v=e[t+5],y=e[t+6],m=e[t+7],I=e[t+8],A=e[t+9],k=e[t+10],b=e[t+11],E=e[t+12],S=e[t+13],C=e[t+14],T=e[t+15],w=o[0],O=o[1],_=o[2],P=o[3];w=c(w,O,_,P,s,7,a[0]),P=c(P,w,O,_,u,12,a[1]),_=c(_,P,w,O,d,17,a[2]),O=c(O,_,P,w,p,22,a[3]),w=c(w,O,_,P,g,7,a[4]),P=c(P,w,O,_,v,12,a[5]),_=c(_,P,w,O,y,17,a[6]),O=c(O,_,P,w,m,22,a[7]),w=c(w,O,_,P,I,7,a[8]),P=c(P,w,O,_,A,12,a[9]),_=c(_,P,w,O,k,17,a[10]),O=c(O,_,P,w,b,22,a[11]),w=c(w,O,_,P,E,7,a[12]),P=c(P,w,O,_,S,12,a[13]),_=c(_,P,w,O,C,17,a[14]),w=l(w,O=c(O,_,P,w,T,22,a[15]),_,P,u,5,a[16]),P=l(P,w,O,_,y,9,a[17]),_=l(_,P,w,O,b,14,a[18]),O=l(O,_,P,w,s,20,a[19]),w=l(w,O,_,P,v,5,a[20]),P=l(P,w,O,_,k,9,a[21]),_=l(_,P,w,O,T,14,a[22]),O=l(O,_,P,w,g,20,a[23]),w=l(w,O,_,P,A,5,a[24]),P=l(P,w,O,_,C,9,a[25]),_=l(_,P,w,O,p,14,a[26]),O=l(O,_,P,w,I,20,a[27]),w=l(w,O,_,P,S,5,a[28]),P=l(P,w,O,_,d,9,a[29]),_=l(_,P,w,O,m,14,a[30]),w=h(w,O=l(O,_,P,w,E,20,a[31]),_,P,v,4,a[32]),P=h(P,w,O,_,I,11,a[33]),_=h(_,P,w,O,b,16,a[34]),O=h(O,_,P,w,C,23,a[35]),w=h(w,O,_,P,u,4,a[36]),P=h(P,w,O,_,g,11,a[37]),_=h(_,P,w,O,m,16,a[38]),O=h(O,_,P,w,k,23,a[39]),w=h(w,O,_,P,S,4,a[40]),P=h(P,w,O,_,s,11,a[41]),_=h(_,P,w,O,p,16,a[42]),O=h(O,_,P,w,y,23,a[43]),w=h(w,O,_,P,A,4,a[44]),P=h(P,w,O,_,E,11,a[45]),_=h(_,P,w,O,T,16,a[46]),w=f(w,O=h(O,_,P,w,d,23,a[47]),_,P,s,6,a[48]),P=f(P,w,O,_,m,10,a[49]),_=f(_,P,w,O,C,15,a[50]),O=f(O,_,P,w,v,21,a[51]),w=f(w,O,_,P,E,6,a[52]),P=f(P,w,O,_,p,10,a[53]),_=f(_,P,w,O,k,15,a[54]),O=f(O,_,P,w,u,21,a[55]),w=f(w,O,_,P,I,6,a[56]),P=f(P,w,O,_,T,10,a[57]),_=f(_,P,w,O,y,15,a[58]),O=f(O,_,P,w,S,21,a[59]),w=f(w,O,_,P,g,6,a[60]),P=f(P,w,O,_,b,10,a[61]),_=f(_,P,w,O,d,15,a[62]),O=f(O,_,P,w,A,21,a[63]),o[0]=o[0]+w|0,o[1]=o[1]+O|0,o[2]=o[2]+_|0,o[3]=o[3]+P|0},_doFinalize:function(){var e=this._data,n=e.words,r=8*this._nDataBytes,i=8*e.sigBytes;n[i>>>5]|=128<<24-i%32;var o=t.floor(r/4294967296),s=r;n[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n[14+(i+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),e.sigBytes=4*(n.length+1),this._process();for(var a=this._hash,u=a.words,c=0;c<4;c++){var l=u[c];u[c]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return a},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function c(e,t,n,r,i,o,s){var a=e+(t&n|~t&r)+i+s;return(a<<o|a>>>32-o)+t}function l(e,t,n,r,i,o,s){var a=e+(t&r|n&~r)+i+s;return(a<<o|a>>>32-o)+t}function h(e,t,n,r,i,o,s){var a=e+(t^n^r)+i+s;return(a<<o|a>>>32-o)+t}function f(e,t,n,r,i,o,s){var a=e+(n^(t|~r))+i+s;return(a<<o|a>>>32-o)+t}n.MD5=o._createHelper(u),n.HmacMD5=o._createHmacHelper(u)}(Math),e.MD5)),rr.exports;var e}var or,sr={exports:{}},ar={exports:{}};ar.exports;function ur(){return or||(or=1,ar.exports=(a=$n(),t=(e=a).lib,n=t.WordArray,r=t.Hasher,i=e.algo,o=[],s=i.SHA1=r.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],s=n[2],a=n[3],u=n[4],c=0;c<80;c++){if(c<16)o[c]=0|e[t+c];else{var l=o[c-3]^o[c-8]^o[c-14]^o[c-16];o[c]=l<<1|l>>>31}var h=(r<<5|r>>>27)+u+o[c];h+=c<20?1518500249+(i&s|~i&a):c<40?1859775393+(i^s^a):c<60?(i&s|i&a|s&a)-1894007588:(i^s^a)-899497514,u=a,a=s,s=i<<30|i>>>2,i=r,r=h}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+s|0,n[3]=n[3]+a|0,n[4]=n[4]+u|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(r+64>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=r.clone.call(this);return e._hash=this._hash.clone(),e}}),e.SHA1=r._createHelper(s),e.HmacSHA1=r._createHmacHelper(s),a.SHA1)),ar.exports;var e,t,n,r,i,o,s,a}var cr,lr={exports:{}};lr.exports;var hr;sr.exports;function fr(){return hr||(hr=1,sr.exports=function(e){return n=(t=e).lib,r=n.Base,i=n.WordArray,o=t.algo,s=o.MD5,a=o.EvpKDF=r.extend({cfg:r.extend({keySize:4,hasher:s,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n,r=this.cfg,o=r.hasher.create(),s=i.create(),a=s.words,u=r.keySize,c=r.iterations;a.length<u;){n&&o.update(n),n=o.update(e).finalize(t),o.reset();for(var l=1;l<c;l++)n=o.finalize(n),o.reset();s.concat(n)}return s.sigBytes=4*u,s}}),t.EvpKDF=function(e,t,n){return a.create(n).compute(e,t)},e.EvpKDF;var t,n,r,i,o,s,a}($n(),ur(),(cr||(cr=1,lr.exports=(e=$n(),void function(){var t=e,n=t.lib.Base,r=t.enc.Utf8;t.algo.HMAC=n.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=r.parse(t));var n=e.blockSize,i=4*n;t.sigBytes>i&&(t=e.finalize(t)),t.clamp();for(var o=this._oKey=t.clone(),s=this._iKey=t.clone(),a=o.words,u=s.words,c=0;c<n;c++)a[c]^=1549556828,u[c]^=909522486;o.sigBytes=s.sigBytes=i,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,n=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(n))}})}())),lr.exports))),sr.exports;var e}var dr,pr={exports:{}};pr.exports;var gr;var vr,yr,mr=(gr||(gr=1,Xn.exports=function(e){return function(){var t=e,n=t.lib.BlockCipher,r=t.algo,i=[],o=[],s=[],a=[],u=[],c=[],l=[],h=[],f=[],d=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var n=0,r=0;for(t=0;t<256;t++){var p=r^r<<1^r<<2^r<<3^r<<4;p=p>>>8^255&p^99,i[n]=p,o[p]=n;var g=e[n],v=e[g],y=e[v],m=257*e[p]^16843008*p;s[n]=m<<24|m>>>8,a[n]=m<<16|m>>>16,u[n]=m<<8|m>>>24,c[n]=m,m=16843009*y^65537*v^257*g^16843008*n,l[p]=m<<24|m>>>8,h[p]=m<<16|m>>>16,f[p]=m<<8|m>>>24,d[p]=m,n?(n=g^e[e[e[y^g]]],r^=e[e[r]]):n=r=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],g=r.AES=n.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,n=e.sigBytes/4,r=4*((this._nRounds=n+6)+1),o=this._keySchedule=[],s=0;s<r;s++)s<n?o[s]=t[s]:(c=o[s-1],s%n?n>6&&s%n==4&&(c=i[c>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c]):(c=i[(c=c<<8|c>>>24)>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c],c^=p[s/n|0]<<24),o[s]=o[s-n]^c);for(var a=this._invKeySchedule=[],u=0;u<r;u++){if(s=r-u,u%4)var c=o[s];else c=o[s-4];a[u]=u<4||s<=4?c:l[i[c>>>24]]^h[i[c>>>16&255]]^f[i[c>>>8&255]]^d[i[255&c]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,s,a,u,c,i)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,l,h,f,d,o),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,r,i,o,s,a){for(var u=this._nRounds,c=e[t]^n[0],l=e[t+1]^n[1],h=e[t+2]^n[2],f=e[t+3]^n[3],d=4,p=1;p<u;p++){var g=r[c>>>24]^i[l>>>16&255]^o[h>>>8&255]^s[255&f]^n[d++],v=r[l>>>24]^i[h>>>16&255]^o[f>>>8&255]^s[255&c]^n[d++],y=r[h>>>24]^i[f>>>16&255]^o[c>>>8&255]^s[255&l]^n[d++],m=r[f>>>24]^i[c>>>16&255]^o[l>>>8&255]^s[255&h]^n[d++];c=g,l=v,h=y,f=m}g=(a[c>>>24]<<24|a[l>>>16&255]<<16|a[h>>>8&255]<<8|a[255&f])^n[d++],v=(a[l>>>24]<<24|a[h>>>16&255]<<16|a[f>>>8&255]<<8|a[255&c])^n[d++],y=(a[h>>>24]<<24|a[f>>>16&255]<<16|a[c>>>8&255]<<8|a[255&l])^n[d++],m=(a[f>>>24]<<24|a[c>>>16&255]<<16|a[l>>>8&255]<<8|a[255&h])^n[d++],e[t]=g,e[t+1]=v,e[t+2]=y,e[t+3]=m},keySize:8});t.AES=n._createHelper(g)}(),e.AES}($n(),tr(),ir(),fr(),(dr||(dr=1,pr.exports=(vr=$n(),fr(),void(vr.lib.Cipher||function(e){var t=vr,n=t.lib,r=n.Base,i=n.WordArray,o=n.BufferedBlockAlgorithm,s=t.enc;s.Utf8;var a=s.Base64,u=t.algo.EvpKDF,c=n.Cipher=o.extend({cfg:r.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,n){this.cfg=this.cfg.extend(n),this._xformMode=e,this._key=t,this.reset()},reset:function(){o.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?m:v}return function(t){return{encrypt:function(n,r,i){return e(r).encrypt(t,n,r,i)},decrypt:function(n,r,i){return e(r).decrypt(t,n,r,i)}}}}()});n.StreamCipher=c.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var l=t.mode={},h=n.BlockCipherMode=r.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),f=l.CBC=function(){var t=h.extend();function n(t,n,r){var i,o=this._iv;o?(i=o,this._iv=e):i=this._prevBlock;for(var s=0;s<r;s++)t[n+s]^=i[s]}return t.Encryptor=t.extend({processBlock:function(e,t){var r=this._cipher,i=r.blockSize;n.call(this,e,t,i),r.encryptBlock(e,t),this._prevBlock=e.slice(t,t+i)}}),t.Decryptor=t.extend({processBlock:function(e,t){var r=this._cipher,i=r.blockSize,o=e.slice(t,t+i);r.decryptBlock(e,t),n.call(this,e,t,i),this._prevBlock=o}}),t}(),d=(t.pad={}).Pkcs7={pad:function(e,t){for(var n=4*t,r=n-e.sigBytes%n,o=r<<24|r<<16|r<<8|r,s=[],a=0;a<r;a+=4)s.push(o);var u=i.create(s,r);e.concat(u)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}};n.BlockCipher=c.extend({cfg:c.cfg.extend({mode:f,padding:d}),reset:function(){var e;c.reset.call(this);var t=this.cfg,n=t.iv,r=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=r.createEncryptor:(e=r.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,n&&n.words):(this._mode=e.call(r,this,n&&n.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4});var p=n.CipherParams=r.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),g=(t.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,n=e.salt;return(n?i.create([1398893684,1701076831]).concat(n).concat(t):t).toString(a)},parse:function(e){var t,n=a.parse(e),r=n.words;return 1398893684==r[0]&&1701076831==r[1]&&(t=i.create(r.slice(2,4)),r.splice(0,4),n.sigBytes-=16),p.create({ciphertext:n,salt:t})}},v=n.SerializableCipher=r.extend({cfg:r.extend({format:g}),encrypt:function(e,t,n,r){r=this.cfg.extend(r);var i=e.createEncryptor(n,r),o=i.finalize(t),s=i.cfg;return p.create({ciphertext:o,key:n,iv:s.iv,algorithm:e,mode:s.mode,padding:s.padding,blockSize:e.blockSize,formatter:r.format})},decrypt:function(e,t,n,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),e.createDecryptor(n,r).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),y=(t.kdf={}).OpenSSL={execute:function(e,t,n,r,o){if(r||(r=i.random(8)),o)s=u.create({keySize:t+n,hasher:o}).compute(e,r);else var s=u.create({keySize:t+n}).compute(e,r);var a=i.create(s.words.slice(t),4*n);return s.sigBytes=4*t,p.create({key:s,iv:a,salt:r})}},m=n.PasswordBasedCipher=v.extend({cfg:v.cfg.extend({kdf:y}),encrypt:function(e,t,n,r){var i=(r=this.cfg.extend(r)).kdf.execute(n,e.keySize,e.ivSize,r.salt,r.hasher);r.iv=i.iv;var o=v.encrypt.call(this,e,t,i.key,r);return o.mixIn(i),o},decrypt:function(e,t,n,r){r=this.cfg.extend(r),t=this._parse(t,r.format);var i=r.kdf.execute(n,e.keySize,e.ivSize,t.salt,r.hasher);return r.iv=i.iv,v.decrypt.call(this,e,t,i.key,r)}})}()))),pr.exports))),Xn.exports),Ir=p(mr),Ar={exports:{}};var kr,br,Er,Sr,Cr=(yr||(yr=1,Ar.exports=function(e){return e.enc.Utf8}($n())),Ar.exports),Tr=p(Cr);var wr,Or,_r,Pr,Rr,xr,Dr,Lr=function(){if(Sr)return Er;Sr=1;var e=br?kr:(br=1,kr=function(e){return null!=e&&"object"===h(e)&&!1===Array.isArray(e)});function t(e,t,n){return"function"==typeof n.join?n.join(e):e[0]+t+e[1]}function n(e,t,n){return"function"!=typeof n.isValid||n.isValid(e,t)}function r(t){return e(t)||Array.isArray(t)||"function"==typeof t}return Er=function(i,o,s){if(e(s)||(s={default:s}),!r(i))return void 0!==s.default?s.default:i;"number"==typeof o&&(o=String(o));var a=Array.isArray(o),u="string"==typeof o,c=s.separator||".",l=s.joinChar||("string"==typeof c?c:".");if(!u&&!a)return i;if(u&&o in i)return n(o,i,s)?i[o]:s.default;var h=a?o:function(e,t,n){if("function"==typeof n.split)return n.split(e);return e.split(t)}(o,c,s),f=h.length,d=0;do{var p=h[d];for("number"==typeof p&&(p=String(p));p&&"\\"===p.slice(-1);)p=t([p.slice(0,-1),h[++d]||""],l,s);if(p in i){if(!n(p,i,s))return s.default;i=i[p]}else{for(var g=!1,v=d+1;v<f;)if(g=(p=t([p,h[v++]],l,s))in i){if(!n(p,i,s))return s.default;i=i[p],d=v-1;break}if(!g)return s.default}}while(++d<f&&r(i));return d===f?i:s.default}}(),Mr=p(Lr),Br={exports:{}};function Nr(){if(Or)return wr;Or=1;var e=1e3,t=60*e,n=60*t,r=24*n,i=7*r,o=365.25*r;function s(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}return wr=function(a,u){u=u||{};var c=h(a);if("string"===c&&a.length>0)return function(s){if((s=String(s)).length>100)return;var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(s);if(!a)return;var u=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return u*o;case"weeks":case"week":case"w":return u*i;case"days":case"day":case"d":return u*r;case"hours":case"hour":case"hrs":case"hr":case"h":return u*n;case"minutes":case"minute":case"mins":case"min":case"m":return u*t;case"seconds":case"second":case"secs":case"sec":case"s":return u*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:return}}(a);if("number"===c&&isFinite(a))return u.long?function(i){var o=Math.abs(i);if(o>=r)return s(i,o,r,"day");if(o>=n)return s(i,o,n,"hour");if(o>=t)return s(i,o,t,"minute");if(o>=e)return s(i,o,e,"second");return i+" ms"}(a):function(i){var o=Math.abs(i);if(o>=r)return Math.round(i/r)+"d";if(o>=n)return Math.round(i/n)+"h";if(o>=t)return Math.round(i/t)+"m";if(o>=e)return Math.round(i/e)+"s";return i+"ms"}(a);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(a))},wr}function Gr(){return Rr||(Rr=1,function(e,t){var n;t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;var n="color: "+this.color;t.splice(1,0,n,"color: inherit");var r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(r++,"%c"===e&&(i=r))})),t.splice(i,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){var e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(n=!1,function(){n||(n=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||function(){},e.exports=(Pr||(Pr=1,_r=function(e){function t(e){var r,i,o,s=null;function a(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];if(a.enabled){var o=a,s=Number(new Date),u=s-(r||s);o.diff=u,o.prev=r,o.curr=s,r=s,n[0]=t.coerce(n[0]),"string"!=typeof n[0]&&n.unshift("%O");var c=0;n[0]=n[0].replace(/%([a-zA-Z%])/g,(function(e,r){if("%%"===e)return"%";c++;var i=t.formatters[r];if("function"==typeof i){var s=n[c];e=i.call(o,s),n.splice(c,1),c--}return e})),t.formatArgs.call(o,n),(o.log||t.log).apply(o,n)}}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=n,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:function(){return null!==s?s:(i!==t.namespaces&&(i=t.namespaces,o=t.enabled(e)),o)},set:function(e){s=e}}),"function"==typeof t.init&&t.init(a),a}function n(e,n){var r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function r(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){var e=[].concat(c(t.names.map(r)),c(t.skips.map(r).map((function(e){return"-"+e})))).join(",");return t.enable(""),e},t.enable=function(e){var n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];var r=("string"==typeof e?e:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=Nr(),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((function(n){t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){for(var n=0,r=0;r<e.length;r++)n=(n<<5)-n+e.charCodeAt(r),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}),_r)(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(Br,Br.exports)),Br.exports}var Fr,Ur,jr,Kr=function(){if(Dr)return xr;Dr=1;var e=Gr()("cookie");function t(){var e;try{e=document.cookie}catch(e){return"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e.stack||e),{}}return function(e){var t,n={},i=e.split(/ *; */);if(""==i[0])return n;for(var o=0;o<i.length;++o)n[r((t=i[o].split("="))[0])]=r(t[1]);return n}(e)}function n(t){try{return encodeURIComponent(t)}catch(n){e("error `encode(%o)` - %o",t,n)}}function r(t){try{return decodeURIComponent(t)}catch(n){e("error `decode(%o)` - %o",t,n)}}return xr=function(e,r,i){switch(arguments.length){case 3:case 2:return function(e,t,r){r=r||{};var i=n(e)+"="+n(t);null==t&&(r.maxage=-1);r.maxage&&(r.expires=new Date(+new Date+r.maxage));r.path&&(i+="; path="+r.path);r.domain&&(i+="; domain="+r.domain);r.expires&&(i+="; expires="+r.expires.toUTCString());r.samesite&&(i+="; samesite="+r.samesite);r.secure&&(i+="; secure");document.cookie=i}(e,r,i);case 1:return function(e){return t()[e]}(e);default:return t()}}}(),Hr=p(Kr),Qr={exports:{}};function zr(){if(Ur)return Fr;Ur=1;var e=Gr()("cookie");function t(){var e;try{e=document.cookie}catch(e){return"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e.stack||e),{}}return function(e){var t,n={},i=e.split(/ *; */);if(""==i[0])return n;for(var o=0;o<i.length;++o)n[r((t=i[o].split("="))[0])]=r(t[1]);return n}(e)}function n(t){try{return encodeURIComponent(t)}catch(n){e("error `encode(%o)` - %o",t,n)}}function r(t){try{return decodeURIComponent(t)}catch(n){e("error `decode(%o)` - %o",t,n)}}return Fr=function(e,r,i){switch(arguments.length){case 3:case 2:return function(e,t,r){r=r||{};var i=n(e)+"="+n(t);null==t&&(r.maxage=-1);r.maxage&&(r.expires=new Date(+new Date+r.maxage));r.path&&(i+="; path="+r.path);r.domain&&(i+="; domain="+r.domain);r.expires&&(i+="; expires="+r.expires.toUTCString());r.secure&&(i+="; secure");document.cookie=i}(e,r,i);case 1:return function(e){return t()[e]}(e);default:return t()}},Fr}var Vr,qr=(jr||(jr=1,function(e,t){var n=zr();function r(e){for(var n=t.cookie,r=t.levels(e),i=0;i<r.length;++i){var o="__tld__",s=r[i],a={domain:"."+s};if(n(o,1,a),n(o))return n(o,null,a),s}return""}r.levels=function(e){var t,n,r=("function"!=typeof window.URL?(t=e,(n=document.createElement("a")).href=t,n.hostname):new URL(e).hostname).split("."),i=r[r.length-1],o=[];if(4===r.length&&i===parseInt(i,10))return o;if(r.length<=1)return o;for(var s=r.length-2;s>=0;--s)o.push(r.slice(s).join("."));return o},r.cookie=n,t=e.exports=r}(Qr,Qr.exports)),Qr.exports),Xr=p(qr),Wr=function(e){return null===e},Yr=function(e){return!Wr(e)&&function(e){return"object"===h(e)}(e)&&!Array.isArray(e)},Jr=function(e,t){if(!Array.isArray(e)||!Array.isArray(t))return _(t);var n=_(e);return t.forEach((function(e,t){n[t]=Array.isArray(e)||Yr(e)?$r(n[t],e):e})),n},$r=function(e,t){return x(Jr,e,t)},Zr=function(e){return function(e){return!Wr(e)&&"[object Object]"===Object.prototype.toString.call(e)}(e)&&Object.keys(e).length>0},ei=new(function(){return n((function e(n){t(this,e),this.cOpts={},this.options(n),this.isSupportAvailable=this.checkSupportAvailability()}),[{key:"options",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(0===arguments.length)return this.cOpts;var t=".".concat(Xr(window.location.href));return"."===t&&(t=null),this.cOpts=$r({maxage:31536e6,path:"/",domain:t,samesite:"Lax"},e),e.sameDomainCookiesOnly&&delete this.cOpts.domain,this.cOpts}},{key:"set",value:function(e,t){try{return Hr(e,t,_(this.cOpts)),!0}catch(e){return Nn.error(e),!1}}},{key:"get",value:function(e){return Hr(e)}},{key:"remove",value:function(e){try{return Hr(e,null,_(this.cOpts)),!0}catch(e){return!1}}},{key:"checkSupportAvailability",value:function(){var e="test_rudder_cookie";return this.set(e,!0),!!this.get(e)&&(this.remove(e),!0)}}])}())({}),ti={exports:{}};var ni=(Vr||(Vr=1,ti.exports=function(){function e(e){return e=JSON.stringify(e),!!/^\{[\s\S]*\}$/.test(e)}function t(e){return void 0===e||"function"==typeof e?e+"":JSON.stringify(e)}function n(e){if("string"==typeof e)try{return JSON.parse(e)}catch(t){return e}}function r(e){return"[object Function]"==={}.toString.call(e)}function i(e){return"[object Array]"===Object.prototype.toString.call(e)}function o(e){var t="_Is_Incognit",n="yes";try{e||(e=window.localStorage),e.setItem(t,n),e.removeItem(t)}catch(t){var r={_data:{},setItem:function(e,t){return r._data[e]=String(t)},getItem:function(e){return r._data.hasOwnProperty(e)?r._data[e]:void 0},removeItem:function(e){return delete r._data[e]},clear:function(){return r._data={}}};e=r}finally{e.getItem(t)===n&&e.removeItem(t)}return e}var s=o();function a(){if(!(this instanceof a))return new a}a.prototype={set:function(n,r){if(n&&!e(n))s.setItem(n,t(r));else if(e(n))for(var i in n)this.set(i,n[i]);return this},get:function(e){if(void 0===e){var t={};return this.forEach((function(e,n){return t[e]=n})),t}if("?"===e.charAt(0))return this.has(e.substr(1));var r=arguments;if(r.length>1){for(var i={},o=0,a=r.length;o<a;o++){var u=n(s.getItem(r[o]));this.has(r[o])&&(i[r[o]]=u)}return i}return n(s.getItem(e))},clear:function(){return s.clear(),this},remove:function(e){var t=this.get(e);return s.removeItem(e),t},has:function(e){return{}.hasOwnProperty.call(this.get(),e)},keys:function(){var e=[];return this.forEach((function(t){e.push(t)})),e},forEach:function(e){for(var t=0,n=s.length;t<n;t++){var r=s.key(t);e(r,this.get(r))}return this},search:function(e){for(var t=this.keys(),n={},r=0,i=t.length;r<i;r++)t[r].indexOf(e)>-1&&(n[t[r]]=this.get(t[r]));return n},len:function(){return s.length}};var u=null;function c(t,n){var o=arguments,s=null;if(u||(u=a()),0===o.length)return u.get();if(1===o.length){if("string"==typeof t)return u.get(t);if(e(t))return u.set(t)}if(2===o.length&&"string"==typeof t){if(!n)return u.remove(t);if(n&&"string"==typeof n)return u.set(t,n);n&&r(n)&&(s=null,s=n(t,u.get(t)),c.set(t,s))}if(2===o.length&&i(t)&&r(n))for(var l=0,h=t.length;l<h;l++)s=n(t[l],u.get(t[l])),c.set(t[l],s);return c}for(var l in a.prototype)c[l]=a.prototype[l];return c}()),ti.exports),ri=p(ni),ii=new(function(){return n((function e(n){t(this,e),this.sOpts={},this.enabled=this.checkSupportAvailability(),this.options(n)}),[{key:"options",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 0===arguments.length||(this.sOpts=$r({enabled:!0},e),this.enabled=this.sOpts.enabled&&this.enabled),this.sOpts}},{key:"set",value:function(e,t){return ri.set(e,t)}},{key:"get",value:function(e){return ri.get(e)}},{key:"remove",value:function(e){return ri.remove(e)}},{key:"checkSupportAvailability",value:function(){try{var e="test_rudder_ls";return this.set(e,!0),!!this.get(e)&&(this.remove(e),!0)}catch(e){return!1}}}])}())({}),oi=function(e){return(new TextDecoder).decode((t=e,n=globalThis.atob(t).split("").map((function(e){return e.charCodeAt(0)})),new Uint8Array(n)));var t,n},si="rl_user_id",ai="rl_trait",ui="rl_anonymous_id",ci="rl_group_id",li="rl_group_trait",hi="rl_page_init_referrer",fi="rl_page_init_referring_domain",di="rl_session",pi="rl_auth_token",gi="RudderEncrypt:",vi="RS_ENC_v3_",yi="Rudder",mi={segment:"ajs_anonymous_id"};function Ii(e){return e.replace(/^\s+|\s+$/gm,"")}function Ai(e){return e&&"string"==typeof e&&""!==Ii(e)?e.startsWith(gi)?Ir.decrypt(e.substring(gi.length),yi).toString(Tr):e.startsWith(vi)?oi(e.substring(vi.length)):e:e}for(var ki,bi=function(){return n((function e(){t(this,e),ei.isSupportAvailable?this.storage=ei:(ii.enabled&&(this.storage=ii),this.storage||Nn.error("No storage is available :: initializing the SDK without storage"))}),[{key:"options",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.storage.options(e)}},{key:"setItem",value:function(e,t){var n=zn(t);null!==n&&this.storage.set(e,function(e){return""===Ii(e)?e:"".concat(gi).concat(Ir.encrypt(e,yi).toString())}(n))}},{key:"setStringItem",value:function(e,t){"string"==typeof t?this.setItem(e,t):Nn.error("[Storage] ".concat(e," should be string"))}},{key:"setUserId",value:function(e){this.setStringItem(si,e)}},{key:"setUserTraits",value:function(e){this.setItem(ai,e)}},{key:"setGroupId",value:function(e){this.setStringItem(ci,e)}},{key:"setGroupTraits",value:function(e){this.setItem(li,e)}},{key:"setAnonymousId",value:function(e){this.setStringItem(ui,e)}},{key:"setInitialReferrer",value:function(e){this.setItem(hi,e)}},{key:"setInitialReferringDomain",value:function(e){this.setItem(fi,e)}},{key:"setSessionInfo",value:function(e){this.setItem(di,e)}},{key:"setAuthToken",value:function(e){this.setItem(pi,e)}},{key:"getItem",value:function(e){try{var t=Ai(this.storage.get(e)),n=t?JSON.parse(t):null;return"string"==typeof n&&n.startsWith(vi)&&(Nn.warn(function(e){return"The cookie data for ".concat(e," seems to be corrupted where the underlying unencrypted data seems to be a cookie created by SDK v3. The decryption of the data was attempted again. This can potentially stem from using SDK v3 on other sites or web pages that can share cookies with this webpage. We recommend using the same SDK (v3) version everywhere.")}(e)),n=(t=Ai(n))?JSON.parse(t):null),n}catch(t){return Nn.error(function(e){return"Unable to retrieve the cookie data for ".concat(e,". The data is dropped. This can potentially stem from using SDK v3 on other sites or web pages that can share cookies with this webpage. Please use the same SDK (v3) version everywhere as soon as possible.")}(e),t),null}}},{key:"getUserId",value:function(){return this.getItem(si)}},{key:"getUserTraits",value:function(){return this.getItem(ai)}},{key:"getGroupId",value:function(){return this.getItem(ci)}},{key:"getGroupTraits",value:function(){return this.getItem(li)}},{key:"fetchExternalAnonymousId",value:function(e){var t,n=e.toLowerCase();return Object.keys(mi).includes(n)&&"segment"===n?(ii.enabled&&(t=ii.get(mi[n])),!t&&ei.isSupportAvailable&&(t=ei.get(mi[n])),t):t}},{key:"getAnonymousId",value:function(e){var t=this.getItem(ui);if(t)return t;var n=Mr(e,"autoCapture.source");if(!0===Mr(e,"autoCapture.enabled")&&"string"==typeof n){var r=this.fetchExternalAnonymousId(n);if(r)return r}return t}},{key:"getInitialReferrer",value:function(){return this.getItem(hi)}},{key:"getInitialReferringDomain",value:function(){return this.getItem(fi)}},{key:"getSessionInfo",value:function(){return this.getItem(di)}},{key:"getAuthToken",value:function(){return this.getItem(pi)}},{key:"removeItem",value:function(e){return this.storage.remove(e)}},{key:"removeSessionInfo",value:function(){this.removeItem(di)}},{key:"clear",value:function(e){this.storage.remove(si),this.storage.remove(ai),this.storage.remove(ci),this.storage.remove(li),this.storage.remove(pi),e&&this.storage.remove(ui)}}])}(),Ei=new bi,Si=256,Ci=[];Si--;)Ci[Si]=(Si+256).toString(16).substring(1);for(var Ti,wi=4096,Oi=[],_i=0;_i<256;_i++)Oi[_i]=(_i+256).toString(16).substring(1);function Pi(){var e;(!Ti||_i+16>wi)&&(e=wi,Ti=crypto.getRandomValues(new Uint8Array(e)),_i=0);for(var t,n=0,r="";n<16;n++)t=Ti[_i+n],r+=6==n?Oi[15&t|64]:8==n?Oi[63&t|128]:Oi[t],1&n&&n>1&&n<11&&(r+="-");return _i+=16,r}var Ri={All:"All",GA:"Google Analytics",GOOGLEADS:"Google Ads",BRAZE:"Braze",CHARTBEAT:"Chartbeat",CUSTOMERIO:"Customer IO",DCM_Floodlight:"DCM Floodlight",FACEBOOK_PIXEL:"Facebook Pixel",GTM:"Google Tag Manager",HOTJAR:"Hotjar",HS:"HubSpot",INTERCOM:"Intercom",KEEN:"Keen",KISSMETRICS:"Kiss Metrics",LOTAME:"Lotame",VWO:"VWO",OPTIMIZELY:"Optimizely Web",FULLSTORY:"Fullstory",TVSQUARED:"TVSquared",GA4:"Google Analytics 4 (GA4)",GA4_V2:"Google Analytics 4 (GA4) V2",MOENGAGE:"MoEngage",AM:"Amplitude",PENDO:"Pendo",LYTICS:"Lytics",APPCUES:"Appcues",POSTHOG:"PostHog",PROFITWELL:"ProfitWell",KLAVIYO:"Klaviyo",CLEVERTAP:"CleverTap",BINGADS:"Bing Ads",PINTEREST_TAG:"Pinterest Tag",SNAP_PIXEL:"Snap Pixel",LINKEDIN_INSIGHT_TAG:"Linkedin Insight Tag",REDDIT_PIXEL:"Reddit Pixel",DRIP:"Drip",HEAP:"Heap.io",CRITEO:"Criteo",MP:"Mixpanel",QUALTRICS:"Qualtrics",SENTRY:"Sentry",GOOGLE_OPTIMIZE:"Google Optimize",POST_AFFILIATE_PRO:"Post Affiliate Pro",LAUNCHDARKLY:"LaunchDarkly",GA360:"Google Analytics 360",ADROLL:"Adroll",VERO:"Vero",MATOMO:"Matomo",MOUSEFLOW:"Mouseflow",ROCKERBOX:"Rockerbox",CONVERTFLOW:"ConvertFlow",SNAPENGAGE:"SnapEngage",LIVECHAT:"LiveChat",SHYNET:"Shynet",WOOPRA:"Woopra",ROLLBAR:"RollBar",QUORA_PIXEL:"Quora Pixel",JUNE:"June",ENGAGE:"Engage",ITERABLE:"Iterable",YANDEX_METRICA:"Yandex.Metrica",REFINER:"Refiner",QUALAROO:"Qualaroo",PODSIGHTS:"Podsights",AXEPTIO:"Axeptio",SATISMETER:"Satismeter",MICROSOFT_CLARITY:"Microsoft Clarity",SENDINBLUE:"Sendinblue",OLARK:"Olark",LEMNISK:"Lemnisk",TIKTOK_ADS:"TikTok Ads",ACTIVE_CAMPAIGN:"ActiveCampaign",SPRIG:"Sprig",SPOTIFYPIXEL:"Spotify Pixel",COMMANDBAR:"CommandBar",NINETAILED:"Ninetailed",XPIXEL:"XPixel",GAINSIGHT_PX:"Gainsight PX"},xi=["anonymous_id","id","sent_at","received_at","timestamp","original_timestamp","event_text","event"],Di="https://api.rudderstack.com/sourceConfig/?p=npm&v=2.51.0",Li="v1.1",Mi="js-integrations",Bi="".concat("https://cdn.rudderlabs.com","/").concat(Li,"/").concat(Mi),Ni=["Lax","None","Strict"],Gi=["US","EU"],Fi=["oneTrust","ketch"],Ui=["library","consentManagement"],ji=["none","default","full"],Ki={All:!0};function Hi(e){return null!=e&&e.endsWith("/")?e.replace(/\/+$/,""):e}function Qi(){return window.crypto&&"function"==typeof window.crypto.getRandomValues?Pi():function(){var e,t=0,n="";if(!ki||Si+16>256){for(ki=Array(t=256);t--;)ki[t]=256*Math.random()|0;t=Si=0}for(;t<16;t++)e=ki[Si+t],n+=6==t?Ci[15&e|64]:8==t?Ci[63&e|128]:Ci[e],1&t&&t>1&&t<11&&(n+="-");return Si++,n}()}function zi(){return(new Date).toISOString()}function Vi(e,t){Object.keys(e).forEach((function(n){e.hasOwnProperty(n)&&(t[n]&&(e[t[n]]=e[n]),"All"!==n&&void 0!==t[n]&&t[n]!==n&&delete e[n])}))}function qi(e){Vi(e,Mn)}function Xi(e){Vi(e,Ri)}function Wi(e,t){var n=[];if(!t||0===t.length)return n;var r=!0;void 0!==e.All&&(r=e.All);var i=[];return"string"==typeof t[0]?t.forEach((function(e){i.push({intgName:e,intObj:e})})):"object"===h(t[0])&&t.forEach((function(e){i.push({intgName:e.name,intObj:e})})),i.forEach((function(t){var i=t.intgName,o=t.intObj;if(r){var s=!0;void 0!==e[i]&&!1===Boolean(e[i])&&(s=!1),s&&n.push(o)}else void 0!==e[i]&&!0===Boolean(e[i])&&n.push(o)})),n}var Yi=function(e){return"string"==typeof e||null==e?e:zn(e)},Ji=function(e){return"string"==typeof e&&e.trim().length>0},$i=function(e,t,n){try{var r=e.source.dataplanes||{};if(Object.keys(r).length>0){var i=function(e){var t=e?e.residencyServer:void 0;if(t)return"string"==typeof t&&Gi.includes(t.toUpperCase())?t.toUpperCase():void Nn.error("Invalid residencyServer input")}(n),o=r[i]||r.US;if(o){var s=function(e){if(Array.isArray(e)&&e.length>0){var t=e.find((function(e){return!0===e.default}));if(t&&Ji(t.url))return t.url}}(o);if(s)return s}}if(Ji(t))return t;throw Error("Unable to load the SDK due to invalid data plane url")}catch(e){throw Error(e)}};function Zi(){var e;return(null===(e=document)||void 0===e?void 0:e.referrer)||"$direct"}function eo(e){var t=e.split("/");return t.length>=3?t[2]:""}function to(){for(var e=document.getElementsByTagName("link"),t=0;e[t];t+=1){var n=e[t];if("canonical"===n.getAttribute("rel"))return n.getAttribute("href")}}function no(){var e=to(),t=window.location.pathname;if(e)try{t=new URL(e).pathname}catch(e){}var n=window.location,r=n.search,i=n.href,o=document.title,s=function(e){var t,n=to(),r=(t=n?n.includes("?")?n:n+e:window.location.href).indexOf("#");return r>-1?t.slice(0,r):t}(r),a=i,u=Zi();return{path:t,referrer:u,referring_domain:eo(u),search:r,title:o,url:s,tab_url:a,initial_referrer:Ei.getInitialReferrer()||"",initial_referring_domain:Ei.getInitialReferringDomain()||""}}var ro,io=n((function e(){t(this,e),this.name="RudderLabs JavaScript SDK",this.namespace="com.rudderlabs.javascript",this.version="2.51.0"})),oo=n((function e(){t(this,e),this.name="RudderLabs JavaScript SDK",this.version="2.51.0"})),so=n((function e(){t(this,e),this.name="",this.version=""})),ao=n((function e(){t(this,e),this.density=0,this.width=0,this.height=0,this.innerWidth=0,this.innerHeight=0})),uo=n((function e(){var n,r;t(this,e),this.app=new io,this.traits=null,this.library=new oo,this.userAgent=function(){if("undefined"==typeof navigator)return null;var e=navigator.userAgent,t=navigator.brave;if(t&&Object.getPrototypeOf(t).isBrave){var n=e.match(/(chrome)\/([\w.]+)/i);n&&(e="".concat(e," Brave/").concat(n[2]))}return e}(),this.device=null,this.network=null,this.os=new so,this.locale="undefined"==typeof navigator?null:navigator.language||navigator.browserLanguage,this.screen=(n=new ao,"undefined"==typeof window||(n.width=window.screen.width,n.height=window.screen.height,n.density=window.devicePixelRatio,n.innerWidth=window.innerWidth,n.innerHeight=window.innerHeight),n),this.timezone=null!=(r=/([A-Z]+[+-]\d+)/.exec((new Date).toString()))&&r[1]?r[1]:"NA"})),co=function(){return n((function e(){t(this,e),this.channel="web",this.context=new uo,this.type=null,this.messageId=Qi(),this.originalTimestamp=(new Date).toISOString(),this.anonymousId=null,this.userId=null,this.event=null,this.properties={}}),[{key:"getProperty",value:function(e){return this.properties[e]}},{key:"addProperty",value:function(e,t){this.properties[e]=t}}])}(),lo=function(){return n((function e(){t(this,e),this.message=new co}),[{key:"setType",value:function(e){this.message.type=e}},{key:"setProperty",value:function(e){this.message.properties=e}},{key:"setUserProperty",value:function(e){this.message.user_properties=e}},{key:"setUserId",value:function(e){this.message.userId=e}},{key:"setEventName",value:function(e){this.message.event=e}},{key:"getElementContent",value:function(){return this.message}}])}(),ho=function(){return n((function e(){t(this,e),this.rudderProperty=null,this.rudderUserProperty=null,this.event=null,this.userId=null,this.type=null}),[{key:"setType",value:function(e){return this.type=e,this}},{key:"build",value:function(){var e=new lo;return e.setUserId(this.userId),e.setType(this.type),e.setEventName(this.event),e.setProperty(this.rudderProperty),e.setUserProperty(this.rudderUserProperty),e}}])}(),fo={};function po(){if(ro)return fo;ro=1;for(var e,t=256,n=[];t--;)n[t]=(t+256).toString(16).substring(1);return fo.v4=function(){var r,i=0,o="";if(!e||t+16>256){for(e=Array(i=256);i--;)e[i]=256*Math.random()|0;i=t=0}for(;i<16;i++)r=e[t+i],o+=6==i?n[15&r|64]:8==i?n[63&r|128]:n[r],1&i&&i>1&&i<11&&(o+="-");return t++,o},fo}var go,vo,yo,mo,Io,Ao,ko,bo,Eo,So={};function Co(){if(vo)return go;vo=1;var e=Object.prototype.hasOwnProperty,t=String.prototype.charAt,n=Object.prototype.toString,r=function(e,n){return t.call(e,n)},i=function(t,n){return e.call(t,n)},o=function(e,t){t=t||i;for(var n=[],r=0,o=e.length;r<o;r+=1)t(e,r)&&n.push(String(r));return n};return go=function(e){return null==e?[]:(t=e,"[object String]"===n.call(t)?o(e,r):function(e){return null!=e&&"function"!=typeof e&&"number"==typeof e.length}(e)?o(e,i):function(e,t){t=t||i;var n=[];for(var r in e)t(e,r)&&n.push(String(r));return n}(e));var t}}function To(){if(yo)return So;yo=1;var e=Co(),t=po().v4,n={_data:{},length:0,setItem:function(t,n){return this._data[t]=n,this.length=e(this._data).length,n},getItem:function(e){return e in this._data?this._data[e]:null},removeItem:function(t){return t in this._data&&delete this._data[t],this.length=e(this._data).length,null},clear:function(){this._data={},this.length=0},key:function(t){return e(this._data)[t]}};return So.defaultEngine=function(){try{if(!window.localStorage)return!1;var e=t();window.localStorage.setItem(e,"test_value");var n=window.localStorage.getItem(e);return window.localStorage.removeItem(e),"test_value"===n}catch(e){return!1}}()?window.localStorage:n,So.inMemoryEngine=n,So}function wo(){if(Io)return mo;Io=1;var e=Co(),t=Object.prototype.toString,n="function"==typeof Array.isArray?Array.isArray:function(e){return"[object Array]"===t.call(e)},r=function(e){return null!=e&&(n(e)||"function"!==e&&function(e){var n=h(e);return"number"===n||"object"===n&&"[object Number]"===t.call(e)}(e.length))},i=function(e,t){for(var n=0;n<t.length&&!1!==e(t[n],n,t);n+=1);},o=function(t,n){for(var r=e(n),i=0;i<r.length&&!1!==t(n[r[i]],r[i],n);i+=1);};return mo=function(e,t){return(r(t)?i:o).call(this,e,t)}}function Oo(){if(ko)return Ao;ko=1;var e=To().defaultEngine,t=To().inMemoryEngine,n=wo(),r=Co(),i=JSON;function o(e){try{return JSON.stringify(e,(t=[],function(e,n){if("object"!==h(n)||null===n)return n;for(;t.length>0&&t[t.length-1]!==this;)t.pop();return t.includes(n)?"[Circular Reference]":(t.push(n),n)}))}catch(e){return null}var t}function s(t,n,r,i){this.id=n,this.name=t,this.keys=r||{},this.engine=i||e,this.originalEngine=this.engine}return s.prototype.set=function(e,t){var n=this._createValidKey(e);if(n)try{this.engine.setItem(n,o(t))}catch(n){(function(e){var t=!1;if(e.code)switch(e.code){case 22:t=!0;break;case 1014:"NS_ERROR_DOM_QUOTA_REACHED"===e.name&&(t=!0)}else-2147024882===e.number&&(t=!0);return t})(n)&&(this._swapEngine(),this.set(e,t))}},s.prototype.get=function(e){try{var t=this.engine.getItem(this._createValidKey(e));return null===t?null:i.parse(t)}catch(e){return null}},s.prototype.getOriginalEngine=function(){return this.originalEngine},s.prototype.remove=function(e){this.engine.removeItem(this._createValidKey(e))},s.prototype._createValidKey=function(e){var t,i=this.name,o=this.id;return r(this.keys).length?(n((function(n){n===e&&(t=[i,o,e].join("."))}),this.keys),t):[i,o,e].join(".")},s.prototype._swapEngine=function(){var e=this;n((function(n){var r=e.get(n);t.setItem([e.name,e.id,n].join("."),r),e.remove(n)}),this.keys),this.engine=t},Ao=s}var _o,Po,Ro,xo={exports:{}};function Do(){return _o||(_o=1,function(e){function t(e){if(e)return function(e){for(var n in t.prototype)e[n]=t.prototype[n];return e}(e)}xo.exports=t,t.prototype.on=t.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},t.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var i=0;i<r.length;i++)if((n=r[i])===t||n.fn===t){r.splice(i,1);break}return 0===r.length&&delete this._callbacks["$"+e],this},t.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){r=0;for(var i=(n=n.slice(0)).length;r<i;++r)n[r].apply(this,t)}return this},t.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},t.prototype.hasListeners=function(e){return!!this.listeners(e).length}}()),xo.exports}var Lo=function(){if(Ro)return Po;Ro=1;var e=po().v4,t=Oo(),n=wo(),r=function(){if(Eo)return bo;Eo=1;var e=wo(),t={setTimeout:function(e,t){return window.setTimeout(e,t)},clearTimeout:function(e){return window.clearTimeout(e)},Date:window.Date},n=t,r={ASAP:1,RESCHEDULE:2,ABANDON:3};function i(){this.tasks={},this.nextId=1}return i.prototype.now=function(){return+new n.Date},i.prototype.run=function(e,t,i){var o=this.nextId++;return this.tasks[o]=n.setTimeout(this._handle(o,e,t,i||r.ASAP),t),o},i.prototype.cancel=function(e){this.tasks[e]&&(n.clearTimeout(this.tasks[e]),delete this.tasks[e])},i.prototype.cancelAll=function(){e(n.clearTimeout,this.tasks),this.tasks={}},i.prototype._handle=function(e,t,n,i){var o=this,s=o.now();return function(){if(delete o.tasks[e],!(i>=r.RESCHEDULE&&s+2*n<o.now()))return t();i===r.RESCHEDULE&&o.run(t,n,i)}},i.setClock=function(e){n=e},i.resetClock=function(){n=t},i.Modes=r,bo=i}(),i=Gr()("localstorage-retry");function o(e,t){return function(){return e.apply(t,arguments)}}function s(n,i,s){"function"==typeof i&&(s=i),this.name=n,this.id=e(),this.fn=s,this.maxItems=i.maxItems||1/0,this.maxAttempts=i.maxAttempts||1/0,this.backoff={MIN_RETRY_DELAY:i.minRetryDelay||1e3,MAX_RETRY_DELAY:i.maxRetryDelay||3e4,FACTOR:i.backoffFactor||2,JITTER:i.backoffJitter||0},this.timeouts={ACK_TIMER:1e3,RECLAIM_TIMER:3e3,RECLAIM_TIMEOUT:1e4,RECLAIM_WAIT:500},this.keys={IN_PROGRESS:"inProgress",QUEUE:"queue",RECLAIM_START:"reclaimStart",RECLAIM_END:"reclaimEnd",ACK:"ack"},this._schedule=new r,this._processId=0,this._store=new t(this.name,this.id,this.keys),this._store.set(this.keys.IN_PROGRESS,{}),this._store.set(this.keys.QUEUE,[]),this._ack=o(this._ack,this),this._checkReclaim=o(this._checkReclaim,this),this._processHead=o(this._processHead,this),this._running=!1}return Do()(s.prototype),s.prototype.start=function(){this._running&&this.stop(),this._running=!0,this._ack(),this._checkReclaim(),this._processHead()},s.prototype.stop=function(){this._schedule.cancelAll(),this._running=!1},s.prototype.shouldRetry=function(e,t){return!(t>this.maxAttempts)},s.prototype.getDelay=function(e){var t=this.backoff.MIN_RETRY_DELAY*Math.pow(this.backoff.FACTOR,e);if(this.backoff.JITTER){var n=Math.random(),r=Math.floor(n*this.backoff.JITTER*t);Math.floor(10*n)<5?t-=r:t+=r}return Number(Math.min(t,this.backoff.MAX_RETRY_DELAY).toPrecision(1))},s.prototype.addItem=function(t){this._enqueue({item:t,attemptNumber:0,time:this._schedule.now(),id:e()})},s.prototype.requeue=function(t,n,r,i){this.shouldRetry(t,n,r)?this._enqueue({item:t,attemptNumber:n,time:this._schedule.now()+this.getDelay(n),id:i||e()}):this.emit("discard",t,n)},s.prototype._enqueue=function(e){var t=this._store.get(this.keys.QUEUE)||[];(t=t.slice(-(this.maxItems-1))).push(e),t=t.sort((function(e,t){return e.time-t.time})),this._store.set(this.keys.QUEUE,t),this._running&&this._processHead()},s.prototype._processHead=function(){var t=this,o=this._store;this._schedule.cancel(this._processId);var s=o.get(this.keys.QUEUE)||[],a=o.get(this.keys.IN_PROGRESS)||{},u=this._schedule.now(),c=[];function l(e,n){c.push({item:e.item,done:function(r,i){var s=o.get(t.keys.IN_PROGRESS)||{};delete s[n],o.set(t.keys.IN_PROGRESS,s),t.emit("processed",r,i,e.item),r&&t.requeue(e.item,e.attemptNumber+1,r,e.id)}})}for(var h=Object.keys(a).length;s.length&&s[0].time<=u&&h++<t.maxItems;){var f=s.shift(),d=e();a[d]={item:f.item,attemptNumber:f.attemptNumber,time:t._schedule.now()},l(f,d)}o.set(this.keys.QUEUE,s),o.set(this.keys.IN_PROGRESS,a),n((function(e){try{t.fn(e.item,e.done)}catch(e){i("Process function threw error: "+e)}}),c),s=o.get(this.keys.QUEUE)||[],this._schedule.cancel(this._processId),s.length>0&&(this._processId=this._schedule.run(this._processHead,s[0].time-u,r.Modes.ASAP))},s.prototype._ack=function(){this._store.set(this.keys.ACK,this._schedule.now()),this._store.set(this.keys.RECLAIM_START,null),this._store.set(this.keys.RECLAIM_END,null),this._schedule.run(this._ack,this.timeouts.ACK_TIMER,r.Modes.ASAP)},s.prototype._checkReclaim=function(){var e=this;n((function(t){t.id!==e.id&&(e._schedule.now()-t.get(e.keys.ACK)<e.timeouts.RECLAIM_TIMEOUT||function(t){t.set(e.keys.RECLAIM_START,e.id),t.set(e.keys.ACK,e._schedule.now()),e._schedule.run((function(){t.get(e.keys.RECLAIM_START)===e.id&&(t.set(e.keys.RECLAIM_END,e.id),e._schedule.run((function(){t.get(e.keys.RECLAIM_END)===e.id&&t.get(e.keys.RECLAIM_START)===e.id&&e._reclaim(t.id)}),e.timeouts.RECLAIM_WAIT,r.Modes.ABANDON))}),e.timeouts.RECLAIM_WAIT,r.Modes.ABANDON)}(t))}),function(n){for(var r=[],i=e._store.getOriginalEngine(),o=0;o<i.length;o++){var s=i.key(o);if(null!==s){var a=s.split(".");3===a.length&&a[0]===n&&"ack"===a[2]&&r.push(new t(n,a[1],e.keys))}}return r}(this.name)),this._schedule.run(this._checkReclaim,this.timeouts.RECLAIM_TIMER,r.Modes.RESCHEDULE)},s.prototype._reclaim=function(r){var i=this,o=new t(this.name,r,this.keys),s={queue:this._store.get(this.keys.QUEUE)||[]},a={inProgress:o.get(this.keys.IN_PROGRESS)||{},queue:o.get(this.keys.QUEUE)||[]},u=[],c=function(t,r){n((function(t){var n=t.id||e();u.indexOf(n)>=0?i.emit("duplication",t.item,t.attemptNumber):(s.queue.push({item:t.item,attemptNumber:t.attemptNumber+r,time:i._schedule.now(),id:n}),u.push(n))}),t)};c(a.queue,0),c(a.inProgress,1),s.queue=s.queue.sort((function(e,t){return e.time-t.time})),this._store.set(this.keys.QUEUE,s.queue);try{this._clearOtherQueue(o,1)}catch(e){if("NS_ERROR_STORAGE_BUSY"===e.name||"NS_ERROR_STORAGE_BUSY"===e.code||2153971713===e.code)try{this._clearOtherQueue(o,40)}catch(e){console.error(e)}else console.error(e)}this._processHead()},s.prototype._clearOtherQueue=function(e,t){var n=this;setTimeout((function(){e.remove(n.keys.IN_PROGRESS),setTimeout((function(){e.remove(n.keys.QUEUE),setTimeout((function(){e.remove(n.keys.RECLAIM_START),setTimeout((function(){e.remove(n.keys.RECLAIM_END),setTimeout((function(){e.remove(n.keys.ACK)}),t)}),t)}),t)}),t)}),t)},Po=s}(),Mo=p(Lo),Bo={maxRetryDelay:36e4,minRetryDelay:1e3,backoffFactor:2,maxAttempts:10,maxItems:100},No=function(){return n((function e(){t(this,e),this.url="",this.writeKey=""}),[{key:"init",value:function(e,t,n){var r=this;this.url=t,this.writeKey=e,n&&o(Bo,n),this.payloadQueue=new Mo("rudder",Bo,(function(e,t){e.message.sentAt=zi(),r.processQueueElement(e.url,e.headers,e.message,3e4,(function(e,n){if(e)return t(e);t(null,n)}))})),this.payloadQueue.start()}},{key:"processQueueElement",value:function(e,t,n,r,i){try{var o=new XMLHttpRequest;for(var s in o.open("POST",e,!0),t)o.setRequestHeader(s,t[s]);o.timeout=r,o.ontimeout=i,o.onerror=i,o.onreadystatechange=function(){if(4===o.readyState)if(429===o.status||o.status>=500&&o.status<600){var t="".concat(jn,' "').concat(o.status,'" status text: "').concat(o.statusText,'" for URL: "').concat(e,'"'),n=new Error(t);qn(n),i(n)}else i(null,o.status)};var a=zn(n,!0);a?o.send(a):Nn.error("Invalid payload: Event dropped")}catch(e){i(e)}}},{key:"enqueue",value:function(e,t){var n={"Content-Type":"application/json",Authorization:"Basic ".concat(btoa("".concat(this.writeKey,":"))),AnonymousId:btoa(e.anonymousId)};this.payloadQueue.addItem({url:"".concat(this.url,"/v1/").concat(t),headers:n,message:e})}}])}(),Go="queue",Fo=64e3,Uo=function(){return n((function e(){t(this,e),this.storage=ii,this.maxItems=10,this.flushQueueTimeOut=void 0,this.timeOutActive=!1,this.flushQueueTimeOutInterval=6e5,this.url="",this.writekey="",this.queueName="".concat(Go,".").concat(Date.now())}),[{key:"sendQueueDataForBeacon",value:function(){this.sendDataFromQueueAndDestroyQueue()}},{key:"init",value:function(e,t,n){this.url=t,this.writekey=e,n.maxItems&&(this.maxItems=n.maxItems),n.flushQueueInterval&&(this.flushQueueTimeOutInterval=n.flushQueueInterval),this.sendQueueDataForBeacon=this.sendQueueDataForBeacon.bind(this),this.attachListeners()}},{key:"attachListeners",value:function(){var e=this;window.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e.sendQueueDataForBeacon()}))}},{key:"getQueue",value:function(){return this.storage.get(this.queueName)}},{key:"setQueue",value:function(e){this.storage.set(this.queueName,e)}},{key:"enqueue",value:function(e){var t=this.getQueue()||[];(t=t.slice(-(this.maxItems-1))).push(e);var n=t.slice(0),r={batch:n,sentAt:zi()},i=zn(r,!0);i&&i.length>Fo&&(n=t.slice(0,t.length-1),this.flushQueue(n),(t=this.getQueue()).push(e)),this.setQueue(t),this.setTimer(),t.length===this.maxItems&&this.flushQueue(n)}},{key:"sendDataFromQueueAndDestroyQueue",value:function(){this.sendDataFromQueue(),this.storage.remove(this.queueName)}},{key:"sendDataFromQueue",value:function(){var e=this.getQueue();if(e&&e.length>0){var t=e.slice(0,e.length);this.flushQueue(t)}}},{key:"flushQueue",value:function(e){if(e&&e.length>0){var t=zi();e.forEach((function(e){e.sentAt=t}));var n=zn({batch:e,sentAt:t},!0);if(null!==n){var r=new Blob([n],{type:"text/plain"}),i="".concat(this.url,"?writeKey=").concat(this.writekey);try{"function"!=typeof navigator.sendBeacon&&qn(new Error("Beacon API is not supported by browser")),navigator.sendBeacon(i,r)||qn(new Error("Unable to queue data to browser's beacon queue"))}catch(e){e.message="".concat(e.message," - While sending Beacon data to: ").concat(i),qn(e)}}else Nn.error("Invalid payload: Event dropped")}this.setQueue([]),this.clearTimer()}},{key:"setTimer",value:function(){this.timeOutActive||(this.flushQueueTimeOut=setTimeout(this.sendDataFromQueue.bind(this),this.flushQueueTimeOutInterval),this.timeOutActive=!0)}},{key:"clearTimer",value:function(){this.timeOutActive&&(clearTimeout(this.flushQueueTimeOut),this.timeOutActive=!1)}}])}(),jo=function(){return n((function e(){t(this,e),this.queue=void 0}),[{key:"initialize",value:function(e,t,n){var r={},i=Hi(t);null!=n&&n.useBeacon&&navigator.sendBeacon?(n.beaconQueueOptions&&null!=n.beaconQueueOptions&&"object"===h(n.beaconQueueOptions)&&(r=n.beaconQueueOptions),i="".concat(i,"/beacon/v1/batch"),this.queue=new Uo):(null!=n&&n.useBeacon&&Nn.info("[EventRepository] sendBeacon feature not available in this browser :: fallback to XHR"),null!=n&&n.queueOptions&&null!=n.queueOptions&&"object"===h(n.queueOptions)&&(r=n.queueOptions),this.queue=new No),this.queue.init(e,i,r)}},{key:"enqueue",value:function(e,t){var n=e.getElementContent();n.originalTimestamp=n.originalTimestamp||zi(),n.sentAt=zi();var r=zn(n,!0);r&&r.length>32e3&&Nn.error("[EventRepository] enqueue:: message length greater 32 Kb ",n),this.queue.enqueue(n,t)}}])}(),Ko=new jo,Ho={maxRetryDelay:36e4,minRetryDelay:1e3,backoffFactor:2,maxAttempts:1/0},Qo=function(){return n((function e(){t(this,e),this.callback=void 0,this.processQueueElements=!1}),[{key:"init",value:function(e,t){var n=this;e&&o(Ho,e),t&&(this.callback=t),this.payloadQueue=new Mo("rs_events",Ho,(function(e,t){n.processQueueElement(e.type,e.rudderElement,(function(e,n){if(e)return t(e);t(null,n)}))})),this.payloadQueue.start()}},{key:"activateProcessor",value:function(){this.processQueueElements=!0}},{key:"processQueueElement",value:function(e,t,n){try{this.processQueueElements?(Object.setPrototypeOf(t,lo.prototype),this.callback(e,t),n(null)):n(new Error("The queue elements are not ready to be processed yet"))}catch(e){n(e)}}},{key:"enqueue",value:function(e,t){this.payloadQueue.addItem({type:e,rudderElement:t})}}])}(),zo=function(e){for(var t=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}(),n=~0,r=0;r<e.length;r++)n=n>>>8^t[255&(n^e.charCodeAt(r))];return~n>>>0},Vo={getUserLanguage:function(){return navigator&&navigator.language},getUserAgent:function(){return navigator&&navigator.userAgent}};function qo(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e=e.endsWith("..")?e.substr(0,e.length-2):e,decodeURIComponent(atob(e).split("").map((function(e){return"%".concat("00".concat(e.charCodeAt(0).toString(16)).slice(-2))})).join(""))}var Xo=/^[\w.-]+$/,Wo=1,Yo=1,Jo="*";function $o(e,t,n,r){var i=function(e,t){return[e,(new Date).getTimezoneOffset(),t].join(Jo)}(n,r),o=t||0,s=Math.floor(Date.now()/6e4)-o;return zo([i,s,e].join(Jo)).toString(36)}function Zo(e){var t=function(e){var t=e.split(Jo),n=t.length%2==0;return t.length<4||!n||Number(t.shift())!==Yo?null:{checksum:t.shift(),serializedIds:t.join(Jo)}}(e);if(!t)return null;var n=t.checksum,r=t.serializedIds;return function(e,t){for(var n=Vo.getUserAgent(),r=Vo.getUserLanguage(),i=0;i<=Wo;i+=1)if($o(e,i,n,r)===t)return!0;return!1}(r,n)?function(e){for(var t={},n=e.split(Jo),r=0;r<n.length;r+=2){var i=n[r];if(Xo.test(i)){var o=qo(n[r+1]);t[i]=o}}return t}(r):null}var es=function(){return n((function e(){var n=this;if(t(this,e),i(this,"isInitialized",!1),window.OneTrust&&window.OnetrustActiveGroups){this.userSetConsentGroupIds=window.OnetrustActiveGroups.split(",").filter((function(e){return e}));var r=window.OneTrust.GetDomainData().Groups;this.userSetConsentGroupNames=[],this.userDeniedConsentGroupIds=[],r.forEach((function(e){var t=e.CustomGroupId,r=e.GroupName;n.userSetConsentGroupIds.includes(t)?n.userSetConsentGroupNames.push(r.toUpperCase().trim()):n.userDeniedConsentGroupIds.push(t)})),this.userSetConsentGroupIds=this.userSetConsentGroupIds.map((function(e){return e.toUpperCase()})),this.isInitialized=!0}else Nn.error("OneTrust resources are not accessible.")}),[{key:"isEnabled",value:function(e){var t=this;try{if(!this.isInitialized)return!0;var n=e.oneTrustCookieCategories;if(!n)return!0;var r=n.map((function(e){return e.oneTrustCookieCategory})).filter((function(e){return e}));return r.every((function(e){return t.userSetConsentGroupIds.includes(e.toUpperCase().trim())||t.userSetConsentGroupNames.includes(e.toUpperCase().trim())}))}catch(e){return Nn.error("Error during onetrust cookie consent management ".concat(e)),!0}}},{key:"getDeniedList",value:function(){return this.isInitialized?this.userDeniedConsentGroupIds:[]}}])}(),ts=function(){return n((function e(){var n=this;if(t(this,e),i(this,"updatePurposes",(function(e){e&&Object.entries(e).forEach((function(e){var t=e[0];e[1]?n.userConsentedPurposes.push(t):n.userDeniedPurposes.push(t)}))})),this.userConsentedPurposes=[],this.userDeniedPurposes=[],window.updateKetchConsent=function(e){e&&(n.userConsentedPurposes=[],n.userDeniedPurposes=[],n.updatePurposes(e))},window.getKetchUserConsentedPurposes=function(){return n.userConsentedPurposes.slice()},window.getKetchUserDeniedPurposes=function(){return n.userDeniedPurposes.slice()},window.ketchConsent)this.updatePurposes(window.ketchConsent);else{var r=this.getConsent();this.updatePurposes(r)}}),[{key:"isEnabled",value:function(e){var t=this;try{var n=e.ketchConsentPurposes;if(!n||0===n.length)return!0;var r=n.map((function(e){return e.purpose})).filter((function(e){return e}));return r.some((function(e){return t.userConsentedPurposes.includes(e.trim())}))}catch(e){return Nn.error("Error occured checking ketch consent state ".concat(e)),!0}}},{key:"getDeniedList",value:function(){return this.userDeniedPurposes}},{key:"getConsent",value:function(){var e=ei.get("_ketch_consent_v1_");if(e){var t;try{t=JSON.parse(atob(e))}catch(e){return void Nn.error("Error occurred while parsing consent cookie ".concat(e))}if(t){var n={};return Object.entries(t).forEach((function(e){var t=e[0],r=e[1];null!=r&&r.status&&(n[t]="granted"===r.status)})),n}}}}])}(),ns=function(e){var t,n;return null!=e&&null!==(t=e.oneTrust)&&void 0!==t&&t.enabled?new es:null!=e&&null!==(n=e.ketch)&&void 0!==n&&n.enabled?new ts:null},rs=function(){return n((function e(){t(this,e),this.storage=Ei,this.timeout=18e5,this.sessionInfo=this.storage.getSessionInfo()||{autoTrack:!0}}),[{key:"initialize",value:function(e){try{var t;if(this.sessionInfo.autoTrack=!(!1===(null==e||null===(t=e.sessions)||void 0===t?void 0:t.autoTrack)||this.sessionInfo.manualTrack),null!=e&&e.sessions&&!isNaN(e.sessions.timeout)){var n=e.sessions.timeout;0===n&&(Nn.warn("[Session]:: Provided timeout value 0 will disable the auto session tracking feature."),this.sessionInfo.autoTrack=!1),n>0&&n<1e4&&Nn.warn('[Session]:: It is not advised to set "timeout" less than 10 seconds'),this.timeout=n}this.sessionInfo.autoTrack?this.startAutoTracking():!1!==this.sessionInfo.autoTrack||this.sessionInfo.manualTrack||this.end()}catch(e){qn(e)}}},{key:"isValidSession",value:function(e){return e<=this.sessionInfo.expiresAt}},{key:"generateSessionId",value:function(){return Date.now()}},{key:"startAutoTracking",value:function(){var e=Date.now();this.isValidSession(e)||(this.sessionInfo={},this.sessionInfo.id=e,this.sessionInfo.expiresAt=e+this.timeout,this.sessionInfo.sessionStart=!0,this.sessionInfo.autoTrack=!0),this.storage.setSessionInfo(this.sessionInfo)}},{key:"validateSessionId",value:function(e){if("number"==typeof e&&e%1==0){var t;if(!(((t=e)?t.toString().length:0)<10))return e;Nn.error('[Session]:: "sessionId" should at least be "'.concat(10,'" digits long'))}else Nn.error('[Session]:: "sessionId" should only be a positive integer')}},{key:"start",value:function(e){var t=e?this.validateSessionId(e):this.generateSessionId();this.sessionInfo={id:t||this.generateSessionId(),sessionStart:!0,manualTrack:!0},this.storage.setSessionInfo(this.sessionInfo)}},{key:"getSessionId",value:function(){return this.sessionInfo.autoTrack&&this.isValidSession(Date.now())||this.sessionInfo.manualTrack?this.sessionInfo.id:null}},{key:"end",value:function(){this.sessionInfo={},this.storage.removeSessionInfo()}},{key:"getSessionInfo",value:function(){var e={};if(this.sessionInfo.autoTrack||this.sessionInfo.manualTrack){if(this.sessionInfo.autoTrack){var t=Date.now();this.isValidSession(t)?this.sessionInfo.expiresAt=t+this.timeout:this.startAutoTracking()}this.sessionInfo.sessionStart&&(e.sessionStart=!0,this.sessionInfo.sessionStart=!1),e.sessionId=this.sessionInfo.id,this.storage.setSessionInfo(this.sessionInfo)}return e}},{key:"reset",value:function(){var e=this.sessionInfo,t=e.manualTrack;e.autoTrack?(this.sessionInfo={},this.startAutoTracking()):t&&this.start()}}])}(),is=new rs,os=["integrations","anonymousId","originalTimestamp"],ss=function(e,t,n){var r="";if(n){if(!(r=Hi(n))){var i="CDN base URL for integrations is not valid";throw qn({message:"[Analytics] load:: ".concat(i)}),Error("Failed to load Rudder SDK: ".concat(i))}return r}var o=function(){for(var e,t=document.getElementsByTagName("script"),n=0;n<t.length;n+=1){var r=Hi(t[n].getAttribute("src"));if(r&&r.match(/^.*rudder-analytics?(\.min)?\.js$/)){e=r;break}}return{sdkURL:e}}(),s=o.sdkURL;return r=s?s.split("/").slice(0,-1).concat(Mi).join("/"):Bi,t&&(r=r.replace(Li,e)),r},as="rs-bugsnag",us=["rudder-analytics.min.js","rudder-analytics.js"].concat(c(Object.keys(D).map((function(e){return"".concat(D[e],".min.js")}))),c(Object.keys(D).map((function(e){return"".concat(D[e],".js")})))),cs=function(){return n((function e(n,r,i){t(this,e),this.pluginName=as,this.sourceId=n,this.writeKey=r,this.onClientReady=i,this.initClientOnLibReadyInterval=void 0,this.init()}),[{key:"init",value:function(){var e;null===(e=window.RudderStackGlobals)||void 0===e||e[Hn]}},{key:"initClient",value:function(){var e,t=window.bugsnag;this.client=t({apiKey:"0d96a60df267f4a13f808bbaa54e535c",appVersion:"2.51.0",metaData:{SDK:{name:"JS",installType:"npm"}},beforeSend:this.onError(),autoTrackSessions:!1,collectUserIp:!1,enabledBreadcrumbTypes:["error","log","user"],maxEvents:100,releaseStage:(e=window.location.hostname,e&&["www.test-host.com","localhost","127.0.0.1","[::1]"].includes(e)?"development":"production"),networkBreadcrumbsEnabled:!1,user:{id:this.writeKey}}),this.onClientReady()}},{key:"onError",value:function(){var e=this.sourceId;return function(t){try{return!!function(e){var t=Mr(e,"stacktrace.0.file");if(!t||"string"!=typeof t)return!1;var n=t.substring(t.lastIndexOf("/")+1);return us.includes(n)}(t)&&(function(e,t){e.updateMetaData("source",{metadataSource:t});var n=e.errorMessage;e.context=n,n.includes("error in script loading")&&(e.context="Script load failures"),e.severity="error"}(t,e),!0)}catch(e){return!1}}}},{key:"notify",value:function(e){this.client&&this.client.notify(e)}},{key:"leaveBreadcrumb",value:function(e){this.client&&this.client.leaveBreadcrumb(e)}}])}(),ls=as,hs=[as],fs=function(){return n((function e(n){t(this,e),this.isEnabled=!1,this.providerName=ls,this.provider=void 0,this.logger=n,this.onClientReady=this.onClientReady.bind(this),this.exposeToGlobal=this.exposeToGlobal.bind(this)}),[{key:"init",value:function(e,t,n){e&&t?!0===function(e){return Mr(e,"statsCollection.errors.enabled")||!1}(e)?(this.enable(),this.setProviderName(function(e){return Mr(e,"statsCollection.errors.provider")}(e)),this.initProvider(e,t,n)):this.disable():this.logger.error("[Analytics] ErrorReporting :: Invalid configuration or missing source id provided.")}},{key:"enable",value:function(){this.isEnabled=!0}},{key:"disable",value:function(){this.isEnabled=!1}},{key:"setProviderName",value:function(e){e?!e||hs.includes(e)?this.providerName=e:this.logger.error("[Analytics] ErrorReporting :: Invalid error reporting provider value. Value should be one of: ".concat(hs.join(","))):this.providerName=ls}},{key:"initProvider",value:function(e,t,n){if(this.providerName===as)this.provider=new cs(t,n,this.onClientReady)}},{key:"onClientReady",value:function(){this.exposeToGlobal()}},{key:"exposeToGlobal",value:function(){window.RudderStackGlobals||(window.RudderStackGlobals={}),window.RudderStackGlobals[Hn]=this}},{key:"leaveBreadcrumb",value:function(e){if(this.provider)try{this.provider.leaveBreadcrumb(e)}catch(e){this.logger.error("[Analytics] ErrorReporting :: leaveBreadcrumb method ".concat(e.toString()))}}},{key:"notify",value:function(e){if(this.provider)try{this.provider.notify(e)}catch(e){this.logger.error("[Analytics] ErrorReporting :: notify method ".concat(e.toString()))}}}])}(),ds=new(function(){return n((function e(){t(this,e),this.retryAttempt=3,this.queue=[],this.isTransformationProcessing=!1,this.authToken=null}),[{key:"init",value:function(e,t,n){this.dataPlaneUrl=Hi(t),this.writeKey=e,this.authToken=n||this.authToken,this.start()}},{key:"enqueue",value:function(e,t,n){this.queue.push({event:e,destinationIds:t,cb:n})}},{key:"sendEventForTransformation",value:function(e,t){var n=this;return new Promise((function(r,i){var o="".concat(n.dataPlaneUrl,"/transform"),s={"Content-Type":"application/json",Authorization:"Basic ".concat(btoa("".concat(n.writeKey,":")))};try{var a=new XMLHttpRequest;a.open("POST",o,!0),Object.keys(s).forEach((function(e){return a.setRequestHeader(e,s[e])})),a.timeout=1e4,a.onreadystatechange=function(){if(4===a.readyState)try{var o=a.status,s=a.response;switch(o){case 200:return s=JSON.parse(s),void r({status:o,transformedPayload:s.transformedBatch});case 400:var u=s?"".concat(s):"Invalid request payload";return void r({status:o,errorMessage:u});case 404:return void r({status:o});default:if(t>0){var c=t-1;setTimeout((function(){return n.sendEventForTransformation(e,c).then(r).catch(i)}),500*Math.pow(2,n.retryAttempt-c))}else r({status:o,errorMessage:"Retries exhausted"})}}catch(e){i(e)}};var u=zn(e,!0);u?a.send(u):Nn.error("Invalid payload: Event dropped")}catch(e){i(e)}}))}},{key:"checkQueueLengthAndProcess",value:function(){this.queue.length>0&&this.process()}},{key:"process",value:function(){var e=this;this.isTransformationProcessing=!0;var t,n,r=this.queue.shift(),i=(t=r.event,n=r.destinationIds,{metadata:{"Custom-Authorization":this.authToken},batch:[{orderNo:Date.now(),destinationIds:n,event:t.message}]});this.sendEventForTransformation(i,this.retryAttempt).then((function(t){e.isTransformationProcessing=!1,r.cb(t),e.checkQueueLengthAndProcess()})).catch((function(t){qn("string"==typeof t?t:t.message),e.isTransformationProcessing=!1,r.cb({status:0}),e.checkQueueLengthAndProcess()}))}},{key:"start",value:function(){var e=this;setInterval((function(){e.isTransformationProcessing||e.checkQueueLengthAndProcess()}),100)}},{key:"setAuthToken",value:function(e){this.authToken=e}}])}()),ps=function(){return n((function e(){t(this,e),this.initialized=!1,this.clientIntegrations=[],this.loadOnlyIntegrations={},this.clientIntegrationObjects=void 0,this.successfullyLoadedIntegration=[],this.failedToBeLoadedIntegration=[],this.toBeProcessedArray=[],this.toBeProcessedByIntegrationArray=[],this.storage=Ei,this.eventRepository=Ko,this.preProcessQueue=new Qo,this.sendAdblockPage=!1,this.sendAdblockPageOptions={},this.clientSuppliedCallbacks={},this.readyCallbacks=[],this.methodToCallbackMapping={syncPixel:"syncPixelCallback"},this.loaded=!1,this.loadIntegration=!0,this.bufferDataPlaneEventsUntilReady=!1,this.dataPlaneEventsBufferTimeout=1e4,this.integrationsData={},this.dynamicallyLoadedIntegrations={},this.destSDKBaseURL=Bi,this.cookieConsentOptions={},this.logLevel=void 0,this.clientIntegrationsReady=!1,this.uSession=is,this.version="2.51.0",this.lockIntegrationsVersion=!1,this.errorReporting=new fs(Nn),this.deniedConsentIds=[],this.transformationHandler=ds}),[{key:"initializeUser",value:function(e){this.userId=this.storage.getUserId()||"",this.storage.setUserId(this.userId),this.userTraits={};var t=this.storage.getUserTraits();null===t||"object"!==h(t)||Array.isArray(t)||(this.userTraits=t),this.storage.setUserTraits(this.userTraits),this.groupId=this.storage.getGroupId()||"",this.storage.setGroupId(this.groupId),this.groupTraits={};var n=this.storage.getGroupTraits();null===n||"object"!==h(n)||Array.isArray(n)||(this.groupTraits=n),this.storage.setGroupTraits(this.groupTraits),this.anonymousId=this.getAnonymousId(e),this.storage.setAnonymousId(this.anonymousId)}},{key:"setInitialPageProperties",value:function(){if(null==this.storage.getInitialReferrer()&&null==this.storage.getInitialReferringDomain()){var e=Zi();this.storage.setInitialReferrer(e),this.storage.setInitialReferringDomain(eo(e))}}},{key:"allModulesInitialized",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Promise((function(n){e.clientIntegrations.every((function(t){return null!=e.dynamicallyLoadedIntegrations["".concat(D[t.name]).concat("_RS")]}))||t>=2e4?n(e):e.pause(Fn).then((function(){return e.allModulesInitialized(t+Fn).then(n)}))}))}},{key:"executeReadyCallback",value:function(){this.readyCallbacks.forEach((function(e){return e()}))}},{key:"integrationSDKLoaded",value:function(e,t){var n;return(null===(n=window[e])||void 0===n||null===(n=n[t])||void 0===n?void 0:n.prototype)&&void 0!==window[e][t].prototype.constructor}},{key:"processResponse",value:function(e,t){var n,r=this;try{var i=t;try{if("string"==typeof t&&(i=JSON.parse(t)),!i||"object"!==h(i)||Array.isArray(i))return void Nn.error("Invalid source configuration")}catch(e){return void qn(e)}try{null!==(n=window.chrome)&&void 0!==n&&null!==(n=n.runtime)&&void 0!==n&&n.id||this.errorReporting.init(i.source.config,i.source.id,this.writeKey)}catch(e){qn(e)}if(this.serverUrl=$i(i,this.serverUrl,this.options),this.eventRepository.initialize(this.writeKey,this.serverUrl,this.options),this.transformationHandler.init(this.writeKey,this.serverUrl,this.storage.getAuthToken()),i.source.destinations.forEach((function(e){e.enabled&&this.clientIntegrations.push({name:e.destinationDefinition.name,config:e.config,destinationInfo:{shouldApplyDeviceModeTransformation:e.shouldApplyDeviceModeTransformation||!1,propagateEventsUntransformedOnError:e.propagateEventsUntransformedOnError||!1,destinationId:e.id}})}),this),this.clientIntegrations=Wi(this.loadOnlyIntegrations,this.clientIntegrations),Object.keys(this.cookieConsentOptions).length>0)try{var o=ns(this.cookieConsentOptions);this.deniedConsentIds=null==o?void 0:o.getDeniedList(),this.clientIntegrations=this.clientIntegrations.filter((function(e){return!o||o&&o.isEnabled(e.config)}))}catch(e){qn(e)}this.loaded=!0,this.options&&"function"==typeof this.options.onLoaded&&this.options.onLoaded(this),function(e){if(e.toBeProcessedArray.length>0)for(;e.toBeProcessedArray.length>0;){var t=c(e.toBeProcessedArray[0]);e.toBeProcessedArray.shift();var n=t[0];t.shift(),e[n].apply(e,c(t))}}(this),this.clientIntegrations=this.clientIntegrations.filter((function(e){return!!D[e.name]||(Nn.error("[Analytics] Integration:: ".concat(e.name," not available for initialization")),!1)})),this.bufferDataPlaneEventsUntilReady&&setTimeout((function(){r.processBufferedCloudModeEvents()}),this.dataPlaneEventsBufferTimeout),this.errorReporting.leaveBreadcrumb("Starting device-mode initialization"),this.clientIntegrations.forEach((function(e){var t=D[e.name],n="".concat(t).concat("_RS"),i="".concat(r.destSDKBaseURL,"/").concat(t,".min.js");window.hasOwnProperty(n)||function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{if(document.getElementById(e))return;var r=document.createElement("script");r.src=t,r.async=void 0===n.async||n.async,r.type="text/javascript",r.id=e,!0!==n.skipDatasetAttributes&&(r.setAttribute("data-loader",Un),void 0!==n.isNonNativeSDK&&r.setAttribute("data-isNonNativeSDK",n.isNonNativeSDK));var i=document.getElementsByTagName("head");if(i.length>0)i[0].insertBefore(r,i[0].firstChild);else{var o=document.getElementsByTagName("script")[0];o.parentNode.insertBefore(r,o)}}catch(o){qn(o)}}(n,i,{isNonNativeSDK:!0});var o=r,s=setInterval((function(){if(o.integrationSDKLoaded(n,t)){var i,a=window[n];clearInterval(s);try{var u="[Analytics] processResponse :: trying to initialize integration name:: ".concat(n);r.errorReporting.leaveBreadcrumb(u),(i=new a[t](e.config,o,e.destinationInfo)).init(),o.isInitialized(i).then((function(){o.dynamicallyLoadedIntegrations[n]=a[t]}))}catch(e){var c="[Analytics] 'integration.init()' failed :: ".concat(n," :: ").concat(e.message);qn(e,c),o.failedToBeLoadedIntegration.push(i)}}}),100);setTimeout((function(){clearInterval(s)}),Gn)}));var s=this;this.allModulesInitialized().then((function(){if(!s.clientIntegrations||0===s.clientIntegrations.length)return r.clientIntegrationsReady=!0,r.executeReadyCallback(),void(r.toBeProcessedByIntegrationArray=[]);s.replayEvents(s)}))}catch(e){qn(e)}}},{key:"sendDataToDestination",value:function(e,t,n){try{if(e[n]){var r=_(t);e[n](r)}}catch(t){var i="[sendToNative]:: [Destination: ".concat(e.name,"]:: ");qn(t,i)}}},{key:"sendTransformedDataToDestination",value:function(e,t,n){var r=this;try{Xi(t.message.integrations);var i=e.map((function(e){return e.destinationId}));this.transformationHandler.enqueue(t,i,(function(i){var o=i.status,s=i.transformedPayload,a=i.errorMessage;e.forEach((function(e){try{switch(o){case 200:var i=s.find((function(t){return t.id===e.destinationId})),u=[];null==i||i.payload.forEach((function(n){if("200"===n.status)u.push(n);else{var r='[DMT]:: Event transformation unsuccessful for destination "'.concat(e.name,'". Reason: '),i="Unknown";"410"===n.status&&(i="Transformation is not available");var o="Dropping the event",s=Nn.error;!0===e.propagateEventsUntransformedOnError&&(o="Sending untransformed event to the destination",s=Nn.warn,u.push({event:t.message})),s("".concat(r," ").concat(i,". ").concat(o,"."))}})),null==u||u.forEach((function(t){Zr(t.event)&&r.sendDataToDestination(e,{message:t.event},n)}));break;case 404:Nn.warn("[DMT]:: Transformation server access is denied. The configuration data seems to be out of sync. Sending untransformed event to the destination."),r.sendDataToDestination(e,t,n);break;default:!0===e.propagateEventsUntransformedOnError?(Nn.warn("[DMT]::[Destination: ".concat(e.name,"] :: Transformation request failed with status: ").concat(o," ").concat(a,". Sending untransformed event.")),r.sendDataToDestination(e,t,n)):Nn.error("[DMT]::[Destination: ".concat(e.name,"] :: Transformation request failed with status: ").concat(o," ").concat(a,". Dropping the event."))}}catch(t){t instanceof Error&&(t.message="[DMT]::[Destination:".concat(e.name,"]:: ").concat(t.message)),qn(t)}}))}))}catch(e){e instanceof Error&&(e.message="[DMT]:: ".concat(e.message)),qn(e)}}},{key:"processAndSendEventsToDeviceMode",value:function(e,t,n){var r=this,i=[],o=[];e.forEach((function(e){try{!r.IsEventBlackListed(t.message.event,e.name)&&(e.shouldApplyDeviceModeTransformation?o.push(e):i.push(e))}catch(e){qn(e)}})),i.forEach((function(e){r.sendDataToDestination(e,t,n)})),o.length>0&&this.sendTransformedDataToDestination(o,t,n)}},{key:"queueEventForDataPlane",value:function(e,t){var n=t.message.integrations||{All:!0};t.message.integrations=function(e,t){var n=_(e),r=Object.keys(t).filter((function(e){return!(!0===t[e]&&n[e])})).reduce((function(e,n){return e[n]=t[n],e}),{});return $r(n,r)}(this.integrationsData,n),this.eventRepository.enqueue(t,e)}},{key:"processBufferedCloudModeEvents",value:function(){this.bufferDataPlaneEventsUntilReady&&this.preProcessQueue.activateProcessor()}},{key:"replayEvents",value:function(e){var t,n,r,i=this;this.errorReporting.leaveBreadcrumb("Started replaying buffered events"),e.clientIntegrationObjects=[],e.clientIntegrationObjects=e.successfullyLoadedIntegration;try{e.clientIntegrationObjects.every((function(e){return!e.isReady||e.isReady()}))&&(this.integrationsData=(t=this.integrationsData,n=e.clientIntegrationObjects,r=_(t),n.forEach((function(e){if(e.getDataForIntegrationsObject)try{r=$r(r,e.getDataForIntegrationsObject())}catch(e){Nn.debug("[Analytics: prepareDataForIntegrationsObj]",e)}})),r),e.clientIntegrationsReady=!0,e.executeReadyCallback())}catch(e){qn(e,"Replay buffered cloud mode events")}this.processBufferedCloudModeEvents(),e.toBeProcessedByIntegrationArray.forEach((function(t){var n=t[0];t.shift(),Object.keys(t[0].message.integrations).length>0&&qi(t[0].message.integrations);var r=Wi(t[0].message.integrations,e.clientIntegrationObjects);i.processAndSendEventsToDeviceMode(r,t[0],n)})),e.toBeProcessedByIntegrationArray=[]}},{key:"pause",value:function(e){return new Promise((function(t){setTimeout(t,e)}))}},{key:"isInitialized",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return new Promise((function(r){e.isLoaded()?(t.successfullyLoadedIntegration.push(e),r(t)):n>=Gn?(t.failedToBeLoadedIntegration.push(e),r(t)):t.pause(Fn).then((function(){return t.isInitialized(e,n+Fn).then(r)}))}))}},{key:"page",value:function(e,t,n,r,i){if(this.errorReporting.leaveBreadcrumb("Page event"),this.loaded){"function"==typeof r&&(i=r,r=null),"function"==typeof n&&(i=n,r=n=null),"function"==typeof t&&(i=t,r=n=t=null),"function"==typeof e&&(i=e,r=n=t=e=null),"object"===h(e)&&null!=e&&null!=e&&(r=t,n=e,t=e=null),"object"===h(t)&&null!=t&&null!=t&&(r=n,n=t,t=null),"string"==typeof e&&"string"!=typeof t&&(t=e,e=null),this.sendAdblockPage&&"RudderJS-Initiated"!==e&&this.sendSampleRequest();var o=_(n),s=_(r),a=(new ho).setType("page").build();o||(o={}),t&&(a.message.name=o.name=t),e&&(a.message.category=o.category=e),a.message.properties=this.getPageProperties(o),this.processAndSendDataToDestinations("page",a,s,i)}else this.toBeProcessedArray.push(["page"].concat(Array.prototype.slice.call(arguments)))}},{key:"track",value:function(e,t,n,r){if(this.errorReporting.leaveBreadcrumb("Track event"),this.loaded){"function"==typeof n&&(r=n,n=null),"function"==typeof t&&(r=t,n=null,t=null);var i=_(t),o=_(n),s=(new ho).setType("track").build();e&&s.setEventName(e),s.setProperty(i||{}),this.processAndSendDataToDestinations("track",s,o,r)}else this.toBeProcessedArray.push(["track"].concat(Array.prototype.slice.call(arguments)))}},{key:"identify",value:function(e,t,n,r){if(this.errorReporting.leaveBreadcrumb("Identify event"),this.loaded){"function"==typeof n&&(r=n,n=null),"function"==typeof t&&(r=t,n=null,t=null),"object"===h(e)&&(n=t,t=e,e=this.userId);var i=Yi(e);i&&this.userId&&i!==this.userId&&this.reset(),this.userId=i,this.storage.setUserId(this.userId);var o=_(t),s=_(n);if(o){for(var a in o)this.userTraits[a]=o[a];this.storage.setUserTraits(this.userTraits)}var u=(new ho).setType("identify").build();this.processAndSendDataToDestinations("identify",u,s,r)}else this.toBeProcessedArray.push(["identify"].concat(Array.prototype.slice.call(arguments)))}},{key:"alias",value:function(e,t,n,r){if(this.errorReporting.leaveBreadcrumb("Alias event"),this.loaded){"function"==typeof n&&(r=n,n=null),"function"==typeof t&&(r=t,n=null,t=null),"function"==typeof e&&(r=e,n=null,t=null,e=null),"object"===h(t)&&(n=t,t=null),"object"===h(e)&&(n=e,t=null,e=null);var i=(new ho).setType("alias").build();i.message.previousId=Yi(t)||(this.userId?this.userId:this.getAnonymousId()),i.message.userId=Yi(e);var o=_(n);this.processAndSendDataToDestinations("alias",i,o,r)}else this.toBeProcessedArray.push(["alias"].concat(Array.prototype.slice.call(arguments)))}},{key:"group",value:function(e,t,n,r){if(this.errorReporting.leaveBreadcrumb("Group event"),this.loaded){if(0!==arguments.length){"function"==typeof n&&(r=n,n=null),"function"==typeof t&&(r=t,n=null,t=null),"object"===h(e)&&(n=t,t=e,e=this.groupId),"function"==typeof e&&(r=e,n=null,t=null,e=this.groupId),this.groupId=Yi(e),this.storage.setGroupId(this.groupId);var i=_(t),o=_(n),s=(new ho).setType("group").build();if(i)for(var a in i)this.groupTraits[a]=i[a];else this.groupTraits={};this.storage.setGroupTraits(this.groupTraits),this.processAndSendDataToDestinations("group",s,o,r)}}else this.toBeProcessedArray.push(["group"].concat(Array.prototype.slice.call(arguments)))}},{key:"IsEventBlackListed",value:function(e,t){if(!e||"string"!=typeof e)return!1;var n=Mn[t],r=this.clientIntegrations.find((function(e){return e.name===n})).config,i=r.blacklistedEvents,o=r.whitelistedEvents,s=r.eventFilteringOption;if(!s)return!1;var a=e.trim().toUpperCase();switch(s){case"disable":default:return!1;case"blacklistedEvents":return!!Array.isArray(i)&&i.some((function(e){return e.eventName.trim().toUpperCase()===a}));case"whitelistedEvents":return!Array.isArray(o)||!o.some((function(e){return e.eventName.trim().toUpperCase()===a}))}}},{key:"shouldUseGlobalIntegrationsConfigInEvents",value:function(){return this.useGlobalIntegrationsConfigInEvents&&this.loadOnlyIntegrations&&Object.keys(this.loadOnlyIntegrations).length>0}},{key:"processAndSendDataToDestinations",value:function(e,t,n,r){try{this.anonymousId||this.setAnonymousId(),this.errorReporting.leaveBreadcrumb("Started sending data to destinations"),t.message.context.traits=a({},this.userTraits),t.message.anonymousId=this.anonymousId,t.message.userId=t.message.userId?t.message.userId:this.userId,"group"==e&&(this.groupId&&(t.message.groupId=this.groupId),this.groupTraits&&(t.message.traits=a({},this.groupTraits)));try{var i=this.uSession.getSessionInfo(),o=i.sessionId,s=i.sessionStart;t.message.context.sessionId=o,s&&(t.message.context.sessionStart=!0)}catch(e){qn(e)}h=this.cookieConsentOptions,f=!1,Object.keys(h).forEach((function(e){Fi.includes(e)&&"boolean"==typeof h[e].enabled&&!0===h[e].enabled&&(f=!0)})),f&&(t.message.context.consentManagement={deniedConsentIds:this.deniedConsentIds||[]}),this.processOptionsParam(t,n),function(e,t){var n=e.properties,r=e.traits,i=e.context;n&&Object.keys(n).forEach((function(e){xi.indexOf(e.toLowerCase())>=0&&Nn.error("Warning! : Reserved keyword used in properties--\x3e ".concat(e," with ").concat(t," call"))})),r&&Object.keys(r).forEach((function(e){xi.indexOf(e.toLowerCase())>=0&&Nn.error("Warning! : Reserved keyword used in traits--\x3e ".concat(e," with ").concat(t," call"))}));var o=i.traits;o&&Object.keys(o).forEach((function(e){xi.indexOf(e.toLowerCase())>=0&&Nn.error("Warning! : Reserved keyword used in traits --\x3e ".concat(e," with ").concat(t," call"))}))}(t.message,e);var u=t.message.integrations;u?qi(u):u=this.shouldUseGlobalIntegrationsConfigInEvents()?this.loadOnlyIntegrations:Ki,t.message.integrations=u;try{t.message.context["ua-ch"]=this.uach}catch(e){qn(e)}try{if(this.clientIntegrationObjects){var c=Wi(u,this.clientIntegrationObjects);this.processAndSendEventsToDeviceMode(c,t,e)}else this.toBeProcessedByIntegrationArray.push([e,t])}catch(e){qn(e,"processAndSendEventsToDeviceMode::")}var l=_(t);Xi(l.message.integrations),!this.bufferDataPlaneEventsUntilReady||this.clientIntegrationObjects?this.queueEventForDataPlane(e,l):this.preProcessQueue.enqueue(e,l),r&&"function"==typeof r&&r(l)}catch(e){qn(e)}var h,f}},{key:"utm",value:function(e){var t={};try{var n=new URL(e),r="utm_";n.searchParams.forEach((function(e,n){if(n.startsWith(r)){var i=n.substring(4);"campaign"===i&&(i="name"),t[i]=e}}))}catch(e){}return t}},{key:"addCampaignInfo",value:function(e){var t=e.message.context;t&&"object"===h(t)&&(e.message.context.campaign=this.utm(window.location.href))}},{key:"processOptionsParam",value:function(e,t){var n=e.message,r=n.type,o=n.properties;this.addCampaignInfo(e),e.message.context.page=this.getContextPageProperties("page"===r?o:void 0),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"object"===h(t)&&null!==t&&Object.keys(t).forEach((function(n){os.includes(n)&&(e[n]=t[n])}))}(e.message,t),e.message.context=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.context;return"object"!==h(t)||null===t||Object.keys(t).forEach((function(e){if(!os.includes(e)&&!Ui.includes(e))if("context"!==e)n=$r(n,i({},e,t[e]));else if("object"===h(t[e])&&null!==t[e]){var r={};Object.keys(t[e]).forEach((function(n){Ui.includes(n)||(r[n]=t[e][n])})),n=$r(n,a({},r))}else Nn.error("[Analytics: processOptionsParam] context passed in options ".concat(e," is not object."))})),n}(e.message,t)}},{key:"getPageProperties",value:function(e,t){var n=no(),r=(null==t?void 0:t.page)||{};for(var i in n)void 0===e[i]&&(e[i]=r[i]||n[i]);return e}},{key:"getContextPageProperties",value:function(e){var t=no(),n={};for(var r in t)n[r]=null!=e&&e[r]?e[r]:t[r];return n}},{key:"reset",value:function(e){this.errorReporting.leaveBreadcrumb("reset API :: flag: ".concat(e)),this.loaded?(e&&(this.anonymousId=""),this.userId="",this.userTraits={},this.groupId="",this.groupTraits={},this.uSession.reset(),this.storage.clear(e)):this.toBeProcessedArray.push(["reset",e])}},{key:"getAnonymousId",value:function(e){return this.anonymousId=this.storage.getAnonymousId(e),this.anonymousId||this.setAnonymousId(),this.anonymousId}},{key:"getUserId",value:function(){return this.userId}},{key:"getSessionId",value:function(){return this.uSession.getSessionId()}},{key:"getUserTraits",value:function(){return this.userTraits}},{key:"getGroupId",value:function(){return this.groupId}},{key:"getGroupTraits",value:function(){return this.groupTraits}},{key:"setAnonymousId",value:function(e,t){var n=t?Zo(t):null,r=n?n.rs_amp_id:null;this.anonymousId=e||r||Qi(),this.storage.setAnonymousId(this.anonymousId)}},{key:"isValidWriteKey",value:function(e){return e&&"string"==typeof e&&e.trim().length>0}},{key:"isValidServerUrl",value:function(e){return e&&"string"==typeof e&&e.trim().length>0}},{key:"isDatasetAvailable",value:function(){var e=document.createElement("div");return e.setAttribute("data-a-b","c"),!!e.dataset&&"c"===e.dataset.aB}},{key:"loadAfterPolyfill",value:function(e,t,n){var r,i,s,u,c,l,f,d,p,g,v,y=this;if("object"===h(t)&&null!==t&&(n=t,t=null),null!==(r=n)&&void 0!==r&&r.logLevel&&(this.logLevel=n.logLevel,Nn.setLogLevel(n.logLevel)),!this.isValidWriteKey(e))throw Error("Unable to load the SDK due to invalid writeKey");if(!this.storage||0===Object.keys(this.storage).length)throw Error("Cannot proceed as no storage is available");null!==(i=n)&&void 0!==i&&i.cookieConsentManager&&(this.cookieConsentOptions=n.cookieConsentManager),this.writeKey=e,this.serverUrl=t,this.options=n;var m={};if(null!==(s=n)&&void 0!==s&&s.setCookieDomain&&(m=a(a({},m),{},{domain:n.setCookieDomain})),n&&"boolean"==typeof n.secureCookie&&(m=a(a({},m),{},{secure:n.secureCookie})),n&&"boolean"==typeof n.sameDomainCookiesOnly&&(m=a(a({},m),{},{sameDomainCookiesOnly:n.sameDomainCookiesOnly})),n&&-1!==Ni.indexOf(n.sameSiteCookie)&&(m=a(a({},m),{},{samesite:n.sameSiteCookie})),this.storage.options(m),n&&"string"==typeof n.uaChTrackLevel&&ji.includes(n.uaChTrackLevel)&&(this.uaChTrackLevel=n.uaChTrackLevel),navigator.userAgentData&&function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"none";"none"===t&&e(void 0),"default"===t&&e(navigator.userAgentData),"full"===t&&navigator.userAgentData.getHighEntropyValues(["architecture","bitness","brands","mobile","model","platform","platformVersion","uaFullVersion","fullVersionList","wow64"]).then((function(t){e(t)}))}((function(e){y.uach=e}),this.uaChTrackLevel),null!==(u=n)&&void 0!==u&&u.integrations&&(o(this.loadOnlyIntegrations,n.integrations),qi(this.loadOnlyIntegrations)),this.useGlobalIntegrationsConfigInEvents=n&&!0===n.useGlobalIntegrationsConfigInEvents,null!==(c=n)&&void 0!==c&&c.sendAdblockPage&&(this.sendAdblockPage=!0),null!==(l=n)&&void 0!==l&&l.sendAdblockPageOptions&&"object"===h(n.sendAdblockPageOptions)&&(this.sendAdblockPageOptions=n.sendAdblockPageOptions),this.uSession.initialize(n),null!==(f=n)&&void 0!==f&&f.clientSuppliedCallbacks){var I={};Object.keys(this.methodToCallbackMapping).forEach((function(e){y.methodToCallbackMapping.hasOwnProperty(e)&&n.clientSuppliedCallbacks[y.methodToCallbackMapping[e]]&&(I[e]=n.clientSuppliedCallbacks[y.methodToCallbackMapping[e]])})),o(this.clientSuppliedCallbacks,I),this.registerCallbacks(!0)}if(null!=(null===(d=n)||void 0===d?void 0:d.loadIntegration)&&(this.loadIntegration=!!n.loadIntegration),n&&"boolean"==typeof n.bufferDataPlaneEventsUntilReady&&(this.bufferDataPlaneEventsUntilReady=!0===n.bufferDataPlaneEventsUntilReady,this.bufferDataPlaneEventsUntilReady&&this.preProcessQueue.init(this.options,this.queueEventForDataPlane.bind(this))),n&&"number"==typeof n.dataPlaneEventsBufferTimeout&&(this.dataPlaneEventsBufferTimeout=n.dataPlaneEventsBufferTimeout),n&&void 0!==n.lockIntegrationsVersion&&(this.lockIntegrationsVersion=!0===n.lockIntegrationsVersion),this.initializeUser(n?n.anonymousIdOptions:void 0),this.setInitialPageProperties(),this.destSDKBaseURL=ss(this.version,this.lockIntegrationsVersion,null===(p=n)||void 0===p?void 0:p.destSDKBaseURL),null!==(g=n)&&void 0!==g&&g.getSourceConfig)if("function"!=typeof n.getSourceConfig)qn(new Error('option "getSourceConfig" must be a function'));else{var A=n.getSourceConfig();A instanceof Promise?A.then((function(e){return y.processResponse(200,e)})).catch(qn):this.processResponse(200,A)}else{var k=function(e,t){var n=Di,r=[];return e&&r.push("writeKey=".concat(e)),t&&r.push("lockIntegrationsVersion=".concat(t)),r.length>0&&(n=(n=Di.concat(Di.includes("?")?"&":"?")).concat(r.join("&"))),n}(e,this.lockIntegrationsVersion);null!==(v=n)&&void 0!==v&&v.configUrl&&(k=function(e,t){var n=e;-1===n.indexOf("sourceConfig")&&(n="".concat(Hi(n),"/sourceConfig/")),n="/"===n.slice(-1)?n:"".concat(n,"/");var r=t.split("?")[1],i=n.split("?");return i.length>1&&i[1]!==r?"".concat(i[0],"?").concat(r):"".concat(n,"?").concat(r)}(n.configUrl,k));try{!function(e,t,n,r){var i=r.bind(e),o=new XMLHttpRequest;o.open("GET",t,!0),o.setRequestHeader("Authorization","Basic ".concat(btoa("".concat(n,":")))),o.onload=function(){var e=o.status,n=o.responseText;200===e?i(200,n):(qn(new Error("".concat(jn," ").concat(e," for url: ").concat(t))),i(e))},o.send()}(this,k,e,this.processResponse)}catch(e){qn(e)}}}},{key:"arePolyfillsRequired",value:function(e){return(!e||"boolean"!=typeof e.polyfillIfRequired||e.polyfillIfRequired)&&(!String.prototype.endsWith||!String.prototype.startsWith||!String.prototype.includes||!Array.prototype.find||!Array.prototype.includes||"function"!=typeof window.URL||"undefined"==typeof Promise||!Object.entries||!Object.values||!String.prototype.replaceAll||!this.isDatasetAvailable()||"function"!=typeof TextDecoder||"function"!=typeof TextEncoder)}},{key:"load",value:function(e,t,n){if(!this.loaded){var r=_(n);this.arePolyfillsRequired(r),this.loadAfterPolyfill(e,t,r)}}},{key:"ready",value:function(e){this.loaded?"function"!=typeof e?Nn.error("ready callback is not a function"):this.clientIntegrationsReady?e():this.readyCallbacks.push(e):this.toBeProcessedArray.push(["ready",e])}},{key:"initializeCallbacks",value:function(){var e=this;Object.keys(this.methodToCallbackMapping).forEach((function(t){e.methodToCallbackMapping.hasOwnProperty(t)&&e.on(t,(function(){}))}))}},{key:"registerCallbacks",value:function(e){var t=this;e||Object.keys(this.methodToCallbackMapping).forEach((function(e){t.methodToCallbackMapping.hasOwnProperty(e)&&window.rudderanalytics&&"function"==typeof window.rudderanalytics[t.methodToCallbackMapping[e]]&&(t.clientSuppliedCallbacks[e]=window.rudderanalytics[t.methodToCallbackMapping[e]])})),Object.keys(this.clientSuppliedCallbacks).forEach((function(e){t.clientSuppliedCallbacks.hasOwnProperty(e)&&t.on(e,t.clientSuppliedCallbacks[e])}))}},{key:"sendSampleRequest",value:function(){}},{key:"startSession",value:function(e){this.uSession.start(e)}},{key:"endSession",value:function(){this.uSession.end()}},{key:"setAuthToken",value:function(e){"string"==typeof e?(this.storage.setAuthToken(e),this.transformationHandler.setAuthToken(e)):Nn.error("Provided input should be in string format")}}])}(),gs=new ps;I(gs),window.addEventListener("error",(function(e){qn(e,void 0,gs)}),!0),gs.initializeCallbacks(),gs.registerCallbacks(!1);var vs,ys="load",ms=window.rudderanalytics,Is=Array.isArray(ms);if(Is)for(var As=0;As<ms.length;){if(ms[As]&&ms[As][0]===ys){vs=ms[As],ms.splice(As,1);break}As+=1}!function(e){var t="ajs_trait_",n="ajs_prop_";function r(e,t){var n={};return Object.keys(e).forEach((function(r){r.startsWith(t)&&(n[r.substr(t.length)]=e[r])})),n}var i=function(e){var t={};try{new URL(e).searchParams.forEach((function(e,n){t[n]=e}))}catch(e){}return t}(e);i.ajs_aid&&gs.toBeProcessedArray.push(["setAnonymousId",i.ajs_aid]),i.ajs_uid&&gs.toBeProcessedArray.push(["identify",i.ajs_uid,r(i,t)]),i.ajs_event&&gs.toBeProcessedArray.push(["track",i.ajs_event,r(i,n)])}(window.location.href),Is&&ms.forEach((function(e){return gs.toBeProcessedArray.push(e)})),vs&&vs.length>0&&(vs.shift(),gs[ys].apply(gs,c(vs)));var ks=gs.ready.bind(gs),bs=gs.identify.bind(gs),Es=gs.page.bind(gs),Ss=gs.track.bind(gs),Cs=gs.alias.bind(gs),Ts=gs.group.bind(gs),ws=gs.reset.bind(gs),Os=gs.load.bind(gs),_s=gs.initialized=!0,Ps=gs.getUserId.bind(gs),Rs=gs.getSessionId.bind(gs),xs=gs.getUserTraits.bind(gs),Ds=gs.getAnonymousId.bind(gs),Ls=gs.setAnonymousId.bind(gs),Ms=gs.getGroupId.bind(gs),Bs=gs.getGroupTraits.bind(gs),Ns=gs.startSession.bind(gs),Gs=gs.endSession.bind(gs),Fs=gs.setAuthToken.bind(gs);Nn.error("This RudderStack JavaScript SDK package is deprecated and no longer maintained. While your events are still being tracked and delivered, we strongly recommend you to migrate to the latest [@rudderstack/analytics-js](https://www.npmjs.com/package/@rudderstack/analytics-js) package for enhanced features, security updates, and ongoing support. For more details, visit the migration guide: https://www.rudderstack.com/docs/sources/event-streams/sdks/rudderstack-javascript-sdk/migration-guide/."),exports.alias=Cs,exports.endSession=Gs,exports.getAnonymousId=Ds,exports.getGroupId=Ms,exports.getGroupTraits=Bs,exports.getSessionId=Rs,exports.getUserId=Ps,exports.getUserTraits=xs,exports.group=Ts,exports.identify=bs,exports.initialized=_s,exports.load=Os,exports.page=Es,exports.ready=ks,exports.reset=ws,exports.setAnonymousId=Ls,exports.setAuthToken=Fs,exports.startSession=Ns,exports.track=Ss;
|
1
|
+
"use strict";function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,l(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function r(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=h(e))||t){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function i(e,t,n){return(t=l(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o.apply(null,arguments)}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,s,a=[],u=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t);else for(;!(u=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}}(e,t)||h(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t){return function(t){if(Array.isArray(t))return e(t)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||h(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function h(t,n){if(t){if("string"==typeof t)return e(t,n);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(t,n):void 0}}var d="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function p(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function g(e){return e&&Object.prototype.hasOwnProperty.call(e,"default")&&1===Object.keys(e).length?e.default:e}var v,y={exports:{}};function m(){return v||(v=1,function(e){function t(e){if(e)return function(e){return o(e,t.prototype),e._callbacks=new Map,e}(e);this._callbacks=new Map}t.prototype.on=function(e,t){var n,r=null!==(n=this._callbacks.get(e))&&void 0!==n?n:[];return r.push(t),this._callbacks.set(e,r),this},t.prototype.once=function(e,t){var n=this,r=function(){n.off(e,r);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];t.apply(n,o)};return r.fn=t,this.on(e,r),this},t.prototype.off=function(e,t){if(void 0===e&&void 0===t)return this._callbacks.clear(),this;if(void 0===t)return this._callbacks.delete(e),this;var n=this._callbacks.get(e);if(n){var i,o=r(n.entries());try{for(o.s();!(i=o.n()).done;){var s=u(i.value,2),a=s[0],c=s[1];if(c===t||c.fn===t){n.splice(a,1);break}}}catch(e){o.e(e)}finally{o.f()}0===n.length?this._callbacks.delete(e):this._callbacks.set(e,n)}return this},t.prototype.emit=function(e){var t=this._callbacks.get(e);if(t){for(var n=c(t),i=arguments.length,o=new Array(i>1?i-1:0),s=1;s<i;s++)o[s-1]=arguments[s];var a,u=r(n);try{for(u.s();!(a=u.n()).done;){a.value.apply(this,o)}}catch(e){u.e(e)}finally{u.f()}}return this},t.prototype.listeners=function(e){var t;return null!==(t=this._callbacks.get(e))&&void 0!==t?t:[]},t.prototype.listenerCount=function(e){if(e)return this.listeners(e).length;var t,n=0,i=r(this._callbacks.values());try{for(i.s();!(t=i.n()).done;){n+=t.value.length}}catch(e){i.e(e)}finally{i.f()}return n},t.prototype.hasListeners=function(e){return this.listenerCount(e)>0},t.prototype.addEventListener=t.prototype.on,t.prototype.removeListener=t.prototype.off,t.prototype.removeEventListener=t.prototype.off,t.prototype.removeAllListeners=t.prototype.off,e.exports=t}(y)),y.exports}var A=p(m());function b(e){return null!=e&&"object"===f(e)&&!0===e["@@functional/placeholder"]}function k(e){return function t(n){return 0===arguments.length||b(n)?t:e.apply(this,arguments)}}function I(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return b(n)?t:k((function(t){return e(n,t)}));default:return b(n)&&b(r)?t:b(n)?k((function(t){return e(t,r)})):b(r)?k((function(t){return e(n,t)})):e(n,r)}}}function E(e){return function t(n,r,i){switch(arguments.length){case 0:return t;case 1:return b(n)?t:I((function(t,r){return e(n,t,r)}));case 2:return b(n)&&b(r)?t:b(n)?I((function(t,n){return e(t,r,n)})):b(r)?I((function(t,r){return e(n,t,r)})):k((function(t){return e(n,r,t)}));default:return b(n)&&b(r)&&b(i)?t:b(n)&&b(r)?I((function(t,n){return e(t,n,i)})):b(n)&&b(i)?I((function(t,n){return e(t,r,n)})):b(r)&&b(i)?I((function(t,r){return e(n,t,r)})):b(n)?k((function(t){return e(t,r,i)})):b(r)?k((function(t){return e(n,t,i)})):b(i)?k((function(t){return e(n,r,t)})):e(n,r,i)}}}function S(e,t){return Object.prototype.hasOwnProperty.call(t,e)}var w=k((function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}));function T(e){return"[object Object]"===Object.prototype.toString.call(e)}function O(e,t,n){if(n||(n=new _),function(e){var t=f(e);return null==e||"object"!=t&&"function"!=t}(e))return e;var r,i=function(t){var r=n.get(e);if(r)return r;for(var i in n.set(e,t),e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=O(e[i],!0,n));return t};switch(w(e)){case"Object":return i(Object.create(Object.getPrototypeOf(e)));case"Array":return i(Array(e.length));case"Date":return new Date(e.valueOf());case"RegExp":return r=e,new RegExp(r.source,r.flags?r.flags:(r.global?"g":"")+(r.ignoreCase?"i":"")+(r.multiline?"m":"")+(r.sticky?"y":"")+(r.unicode?"u":"")+(r.dotAll?"s":""));case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":return e.slice();default:return e}}var _=function(){function e(){this.map={},this.length=0}return e.prototype.set=function(e,t){var n=this.hash(e),r=this.map[n];r||(this.map[n]=r=[]),r.push([e,t]),this.length+=1},e.prototype.hash=function(e){var t=[];for(var n in e)t.push(Object.prototype.toString.call(e[n]));return t.join()},e.prototype.get=function(e){if(this.length<=180)for(var t in this.map)for(var n=this.map[t],r=0;r<n.length;r+=1){if((o=n[r])[0]===e)return o[1]}else{var i=this.hash(e);if(n=this.map[i])for(r=0;r<n.length;r+=1){var o;if((o=n[r])[0]===e)return o[1]}}},e}(),P=k((function(e){return null!=e&&"function"==typeof e.clone?e.clone():O(e)})),R=E((function(e,t,n){var r,i={};for(r in n=n||{},t=t||{})S(r,t)&&(i[r]=S(r,n)?e(r,t[r],n[r]):t[r]);for(r in n)S(r,n)&&!S(r,i)&&(i[r]=n[r]);return i})),C=E((function e(t,n,r){return R((function(n,r,i){return T(r)&&T(i)?e(t,r,i):t(n,r,i)}),n,r)})),x=E((function(e,t,n){return C((function(t,n,r){return e(n,r)}),t,n)})),D={HS:"HubSpot",GA:"GA",HOTJAR:"Hotjar",GOOGLEADS:"GoogleAds",VWO:"VWO",GTM:"GoogleTagManager",BRAZE:"Braze",INTERCOM:"INTERCOM",KEEN:"Keen",KISSMETRICS:"Kissmetrics",CUSTOMERIO:"CustomerIO",CHARTBEAT:"Chartbeat",FACEBOOK_PIXEL:"FacebookPixel",LOTAME:"Lotame",OPTIMIZELY:"Optimizely",BUGSNAG:"Bugsnag",FULLSTORY:"Fullstory",TVSQUARED:"TVSquared",GA4:"GA4",GA4_V2:"GA4_V2",MOENGAGE:"MoEngage",AM:"Amplitude",PENDO:"Pendo",LYTICS:"Lytics",APPCUES:"Appcues",POSTHOG:"Posthog",KLAVIYO:"Klaviyo",CLEVERTAP:"Clevertap",BINGADS:"BingAds",PINTEREST_TAG:"PinterestTag",ADOBE_ANALYTICS:"AdobeAnalytics",LINKEDIN_INSIGHT_TAG:"LinkedInInsightTag",REDDIT_PIXEL:"RedditPixel",DRIP:"Drip",HEAP:"Heap",CRITEO:"Criteo",MP:"Mixpanel",QUALTRICS:"Qualtrics",PROFITWELL:"ProfitWell",SENTRY:"Sentry",QUANTUMMETRIC:"QuantumMetric",SNAP_PIXEL:"SnapPixel",POST_AFFILIATE_PRO:"PostAffiliatePro",GOOGLE_OPTIMIZE:"GoogleOptimize",LAUNCHDARKLY:"LaunchDarkly",GA360:"GA360",ADROLL:"Adroll",DCM_FLOODLIGHT:"DCMFloodlight",MATOMO:"Matomo",VERO:"Vero",MOUSEFLOW:"Mouseflow",ROCKERBOX:"Rockerbox",CONVERTFLOW:"ConvertFlow",SNAPENGAGE:"SnapEngage",LIVECHAT:"LiveChat",SHYNET:"Shynet",WOOPRA:"Woopra",ROLLBAR:"RollBar",QUORA_PIXEL:"QuoraPixel",JUNE:"June",ENGAGE:"Engage",ITERABLE:"Iterable",YANDEX_METRICA:"YandexMetrica",REFINER:"Refiner",QUALAROO:"Qualaroo",PODSIGHTS:"Podsights",AXEPTIO:"Axeptio",SATISMETER:"Satismeter",MICROSOFT_CLARITY:"MicrosoftClarity",SENDINBLUE:"Sendinblue",OLARK:"Olark",LEMNISK:"Lemnisk",TIKTOK_ADS:"TiktokAds",ACTIVE_CAMPAIGN:"ActiveCampaign",SPRIG:"Sprig",SPOTIFYPIXEL:"SpotifyPixel",COMMANDBAR:"CommandBar",NINETAILED:"Ninetailed",XPIXEL:"XPixel",GAINSIGHT_PX:"Gainsight_PX"},L="ACTIVE_CAMPAIGN",M="ADOBE_ANALYTICS",N="ADROLL",B="AM",G="APPCUES",U="AXEPTIO",j="BINGADS",F="BRAZE",z="BUGSNAG",K="CHARTBEAT",H="CLEVERTAP",Q="COMMANDBAR",V="CONVERTFLOW",q="CRITEO",X="CUSTOMERIO",W="DCM_FLOODLIGHT",Y="DRIP",J="ENGAGE",$="FACEBOOK_PIXEL",Z="FULLSTORY",ee="GA",te="GA360",ne="GA4",re="GA4_V2",ie="GAINSIGHT_PX",oe="GOOGLE_OPTIMIZE",se="GOOGLEADS",ae="GTM",ue="HEAP",ce="HOTJAR",le="HS",fe="INTERCOM",he="ITERABLE",de="JUNE",pe="KEEN",ge="KISSMETRICS",ve="KLAVIYO",ye="LAUNCHDARKLY",me="LEMNISK",Ae="LINKEDIN_INSIGHT_TAG",be="LIVECHAT",ke="LOTAME",Ie="LYTICS",Ee="MATOMO",Se="MICROSOFT_CLARITY",we="MOENGAGE",Te="MOUSEFLOW",Oe="MP",_e="NINETAILED",Pe="OLARK",Re="OPTIMIZELY",Ce="PENDO",xe="PINTEREST_TAG",De="PODSIGHTS",Le="POST_AFFILIATE_PRO",Me="POSTHOG",Ne="PROFITWELL",Be="QUALAROO",Ge="QUALTRICS",Ue="QUANTUMMETRIC",je="QUORA_PIXEL",Fe="REDDIT_PIXEL",ze="REFINER",Ke="ROCKERBOX",He="ROLLBAR",Qe="SATISMETER",Ve="SENDINBLUE",qe="SENTRY",Xe="SHYNET",We="SNAP_PIXEL",Ye="SNAPENGAGE",Je="SPOTIFYPIXEL",$e="SPRIG",Ze="TIKTOK_ADS",et="TVSQUARED",tt="VERO",nt="VWO",rt="WOOPRA",it="XPIXEL",ot="YANDEX_METRICA";i({},"Adobe Analytics","AdobeAnalytics");var st=i(i(i(i(i(i({"Adobe Analytics":M,ADOBEANALYTICS:M,"ADOBE ANALYTICS":M},M,M),"AdobeAnalytics",M),"adobeanalytics",M),"adobe analytics",M),"Adobe analytics",M),"adobe Analytics",M);i({},"Amplitude","Amplitude");var at=i(i(i(i({},B,B),"AMPLITUDE",B),"Amplitude",B),"am",B);i({},"Appcues","Appcues");var ut=i(i(i(i({},G,G),"Appcues",G),"App Cues",G),"appcues",G);i({},"Bing Ads","BingAds");var ct=i(i(i(i(i(i(i({},j,j),"BingAds",j),"bingads",j),"Bing Ads",j),"Bing ads",j),"bing Ads",j),"bing ads",j);i({},"Braze","Braze");var lt=i(i(i({},F,F),"Braze",F),"braze",F);i({},"Bugsnag","Bugsnag");var ft=i(i(i({},z,z),"bugsnag",z),"Bugsnag",z);i({},"Chartbeat","Chartbeat");var ht=i(i(i(i(i({},K,K),"Chartbeat",K),"chartbeat",K),"Chart Beat",K),"chart beat",K);i({},"CleverTap","Clevertap");var dt=i(i(i({},H,H),"Clevertap",H),"clevertap",H);i({},"Criteo","Criteo");var pt=i(i(i({},q,q),"Criteo",q),"criteo",q);i({},"Customer IO","CustomerIO");var gt=i(i(i(i(i({},X,X),"Customerio",X),"Customer.io",X),"CUSTOMER.IO",X),"customer.io",X);i({},"Drip","Drip");var vt=i(i(i({},Y,Y),"Drip",Y),"drip",Y);i({},"Facebook Pixel","FacebookPixel");var yt=i(i(i(i(i(i(i({},$,$),"FB Pixel",$),"Facebook Pixel",$),"facebook pixel",$),"fbpixel",$),"FBPIXEL",$),"FB_PIXEL",$);i({},"Fullstory","Fullstory");var mt=i(i(i(i(i(i(i(i({},Z,Z),"Fullstory",Z),"FullStory",Z),"full Story",Z),"Full Story",Z),"Full story",Z),"full story",Z),"fullstory",Z);i({},"Google Analytics","GA");var At=i(i(i(i(i({},ee,ee),"Google Analytics",ee),"GoogleAnalytics",ee),"GOOGLE ANALYTICS",ee),"google analytics",ee);i({},"Google Analytics 4 (GA4)","GA4");var bt=i(i(i(i(i(i(i(i(i(i({},ne,ne),"Google Analytics 4",ne),"Google analytics 4",ne),"google analytics 4",ne),"Google Analytics4",ne),"Google analytics4",ne),"google analytics4",ne),"Google Analytics 4 (GA4)",ne),"google analytics 4 (ga4)",ne),"GoogleAnalytics4",ne);i({},"Google Analytics 4 (GA4) V2","GA4_V2");var kt=i(i(i(i(i(i(i(i(i(i({},re,re),"Google Analytics 4 V2",re),"Google analytics 4 V2",re),"google analytics 4 V2",re),"Google Analytics4 V2",re),"Google analytics4 V2",re),"google analytics4 V2",re),"Google Analytics 4 (GA4) V2",re),"google analytics 4 (ga4) V2",re),"GoogleAnalytics4V2",re);i({},"Google Ads","GoogleAds");var It=i(i(i(i(i(i({},se,se),"Google Ads",se),"GoogleAds",se),"GOOGLE ADS",se),"google ads",se),"googleads",se);i({},"Google Optimize","GoogleOptimize");var Et=i(i(i(i(i(i(i(i({},oe,oe),"Google Optimize",oe),"GoogleOptimize",oe),"Googleoptimize",oe),"GOOGLEOPTIMIZE",oe),"google optimize",oe),"Google optimize",oe),"GOOGLE OPTIMIZE",oe);i({},"Google Tag Manager","GoogleTagManager");var St=i(i(i(i(i({},ae,ae),"Google Tag Manager",ae),"google tag manager",ae),"googletag manager",ae),"googletagmanager",ae);i({},"Heap.io","Heap");var wt=i(i(i(i({},ue,ue),"Heap",ue),"heap",ue),"Heap.io",ue);i({},"Hotjar","Hotjar");var Tt=i(i(i(i(i({},ce,ce),"Hotjar",ce),"hotjar",ce),"Hot Jar",ce),"hot jar",ce);i({},"HubSpot","HubSpot");var Ot=i(i(i(i(i(i({},le,le),"Hubspot",le),"HUBSPOT",le),"hub spot",le),"Hub Spot",le),"Hub spot",le);i({},"Intercom","INTERCOM");var _t=i(i(i({},fe,fe),"Intercom",fe),"intercom",fe);i({},"Keen","Keen");var Pt=i(i(i(i(i({},pe,pe),"Keen",pe),"Keen.io",pe),"keen",pe),"keen.io",pe);i({},"Kiss Metrics","Kissmetrics");var Rt=i(i(i({},ge,ge),"Kissmetrics",ge),"kissmetrics",ge);i({},"Klaviyo","Klaviyo");var Ct=i(i(i({},ve,ve),"Klaviyo",ve),"klaviyo",ve);i({},"LaunchDarkly","LaunchDarkly");var xt,Dt=i(i(i(i(i(i({},ye,ye),"LaunchDarkly",ye),"Launch_Darkly",ye),"Launch Darkly",ye),"launchDarkly",ye),"launch darkly",ye);i({},"Linkedin Insight Tag","LinkedInInsightTag");var Lt=(i(i(i(i(i(i(i(i(i(i(xt={},Ae,Ae),"LinkedIn Insight Tag",Ae),"LinkedIn insight tag",Ae),"linkedIn insight tag",Ae),"Linkedin_insight_tag",Ae),"LinkedinInsighttag",Ae),"LinkedinInsightTag",Ae),"LinkedInInsightTag",Ae),"Linkedininsighttag",Ae),"LINKEDININSIGHTTAG",Ae),i(xt,"linkedininsighttag",Ae));i({},"Lotame","Lotame");var Mt=i(i(i({},ke,ke),"Lotame",ke),"lotame",ke);i({},"Lytics","Lytics");var Nt=i(i(i({},Ie,Ie),"Lytics",Ie),"lytics",Ie);i({},"Mixpanel","Mixpanel");var Bt=i(i(i(i(i(i({},Oe,Oe),"MIXPANEL",Oe),"Mixpanel",Oe),"MIX PANEL",Oe),"Mix panel",Oe),"Mix Panel",Oe);i({},"MoEngage","MoEngage");var Gt=i(i(i(i(i(i(i({},we,we),"MoEngage",we),"moengage",we),"Moengage",we),"Mo Engage",we),"mo engage",we),"Mo engage",we);i({},"Optimizely Web","Optimizely");var Ut=i(i(i({},Re,Re),"Optimizely",Re),"optimizely",Re);i({},"Pendo","Pendo");var jt,Ft=i(i(i({},Ce,Ce),"Pendo",Ce),"pendo",Ce);i({},"Pinterest Tag","PinterestTag");var zt=(i(i(i(i(i(i(i(i(i(i(jt={},xe,xe),"PinterestTag",xe),"Pinterest_Tag",xe),"PINTERESTTAG",xe),"pinterest",xe),"PinterestAds",xe),"Pinterest_Ads",xe),"Pinterest",xe),"Pinterest Tag",xe),"Pinterest tag",xe),i(i(i(i(jt,"PINTEREST TAG",xe),"pinterest tag",xe),"Pinterest Ads",xe),"Pinterest ads",xe));i({},"Post Affiliate Pro","PostAffiliatePro");var Kt=i(i(i(i(i(i(i(i({},Le,Le),"PostAffiliatePro",Le),"Post_affiliate_pro",Le),"Post Affiliate Pro",Le),"Post affiliate pro",Le),"post affiliate pro",Le),"postaffiliatepro",Le),"POSTAFFILIATEPRO",Le);i({},"PostHog","Posthog");var Ht=i(i(i(i(i(i(i({},Me,Me),"PostHog",Me),"Posthog",Me),"posthog",Me),"Post Hog",Me),"Post hog",Me),"post hog",Me);i({},"ProfitWell","ProfitWell");var Qt=i(i(i(i(i(i(i({},Ne,Ne),"ProfitWell",Ne),"profitwell",Ne),"Profitwell",Ne),"Profit Well",Ne),"profit well",Ne),"Profit well",Ne);i({},"Qualtrics","Qualtrics");var Vt=i(i(i({},Ge,Ge),"Qualtrics",Ge),"qualtrics",Ge);i({},"Quantum Metric","QuantumMetric");var qt=i(i(i(i(i(i(i(i({},Ue,Ue),"Quantum Metric",Ue),"quantum Metric",Ue),"quantum metric",Ue),"QuantumMetric",Ue),"quantumMetric",Ue),"quantummetric",Ue),"Quantum_Metric",Ue);i({},"Reddit Pixel","RedditPixel");var Xt=i(i(i(i(i(i(i(i({},Fe,Fe),"Reddit_Pixel",Fe),"RedditPixel",Fe),"REDDITPIXEL",Fe),"redditpixel",Fe),"Reddit Pixel",Fe),"REDDIT PIXEL",Fe),"reddit pixel",Fe);i({},"Sentry","Sentry");var Wt=i(i(i({},qe,qe),"sentry",qe),"Sentry",qe);i({},"Snap Pixel","SnapPixel");var Yt=i(i(i(i(i(i(i(i({},We,We),"Snap_Pixel",We),"SnapPixel",We),"SNAPPIXEL",We),"snappixel",We),"Snap Pixel",We),"SNAP PIXEL",We),"snap pixel",We);i({},"TVSquared","TVSquared");var Jt=i(i(i(i(i(i(i(i(i({},et,et),"TVSquared",et),"tvsquared",et),"tvSquared",et),"TvSquared",et),"Tvsquared",et),"TV Squared",et),"tv squared",et),"tv Squared",et);i({},"VWO","VWO");var $t=i(i(i(i(i(i(i(i({},nt,nt),"VisualWebsiteOptimizer",nt),"Visualwebsiteoptimizer",nt),"visualwebsiteoptimizer",nt),"vwo",nt),"Visual Website Optimizer",nt),"Visual website optimizer",nt),"visual website optimizer",nt);i({},"Google Analytics 360","GA360");var Zt=i(i(i(i(i(i(i(i(i({},te,te),"Google Analytics 360",te),"Google analytics 360",te),"google analytics 360",te),"Google Analytics360",te),"Google analytics360",te),"google analytics360",te),"GoogleAnalytics360",te),"GA 360",te);i({},"Adroll","Adroll");var en=i(i(i(i(i({},N,N),"Adroll",N),"Ad roll",N),"ad roll",N),"adroll",N);i({},"DCM Floodlight","DCMFloodlight");var tn=i(i(i(i(i(i(i(i(i({},W,W),"DCM Floodlight",W),"dcm floodlight",W),"Dcm Floodlight",W),"DCMFloodlight",W),"dcmfloodlight",W),"DcmFloodlight",W),"dcm_floodlight",W),"DCM_Floodlight",W);i({},"Matomo","Matomo");var nn=i(i(i({},Ee,Ee),"Matomo",Ee),"matomo",Ee);i({},"Vero","Vero");var rn=i(i(i({},tt,tt),"Vero",tt),"vero",tt);i({},"Mouseflow","Mouseflow");var on=i(i(i(i(i(i(i(i(i({},Te,Te),"Mouseflow",Te),"mouseflow",Te),"mouseFlow",Te),"MouseFlow",Te),"Mouse flow",Te),"mouse flow",Te),"mouse Flow",Te),"Mouse Flow",Te);i({},"Rockerbox","Rockerbox");var sn=i(i(i(i(i(i(i({},Ke,Ke),"Rockerbox",Ke),"rockerbox",Ke),"RockerBox",Ke),"Rocker box",Ke),"rocker box",Ke),"Rocker Box",Ke);i({},"Convertflow","ConvertFlow");var an=i(i(i(i(i(i(i(i(i(i({},V,V),"Convertflow",V),"convertflow",V),"convertFlow",V),"ConvertFlow",V),"Convert flow",V),"convert flow",V),"convert Flow",V),"Convert Flow",V),"CONVERT FLOW",V);i({},"SnapEngage","SnapEngage");var un=i(i(i(i(i(i(i({},Ye,Ye),"SnapEngage",Ye),"Snap_Engage",Ye),"snapengage",Ye),"SNAP ENGAGE",Ye),"Snap Engage",Ye),"snap engage",Ye);i({},"livechat","LiveChat");var cn=i(i(i(i(i(i(i({},be,be),"LiveChat",be),"Live_Chat",be),"livechat",be),"LIVE CHAT",be),"Live Chat",be),"live chat",be);i({},"Shynet","Shynet");var ln=i(i(i(i(i(i(i(i(i({},Xe,Xe),"shynet",Xe),"ShyNet",Xe),"shyNet",Xe),"Shynet",Xe),"shy net",Xe),"Shy Net",Xe),"shy Net",Xe),"Shy net",Xe);i({},"WOOPRA","Woopra");var fn=i(i(i({},rt,rt),"Woopra",rt),"woopra",rt);i({},"rollbar","RollBar");var hn=i(i(i(i(i(i(i(i({},He,He),"RollBar",He),"Roll_Bar",He),"rollbar",He),"Rollbar",He),"ROLL BAR",He),"Roll Bar",He),"roll bar",He);i({},"Quora Pixel","QuoraPixel");var dn=i(i(i(i(i(i(i(i(i(i({},je,je),"Quora Pixel",je),"Quora pixel",je),"QUORA PIXEL",je),"QuoraPixel",je),"Quorapixel",je),"QUORAPIXEL",je),"Quora_Pixel",je),"quora_pixel",je),"Quora",je);i({},"JUNE","June");var pn=i(i(i({},de,de),"June",de),"june",de);i({},"Engage","Engage");var gn=i(i(i({},J,J),"Engage",J),"engage",J);i({},"Iterable","Iterable");var vn=i(i(i({},he,he),"Iterable",he),"iterable",he);i({},"Yandex.Metrica","YandexMetrica");var yn=i(i(i(i(i({},ot,ot),"Yandexmetrica",ot),"yandexmetrica",ot),"yandexMetrica",ot),"YandexMetrica",ot);i({},"Refiner","Refiner");var mn=i(i(i({},ze,ze),"Refiner",ze),"refiner",ze);i({},"Qualaroo","Qualaroo");var An=i(i(i({},Be,Be),"Qualaroo",Be),"qualaroo",Be);i({},"Podsights","Podsights");var bn=i(i(i(i(i(i(i(i({},De,De),"Podsights",De),"PodSights",De),"pod Sights",De),"Pod Sights",De),"pod sights",De),"POD SIGHTS",De),"Pod sights",De);i({},"Axeptio","Axeptio");var kn=i(i(i({},U,U),"Axeptio",U),"axeptio",U);i({},"SatisMeter","Satismeter");var In=i(i(i({},Qe,Qe),"Satismeter",Qe),"SatisMeter",Qe);i({},"Microsoft Clarity","MicrosoftClarity");var En=i(i(i(i(i(i(i(i(i({},Se,Se),"Microsoft Clarity",Se),"Microsoft clarity",Se),"microsoft clarity",Se),"Microsoft_clarity",Se),"MicrosoftClarity",Se),"MICROSOFTCLARITY",Se),"microsoftclarity",Se),"microsoftClarity",Se);i({},"Sendinblue","Sendinblue");var Sn=i(i(i(i({},Ve,Ve),"Sendinblue",Ve),"sendinblue",Ve),"SendinBlue",Ve);i({},"Olark","Olark");var wn=i(i(i({},Pe,Pe),"Olark",Pe),"olark",Pe);i({},"Lemnisk Marketing Automation","Lemnisk");var Tn=i(i(i(i(i(i(i(i({},me,me),"LEMNISK_MARKETING_AUTOMATION",me),"Lemnisk Marketing Automation",me),"LemniskMarketingAutomation",me),"lemniskmarketingautomation",me),"lemniskMarketingAutomation",me),"lemnisk",me),"Lemnisk",me);i({},"TikTok Ads","TiktokAds");var On=i(i(i(i(i(i(i({},Ze,Ze),"TiktokAds",Ze),"Tiktok ads",Ze),"Tiktok Ads",Ze),"Tik Tok Ads",Ze),"tik tok ads",Ze),"tiktokads",Ze);i({},"ActiveCampaign","ActiveCampaign");var _n=i(i(i(i(i(i({ActiveCampaign:L,"Active Campaign":L,"ACTIVE CAMPAIGN":L},L,L),"activecampaign",L),"active campaign",L),"Active campaign",L),"active Campaign",L),"active_campaign",L);i({},"Sprig","Sprig");var Pn=i(i(i({},$e,$e),"Sprig",$e),"sprig",$e);i({},"Spotify Pixel","SpotifyPixel");var Rn=i(i(i(i({},Je,Je),"Spotify Pixel",Je),"spotify pixel",Je),"SPOTIFY_PIXEL",Je);i({},"CommandBar","CommandBar");var Cn=i(i(i(i(i({},Q,Q),"Command Bar",Q),"Commandbar",Q),"COMMAND_BAR",Q),"commandbar",Q);i({},"Ninetailed","Ninetailed");var xn=i(i(i(i({},_e,_e),"Ninetailed",_e),"ninetailed",_e),"NineTailed",_e);i({},"XPixel","XPixel");var Dn=i(i(i(i(i({},it,it),"XPixel",it),"Xpixel",it),"xpixel",it),"xPixel",it);i({},"Gainsight PX","Gainsight_PX");var Ln=i(i({},ie,ie),"Gainsight_PX",ie),Mn=a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a({All:"All"},st),at),ut),ct),lt),ft),Cn),ht),dt),pt),gt),vt),yt),mt),At),bt),kt),Zt),It),Et),St),wt),Tt),Ot),_t),Pt),Rt),Ct),Dt),Lt),Mt),Nt),Bt),Gt),xn),Ut),Ft),zt),Kt),Ht),Qt),Vt),qt),Xt),Wt),Yt),Jt),$t),en),tn),nn),rn),on),an),un),cn),ln),fn),hn),dn),pn),gn),vn),sn),yn),mn),An),bn),kn),In),En),Sn),wn),Tn),On),_n),Pn),Rn),Dn),Ln),Nn=3,Bn={setLogLevel:function(e){switch(e.toUpperCase()){case"INFO":Nn=1;break;case"DEBUG":Nn=2;break;default:Nn=3}},info:function(){var e;Nn<=1&&(e=console).info.apply(e,arguments)},debug:function(){var e;Nn<=2&&(e=console).log.apply(e,arguments)},warn:function(){var e;Nn<=3&&(e=console).warn.apply(e,arguments)},error:function(){var e;Nn<=4&&(e=console).error.apply(e,arguments)}},Gn=1e4,Un=1e3,jn="RS_JS_SDK",Fn="Request failed with status:",zn=[Fn],Kn="errorReporting",Hn=function(e){var t,n=null===(t=window.RudderStackGlobals)||void 0===t?void 0:t[Kn];n&&e instanceof Error&&n.notify(e)},Qn=function(e,t){try{return JSON.stringify(e,function(e){var t=[];return function(n,r){if(!e||null!=r){if("object"!==f(r)||null===r)return r;for(;t.length>0&&t[t.length-1]!==this;)t.pop();return t.includes(r)?(Bn.debug("Circular Reference detected for key: ".concat(n)),"[Circular Reference]"):(t.push(r),r)}}}(t))}catch(e){return Bn.warn("Failed to convert the value to a JSON string."),null}},Vn=function(e,t,n){var r,i;try{r="string"==typeof e?e:e instanceof Error||e.message?e.message:Qn(e)}catch(e){r=""}if("object"===f(i=e)&&null!==i&&"target"in i){if(e.target&&"script"!==e.target.localName)return"";if(e.target.dataset&&(e.target.dataset.loader!==jn||"true"!==e.target.dataset.isnonnativesdk))return"";if(r="error in script loading:: src:: ".concat(e.target.src," id:: ").concat(e.target.id),"ad-block"===e.target.id)return n.page("RudderJS-Initiated","ad-block page request",{path:"/ad-blocked",title:r},n.sendAdblockPageOptions),""}return"[handleError]::".concat(t||"",' "').concat(r,'"')},qn=function(e,t,n){var r;try{r=Vn(e,t,n)}catch(t){Bn.error("[handleError] Exception:: ",t),Bn.error("[handleError] Original error:: ",Qn(e)),Hn(t)}r&&(Bn.error(r),function(e){return!e.message||!zn.some((function(t){return e.message.includes(t)}))}(e)&&Hn(e))},Xn={exports:{}};var Wn,Yn={exports:{}},Jn=g(Object.freeze({__proto__:null,default:{}}));function $n(){return Wn||(Wn=1,Yn.exports=(e=e||function(e,t){var n;if("undefined"!=typeof window&&window.crypto&&(n=window.crypto),"undefined"!=typeof self&&self.crypto&&(n=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(n=globalThis.crypto),!n&&"undefined"!=typeof window&&window.msCrypto&&(n=window.msCrypto),!n&&void 0!==d&&d.crypto&&(n=d.crypto),!n)try{n=Jn}catch(e){}var r=function(){if(n){if("function"==typeof n.getRandomValues)try{return n.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof n.randomBytes)try{return n.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},i=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),o={},s=o.lib={},a=s.Base={extend:function(e){var t=i(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},u=s.WordArray=a.extend({init:function(e,n){e=this.words=e||[],this.sigBytes=n!=t?n:4*e.length},toString:function(e){return(e||l).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,i=e.sigBytes;if(this.clamp(),r%4)for(var o=0;o<i;o++){var s=n[o>>>2]>>>24-o%4*8&255;t[r+o>>>2]|=s<<24-(r+o)%4*8}else for(var a=0;a<i;a+=4)t[r+a>>>2]=n[a>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=a.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n<e;n+=4)t.push(r());return new u.init(t,e)}}),c=o.enc={},l=c.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var o=t[i>>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new u.init(n,t/2)}},f=c.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var o=t[i>>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new u.init(n,t)}},h=c.Utf8={stringify:function(e){try{return decodeURIComponent(escape(f.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return f.parse(unescape(encodeURIComponent(e)))}},p=s.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new u.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=h.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n,r=this._data,i=r.words,o=r.sigBytes,s=this.blockSize,a=o/(4*s),c=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*s,l=e.min(4*c,o);if(c){for(var f=0;f<c;f+=s)this._doProcessBlock(i,f);n=i.splice(0,c),r.sigBytes-=l}return new u.init(n,l)},clone:function(){var e=a.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});s.Hasher=p.extend({cfg:a.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){p.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new g.HMAC.init(e,n).finalize(t)}}});var g=o.algo={};return o}(Math),e)),Yn.exports;var e}var Zn,er={exports:{}};function tr(){return Zn||(Zn=1,er.exports=(e=$n(),function(){var t=e,n=t.lib.WordArray;function r(e,t,r){for(var i=[],o=0,s=0;s<t;s++)if(s%4){var a=r[e.charCodeAt(s-1)]<<s%4*2|r[e.charCodeAt(s)]>>>6-s%4*2;i[o>>>2]|=a<<24-o%4*8,o++}return n.create(i,o)}t.enc.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,r=this._map;e.clamp();for(var i=[],o=0;o<n;o+=3)for(var s=(t[o>>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,a=0;a<4&&o+.75*a<n;a++)i.push(r.charAt(s>>>6*(3-a)&63));var u=r.charAt(64);if(u)for(;i.length%4;)i.push(u);return i.join("")},parse:function(e){var t=e.length,n=this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var o=0;o<n.length;o++)i[n.charCodeAt(o)]=o}var s=n.charAt(64);if(s){var a=e.indexOf(s);-1!==a&&(t=a)}return r(e,t,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),e.enc.Base64)),er.exports;var e}var nr,rr={exports:{}};function ir(){return nr||(nr=1,rr.exports=(e=$n(),function(t){var n=e,r=n.lib,i=r.WordArray,o=r.Hasher,s=n.algo,a=[];!function(){for(var e=0;e<64;e++)a[e]=4294967296*t.abs(t.sin(e+1))|0}();var u=s.MD5=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,i=e[r];e[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o=this._hash.words,s=e[t+0],u=e[t+1],d=e[t+2],p=e[t+3],g=e[t+4],v=e[t+5],y=e[t+6],m=e[t+7],A=e[t+8],b=e[t+9],k=e[t+10],I=e[t+11],E=e[t+12],S=e[t+13],w=e[t+14],T=e[t+15],O=o[0],_=o[1],P=o[2],R=o[3];O=c(O,_,P,R,s,7,a[0]),R=c(R,O,_,P,u,12,a[1]),P=c(P,R,O,_,d,17,a[2]),_=c(_,P,R,O,p,22,a[3]),O=c(O,_,P,R,g,7,a[4]),R=c(R,O,_,P,v,12,a[5]),P=c(P,R,O,_,y,17,a[6]),_=c(_,P,R,O,m,22,a[7]),O=c(O,_,P,R,A,7,a[8]),R=c(R,O,_,P,b,12,a[9]),P=c(P,R,O,_,k,17,a[10]),_=c(_,P,R,O,I,22,a[11]),O=c(O,_,P,R,E,7,a[12]),R=c(R,O,_,P,S,12,a[13]),P=c(P,R,O,_,w,17,a[14]),O=l(O,_=c(_,P,R,O,T,22,a[15]),P,R,u,5,a[16]),R=l(R,O,_,P,y,9,a[17]),P=l(P,R,O,_,I,14,a[18]),_=l(_,P,R,O,s,20,a[19]),O=l(O,_,P,R,v,5,a[20]),R=l(R,O,_,P,k,9,a[21]),P=l(P,R,O,_,T,14,a[22]),_=l(_,P,R,O,g,20,a[23]),O=l(O,_,P,R,b,5,a[24]),R=l(R,O,_,P,w,9,a[25]),P=l(P,R,O,_,p,14,a[26]),_=l(_,P,R,O,A,20,a[27]),O=l(O,_,P,R,S,5,a[28]),R=l(R,O,_,P,d,9,a[29]),P=l(P,R,O,_,m,14,a[30]),O=f(O,_=l(_,P,R,O,E,20,a[31]),P,R,v,4,a[32]),R=f(R,O,_,P,A,11,a[33]),P=f(P,R,O,_,I,16,a[34]),_=f(_,P,R,O,w,23,a[35]),O=f(O,_,P,R,u,4,a[36]),R=f(R,O,_,P,g,11,a[37]),P=f(P,R,O,_,m,16,a[38]),_=f(_,P,R,O,k,23,a[39]),O=f(O,_,P,R,S,4,a[40]),R=f(R,O,_,P,s,11,a[41]),P=f(P,R,O,_,p,16,a[42]),_=f(_,P,R,O,y,23,a[43]),O=f(O,_,P,R,b,4,a[44]),R=f(R,O,_,P,E,11,a[45]),P=f(P,R,O,_,T,16,a[46]),O=h(O,_=f(_,P,R,O,d,23,a[47]),P,R,s,6,a[48]),R=h(R,O,_,P,m,10,a[49]),P=h(P,R,O,_,w,15,a[50]),_=h(_,P,R,O,v,21,a[51]),O=h(O,_,P,R,E,6,a[52]),R=h(R,O,_,P,p,10,a[53]),P=h(P,R,O,_,k,15,a[54]),_=h(_,P,R,O,u,21,a[55]),O=h(O,_,P,R,A,6,a[56]),R=h(R,O,_,P,T,10,a[57]),P=h(P,R,O,_,y,15,a[58]),_=h(_,P,R,O,S,21,a[59]),O=h(O,_,P,R,g,6,a[60]),R=h(R,O,_,P,I,10,a[61]),P=h(P,R,O,_,d,15,a[62]),_=h(_,P,R,O,b,21,a[63]),o[0]=o[0]+O|0,o[1]=o[1]+_|0,o[2]=o[2]+P|0,o[3]=o[3]+R|0},_doFinalize:function(){var e=this._data,n=e.words,r=8*this._nDataBytes,i=8*e.sigBytes;n[i>>>5]|=128<<24-i%32;var o=t.floor(r/4294967296),s=r;n[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n[14+(i+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),e.sigBytes=4*(n.length+1),this._process();for(var a=this._hash,u=a.words,c=0;c<4;c++){var l=u[c];u[c]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return a},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function c(e,t,n,r,i,o,s){var a=e+(t&n|~t&r)+i+s;return(a<<o|a>>>32-o)+t}function l(e,t,n,r,i,o,s){var a=e+(t&r|n&~r)+i+s;return(a<<o|a>>>32-o)+t}function f(e,t,n,r,i,o,s){var a=e+(t^n^r)+i+s;return(a<<o|a>>>32-o)+t}function h(e,t,n,r,i,o,s){var a=e+(n^(t|~r))+i+s;return(a<<o|a>>>32-o)+t}n.MD5=o._createHelper(u),n.HmacMD5=o._createHmacHelper(u)}(Math),e.MD5)),rr.exports;var e}var or,sr={exports:{}},ar={exports:{}};function ur(){return or||(or=1,ar.exports=(a=$n(),t=(e=a).lib,n=t.WordArray,r=t.Hasher,i=e.algo,o=[],s=i.SHA1=r.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],s=n[2],a=n[3],u=n[4],c=0;c<80;c++){if(c<16)o[c]=0|e[t+c];else{var l=o[c-3]^o[c-8]^o[c-14]^o[c-16];o[c]=l<<1|l>>>31}var f=(r<<5|r>>>27)+u+o[c];f+=c<20?1518500249+(i&s|~i&a):c<40?1859775393+(i^s^a):c<60?(i&s|i&a|s&a)-1894007588:(i^s^a)-899497514,u=a,a=s,s=i<<30|i>>>2,i=r,r=f}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+s|0,n[3]=n[3]+a|0,n[4]=n[4]+u|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(r+64>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=r.clone.call(this);return e._hash=this._hash.clone(),e}}),e.SHA1=r._createHelper(s),e.HmacSHA1=r._createHmacHelper(s),a.SHA1)),ar.exports;var e,t,n,r,i,o,s,a}var cr,lr={exports:{}};var fr;function hr(){return fr||(fr=1,sr.exports=function(e){return n=(t=e).lib,r=n.Base,i=n.WordArray,o=t.algo,s=o.MD5,a=o.EvpKDF=r.extend({cfg:r.extend({keySize:4,hasher:s,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n,r=this.cfg,o=r.hasher.create(),s=i.create(),a=s.words,u=r.keySize,c=r.iterations;a.length<u;){n&&o.update(n),n=o.update(e).finalize(t),o.reset();for(var l=1;l<c;l++)n=o.finalize(n),o.reset();s.concat(n)}return s.sigBytes=4*u,s}}),t.EvpKDF=function(e,t,n){return a.create(n).compute(e,t)},e.EvpKDF;var t,n,r,i,o,s,a}($n(),ur(),cr||(cr=1,lr.exports=(e=$n(),void function(){var t=e,n=t.lib.Base,r=t.enc.Utf8;t.algo.HMAC=n.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=r.parse(t));var n=e.blockSize,i=4*n;t.sigBytes>i&&(t=e.finalize(t)),t.clamp();for(var o=this._oKey=t.clone(),s=this._iKey=t.clone(),a=o.words,u=s.words,c=0;c<n;c++)a[c]^=1549556828,u[c]^=909522486;o.sigBytes=s.sigBytes=i,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,n=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(n))}})}())))),sr.exports;var e}var dr,pr={exports:{}};var gr;var vr,yr,mr=(gr||(gr=1,Xn.exports=function(e){return function(){var t=e,n=t.lib.BlockCipher,r=t.algo,i=[],o=[],s=[],a=[],u=[],c=[],l=[],f=[],h=[],d=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var n=0,r=0;for(t=0;t<256;t++){var p=r^r<<1^r<<2^r<<3^r<<4;p=p>>>8^255&p^99,i[n]=p,o[p]=n;var g=e[n],v=e[g],y=e[v],m=257*e[p]^16843008*p;s[n]=m<<24|m>>>8,a[n]=m<<16|m>>>16,u[n]=m<<8|m>>>24,c[n]=m,m=16843009*y^65537*v^257*g^16843008*n,l[p]=m<<24|m>>>8,f[p]=m<<16|m>>>16,h[p]=m<<8|m>>>24,d[p]=m,n?(n=g^e[e[e[y^g]]],r^=e[e[r]]):n=r=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],g=r.AES=n.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,n=e.sigBytes/4,r=4*((this._nRounds=n+6)+1),o=this._keySchedule=[],s=0;s<r;s++)s<n?o[s]=t[s]:(c=o[s-1],s%n?n>6&&s%n==4&&(c=i[c>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c]):(c=i[(c=c<<8|c>>>24)>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c],c^=p[s/n|0]<<24),o[s]=o[s-n]^c);for(var a=this._invKeySchedule=[],u=0;u<r;u++){if(s=r-u,u%4)var c=o[s];else c=o[s-4];a[u]=u<4||s<=4?c:l[i[c>>>24]]^f[i[c>>>16&255]]^h[i[c>>>8&255]]^d[i[255&c]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,s,a,u,c,i)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,l,f,h,d,o),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,r,i,o,s,a){for(var u=this._nRounds,c=e[t]^n[0],l=e[t+1]^n[1],f=e[t+2]^n[2],h=e[t+3]^n[3],d=4,p=1;p<u;p++){var g=r[c>>>24]^i[l>>>16&255]^o[f>>>8&255]^s[255&h]^n[d++],v=r[l>>>24]^i[f>>>16&255]^o[h>>>8&255]^s[255&c]^n[d++],y=r[f>>>24]^i[h>>>16&255]^o[c>>>8&255]^s[255&l]^n[d++],m=r[h>>>24]^i[c>>>16&255]^o[l>>>8&255]^s[255&f]^n[d++];c=g,l=v,f=y,h=m}g=(a[c>>>24]<<24|a[l>>>16&255]<<16|a[f>>>8&255]<<8|a[255&h])^n[d++],v=(a[l>>>24]<<24|a[f>>>16&255]<<16|a[h>>>8&255]<<8|a[255&c])^n[d++],y=(a[f>>>24]<<24|a[h>>>16&255]<<16|a[c>>>8&255]<<8|a[255&l])^n[d++],m=(a[h>>>24]<<24|a[c>>>16&255]<<16|a[l>>>8&255]<<8|a[255&f])^n[d++],e[t]=g,e[t+1]=v,e[t+2]=y,e[t+3]=m},keySize:8});t.AES=n._createHelper(g)}(),e.AES}($n(),tr(),ir(),hr(),dr||(dr=1,pr.exports=(vr=$n(),hr(),void(vr.lib.Cipher||function(e){var t=vr,n=t.lib,r=n.Base,i=n.WordArray,o=n.BufferedBlockAlgorithm,s=t.enc;s.Utf8;var a=s.Base64,u=t.algo.EvpKDF,c=n.Cipher=o.extend({cfg:r.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,n){this.cfg=this.cfg.extend(n),this._xformMode=e,this._key=t,this.reset()},reset:function(){o.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?m:v}return function(t){return{encrypt:function(n,r,i){return e(r).encrypt(t,n,r,i)},decrypt:function(n,r,i){return e(r).decrypt(t,n,r,i)}}}}()});n.StreamCipher=c.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var l=t.mode={},f=n.BlockCipherMode=r.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),h=l.CBC=function(){var t=f.extend();function n(t,n,r){var i,o=this._iv;o?(i=o,this._iv=e):i=this._prevBlock;for(var s=0;s<r;s++)t[n+s]^=i[s]}return t.Encryptor=t.extend({processBlock:function(e,t){var r=this._cipher,i=r.blockSize;n.call(this,e,t,i),r.encryptBlock(e,t),this._prevBlock=e.slice(t,t+i)}}),t.Decryptor=t.extend({processBlock:function(e,t){var r=this._cipher,i=r.blockSize,o=e.slice(t,t+i);r.decryptBlock(e,t),n.call(this,e,t,i),this._prevBlock=o}}),t}(),d=(t.pad={}).Pkcs7={pad:function(e,t){for(var n=4*t,r=n-e.sigBytes%n,o=r<<24|r<<16|r<<8|r,s=[],a=0;a<r;a+=4)s.push(o);var u=i.create(s,r);e.concat(u)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}};n.BlockCipher=c.extend({cfg:c.cfg.extend({mode:h,padding:d}),reset:function(){var e;c.reset.call(this);var t=this.cfg,n=t.iv,r=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=r.createEncryptor:(e=r.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,n&&n.words):(this._mode=e.call(r,this,n&&n.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4});var p=n.CipherParams=r.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),g=(t.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,n=e.salt;return(n?i.create([1398893684,1701076831]).concat(n).concat(t):t).toString(a)},parse:function(e){var t,n=a.parse(e),r=n.words;return 1398893684==r[0]&&1701076831==r[1]&&(t=i.create(r.slice(2,4)),r.splice(0,4),n.sigBytes-=16),p.create({ciphertext:n,salt:t})}},v=n.SerializableCipher=r.extend({cfg:r.extend({format:g}),encrypt:function(e,t,n,r){r=this.cfg.extend(r);var i=e.createEncryptor(n,r),o=i.finalize(t),s=i.cfg;return p.create({ciphertext:o,key:n,iv:s.iv,algorithm:e,mode:s.mode,padding:s.padding,blockSize:e.blockSize,formatter:r.format})},decrypt:function(e,t,n,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),e.createDecryptor(n,r).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),y=(t.kdf={}).OpenSSL={execute:function(e,t,n,r,o){if(r||(r=i.random(8)),o)s=u.create({keySize:t+n,hasher:o}).compute(e,r);else var s=u.create({keySize:t+n}).compute(e,r);var a=i.create(s.words.slice(t),4*n);return s.sigBytes=4*t,p.create({key:s,iv:a,salt:r})}},m=n.PasswordBasedCipher=v.extend({cfg:v.cfg.extend({kdf:y}),encrypt:function(e,t,n,r){var i=(r=this.cfg.extend(r)).kdf.execute(n,e.keySize,e.ivSize,r.salt,r.hasher);r.iv=i.iv;var o=v.encrypt.call(this,e,t,i.key,r);return o.mixIn(i),o},decrypt:function(e,t,n,r){r=this.cfg.extend(r),t=this._parse(t,r.format);var i=r.kdf.execute(n,e.keySize,e.ivSize,t.salt,r.hasher);return r.iv=i.iv,v.decrypt.call(this,e,t,i.key,r)}})}()))))),Xn.exports),Ar=p(mr),br={exports:{}};var kr,Ir,Er,Sr,wr,Tr,Or=(yr||(yr=1,br.exports=function(e){return e.enc.Utf8}($n())),br.exports),_r=p(Or),Pr=Object.defineProperty,Rr=function(e,t){return Pr(e,"name",{value:t,configurable:!0})},Cr=Rr((function(e){return null!==e&&"object"===f(e)}),"isObject"),xr=Rr((function(e,t,n){return"function"==typeof n.join?n.join(e):e[0]+t+e[1]}),"join"),Dr=Rr((function(e,t,n){return"function"==typeof n.split?n.split(e):e.split(t)}),"split"),Lr=Rr((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return"function"!=typeof(null==n?void 0:n.isValid)||n.isValid(e,t)}),"isValid"),Mr=Rr((function(e){return Cr(e)||"function"==typeof e}),"isValidObject"),Nr=Rr((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(Cr(n)||(n={default:n}),!Mr(e))return void 0!==n.default?n.default:e;"number"==typeof t&&(t=String(t));var r=Array.isArray(t),i="string"==typeof t,o=n.separator||".",s=n.joinChar||("string"==typeof o?o:".");if(!i&&!r)return e;if(void 0!==e[t])return Lr(t,e,n)?e[t]:n.default;var a=r?t:Dr(t,o,n),u=a.length,c=0;do{var l=a[c];for("string"!=typeof l&&(l=String(l));l&&"\\"===l.slice(-1);)l=xr([l.slice(0,-1),a[++c]||""],s,n);if(void 0!==e[l]){if(!Lr(l,e,n))return n.default;e=e[l]}else{for(var f=!1,h=c+1;h<u;)if(f=void 0!==e[l=xr([l,a[h++]],s,n)]){if(!Lr(l,e,n))return n.default;e=e[l],c=h-1;break}if(!f)return n.default}}while(++c<u&&Mr(e));return c===u?e:n.default}),"getValue"),Br={exports:{}},Gr={exports:{}};function Ur(){if(Ir)return kr;Ir=1;var e=1e3,t=60*e,n=60*t,r=24*n,i=365.25*r;function o(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}return kr=function(s,a){a=a||{};var u=f(s);if("string"===u&&s.length>0)return function(o){if((o=String(o)).length>100)return;var s=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(o);if(!s)return;var a=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return a*i;case"days":case"day":case"d":return a*r;case"hours":case"hour":case"hrs":case"hr":case"h":return a*n;case"minutes":case"minute":case"mins":case"min":case"m":return a*t;case"seconds":case"second":case"secs":case"sec":case"s":return a*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}(s);if("number"===u&&!1===isNaN(s))return a.long?function(i){return o(i,r,"day")||o(i,n,"hour")||o(i,t,"minute")||o(i,e,"second")||i+" ms"}(s):function(i){if(i>=r)return Math.round(i/r)+"d";if(i>=n)return Math.round(i/n)+"h";if(i>=t)return Math.round(i/t)+"m";if(i>=e)return Math.round(i/e)+"s";return i+"ms"}(s);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(s))},kr}function jr(){return Er||(Er=1,function(e,t){var n;function r(e){function r(){if(r.enabled){var e=r,i=+new Date,o=i-(n||i);e.diff=o,e.prev=n,e.curr=i,n=i;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=t.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var u=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,(function(n,r){if("%%"===n)return n;u++;var i=t.formatters[r];if("function"==typeof i){var o=s[u];n=i.call(e,o),s.splice(u,1),u--}return n})),t.formatArgs.call(e,s),(r.log||t.log||console.log.bind(console)).apply(e,s)}}return r.namespace=e,r.enabled=t.enabled(e),r.useColors=t.useColors(),r.color=function(e){var n,r=0;for(n in e)r=(r<<5)-r+e.charCodeAt(n),r|=0;return t.colors[Math.abs(r)%t.colors.length]}(e),"function"==typeof t.init&&t.init(r),r}(t=Gr.exports=r.debug=r.default=r).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){t.save(e),t.names=[],t.skips=[];for(var n=("string"==typeof e?e:"").split(/[\s,]+/),r=n.length,i=0;i<r;i++)n[i]&&("-"===(e=n[i].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=Ur(),t.names=[],t.skips=[],t.formatters={}}(0,Gr.exports)),Gr.exports}var Fr,zr,Kr,Hr,Qr,Vr,qr,Xr=function(){if(Tr)return wr;Tr=1;var e=(Sr||(Sr=1,function(e,t){function n(){var e;try{e=t.storage.debug}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e}(t=Br.exports=jr()).log=function(){return"object"===("undefined"==typeof console?"undefined":f(console))&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),n){var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var i=0,o=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(i++,"%c"===e&&(o=i))})),e.splice(o,0,r)}},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=n,t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(n())}(0,Br.exports)),Br.exports)("cookie");function t(){var e;try{e=document.cookie}catch(e){return"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e.stack||e),{}}return function(e){var t,n={},i=e.split(/ *; */);if(""==i[0])return n;for(var o=0;o<i.length;++o)n[r((t=i[o].split("="))[0])]=r(t[1]);return n}(e)}function n(t){try{return encodeURIComponent(t)}catch(n){e("error `encode(%o)` - %o",t,n)}}function r(t){try{return decodeURIComponent(t)}catch(n){e("error `decode(%o)` - %o",t,n)}}return wr=function(e,r,i){switch(arguments.length){case 3:case 2:return function(e,t,r){r=r||{};var i=n(e)+"="+n(t);null==t&&(r.maxage=-1);r.maxage&&(r.expires=new Date(+new Date+r.maxage));r.path&&(i+="; path="+r.path);r.domain&&(i+="; domain="+r.domain);r.expires&&(i+="; expires="+r.expires.toUTCString());r.samesite&&(i+="; samesite="+r.samesite);r.secure&&(i+="; secure");document.cookie=i}(e,r,i);case 1:return function(e){return t()[e]}(e);default:return t()}}}(),Wr=p(Xr),Yr={exports:{}},Jr={exports:{}},$r={exports:{}};function Zr(){if(zr)return Fr;zr=1;var e=1e3,t=60*e,n=60*t,r=24*n,i=365.25*r;function o(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}return Fr=function(s,a){a=a||{};var u=f(s);if("string"===u&&s.length>0)return function(o){if((o=String(o)).length>100)return;var s=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(o);if(!s)return;var a=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return a*i;case"days":case"day":case"d":return a*r;case"hours":case"hour":case"hrs":case"hr":case"h":return a*n;case"minutes":case"minute":case"mins":case"min":case"m":return a*t;case"seconds":case"second":case"secs":case"sec":case"s":return a*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}(s);if("number"===u&&!1===isNaN(s))return a.long?function(i){return o(i,r,"day")||o(i,n,"hour")||o(i,t,"minute")||o(i,e,"second")||i+" ms"}(s):function(i){if(i>=r)return Math.round(i/r)+"d";if(i>=n)return Math.round(i/n)+"h";if(i>=t)return Math.round(i/t)+"m";if(i>=e)return Math.round(i/e)+"s";return i+"ms"}(s);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(s))},Fr}function ei(){return Kr||(Kr=1,function(e,t){var n;function r(e){function r(){if(r.enabled){var e=r,i=+new Date,o=i-(n||i);e.diff=o,e.prev=n,e.curr=i,n=i;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=t.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var u=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,(function(n,r){if("%%"===n)return n;u++;var i=t.formatters[r];if("function"==typeof i){var o=s[u];n=i.call(e,o),s.splice(u,1),u--}return n})),t.formatArgs.call(e,s),(r.log||t.log||console.log.bind(console)).apply(e,s)}}return r.namespace=e,r.enabled=t.enabled(e),r.useColors=t.useColors(),r.color=function(e){var n,r=0;for(n in e)r=(r<<5)-r+e.charCodeAt(n),r|=0;return t.colors[Math.abs(r)%t.colors.length]}(e),"function"==typeof t.init&&t.init(r),r}(t=$r.exports=r.debug=r.default=r).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){t.save(e),t.names=[],t.skips=[];for(var n=("string"==typeof e?e:"").split(/[\s,]+/),r=n.length,i=0;i<r;i++)n[i]&&("-"===(e=n[i].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=Zr(),t.names=[],t.skips=[],t.formatters={}}(0,$r.exports)),$r.exports}function ti(){if(Vr)return Qr;Vr=1;var e=(Hr||(Hr=1,function(e,t){function n(){var e;try{e=t.storage.debug}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e}(t=Jr.exports=ei()).log=function(){return"object"===("undefined"==typeof console?"undefined":f(console))&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),n){var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var i=0,o=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(i++,"%c"===e&&(o=i))})),e.splice(o,0,r)}},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=n,t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(n())}(0,Jr.exports)),Jr.exports)("cookie");function t(){var e;try{e=document.cookie}catch(e){return"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e.stack||e),{}}return function(e){var t,n={},i=e.split(/ *; */);if(""==i[0])return n;for(var o=0;o<i.length;++o)n[r((t=i[o].split("="))[0])]=r(t[1]);return n}(e)}function n(t){try{return encodeURIComponent(t)}catch(n){e("error `encode(%o)` - %o",t,n)}}function r(t){try{return decodeURIComponent(t)}catch(n){e("error `decode(%o)` - %o",t,n)}}return Qr=function(e,r,i){switch(arguments.length){case 3:case 2:return function(e,t,r){r=r||{};var i=n(e)+"="+n(t);null==t&&(r.maxage=-1);r.maxage&&(r.expires=new Date(+new Date+r.maxage));r.path&&(i+="; path="+r.path);r.domain&&(i+="; domain="+r.domain);r.expires&&(i+="; expires="+r.expires.toUTCString());r.secure&&(i+="; secure");document.cookie=i}(e,r,i);case 1:return function(e){return t()[e]}(e);default:return t()}},Qr}var ni,ri=(qr||(qr=1,function(e,t){var n=ti();function r(e){for(var n=t.cookie,r=t.levels(e),i=0;i<r.length;++i){var o="__tld__",s=r[i],a={domain:"."+s};if(n(o,1,a),n(o))return n(o,null,a),s}return""}r.levels=function(e){var t,n,r=("function"!=typeof window.URL?(t=e,(n=document.createElement("a")).href=t,n.hostname):new URL(e).hostname).split("."),i=r[r.length-1],o=[];if(4===r.length&&i===parseInt(i,10))return o;if(r.length<=1)return o;for(var s=r.length-2;s>=0;--s)o.push(r.slice(s).join("."));return o},r.cookie=n,t=e.exports=r}(Yr,Yr.exports)),Yr.exports),ii=p(ri),oi=function(e){return null===e},si=function(e){return!oi(e)&&function(e){return"object"===f(e)}(e)&&!Array.isArray(e)},ai=function(e,t){if(!Array.isArray(e)||!Array.isArray(t))return P(t);var n=P(e);return t.forEach((function(e,t){n[t]=Array.isArray(e)||si(e)?ui(n[t],e):e})),n},ui=function(e,t){return x(ai,e,t)},ci=function(e){return function(e){return!oi(e)&&"[object Object]"===Object.prototype.toString.call(e)}(e)&&Object.keys(e).length>0},li=new(function(){return n((function e(n){t(this,e),this.cOpts={},this.options(n),this.isSupportAvailable=this.checkSupportAvailability()}),[{key:"options",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(0===arguments.length)return this.cOpts;var t=".".concat(ii(window.location.href));return"."===t&&(t=null),this.cOpts=ui({maxage:31536e6,path:"/",domain:t,samesite:"Lax"},e),e.sameDomainCookiesOnly&&delete this.cOpts.domain,this.cOpts}},{key:"set",value:function(e,t){try{return Wr(e,t,P(this.cOpts)),!0}catch(e){return Bn.error(e),!1}}},{key:"get",value:function(e){return Wr(e)}},{key:"remove",value:function(e){try{return Wr(e,null,P(this.cOpts)),!0}catch(e){return!1}}},{key:"checkSupportAvailability",value:function(){var e="test_rudder_cookie";return this.set(e,!0),!!this.get(e)&&(this.remove(e),!0)}}])}())({}),fi={exports:{}};var hi=(ni||(ni=1,fi.exports=function(){function e(e){return e=JSON.stringify(e),!!/^\{[\s\S]*\}$/.test(e)}function t(e){return void 0===e||"function"==typeof e?e+"":JSON.stringify(e)}function n(e){if("string"==typeof e)try{return JSON.parse(e)}catch(t){return e}}function r(e){return"[object Function]"==={}.toString.call(e)}function i(e){return"[object Array]"===Object.prototype.toString.call(e)}function o(e){var t="_Is_Incognit",n="yes";try{e||(e=window.localStorage),e.setItem(t,n),e.removeItem(t)}catch(t){var r={_data:{},setItem:function(e,t){return r._data[e]=String(t)},getItem:function(e){return r._data.hasOwnProperty(e)?r._data[e]:void 0},removeItem:function(e){return delete r._data[e]},clear:function(){return r._data={}}};e=r}finally{e.getItem(t)===n&&e.removeItem(t)}return e}var s=o();function a(){if(!(this instanceof a))return new a}a.prototype={set:function(n,r){if(n&&!e(n))s.setItem(n,t(r));else if(e(n))for(var i in n)this.set(i,n[i]);return this},get:function(e){if(void 0===e){var t={};return this.forEach((function(e,n){return t[e]=n})),t}if("?"===e.charAt(0))return this.has(e.substr(1));var r=arguments;if(r.length>1){for(var i={},o=0,a=r.length;o<a;o++){var u=n(s.getItem(r[o]));this.has(r[o])&&(i[r[o]]=u)}return i}return n(s.getItem(e))},clear:function(){return s.clear(),this},remove:function(e){var t=this.get(e);return s.removeItem(e),t},has:function(e){return{}.hasOwnProperty.call(this.get(),e)},keys:function(){var e=[];return this.forEach((function(t){e.push(t)})),e},forEach:function(e){for(var t=0,n=s.length;t<n;t++){var r=s.key(t);e(r,this.get(r))}return this},search:function(e){for(var t=this.keys(),n={},r=0,i=t.length;r<i;r++)t[r].indexOf(e)>-1&&(n[t[r]]=this.get(t[r]));return n},len:function(){return s.length}};var u=null;function c(t,n){var o=arguments,s=null;if(u||(u=a()),0===o.length)return u.get();if(1===o.length){if("string"==typeof t)return u.get(t);if(e(t))return u.set(t)}if(2===o.length&&"string"==typeof t){if(!n)return u.remove(t);if(n&&"string"==typeof n)return u.set(t,n);n&&r(n)&&(s=null,s=n(t,u.get(t)),c.set(t,s))}if(2===o.length&&i(t)&&r(n))for(var l=0,f=t.length;l<f;l++)s=n(t[l],u.get(t[l])),c.set(t[l],s);return c}for(var l in a.prototype)c[l]=a.prototype[l];return c}()),fi.exports),di=p(hi),pi=new(function(){return n((function e(n){t(this,e),this.sOpts={},this.enabled=this.checkSupportAvailability(),this.options(n)}),[{key:"options",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 0===arguments.length||(this.sOpts=ui({enabled:!0},e),this.enabled=this.sOpts.enabled&&this.enabled),this.sOpts}},{key:"set",value:function(e,t){return di.set(e,t)}},{key:"get",value:function(e){return di.get(e)}},{key:"remove",value:function(e){return di.remove(e)}},{key:"checkSupportAvailability",value:function(){try{var e="test_rudder_ls";return this.set(e,!0),!!this.get(e)&&(this.remove(e),!0)}catch(e){return!1}}}])}())({}),gi=function(e){return(new TextDecoder).decode((t=e,n=globalThis.atob(t).split("").map((function(e){return e.charCodeAt(0)})),new Uint8Array(n)));var t,n},vi="rl_user_id",yi="rl_trait",mi="rl_anonymous_id",Ai="rl_group_id",bi="rl_group_trait",ki="rl_page_init_referrer",Ii="rl_page_init_referring_domain",Ei="rl_session",Si="rl_auth_token",wi="RudderEncrypt:",Ti="RS_ENC_v3_",Oi="Rudder",_i={segment:"ajs_anonymous_id"};function Pi(e){return e.replace(/^\s+|\s+$/gm,"")}function Ri(e){return e&&"string"==typeof e&&""!==Pi(e)?e.startsWith(wi)?Ar.decrypt(e.substring(wi.length),Oi).toString(_r):e.startsWith(Ti)?gi(e.substring(Ti.length)):e:e}for(var Ci,xi=function(){return n((function e(){t(this,e),li.isSupportAvailable?this.storage=li:(pi.enabled&&(this.storage=pi),this.storage||Bn.error("No storage is available :: initializing the SDK without storage"))}),[{key:"options",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.storage.options(e)}},{key:"setItem",value:function(e,t){var n=Qn(t);null!==n&&this.storage.set(e,function(e){return""===Pi(e)?e:"".concat(wi).concat(Ar.encrypt(e,Oi).toString())}(n))}},{key:"setStringItem",value:function(e,t){"string"==typeof t?this.setItem(e,t):Bn.error("[Storage] ".concat(e," should be string"))}},{key:"setUserId",value:function(e){this.setStringItem(vi,e)}},{key:"setUserTraits",value:function(e){this.setItem(yi,e)}},{key:"setGroupId",value:function(e){this.setStringItem(Ai,e)}},{key:"setGroupTraits",value:function(e){this.setItem(bi,e)}},{key:"setAnonymousId",value:function(e){this.setStringItem(mi,e)}},{key:"setInitialReferrer",value:function(e){this.setItem(ki,e)}},{key:"setInitialReferringDomain",value:function(e){this.setItem(Ii,e)}},{key:"setSessionInfo",value:function(e){this.setItem(Ei,e)}},{key:"setAuthToken",value:function(e){this.setItem(Si,e)}},{key:"getItem",value:function(e){try{var t=this.storage.get(e),n=Ri(t);for(t=n?JSON.parse(n):null;"string"==typeof t&&(n=Ri(t))!==t;)t=JSON.parse(n);return t}catch(t){return Bn.error(function(e){return"Unable to retrieve the cookie data for ".concat(e,". The data is dropped. This can potentially stem from using SDK v3 on other sites or web pages that can share cookies with this webpage. Please use the same SDK (v3) version everywhere as soon as possible.")}(e),t),null}}},{key:"getUserId",value:function(){return this.getItem(vi)}},{key:"getUserTraits",value:function(){return this.getItem(yi)}},{key:"getGroupId",value:function(){return this.getItem(Ai)}},{key:"getGroupTraits",value:function(){return this.getItem(bi)}},{key:"fetchExternalAnonymousId",value:function(e){var t,n=e.toLowerCase();return Object.keys(_i).includes(n)&&"segment"===n?(pi.enabled&&(t=pi.get(_i[n])),!t&&li.isSupportAvailable&&(t=li.get(_i[n])),t):t}},{key:"getAnonymousId",value:function(e){var t=this.getItem(mi);if(t)return t;var n=Nr(e,"autoCapture.source");if(!0===Nr(e,"autoCapture.enabled")&&"string"==typeof n){var r=this.fetchExternalAnonymousId(n);if(r)return r}return t}},{key:"getInitialReferrer",value:function(){return this.getItem(ki)}},{key:"getInitialReferringDomain",value:function(){return this.getItem(Ii)}},{key:"getSessionInfo",value:function(){return this.getItem(Ei)}},{key:"getAuthToken",value:function(){return this.getItem(Si)}},{key:"removeItem",value:function(e){return this.storage.remove(e)}},{key:"removeSessionInfo",value:function(){this.removeItem(Ei)}},{key:"clear",value:function(e){this.storage.remove(vi),this.storage.remove(yi),this.storage.remove(Ai),this.storage.remove(bi),this.storage.remove(Si),e&&this.storage.remove(mi)}}])}(),Di=new xi,Li=256,Mi=[];Li--;)Mi[Li]=(Li+256).toString(16).substring(1);for(var Ni,Bi=[],Gi=0;Gi<256;Gi++)Bi[Gi]=(Gi+256).toString(16).substring(1);function Ui(){var e;(!Ni||Gi+16>4096)&&(e=4096,Ni=crypto.getRandomValues(new Uint8Array(e)),Gi=0);for(var t,n=0,r="";n<16;n++)t=Ni[Gi+n],r+=6==n?Bi[15&t|64]:8==n?Bi[63&t|128]:Bi[t],1&n&&n>1&&n<11&&(r+="-");return Gi+=16,r}var ji={All:"All",GA:"Google Analytics",GOOGLEADS:"Google Ads",BRAZE:"Braze",CHARTBEAT:"Chartbeat",CUSTOMERIO:"Customer IO",DCM_Floodlight:"DCM Floodlight",FACEBOOK_PIXEL:"Facebook Pixel",GTM:"Google Tag Manager",HOTJAR:"Hotjar",HS:"HubSpot",INTERCOM:"Intercom",KEEN:"Keen",KISSMETRICS:"Kiss Metrics",LOTAME:"Lotame",VWO:"VWO",OPTIMIZELY:"Optimizely Web",FULLSTORY:"Fullstory",TVSQUARED:"TVSquared",GA4:"Google Analytics 4 (GA4)",GA4_V2:"Google Analytics 4 (GA4) V2",MOENGAGE:"MoEngage",AM:"Amplitude",PENDO:"Pendo",LYTICS:"Lytics",APPCUES:"Appcues",POSTHOG:"PostHog",PROFITWELL:"ProfitWell",KLAVIYO:"Klaviyo",CLEVERTAP:"CleverTap",BINGADS:"Bing Ads",PINTEREST_TAG:"Pinterest Tag",SNAP_PIXEL:"Snap Pixel",LINKEDIN_INSIGHT_TAG:"Linkedin Insight Tag",REDDIT_PIXEL:"Reddit Pixel",DRIP:"Drip",HEAP:"Heap.io",CRITEO:"Criteo",MP:"Mixpanel",QUALTRICS:"Qualtrics",SENTRY:"Sentry",GOOGLE_OPTIMIZE:"Google Optimize",POST_AFFILIATE_PRO:"Post Affiliate Pro",LAUNCHDARKLY:"LaunchDarkly",GA360:"Google Analytics 360",ADROLL:"Adroll",VERO:"Vero",MATOMO:"Matomo",MOUSEFLOW:"Mouseflow",ROCKERBOX:"Rockerbox",CONVERTFLOW:"ConvertFlow",SNAPENGAGE:"SnapEngage",LIVECHAT:"LiveChat",SHYNET:"Shynet",WOOPRA:"Woopra",ROLLBAR:"RollBar",QUORA_PIXEL:"Quora Pixel",JUNE:"June",ENGAGE:"Engage",ITERABLE:"Iterable",YANDEX_METRICA:"Yandex.Metrica",REFINER:"Refiner",QUALAROO:"Qualaroo",PODSIGHTS:"Podsights",AXEPTIO:"Axeptio",SATISMETER:"Satismeter",MICROSOFT_CLARITY:"Microsoft Clarity",SENDINBLUE:"Sendinblue",OLARK:"Olark",LEMNISK:"Lemnisk",TIKTOK_ADS:"TikTok Ads",ACTIVE_CAMPAIGN:"ActiveCampaign",SPRIG:"Sprig",SPOTIFYPIXEL:"Spotify Pixel",COMMANDBAR:"CommandBar",NINETAILED:"Ninetailed",XPIXEL:"XPixel",GAINSIGHT_PX:"Gainsight PX"},Fi=["anonymous_id","id","sent_at","received_at","timestamp","original_timestamp","event_text","event"],zi="https://api.rudderstack.com/sourceConfig/?p=npm&v=2.51.1",Ki="v1.1",Hi="js-integrations",Qi="".concat("https://cdn.rudderlabs.com","/").concat(Ki,"/").concat(Hi),Vi=["Lax","None","Strict"],qi=["US","EU"],Xi=["oneTrust","ketch"],Wi=["library","consentManagement"],Yi=["none","default","full"],Ji={All:!0};function $i(e){return null!=e&&e.endsWith("/")?e.replace(/\/+$/,""):e}function Zi(){return window.crypto&&"function"==typeof window.crypto.getRandomValues?Ui():function(){var e,t=0,n="";if(!Ci||Li+16>256){for(Ci=Array(t=256);t--;)Ci[t]=256*Math.random()|0;t=Li=0}for(;t<16;t++)e=Ci[Li+t],n+=6==t?Mi[15&e|64]:8==t?Mi[63&e|128]:Mi[e],1&t&&t>1&&t<11&&(n+="-");return Li++,n}()}function eo(){return(new Date).toISOString()}function to(e,t){Object.keys(e).forEach((function(n){e.hasOwnProperty(n)&&(t[n]&&(e[t[n]]=e[n]),"All"!==n&&void 0!==t[n]&&t[n]!==n&&delete e[n])}))}function no(e){to(e,Mn)}function ro(e){to(e,ji)}function io(e,t){var n=[];if(!t||0===t.length)return n;var r=!0;void 0!==e.All&&(r=e.All);var i=[];return"string"==typeof t[0]?t.forEach((function(e){i.push({intgName:e,intObj:e})})):"object"===f(t[0])&&t.forEach((function(e){i.push({intgName:e.name,intObj:e})})),i.forEach((function(t){var i=t.intgName,o=t.intObj;if(r){var s=!0;void 0!==e[i]&&!1===Boolean(e[i])&&(s=!1),s&&n.push(o)}else void 0!==e[i]&&!0===Boolean(e[i])&&n.push(o)})),n}var oo=function(e){return"string"==typeof e||null==e?e:Qn(e)},so=function(e){return"string"==typeof e&&e.trim().length>0},ao=function(e,t,n){try{var r=e.source.dataplanes||{};if(Object.keys(r).length>0){var i=function(e){var t=e?e.residencyServer:void 0;if(t)return"string"==typeof t&&qi.includes(t.toUpperCase())?t.toUpperCase():void Bn.error("Invalid residencyServer input")}(n),o=r[i]||r.US;if(o){var s=function(e){if(Array.isArray(e)&&e.length>0){var t=e.find((function(e){return!0===e.default}));if(t&&so(t.url))return t.url}}(o);if(s)return s}}if(so(t))return t;throw Error("Unable to load the SDK due to invalid data plane url")}catch(e){throw Error(e)}};function uo(){var e;return(null===(e=document)||void 0===e?void 0:e.referrer)||"$direct"}function co(e){var t=e.split("/");return t.length>=3?t[2]:""}function lo(){for(var e=document.getElementsByTagName("link"),t=0;e[t];t+=1){var n=e[t];if("canonical"===n.getAttribute("rel"))return n.getAttribute("href")}}function fo(){var e=lo(),t=window.location.pathname;if(e)try{t=new URL(e).pathname}catch(e){}var n=window.location,r=n.search,i=n.href,o=document.title,s=function(e){var t,n=lo(),r=(t=n?n.includes("?")?n:n+e:window.location.href).indexOf("#");return r>-1?t.slice(0,r):t}(r),a=i,u=uo();return{path:t,referrer:u,referring_domain:co(u),search:r,title:o,url:s,tab_url:a,initial_referrer:Di.getInitialReferrer()||"",initial_referring_domain:Di.getInitialReferringDomain()||""}}var ho,po=n((function e(){t(this,e),this.name="RudderLabs JavaScript SDK",this.namespace="com.rudderlabs.javascript",this.version="2.51.1"})),go=n((function e(){t(this,e),this.name="RudderLabs JavaScript SDK",this.version="2.51.1"})),vo=n((function e(){t(this,e),this.name="",this.version=""})),yo=n((function e(){t(this,e),this.density=0,this.width=0,this.height=0,this.innerWidth=0,this.innerHeight=0})),mo=n((function e(){var n,r;t(this,e),this.app=new po,this.traits=null,this.library=new go,this.userAgent=function(){if("undefined"==typeof navigator)return null;var e=navigator.userAgent,t=navigator.brave;if(t&&Object.getPrototypeOf(t).isBrave){var n=e.match(/(chrome)\/([\w.]+)/i);n&&(e="".concat(e," Brave/").concat(n[2]))}return e}(),this.device=null,this.network=null,this.os=new vo,this.locale="undefined"==typeof navigator?null:navigator.language||navigator.browserLanguage,this.screen=(n=new yo,"undefined"==typeof window||(n.width=window.screen.width,n.height=window.screen.height,n.density=window.devicePixelRatio,n.innerWidth=window.innerWidth,n.innerHeight=window.innerHeight),n),this.timezone=null!=(r=/([A-Z]+[+-]\d+)/.exec((new Date).toString()))&&r[1]?r[1]:"NA"})),Ao=function(){return n((function e(){t(this,e),this.channel="web",this.context=new mo,this.type=null,this.messageId=Zi(),this.originalTimestamp=(new Date).toISOString(),this.anonymousId=null,this.userId=null,this.event=null,this.properties={}}),[{key:"getProperty",value:function(e){return this.properties[e]}},{key:"addProperty",value:function(e,t){this.properties[e]=t}}])}(),bo=function(){return n((function e(){t(this,e),this.message=new Ao}),[{key:"setType",value:function(e){this.message.type=e}},{key:"setProperty",value:function(e){this.message.properties=e}},{key:"setUserProperty",value:function(e){this.message.user_properties=e}},{key:"setUserId",value:function(e){this.message.userId=e}},{key:"setEventName",value:function(e){this.message.event=e}},{key:"getElementContent",value:function(){return this.message}}])}(),ko=function(){return n((function e(){t(this,e),this.rudderProperty=null,this.rudderUserProperty=null,this.event=null,this.userId=null,this.type=null}),[{key:"setType",value:function(e){return this.type=e,this}},{key:"build",value:function(){var e=new bo;return e.setUserId(this.userId),e.setType(this.type),e.setEventName(this.event),e.setProperty(this.rudderProperty),e.setUserProperty(this.rudderUserProperty),e}}])}(),Io={};function Eo(){if(ho)return Io;ho=1;for(var e,t=256,n=[];t--;)n[t]=(t+256).toString(16).substring(1);return Io.v4=function(){var r,i=0,o="";if(!e||t+16>256){for(e=Array(i=256);i--;)e[i]=256*Math.random()|0;i=t=0}for(;i<16;i++)r=e[t+i],o+=6==i?n[15&r|64]:8==i?n[63&r|128]:n[r],1&i&&i>1&&i<11&&(o+="-");return t++,o},Io}var So,wo,To,Oo,_o,Po,Ro,Co,xo,Do={};function Lo(){if(wo)return So;wo=1;var e=Object.prototype.hasOwnProperty,t=String.prototype.charAt,n=Object.prototype.toString,r=function(e,n){return t.call(e,n)},i=function(t,n){return e.call(t,n)},o=function(e,t){t=t||i;for(var n=[],r=0,o=e.length;r<o;r+=1)t(e,r)&&n.push(String(r));return n};return So=function(e){return null==e?[]:(t=e,"[object String]"===n.call(t)?o(e,r):function(e){return null!=e&&"function"!=typeof e&&"number"==typeof e.length}(e)?o(e,i):function(e,t){t=t||i;var n=[];for(var r in e)t(e,r)&&n.push(String(r));return n}(e));var t}}function Mo(){if(To)return Do;To=1;var e=Lo(),t=Eo().v4,n={_data:{},length:0,setItem:function(t,n){return this._data[t]=n,this.length=e(this._data).length,n},getItem:function(e){return e in this._data?this._data[e]:null},removeItem:function(t){return t in this._data&&delete this._data[t],this.length=e(this._data).length,null},clear:function(){this._data={},this.length=0},key:function(t){return e(this._data)[t]}};return Do.defaultEngine=function(){try{if(!window.localStorage)return!1;var e=t();window.localStorage.setItem(e,"test_value");var n=window.localStorage.getItem(e);return window.localStorage.removeItem(e),"test_value"===n}catch(e){return!1}}()?window.localStorage:n,Do.inMemoryEngine=n,Do}function No(){if(_o)return Oo;_o=1;var e=Lo(),t=Object.prototype.toString,n="function"==typeof Array.isArray?Array.isArray:function(e){return"[object Array]"===t.call(e)},r=function(e){return null!=e&&(n(e)||"function"!==e&&function(e){var n=f(e);return"number"===n||"object"===n&&"[object Number]"===t.call(e)}(e.length))},i=function(e,t){for(var n=0;n<t.length&&!1!==e(t[n],n,t);n+=1);},o=function(t,n){for(var r=e(n),i=0;i<r.length&&!1!==t(n[r[i]],r[i],n);i+=1);};return Oo=function(e,t){return(r(t)?i:o).call(this,e,t)}}function Bo(){if(Ro)return Po;Ro=1;var e=Mo().defaultEngine,t=Mo().inMemoryEngine,n=No(),r=Lo(),i=JSON;function o(e){try{return JSON.stringify(e,(t=[],function(e,n){if("object"!==f(n)||null===n)return n;for(;t.length>0&&t[t.length-1]!==this;)t.pop();return t.includes(n)?"[Circular Reference]":(t.push(n),n)}))}catch(e){return null}var t}function s(t,n,r,i){this.id=n,this.name=t,this.keys=r||{},this.engine=i||e,this.originalEngine=this.engine}return s.prototype.set=function(e,t){var n=this._createValidKey(e);if(n)try{this.engine.setItem(n,o(t))}catch(n){(function(e){var t=!1;if(e.code)switch(e.code){case 22:t=!0;break;case 1014:"NS_ERROR_DOM_QUOTA_REACHED"===e.name&&(t=!0)}else-2147024882===e.number&&(t=!0);return t})(n)&&(this._swapEngine(),this.set(e,t))}},s.prototype.get=function(e){try{var t=this.engine.getItem(this._createValidKey(e));return null===t?null:i.parse(t)}catch(e){return null}},s.prototype.getOriginalEngine=function(){return this.originalEngine},s.prototype.remove=function(e){this.engine.removeItem(this._createValidKey(e))},s.prototype._createValidKey=function(e){var t,i=this.name,o=this.id;return r(this.keys).length?(n((function(n){n===e&&(t=[i,o,e].join("."))}),this.keys),t):[i,o,e].join(".")},s.prototype._swapEngine=function(){var e=this;n((function(n){var r=e.get(n);t.setItem([e.name,e.id,n].join("."),r),e.remove(n)}),this.keys),this.engine=t},Po=s}var Go,Uo,jo,Fo,zo={exports:{}},Ko={exports:{}};function Ho(){if(Uo)return Go;Uo=1;var e=1e3,t=60*e,n=60*t,r=24*n,i=365.25*r;function o(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}return Go=function(s,a){a=a||{};var u=f(s);if("string"===u&&s.length>0)return function(o){if((o=String(o)).length>100)return;var s=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(o);if(!s)return;var a=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return a*i;case"days":case"day":case"d":return a*r;case"hours":case"hour":case"hrs":case"hr":case"h":return a*n;case"minutes":case"minute":case"mins":case"min":case"m":return a*t;case"seconds":case"second":case"secs":case"sec":case"s":return a*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}(s);if("number"===u&&!1===isNaN(s))return a.long?function(i){return o(i,r,"day")||o(i,n,"hour")||o(i,t,"minute")||o(i,e,"second")||i+" ms"}(s):function(i){if(i>=r)return Math.round(i/r)+"d";if(i>=n)return Math.round(i/n)+"h";if(i>=t)return Math.round(i/t)+"m";if(i>=e)return Math.round(i/e)+"s";return i+"ms"}(s);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(s))},Go}function Qo(){return jo||(jo=1,function(e,t){var n;function r(e){function r(){if(r.enabled){var e=r,i=+new Date,o=i-(n||i);e.diff=o,e.prev=n,e.curr=i,n=i;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=t.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var u=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,(function(n,r){if("%%"===n)return n;u++;var i=t.formatters[r];if("function"==typeof i){var o=s[u];n=i.call(e,o),s.splice(u,1),u--}return n})),t.formatArgs.call(e,s),(r.log||t.log||console.log.bind(console)).apply(e,s)}}return r.namespace=e,r.enabled=t.enabled(e),r.useColors=t.useColors(),r.color=function(e){var n,r=0;for(n in e)r=(r<<5)-r+e.charCodeAt(n),r|=0;return t.colors[Math.abs(r)%t.colors.length]}(e),"function"==typeof t.init&&t.init(r),r}(t=Ko.exports=r.debug=r.default=r).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){t.save(e),t.names=[],t.skips=[];for(var n=("string"==typeof e?e:"").split(/[\s,]+/),r=n.length,i=0;i<r;i++)n[i]&&("-"===(e=n[i].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=Ho(),t.names=[],t.skips=[],t.formatters={}}(0,Ko.exports)),Ko.exports}var Vo,qo,Xo,Wo={exports:{}};function Yo(){return Vo||(Vo=1,function(){function e(t){if(t)return function(t){for(var n in e.prototype)t[n]=e.prototype[n];return t}(t)}Wo.exports=e,e.prototype.on=e.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},e.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},e.prototype.off=e.prototype.removeListener=e.prototype.removeAllListeners=e.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var i=0;i<r.length;i++)if((n=r[i])===t||n.fn===t){r.splice(i,1);break}return 0===r.length&&delete this._callbacks["$"+e],this},e.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){r=0;for(var i=(n=n.slice(0)).length;r<i;++r)n[r].apply(this,t)}return this},e.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},e.prototype.hasListeners=function(e){return!!this.listeners(e).length}}()),Wo.exports}var Jo=function(){if(Xo)return qo;Xo=1;var e=Eo().v4,t=Bo(),n=No(),r=function(){if(xo)return Co;xo=1;var e=No(),t={setTimeout:function(e,t){return window.setTimeout(e,t)},clearTimeout:function(e){return window.clearTimeout(e)},Date:window.Date},n=t,r={ASAP:1,RESCHEDULE:2,ABANDON:3};function i(){this.tasks={},this.nextId=1}return i.prototype.now=function(){return+new n.Date},i.prototype.run=function(e,t,i){var o=this.nextId++;return this.tasks[o]=n.setTimeout(this._handle(o,e,t,i||r.ASAP),t),o},i.prototype.cancel=function(e){this.tasks[e]&&(n.clearTimeout(this.tasks[e]),delete this.tasks[e])},i.prototype.cancelAll=function(){e(n.clearTimeout,this.tasks),this.tasks={}},i.prototype._handle=function(e,t,n,i){var o=this,s=o.now();return function(){if(delete o.tasks[e],!(i>=r.RESCHEDULE&&s+2*n<o.now()))return t();i===r.RESCHEDULE&&o.run(t,n,i)}},i.setClock=function(e){n=e},i.resetClock=function(){n=t},i.Modes=r,Co=i}(),i=(Fo||(Fo=1,function(e,t){function n(){var e;try{e=t.storage.debug}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e}(t=zo.exports=Qo()).log=function(){return"object"===("undefined"==typeof console?"undefined":f(console))&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),n){var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var i=0,o=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(i++,"%c"===e&&(o=i))})),e.splice(o,0,r)}},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=n,t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(n())}(0,zo.exports)),zo.exports)("localstorage-retry");function o(e,t){return function(){return e.apply(t,arguments)}}function s(n,i,s){"function"==typeof i&&(s=i),this.name=n,this.id=e(),this.fn=s,this.maxItems=i.maxItems||1/0,this.maxAttempts=i.maxAttempts||1/0,this.backoff={MIN_RETRY_DELAY:i.minRetryDelay||1e3,MAX_RETRY_DELAY:i.maxRetryDelay||3e4,FACTOR:i.backoffFactor||2,JITTER:i.backoffJitter||0},this.timeouts={ACK_TIMER:1e3,RECLAIM_TIMER:3e3,RECLAIM_TIMEOUT:1e4,RECLAIM_WAIT:500},this.keys={IN_PROGRESS:"inProgress",QUEUE:"queue",RECLAIM_START:"reclaimStart",RECLAIM_END:"reclaimEnd",ACK:"ack"},this._schedule=new r,this._processId=0,this._store=new t(this.name,this.id,this.keys),this._store.set(this.keys.IN_PROGRESS,{}),this._store.set(this.keys.QUEUE,[]),this._ack=o(this._ack,this),this._checkReclaim=o(this._checkReclaim,this),this._processHead=o(this._processHead,this),this._running=!1}return Yo()(s.prototype),s.prototype.start=function(){this._running&&this.stop(),this._running=!0,this._ack(),this._checkReclaim(),this._processHead()},s.prototype.stop=function(){this._schedule.cancelAll(),this._running=!1},s.prototype.shouldRetry=function(e,t){return!(t>this.maxAttempts)},s.prototype.getDelay=function(e){var t=this.backoff.MIN_RETRY_DELAY*Math.pow(this.backoff.FACTOR,e);if(this.backoff.JITTER){var n=Math.random(),r=Math.floor(n*this.backoff.JITTER*t);Math.floor(10*n)<5?t-=r:t+=r}return Number(Math.min(t,this.backoff.MAX_RETRY_DELAY).toPrecision(1))},s.prototype.addItem=function(t){this._enqueue({item:t,attemptNumber:0,time:this._schedule.now(),id:e()})},s.prototype.requeue=function(t,n,r,i){this.shouldRetry(t,n,r)?this._enqueue({item:t,attemptNumber:n,time:this._schedule.now()+this.getDelay(n),id:i||e()}):this.emit("discard",t,n)},s.prototype._enqueue=function(e){var t=this._store.get(this.keys.QUEUE)||[];(t=t.slice(-(this.maxItems-1))).push(e),t=t.sort((function(e,t){return e.time-t.time})),this._store.set(this.keys.QUEUE,t),this._running&&this._processHead()},s.prototype._processHead=function(){var t=this,o=this._store;this._schedule.cancel(this._processId);var s=o.get(this.keys.QUEUE)||[],a=o.get(this.keys.IN_PROGRESS)||{},u=this._schedule.now(),c=[];function l(e,n){c.push({item:e.item,done:function(r,i){var s=o.get(t.keys.IN_PROGRESS)||{};delete s[n],o.set(t.keys.IN_PROGRESS,s),t.emit("processed",r,i,e.item),r&&t.requeue(e.item,e.attemptNumber+1,r,e.id)}})}for(var f=Object.keys(a).length;s.length&&s[0].time<=u&&f++<t.maxItems;){var h=s.shift(),d=e();a[d]={item:h.item,attemptNumber:h.attemptNumber,time:t._schedule.now()},l(h,d)}o.set(this.keys.QUEUE,s),o.set(this.keys.IN_PROGRESS,a),n((function(e){try{t.fn(e.item,e.done)}catch(e){i("Process function threw error: "+e)}}),c),s=o.get(this.keys.QUEUE)||[],this._schedule.cancel(this._processId),s.length>0&&(this._processId=this._schedule.run(this._processHead,s[0].time-u,r.Modes.ASAP))},s.prototype._ack=function(){this._store.set(this.keys.ACK,this._schedule.now()),this._store.set(this.keys.RECLAIM_START,null),this._store.set(this.keys.RECLAIM_END,null),this._schedule.run(this._ack,this.timeouts.ACK_TIMER,r.Modes.ASAP)},s.prototype._checkReclaim=function(){var e=this;n((function(t){t.id!==e.id&&(e._schedule.now()-t.get(e.keys.ACK)<e.timeouts.RECLAIM_TIMEOUT||function(t){t.set(e.keys.RECLAIM_START,e.id),t.set(e.keys.ACK,e._schedule.now()),e._schedule.run((function(){t.get(e.keys.RECLAIM_START)===e.id&&(t.set(e.keys.RECLAIM_END,e.id),e._schedule.run((function(){t.get(e.keys.RECLAIM_END)===e.id&&t.get(e.keys.RECLAIM_START)===e.id&&e._reclaim(t.id)}),e.timeouts.RECLAIM_WAIT,r.Modes.ABANDON))}),e.timeouts.RECLAIM_WAIT,r.Modes.ABANDON)}(t))}),function(n){for(var r=[],i=e._store.getOriginalEngine(),o=0;o<i.length;o++){var s=i.key(o);if(null!==s){var a=s.split(".");3===a.length&&a[0]===n&&"ack"===a[2]&&r.push(new t(n,a[1],e.keys))}}return r}(this.name)),this._schedule.run(this._checkReclaim,this.timeouts.RECLAIM_TIMER,r.Modes.RESCHEDULE)},s.prototype._reclaim=function(r){var i=this,o=new t(this.name,r,this.keys),s={queue:this._store.get(this.keys.QUEUE)||[]},a={inProgress:o.get(this.keys.IN_PROGRESS)||{},queue:o.get(this.keys.QUEUE)||[]},u=[],c=function(t,r){n((function(t){var n=t.id||e();u.indexOf(n)>=0?i.emit("duplication",t.item,t.attemptNumber):(s.queue.push({item:t.item,attemptNumber:t.attemptNumber+r,time:i._schedule.now(),id:n}),u.push(n))}),t)};c(a.queue,0),c(a.inProgress,1),s.queue=s.queue.sort((function(e,t){return e.time-t.time})),this._store.set(this.keys.QUEUE,s.queue);try{this._clearOtherQueue(o,1)}catch(e){if("NS_ERROR_STORAGE_BUSY"===e.name||"NS_ERROR_STORAGE_BUSY"===e.code||2153971713===e.code)try{this._clearOtherQueue(o,40)}catch(e){console.error(e)}else console.error(e)}this._processHead()},s.prototype._clearOtherQueue=function(e,t){var n=this;setTimeout((function(){e.remove(n.keys.IN_PROGRESS),setTimeout((function(){e.remove(n.keys.QUEUE),setTimeout((function(){e.remove(n.keys.RECLAIM_START),setTimeout((function(){e.remove(n.keys.RECLAIM_END),setTimeout((function(){e.remove(n.keys.ACK)}),t)}),t)}),t)}),t)}),t)},qo=s}(),$o=p(Jo),Zo={maxRetryDelay:36e4,minRetryDelay:1e3,backoffFactor:2,maxAttempts:10,maxItems:100},es=function(){return n((function e(){t(this,e),this.url="",this.writeKey=""}),[{key:"init",value:function(e,t,n){var r=this;this.url=t,this.writeKey=e,n&&o(Zo,n),this.payloadQueue=new $o("rudder",Zo,(function(e,t){e.message.sentAt=eo(),r.processQueueElement(e.url,e.headers,e.message,3e4,(function(e,n){if(e)return t(e);t(null,n)}))})),this.payloadQueue.start()}},{key:"processQueueElement",value:function(e,t,n,r,i){try{var o=new XMLHttpRequest;for(var s in o.open("POST",e,!0),t)o.setRequestHeader(s,t[s]);o.timeout=r,o.ontimeout=i,o.onerror=i,o.onreadystatechange=function(){if(4===o.readyState)if(429===o.status||o.status>=500&&o.status<600){var t="".concat(Fn,' "').concat(o.status,'" status text: "').concat(o.statusText,'" for URL: "').concat(e,'"'),n=new Error(t);qn(n),i(n)}else i(null,o.status)};var a=Qn(n,!0);a?o.send(a):Bn.error("Invalid payload: Event dropped")}catch(e){i(e)}}},{key:"enqueue",value:function(e,t){var n={"Content-Type":"application/json",Authorization:"Basic ".concat(btoa("".concat(this.writeKey,":"))),AnonymousId:btoa(e.anonymousId)};this.payloadQueue.addItem({url:"".concat(this.url,"/v1/").concat(t),headers:n,message:e})}}])}(),ts="queue",ns=64e3,rs=function(){return n((function e(){t(this,e),this.storage=pi,this.maxItems=10,this.flushQueueTimeOut=void 0,this.timeOutActive=!1,this.flushQueueTimeOutInterval=6e5,this.url="",this.writekey="",this.queueName="".concat(ts,".").concat(Date.now())}),[{key:"sendQueueDataForBeacon",value:function(){this.sendDataFromQueueAndDestroyQueue()}},{key:"init",value:function(e,t,n){this.url=t,this.writekey=e,n.maxItems&&(this.maxItems=n.maxItems),n.flushQueueInterval&&(this.flushQueueTimeOutInterval=n.flushQueueInterval),this.sendQueueDataForBeacon=this.sendQueueDataForBeacon.bind(this),this.attachListeners()}},{key:"attachListeners",value:function(){var e=this;window.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e.sendQueueDataForBeacon()}))}},{key:"getQueue",value:function(){return this.storage.get(this.queueName)}},{key:"setQueue",value:function(e){this.storage.set(this.queueName,e)}},{key:"enqueue",value:function(e){var t=this.getQueue()||[];(t=t.slice(-(this.maxItems-1))).push(e);var n=t.slice(0),r={batch:n,sentAt:eo()},i=Qn(r,!0);i&&i.length>ns&&(n=t.slice(0,t.length-1),this.flushQueue(n),(t=this.getQueue()).push(e)),this.setQueue(t),this.setTimer(),t.length===this.maxItems&&this.flushQueue(n)}},{key:"sendDataFromQueueAndDestroyQueue",value:function(){this.sendDataFromQueue(),this.storage.remove(this.queueName)}},{key:"sendDataFromQueue",value:function(){var e=this.getQueue();if(e&&e.length>0){var t=e.slice(0,e.length);this.flushQueue(t)}}},{key:"flushQueue",value:function(e){if(e&&e.length>0){var t=eo();e.forEach((function(e){e.sentAt=t}));var n=Qn({batch:e,sentAt:t},!0);if(null!==n){var r=new Blob([n],{type:"text/plain"}),i="".concat(this.url,"?writeKey=").concat(this.writekey);try{"function"!=typeof navigator.sendBeacon&&qn(new Error("Beacon API is not supported by browser")),navigator.sendBeacon(i,r)||qn(new Error("Unable to queue data to browser's beacon queue"))}catch(e){e.message="".concat(e.message," - While sending Beacon data to: ").concat(i),qn(e)}}else Bn.error("Invalid payload: Event dropped")}this.setQueue([]),this.clearTimer()}},{key:"setTimer",value:function(){this.timeOutActive||(this.flushQueueTimeOut=setTimeout(this.sendDataFromQueue.bind(this),this.flushQueueTimeOutInterval),this.timeOutActive=!0)}},{key:"clearTimer",value:function(){this.timeOutActive&&(clearTimeout(this.flushQueueTimeOut),this.timeOutActive=!1)}}])}(),is=function(){return n((function e(){t(this,e),this.queue=void 0}),[{key:"initialize",value:function(e,t,n){var r={},i=$i(t);null!=n&&n.useBeacon&&navigator.sendBeacon?(n.beaconQueueOptions&&null!=n.beaconQueueOptions&&"object"===f(n.beaconQueueOptions)&&(r=n.beaconQueueOptions),i="".concat(i,"/beacon/v1/batch"),this.queue=new rs):(null!=n&&n.useBeacon&&Bn.info("[EventRepository] sendBeacon feature not available in this browser :: fallback to XHR"),null!=n&&n.queueOptions&&null!=n.queueOptions&&"object"===f(n.queueOptions)&&(r=n.queueOptions),this.queue=new es),this.queue.init(e,i,r)}},{key:"enqueue",value:function(e,t){var n=e.getElementContent();n.originalTimestamp=n.originalTimestamp||eo(),n.sentAt=eo();var r=Qn(n,!0);r&&r.length>32e3&&Bn.error("[EventRepository] enqueue:: message length greater 32 Kb ",n),this.queue.enqueue(n,t)}}])}(),os=new is,ss={maxRetryDelay:36e4,minRetryDelay:1e3,backoffFactor:2,maxAttempts:1/0},as=function(){return n((function e(){t(this,e),this.callback=void 0,this.processQueueElements=!1}),[{key:"init",value:function(e,t){var n=this;e&&o(ss,e),t&&(this.callback=t),this.payloadQueue=new $o("rs_events",ss,(function(e,t){n.processQueueElement(e.type,e.rudderElement,(function(e,n){if(e)return t(e);t(null,n)}))})),this.payloadQueue.start()}},{key:"activateProcessor",value:function(){this.processQueueElements=!0}},{key:"processQueueElement",value:function(e,t,n){try{this.processQueueElements?(Object.setPrototypeOf(t,bo.prototype),this.callback(e,t),n(null)):n(new Error("The queue elements are not ready to be processed yet"))}catch(e){n(e)}}},{key:"enqueue",value:function(e,t){this.payloadQueue.addItem({type:e,rudderElement:t})}}])}(),us=function(){return navigator&&navigator.language},cs=function(){return navigator&&navigator.userAgent};function ls(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e=e.endsWith("..")?e.substr(0,e.length-2):e,decodeURIComponent(atob(e).split("").map((function(e){return"%".concat("00".concat(e.charCodeAt(0).toString(16)).slice(-2))})).join(""))}var fs=/^[\w.-]+$/,hs="*";function ds(e,t,n,r){var i=function(e,t){return[e,(new Date).getTimezoneOffset(),t].join(hs)}(n,r),o=t||0,s=function(e){for(var t=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}(),n=-1,r=0;r<e.length;r++)n=n>>>8^t[255&(n^e.charCodeAt(r))];return~n>>>0}([i,Math.floor(Date.now()/6e4)-o,e].join(hs));return s.toString(36)}function ps(e){var t=function(e){var t=e.split(hs),n=t.length%2==0;return t.length<4||!n||1!==Number(t.shift())?null:{checksum:t.shift(),serializedIds:t.join(hs)}}(e);if(!t)return null;var n=t.checksum,r=t.serializedIds;return function(e,t){for(var n=cs(),r=us(),i=0;i<=1;i+=1)if(ds(e,i,n,r)===t)return!0;return!1}(r,n)?function(e){for(var t={},n=e.split(hs),r=0;r<n.length;r+=2){var i=n[r];if(fs.test(i)){var o=ls(n[r+1]);t[i]=o}}return t}(r):null}var gs=function(){return n((function e(){var n=this;if(t(this,e),i(this,"isInitialized",!1),window.OneTrust&&window.OnetrustActiveGroups){this.userSetConsentGroupIds=window.OnetrustActiveGroups.split(",").filter((function(e){return e}));var r=window.OneTrust.GetDomainData().Groups;this.userSetConsentGroupNames=[],this.userDeniedConsentGroupIds=[],r.forEach((function(e){var t=e.CustomGroupId,r=e.GroupName;n.userSetConsentGroupIds.includes(t)?n.userSetConsentGroupNames.push(r.toUpperCase().trim()):n.userDeniedConsentGroupIds.push(t)})),this.userSetConsentGroupIds=this.userSetConsentGroupIds.map((function(e){return e.toUpperCase()})),this.isInitialized=!0}else Bn.error("OneTrust resources are not accessible.")}),[{key:"isEnabled",value:function(e){var t=this;try{if(!this.isInitialized)return!0;var n=e.oneTrustCookieCategories;if(!n)return!0;var r=n.map((function(e){return e.oneTrustCookieCategory})).filter((function(e){return e}));return r.every((function(e){return t.userSetConsentGroupIds.includes(e.toUpperCase().trim())||t.userSetConsentGroupNames.includes(e.toUpperCase().trim())}))}catch(e){return Bn.error("Error during onetrust cookie consent management ".concat(e)),!0}}},{key:"getDeniedList",value:function(){return this.isInitialized?this.userDeniedConsentGroupIds:[]}}])}(),vs=function(){return n((function e(){var n=this;if(t(this,e),i(this,"updatePurposes",(function(e){e&&Object.entries(e).forEach((function(e){var t=e[0];e[1]?n.userConsentedPurposes.push(t):n.userDeniedPurposes.push(t)}))})),this.userConsentedPurposes=[],this.userDeniedPurposes=[],window.updateKetchConsent=function(e){e&&(n.userConsentedPurposes=[],n.userDeniedPurposes=[],n.updatePurposes(e))},window.getKetchUserConsentedPurposes=function(){return n.userConsentedPurposes.slice()},window.getKetchUserDeniedPurposes=function(){return n.userDeniedPurposes.slice()},window.ketchConsent)this.updatePurposes(window.ketchConsent);else{var r=this.getConsent();this.updatePurposes(r)}}),[{key:"isEnabled",value:function(e){var t=this;try{var n=e.ketchConsentPurposes;if(!n||0===n.length)return!0;var r=n.map((function(e){return e.purpose})).filter((function(e){return e}));return r.some((function(e){return t.userConsentedPurposes.includes(e.trim())}))}catch(e){return Bn.error("Error occured checking ketch consent state ".concat(e)),!0}}},{key:"getDeniedList",value:function(){return this.userDeniedPurposes}},{key:"getConsent",value:function(){var e=li.get("_ketch_consent_v1_");if(e){var t;try{t=JSON.parse(atob(e))}catch(e){return void Bn.error("Error occurred while parsing consent cookie ".concat(e))}if(t){var n={};return Object.entries(t).forEach((function(e){var t=e[0],r=e[1];null!=r&&r.status&&(n[t]="granted"===r.status)})),n}}}}])}(),ys=function(e){var t,n;return null!=e&&null!==(t=e.oneTrust)&&void 0!==t&&t.enabled?new gs:null!=e&&null!==(n=e.ketch)&&void 0!==n&&n.enabled?new vs:null},ms=function(){return n((function e(){t(this,e),this.storage=Di,this.timeout=18e5,this.sessionInfo=this.storage.getSessionInfo()||{autoTrack:!0}}),[{key:"initialize",value:function(e){try{var t;if(this.sessionInfo.autoTrack=!(!1===(null==e||null===(t=e.sessions)||void 0===t?void 0:t.autoTrack)||this.sessionInfo.manualTrack),null!=e&&e.sessions&&!isNaN(e.sessions.timeout)){var n=e.sessions.timeout;0===n&&(Bn.warn("[Session]:: Provided timeout value 0 will disable the auto session tracking feature."),this.sessionInfo.autoTrack=!1),n>0&&n<1e4&&Bn.warn('[Session]:: It is not advised to set "timeout" less than 10 seconds'),this.timeout=n}this.sessionInfo.autoTrack?this.startAutoTracking():!1!==this.sessionInfo.autoTrack||this.sessionInfo.manualTrack||this.end()}catch(e){qn(e)}}},{key:"isValidSession",value:function(e){return e<=this.sessionInfo.expiresAt}},{key:"generateSessionId",value:function(){return Date.now()}},{key:"startAutoTracking",value:function(){var e=Date.now();this.isValidSession(e)||(this.sessionInfo={},this.sessionInfo.id=e,this.sessionInfo.expiresAt=e+this.timeout,this.sessionInfo.sessionStart=!0,this.sessionInfo.autoTrack=!0),this.storage.setSessionInfo(this.sessionInfo)}},{key:"validateSessionId",value:function(e){if("number"==typeof e&&e%1==0){var t;if(!(((t=e)?t.toString().length:0)<10))return e;Bn.error('[Session]:: "sessionId" should at least be "'.concat(10,'" digits long'))}else Bn.error('[Session]:: "sessionId" should only be a positive integer')}},{key:"start",value:function(e){var t=e?this.validateSessionId(e):this.generateSessionId();this.sessionInfo={id:t||this.generateSessionId(),sessionStart:!0,manualTrack:!0},this.storage.setSessionInfo(this.sessionInfo)}},{key:"getSessionId",value:function(){return this.sessionInfo.autoTrack&&this.isValidSession(Date.now())||this.sessionInfo.manualTrack?this.sessionInfo.id:null}},{key:"end",value:function(){this.sessionInfo={},this.storage.removeSessionInfo()}},{key:"getSessionInfo",value:function(){var e={};if(this.sessionInfo.autoTrack||this.sessionInfo.manualTrack){if(this.sessionInfo.autoTrack){var t=Date.now();this.isValidSession(t)?this.sessionInfo.expiresAt=t+this.timeout:this.startAutoTracking()}this.sessionInfo.sessionStart&&(e.sessionStart=!0,this.sessionInfo.sessionStart=!1),e.sessionId=this.sessionInfo.id,this.storage.setSessionInfo(this.sessionInfo)}return e}},{key:"reset",value:function(){var e=this.sessionInfo,t=e.manualTrack;e.autoTrack?(this.sessionInfo={},this.startAutoTracking()):t&&this.start()}}])}(),As=new ms,bs=["integrations","anonymousId","originalTimestamp"],ks=function(e,t,n){var r="";if(n){if(!(r=$i(n))){var i="CDN base URL for integrations is not valid";throw qn({message:"[Analytics] load:: ".concat(i)}),Error("Failed to load Rudder SDK: ".concat(i))}return r}var o=function(){for(var e,t=document.getElementsByTagName("script"),n=0;n<t.length;n+=1){var r=$i(t[n].getAttribute("src"));if(r&&r.match(/^.*rudder-analytics?(\.min)?\.js$/)){e=r;break}}return{sdkURL:e}}(),s=o.sdkURL;return r=s?s.split("/").slice(0,-1).concat(Hi).join("/"):Qi,t&&(r=r.replace(Ki,e)),r},Is="rs-bugsnag",Es=["rudder-analytics.min.js","rudder-analytics.js"].concat(c(Object.keys(D).map((function(e){return"".concat(D[e],".min.js")}))),c(Object.keys(D).map((function(e){return"".concat(D[e],".js")})))),Ss=function(){return n((function e(n,r,i){t(this,e),this.pluginName=Is,this.sourceId=n,this.writeKey=r,this.onClientReady=i,this.initClientOnLibReadyInterval=void 0,this.init()}),[{key:"init",value:function(){var e;null===(e=window.RudderStackGlobals)||void 0===e||e[Kn]}},{key:"initClient",value:function(){var e,t=window.bugsnag;this.client=t({apiKey:"0d96a60df267f4a13f808bbaa54e535c",appVersion:"2.51.1",metaData:{SDK:{name:"JS",installType:"npm"}},beforeSend:this.onError(),autoTrackSessions:!1,collectUserIp:!1,enabledBreadcrumbTypes:["error","log","user"],maxEvents:100,releaseStage:(e=window.location.hostname,e&&["www.test-host.com","localhost","127.0.0.1","[::1]"].includes(e)?"development":"production"),networkBreadcrumbsEnabled:!1,user:{id:this.writeKey}}),this.onClientReady()}},{key:"onError",value:function(){var e=this.sourceId;return function(t){try{return!!function(e){var t=Nr(e,"stacktrace.0.file");if(!t||"string"!=typeof t)return!1;var n=t.substring(t.lastIndexOf("/")+1);return Es.includes(n)}(t)&&(function(e,t){e.updateMetaData("source",{metadataSource:t});var n=e.errorMessage;e.context=n,n.includes("error in script loading")&&(e.context="Script load failures"),e.severity="error"}(t,e),!0)}catch(e){return!1}}}},{key:"notify",value:function(e){this.client&&this.client.notify(e)}},{key:"leaveBreadcrumb",value:function(e){this.client&&this.client.leaveBreadcrumb(e)}}])}(),ws=Is,Ts=[Is],Os=function(){return n((function e(n){t(this,e),this.isEnabled=!1,this.providerName=ws,this.provider=void 0,this.logger=n,this.onClientReady=this.onClientReady.bind(this),this.exposeToGlobal=this.exposeToGlobal.bind(this)}),[{key:"init",value:function(e,t,n){e&&t?!0===function(e){return Nr(e,"statsCollection.errors.enabled")||!1}(e)?(this.enable(),this.setProviderName(function(e){return Nr(e,"statsCollection.errors.provider")}(e)),this.initProvider(e,t,n)):this.disable():this.logger.error("[Analytics] ErrorReporting :: Invalid configuration or missing source id provided.")}},{key:"enable",value:function(){this.isEnabled=!0}},{key:"disable",value:function(){this.isEnabled=!1}},{key:"setProviderName",value:function(e){e?!e||Ts.includes(e)?this.providerName=e:this.logger.error("[Analytics] ErrorReporting :: Invalid error reporting provider value. Value should be one of: ".concat(Ts.join(","))):this.providerName=ws}},{key:"initProvider",value:function(e,t,n){if(this.providerName===Is)this.provider=new Ss(t,n,this.onClientReady)}},{key:"onClientReady",value:function(){this.exposeToGlobal()}},{key:"exposeToGlobal",value:function(){window.RudderStackGlobals||(window.RudderStackGlobals={}),window.RudderStackGlobals[Kn]=this}},{key:"leaveBreadcrumb",value:function(e){if(this.provider)try{this.provider.leaveBreadcrumb(e)}catch(e){this.logger.error("[Analytics] ErrorReporting :: leaveBreadcrumb method ".concat(e.toString()))}}},{key:"notify",value:function(e){if(this.provider)try{this.provider.notify(e)}catch(e){this.logger.error("[Analytics] ErrorReporting :: notify method ".concat(e.toString()))}}}])}(),_s=new(function(){return n((function e(){t(this,e),this.retryAttempt=3,this.queue=[],this.isTransformationProcessing=!1,this.authToken=null}),[{key:"init",value:function(e,t,n){this.dataPlaneUrl=$i(t),this.writeKey=e,this.authToken=n||this.authToken,this.start()}},{key:"enqueue",value:function(e,t,n){this.queue.push({event:e,destinationIds:t,cb:n})}},{key:"sendEventForTransformation",value:function(e,t){var n=this;return new Promise((function(r,i){var o="".concat(n.dataPlaneUrl,"/transform"),s={"Content-Type":"application/json",Authorization:"Basic ".concat(btoa("".concat(n.writeKey,":")))};try{var a=new XMLHttpRequest;a.open("POST",o,!0),Object.keys(s).forEach((function(e){return a.setRequestHeader(e,s[e])})),a.timeout=1e4,a.onreadystatechange=function(){if(4===a.readyState)try{var o=a.status,s=a.response;switch(o){case 200:return s=JSON.parse(s),void r({status:o,transformedPayload:s.transformedBatch});case 400:var u=s?"".concat(s):"Invalid request payload";return void r({status:o,errorMessage:u});case 404:return void r({status:o});default:if(t>0){var c=t-1;setTimeout((function(){return n.sendEventForTransformation(e,c).then(r).catch(i)}),500*Math.pow(2,n.retryAttempt-c))}else r({status:o,errorMessage:"Retries exhausted"})}}catch(e){i(e)}};var u=Qn(e,!0);u?a.send(u):Bn.error("Invalid payload: Event dropped")}catch(e){i(e)}}))}},{key:"checkQueueLengthAndProcess",value:function(){this.queue.length>0&&this.process()}},{key:"process",value:function(){var e=this;this.isTransformationProcessing=!0;var t,n,r=this.queue.shift(),i=(t=r.event,n=r.destinationIds,{metadata:{"Custom-Authorization":this.authToken},batch:[{orderNo:Date.now(),destinationIds:n,event:t.message}]});this.sendEventForTransformation(i,this.retryAttempt).then((function(t){e.isTransformationProcessing=!1,r.cb(t),e.checkQueueLengthAndProcess()})).catch((function(t){qn("string"==typeof t?t:t.message),e.isTransformationProcessing=!1,r.cb({status:0}),e.checkQueueLengthAndProcess()}))}},{key:"start",value:function(){var e=this;setInterval((function(){e.isTransformationProcessing||e.checkQueueLengthAndProcess()}),100)}},{key:"setAuthToken",value:function(e){this.authToken=e}}])}()),Ps=function(){return n((function e(){t(this,e),this.initialized=!1,this.clientIntegrations=[],this.loadOnlyIntegrations={},this.clientIntegrationObjects=void 0,this.successfullyLoadedIntegration=[],this.failedToBeLoadedIntegration=[],this.toBeProcessedArray=[],this.toBeProcessedByIntegrationArray=[],this.storage=Di,this.eventRepository=os,this.preProcessQueue=new as,this.sendAdblockPage=!1,this.sendAdblockPageOptions={},this.clientSuppliedCallbacks={},this.readyCallbacks=[],this.methodToCallbackMapping={syncPixel:"syncPixelCallback"},this.loaded=!1,this.loadIntegration=!0,this.bufferDataPlaneEventsUntilReady=!1,this.dataPlaneEventsBufferTimeout=1e4,this.integrationsData={},this.dynamicallyLoadedIntegrations={},this.destSDKBaseURL=Qi,this.cookieConsentOptions={},this.logLevel=void 0,this.clientIntegrationsReady=!1,this.uSession=As,this.version="2.51.1",this.lockIntegrationsVersion=!1,this.errorReporting=new Os(Bn),this.deniedConsentIds=[],this.transformationHandler=_s}),[{key:"initializeUser",value:function(e){this.userId=this.storage.getUserId()||"",this.storage.setUserId(this.userId),this.userTraits={};var t=this.storage.getUserTraits();null===t||"object"!==f(t)||Array.isArray(t)||(this.userTraits=t),this.storage.setUserTraits(this.userTraits),this.groupId=this.storage.getGroupId()||"",this.storage.setGroupId(this.groupId),this.groupTraits={};var n=this.storage.getGroupTraits();null===n||"object"!==f(n)||Array.isArray(n)||(this.groupTraits=n),this.storage.setGroupTraits(this.groupTraits),this.anonymousId=this.getAnonymousId(e),this.storage.setAnonymousId(this.anonymousId)}},{key:"setInitialPageProperties",value:function(){if(null==this.storage.getInitialReferrer()&&null==this.storage.getInitialReferringDomain()){var e=uo();this.storage.setInitialReferrer(e),this.storage.setInitialReferringDomain(co(e))}}},{key:"allModulesInitialized",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Promise((function(n){e.clientIntegrations.every((function(t){return null!=e.dynamicallyLoadedIntegrations["".concat(D[t.name]).concat("_RS")]}))||t>=2e4?n(e):e.pause(Un).then((function(){return e.allModulesInitialized(t+Un).then(n)}))}))}},{key:"executeReadyCallback",value:function(){this.readyCallbacks.forEach((function(e){return e()}))}},{key:"integrationSDKLoaded",value:function(e,t){var n;return(null===(n=window[e])||void 0===n||null===(n=n[t])||void 0===n?void 0:n.prototype)&&void 0!==window[e][t].prototype.constructor}},{key:"processResponse",value:function(e,t){var n,r=this;try{var i=t;try{if("string"==typeof t&&(i=JSON.parse(t)),!i||"object"!==f(i)||Array.isArray(i))return void Bn.error("Invalid source configuration")}catch(e){return void qn(e)}try{null!==(n=window.chrome)&&void 0!==n&&null!==(n=n.runtime)&&void 0!==n&&n.id||this.errorReporting.init(i.source.config,i.source.id,this.writeKey)}catch(e){qn(e)}if(this.serverUrl=ao(i,this.serverUrl,this.options),this.eventRepository.initialize(this.writeKey,this.serverUrl,this.options),this.transformationHandler.init(this.writeKey,this.serverUrl,this.storage.getAuthToken()),i.source.destinations.forEach((function(e){e.enabled&&this.clientIntegrations.push({name:e.destinationDefinition.name,config:e.config,destinationInfo:{shouldApplyDeviceModeTransformation:e.shouldApplyDeviceModeTransformation||!1,propagateEventsUntransformedOnError:e.propagateEventsUntransformedOnError||!1,destinationId:e.id}})}),this),this.clientIntegrations=io(this.loadOnlyIntegrations,this.clientIntegrations),Object.keys(this.cookieConsentOptions).length>0)try{var o=ys(this.cookieConsentOptions);this.deniedConsentIds=null==o?void 0:o.getDeniedList(),this.clientIntegrations=this.clientIntegrations.filter((function(e){return!o||o&&o.isEnabled(e.config)}))}catch(e){qn(e)}this.loaded=!0,this.options&&"function"==typeof this.options.onLoaded&&this.options.onLoaded(this),function(e){if(e.toBeProcessedArray.length>0)for(;e.toBeProcessedArray.length>0;){var t=c(e.toBeProcessedArray[0]);e.toBeProcessedArray.shift();var n=t[0];t.shift(),e[n].apply(e,c(t))}}(this),this.clientIntegrations=this.clientIntegrations.filter((function(e){return!!D[e.name]||(Bn.error("[Analytics] Integration:: ".concat(e.name," not available for initialization")),!1)})),this.bufferDataPlaneEventsUntilReady&&setTimeout((function(){r.processBufferedCloudModeEvents()}),this.dataPlaneEventsBufferTimeout),this.errorReporting.leaveBreadcrumb("Starting device-mode initialization"),this.clientIntegrations.forEach((function(e){var t=D[e.name],n="".concat(t).concat("_RS"),i="".concat(r.destSDKBaseURL,"/").concat(t,".min.js");window.hasOwnProperty(n)||function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{if(document.getElementById(e))return;var r=document.createElement("script");r.src=t,r.async=void 0===n.async||n.async,r.type="text/javascript",r.id=e,!0!==n.skipDatasetAttributes&&(r.setAttribute("data-loader",jn),void 0!==n.isNonNativeSDK&&r.setAttribute("data-isNonNativeSDK",n.isNonNativeSDK));var i=document.getElementsByTagName("head");if(i.length>0)i[0].insertBefore(r,i[0].firstChild);else{var o=document.getElementsByTagName("script")[0];o.parentNode.insertBefore(r,o)}}catch(o){qn(o)}}(n,i,{isNonNativeSDK:!0});var o=r,s=setInterval((function(){if(o.integrationSDKLoaded(n,t)){var i,a=window[n];clearInterval(s);try{var u="[Analytics] processResponse :: trying to initialize integration name:: ".concat(n);r.errorReporting.leaveBreadcrumb(u),(i=new a[t](e.config,o,e.destinationInfo)).init(),o.isInitialized(i).then((function(){o.dynamicallyLoadedIntegrations[n]=a[t]}))}catch(e){var c="[Analytics] 'integration.init()' failed :: ".concat(n," :: ").concat(e.message);qn(e,c),o.failedToBeLoadedIntegration.push(i)}}}),100);setTimeout((function(){clearInterval(s)}),Gn)}));var s=this;this.allModulesInitialized().then((function(){if(!s.clientIntegrations||0===s.clientIntegrations.length)return r.clientIntegrationsReady=!0,r.executeReadyCallback(),void(r.toBeProcessedByIntegrationArray=[]);s.replayEvents(s)}))}catch(e){qn(e)}}},{key:"sendDataToDestination",value:function(e,t,n){try{if(e[n]){var r=P(t);e[n](r)}}catch(t){var i="[sendToNative]:: [Destination: ".concat(e.name,"]:: ");qn(t,i)}}},{key:"sendTransformedDataToDestination",value:function(e,t,n){var r=this;try{ro(t.message.integrations);var i=e.map((function(e){return e.destinationId}));this.transformationHandler.enqueue(t,i,(function(i){var o=i.status,s=i.transformedPayload,a=i.errorMessage;e.forEach((function(e){try{switch(o){case 200:var i=s.find((function(t){return t.id===e.destinationId})),u=[];null==i||i.payload.forEach((function(n){if("200"===n.status)u.push(n);else{var r='[DMT]:: Event transformation unsuccessful for destination "'.concat(e.name,'". Reason: '),i="Unknown";"410"===n.status&&(i="Transformation is not available");var o="Dropping the event",s=Bn.error;!0===e.propagateEventsUntransformedOnError&&(o="Sending untransformed event to the destination",s=Bn.warn,u.push({event:t.message})),s("".concat(r," ").concat(i,". ").concat(o,"."))}})),null==u||u.forEach((function(t){ci(t.event)&&r.sendDataToDestination(e,{message:t.event},n)}));break;case 404:Bn.warn("[DMT]:: Transformation server access is denied. The configuration data seems to be out of sync. Sending untransformed event to the destination."),r.sendDataToDestination(e,t,n);break;default:!0===e.propagateEventsUntransformedOnError?(Bn.warn("[DMT]::[Destination: ".concat(e.name,"] :: Transformation request failed with status: ").concat(o," ").concat(a,". Sending untransformed event.")),r.sendDataToDestination(e,t,n)):Bn.error("[DMT]::[Destination: ".concat(e.name,"] :: Transformation request failed with status: ").concat(o," ").concat(a,". Dropping the event."))}}catch(t){t instanceof Error&&(t.message="[DMT]::[Destination:".concat(e.name,"]:: ").concat(t.message)),qn(t)}}))}))}catch(e){e instanceof Error&&(e.message="[DMT]:: ".concat(e.message)),qn(e)}}},{key:"processAndSendEventsToDeviceMode",value:function(e,t,n){var r=this,i=[],o=[];e.forEach((function(e){try{!r.IsEventBlackListed(t.message.event,e.name)&&(e.shouldApplyDeviceModeTransformation?o.push(e):i.push(e))}catch(e){qn(e)}})),i.forEach((function(e){r.sendDataToDestination(e,t,n)})),o.length>0&&this.sendTransformedDataToDestination(o,t,n)}},{key:"queueEventForDataPlane",value:function(e,t){var n=t.message.integrations||{All:!0};t.message.integrations=function(e,t){var n=P(e),r=Object.keys(t).filter((function(e){return!(!0===t[e]&&n[e])})).reduce((function(e,n){return e[n]=t[n],e}),{});return ui(n,r)}(this.integrationsData,n),this.eventRepository.enqueue(t,e)}},{key:"processBufferedCloudModeEvents",value:function(){this.bufferDataPlaneEventsUntilReady&&this.preProcessQueue.activateProcessor()}},{key:"replayEvents",value:function(e){var t,n,r,i=this;this.errorReporting.leaveBreadcrumb("Started replaying buffered events"),e.clientIntegrationObjects=[],e.clientIntegrationObjects=e.successfullyLoadedIntegration;try{e.clientIntegrationObjects.every((function(e){return!e.isReady||e.isReady()}))&&(this.integrationsData=(t=this.integrationsData,n=e.clientIntegrationObjects,r=P(t),n.forEach((function(e){if(e.getDataForIntegrationsObject)try{r=ui(r,e.getDataForIntegrationsObject())}catch(e){Bn.debug("[Analytics: prepareDataForIntegrationsObj]",e)}})),r),e.clientIntegrationsReady=!0,e.executeReadyCallback())}catch(e){qn(e,"Replay buffered cloud mode events")}this.processBufferedCloudModeEvents(),e.toBeProcessedByIntegrationArray.forEach((function(t){var n=t[0];t.shift(),Object.keys(t[0].message.integrations).length>0&&no(t[0].message.integrations);var r=io(t[0].message.integrations,e.clientIntegrationObjects);i.processAndSendEventsToDeviceMode(r,t[0],n)})),e.toBeProcessedByIntegrationArray=[]}},{key:"pause",value:function(e){return new Promise((function(t){setTimeout(t,e)}))}},{key:"isInitialized",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return new Promise((function(r){e.isLoaded()?(t.successfullyLoadedIntegration.push(e),r(t)):n>=Gn?(t.failedToBeLoadedIntegration.push(e),r(t)):t.pause(Un).then((function(){return t.isInitialized(e,n+Un).then(r)}))}))}},{key:"page",value:function(e,t,n,r,i){if(this.errorReporting.leaveBreadcrumb("Page event"),this.loaded){"function"==typeof r&&(i=r,r=null),"function"==typeof n&&(i=n,r=n=null),"function"==typeof t&&(i=t,r=n=t=null),"function"==typeof e&&(i=e,r=n=t=e=null),"object"===f(e)&&null!=e&&null!=e&&(r=t,n=e,t=e=null),"object"===f(t)&&null!=t&&null!=t&&(r=n,n=t,t=null),"string"==typeof e&&"string"!=typeof t&&(t=e,e=null),this.sendAdblockPage&&"RudderJS-Initiated"!==e&&this.sendSampleRequest();var o=P(n),s=P(r),a=(new ko).setType("page").build();o||(o={}),t&&(a.message.name=o.name=t),e&&(a.message.category=o.category=e),a.message.properties=this.getPageProperties(o),this.processAndSendDataToDestinations("page",a,s,i)}else this.toBeProcessedArray.push(["page"].concat(Array.prototype.slice.call(arguments)))}},{key:"track",value:function(e,t,n,r){if(this.errorReporting.leaveBreadcrumb("Track event"),this.loaded){"function"==typeof n&&(r=n,n=null),"function"==typeof t&&(r=t,n=null,t=null);var i=P(t),o=P(n),s=(new ko).setType("track").build();e&&s.setEventName(e),s.setProperty(i||{}),this.processAndSendDataToDestinations("track",s,o,r)}else this.toBeProcessedArray.push(["track"].concat(Array.prototype.slice.call(arguments)))}},{key:"identify",value:function(e,t,n,r){if(this.errorReporting.leaveBreadcrumb("Identify event"),this.loaded){"function"==typeof n&&(r=n,n=null),"function"==typeof t&&(r=t,n=null,t=null),"object"===f(e)&&(n=t,t=e,e=this.userId);var i=oo(e);i&&this.userId&&i!==this.userId&&this.reset(),this.userId=i,this.storage.setUserId(this.userId);var o=P(t),s=P(n);if(o){for(var a in o)this.userTraits[a]=o[a];this.storage.setUserTraits(this.userTraits)}var u=(new ko).setType("identify").build();this.processAndSendDataToDestinations("identify",u,s,r)}else this.toBeProcessedArray.push(["identify"].concat(Array.prototype.slice.call(arguments)))}},{key:"alias",value:function(e,t,n,r){if(this.errorReporting.leaveBreadcrumb("Alias event"),this.loaded){"function"==typeof n&&(r=n,n=null),"function"==typeof t&&(r=t,n=null,t=null),"function"==typeof e&&(r=e,n=null,t=null,e=null),"object"===f(t)&&(n=t,t=null),"object"===f(e)&&(n=e,t=null,e=null);var i=(new ko).setType("alias").build();i.message.previousId=oo(t)||(this.userId?this.userId:this.getAnonymousId()),i.message.userId=oo(e);var o=P(n);this.processAndSendDataToDestinations("alias",i,o,r)}else this.toBeProcessedArray.push(["alias"].concat(Array.prototype.slice.call(arguments)))}},{key:"group",value:function(e,t,n,r){if(this.errorReporting.leaveBreadcrumb("Group event"),this.loaded){if(0!==arguments.length){"function"==typeof n&&(r=n,n=null),"function"==typeof t&&(r=t,n=null,t=null),"object"===f(e)&&(n=t,t=e,e=this.groupId),"function"==typeof e&&(r=e,n=null,t=null,e=this.groupId),this.groupId=oo(e),this.storage.setGroupId(this.groupId);var i=P(t),o=P(n),s=(new ko).setType("group").build();if(i)for(var a in i)this.groupTraits[a]=i[a];else this.groupTraits={};this.storage.setGroupTraits(this.groupTraits),this.processAndSendDataToDestinations("group",s,o,r)}}else this.toBeProcessedArray.push(["group"].concat(Array.prototype.slice.call(arguments)))}},{key:"IsEventBlackListed",value:function(e,t){if(!e||"string"!=typeof e)return!1;var n=Mn[t],r=this.clientIntegrations.find((function(e){return e.name===n})).config,i=r.blacklistedEvents,o=r.whitelistedEvents,s=r.eventFilteringOption;if(!s)return!1;var a=e.trim().toUpperCase();switch(s){case"disable":default:return!1;case"blacklistedEvents":return!!Array.isArray(i)&&i.some((function(e){return e.eventName.trim().toUpperCase()===a}));case"whitelistedEvents":return!Array.isArray(o)||!o.some((function(e){return e.eventName.trim().toUpperCase()===a}))}}},{key:"shouldUseGlobalIntegrationsConfigInEvents",value:function(){return this.useGlobalIntegrationsConfigInEvents&&this.loadOnlyIntegrations&&Object.keys(this.loadOnlyIntegrations).length>0}},{key:"processAndSendDataToDestinations",value:function(e,t,n,r){try{this.anonymousId||this.setAnonymousId(),this.errorReporting.leaveBreadcrumb("Started sending data to destinations"),t.message.context.traits=a({},this.userTraits),t.message.anonymousId=this.anonymousId,t.message.userId=t.message.userId?t.message.userId:this.userId,"group"==e&&(this.groupId&&(t.message.groupId=this.groupId),this.groupTraits&&(t.message.traits=a({},this.groupTraits)));try{var i=this.uSession.getSessionInfo(),o=i.sessionId,s=i.sessionStart;t.message.context.sessionId=o,s&&(t.message.context.sessionStart=!0)}catch(e){qn(e)}f=this.cookieConsentOptions,h=!1,Object.keys(f).forEach((function(e){Xi.includes(e)&&"boolean"==typeof f[e].enabled&&!0===f[e].enabled&&(h=!0)})),h&&(t.message.context.consentManagement={deniedConsentIds:this.deniedConsentIds||[]}),this.processOptionsParam(t,n),function(e,t){var n=e.properties,r=e.traits,i=e.context;n&&Object.keys(n).forEach((function(e){Fi.indexOf(e.toLowerCase())>=0&&Bn.error("Warning! : Reserved keyword used in properties--\x3e ".concat(e," with ").concat(t," call"))})),r&&Object.keys(r).forEach((function(e){Fi.indexOf(e.toLowerCase())>=0&&Bn.error("Warning! : Reserved keyword used in traits--\x3e ".concat(e," with ").concat(t," call"))}));var o=i.traits;o&&Object.keys(o).forEach((function(e){Fi.indexOf(e.toLowerCase())>=0&&Bn.error("Warning! : Reserved keyword used in traits --\x3e ".concat(e," with ").concat(t," call"))}))}(t.message,e);var u=t.message.integrations;u?no(u):u=this.shouldUseGlobalIntegrationsConfigInEvents()?this.loadOnlyIntegrations:Ji,t.message.integrations=u;try{t.message.context["ua-ch"]=this.uach}catch(e){qn(e)}try{if(this.clientIntegrationObjects){var c=io(u,this.clientIntegrationObjects);this.processAndSendEventsToDeviceMode(c,t,e)}else this.toBeProcessedByIntegrationArray.push([e,t])}catch(e){qn(e,"processAndSendEventsToDeviceMode::")}var l=P(t);ro(l.message.integrations),!this.bufferDataPlaneEventsUntilReady||this.clientIntegrationObjects?this.queueEventForDataPlane(e,l):this.preProcessQueue.enqueue(e,l),r&&"function"==typeof r&&r(l)}catch(e){qn(e)}var f,h}},{key:"utm",value:function(e){var t={};try{var n=new URL(e),r="utm_";n.searchParams.forEach((function(e,n){if(n.startsWith(r)){var i=n.substring(4);"campaign"===i&&(i="name"),t[i]=e}}))}catch(e){}return t}},{key:"addCampaignInfo",value:function(e){var t=e.message.context;t&&"object"===f(t)&&(e.message.context.campaign=this.utm(window.location.href))}},{key:"processOptionsParam",value:function(e,t){var n=e.message,r=n.type,o=n.properties;this.addCampaignInfo(e),e.message.context.page=this.getContextPageProperties("page"===r?o:void 0),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"object"===f(t)&&null!==t&&Object.keys(t).forEach((function(n){bs.includes(n)&&(e[n]=t[n])}))}(e.message,t),e.message.context=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.context;return"object"!==f(t)||null===t||Object.keys(t).forEach((function(e){if(!bs.includes(e)&&!Wi.includes(e))if("context"!==e)n=ui(n,i({},e,t[e]));else if("object"===f(t[e])&&null!==t[e]){var r={};Object.keys(t[e]).forEach((function(n){Wi.includes(n)||(r[n]=t[e][n])})),n=ui(n,a({},r))}else Bn.error("[Analytics: processOptionsParam] context passed in options ".concat(e," is not object."))})),n}(e.message,t)}},{key:"getPageProperties",value:function(e,t){var n=fo(),r=(null==t?void 0:t.page)||{};for(var i in n)void 0===e[i]&&(e[i]=r[i]||n[i]);return e}},{key:"getContextPageProperties",value:function(e){var t=fo(),n={};for(var r in t)n[r]=null!=e&&e[r]?e[r]:t[r];return n}},{key:"reset",value:function(e){this.errorReporting.leaveBreadcrumb("reset API :: flag: ".concat(e)),this.loaded?(e&&(this.anonymousId=""),this.userId="",this.userTraits={},this.groupId="",this.groupTraits={},this.uSession.reset(),this.storage.clear(e)):this.toBeProcessedArray.push(["reset",e])}},{key:"getAnonymousId",value:function(e){return this.anonymousId=this.storage.getAnonymousId(e),this.anonymousId||this.setAnonymousId(),this.anonymousId}},{key:"getUserId",value:function(){return this.userId}},{key:"getSessionId",value:function(){return this.uSession.getSessionId()}},{key:"getUserTraits",value:function(){return this.userTraits}},{key:"getGroupId",value:function(){return this.groupId}},{key:"getGroupTraits",value:function(){return this.groupTraits}},{key:"setAnonymousId",value:function(e,t){var n=t?ps(t):null,r=n?n.rs_amp_id:null;this.anonymousId=e||r||Zi(),this.storage.setAnonymousId(this.anonymousId)}},{key:"isValidWriteKey",value:function(e){return e&&"string"==typeof e&&e.trim().length>0}},{key:"isValidServerUrl",value:function(e){return e&&"string"==typeof e&&e.trim().length>0}},{key:"isDatasetAvailable",value:function(){var e=document.createElement("div");return e.setAttribute("data-a-b","c"),!!e.dataset&&"c"===e.dataset.aB}},{key:"loadAfterPolyfill",value:function(e,t,n){var r,i,s,u,c,l,h,d,p,g,v,y=this;if("object"===f(t)&&null!==t&&(n=t,t=null),null!==(r=n)&&void 0!==r&&r.logLevel&&(this.logLevel=n.logLevel,Bn.setLogLevel(n.logLevel)),!this.isValidWriteKey(e))throw Error("Unable to load the SDK due to invalid writeKey");if(!this.storage||0===Object.keys(this.storage).length)throw Error("Cannot proceed as no storage is available");null!==(i=n)&&void 0!==i&&i.cookieConsentManager&&(this.cookieConsentOptions=n.cookieConsentManager),this.writeKey=e,this.serverUrl=t,this.options=n;var m={};if(null!==(s=n)&&void 0!==s&&s.setCookieDomain&&(m=a(a({},m),{},{domain:n.setCookieDomain})),n&&"boolean"==typeof n.secureCookie&&(m=a(a({},m),{},{secure:n.secureCookie})),n&&"boolean"==typeof n.sameDomainCookiesOnly&&(m=a(a({},m),{},{sameDomainCookiesOnly:n.sameDomainCookiesOnly})),n&&-1!==Vi.indexOf(n.sameSiteCookie)&&(m=a(a({},m),{},{samesite:n.sameSiteCookie})),this.storage.options(m),n&&"string"==typeof n.uaChTrackLevel&&Yi.includes(n.uaChTrackLevel)&&(this.uaChTrackLevel=n.uaChTrackLevel),navigator.userAgentData&&function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"none";"none"===t&&e(void 0),"default"===t&&e(navigator.userAgentData),"full"===t&&navigator.userAgentData.getHighEntropyValues(["architecture","bitness","brands","mobile","model","platform","platformVersion","uaFullVersion","fullVersionList","wow64"]).then((function(t){e(t)}))}((function(e){y.uach=e}),this.uaChTrackLevel),null!==(u=n)&&void 0!==u&&u.integrations&&(o(this.loadOnlyIntegrations,n.integrations),no(this.loadOnlyIntegrations)),this.useGlobalIntegrationsConfigInEvents=n&&!0===n.useGlobalIntegrationsConfigInEvents,null!==(c=n)&&void 0!==c&&c.sendAdblockPage&&(this.sendAdblockPage=!0),null!==(l=n)&&void 0!==l&&l.sendAdblockPageOptions&&"object"===f(n.sendAdblockPageOptions)&&(this.sendAdblockPageOptions=n.sendAdblockPageOptions),this.uSession.initialize(n),null!==(h=n)&&void 0!==h&&h.clientSuppliedCallbacks){var A={};Object.keys(this.methodToCallbackMapping).forEach((function(e){y.methodToCallbackMapping.hasOwnProperty(e)&&n.clientSuppliedCallbacks[y.methodToCallbackMapping[e]]&&(A[e]=n.clientSuppliedCallbacks[y.methodToCallbackMapping[e]])})),o(this.clientSuppliedCallbacks,A),this.registerCallbacks(!0)}if(null!=(null===(d=n)||void 0===d?void 0:d.loadIntegration)&&(this.loadIntegration=!!n.loadIntegration),n&&"boolean"==typeof n.bufferDataPlaneEventsUntilReady&&(this.bufferDataPlaneEventsUntilReady=!0===n.bufferDataPlaneEventsUntilReady,this.bufferDataPlaneEventsUntilReady&&this.preProcessQueue.init(this.options,this.queueEventForDataPlane.bind(this))),n&&"number"==typeof n.dataPlaneEventsBufferTimeout&&(this.dataPlaneEventsBufferTimeout=n.dataPlaneEventsBufferTimeout),n&&void 0!==n.lockIntegrationsVersion&&(this.lockIntegrationsVersion=!0===n.lockIntegrationsVersion),this.initializeUser(n?n.anonymousIdOptions:void 0),this.setInitialPageProperties(),this.destSDKBaseURL=ks(this.version,this.lockIntegrationsVersion,null===(p=n)||void 0===p?void 0:p.destSDKBaseURL),null!==(g=n)&&void 0!==g&&g.getSourceConfig)if("function"!=typeof n.getSourceConfig)qn(new Error('option "getSourceConfig" must be a function'));else{var b=n.getSourceConfig();b instanceof Promise?b.then((function(e){return y.processResponse(200,e)})).catch(qn):this.processResponse(200,b)}else{var k=function(e,t){var n=zi,r=[];return e&&r.push("writeKey=".concat(e)),t&&r.push("lockIntegrationsVersion=".concat(t)),r.length>0&&(n=(n=zi.concat(zi.includes("?")?"&":"?")).concat(r.join("&"))),n}(e,this.lockIntegrationsVersion);null!==(v=n)&&void 0!==v&&v.configUrl&&(k=function(e,t){var n=e;-1===n.indexOf("sourceConfig")&&(n="".concat($i(n),"/sourceConfig/")),n="/"===n.slice(-1)?n:"".concat(n,"/");var r=t.split("?")[1],i=n.split("?");return i.length>1&&i[1]!==r?"".concat(i[0],"?").concat(r):"".concat(n,"?").concat(r)}(n.configUrl,k));try{!function(e,t,n,r){var i=r.bind(e),o=new XMLHttpRequest;o.open("GET",t,!0),o.setRequestHeader("Authorization","Basic ".concat(btoa("".concat(n,":")))),o.onload=function(){var e=o.status,n=o.responseText;200===e?i(200,n):(qn(new Error("".concat(Fn," ").concat(e," for url: ").concat(t))),i(e))},o.send()}(this,k,e,this.processResponse)}catch(e){qn(e)}}}},{key:"arePolyfillsRequired",value:function(e){return(!e||"boolean"!=typeof e.polyfillIfRequired||e.polyfillIfRequired)&&(!String.prototype.endsWith||!String.prototype.startsWith||!String.prototype.includes||!Array.prototype.find||!Array.prototype.includes||"function"!=typeof window.URL||"undefined"==typeof Promise||!Object.entries||!Object.values||!String.prototype.replaceAll||!this.isDatasetAvailable()||"function"!=typeof TextDecoder||"function"!=typeof TextEncoder)}},{key:"load",value:function(e,t,n){if(!this.loaded){var r=P(n);this.arePolyfillsRequired(r),this.loadAfterPolyfill(e,t,r)}}},{key:"ready",value:function(e){this.loaded?"function"!=typeof e?Bn.error("ready callback is not a function"):this.clientIntegrationsReady?e():this.readyCallbacks.push(e):this.toBeProcessedArray.push(["ready",e])}},{key:"initializeCallbacks",value:function(){var e=this;Object.keys(this.methodToCallbackMapping).forEach((function(t){e.methodToCallbackMapping.hasOwnProperty(t)&&e.on(t,(function(){}))}))}},{key:"registerCallbacks",value:function(e){var t=this;e||Object.keys(this.methodToCallbackMapping).forEach((function(e){t.methodToCallbackMapping.hasOwnProperty(e)&&window.rudderanalytics&&"function"==typeof window.rudderanalytics[t.methodToCallbackMapping[e]]&&(t.clientSuppliedCallbacks[e]=window.rudderanalytics[t.methodToCallbackMapping[e]])})),Object.keys(this.clientSuppliedCallbacks).forEach((function(e){t.clientSuppliedCallbacks.hasOwnProperty(e)&&t.on(e,t.clientSuppliedCallbacks[e])}))}},{key:"sendSampleRequest",value:function(){}},{key:"startSession",value:function(e){this.uSession.start(e)}},{key:"endSession",value:function(){this.uSession.end()}},{key:"setAuthToken",value:function(e){"string"==typeof e?(this.storage.setAuthToken(e),this.transformationHandler.setAuthToken(e)):Bn.error("Provided input should be in string format")}}])}(),Rs=new Ps;A(Rs),window.addEventListener("error",(function(e){qn(e,void 0,Rs)}),!0),Rs.initializeCallbacks(),Rs.registerCallbacks(!1);var Cs,xs="load",Ds=window.rudderanalytics,Ls=Array.isArray(Ds);if(Ls)for(var Ms=0;Ms<Ds.length;){if(Ds[Ms]&&Ds[Ms][0]===xs){Cs=Ds[Ms],Ds.splice(Ms,1);break}Ms+=1}!function(e){var t="ajs_trait_",n="ajs_prop_";function r(e,t){var n={};return Object.keys(e).forEach((function(r){r.startsWith(t)&&(n[r.substr(t.length)]=e[r])})),n}var i=function(e){var t={};try{new URL(e).searchParams.forEach((function(e,n){t[n]=e}))}catch(e){}return t}(e);i.ajs_aid&&Rs.toBeProcessedArray.push(["setAnonymousId",i.ajs_aid]),i.ajs_uid&&Rs.toBeProcessedArray.push(["identify",i.ajs_uid,r(i,t)]),i.ajs_event&&Rs.toBeProcessedArray.push(["track",i.ajs_event,r(i,n)])}(window.location.href),Ls&&Ds.forEach((function(e){return Rs.toBeProcessedArray.push(e)})),Cs&&Cs.length>0&&(Cs.shift(),Rs[xs].apply(Rs,c(Cs)));var Ns=Rs.ready.bind(Rs),Bs=Rs.identify.bind(Rs),Gs=Rs.page.bind(Rs),Us=Rs.track.bind(Rs),js=Rs.alias.bind(Rs),Fs=Rs.group.bind(Rs),zs=Rs.reset.bind(Rs),Ks=Rs.load.bind(Rs),Hs=Rs.initialized=!0,Qs=Rs.getUserId.bind(Rs),Vs=Rs.getSessionId.bind(Rs),qs=Rs.getUserTraits.bind(Rs),Xs=Rs.getAnonymousId.bind(Rs),Ws=Rs.setAnonymousId.bind(Rs),Ys=Rs.getGroupId.bind(Rs),Js=Rs.getGroupTraits.bind(Rs),$s=Rs.startSession.bind(Rs),Zs=Rs.endSession.bind(Rs),ea=Rs.setAuthToken.bind(Rs);Bn.error("This RudderStack JavaScript SDK package is deprecated and no longer maintained. While your events are still being tracked and delivered, we strongly recommend you to migrate to the latest [@rudderstack/analytics-js](https://www.npmjs.com/package/@rudderstack/analytics-js) package for enhanced features, security updates, and ongoing support. For more details, visit the migration guide: https://www.rudderstack.com/docs/sources/event-streams/sdks/rudderstack-javascript-sdk/migration-guide/."),exports.alias=js,exports.endSession=Zs,exports.getAnonymousId=Xs,exports.getGroupId=Ys,exports.getGroupTraits=Js,exports.getSessionId=Vs,exports.getUserId=Qs,exports.getUserTraits=qs,exports.group=Fs,exports.identify=Bs,exports.initialized=Hs,exports.load=Ks,exports.page=Gs,exports.ready=Ns,exports.reset=zs,exports.setAnonymousId=Ws,exports.setAuthToken=ea,exports.startSession=$s,exports.track=Us;
|