@deriv-com/analytics 1.5.9 → 1.6.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/analytics.bundle.js +1 -0
- package/package.json +10 -5
@@ -0,0 +1 @@
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Analytics=t():e.Analytics=t()}(this,(()=>(()=>{var e={328:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GrowthBook=void 0;var r,i=(r=n(591))&&r.__esModule?r:{default:r},s=n(106),o=n(427),a=n(707);const u="undefined"!=typeof window&&"undefined"!=typeof document,c=(0,s.loadSDKVersion)();t.GrowthBook=class{constructor(e){if(e=e||{},this.version=c,this._ctx=this.context=e,this._renderer=null,this._trackedExperiments=new Set,this._trackedFeatures={},this.debug=!1,this._subscriptions=new Set,this._rtQueue=[],this._rtTimer=0,this.ready=!1,this._assigned=new Map,this._forcedFeatureValues=new Map,this._attributeOverrides={},this._activeAutoExperiments=new Map,this._triggeredExpKeys=new Set,this._loadFeaturesCalled=!1,this._redirectedUrl="",this._deferredTrackingCalls=[],e.renderer&&(this._renderer=e.renderer),e.remoteEval){if(e.decryptionKey)throw new Error("Encryption is not available for remoteEval");if(!e.clientKey)throw new Error("Missing clientKey");let t=!1;try{t=!!new URL(e.apiHost||"").hostname.match(/growthbook\.io$/i)}catch(e){}if(t)throw new Error("Cannot use remoteEval on GrowthBook Cloud")}else if(e.cacheKeyAttributes)throw new Error("cacheKeyAttributes are only used for remoteEval");e.features&&(this.ready=!0),u&&e.enableDevMode&&(window._growthbook=this,document.dispatchEvent(new Event("gbloaded"))),e.experiments?(this.ready=!0,this._updateAllAutoExperiments()):e.antiFlicker&&this._setAntiFlicker(),e.clientKey&&!e.remoteEval&&this._refresh({},!0,!1)}async loadFeatures(e){e&&e.autoRefresh&&(this._ctx.subscribeToChanges=!0),this._loadFeaturesCalled=!0,await this._refresh(e,!0,!0),this._canSubscribe()&&(0,a.subscribe)(this)}async refreshFeatures(e){await this._refresh(e,!1,!0)}getApiInfo(){return[this.getApiHosts().apiHost,this.getClientKey()]}getApiHosts(){const e=this._ctx.apiHost||"https://cdn.growthbook.io";return{apiHost:e.replace(/\/*$/,""),streamingHost:(this._ctx.streamingHost||e).replace(/\/*$/,""),apiRequestHeaders:this._ctx.apiHostRequestHeaders,streamingHostRequestHeaders:this._ctx.streamingHostRequestHeaders}}getClientKey(){return this._ctx.clientKey||""}isRemoteEval(){return this._ctx.remoteEval||!1}getCacheKeyAttributes(){return this._ctx.cacheKeyAttributes}async _refresh(e,t,n){if(e=e||{},!this._ctx.clientKey)throw new Error("Missing clientKey");await(0,a.refreshFeatures)(this,e.timeout,e.skipCache||this._ctx.enableDevMode,t,n,!1!==this._ctx.backgroundSync)}_render(){if(this._renderer)try{this._renderer()}catch(e){console.error("Failed to render",e)}}setFeatures(e){this._ctx.features=e,this.ready=!0,this._render()}async setEncryptedFeatures(e,t,n){const r=await(0,s.decrypt)(e,t||this._ctx.decryptionKey,n);this.setFeatures(JSON.parse(r))}setExperiments(e){this._ctx.experiments=e,this.ready=!0,this._updateAllAutoExperiments()}async setEncryptedExperiments(e,t,n){const r=await(0,s.decrypt)(e,t||this._ctx.decryptionKey,n);this.setExperiments(JSON.parse(r))}async decryptPayload(e,t,n){return e.encryptedFeatures&&(e.features=JSON.parse(await(0,s.decrypt)(e.encryptedFeatures,t||this._ctx.decryptionKey,n)),delete e.encryptedFeatures),e.encryptedExperiments&&(e.experiments=JSON.parse(await(0,s.decrypt)(e.encryptedExperiments,t||this._ctx.decryptionKey,n)),delete e.encryptedExperiments),e}async setAttributes(e){this._ctx.attributes=e,this._ctx.stickyBucketService&&await this.refreshStickyBuckets(),this._ctx.remoteEval?await this._refreshForRemoteEval():(this._render(),this._updateAllAutoExperiments())}async updateAttributes(e){return this.setAttributes({...this._ctx.attributes,...e})}async setAttributeOverrides(e){this._attributeOverrides=e,this._ctx.stickyBucketService&&await this.refreshStickyBuckets(),this._ctx.remoteEval?await this._refreshForRemoteEval():(this._render(),this._updateAllAutoExperiments())}async setForcedVariations(e){this._ctx.forcedVariations=e||{},this._ctx.remoteEval?await this._refreshForRemoteEval():(this._render(),this._updateAllAutoExperiments())}setForcedFeatures(e){this._forcedFeatureValues=e,this._render()}async setURL(e){if(this._ctx.url=e,this._redirectedUrl="",this._ctx.remoteEval)return await this._refreshForRemoteEval(),void this._updateAllAutoExperiments(!0);this._updateAllAutoExperiments(!0)}getAttributes(){return{...this._ctx.attributes,...this._attributeOverrides}}getForcedVariations(){return this._ctx.forcedVariations||{}}getForcedFeatures(){return this._forcedFeatureValues||new Map}getStickyBucketAssignmentDocs(){return this._ctx.stickyBucketAssignmentDocs||{}}getUrl(){return this._ctx.url||""}getFeatures(){return this._ctx.features||{}}getExperiments(){return this._ctx.experiments||[]}subscribe(e){return this._subscriptions.add(e),()=>{this._subscriptions.delete(e)}}_canSubscribe(){return!1!==this._ctx.backgroundSync&&this._ctx.subscribeToChanges}async _refreshForRemoteEval(){this._ctx.remoteEval&&this._loadFeaturesCalled&&await this._refresh({},!1,!0).catch((()=>{}))}getAllResults(){return new Map(this._assigned)}destroy(){this._subscriptions.clear(),this._assigned.clear(),this._trackedExperiments.clear(),this._trackedFeatures={},this._rtQueue=[],this._rtTimer&&clearTimeout(this._rtTimer),(0,a.unsubscribe)(this),u&&window._growthbook===this&&delete window._growthbook,this._activeAutoExperiments.forEach((e=>{e.undo()})),this._activeAutoExperiments.clear(),this._triggeredExpKeys.clear()}setRenderer(e){this._renderer=e}forceVariation(e,t){this._ctx.forcedVariations=this._ctx.forcedVariations||{},this._ctx.forcedVariations[e]=t,this._ctx.remoteEval?this._refreshForRemoteEval():(this._updateAllAutoExperiments(),this._render())}run(e){const t=this._run(e,null);return this._fireSubscriptions(e,t),t}triggerExperiment(e){return this._triggeredExpKeys.add(e),this._ctx.experiments?this._ctx.experiments.filter((t=>t.key===e)).map((e=>e.manual?this._runAutoExperiment(e):null)).filter((e=>null!==e)):null}_runAutoExperiment(e,t){const n=this._activeAutoExperiments.get(e);if(e.manual&&!this._triggeredExpKeys.has(e.key)&&!n)return null;const r=this.run(e),i=JSON.stringify(r.value);if(!t&&r.inExperiment&&n&&n.valueHash===i)return r;if(n&&this._undoActiveAutoExperiment(e),r.inExperiment)if(r.value.urlRedirect&&e.urlPatterns){const t=e.persistQueryString?(0,s.mergeQueryStrings)(this._getContextUrl(),r.value.urlRedirect):r.value.urlRedirect;if((0,s.isURLTargeted)(t,e.urlPatterns))return this.log("Skipping redirect because original URL matches redirect URL",{id:e.key}),r;this._redirectedUrl=t;const n=this._getNavigateFunction();var o;if(n)if(u)this._setAntiFlicker(),window.setTimeout((()=>{try{n(t)}catch(e){console.error(e)}}),null!==(o=this._ctx.navigateDelay)&&void 0!==o?o:100);else try{n(t)}catch(e){console.error(e)}}else{const t=this._applyDOMChanges(r.value);t&&this._activeAutoExperiments.set(e,{undo:t,valueHash:i})}return r}_undoActiveAutoExperiment(e){const t=this._activeAutoExperiments.get(e);t&&(t.undo(),this._activeAutoExperiments.delete(e))}_isRedirectExperiment(e){return e.variations.some((e=>Object.keys(e).includes("urlRedirect")))}_updateAllAutoExperiments(e){const t=this._ctx.experiments||[],n=new Set(t);this._activeAutoExperiments.forEach(((e,t)=>{n.has(t)||(e.undo(),this._activeAutoExperiments.delete(t))}));for(const n of t){const t=this._runAutoExperiment(n,e);if(null!=t&&t.inExperiment&&this._isRedirectExperiment(n))break}}_fireSubscriptions(e,t){const n=e.key,r=this._assigned.get(n);r&&r.result.inExperiment===t.inExperiment&&r.result.variationId===t.variationId||(this._assigned.set(n,{experiment:e,result:t}),this._subscriptions.forEach((n=>{try{n(e,t)}catch(e){console.error(e)}})))}_trackFeatureUsage(e,t){if("override"===t.source)return;const n=JSON.stringify(t.value);if(this._trackedFeatures[e]!==n){if(this._trackedFeatures[e]=n,this._ctx.onFeatureUsage)try{this._ctx.onFeatureUsage(e,t)}catch(e){}u&&window.fetch&&(this._rtQueue.push({key:e,on:t.on}),this._rtTimer||(this._rtTimer=window.setTimeout((()=>{this._rtTimer=0;const e=[...this._rtQueue];this._rtQueue=[],this._ctx.realtimeKey&&window.fetch("https://rt.growthbook.io/?key=".concat(this._ctx.realtimeKey,"&events=").concat(encodeURIComponent(JSON.stringify(e))),{cache:"no-cache",mode:"no-cors"}).catch((()=>{}))}),this._ctx.realtimeInterval||2e3)))}}_getFeatureResult(e,t,n,r,i,s){const o={value:t,on:!!t,off:!t,source:n,ruleId:r||""};return i&&(o.experiment=i),s&&(o.experimentResult=s),this._trackFeatureUsage(e,o),o}isOn(e){return this.evalFeature(e).on}isOff(e){return this.evalFeature(e).off}getFeatureValue(e,t){const n=this.evalFeature(e).value;return null===n?t:n}feature(e){return this.evalFeature(e)}evalFeature(e){return this._evalFeature(e)}_evalFeature(e,t){if((t=t||{evaluatedFeatures:new Set}).evaluatedFeatures.has(e))return this._getFeatureResult(e,null,"cyclicPrerequisite");if(t.evaluatedFeatures.add(e),t.id=e,this._forcedFeatureValues.has(e))return this._getFeatureResult(e,this._forcedFeatureValues.get(e),"override");if(!this._ctx.features||!this._ctx.features[e])return this._getFeatureResult(e,null,"unknownFeature");const n=this._ctx.features[e];if(n.rules)e:for(const r of n.rules){if(r.parentConditions)for(const n of r.parentConditions){const r=this._evalFeature(n.id,t);if("cyclicPrerequisite"===r.source)return this._getFeatureResult(e,null,"cyclicPrerequisite");const i={value:r.value};if(!(0,o.evalCondition)(i,n.condition||{})){if(n.gate)return this._getFeatureResult(e,null,"prerequisite");continue e}}if(r.filters&&this._isFilteredOut(r.filters))continue;if("force"in r){if(r.condition&&!this._conditionPasses(r.condition))continue;if(!this._isIncludedInRollout(r.seed||e,r.hashAttribute,this._ctx.stickyBucketService&&!r.disableStickyBucketing?r.fallbackAttribute:void 0,r.range,r.coverage,r.hashVersion))continue;return r.tracks&&r.tracks.forEach((e=>{this._track(e.experiment,e.result)})),this._getFeatureResult(e,r.force,"force",r.id)}if(!r.variations)continue;const n={variations:r.variations,key:r.key||e};"coverage"in r&&(n.coverage=r.coverage),r.weights&&(n.weights=r.weights),r.hashAttribute&&(n.hashAttribute=r.hashAttribute),r.fallbackAttribute&&(n.fallbackAttribute=r.fallbackAttribute),r.disableStickyBucketing&&(n.disableStickyBucketing=r.disableStickyBucketing),void 0!==r.bucketVersion&&(n.bucketVersion=r.bucketVersion),void 0!==r.minBucketVersion&&(n.minBucketVersion=r.minBucketVersion),r.namespace&&(n.namespace=r.namespace),r.meta&&(n.meta=r.meta),r.ranges&&(n.ranges=r.ranges),r.name&&(n.name=r.name),r.phase&&(n.phase=r.phase),r.seed&&(n.seed=r.seed),r.hashVersion&&(n.hashVersion=r.hashVersion),r.filters&&(n.filters=r.filters),r.condition&&(n.condition=r.condition);const i=this._run(n,e);if(this._fireSubscriptions(n,i),i.inExperiment&&!i.passthrough)return this._getFeatureResult(e,i.value,"experiment",r.id,n,i)}return this._getFeatureResult(e,void 0===n.defaultValue?null:n.defaultValue,"defaultValue")}_isIncludedInRollout(e,t,n,r,i,o){if(!r&&void 0===i)return!0;const{hashValue:a}=this._getHashAttribute(t,n);if(!a)return!1;const u=(0,s.hash)(e,a,o||1);return null!==u&&(r?(0,s.inRange)(u,r):void 0===i||u<=i)}_conditionPasses(e){return(0,o.evalCondition)(this.getAttributes(),e)}_isFilteredOut(e){return e.some((e=>{const{hashValue:t}=this._getHashAttribute(e.attribute);if(!t)return!0;const n=(0,s.hash)(e.seed,t,e.hashVersion||2);return null===n||!e.ranges.some((e=>(0,s.inRange)(n,e)))}))}_run(e,t){const n=e.key,r=e.variations.length;if(r<2)return this._getResult(e,-1,!1,t);if(!1===this._ctx.enabled)return this._getResult(e,-1,!1,t);if((e=this._mergeOverrides(e)).urlPatterns&&!(0,s.isURLTargeted)(this._getContextUrl(),e.urlPatterns))return this._getResult(e,-1,!1,t);const i=(0,s.getQueryStringOverride)(n,this._getContextUrl(),r);if(null!==i)return this._getResult(e,i,!1,t);if(this._ctx.forcedVariations&&n in this._ctx.forcedVariations){const r=this._ctx.forcedVariations[n];return this._getResult(e,r,!1,t)}if("draft"===e.status||!1===e.active)return this._getResult(e,-1,!1,t);const{hashAttribute:a,hashValue:u}=this._getHashAttribute(e.hashAttribute,this._ctx.stickyBucketService&&!e.disableStickyBucketing?e.fallbackAttribute:void 0);if(!u)return this._getResult(e,-1,!1,t);let c=-1,l=!1,h=!1;if(this._ctx.stickyBucketService&&!e.disableStickyBucketing){const{variation:t,versionIsBlocked:n}=this._getStickyBucketVariation(e.key,e.bucketVersion,e.minBucketVersion,e.meta);l=t>=0,c=t,h=!!n}if(!l){if(e.filters){if(this._isFilteredOut(e.filters))return this._getResult(e,-1,!1,t)}else if(e.namespace&&!(0,s.inNamespace)(u,e.namespace))return this._getResult(e,-1,!1,t);if(e.include&&!(0,s.isIncluded)(e.include))return this._getResult(e,-1,!1,t);if(e.condition&&!this._conditionPasses(e.condition))return this._getResult(e,-1,!1,t);if(e.parentConditions)for(const n of e.parentConditions){const r=this._evalFeature(n.id);if("cyclicPrerequisite"===r.source)return this._getResult(e,-1,!1,t);const i={value:r.value};if(!(0,o.evalCondition)(i,n.condition||{}))return this._getResult(e,-1,!1,t)}if(e.groups&&!this._hasGroupOverlap(e.groups))return this._getResult(e,-1,!1,t)}if(e.url&&!this._urlIsValid(e.url))return this._getResult(e,-1,!1,t);const f=(0,s.hash)(e.seed||n,u,e.hashVersion||1);if(null===f)return this._getResult(e,-1,!1,t);if(!l){const t=e.ranges||(0,s.getBucketRanges)(r,void 0===e.coverage?1:e.coverage,e.weights);c=(0,s.chooseVariation)(f,t)}if(h)return this._getResult(e,-1,!1,t,void 0,!0);if(c<0)return this._getResult(e,-1,!1,t);if("force"in e)return this._getResult(e,void 0===e.force?-1:e.force,!1,t);if(this._ctx.qaMode)return this._getResult(e,-1,!1,t);if("stopped"===e.status)return this._getResult(e,-1,!1,t);const d=this._getResult(e,c,!0,t,f,l);if(this._ctx.stickyBucketService&&!e.disableStickyBucketing){const{changed:t,key:n,doc:r}=this._generateStickyBucketAssignmentDoc(a,(0,s.toString)(u),{[this._getStickyBucketExperimentKey(e.key,e.bucketVersion)]:d.key});t&&(this._ctx.stickyBucketAssignmentDocs=this._ctx.stickyBucketAssignmentDocs||{},this._ctx.stickyBucketAssignmentDocs[n]=r,this._ctx.stickyBucketService.saveAssignments(r))}return this._track(e,d),d}log(e,t){this.debug&&(this._ctx.log?this._ctx.log(e,t):console.log(e,t))}getDeferredTrackingCalls(){return this._deferredTrackingCalls}setDeferredTrackingCalls(e){this._deferredTrackingCalls=e}fireDeferredTrackingCalls(){let e=!1;if(this._deferredTrackingCalls.forEach((t=>{t&&t.experiment&&t.result?this._track(t.experiment,t.result):(console.error("Invalid deferred tracking call",{call:t}),e=!0)})),this._deferredTrackingCalls=[],e)throw new Error("Invalid tracking data")}setTrackingCallback(e){this._ctx.trackingCallback=e;try{this.fireDeferredTrackingCalls()}catch(e){console.error(e)}}_track(e,t){if(!this._ctx.trackingCallback)return void this._deferredTrackingCalls.push({experiment:e,result:t});const n=e.key,r=t.hashAttribute+t.hashValue+n+t.variationId;if(!this._trackedExperiments.has(r)){this._trackedExperiments.add(r);try{this._ctx.trackingCallback(e,t)}catch(e){console.error(e)}}}_mergeOverrides(e){const t=e.key,n=this._ctx.overrides;return n&&n[t]&&"string"==typeof(e=Object.assign({},e,n[t])).url&&(e.url=(0,s.getUrlRegExp)(e.url)),e}_getHashAttribute(e,t){let n=e||"id",r="";return this._attributeOverrides[n]?r=this._attributeOverrides[n]:this._ctx.attributes?r=this._ctx.attributes[n]||"":this._ctx.user&&(r=this._ctx.user[n]||""),!r&&t&&(this._attributeOverrides[t]?r=this._attributeOverrides[t]:this._ctx.attributes?r=this._ctx.attributes[t]||"":this._ctx.user&&(r=this._ctx.user[t]||""),r&&(n=t)),{hashAttribute:n,hashValue:r}}_getResult(e,t,n,r,i,s){let o=!0;(t<0||t>=e.variations.length)&&(t=0,o=!1);const{hashAttribute:a,hashValue:u}=this._getHashAttribute(e.hashAttribute,this._ctx.stickyBucketService&&!e.disableStickyBucketing?e.fallbackAttribute:void 0),c=e.meta?e.meta[t]:{},l={key:c.key||""+t,featureId:r,inExperiment:o,hashUsed:n,variationId:t,value:e.variations[t],hashAttribute:a,hashValue:u,stickyBucketUsed:!!s};return c.name&&(l.name=c.name),void 0!==i&&(l.bucket=i),c.passthrough&&(l.passthrough=c.passthrough),l}_getContextUrl(){return this._ctx.url||(u?window.location.href:"")}_urlIsValid(e){const t=this._getContextUrl();if(!t)return!1;const n=t.replace(/^https?:\/\//,"").replace(/^[^/]*\//,"/");return!!e.test(t)||!!e.test(n)}_hasGroupOverlap(e){const t=this._ctx.groups||{};for(let n=0;n<e.length;n++)if(t[e[n]])return!0;return!1}getRedirectUrl(){return this._redirectedUrl}_getNavigateFunction(){return this._ctx.navigate?this._ctx.navigate:u?e=>{window.location.replace(e)}:null}_setAntiFlicker(){if(this._ctx.antiFlicker&&u)try{var e;const t=document.createElement("style");t.innerHTML=".gb-anti-flicker { opacity: 0 !important; pointer-events: none; }",document.head.appendChild(t),document.documentElement.classList.add("gb-anti-flicker"),setTimeout((()=>{document.documentElement.classList.remove("gb-anti-flicker")}),null!==(e=this._ctx.antiFlickerTimeout)&&void 0!==e?e:3500)}catch(e){console.error(e)}}_applyDOMChanges(e){if(!u)return;const t=[];if(e.css){const n=document.createElement("style");n.innerHTML=e.css,document.head.appendChild(n),t.push((()=>n.remove()))}if(e.js){const n=document.createElement("script");n.innerHTML=e.js,document.head.appendChild(n),t.push((()=>n.remove()))}return e.domMutations&&e.domMutations.forEach((e=>{t.push(i.default.declarative(e).revert)})),()=>{t.forEach((e=>e()))}}_deriveStickyBucketIdentifierAttributes(e){const t=new Set,n=e&&e.features?e.features:this.getFeatures(),r=e&&e.experiments?e.experiments:this.getExperiments();return Object.keys(n).forEach((e=>{const r=n[e];if(r.rules)for(const e of r.rules)e.variations&&(t.add(e.hashAttribute||"id"),e.fallbackAttribute&&t.add(e.fallbackAttribute))})),r.map((e=>{t.add(e.hashAttribute||"id"),e.fallbackAttribute&&t.add(e.fallbackAttribute)})),Array.from(t)}async refreshStickyBuckets(e){if(this._ctx.stickyBucketService){const t=this._getStickyBucketAttributes(e);this._ctx.stickyBucketAssignmentDocs=await this._ctx.stickyBucketService.getAllAssignments(t)}}_getStickyBucketAssignments(){const e={};return Object.values(this._ctx.stickyBucketAssignmentDocs||{}).forEach((t=>{t.assignments&&Object.assign(e,t.assignments)})),e}_getStickyBucketVariation(e,t,n,r){t=t||0,n=n||0,r=r||[];const i=this._getStickyBucketExperimentKey(e,t),s=this._getStickyBucketAssignments();if(n>0)for(let t=0;t<=n;t++)if(void 0!==s[this._getStickyBucketExperimentKey(e,t)])return{variation:-1,versionIsBlocked:!0};const o=s[i];if(void 0===o)return{variation:-1};const a=r.findIndex((e=>e.key===o));return a<0?{variation:-1}:{variation:a}}_getStickyBucketExperimentKey(e,t){return t=t||0,"".concat(e,"__").concat(t)}_getStickyBucketAttributes(e){const t={};return this._ctx.stickyBucketIdentifierAttributes=this._ctx.stickyBucketIdentifierAttributes?this._ctx.stickyBucketIdentifierAttributes:this._deriveStickyBucketIdentifierAttributes(e),this._ctx.stickyBucketIdentifierAttributes.forEach((e=>{const{hashValue:n}=this._getHashAttribute(e);t[e]=(0,s.toString)(n)})),t}_generateStickyBucketAssignmentDoc(e,t,n){const r="".concat(e,"||").concat(t),i=this._ctx.stickyBucketAssignmentDocs&&this._ctx.stickyBucketAssignmentDocs[r]&&this._ctx.stickyBucketAssignmentDocs[r].assignments||{},s={...i,...n};return{key:r,doc:{attributeName:e,attributeValue:t,assignments:s},changed:JSON.stringify(i)!==JSON.stringify(s)}}}},707:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.clearCache=async function(){a.clear(),u.clear(),I(),o=!1,await d()},t.configureCache=function(e){Object.assign(n,e),n.backgroundSync||I()},t.helpers=void 0,t.onHidden=h,t.onVisible=f,t.refreshFeatures=async function(e,t,s,u,c,h){h||(n.backgroundSync=!1);const f=await async function(e,t,s,u){const c=p(e),h=g(e),f=new Date,d=new Date(f.getTime()-n.maxAge+n.staleTTL);await async function(){if(!o){o=!0;try{if(r.localStorage){const e=await r.localStorage.getItem(n.cacheKey);if(e){const t=JSON.parse(e);t&&Array.isArray(t)&&t.forEach((e=>{let[t,n]=e;a.set(t,{...n,staleAt:new Date(n.staleAt)})})),y()}}}catch(e){}if(!n.disableIdleStreams){const e=i.startIdleListener();e&&(i.stopIdleListener=e)}}}();const v=a.get(h);return v&&!u&&(t||v.staleAt>f)&&v.staleAt>d?(v.sse&&l.add(c),v.staleAt<f?b(e):k(e),v.data):await function(e,t){return new Promise((n=>{let r,i=!1;const s=e=>{i||(i=!0,r&&clearTimeout(r),n(e||null))};t&&(r=setTimeout((()=>s()),t)),e.then((e=>s(e))).catch((()=>s()))}))}(b(e),s)}(e,u,t,s);c&&f&&await m(e,f)},t.setPolyfills=function(e){Object.assign(r,e)},t.subscribe=function(e){const t=p(e),n=s.get(t)||new Set;n.add(e),s.set(t,n)},t.unsubscribe=function(e){s.forEach((t=>t.delete(e)))};const n={staleTTL:6e4,maxAge:864e5,cacheKey:"gbFeaturesCache",backgroundSync:!0,maxEntries:10,disableIdleStreams:!1,idleStreamInterval:2e4},r={fetch:globalThis.fetch?globalThis.fetch.bind(globalThis):void 0,SubtleCrypto:globalThis.crypto?globalThis.crypto.subtle:void 0,EventSource:globalThis.EventSource},i={fetchFeaturesCall:e=>{let{host:t,clientKey:n,headers:i}=e;return r.fetch("".concat(t,"/api/features/").concat(n),{headers:i})},fetchRemoteEvalCall:e=>{let{host:t,clientKey:n,payload:i,headers:s}=e;const o={method:"POST",headers:{"Content-Type":"application/json",...s},body:JSON.stringify(i)};return r.fetch("".concat(t,"/api/eval/").concat(n),o)},eventSourceCall:e=>{let{host:t,clientKey:n,headers:i}=e;return i?new r.EventSource("".concat(t,"/sub/").concat(n),{headers:i}):new r.EventSource("".concat(t,"/sub/").concat(n))},startIdleListener:()=>{let e;if("undefined"==typeof window||"undefined"==typeof document)return;const t=()=>{"visible"===document.visibilityState?(window.clearTimeout(e),f()):"hidden"===document.visibilityState&&(e=window.setTimeout(h,n.idleStreamInterval))};return document.addEventListener("visibilitychange",t),()=>document.removeEventListener("visibilitychange",t)},stopIdleListener:()=>{}};t.helpers=i;try{globalThis.localStorage&&(r.localStorage=globalThis.localStorage)}catch(e){}const s=new Map;let o=!1;const a=new Map,u=new Map,c=new Map,l=new Set;function h(){c.forEach((e=>{e&&(e.state="idle",A(e))}))}function f(){c.forEach((e=>{e&&"idle"===e.state&&S(e)}))}async function d(){try{if(!r.localStorage)return;await r.localStorage.setItem(n.cacheKey,JSON.stringify(Array.from(a.entries())))}catch(e){}}function p(e){const[t,n]=e.getApiInfo();return"".concat(t,"||").concat(n)}function g(e){const t=p(e);if(!e.isRemoteEval())return t;const n=e.getAttributes(),r=e.getCacheKeyAttributes()||Object.keys(e.getAttributes()),i={};r.forEach((e=>{i[e]=n[e]}));const s=e.getForcedVariations(),o=e.getUrl();return"".concat(t,"||").concat(JSON.stringify({ca:i,fv:s,url:o}))}function y(){const e=Array.from(a.entries()).map((e=>{let[t,n]=e;return{key:t,staleAt:n.staleAt.getTime()}})).sort(((e,t)=>e.staleAt-t.staleAt)),t=Math.min(Math.max(0,a.size-n.maxEntries),a.size);for(let n=0;n<t;n++)a.delete(e[n].key)}function v(e,t,r){const i=r.dateUpdated||"",o=new Date(Date.now()+n.staleTTL),u=a.get(t);if(u&&i&&u.version===i)return u.staleAt=o,void d();a.set(t,{data:r,version:i,staleAt:o,sse:l.has(e)}),y(),d();const c=s.get(e);c&&c.forEach((e=>m(e,r)))}async function m(e,t){t=await e.decryptPayload(t,void 0,r.SubtleCrypto),await e.refreshStickyBuckets(t),e.setFeatures(t.features||e.getFeatures()),e.setExperiments(t.experiments||e.getExperiments())}async function b(e){const{apiHost:t,apiRequestHeaders:n}=e.getApiHosts(),r=e.getClientKey(),s=e.isRemoteEval(),o=p(e),a=g(e);let c=u.get(a);return c||(c=(s?i.fetchRemoteEvalCall({host:t,clientKey:r,payload:{attributes:e.getAttributes(),forcedVariations:e.getForcedVariations(),forcedFeatures:Array.from(e.getForcedFeatures().entries()),url:e.getUrl()},headers:n}):i.fetchFeaturesCall({host:t,clientKey:r,headers:n})).then((e=>{if(!e.ok)throw new Error("HTTP error: ".concat(e.status));return"enabled"===e.headers.get("x-sse-support")&&l.add(o),e.json()})).then((t=>(v(o,a,t),k(e),u.delete(a),t))).catch((e=>(u.delete(a),Promise.resolve({})))),u.set(a,c)),await c}function k(e){const t=p(e),i=g(e),{streamingHost:o,streamingHostRequestHeaders:a}=e.getApiHosts(),u=e.getClientKey();if(n.backgroundSync&&l.has(t)&&r.EventSource){if(c.has(t))return;const e={src:null,host:o,clientKey:u,headers:a,cb:n=>{try{if("features-updated"===n.type){const e=s.get(t);e&&e.forEach((e=>{b(e)}))}else if("features"===n.type){const e=JSON.parse(n.data);v(t,i,e)}e.errors=0}catch(t){_(e)}},errors:0,state:"active"};c.set(t,e),S(e)}}function _(e){if("idle"!==e.state&&(e.errors++,e.errors>3||e.src&&2===e.src.readyState)){const t=Math.pow(3,e.errors-3)*(1e3+1e3*Math.random());A(e),setTimeout((()=>{["idle","active"].includes(e.state)||S(e)}),Math.min(t,3e5))}}function A(e){e.src&&(e.src.onopen=null,e.src.onerror=null,e.src.close(),e.src=null,"active"===e.state&&(e.state="disabled"))}function S(e){e.src=i.eventSourceCall({host:e.host,clientKey:e.clientKey,headers:e.headers}),e.state="active",e.src.addEventListener("features",e.cb),e.src.addEventListener("features-updated",e.cb),e.src.onerror=()=>_(e),e.src.onopen=()=>{e.errors=0}}function E(e,t){A(e),c.delete(t)}function I(){l.clear(),c.forEach(E),s.clear(),i.stopIdleListener()}},200:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BrowserCookieStickyBucketService",{enumerable:!0,get:function(){return s.BrowserCookieStickyBucketService}}),Object.defineProperty(t,"ExpressCookieStickyBucketService",{enumerable:!0,get:function(){return s.ExpressCookieStickyBucketService}}),Object.defineProperty(t,"GrowthBook",{enumerable:!0,get:function(){return i.GrowthBook}}),Object.defineProperty(t,"LocalStorageStickyBucketService",{enumerable:!0,get:function(){return s.LocalStorageStickyBucketService}}),Object.defineProperty(t,"RedisStickyBucketService",{enumerable:!0,get:function(){return s.RedisStickyBucketService}}),Object.defineProperty(t,"StickyBucketService",{enumerable:!0,get:function(){return s.StickyBucketService}}),Object.defineProperty(t,"clearCache",{enumerable:!0,get:function(){return r.clearCache}}),Object.defineProperty(t,"configureCache",{enumerable:!0,get:function(){return r.configureCache}}),Object.defineProperty(t,"evalCondition",{enumerable:!0,get:function(){return o.evalCondition}}),Object.defineProperty(t,"helpers",{enumerable:!0,get:function(){return r.helpers}}),Object.defineProperty(t,"isURLTargeted",{enumerable:!0,get:function(){return a.isURLTargeted}}),Object.defineProperty(t,"onHidden",{enumerable:!0,get:function(){return r.onHidden}}),Object.defineProperty(t,"onVisible",{enumerable:!0,get:function(){return r.onVisible}}),Object.defineProperty(t,"setPolyfills",{enumerable:!0,get:function(){return r.setPolyfills}});var r=n(707),i=n(328),s=n(350),o=n(427),a=n(106)},427:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.evalCondition=s;var r=n(106);const i={};function s(e,t){if("$or"in t)return h(e,t.$or);if("$nor"in t)return!h(e,t.$nor);if("$and"in t)return function(e,t){for(let n=0;n<t.length;n++)if(!s(e,t[n]))return!1;return!0}(e,t.$and);if("$not"in t)return!s(e,t.$not);for(const[n,r]of Object.entries(t))if(!a(r,o(e,n)))return!1;return!0}function o(e,t){const n=t.split(".");let r=e;for(let e=0;e<n.length;e++){if(!r||"object"!=typeof r||!(n[e]in r))return null;r=r[n[e]]}return r}function a(e,t){if("string"==typeof e)return t+""===e;if("number"==typeof e)return 1*t===e;if("boolean"==typeof e)return!!t===e;if(null===e)return null===t;if(Array.isArray(e)||!u(e))return JSON.stringify(t)===JSON.stringify(e);for(const n in e)if(!l(n,t,e[n]))return!1;return!0}function u(e){const t=Object.keys(e);return t.length>0&&t.filter((e=>"$"===e[0])).length===t.length}function c(e,t){return Array.isArray(e)?e.some((e=>t.includes(e))):t.includes(e)}function l(e,t,n){switch(e){case"$veq":return(0,r.paddedVersionString)(t)===(0,r.paddedVersionString)(n);case"$vne":return(0,r.paddedVersionString)(t)!==(0,r.paddedVersionString)(n);case"$vgt":return(0,r.paddedVersionString)(t)>(0,r.paddedVersionString)(n);case"$vgte":return(0,r.paddedVersionString)(t)>=(0,r.paddedVersionString)(n);case"$vlt":return(0,r.paddedVersionString)(t)<(0,r.paddedVersionString)(n);case"$vlte":return(0,r.paddedVersionString)(t)<=(0,r.paddedVersionString)(n);case"$eq":return t===n;case"$ne":return t!==n;case"$lt":return t<n;case"$lte":return t<=n;case"$gt":return t>n;case"$gte":return t>=n;case"$exists":return n?null!=t:null==t;case"$in":return!!Array.isArray(n)&&c(t,n);case"$nin":return!!Array.isArray(n)&&!c(t,n);case"$not":return!a(n,t);case"$size":return!!Array.isArray(t)&&a(n,t.length);case"$elemMatch":return function(e,t){if(!Array.isArray(e))return!1;const n=u(t)?e=>a(t,e):e=>s(e,t);for(let t=0;t<e.length;t++)if(e[t]&&n(e[t]))return!0;return!1}(t,n);case"$all":if(!Array.isArray(t))return!1;for(let e=0;e<n.length;e++){let r=!1;for(let i=0;i<t.length;i++)if(a(n[e],t[i])){r=!0;break}if(!r)return!1}return!0;case"$regex":try{return(o=n,i[o]||(i[o]=new RegExp(o.replace(/([^\\])\//g,"$1\\/"))),i[o]).test(t)}catch(e){return!1}case"$type":return function(e){if(null===e)return"null";if(Array.isArray(e))return"array";const t=typeof e;return["string","number","boolean","object","undefined"].includes(t)?t:"unknown"}(t)===n;default:return console.error("Unknown operator: "+e),!1}var o}function h(e,t){if(!t.length)return!0;for(let n=0;n<t.length;n++)if(s(e,t[n]))return!0;return!1}},350:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StickyBucketService=t.RedisStickyBucketService=t.LocalStorageStickyBucketService=t.ExpressCookieStickyBucketService=t.BrowserCookieStickyBucketService=void 0;class n{async getAllAssignments(e){const t={};return(await Promise.all(Object.entries(e).map((e=>{let[t,n]=e;return this.getAssignments(t,n)})))).forEach((e=>{if(e){const n="".concat(e.attributeName,"||").concat(e.attributeValue);t[n]=e}})),t}}t.StickyBucketService=n,t.LocalStorageStickyBucketService=class extends n{constructor(e){e=e||{},super(),this.prefix=e.prefix||"gbStickyBuckets__";try{this.localStorage=e.localStorage||globalThis.localStorage}catch(e){}}async getAssignments(e,t){const n="".concat(e,"||").concat(t);let r=null;if(!this.localStorage)return r;try{const e=await this.localStorage.getItem(this.prefix+n)||"{}",t=JSON.parse(e);t.attributeName&&t.attributeValue&&t.assignments&&(r=t)}catch(e){}return r}async saveAssignments(e){const t="".concat(e.attributeName,"||").concat(e.attributeValue);if(this.localStorage)try{await this.localStorage.setItem(this.prefix+t,JSON.stringify(e))}catch(e){}}},t.ExpressCookieStickyBucketService=class extends n{constructor(e){let{prefix:t="gbStickyBuckets__",req:n,res:r,cookieAttributes:i={}}=e;super(),this.prefix=t,this.req=n,this.res=r,this.cookieAttributes=i}async getAssignments(e,t){const n="".concat(e,"||").concat(t);let r=null;if(!this.req)return r;try{const e=this.req.cookies[this.prefix+n]||"{}",t=JSON.parse(e);t.attributeName&&t.attributeValue&&t.assignments&&(r=t)}catch(e){}return r}async saveAssignments(e){const t="".concat(e.attributeName,"||").concat(e.attributeValue);if(!this.res)return;const n=JSON.stringify(e);this.res.cookie(encodeURIComponent(this.prefix+t),encodeURIComponent(n),this.cookieAttributes)}},t.BrowserCookieStickyBucketService=class extends n{constructor(e){let{prefix:t="gbStickyBuckets__",jsCookie:n,cookieAttributes:r={}}=e;super(),this.prefix=t,this.jsCookie=n,this.cookieAttributes=r}async getAssignments(e,t){const n="".concat(e,"||").concat(t);let r=null;if(!this.jsCookie)return r;try{const e=this.jsCookie.get(this.prefix+n),t=JSON.parse(e||"{}");t.attributeName&&t.attributeValue&&t.assignments&&(r=t)}catch(e){}return r}async saveAssignments(e){const t="".concat(e.attributeName,"||").concat(e.attributeValue);if(!this.jsCookie)return;const n=JSON.stringify(e);this.jsCookie.set(this.prefix+t,n,this.cookieAttributes)}},t.RedisStickyBucketService=class extends n{constructor(e){let{redis:t}=e;super(),this.redis=t}async getAllAssignments(e){const t={},n=Object.entries(e).map((e=>{let[t,n]=e;return"".concat(t,"||").concat(n)}));return this.redis?(await this.redis.mget(...n).then((e=>{e.forEach((e=>{try{const n=JSON.parse(e||"{}");if(n.attributeName&&n.attributeValue&&n.assignments){const e="".concat(n.attributeName,"||").concat(n.attributeValue);t[e]=n}}catch(e){}}))})),t):t}async getAssignments(e,t){return null}async saveAssignments(e){const t="".concat(e.attributeName,"||").concat(e.attributeValue);this.redis&&await this.redis.set(t,JSON.stringify(e))}}},106:(e,t)=>{"use strict";function n(e){let t=2166136261;const n=e.length;for(let r=0;r<n;r++)t^=e.charCodeAt(r),t+=(t<<1)+(t<<4)+(t<<7)+(t<<8)+(t<<24);return t>>>0}function r(e,t,r){return 2===r?n(n(e+t)+"")%1e4/1e4:1===r?n(t+e)%1e3/1e3:null}function i(e){return e<=0?[]:new Array(e).fill(1/e)}function s(e,t){return e>=t[0]&&e<t[1]}function o(e){try{const t=e.replace(/([^\\])\//g,"$1\\/");return new RegExp(t)}catch(e){return void console.error(e)}}function a(e,t,n){try{const r=new URL(e,"https://_");if("regex"===t){const e=o(n);return!!e&&(e.test(r.href)||e.test(r.href.substring(r.origin.length)))}return"simple"===t&&function(e,t){try{const n=new URL(t.replace(/^([^:/?]*)\./i,"https://$1.").replace(/\*/g,"_____"),"https://_____"),r=[[e.host,n.host,!1],[e.pathname,n.pathname,!0]];return n.hash&&r.push([e.hash,n.hash,!1]),n.searchParams.forEach(((t,n)=>{r.push([e.searchParams.get(n)||"",t,!1])})),!r.some((e=>!function(e,t,n){try{let r=t.replace(/[*.+?^${}()|[\]\\]/g,"\\$&").replace(/_____/g,".*");return n&&(r="\\/?"+r.replace(/(^\/|\/$)/g,"")+"\\/?"),new RegExp("^"+r+"$","i").test(e)}catch(e){return!1}}(e[0],e[1],e[2])))}catch(e){return!1}}(r,n)}catch(e){return!1}}Object.defineProperty(t,"__esModule",{value:!0}),t.chooseVariation=function(e,t){for(let n=0;n<t.length;n++)if(s(e,t[n]))return n;return-1},t.decrypt=async function(e,t,n){if(t=t||"",!(n=n||globalThis.crypto&&globalThis.crypto.subtle))throw new Error("No SubtleCrypto implementation found");try{const r=await n.importKey("raw",u(t),{name:"AES-CBC",length:128},!0,["encrypt","decrypt"]),[i,s]=e.split("."),o=await n.decrypt({name:"AES-CBC",iv:u(i)},r,u(s));return(new TextDecoder).decode(o)}catch(e){throw new Error("Failed to decrypt")}},t.getBucketRanges=function(e,t,n){(t=void 0===t?1:t)<0?t=0:t>1&&(t=1);const r=i(e);(n=n||r).length!==e&&(n=r);const s=n.reduce(((e,t)=>t+e),0);(s<.99||s>1.01)&&(n=r);let o=0;return n.map((e=>{const n=o;return o+=e,[n,n+t*e]}))},t.getEqualWeights=i,t.getQueryStringOverride=function(e,t,n){if(!t)return null;const r=t.split("?")[1];if(!r)return null;const i=r.replace(/#.*/,"").split("&").map((e=>e.split("=",2))).filter((t=>{let[n]=t;return n===e})).map((e=>{let[,t]=e;return parseInt(t)}));return i.length>0&&i[0]>=0&&i[0]<n?i[0]:null},t.getUrlRegExp=o,t.hash=r,t.inNamespace=function(e,t){const n=r("__"+t[0],e,1);return null!==n&&n>=t[1]&&n<t[2]},t.inRange=s,t.isIncluded=function(e){try{return e()}catch(e){return console.error(e),!1}},t.isURLTargeted=function(e,t){if(!t.length)return!1;let n=!1,r=!1;for(let i=0;i<t.length;i++){const s=a(e,t[i].type,t[i].pattern);if(!1===t[i].include){if(s)return!1}else n=!0,s&&(r=!0)}return r||!n},t.loadSDKVersion=function(){let e;try{e="0.36.0"}catch(t){e=""}return e},t.mergeQueryStrings=function(e,t){let n,r;try{n=new URL(e),r=new URL(t)}catch(e){return console.error("Unable to merge query strings: ".concat(e)),t}return n.searchParams.forEach(((e,t)=>{r.searchParams.has(t)||r.searchParams.set(t,e)})),r.toString()},t.paddedVersionString=function(e){"number"==typeof e&&(e+=""),e&&"string"==typeof e||(e="0");const t=e.replace(/(^v|\+.*$)/g,"").split(/[-.]/);return 3===t.length&&t.push("~"),t.map((e=>e.match(/^[0-9]+$/)?e.padStart(5," "):e)).join("-")},t.toString=function(e){return"string"==typeof e?e:JSON.stringify(e)};const u=e=>Uint8Array.from(atob(e),(e=>e.charCodeAt(0)))},591:(e,t,n)=>{"use strict";n.r(t),n.d(t,{connectGlobalObserver:()=>L,default:()=>U,disconnectGlobalObserver:()=>B,validAttributeName:()=>r});var r=/^[a-zA-Z:_][a-zA-Z0-9:_.-]*$/,i={revert:function(){}},s=new Map,o=new Set;function a(e){var t=s.get(e);return t||(t={element:e,attributes:{}},s.set(e,t)),t}function u(e,t,n,r,i){var s=n(e),o={isDirty:!1,originalValue:s,virtualValue:s,mutations:[],el:e,_positionTimeout:null,observer:new MutationObserver((function(){if("position"!==t||!o._positionTimeout){"position"===t&&(o._positionTimeout=setTimeout((function(){o._positionTimeout=null}),1e3));var r=n(e);"position"===t&&r.parentNode===o.virtualValue.parentNode&&r.insertBeforeNode===o.virtualValue.insertBeforeNode||r!==o.virtualValue&&(o.originalValue=r,i(o))}})),mutationRunner:i,setValue:r,getCurrentValue:n};return"position"===t&&e.parentNode?o.observer.observe(e.parentNode,{childList:!0,subtree:!0,attributes:!1,characterData:!1}):o.observer.observe(e,function(e){return"html"===e?{childList:!0,subtree:!0,attributes:!0,characterData:!0}:{childList:!1,subtree:!1,attributes:!0,attributeFilter:[e]}}(t)),o}function c(e,t){var n=t.getCurrentValue(t.el);t.virtualValue=e,e&&"string"!=typeof e?n&&e.parentNode===n.parentNode&&e.insertBeforeNode===n.insertBeforeNode||(t.isDirty=!0,x()):e!==n&&(t.isDirty=!0,x())}function l(e){var t=e.originalValue;e.mutations.forEach((function(e){return t=e.mutate(t)})),c(function(e){return S||(S=document.createElement("div")),S.innerHTML=e,S.innerHTML}(t),e)}function h(e){var t=new Set(e.originalValue.split(/\s+/).filter(Boolean));e.mutations.forEach((function(e){return e.mutate(t)})),c(Array.from(t).filter(Boolean).join(" "),e)}function f(e){var t=e.originalValue;e.mutations.forEach((function(e){return t=e.mutate(t)})),c(t,e)}function d(e){var t=e.originalValue;e.mutations.forEach((function(e){var n=function(e){var t=e.parentSelector,n=e.insertBeforeSelector,r=document.querySelector(t);if(!r)return null;var i=n?document.querySelector(n):null;return n&&!i?null:{parentNode:r,insertBeforeNode:i}}(e.mutate());t=n||t})),c(t,e)}var p=function(e){return e.innerHTML},g=function(e,t){return e.innerHTML=t};function y(e){var t=a(e);return t.html||(t.html=u(e,"html",p,g,l)),t.html}var v=function(e){return{parentNode:e.parentElement,insertBeforeNode:e.nextElementSibling}},m=function(e,t){t.insertBeforeNode&&!t.parentNode.contains(t.insertBeforeNode)||t.parentNode.insertBefore(e,t.insertBeforeNode)};function b(e){var t=a(e);return t.position||(t.position=u(e,"position",v,m,d)),t.position}var k=function(e,t){return t?e.className=t:e.removeAttribute("class")},_=function(e){return e.className};function A(e){var t=a(e);return t.classes||(t.classes=u(e,"class",_,k,h)),t.classes}var S,E,I=function(e){return function(t){var n;return null!=(n=t.getAttribute(e))?n:null}},w=function(e){return function(t,n){return null!==n?t.setAttribute(e,n):t.removeAttribute(e)}};function O(e,t){var n=a(e);return n.attributes[t]||(n.attributes[t]=u(e,t,I(t),w(t),f)),n.attributes[t]}function C(e,t,n){if(n.isDirty){n.isDirty=!1;var r=n.virtualValue;n.mutations.length||function(e,t){var n,r,i=s.get(e);if(i)if("html"===t)null==(n=i.html)||null==(r=n.observer)||r.disconnect(),delete i.html;else if("class"===t){var o,a;null==(o=i.classes)||null==(a=o.observer)||a.disconnect(),delete i.classes}else if("position"===t){var u,c;null==(u=i.position)||null==(c=u.observer)||c.disconnect(),delete i.position}else{var l,h,f;null==(l=i.attributes)||null==(h=l[t])||null==(f=h.observer)||f.disconnect(),delete i.attributes[t]}}(e,t),n.setValue(e,r)}}function T(e,t){e.html&&C(t,"html",e.html),e.classes&&C(t,"class",e.classes),e.position&&C(t,"position",e.position),Object.keys(e.attributes).forEach((function(n){C(t,n,e.attributes[n])}))}function x(){s.forEach(T)}function R(e){if("position"!==e.kind||1!==e.elements.size){var t=new Set(e.elements);document.querySelectorAll(e.selector).forEach((function(n){t.has(n)||(e.elements.add(n),function(e,t){var n=null;"html"===e.kind?n=y(t):"class"===e.kind?n=A(t):"attribute"===e.kind?n=O(t,e.attribute):"position"===e.kind&&(n=b(t)),n&&(n.mutations.push(e),n.mutationRunner(n))}(e,n))}))}}function P(){o.forEach(R)}function B(){E&&E.disconnect()}function L(){"undefined"!=typeof document&&(E||(E=new MutationObserver((function(){P()}))),P(),E.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!1,characterData:!1}))}function D(e){return"undefined"==typeof document?i:(o.add(e),R(e),{revert:function(){var t;(t=e).elements.forEach((function(e){return function(e,t){var n=null;if("html"===e.kind?n=y(t):"class"===e.kind?n=A(t):"attribute"===e.kind?n=O(t,e.attribute):"position"===e.kind&&(n=b(t)),n){var r=n.mutations.indexOf(e);-1!==r&&n.mutations.splice(r,1),n.mutationRunner(n)}}(t,e)})),t.elements.clear(),o.delete(t)}})}function M(e,t){return D({kind:"html",elements:new Set,mutate:t,selector:e})}function F(e,t){return D({kind:"position",elements:new Set,mutate:t,selector:e})}function N(e,t){return D({kind:"class",elements:new Set,mutate:t,selector:e})}function j(e,t,n){return r.test(t)?"class"===t||"className"===t?N(e,(function(e){var t=n(Array.from(e).join(" "));e.clear(),t&&t.split(/\s+/g).filter(Boolean).forEach((function(t){return e.add(t)}))})):D({kind:"attribute",attribute:t,elements:new Set,mutate:n,selector:e}):i}L();const U={html:M,classes:N,attribute:j,position:F,declarative:function(e){var t=e.selector,n=e.action,r=e.value,s=e.attribute,o=e.parentSelector,a=e.insertBeforeSelector;if("html"===s){if("append"===n)return M(t,(function(e){return e+(null!=r?r:"")}));if("set"===n)return M(t,(function(){return null!=r?r:""}))}else if("class"===s){if("append"===n)return N(t,(function(e){r&&e.add(r)}));if("remove"===n)return N(t,(function(e){r&&e.delete(r)}));if("set"===n)return N(t,(function(e){e.clear(),r&&e.add(r)}))}else if("position"===s){if("set"===n&&o)return F(t,(function(){return{insertBeforeSelector:a,parentSelector:o}}))}else{if("append"===n)return j(t,s,(function(e){return null!==e?e+(null!=r?r:""):null!=r?r:""}));if("set"===n)return j(t,s,(function(){return null!=r?r:""}));if("remove"===n)return j(t,s,(function(){return null}))}return i}}},202:function(e,t,n){!function(e){"use strict";function t(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 r(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?t(Object(r),!0).forEach((function(t){u(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):t(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function i(e){return i="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},i(e)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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,f(r.key),r)}}function a(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function u(e,t,n){return(t=f(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c.apply(this,arguments)}function l(e){return function(e){if(Array.isArray(e))return h(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(e,t):void 0}}(e)||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 h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function f(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}var d="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{};function p(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var g={exports:{}};!function(e){function t(e){if(e)return function(e){for(var n in t.prototype)e[n]=t.prototype[n];return e}(e)}e.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}}(g);var y=g.exports,v=p(y);function m(e){return null!=e&&"object"===i(e)&&!0===e["@@functional/placeholder"]}function b(e){return function t(n){return 0===arguments.length||m(n)?t:e.apply(this,arguments)}}function k(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return m(n)?t:b((function(t){return e(n,t)}));default:return m(n)&&m(r)?t:m(n)?b((function(t){return e(t,r)})):m(r)?b((function(t){return e(n,t)})):e(n,r)}}}function _(e){return function t(n,r,i){switch(arguments.length){case 0:return t;case 1:return m(n)?t:k((function(t,r){return e(n,t,r)}));case 2:return m(n)&&m(r)?t:m(n)?k((function(t,n){return e(t,r,n)})):m(r)?k((function(t,r){return e(n,t,r)})):b((function(t){return e(n,r,t)}));default:return m(n)&&m(r)&&m(i)?t:m(n)&&m(r)?k((function(t,n){return e(t,n,i)})):m(n)&&m(i)?k((function(t,n){return e(t,r,n)})):m(r)&&m(i)?k((function(t,r){return e(n,t,r)})):m(n)?b((function(t){return e(t,r,i)})):m(r)?b((function(t){return e(n,t,i)})):m(i)?b((function(t){return e(n,r,t)})):e(n,r,i)}}}function A(e,t){return Object.prototype.hasOwnProperty.call(t,e)}var S=b((function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}));function E(e){return"[object Object]"===Object.prototype.toString.call(e)}function I(e,t,n){if(n||(n=new w),function(e){var t=i(e);return null==e||"object"!=t&&"function"!=t}(e))return e;var r,s=function(r){var i=n.get(e);if(i)return i;for(var s in n.set(e,r),e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=t?I(e[s],!0,n):e[s]);return r};switch(S(e)){case"Object":return s(Object.create(Object.getPrototypeOf(e)));case"Array":return s([]);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 w=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){var i=n[r];if(i[0]===e)return i[1]}else{var s=this.hash(e),o=this.map[s];if(o)for(var a=0;a<o.length;a+=1){var u=o[a];if(u[0]===e)return u[1]}}},e}(),O=b((function(e){return null!=e&&"function"==typeof e.clone?e.clone():I(e,!0)})),C=_((function(e,t,n){var r,i={};for(r in n=n||{},t=t||{})A(r,t)&&(i[r]=A(r,n)?e(r,t[r],n[r]):t[r]);for(r in n)A(r,n)&&!A(r,i)&&(i[r]=n[r]);return i})),T=_((function e(t,n,r){return C((function(n,r,i){return E(r)&&E(i)?e(t,r,i):t(n,r,i)}),n,r)})),x=_((function(e,t,n){return T((function(t,n,r){return e(n,r)}),t,n)})),R=function(e){return null!=e&&"object"===i(e)&&!1===Array.isArray(e)};function P(e,t,n){return"function"==typeof n.join?n.join(e):e[0]+t+e[1]}function B(e,t,n){return"function"!=typeof n.isValid||n.isValid(e,t)}function L(e){return R(e)||Array.isArray(e)||"function"==typeof e}for(var D,M=p((function(e,t,n){if(R(n)||(n={default:n}),!L(e))return void 0!==n.default?n.default:e;"number"==typeof t&&(t=String(t));var r=Array.isArray(t),i="string"==typeof t,s=n.separator||".",o=n.joinChar||("string"==typeof s?s:".");if(!i&&!r)return e;if(i&&t in e)return B(t,e,n)?e[t]:n.default;var a=r?t:function(e,t,n){return"function"==typeof n.split?n.split(e):e.split(t)}(t,s,n),u=a.length,c=0;do{var l=a[c];for("number"==typeof l&&(l=String(l));l&&"\\"===l.slice(-1);)l=P([l.slice(0,-1),a[++c]||""],o,n);if(l in e){if(!B(l,e,n))return n.default;e=e[l]}else{for(var h=!1,f=c+1;f<u;)if(h=(l=P([l,a[f++]],o,n))in e){if(!B(l,e,n))return n.default;e=e[l],c=f-1;break}if(!h)return n.default}}while(++c<u&&L(e));return c===u?e:n.default})),F=256,N=[];F--;)N[F]=(F+256).toString(16).substring(1);for(var j,U=[],G=0;G<256;G++)U[G]=(G+256).toString(16).substring(1);var V,K,H,z,Q,q,$,J,W,Y,X,Z,ee,te,ne,re,ie,se,oe,ae,ue,ce,le,he,fe,de,pe,ge,ye,ve,me,be,ke,_e,Ae,Se,Ee,Ie,we,Oe,Ce,Te,xe,Re,Pe,Be,Le,De,Me,Fe,Ne,je,Ue,Ge,Ve,Ke,He,ze,Qe,qe,$e,Je,We,Ye,Xe,Ze,et,tt,nt,rt,it,st,ot,at=4,ut={setLogLevel:function(e){switch(e.toUpperCase()){case"INFO":at=1;break;case"DEBUG":at=2;break;case"WARN":at=3;break;default:at=4}},info:function(){var e;at<=1&&(e=console).info.apply(e,arguments)},debug:function(){var e;at<=2&&(e=console).log.apply(e,arguments)},warn:function(){var e;at<=3&&(e=console).warn.apply(e,arguments)},error:function(){var e;at<=4&&(e=console).error.apply(e,arguments)}},ct="ADOBE_ANALYTICS",lt=(u(V={"Adobe Analytics":ct,ADOBEANALYTICS:ct,"ADOBE ANALYTICS":ct},ct,ct),u(V,"AdobeAnalytics",ct),u(V,"adobeanalytics",ct),u(V,"adobe analytics",ct),u(V,"Adobe analytics",ct),u(V,"adobe Analytics",ct),V),ht="AM",ft=(u(K={},ht,ht),u(K,"AMPLITUDE",ht),u(K,"Amplitude",ht),u(K,"am",ht),K),dt="APPCUES",pt=(u(H={},dt,dt),u(H,"Appcues",dt),u(H,"App Cues",dt),u(H,"appcues",dt),H),gt="BINGADS",yt=(u(z={},gt,gt),u(z,"BingAds",gt),u(z,"bingads",gt),u(z,"Bing Ads",gt),u(z,"Bing ads",gt),u(z,"bing Ads",gt),u(z,"bing ads",gt),z),vt="BRAZE",mt=(u(Q={},vt,vt),u(Q,"Braze",vt),u(Q,"braze",vt),Q),bt="BUGSNAG",kt=(u(q={},bt,bt),u(q,"bugsnag",bt),u(q,"Bugsnag",bt),q),_t="CHARTBEAT",At=(u($={},_t,_t),u($,"Chartbeat",_t),u($,"chartbeat",_t),u($,"Chart Beat",_t),u($,"chart beat",_t),$),St="CLEVERTAP",Et=(u(J={},St,St),u(J,"Clevertap",St),u(J,"clevertap",St),J),It="COMSCORE",wt=(u(W={},It,It),u(W,"Comscore",It),u(W,"Com Score",It),u(W,"com Score",It),u(W,"com score",It),u(W,"Com score",It),W),Ot="CRITEO",Ct=(u(Y={},Ot,Ot),u(Y,"Criteo",Ot),u(Y,"criteo",Ot),Y),Tt="CUSTOMERIO",xt=(u(X={},Tt,Tt),u(X,"Customerio",Tt),u(X,"Customer.io",Tt),u(X,"CUSTOMER.IO",Tt),u(X,"customer.io",Tt),X),Rt="DRIP",Pt=(u(Z={},Rt,Rt),u(Z,"Drip",Rt),u(Z,"drip",Rt),Z),Bt="FACEBOOK_PIXEL",Lt=(u(ee={},Bt,Bt),u(ee,"FB Pixel",Bt),u(ee,"Facebook Pixel",Bt),u(ee,"facebook pixel",Bt),u(ee,"fbpixel",Bt),u(ee,"FBPIXEL",Bt),u(ee,"FB_PIXEL",Bt),ee),Dt="FULLSTORY",Mt=(u(te={},Dt,Dt),u(te,"Fullstory",Dt),u(te,"FullStory",Dt),u(te,"full Story",Dt),u(te,"Full Story",Dt),u(te,"Full story",Dt),u(te,"full story",Dt),u(te,"fullstory",Dt),te),Ft="GA",Nt=(u(ne={},Ft,Ft),u(ne,"Google Analytics",Ft),u(ne,"GoogleAnalytics",Ft),u(ne,"GOOGLE ANALYTICS",Ft),u(ne,"google analytics",Ft),ne),jt="GA4",Ut=(u(re={},jt,jt),u(re,"Google Analytics 4",jt),u(re,"Google analytics 4",jt),u(re,"google analytics 4",jt),u(re,"Google Analytics4",jt),u(re,"Google analytics4",jt),u(re,"google analytics4",jt),u(re,"GoogleAnalytics4",jt),re),Gt="GOOGLEADS",Vt=(u(ie={},Gt,Gt),u(ie,"Google Ads",Gt),u(ie,"GoogleAds",Gt),u(ie,"GOOGLE ADS",Gt),u(ie,"google ads",Gt),u(ie,"googleads",Gt),ie),Kt="GOOGLE_OPTIMIZE",Ht=(u(se={},Kt,Kt),u(se,"Google Optimize",Kt),u(se,"GoogleOptimize",Kt),u(se,"Googleoptimize",Kt),u(se,"GOOGLEOPTIMIZE",Kt),u(se,"google optimize",Kt),u(se,"Google optimize",Kt),u(se,"GOOGLE OPTIMIZE",Kt),se),zt="GTM",Qt=(u(oe={},zt,zt),u(oe,"Google Tag Manager",zt),u(oe,"google tag manager",zt),u(oe,"googletag manager",zt),u(oe,"googletagmanager",zt),oe),qt="HEAP",$t=(u(ae={},qt,qt),u(ae,"Heap",qt),u(ae,"heap",qt),u(ae,"Heap.io",qt),ae),Jt="HOTJAR",Wt=(u(ue={},Jt,Jt),u(ue,"Hotjar",Jt),u(ue,"hotjar",Jt),u(ue,"Hot Jar",Jt),u(ue,"hot jar",Jt),ue),Yt="HS",Xt=(u(ce={},Yt,Yt),u(ce,"Hubspot",Yt),u(ce,"HUBSPOT",Yt),u(ce,"hub spot",Yt),u(ce,"Hub Spot",Yt),u(ce,"Hub spot",Yt),ce),Zt="INTERCOM",en=(u(le={},Zt,Zt),u(le,"Intercom",Zt),u(le,"intercom",Zt),le),tn="KEEN",nn=(u(he={},tn,tn),u(he,"Keen",tn),u(he,"Keen.io",tn),u(he,"keen",tn),u(he,"keen.io",tn),he),rn="KISSMETRICS",sn=(u(fe={},rn,rn),u(fe,"Kissmetrics",rn),u(fe,"kissmetrics",rn),fe),on="KLAVIYO",an=(u(de={},on,on),u(de,"Klaviyo",on),u(de,"klaviyo",on),de),un="LAUNCHDARKLY",cn=(u(pe={},un,un),u(pe,"LaunchDarkly",un),u(pe,"Launch_Darkly",un),u(pe,"Launch Darkly",un),u(pe,"launchDarkly",un),u(pe,"launch darkly",un),pe),ln="LINKEDIN_INSIGHT_TAG",hn=(u(ge={},ln,ln),u(ge,"LinkedIn Insight Tag",ln),u(ge,"LinkedIn insight tag",ln),u(ge,"linkedIn insight tag",ln),u(ge,"Linkedin_insight_tag",ln),u(ge,"LinkedinInsighttag",ln),u(ge,"LinkedinInsightTag",ln),u(ge,"LinkedInInsightTag",ln),u(ge,"Linkedininsighttag",ln),u(ge,"LINKEDININSIGHTTAG",ln),u(ge,"linkedininsighttag",ln),ge),fn="LOTAME",dn=(u(ye={},fn,fn),u(ye,"Lotame",fn),u(ye,"lotame",fn),ye),pn="LYTICS",gn=(u(ve={},pn,pn),u(ve,"Lytics",pn),u(ve,"lytics",pn),ve),yn="MP",vn=(u(me={},yn,yn),u(me,"MIXPANEL",yn),u(me,"Mixpanel",yn),u(me,"MIX PANEL",yn),u(me,"Mix panel",yn),u(me,"Mix Panel",yn),me),mn="MOENGAGE",bn=(u(be={},mn,mn),u(be,"MoEngage",mn),u(be,"moengage",mn),u(be,"Moengage",mn),u(be,"Mo Engage",mn),u(be,"mo engage",mn),u(be,"Mo engage",mn),be),kn="OPTIMIZELY",_n=(u(ke={},kn,kn),u(ke,"Optimizely",kn),u(ke,"optimizely",kn),ke),An="PENDO",Sn=(u(_e={},An,An),u(_e,"Pendo",An),u(_e,"pendo",An),_e),En="PINTEREST_TAG",In=(u(Ae={},En,En),u(Ae,"PinterestTag",En),u(Ae,"Pinterest_Tag",En),u(Ae,"PINTERESTTAG",En),u(Ae,"pinterest",En),u(Ae,"PinterestAds",En),u(Ae,"Pinterest_Ads",En),u(Ae,"Pinterest",En),u(Ae,"Pinterest Tag",En),u(Ae,"Pinterest tag",En),u(Ae,"PINTEREST TAG",En),u(Ae,"pinterest tag",En),u(Ae,"Pinterest Ads",En),u(Ae,"Pinterest ads",En),Ae),wn="POST_AFFILIATE_PRO",On=(u(Se={},wn,wn),u(Se,"PostAffiliatePro",wn),u(Se,"Post_affiliate_pro",wn),u(Se,"Post Affiliate Pro",wn),u(Se,"Post affiliate pro",wn),u(Se,"post affiliate pro",wn),u(Se,"postaffiliatepro",wn),u(Se,"POSTAFFILIATEPRO",wn),Se),Cn="POSTHOG",Tn=(u(Ee={},Cn,Cn),u(Ee,"PostHog",Cn),u(Ee,"Posthog",Cn),u(Ee,"posthog",Cn),u(Ee,"Post Hog",Cn),u(Ee,"Post hog",Cn),u(Ee,"post hog",Cn),Ee),xn="PROFITWELL",Rn=(u(Ie={},xn,xn),u(Ie,"ProfitWell",xn),u(Ie,"profitwell",xn),u(Ie,"Profitwell",xn),u(Ie,"Profit Well",xn),u(Ie,"profit well",xn),u(Ie,"Profit well",xn),Ie),Pn="QUALTRICS",Bn=(u(we={},Pn,Pn),u(we,"Qualtrics",Pn),u(we,"qualtrics",Pn),we),Ln="QUANTUMMETRIC",Dn=(u(Oe={},Ln,Ln),u(Oe,"Quantum Metric",Ln),u(Oe,"quantum Metric",Ln),u(Oe,"quantum metric",Ln),u(Oe,"QuantumMetric",Ln),u(Oe,"quantumMetric",Ln),u(Oe,"quantummetric",Ln),u(Oe,"Quantum_Metric",Ln),Oe),Mn="REDDIT_PIXEL",Fn=(u(Ce={},Mn,Mn),u(Ce,"Reddit_Pixel",Mn),u(Ce,"RedditPixel",Mn),u(Ce,"REDDITPIXEL",Mn),u(Ce,"redditpixel",Mn),u(Ce,"Reddit Pixel",Mn),u(Ce,"REDDIT PIXEL",Mn),u(Ce,"reddit pixel",Mn),Ce),Nn="SENTRY",jn=(u(Te={},Nn,Nn),u(Te,"sentry",Nn),u(Te,"Sentry",Nn),Te),Un="SNAP_PIXEL",Gn=(u(xe={},Un,Un),u(xe,"Snap_Pixel",Un),u(xe,"SnapPixel",Un),u(xe,"SNAPPIXEL",Un),u(xe,"snappixel",Un),u(xe,"Snap Pixel",Un),u(xe,"SNAP PIXEL",Un),u(xe,"snap pixel",Un),xe),Vn="TVSQUARED",Kn=(u(Re={},Vn,Vn),u(Re,"TVSquared",Vn),u(Re,"tvsquared",Vn),u(Re,"tvSquared",Vn),u(Re,"TvSquared",Vn),u(Re,"Tvsquared",Vn),u(Re,"TV Squared",Vn),u(Re,"tv squared",Vn),u(Re,"tv Squared",Vn),Re),Hn="VWO",zn=(u(Pe={},Hn,Hn),u(Pe,"VisualWebsiteOptimizer",Hn),u(Pe,"Visualwebsiteoptimizer",Hn),u(Pe,"visualwebsiteoptimizer",Hn),u(Pe,"vwo",Hn),u(Pe,"Visual Website Optimizer",Hn),u(Pe,"Visual website optimizer",Hn),u(Pe,"visual website optimizer",Hn),Pe),Qn="GA360",qn=(u(Be={},Qn,Qn),u(Be,"Google Analytics 360",Qn),u(Be,"Google analytics 360",Qn),u(Be,"google analytics 360",Qn),u(Be,"Google Analytics360",Qn),u(Be,"Google analytics360",Qn),u(Be,"google analytics360",Qn),u(Be,"GoogleAnalytics360",Qn),u(Be,"GA 360",Qn),Be),$n="ADROLL",Jn=(u(Le={},$n,$n),u(Le,"Adroll",$n),u(Le,"Ad roll",$n),u(Le,"ad roll",$n),u(Le,"adroll",$n),Le),Wn="DCM_FLOODLIGHT",Yn=(u(De={},Wn,Wn),u(De,"DCM Floodlight",Wn),u(De,"dcm floodlight",Wn),u(De,"Dcm Floodlight",Wn),u(De,"DCMFloodlight",Wn),u(De,"dcmfloodlight",Wn),u(De,"DcmFloodlight",Wn),u(De,"dcm_floodlight",Wn),u(De,"DCM_Floodlight",Wn),De),Xn="MATOMO",Zn=(u(Me={},Xn,Xn),u(Me,"Matomo",Xn),u(Me,"matomo",Xn),Me),er="VERO",tr=(u(Fe={},er,er),u(Fe,"Vero",er),u(Fe,"vero",er),Fe),nr="MOUSEFLOW",rr=(u(Ne={},nr,nr),u(Ne,"Mouseflow",nr),u(Ne,"mouseflow",nr),u(Ne,"mouseFlow",nr),u(Ne,"MouseFlow",nr),u(Ne,"Mouse flow",nr),u(Ne,"mouse flow",nr),u(Ne,"mouse Flow",nr),u(Ne,"Mouse Flow",nr),Ne),ir="ROCKERBOX",sr=(u(je={},ir,ir),u(je,"Rockerbox",ir),u(je,"rockerbox",ir),u(je,"RockerBox",ir),u(je,"Rocker box",ir),u(je,"rocker box",ir),u(je,"Rocker Box",ir),je),or="CONVERTFLOW",ar=(u(Ue={},or,or),u(Ue,"Convertflow",or),u(Ue,"convertflow",or),u(Ue,"convertFlow",or),u(Ue,"ConvertFlow",or),u(Ue,"Convert flow",or),u(Ue,"convert flow",or),u(Ue,"convert Flow",or),u(Ue,"Convert Flow",or),u(Ue,"CONVERT FLOW",or),Ue),ur="SNAPENGAGE",cr=(u(Ge={},ur,ur),u(Ge,"SnapEngage",ur),u(Ge,"Snap_Engage",ur),u(Ge,"snapengage",ur),u(Ge,"SNAP ENGAGE",ur),u(Ge,"Snap Engage",ur),u(Ge,"snap engage",ur),Ge),lr="LIVECHAT",hr=(u(Ve={},lr,lr),u(Ve,"LiveChat",lr),u(Ve,"Live_Chat",lr),u(Ve,"livechat",lr),u(Ve,"LIVE CHAT",lr),u(Ve,"Live Chat",lr),u(Ve,"live chat",lr),Ve),fr="SHYNET",dr=(u(Ke={},fr,fr),u(Ke,"shynet",fr),u(Ke,"ShyNet",fr),u(Ke,"shyNet",fr),u(Ke,"Shynet",fr),u(Ke,"shy net",fr),u(Ke,"Shy Net",fr),u(Ke,"shy Net",fr),u(Ke,"Shy net",fr),Ke),pr="WOOPRA",gr=(u(He={},pr,pr),u(He,"Woopra",pr),u(He,"woopra",pr),He),yr="ROLLBAR",vr=(u(ze={},yr,yr),u(ze,"RollBar",yr),u(ze,"Roll_Bar",yr),u(ze,"rollbar",yr),u(ze,"Rollbar",yr),u(ze,"ROLL BAR",yr),u(ze,"Roll Bar",yr),u(ze,"roll bar",yr),ze),mr="QUORA_PIXEL",br=(u(Qe={},mr,mr),u(Qe,"Quora Pixel",mr),u(Qe,"Quora pixel",mr),u(Qe,"QUORA PIXEL",mr),u(Qe,"QuoraPixel",mr),u(Qe,"Quorapixel",mr),u(Qe,"QUORAPIXEL",mr),u(Qe,"Quora_Pixel",mr),u(Qe,"quora_pixel",mr),u(Qe,"Quora",mr),Qe),kr="JUNE",_r=(u(qe={},kr,kr),u(qe,"June",kr),u(qe,"june",kr),qe),Ar="ENGAGE",Sr=(u($e={},Ar,Ar),u($e,"Engage",Ar),u($e,"engage",Ar),$e),Er="ITERABLE",Ir=(u(Je={},Er,Er),u(Je,"Iterable",Er),u(Je,"iterable",Er),Je),wr="YANDEX_METRICA",Or=(u(We={},wr,wr),u(We,"Yandexmetrica",wr),u(We,"yandexmetrica",wr),u(We,"yandexMetrica",wr),u(We,"YandexMetrica",wr),We),Cr="REFINER",Tr=(u(Ye={},Cr,Cr),u(Ye,"Refiner",Cr),u(Ye,"refiner",Cr),Ye),xr="QUALAROO",Rr=(u(Xe={},xr,xr),u(Xe,"Qualaroo",xr),u(Xe,"qualaroo",xr),Xe),Pr="PODSIGHTS",Br=(u(Ze={},Pr,Pr),u(Ze,"Podsights",Pr),u(Ze,"PodSights",Pr),u(Ze,"pod Sights",Pr),u(Ze,"Pod Sights",Pr),u(Ze,"pod sights",Pr),u(Ze,"POD SIGHTS",Pr),u(Ze,"Pod sights",Pr),Ze),Lr="AXEPTIO",Dr=(u(et={},Lr,Lr),u(et,"Axeptio",Lr),u(et,"axeptio",Lr),et),Mr="SATISMETER",Fr=(u(tt={},Mr,Mr),u(tt,"Satismeter",Mr),u(tt,"SatisMeter",Mr),u(tt,"SATISMETER",Mr),tt),Nr="MICROSOFT_CLARITY",jr=(u(nt={},Nr,Nr),u(nt,"Microsoft Clarity",Nr),u(nt,"Microsoft clarity",Nr),u(nt,"microsoft clarity",Nr),u(nt,"Microsoft_clarity",Nr),u(nt,"MicrosoftClarity",Nr),u(nt,"MICROSOFTCLARITY",Nr),u(nt,"microsoftclarity",Nr),u(nt,"microsoftClarity",Nr),nt),Ur="SENDINBLUE",Gr=(u(rt={},Ur,Ur),u(rt,"Sendinblue",Ur),u(rt,"sendinblue",Ur),u(rt,"SendinBlue",Ur),rt),Vr="OLARK",Kr=(u(it={},Vr,Vr),u(it,"Olark",Vr),u(it,"olark",Vr),it),Hr="LEMNISK",zr=(u(st={},Hr,Hr),u(st,"LEMNISK_MARKETING_AUTOMATION",Hr),u(st,"Lemnisk Marketing Automation",Hr),u(st,"LemniskMarketingAutomation",Hr),u(st,"lemniskmarketingautomation",Hr),u(st,"lemniskMarketingAutomation",Hr),u(st,"lemnisk",Hr),u(st,"Lemnisk",Hr),st),Qr="TIKTOK_ADS",qr=(u(ot={},Qr,Qr),u(ot,"TiktokAds",Qr),u(ot,"TIKTOK_ADS",Qr),u(ot,"Tiktok ads",Qr),u(ot,"Tiktok Ads",Qr),u(ot,"Tik Tok Ads",Qr),u(ot,"tik tok ads",Qr),u(ot,"tiktokads",Qr),ot),$r=r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r({All:"All"},lt),ft),pt),yt),mt),kt),At),Et),wt),Ct),xt),Pt),Lt),Mt),Nt),Ut),qn),Vt),Ht),Qt),$t),Wt),Xt),en),nn),sn),an),cn),hn),dn),gn),vn),bn),_n),Sn),In),On),Tn),Rn),Bn),Dn),Fn),jn),Gn),Kn),zn),Jn),Yn),Zn),tr),rr),ar),cr),hr),dr),gr),vr),br),_r),Sr),Ir),sr),Or),Tr),Rr),Br),Dr),Fr),jr),Gr),Kr),zr),qr),Jr={All:"All",GA:"Google Analytics",GOOGLEADS:"Google Ads",BRAZE:"Braze",CHARTBEAT:"Chartbeat",COMSCORE:"Comscore",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",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"},Wr=["anonymous_id","id","sent_at","received_at","timestamp","original_timestamp","event_text","event"],Yr="https://api.rudderlabs.com/sourceConfig/?p=npm&v=2.37.0",Xr="v1.1",Zr="js-integrations",ei="".concat("https://cdn.rudderlabs.com","/").concat(Xr,"/").concat(Zr),ti=1e4,ni=1e3,ri=["Lax","None","Strict"],ii=["US","EU"],si=["oneTrust","ketch"],oi=["library","consentManagement"],ai=["none","default","full"],ui={All:!0},ci="Request failed with status:",li=[ci],hi=function(e){var t=window.rudderanalytics&&window.rudderanalytics.errorReporting;t&&e instanceof Error&&t.notify(e)},fi=function(e,t){if(!Array.isArray(e)||!Array.isArray(t))return O(t);var n=O(e);return t.forEach((function(e,t){n[t]=di(n[t],e)})),n},di=function(e,t){return x(fi,e,t)},pi=function(e,t){return JSON.stringify(e,function(e){var t=[];return function(n,r){if(!e||null!=r){if("object"!==i(r)||null===r)return r;for(;t.length>0&&t[t.length-1]!==this;)t.pop();return t.includes(r)?(ut.debug("Circular Reference detected for key: ".concat(n)),"[Circular Reference]"):(t.push(r),r)}}}(t))},gi=function(e,t,n){var r,s;try{r="string"==typeof e?e:e instanceof Error||e.message?e.message:pi(e)}catch(e){r=""}if("object"===i(s=e)&&null!==s&&"target"in s){if(e.target&&"script"!==e.target.localName)return"";if(e.target.dataset&&("RS_JS_SDK"!==e.target.dataset.loader||"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,'"')},yi=function(e,t,n){var r;try{r=gi(e,t,n)}catch(t){ut.error("[handleError] Exception:: ",t),ut.error("[handleError] Original error:: ",pi(e)),hi(t)}r&&(ut.error(r),function(e){return!e.message||!li.some((function(t){return e.message.includes(t)}))}(e)&&hi(e))};function vi(e){return e&&e.endsWith("/")?e.replace(/\/+$/,""):e}function mi(){return window.crypto&&"function"==typeof window.crypto.getRandomValues?function(){(!j||G+16>4096)&&(j=crypto.getRandomValues(new Uint8Array(4096)),G=0);for(var e,t=0,n="";t<16;t++)e=j[G+t],n+=6==t?U[15&e|64]:8==t?U[63&e|128]:U[e],1&t&&t>1&&t<11&&(n+="-");return G+=16,n}():function(){var e,t=0,n="";if(!D||F+16>256){for(D=Array(t=256);t--;)D[t]=256*Math.random()|0;t=F=0}for(;t<16;t++)e=D[F+t],n+=6==t?N[15&e|64]:8==t?N[63&e|128]:N[e],1&t&&t>1&&t<11&&(n+="-");return F++,n}()}function bi(){return(new Date).toISOString()}function ki(e,t){Object.keys(e).forEach((function(n){e.hasOwnProperty(n)&&(t[n]&&(e[t[n]]=e[n]),"All"!=n&&null!=t[n]&&t[n]!=n&&delete e[n])}))}function _i(e){ki(e,$r)}function Ai(e){ki(e,Jr)}function Si(e,t){var n=[];if(!t||0===t.length)return n;var r=!0;void 0!==e.All&&(r=e.All);var s=[];return"string"==typeof t[0]?t.forEach((function(e){s.push({intgName:e,intObj:e})})):"object"===i(t[0])&&t.forEach((function(e){s.push({intgName:e.name,intObj:e})})),s.forEach((function(t){var i=t.intgName,s=t.intObj;if(r){var o=!0;null!=e[i]&&0==e[i]&&(o=!1),o&&n.push(s)}else null!=e[i]&&1==e[i]&&n.push(s)})),n}var Ei,Ii=function(){for(var e,t=document.getElementsByTagName("script"),n=!1,r=0;r<t.length;r+=1){var i=vi(t[r].getAttribute("src"));if(i){var s=i.match(/^.*rudder-analytics(-staging)?(\.min)?\.js$/);if(s){e=i,n=void 0!==s[1];break}}}return{sdkURL:e,isStaging:n}},wi=function(e){return"string"==typeof e||null==e?e:JSON.stringify(e)},Oi=function(e){return!(!e||"string"!=typeof e||0===e.trim().length)},Ci={exports:{}},Ti={exports:{}},xi=function(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){if(this instanceof e){var n=[null];return n.push.apply(n,arguments),new(Function.bind.apply(t,n))}return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),n}(Object.freeze({__proto__:null,default:{}}));function Ri(){return Ei||(Ei=1,function(e,t){var n;e.exports=(n=n||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=xi}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}}(),s={},o=s.lib={},a=o.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=o.WordArray=a.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t: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 s=0;s<i;s++){var o=n[s>>>2]>>>24-s%4*8&255;t[r+s>>>2]|=o<<24-(r+s)%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=s.enc={},l=c.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var s=t[i>>>2]>>>24-i%4*8&255;r.push((s>>>4).toString(16)),r.push((15&s).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 s=t[i>>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(s))}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=o.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,s=r.sigBytes,o=this.blockSize,a=s/(4*o),c=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*o,l=e.min(4*c,s);if(c){for(var h=0;h<c;h+=o)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});o.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=s.algo={};return s}(Math),n)}(Ti)),Ti.exports}var Pi,Bi={exports:{}};var Li,Di={exports:{}};var Mi,Fi={exports:{}},Ni={exports:{}};var ji,Ui,Gi={exports:{}};function Vi(){return Ui||(Ui=1,function(e,t){var n,r,i,s,o,a,u,c;e.exports=(c=Ri(),Mi||(Mi=1,function(e,t){var n,r,i,s,o,a,u,c;e.exports=(r=(n=c=Ri()).lib,i=r.WordArray,s=r.Hasher,o=n.algo,a=[],u=o.SHA1=s.extend({_doReset:function(){this._hash=new i.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],o=n[3],u=n[4],c=0;c<80;c++){if(c<16)a[c]=0|e[t+c];else{var l=a[c-3]^a[c-8]^a[c-14]^a[c-16];a[c]=l<<1|l>>>31}var h=(r<<5|r>>>27)+u+a[c];h+=c<20?1518500249+(i&s|~i&o):c<40?1859775393+(i^s^o):c<60?(i&s|i&o|s&o)-1894007588:(i^s^o)-899497514,u=o,o=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]+o|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=s.clone.call(this);return e._hash=this._hash.clone(),e}}),n.SHA1=s._createHelper(u),n.HmacSHA1=s._createHmacHelper(u),c.SHA1)}(Ni)),Ni.exports,ji||(ji=1,function(e,t){var n;e.exports=(n=Ri(),void function(){var e=n,t=e.lib.Base,r=e.enc.Utf8;e.algo.HMAC=t.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 s=this._oKey=t.clone(),o=this._iKey=t.clone(),a=s.words,u=o.words,c=0;c<n;c++)a[c]^=1549556828,u[c]^=909522486;s.sigBytes=o.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))}})}())}(Gi)),i=(r=(n=c).lib).Base,s=r.WordArray,a=(o=n.algo).MD5,u=o.EvpKDF=i.extend({cfg:i.extend({keySize:4,hasher:a,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n,r=this.cfg,i=r.hasher.create(),o=s.create(),a=o.words,u=r.keySize,c=r.iterations;a.length<u;){n&&i.update(n),n=i.update(e).finalize(t),i.reset();for(var l=1;l<c;l++)n=i.finalize(n),i.reset();o.concat(n)}return o.sigBytes=4*u,o}}),n.EvpKDF=function(e,t,n){return u.create(n).compute(e,t)},c.EvpKDF)}(Fi)),Fi.exports}var Ki,Hi={exports:{}};!function(e,t){var n;e.exports=(n=Ri(),Pi||(Pi=1,function(e,t){var n;e.exports=(n=Ri(),function(){var e=n,t=e.lib.WordArray;function r(e,n,r){for(var i=[],s=0,o=0;o<n;o++)if(o%4){var a=r[e.charCodeAt(o-1)]<<o%4*2|r[e.charCodeAt(o)]>>>6-o%4*2;i[s>>>2]|=a<<24-s%4*8,s++}return t.create(i,s)}e.enc.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,r=this._map;e.clamp();for(var i=[],s=0;s<n;s+=3)for(var o=(t[s>>>2]>>>24-s%4*8&255)<<16|(t[s+1>>>2]>>>24-(s+1)%4*8&255)<<8|t[s+2>>>2]>>>24-(s+2)%4*8&255,a=0;a<4&&s+.75*a<n;a++)i.push(r.charAt(o>>>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 s=0;s<n.length;s++)i[n.charCodeAt(s)]=s}var o=n.charAt(64);if(o){var a=e.indexOf(o);-1!==a&&(t=a)}return r(e,t,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),n.enc.Base64)}(Bi)),Li||(Li=1,function(e,t){var n;e.exports=(n=Ri(),function(e){var t=n,r=t.lib,i=r.WordArray,s=r.Hasher,o=t.algo,a=[];!function(){for(var t=0;t<64;t++)a[t]=4294967296*e.abs(e.sin(t+1))|0}();var u=o.MD5=s.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 s=this._hash.words,o=e[t+0],u=e[t+1],d=e[t+2],p=e[t+3],g=e[t+4],y=e[t+5],v=e[t+6],m=e[t+7],b=e[t+8],k=e[t+9],_=e[t+10],A=e[t+11],S=e[t+12],E=e[t+13],I=e[t+14],w=e[t+15],O=s[0],C=s[1],T=s[2],x=s[3];O=c(O,C,T,x,o,7,a[0]),x=c(x,O,C,T,u,12,a[1]),T=c(T,x,O,C,d,17,a[2]),C=c(C,T,x,O,p,22,a[3]),O=c(O,C,T,x,g,7,a[4]),x=c(x,O,C,T,y,12,a[5]),T=c(T,x,O,C,v,17,a[6]),C=c(C,T,x,O,m,22,a[7]),O=c(O,C,T,x,b,7,a[8]),x=c(x,O,C,T,k,12,a[9]),T=c(T,x,O,C,_,17,a[10]),C=c(C,T,x,O,A,22,a[11]),O=c(O,C,T,x,S,7,a[12]),x=c(x,O,C,T,E,12,a[13]),T=c(T,x,O,C,I,17,a[14]),O=l(O,C=c(C,T,x,O,w,22,a[15]),T,x,u,5,a[16]),x=l(x,O,C,T,v,9,a[17]),T=l(T,x,O,C,A,14,a[18]),C=l(C,T,x,O,o,20,a[19]),O=l(O,C,T,x,y,5,a[20]),x=l(x,O,C,T,_,9,a[21]),T=l(T,x,O,C,w,14,a[22]),C=l(C,T,x,O,g,20,a[23]),O=l(O,C,T,x,k,5,a[24]),x=l(x,O,C,T,I,9,a[25]),T=l(T,x,O,C,p,14,a[26]),C=l(C,T,x,O,b,20,a[27]),O=l(O,C,T,x,E,5,a[28]),x=l(x,O,C,T,d,9,a[29]),T=l(T,x,O,C,m,14,a[30]),O=h(O,C=l(C,T,x,O,S,20,a[31]),T,x,y,4,a[32]),x=h(x,O,C,T,b,11,a[33]),T=h(T,x,O,C,A,16,a[34]),C=h(C,T,x,O,I,23,a[35]),O=h(O,C,T,x,u,4,a[36]),x=h(x,O,C,T,g,11,a[37]),T=h(T,x,O,C,m,16,a[38]),C=h(C,T,x,O,_,23,a[39]),O=h(O,C,T,x,E,4,a[40]),x=h(x,O,C,T,o,11,a[41]),T=h(T,x,O,C,p,16,a[42]),C=h(C,T,x,O,v,23,a[43]),O=h(O,C,T,x,k,4,a[44]),x=h(x,O,C,T,S,11,a[45]),T=h(T,x,O,C,w,16,a[46]),O=f(O,C=h(C,T,x,O,d,23,a[47]),T,x,o,6,a[48]),x=f(x,O,C,T,m,10,a[49]),T=f(T,x,O,C,I,15,a[50]),C=f(C,T,x,O,y,21,a[51]),O=f(O,C,T,x,S,6,a[52]),x=f(x,O,C,T,p,10,a[53]),T=f(T,x,O,C,_,15,a[54]),C=f(C,T,x,O,u,21,a[55]),O=f(O,C,T,x,b,6,a[56]),x=f(x,O,C,T,w,10,a[57]),T=f(T,x,O,C,v,15,a[58]),C=f(C,T,x,O,E,21,a[59]),O=f(O,C,T,x,g,6,a[60]),x=f(x,O,C,T,A,10,a[61]),T=f(T,x,O,C,d,15,a[62]),C=f(C,T,x,O,k,21,a[63]),s[0]=s[0]+O|0,s[1]=s[1]+C|0,s[2]=s[2]+T|0,s[3]=s[3]+x|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;n[i>>>5]|=128<<24-i%32;var s=e.floor(r/4294967296),o=r;n[15+(i+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),n[14+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),t.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=s.clone.call(this);return e._hash=this._hash.clone(),e}});function c(e,t,n,r,i,s,o){var a=e+(t&n|~t&r)+i+o;return(a<<s|a>>>32-s)+t}function l(e,t,n,r,i,s,o){var a=e+(t&r|n&~r)+i+o;return(a<<s|a>>>32-s)+t}function h(e,t,n,r,i,s,o){var a=e+(t^n^r)+i+o;return(a<<s|a>>>32-s)+t}function f(e,t,n,r,i,s,o){var a=e+(n^(t|~r))+i+o;return(a<<s|a>>>32-s)+t}t.MD5=s._createHelper(u),t.HmacMD5=s._createHmacHelper(u)}(Math),n.MD5)}(Di)),Vi(),Ki||(Ki=1,function(e,t){var n;e.exports=(n=Ri(),Vi(),void(n.lib.Cipher||function(e){var t=n,r=t.lib,i=r.Base,s=r.WordArray,o=r.BufferedBlockAlgorithm,a=t.enc;a.Utf8;var u=a.Base64,c=t.algo.EvpKDF,l=r.Cipher=o.extend({cfg:i.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?b: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)}}}}()});r.StreamCipher=l.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var h=t.mode={},f=r.BlockCipherMode=i.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}}),d=h.CBC=function(){var e=f.extend();function t(e,t,n){var r,i=this._iv;i?(r=i,this._iv=undefined):r=this._prevBlock;for(var s=0;s<n;s++)e[t+s]^=r[s]}return e.Encryptor=e.extend({processBlock:function(e,n){var r=this._cipher,i=r.blockSize;t.call(this,e,n,i),r.encryptBlock(e,n),this._prevBlock=e.slice(n,n+i)}}),e.Decryptor=e.extend({processBlock:function(e,n){var r=this._cipher,i=r.blockSize,s=e.slice(n,n+i);r.decryptBlock(e,n),t.call(this,e,n,i),this._prevBlock=s}}),e}(),p=(t.pad={}).Pkcs7={pad:function(e,t){for(var n=4*t,r=n-e.sigBytes%n,i=r<<24|r<<16|r<<8|r,o=[],a=0;a<r;a+=4)o.push(i);var u=s.create(o,r);e.concat(u)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}};r.BlockCipher=l.extend({cfg:l.cfg.extend({mode:d,padding:p}),reset:function(){var e;l.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 g=r.CipherParams=i.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),y=(t.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,n=e.salt;return(n?s.create([1398893684,1701076831]).concat(n).concat(t):t).toString(u)},parse:function(e){var t,n=u.parse(e),r=n.words;return 1398893684==r[0]&&1701076831==r[1]&&(t=s.create(r.slice(2,4)),r.splice(0,4),n.sigBytes-=16),g.create({ciphertext:n,salt:t})}},v=r.SerializableCipher=i.extend({cfg:i.extend({format:y}),encrypt:function(e,t,n,r){r=this.cfg.extend(r);var i=e.createEncryptor(n,r),s=i.finalize(t),o=i.cfg;return g.create({ciphertext:s,key:n,iv:o.iv,algorithm:e,mode:o.mode,padding:o.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}}),m=(t.kdf={}).OpenSSL={execute:function(e,t,n,r){r||(r=s.random(8));var i=c.create({keySize:t+n}).compute(e,r),o=s.create(i.words.slice(t),4*n);return i.sigBytes=4*t,g.create({key:i,iv:o,salt:r})}},b=r.PasswordBasedCipher=v.extend({cfg:v.cfg.extend({kdf:m}),encrypt:function(e,t,n,r){var i=(r=this.cfg.extend(r)).kdf.execute(n,e.keySize,e.ivSize);r.iv=i.iv;var s=v.encrypt.call(this,e,t,i.key,r);return s.mixIn(i),s},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);return r.iv=i.iv,v.decrypt.call(this,e,t,i.key,r)}})}()))}(Hi)),function(){var e=n,t=e.lib.BlockCipher,r=e.algo,i=[],s=[],o=[],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,s[p]=n;var g=e[n],y=e[g],v=e[y],m=257*e[p]^16843008*p;o[n]=m<<24|m>>>8,a[n]=m<<16|m>>>16,u[n]=m<<8|m>>>24,c[n]=m,m=16843009*v^65537*y^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[v^g]]],r^=e[e[r]]):n=r=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],g=r.AES=t.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),s=this._keySchedule=[],o=0;o<r;o++)o<n?s[o]=t[o]:(c=s[o-1],o%n?n>6&&o%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[o/n|0]<<24),s[o]=s[o-n]^c);for(var a=this._invKeySchedule=[],u=0;u<r;u++){if(o=r-u,u%4)var c=s[o];else c=s[o-4];a[u]=u<4||o<=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,o,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,s),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,r,i,s,o,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]^s[h>>>8&255]^o[255&f]^n[d++],y=r[l>>>24]^i[h>>>16&255]^s[f>>>8&255]^o[255&c]^n[d++],v=r[h>>>24]^i[f>>>16&255]^s[c>>>8&255]^o[255&l]^n[d++],m=r[f>>>24]^i[c>>>16&255]^s[l>>>8&255]^o[255&h]^n[d++];c=g,l=y,h=v,f=m}g=(a[c>>>24]<<24|a[l>>>16&255]<<16|a[h>>>8&255]<<8|a[255&f])^n[d++],y=(a[l>>>24]<<24|a[h>>>16&255]<<16|a[f>>>8&255]<<8|a[255&c])^n[d++],v=(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]=y,e[t+2]=v,e[t+3]=m},keySize:8});e.AES=t._createHelper(g)}(),n.AES)}(Ci);var zi=p(Ci.exports),Qi={exports:{}};!function(e,t){e.exports=Ri().enc.Utf8}(Qi);var qi=p(Qi.exports),$i=void 0!==n.g?n.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function Ji(){throw new Error("setTimeout has not been defined")}function Wi(){throw new Error("clearTimeout has not been defined")}var Yi=Ji,Xi=Wi;function Zi(e){if(Yi===setTimeout)return setTimeout(e,0);if((Yi===Ji||!Yi)&&setTimeout)return Yi=setTimeout,setTimeout(e,0);try{return Yi(e,0)}catch(t){try{return Yi.call(null,e,0)}catch(t){return Yi.call(this,e,0)}}}"function"==typeof $i.setTimeout&&(Yi=setTimeout),"function"==typeof $i.clearTimeout&&(Xi=clearTimeout);var es,ts=[],ns=!1,rs=-1;function is(){ns&&es&&(ns=!1,es.length?ts=es.concat(ts):rs=-1,ts.length&&ss())}function ss(){if(!ns){var e=Zi(is);ns=!0;for(var t=ts.length;t;){for(es=ts,ts=[];++rs<t;)es&&es[rs].run();rs=-1,t=ts.length}es=null,ns=!1,function(e){if(Xi===clearTimeout)return clearTimeout(e);if((Xi===Wi||!Xi)&&clearTimeout)return Xi=clearTimeout,clearTimeout(e);try{Xi(e)}catch(t){try{return Xi.call(null,e)}catch(t){return Xi.call(this,e)}}}(e)}}function os(e,t){this.fun=e,this.array=t}function as(){}os.prototype.run=function(){this.fun.apply(null,this.array)};var us,cs,ls=as,hs=as,fs=as,ds=as,ps=as,gs=as,ys=as,vs=$i.performance||{},ms=vs.now||vs.mozNow||vs.msNow||vs.oNow||vs.webkitNow||function(){return(new Date).getTime()},bs=new Date,ks={nextTick:function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];ts.push(new os(e,t)),1!==ts.length||ns||Zi(ss)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:ls,addListener:hs,once:fs,off:ds,removeListener:ps,removeAllListeners:gs,emit:ys,binding:function(e){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(e){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(e){var t=.001*ms.call(vs),n=Math.floor(t),r=Math.floor(t%1*1e9);return e&&(n-=e[0],(r-=e[1])<0&&(n--,r+=1e9)),[n,r]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-bs)/1e3}},_s={exports:{}};function As(){if(cs)return us;cs=1;var e=1e3,t=60*e,n=60*t,r=24*n,s=7*r;function o(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}return us=function(a,u){u=u||{};var c=i(a);if("string"===c&&a.length>0)return function(i){if(!((i=String(i)).length>100)){var o=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(i);if(o){var a=parseFloat(o[1]);switch((o[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*a;case"weeks":case"week":case"w":return a*s;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}}}}(a);if("number"===c&&isFinite(a))return u.long?function(i){var s=Math.abs(i);return s>=r?o(i,s,r,"day"):s>=n?o(i,s,n,"hour"):s>=t?o(i,s,t,"minute"):s>=e?o(i,s,e,"second"):i+" ms"}(a):function(i){var s=Math.abs(i);return s>=r?Math.round(i/r)+"d":s>=n?Math.round(i/n)+"h":s>=t?Math.round(i/t)+"m":s>=e?Math.round(i/e)+"s":i+"ms"}(a);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(a))},us}!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){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){}return!e&&void 0!==ks&&"env"in ks&&(e=ks.env.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("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=function(e){function t(e){var r,i,s,o=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 s=a,o=Number(new Date),u=o-(r||o);s.diff=u,s.prev=r,s.curr=o,r=o,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 o=n[c];e=i.call(s,o),n.splice(c,1),c--}return e})),t.formatArgs.call(s,n),(s.log||t.log).apply(s,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!==o?o:(i!==t.namespaces&&(i=t.namespaces,s=t.enabled(e)),s)},set:function(e){o=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(l(t.names.map(r)),l(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=As(),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}(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(_s,_s.exports);var Ss=_s.exports,Es=Ss("cookie");function Is(){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={},r=e.split(/ *; */);if(""==r[0])return n;for(var i=0;i<r.length;++i)n[Os((t=r[i].split("="))[0])]=Os(t[1]);return n}(e)}function ws(e){try{return encodeURIComponent(e)}catch(t){Es("error `encode(%o)` - %o",e,t)}}function Os(e){try{return decodeURIComponent(e)}catch(t){Es("error `decode(%o)` - %o",e,t)}}var Cs=p((function(e,t,n){switch(arguments.length){case 3:case 2:return function(e,t,n){n=n||{};var r=ws(e)+"="+ws(t);null==t&&(n.maxage=-1),n.maxage&&(n.expires=new Date(+new Date+n.maxage)),n.path&&(r+="; path="+n.path),n.domain&&(r+="; domain="+n.domain),n.expires&&(r+="; expires="+n.expires.toUTCString()),n.samesite&&(r+="; samesite="+n.samesite),n.secure&&(r+="; secure"),document.cookie=r}(e,t,n);case 1:return function(e){return Is()[e]}(e);default:return Is()}})),Ts={exports:{}},xs=Math.max,Rs=Math.max,Ps=function(e,t){var n=t?t.length:0;if(!n)return[];for(var r=xs(Number(e)||0,0),i=xs(n-r,0),s=new Array(i),o=0;o<i;o+=1)s[o]=t[o+r];return s},Bs=function(e){if(null==e||!e.length)return[];for(var t=new Array(Rs(e.length-2,0)),n=1;n<e.length;n+=1)t[n-1]=e[n];return t},Ls=Object.prototype.hasOwnProperty,Ds=Object.prototype.toString,Ms=function(e){return Boolean(e)&&"object"===i(e)},Fs=function(e){return Boolean(e)&&"[object Object]"===Ds.call(e)},Ns=function(e,t,n,r){return Ls.call(t,r)&&void 0===e[r]&&(e[r]=n),t},js=function(e,t,n,r){return Ls.call(t,r)&&(Fs(e[r])&&Fs(n)?e[r]=Gs(e[r],n):void 0===e[r]&&(e[r]=n)),t},Us=function(e,t){if(!Ms(t))return t;e=e||Ns;for(var n=Ps(2,arguments),r=0;r<n.length;r+=1)for(var i in n[r])e(t,n[r],n[r][i],i);return t},Gs=function(e){return Us.apply(null,[js,e].concat(Bs(arguments)))};Ts.exports=function(e){return Us.apply(null,[null,e].concat(Bs(arguments)))},Ts.exports.deep=Gs;var Vs=p(Ts.exports),Ks={exports:{}},Hs=Ss("cookie"),zs=function(e,t,n){switch(arguments.length){case 3:case 2:return function(e,t,n){n=n||{};var r=qs(e)+"="+qs(t);null==t&&(n.maxage=-1),n.maxage&&(n.expires=new Date(+new Date+n.maxage)),n.path&&(r+="; path="+n.path),n.domain&&(r+="; domain="+n.domain),n.expires&&(r+="; expires="+n.expires.toUTCString()),n.secure&&(r+="; secure"),document.cookie=r}(e,t,n);case 1:return function(e){return Qs()[e]}(e);default:return Qs()}};function Qs(){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={},r=e.split(/ *; */);if(""==r[0])return n;for(var i=0;i<r.length;++i)n[$s((t=r[i].split("="))[0])]=$s(t[1]);return n}(e)}function qs(e){try{return encodeURIComponent(e)}catch(t){Hs("error `encode(%o)` - %o",e,t)}}function $s(e){try{return decodeURIComponent(e)}catch(t){Hs("error `decode(%o)` - %o",e,t)}}!function(e,t){var n=zs;function r(e){for(var n=t.cookie,r=t.levels(e),i=0;i<r.length;++i){var s="__tld__",o=r[i],a={domain:"."+o};if(n(s,1,a),n(s))return n(s,null,a),o}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],s=[];if(4===r.length&&i===parseInt(i,10))return s;if(r.length<=1)return s;for(var o=r.length-2;o>=0;--o)s.push(r.slice(o).join("."));return s},r.cookie=n,t=e.exports=r}(Ks,Ks.exports);var Js=p(Ks.exports),Ws=function(){function e(t){s(this,e),this.cOpts={},this.options(t),this.isSupportAvailable=this.checkSupportAvailability()}return a(e,[{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(Js(window.location.href));return"."===t&&(t=null),this.cOpts=Vs(e,{maxage:31536e6,path:"/",domain:t,samesite:"Lax"}),this.cOpts}},{key:"set",value:function(e,t){try{return Cs(e,t,O(this.cOpts)),!0}catch(e){return ut.error(e),!1}}},{key:"get",value:function(e){return Cs(e)}},{key:"remove",value:function(e){try{return Cs(e,null,O(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)}}]),e}(),Ys=new Ws({}),Xs={exports:{}};!function(e,t){e.exports=function(){function e(e){return e=JSON.stringify(e),!!/^\{[\s\S]*\}$/.test(e)}function t(e){if("string"==typeof e)try{return JSON.parse(e)}catch(t){return e}}function n(e){return"[object Function]"==={}.toString.call(e)}var r=function(e){var t="_Is_Incognit";try{e||(e=window.localStorage),e.setItem(t,"yes"),e.removeItem(t)}catch(t){var n={_data:{},setItem:function(e,t){return n._data[e]=String(t)},getItem:function(e){return n._data.hasOwnProperty(e)?n._data[e]:void 0},removeItem:function(e){return delete n._data[e]},clear:function(){return n._data={}}};e=n}finally{"yes"===e.getItem(t)&&e.removeItem(t)}return e}();function i(){if(!(this instanceof i))return new i}i.prototype={set:function(t,n){if(t&&!e(t))r.setItem(t,function(e){return void 0===e||"function"==typeof e?e+"":JSON.stringify(e)}(n));else if(e(t))for(var i in t)this.set(i,t[i]);return this},get:function(e){if(!e){var n={};return this.forEach((function(e,t){return n[e]=t})),n}if("?"===e.charAt(0))return this.has(e.substr(1));var i=arguments;if(i.length>1){for(var s={},o=0,a=i.length;o<a;o++){var u=t(r.getItem(i[o]));this.has(i[o])&&(s[i[o]]=u)}return s}return t(r.getItem(e))},clear:function(){return r.clear(),this},remove:function(e){var t=this.get(e);return r.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=r.length;t<n;t++){var i=r.key(t);e(i,this.get(i))}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}};var s=null;function o(t,r){var a=arguments,u=null;if(s||(s=i()),0===a.length)return s.get();if(1===a.length){if("string"==typeof t)return s.get(t);if(e(t))return s.set(t)}if(2===a.length&&"string"==typeof t){if(!r)return s.remove(t);if(r&&"string"==typeof r)return s.set(t,r);r&&n(r)&&(u=null,u=r(t,s.get(t)),o.set(t,u))}if(2===a.length&&function(e){return"[object Array]"===Object.prototype.toString.call(e)}(t)&&n(r))for(var c=0,l=t.length;c<l;c++)u=r(t[c],s.get(t[c])),o.set(t[c],u);return o}for(var a in i.prototype)o[a]=i.prototype[a];return o}()}(Xs);var Zs=p(Xs.exports),eo=function(){function e(t){s(this,e),this.sOpts={},this.enabled=this.checkSupportAvailability(),this.options(t)}return a(e,[{key:"options",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 0===arguments.length||(Vs(e,{enabled:!0}),this.enabled=e.enabled&&this.enabled,this.sOpts=e),this.sOpts}},{key:"set",value:function(e,t){return Zs.set(e,t)}},{key:"get",value:function(e){return Zs.get(e)}},{key:"remove",value:function(e){return Zs.remove(e)}},{key:"checkSupportAvailability",value:function(){var e="test_rudder_ls";return this.set(e,!0),!!this.get(e)&&(this.remove(e),!0)}}]),e}(),to=new eo({}),no="rl_user_id",ro="rl_trait",io="rl_anonymous_id",so="rl_group_id",oo="rl_group_trait",ao="rl_page_init_referrer",uo="rl_page_init_referring_domain",co="rl_session",lo="rl_auth_token",ho="RudderEncrypt:",fo="Rudder",po={segment:"ajs_anonymous_id"};function go(e){try{return e?JSON.parse(e):null}catch(t){return ut.error(t),e||null}}function yo(e){return e.replace(/^\s+|\s+$/gm,"")}function vo(e){return e&&"string"==typeof e&&""!==yo(e)&&e.substring(0,14)===ho?zi.decrypt(e.substring(14),fo).toString(qi):e}var mo=function(){function e(){s(this,e),Ys.isSupportAvailable?this.storage=Ys:(to.enabled&&(this.storage=to),this.storage||ut.error("No storage is available :: initializing the SDK without storage"))}return a(e,[{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){this.storage.set(e,function(e){return""===yo(e)?e:"".concat(ho).concat(zi.encrypt(e,fo).toString())}(function(e){return JSON.stringify(e)}(t)))}},{key:"setStringItem",value:function(e,t){"string"==typeof t?this.setItem(e,t):ut.error("[Storage] ".concat(e," should be string"))}},{key:"setUserId",value:function(e){this.setStringItem(no,e)}},{key:"setUserTraits",value:function(e){this.setItem(ro,e)}},{key:"setGroupId",value:function(e){this.setStringItem(so,e)}},{key:"setGroupTraits",value:function(e){this.setItem(oo,e)}},{key:"setAnonymousId",value:function(e){this.setStringItem(io,e)}},{key:"setInitialReferrer",value:function(e){this.setItem(ao,e)}},{key:"setInitialReferringDomain",value:function(e){this.setItem(uo,e)}},{key:"setSessionInfo",value:function(e){this.setItem(co,e)}},{key:"setAuthToken",value:function(e){this.setItem(lo,e)}},{key:"getItem",value:function(e){return go(vo(this.storage.get(e)))}},{key:"getUserId",value:function(){return this.getItem(no)}},{key:"getUserTraits",value:function(){return this.getItem(ro)}},{key:"getGroupId",value:function(){return this.getItem(so)}},{key:"getGroupTraits",value:function(){return this.getItem(oo)}},{key:"fetchExternalAnonymousId",value:function(e){var t,n=e.toLowerCase();return Object.keys(po).includes(n)&&"segment"===n?(to.enabled&&(t=to.get(po[n])),!t&&Ys.isSupportAvailable&&(t=Ys.get(po[n])),t):t}},{key:"getAnonymousId",value:function(e){var t=go(vo(this.storage.get(io)));if(t)return t;var n=M(e,"autoCapture.source");if(!0===M(e,"autoCapture.enabled")&&"string"==typeof n){var r=this.fetchExternalAnonymousId(n);if(r)return r}return t}},{key:"getInitialReferrer",value:function(){return this.getItem(ao)}},{key:"getInitialReferringDomain",value:function(){return this.getItem(uo)}},{key:"getSessionInfo",value:function(){return this.getItem(co)}},{key:"getAuthToken",value:function(){return this.getItem(lo)}},{key:"removeItem",value:function(e){return this.storage.remove(e)}},{key:"removeSessionInfo",value:function(){this.removeItem(co)}},{key:"clear",value:function(e){this.storage.remove(no),this.storage.remove(ro),this.storage.remove(so),this.storage.remove(oo),this.storage.remove(lo),e&&this.storage.remove(io)}}]),e}(),bo=new mo;function ko(){return document.referrer||"$direct"}function _o(e){var t=e.split("/");return t.length>=3?t[2]:""}function Ao(){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 So(){var e=Ao(),t=window.location.pathname;if(e)try{t=new URL(e).pathname}catch(e){}var n=window.location,r=n.search,i=n.href,s=document.title,o=function(e){var t,n=Ao(),r=(t=n?n.includes("?")?n:n+e:window.location.href).indexOf("#");return r>-1?t.slice(0,r):t}(r),a=i,u=ko();return{path:t,referrer:u,referring_domain:_o(u),search:r,title:s,url:o,tab_url:a,initial_referrer:bo.getInitialReferrer()||"",initial_referring_domain:bo.getInitialReferringDomain()||""}}for(var Eo,Io=a((function e(){s(this,e),this.name="RudderLabs JavaScript SDK",this.namespace="com.rudderlabs.javascript",this.version="2.37.0"})),wo=a((function e(){s(this,e),this.name="RudderLabs JavaScript SDK",this.version="2.37.0"})),Oo=a((function e(){s(this,e),this.name="",this.version=""})),Co=a((function e(){s(this,e),this.density=0,this.width=0,this.height=0,this.innerWidth=0,this.innerHeight=0})),To=a((function e(){var t;s(this,e),this.app=new Io,this.traits=null,this.library=new wo,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 Oo,this.locale="undefined"==typeof navigator?null:navigator.language||navigator.browserLanguage,this.screen=(t=new Co,"undefined"==typeof window||(t.width=window.screen.width,t.height=window.screen.height,t.density=window.devicePixelRatio,t.innerWidth=window.innerWidth,t.innerHeight=window.innerHeight),t)})),xo=function(){function e(){s(this,e),this.channel="web",this.context=new To,this.type=null,this.messageId=mi(),this.originalTimestamp=(new Date).toISOString(),this.anonymousId=null,this.userId=null,this.event=null,this.properties={}}return a(e,[{key:"getProperty",value:function(e){return this.properties[e]}},{key:"addProperty",value:function(e,t){this.properties[e]=t}}]),e}(),Ro=function(){function e(){s(this,e),this.message=new xo}return a(e,[{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}}]),e}(),Po=function(){function e(){s(this,e),this.rudderProperty=null,this.rudderUserProperty=null,this.event=null,this.userId=null,this.type=null}return a(e,[{key:"setType",value:function(e){return this.type=e,this}},{key:"build",value:function(){var e=new Ro;return e.setUserId(this.userId),e.setType(this.type),e.setEventName(this.event),e.setProperty(this.rudderProperty),e.setUserProperty(this.rudderUserProperty),e}}]),e}(),Bo={},Lo=256,Do=[];Lo--;)Do[Lo]=(Lo+256).toString(16).substring(1);Bo.v4=function(){var e,t=0,n="";if(!Eo||Lo+16>256){for(Eo=Array(t=256);t--;)Eo[t]=256*Math.random()|0;t=Lo=0}for(;t<16;t++)e=Eo[Lo+t],n+=6==t?Do[15&e|64]:8==t?Do[63&e|128]:Do[e],1&t&&t>1&&t<11&&(n+="-");return Lo++,n};var Mo={},Fo=Object.prototype.hasOwnProperty,No=String.prototype.charAt,jo=Object.prototype.toString,Uo=function(e,t){return No.call(e,t)},Go=function(e,t){return Fo.call(e,t)},Vo=function(e,t){t=t||Go;for(var n=[],r=0,i=e.length;r<i;r+=1)t(e,r)&&n.push(String(r));return n},Ko=function(e){return null==e?[]:(t=e,"[object String]"===jo.call(t)?Vo(e,Uo):function(e){return null!=e&&"function"!=typeof e&&"number"==typeof e.length}(e)?Vo(e,Go):function(e,t){t=t||Go;var n=[];for(var r in e)t(e,r)&&n.push(String(r));return n}(e));var t},Ho=Ko,zo=Bo.v4,Qo={_data:{},length:0,setItem:function(e,t){return this._data[e]=t,this.length=Ho(this._data).length,t},getItem:function(e){return e in this._data?this._data[e]:null},removeItem:function(e){return e in this._data&&delete this._data[e],this.length=Ho(this._data).length,null},clear:function(){this._data={},this.length=0},key:function(e){return Ho(this._data)[e]}};Mo.defaultEngine=function(){try{if(!window.localStorage)return!1;var e=zo();window.localStorage.setItem(e,"test_value");var t=window.localStorage.getItem(e);return window.localStorage.removeItem(e),"test_value"===t}catch(e){return!1}}()?window.localStorage:Qo,Mo.inMemoryEngine=Qo;var qo=Ko,$o=Object.prototype.toString,Jo="function"==typeof Array.isArray?Array.isArray:function(e){return"[object Array]"===$o.call(e)},Wo=function(e,t){for(var n=0;n<t.length&&!1!==e(t[n],n,t);n+=1);},Yo=function(e,t){for(var n=qo(t),r=0;r<n.length&&!1!==e(t[n[r]],n[r],t);r+=1);},Xo=function(e,t){return(function(e){return null!=e&&(Jo(e)||"function"!==e&&function(e){var t=i(e);return"number"===t||"object"===t&&"[object Number]"===$o.call(e)}(e.length))}(t)?Wo:Yo).call(this,e,t)},Zo=Mo.defaultEngine,ea=Mo.inMemoryEngine,ta=Xo,na=Ko,ra=JSON;function ia(e,t,n,r){this.id=t,this.name=e,this.keys=n||{},this.engine=r||Zo,this.originalEngine=this.engine}ia.prototype.set=function(e,t){var n=this._createValidKey(e);if(n)try{this.engine.setItem(n,ra.stringify(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))}},ia.prototype.get=function(e){try{var t=this.engine.getItem(this._createValidKey(e));return null===t?null:ra.parse(t)}catch(e){return null}},ia.prototype.getOriginalEngine=function(){return this.originalEngine},ia.prototype.remove=function(e){this.engine.removeItem(this._createValidKey(e))},ia.prototype._createValidKey=function(e){var t,n=this.name,r=this.id;return na(this.keys).length?(ta((function(i){i===e&&(t=[n,r,e].join("."))}),this.keys),t):[n,r,e].join(".")},ia.prototype._swapEngine=function(){var e=this;ta((function(t){var n=e.get(t);ea.setItem([e.name,e.id,t].join("."),n),e.remove(t)}),this.keys),this.engine=ea};var sa=ia,oa=Xo,aa={setTimeout:function(e,t){return window.setTimeout(e,t)},clearTimeout:function(e){return window.clearTimeout(e)},Date:window.Date},ua=aa,ca={ASAP:1,RESCHEDULE:2,ABANDON:3};function la(){this.tasks={},this.nextId=1}la.prototype.now=function(){return+new ua.Date},la.prototype.run=function(e,t,n){var r=this.nextId++;return this.tasks[r]=ua.setTimeout(this._handle(r,e,t,n||ca.ASAP),t),r},la.prototype.cancel=function(e){this.tasks[e]&&(ua.clearTimeout(this.tasks[e]),delete this.tasks[e])},la.prototype.cancelAll=function(){oa(ua.clearTimeout,this.tasks),this.tasks={}},la.prototype._handle=function(e,t,n,r){var i=this,s=i.now();return function(){if(delete i.tasks[e],!(r>=ca.RESCHEDULE&&s+2*n<i.now()))return t();r===ca.RESCHEDULE&&i.run(t,n,r)}},la.setClock=function(e){ua=e},la.resetClock=function(){ua=aa},la.Modes=ca;var ha=la,fa=Bo.v4,da=sa,pa=Xo,ga=ha,ya=Ss("localstorage-retry");function va(e,t){return function(){return e.apply(t,arguments)}}function ma(e,t,n){"function"==typeof t&&(n=t),this.name=e,this.id=fa(),this.fn=n,this.maxItems=t.maxItems||1/0,this.maxAttempts=t.maxAttempts||1/0,this.backoff={MIN_RETRY_DELAY:t.minRetryDelay||1e3,MAX_RETRY_DELAY:t.maxRetryDelay||3e4,FACTOR:t.backoffFactor||2,JITTER:t.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 ga,this._processId=0,this._store=new da(this.name,this.id,this.keys),this._store.set(this.keys.IN_PROGRESS,{}),this._store.set(this.keys.QUEUE,[]),this._ack=va(this._ack,this),this._checkReclaim=va(this._checkReclaim,this),this._processHead=va(this._processHead,this),this._running=!1}y(ma.prototype),ma.prototype.start=function(){this._running&&this.stop(),this._running=!0,this._ack(),this._checkReclaim(),this._processHead()},ma.prototype.stop=function(){this._schedule.cancelAll(),this._running=!1},ma.prototype.shouldRetry=function(e,t){return!(t>this.maxAttempts)},ma.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))},ma.prototype.addItem=function(e){this._enqueue({item:e,attemptNumber:0,time:this._schedule.now(),id:fa()})},ma.prototype.requeue=function(e,t,n,r){this.shouldRetry(e,t,n)?this._enqueue({item:e,attemptNumber:t,time:this._schedule.now()+this.getDelay(t),id:r||fa()}):this.emit("discard",e,t)},ma.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()},ma.prototype._processHead=function(){var e=this,t=this._store;this._schedule.cancel(this._processId);var n=t.get(this.keys.QUEUE)||[],r=t.get(this.keys.IN_PROGRESS)||{},i=this._schedule.now(),s=[];function o(n,r){s.push({item:n.item,done:function(i,s){var o=t.get(e.keys.IN_PROGRESS)||{};delete o[r],t.set(e.keys.IN_PROGRESS,o),e.emit("processed",i,s,n.item),i&&e.requeue(n.item,n.attemptNumber+1,i,n.id)}})}for(var a=Object.keys(r).length;n.length&&n[0].time<=i&&a++<e.maxItems;){var u=n.shift(),c=fa();r[c]={item:u.item,attemptNumber:u.attemptNumber,time:e._schedule.now()},o(u,c)}t.set(this.keys.QUEUE,n),t.set(this.keys.IN_PROGRESS,r),pa((function(t){try{e.fn(t.item,t.done)}catch(e){ya("Process function threw error: "+e)}}),s),n=t.get(this.keys.QUEUE)||[],this._schedule.cancel(this._processId),n.length>0&&(this._processId=this._schedule.run(this._processHead,n[0].time-i,ga.Modes.ASAP))},ma.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,ga.Modes.ASAP)},ma.prototype._checkReclaim=function(){var e=this;pa((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,ga.Modes.ABANDON))}),e.timeouts.RECLAIM_WAIT,ga.Modes.ABANDON)}(t))}),function(t){for(var n=[],r=e._store.getOriginalEngine(),i=0;i<r.length;i++){var s=r.key(i);if(null!==s){var o=s.split(".");3===o.length&&o[0]===t&&"ack"===o[2]&&n.push(new da(t,o[1],e.keys))}}return n}(this.name)),this._schedule.run(this._checkReclaim,this.timeouts.RECLAIM_TIMER,ga.Modes.RESCHEDULE)},ma.prototype._reclaim=function(e){var t=this,n=this,r=new da(this.name,e,this.keys),i={queue:this._store.get(this.keys.QUEUE)||[]},s={inProgress:r.get(this.keys.IN_PROGRESS)||{},queue:r.get(this.keys.QUEUE)||[]},o=[],a=function(e,t){pa((function(e){var r=e.id||fa();o.indexOf(r)>=0?n.emit("duplication",e.item,e.attemptNumber):(i.queue.push({item:e.item,attemptNumber:e.attemptNumber+t,time:n._schedule.now(),id:r}),o.push(r))}),e)};a(s.queue,0),a(s.inProgress,1),i.queue=i.queue.sort((function(e,t){return e.time-t.time})),this._store.set(this.keys.QUEUE,i.queue),setTimeout((function(){r.remove(t.keys.IN_PROGRESS),setTimeout((function(){r.remove(t.keys.QUEUE),setTimeout((function(){r.remove(t.keys.RECLAIM_START),setTimeout((function(){r.remove(t.keys.RECLAIM_END),setTimeout((function(){r.remove(t.keys.ACK)}),10)}),10)}),10)}),10)}),10),this._processHead()};var ba=p(ma),ka={maxRetryDelay:36e4,minRetryDelay:1e3,backoffFactor:2,maxAttempts:10,maxItems:100},_a=function(){function e(){s(this,e),this.url="",this.writeKey=""}return a(e,[{key:"init",value:function(e,t,n){var r=this;this.url=t,this.writeKey=e,n&&c(ka,n),this.payloadQueue=new ba("rudder",ka,(function(e,t){e.message.sentAt=bi(),r.processQueueElement(e.url,e.headers,e.message,1e4,(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 s=new XMLHttpRequest;for(var o in s.open("POST",e,!0),t)s.setRequestHeader(o,t[o]);s.timeout=r,s.ontimeout=i,s.onerror=i,s.onreadystatechange=function(){if(4===s.readyState)if(429===s.status||s.status>=500&&s.status<600){var t="".concat(ci,' "').concat(s.status,'" status text: "').concat(s.statusText,'" for URL: "').concat(e,'"'),n=new Error(t);yi(n),i(n)}else i(null,s.status)},s.send(pi(n,!0))}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})}}]),e}(),Aa=function(){function e(){s(this,e),this.storage=to,this.maxItems=10,this.flushQueueTimeOut=void 0,this.timeOutActive=!1,this.flushQueueTimeOutInterval=6e5,this.url="",this.writekey="",this.queueName="".concat("queue",".").concat(Date.now())}return a(e,[{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);pi({batch:n},!0).length>64e3&&(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){e.forEach((function(e){e.sentAt=(new Date).toISOString()}));var t=pi({batch:e},!0),n=new Blob([t],{type:"text/plain"}),r="".concat(this.url,"?writeKey=").concat(this.writekey);try{"function"!=typeof navigator.sendBeacon&&yi(new Error("Beacon API is not supported by browser")),navigator.sendBeacon(r,n)||yi(new Error("Unable to queue data to browser's beacon queue"))}catch(e){e.message="".concat(e.message," - While sending Beacon data to: ").concat(r),yi(e)}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)}}]),e}(),Sa=function(){function e(){s(this,e),this.queue=void 0}return a(e,[{key:"initialize",value:function(e,t,n){var r={},s=vi(t);n&&n.useBeacon&&navigator.sendBeacon?(n.beaconQueueOptions&&null!=n.beaconQueueOptions&&"object"===i(n.beaconQueueOptions)&&(r=n.beaconQueueOptions),s="".concat(s,"/beacon/v1/batch"),this.queue=new Aa):(n&&n.useBeacon&&ut.info("[EventRepository] sendBeacon feature not available in this browser :: fallback to XHR"),n&&n.queueOptions&&null!=n.queueOptions&&"object"===i(n.queueOptions)&&(r=n.queueOptions),this.queue=new _a),this.queue.init(e,s,r)}},{key:"enqueue",value:function(e,t){var n=e.getElementContent();n.originalTimestamp=n.originalTimestamp||bi(),n.sentAt=bi(),pi(n,!0).length>32e3&&ut.error("[EventRepository] enqueue:: message length greater 32 Kb ",n),this.queue.enqueue(n,t)}}]),e}(),Ea=new Sa,Ia={maxRetryDelay:36e4,minRetryDelay:1e3,backoffFactor:2,maxAttempts:1/0},wa=function(){function e(){s(this,e),this.callback=void 0,this.processQueueElements=!1}return a(e,[{key:"init",value:function(e,t){var n=this;e&&c(Ia,e),t&&(this.callback=t),this.payloadQueue=new ba("rs_events",Ia,(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,Ro.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})}}]),e}(),Oa=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","RS_JS_SDK"),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 s=document.getElementsByTagName("script")[0];s.parentNode.insertBefore(r,s)}}catch(s){yi(s)}};function Ca(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return function(e){return decodeURIComponent(atob(e).split("").map((function(e){return"%".concat("00".concat(e.charCodeAt(0).toString(16)).slice(-2))})).join(""))}(e=e.endsWith("..")?e.substr(0,e.length-2):e)}var Ta=/^[a-zA-Z0-9\-_.]+$/,xa="*";function Ra(e,t,n,r){var i=function(e,t){return[e,(new Date).getTimezoneOffset(),t].join(xa)}(n,r),s=t||0,o=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)-s,e].join(xa));return o.toString(36)}function Pa(e){var t=function(e){var t=e.split(xa),n=t.length%2==0;return t.length<4||!n||1!==Number(t.shift())?null:{checksum:t.shift(),serializedIds:t.join(xa)}}(e);if(!t)return null;var n=t.checksum,r=t.serializedIds;return function(e,t){for(var n=navigator&&navigator.userAgent,r=navigator&&navigator.language,i=0;i<=1;i+=1)if(Ra(e,i,n,r)===t)return!0;return!1}(r,n)?function(e){for(var t={},n=e.split(xa),r=0;r<n.length;r+=2){var i=n[r];if(Ta.test(i)){var s=Ca(n[r+1]);t[i]=s}}return t}(r):null}var Ba={HS:"HubSpot",GA:"GA",HOTJAR:"Hotjar",GOOGLEADS:"GoogleAds",VWO:"VWO",GTM:"GoogleTagManager",BRAZE:"Braze",INTERCOM:"INTERCOM",KEEN:"Keen",KISSMETRICS:"Kissmetrics",CUSTOMERIO:"CustomerIO",CHARTBEAT:"Chartbeat",COMSCORE:"Comscore",FACEBOOK_PIXEL:"FacebookPixel",LOTAME:"Lotame",OPTIMIZELY:"Optimizely",BUGSNAG:"Bugsnag",FULLSTORY:"Fullstory",TVSQUARED:"TVSquared",GA4:"GA4",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"},La=function(){function e(){var t=this;if(s(this,e),this.isInitialized=!1,window.OneTrust&&window.OnetrustActiveGroups){this.userSetConsentGroupIds=window.OnetrustActiveGroups.split(",").filter((function(e){return e}));var n=window.OneTrust.GetDomainData().Groups;this.userSetConsentGroupNames=[],this.userDeniedConsentGroupIds=[],n.forEach((function(e){var n=e.CustomGroupId,r=e.GroupName;t.userSetConsentGroupIds.includes(n)?t.userSetConsentGroupNames.push(r.toUpperCase().trim()):t.userDeniedConsentGroupIds.push(n)})),this.userSetConsentGroupIds=this.userSetConsentGroupIds.map((function(e){return e.toUpperCase()})),this.isInitialized=!0}else ut.error("OneTrust resources are not accessible.")}return a(e,[{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 ut.error("Error during onetrust cookie consent management ".concat(e)),!0}}},{key:"getDeniedList",value:function(){return this.isInitialized?this.userDeniedConsentGroupIds:[]}}]),e}(),Da=function(){function e(){var t=this;if(s(this,e),this.updatePurposes=function(e){e&&Object.entries(e).forEach((function(e){var n=e[0];e[1]?t.userConsentedPurposes.push(n):t.userDeniedPurposes.push(n)}))},this.userConsentedPurposes=[],this.userDeniedPurposes=[],window.updateKetchConsent=function(e){e&&(t.userConsentedPurposes=[],t.userDeniedPurposes=[],t.updatePurposes(e))},window.getKetchUserConsentedPurposes=function(){return t.userConsentedPurposes.slice()},window.getKetchUserDeniedPurposes=function(){return t.userDeniedPurposes.slice()},window.ketchConsent)this.updatePurposes(window.ketchConsent);else{var n=this.getConsent();this.updatePurposes(n)}}return a(e,[{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 ut.error("Error occured checking ketch consent state ".concat(e)),!0}}},{key:"getDeniedList",value:function(){return this.userDeniedPurposes}},{key:"getConsent",value:function(){var e=Ys.get("_ketch_consent_v1_");if(e){var t;try{t=JSON.parse(atob(e))}catch(e){return void ut.error("Error occured while parsing consent cookie ".concat(e))}if(t){var n={};return Object.entries(t).forEach((function(e){var t=e[0],r=e[1];r&&r.status&&(n[t]="granted"===r.status)})),n}}}}]),e}(),Ma=function(){function e(){s(this,e),this.storage=bo,this.timeout=18e5,this.sessionInfo=this.storage.getSessionInfo()||{autoTrack:!0}}return a(e,[{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&&(ut.warn("[Session]:: Provided timeout value 0 will disable the auto session tracking feature."),this.sessionInfo.autoTrack=!1),n>0&&n<1e4&&ut.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){yi(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;ut.error('[Session]:: "sessionId" should at least be "'.concat(10,'" digits long'))}else ut.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()}}]),e}(),Fa=new Ma,Na=["integrations","anonymousId","originalTimestamp"],ja="rs-bugsnag",Ua=["Bugsnag","bugsnag"],Ga="0d96a60df267f4a13f808bbaa54e535c",Va=["rudder-analytics.min.js","rudder-analytics-staging.min.js","rudder-analytics.js"].concat(l(Object.keys(Ba).map((function(e){return"".concat(Ba[e],".min.js")}))),l(Object.keys(Ba).map((function(e){return"".concat(Ba[e],"-staging.min.js")}))),l(Object.keys(Ba).map((function(e){return"".concat(Ba[e],".js")})))),Ka=function(e){var t=e&&e._client&&e._client._notifier&&e._client._notifier.version;if(!t){var n=e({apiKey:Ga,releaseStage:"version-test",beforeSend:function(){return!1}});t=n.notifier&&n.notifier.version,n=void 0}return t&&"6"===t.charAt(0)},Ha=function(){function e(t,n){s(this,e),this.pluginName=ja,this.sourceId=t,this.onClientReady=n,this.initClientOnLibReadyInterval=void 0,this.init()}return a(e,[{key:"init",value:function(){var e=this;if(!(window.rudderanalytics&&window.rudderanalytics.errorReporting||Ga.match(/{{.+}}/))){!function(e){Ua.every((function(e){return!function(e,t){if(null==e)throw new TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(Object(e),t)}(window,e)}))&&Oa(e,"https://d2wy8f7a9ursnm.cloudfront.net/v6/bugsnag.min.js",{isNonNativeSDK:"true",skipDatasetAttributes:!0})}(this.pluginName);var t=window.bugsnag;"function"!=typeof t?(this.initClientOnLibReadyInterval=setInterval((function(){var t=window.bugsnag;"function"==typeof t&&(Ka(t)&&e.initClient(),clearInterval(e.initClientOnLibReadyInterval))}),100),setTimeout((function(){clearInterval(e.initClientOnLibReadyInterval)}),ti)):Ka(t)&&this.initClient()}}},{key:"initClient",value:function(){var e,t=window.bugsnag;this.client=t({apiKey:Ga,appVersion:"2.37.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.rs-unit-test-host.com","localhost","127.0.0.1","[::1]"].includes(e)?"development":"production")}),this.onClientReady()}},{key:"onError",value:function(){var e=this.sourceId;return function(t){try{return!!function(e){var t=M(e,"stacktrace.0.file");if(!t||"string"!=typeof t)return!1;var n=t.substring(t.lastIndexOf("/")+1);return Va.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)}}]),e}(),za=ja,Qa=[ja],qa=function(){function e(t){s(this,e),this.isEnabled=!1,this.providerName=za,this.provider=void 0,this.logger=t,this.onClientReady=this.onClientReady.bind(this),this.exposeToGlobal=this.exposeToGlobal.bind(this)}return a(e,[{key:"init",value:function(e,t){e&&t?!0===function(e){return M(e,"statsCollection.errors.enabled")||!1}(e)?(this.enable(),this.setProviderName(function(e){return M(e,"statsCollection.errors.provider")}(e)),this.initProvider(e,t)):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||Qa.includes(e)?this.providerName=e:this.logger.error("[Analytics] ErrorReporting :: Invalid error reporting provider value. Value should be one of: ".concat(Qa.join(","))):this.providerName=za}},{key:"initProvider",value:function(e,t){this.providerName===ja&&(this.provider=new Ha(t,this.onClientReady))}},{key:"onClientReady",value:function(){this.exposeToGlobal()}},{key:"exposeToGlobal",value:function(){window.rudderanalytics.errorReporting=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()))}}}]),e}(),$a=new(function(){function e(){s(this,e),this.retryAttempt=3,this.queue=[],this.isTransformationProcessing=!1,this.authToken=null}return a(e,[{key:"init",value:function(e,t,n){this.dataPlaneUrl=vi(t),this.writeKey=e,this.authToken=n||this.authToken,this.start()}},{key:"enqueue",value:function(e,t){this.queue.push({event:e,cb:t})}},{key:"sendEventForTransformation",value:function(e,t){var n=this;return new Promise((function(r,i){var s="".concat(n.dataPlaneUrl,"/transform"),o={"Content-Type":"application/json",Authorization:"Basic ".concat(btoa("".concat(n.writeKey,":")))};try{var a=new XMLHttpRequest;a.open("POST",s,!0),Object.keys(o).forEach((function(e){return a.setRequestHeader(e,o[e])})),a.timeout=1e4,a.onreadystatechange=function(){if(4===a.readyState)try{var s=a.status,o=a.response;if(200===s)return o&&"string"==typeof o?(o=JSON.parse(o),void r({transformedPayload:o.transformedBatch,transformationServerAccess:!0})):void i("[Transformation]:: Transformation failed. Invalid response from server.");if(400===s){var u=o?"[Transformation]:: ".concat(o):"[Transformation]:: Invalid request payload";return void i(u)}if(404===s)return void r({transformedPayload:e.batch,transformationServerAccess:!1});if(!(t>0))return void i("[Transformation]:: Transformation failed with status ".concat(s));var c=t-1;setTimeout((function(){return n.sendEventForTransformation(e,c).then(r).catch(i)}),500*Math.pow(2,n.retryAttempt-c))}catch(e){i(e)}},a.send(pi(e,!0))}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=this.queue.shift(),r=(t=n.event,{metadata:{"Custom-Authorization":this.authToken},batch:[{orderNo:Date.now(),event:t.message}]});this.sendEventForTransformation(r,this.retryAttempt).then((function(t){e.isTransformationProcessing=!1,n.cb(t),e.checkQueueLengthAndProcess()})).catch((function(t){yi("string"==typeof t?t:t.message),e.isTransformationProcessing=!1,n.cb({transformedPayload:null}),e.checkQueueLengthAndProcess()}))}},{key:"start",value:function(){var e=this;setInterval((function(){e.isTransformationProcessing||e.checkQueueLengthAndProcess()}),100)}},{key:"setAuthToken",value:function(e){this.authToken=e}}]),e}()),Ja=function(){function e(){s(this,e),this.initialized=!1,this.clientIntegrations=[],this.loadOnlyIntegrations={},this.clientIntegrationObjects=void 0,this.successfullyLoadedIntegration=[],this.failedToBeLoadedIntegration=[],this.toBeProcessedArray=[],this.toBeProcessedByIntegrationArray=[],this.storage=bo,this.eventRepository=Ea,this.preProcessQueue=new wa,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=ei,this.cookieConsentOptions={},this.logLevel=void 0,this.clientIntegrationsReady=!1,this.uSession=Fa,this.version="2.37.0",this.lockIntegrationsVersion=!1,this.errorReporting=new qa(ut),this.deniedConsentIds=[],this.transformationHandler=$a}return a(e,[{key:"initializeUser",value:function(e){this.userId=this.storage.getUserId()||"",this.storage.setUserId(this.userId),this.userTraits=this.storage.getUserTraits()||{},this.storage.setUserTraits(this.userTraits),this.groupId=this.storage.getGroupId()||"",this.storage.setGroupId(this.groupId),this.groupTraits=this.storage.getGroupTraits()||{},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=ko();this.storage.setInitialReferrer(e),this.storage.setInitialReferringDomain(_o(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(Ba[t.name]).concat("_RS")]}))||t>=2e4?n(e):e.pause(ni).then((function(){return e.allModulesInitialized(t+ni).then(n)}))}))}},{key:"executeReadyCallback",value:function(){this.readyCallbacks.forEach((function(e){return e()}))}},{key:"integrationSDKLoaded",value:function(e,t){try{return e&&t&&window[e]&&window.hasOwnProperty(e)&&window[e][t]&&i(window[e][t].prototype)&&void 0!==window[e][t].prototype.constructor}catch(n){return yi(n,"While attempting to load ".concat(e," ").concat(t)),!1}}},{key:"processResponse",value:function(e,t){var n=this;try{var r=t;try{if("string"==typeof t&&(r=JSON.parse(t)),!r||"object"!==i(r)||Array.isArray(r))return void ut.error("Invalid source configuration")}catch(e){return void yi(e)}try{this.errorReporting.init(r.source.config,r.source.id)}catch(e){yi(e)}if(this.serverUrl=function(e,t,n){try{var r=e.source.dataplanes||{};if(Object.keys(r).length){var i=function(e){var t=e?e.residencyServer:void 0;if(t)return"string"==typeof t&&ii.includes(t.toUpperCase())?t.toUpperCase():void ut.error("Invalid residencyServer input")}(n),s=r[i]||r.US;if(s){var o=function(e){if(Array.isArray(e)&&e.length){var t=e.find((function(e){return!0===e.default}));if(t&&Oi(t.url))return t.url}}(s);if(o)return o}}if(Oi(t))return t;throw Error("Unable to load the SDK due to invalid data plane url")}catch(e){throw Error(e)}}(r,this.serverUrl,this.options),this.eventRepository.initialize(this.writeKey,this.serverUrl,this.options),this.loaded=!0,this.transformationHandler.init(this.writeKey,this.serverUrl,this.storage.getAuthToken()),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=l(e.toBeProcessedArray[0]);e.toBeProcessedArray.shift();var n=t[0];t.shift(),e[n].apply(e,l(t))}}(this),r.source.destinations.forEach((function(e){e.enabled&&this.clientIntegrations.push({name:e.destinationDefinition.name,config:e.config,destinationInfo:{areTransformationsConnected:e.areTransformationsConnected||!1,destinationId:e.id}})}),this),this.clientIntegrations=Si(this.loadOnlyIntegrations,this.clientIntegrations),Object.keys(this.cookieConsentOptions).length>0)try{var s=function(e){var t,n;return null!=e&&null!==(t=e.oneTrust)&&void 0!==t&&t.enabled?new La:null!=e&&null!==(n=e.ketch)&&void 0!==n&&n.enabled?new Da:null}(this.cookieConsentOptions);this.deniedConsentIds=s&&s.getDeniedList(),this.clientIntegrations=this.clientIntegrations.filter((function(e){return!s||s&&s.isEnabled(e.config)}))}catch(e){yi(e)}this.clientIntegrations=this.clientIntegrations.filter((function(e){return!!Ba[e.name]||(ut.error("[Analytics] Integration:: ".concat(e.name," not available for initialization")),!1)}));var o="";Ii().isStaging&&(o="-staging"),this.bufferDataPlaneEventsUntilReady&&setTimeout((function(){n.processBufferedCloudModeEvents()}),this.dataPlaneEventsBufferTimeout),this.errorReporting.leaveBreadcrumb("Starting device-mode initialization"),this.clientIntegrations.forEach((function(e){var t=Ba[e.name],r="".concat(t).concat("_RS"),i="".concat(n.destSDKBaseURL,"/").concat(t).concat(o,".min.js");window.hasOwnProperty(r)||Oa(r,i,{isNonNativeSDK:!0});var s=n,a=setInterval((function(){if(s.integrationSDKLoaded(r,t)){var i,o=window[r];clearInterval(a);try{var u="[Analytics] processResponse :: trying to initialize integration name:: ".concat(r);n.errorReporting.leaveBreadcrumb(u),(i=new o[t](e.config,s,e.destinationInfo)).init(),s.isInitialized(i).then((function(){s.dynamicallyLoadedIntegrations[r]=o[t]}))}catch(e){var c="[Analytics] 'integration.init()' failed :: ".concat(r," :: ").concat(e.message);yi(e,c),s.failedToBeLoadedIntegration.push(i)}}}),100);setTimeout((function(){clearInterval(a)}),ti)}));var a=this;this.allModulesInitialized().then((function(){if(!a.clientIntegrations||0===a.clientIntegrations.length)return n.clientIntegrationsReady=!0,n.executeReadyCallback(),void(n.toBeProcessedByIntegrationArray=[]);a.replayEvents(a)}))}catch(e){yi(e)}}},{key:"sendDataToDestination",value:function(e,t,n){try{if(e[n]){var r=O(t);e[n](r)}}catch(t){var i="[sendToNative]:: [Destination: ".concat(e.name,"]:: ");yi(t,i)}}},{key:"sendTransformedDataToDestination",value:function(e,t,n){var r=this;try{Ai(t.message.integrations),this.transformationHandler.enqueue(t,(function(t){var i=t.transformedPayload,s=t.transformationServerAccess;i&&e.forEach((function(e){try{var t,o=[];if(s){var a=i.find((function(t){return t.id===e.destinationId}));if(!a)return void ut.error('[DMT]::Transformed data for destination "'.concat(e.name,'" was not sent from the server'));null==a||a.payload.forEach((function(t){"200"===t.status?o.push(t):ut.error('[DMT]::Event transformation unsuccessful for destination "'.concat(e.name,'". Dropping the event. Status: "').concat(t.status,'". Error Message: "').concat(t.error,'"'))}))}else o=i;null===(t=o)||void 0===t||t.forEach((function(t){t.event&&r.sendDataToDestination(e,{message:t.event},n)}))}catch(t){t instanceof Error&&(t.message="[DMT]::[Destination:".concat(e.name,"]:: ").concat(t.message)),yi(t)}}))}))}catch(e){e instanceof Error&&(e.message="[DMT]:: ".concat(e.message)),yi(e)}}},{key:"processAndSendEventsToDeviceMode",value:function(e,t,n){var r=this,i=[],s=[];e.forEach((function(e){!r.IsEventBlackListed(t.message.event,e.name)&&(e.areTransformationsConnected?s.push(e):i.push(e))})),i.forEach((function(e){r.sendDataToDestination(e,t,n)})),s.length>0&&this.sendTransformedDataToDestination(s,t,n)}},{key:"queueEventForDataPlane",value:function(e,t){var n=t.message.integrations||{All:!0};t.message.integrations=function(e,t){var n=O(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 di(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,e.clientIntegrationObjects.every((function(e){return!e.isReady||e.isReady()}))&&(this.integrationsData=(t=this.integrationsData,n=e.clientIntegrationObjects,r=O(t),n.forEach((function(e){if(e.getDataForIntegrationsObject)try{r=di(r,e.getDataForIntegrationsObject())}catch(e){ut.debug("[Analytics: prepareDataForIntegrationsObj]",e)}})),r),e.clientIntegrationsReady=!0,e.executeReadyCallback()),this.processBufferedCloudModeEvents(),e.toBeProcessedByIntegrationArray.forEach((function(t){var n=t[0];t.shift(),Object.keys(t[0].message.integrations).length>0&&_i(t[0].message.integrations);var r=Si(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>=ti?(t.failedToBeLoadedIntegration.push(e),r(t)):t.pause(ni).then((function(){return t.isInitialized(e,n+ni).then(r)}))}))}},{key:"page",value:function(e,t,n,r,s){if(this.errorReporting.leaveBreadcrumb("Page event"),this.loaded){"function"==typeof r&&(s=r,r=null),"function"==typeof n&&(s=n,r=n=null),"function"==typeof t&&(s=t,r=n=t=null),"function"==typeof e&&(s=e,r=n=t=e=null),"object"===i(e)&&null!=e&&null!=e&&(r=t,n=e,t=e=null),"object"===i(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=O(n),a=O(r),u=(new Po).setType("page").build();o||(o={}),t&&(u.message.name=o.name=t),e&&(u.message.category=o.category=e),u.message.properties=this.getPageProperties(o),this.processAndSendDataToDestinations("page",u,a,s)}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=O(t),s=O(n),o=(new Po).setType("track").build();e&&o.setEventName(e),o.setProperty(i||{}),this.processAndSendDataToDestinations("track",o,s,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"===i(e)&&(n=t,t=e,e=this.userId);var s=wi(e);s&&this.userId&&s!==this.userId&&this.reset(),this.userId=s,this.storage.setUserId(this.userId);var o=O(t),a=O(n);if(o){for(var u in o)this.userTraits[u]=o[u];this.storage.setUserTraits(this.userTraits)}var c=(new Po).setType("identify").build();this.processAndSendDataToDestinations("identify",c,a,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"===i(t)&&(n=t,t=null),"object"===i(e)&&(n=e,t=null,e=null);var s=(new Po).setType("alias").build();s.message.previousId=wi(t)||(this.userId?this.userId:this.getAnonymousId()),s.message.userId=wi(e);var o=O(n);this.processAndSendDataToDestinations("alias",s,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"===i(e)&&(n=t,t=e,e=this.groupId),"function"==typeof e&&(r=e,n=null,t=null,e=this.groupId),this.groupId=wi(e),this.storage.setGroupId(this.groupId);var s=O(t),o=O(n),a=(new Po).setType("group").build();if(s)for(var u in s)this.groupTraits[u]=s[u];else this.groupTraits={};this.storage.setGroupTraits(this.groupTraits),this.processAndSendDataToDestinations("group",a,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=$r[t],r=this.clientIntegrations.find((function(e){return e.name===n})).config,i=r.blacklistedEvents,s=r.whitelistedEvents,o=r.eventFilteringOption;if(!o)return!1;var a=e.trim().toUpperCase();switch(o){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(s)||!s.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,i){try{this.anonymousId||this.setAnonymousId(),this.errorReporting.leaveBreadcrumb("Started sending data to destinations"),t.message.context.traits=r({},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=r({},this.groupTraits)));try{var s=this.uSession.getSessionInfo(),o=s.sessionId,a=s.sessionStart;t.message.context.sessionId=o,a&&(t.message.context.sessionStart=!0)}catch(e){yi(e)}h=this.cookieConsentOptions,f=!1,Object.keys(h).forEach((function(e){si.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;n&&Object.keys(n).forEach((function(e){Wr.indexOf(e.toLowerCase())>=0&&ut.error("Warning! : Reserved keyword used in properties--\x3e ".concat(e," with ").concat(t," call"))})),r&&Object.keys(r).forEach((function(e){Wr.indexOf(e.toLowerCase())>=0&&ut.error("Warning! : Reserved keyword used in traits--\x3e ".concat(e," with ").concat(t," call"))}));var i=e.context.traits;i&&Object.keys(i).forEach((function(e){Wr.indexOf(e.toLowerCase())>=0&&ut.error("Warning! : Reserved keyword used in traits --\x3e ".concat(e," with ").concat(t," call"))}))}(t.message,e);var u=t.message.integrations;u?_i(u):u=this.shouldUseGlobalIntegrationsConfigInEvents()?this.loadOnlyIntegrations:ui,t.message.integrations=u;try{t.message.context["ua-ch"]=this.uach}catch(e){yi(e)}if(this.clientIntegrationObjects){var c=Si(u,this.clientIntegrationObjects);this.processAndSendEventsToDeviceMode(c,t,e)}else this.toBeProcessedByIntegrationArray.push([e,t]);var l=O(t);Ai(l.message.integrations),!this.bufferDataPlaneEventsUntilReady||this.clientIntegrationObjects?this.queueEventForDataPlane(e,l):this.preProcessQueue.enqueue(e,l),i&&"function"==typeof i&&i(l)}catch(e){yi(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"===i(t)&&(e.message.context.campaign=this.utm(window.location.href))}},{key:"processOptionsParam",value:function(e,t){var n=e.message,s=n.type,o=n.properties;this.addCampaignInfo(e),e.message.context.page=this.getContextPageProperties("page"===s?o:void 0),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"object"===i(t)&&null!==t&&Object.keys(t).forEach((function(n){Na.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"!==i(t)||null===t||Object.keys(t).forEach((function(e){if(!Na.includes(e)&&!oi.includes(e))if("context"!==e)n=di(n,u({},e,t[e]));else if("object"===i(t[e])&&null!==t[e]){var s={};Object.keys(t[e]).forEach((function(n){oi.includes(n)||(s[n]=t[e][n])})),n=di(n,r({},s))}else ut.error("[Analytics: processOptionsParam] context passed in options ".concat(e," is not object."))})),n}(e.message,t)}},{key:"getPageProperties",value:function(e,t){var n=So(),r=t&&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=So(),n={};for(var r in t)n[r]=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?Pa(t):null,r=n?n.rs_amp_id:null;this.anonymousId=e||r||mi(),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 s=this;if("object"===i(t)&&null!==t&&(n=t,t=null),n&&n.logLevel&&(this.logLevel=n.logLevel,ut.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");n&&n.cookieConsentManager&&(this.cookieConsentOptions=n.cookieConsentManager),this.writeKey=e,this.serverUrl=t,this.options=n;var o={};if(n&&n.setCookieDomain&&(o=r(r({},o),{},{domain:n.setCookieDomain})),n&&"boolean"==typeof n.secureCookie&&(o=r(r({},o),{},{secure:n.secureCookie})),n&&-1!==ri.indexOf(n.sameSiteCookie)&&(o=r(r({},o),{},{samesite:n.sameSiteCookie})),this.storage.options(o),n&&"string"==typeof n.uaChTrackLevel&&ai.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){s.uach=e}),this.uaChTrackLevel),n&&n.integrations&&(c(this.loadOnlyIntegrations,n.integrations),_i(this.loadOnlyIntegrations)),this.useGlobalIntegrationsConfigInEvents=n&&!0===n.useGlobalIntegrationsConfigInEvents,n&&n.sendAdblockPage&&(this.sendAdblockPage=!0),n&&n.sendAdblockPageOptions&&"object"===i(n.sendAdblockPageOptions)&&(this.sendAdblockPageOptions=n.sendAdblockPageOptions),this.uSession.initialize(n),n&&n.clientSuppliedCallbacks){var a={};Object.keys(this.methodToCallbackMapping).forEach((function(e){s.methodToCallbackMapping.hasOwnProperty(e)&&n.clientSuppliedCallbacks[s.methodToCallbackMapping[e]]&&(a[e]=n.clientSuppliedCallbacks[s.methodToCallbackMapping[e]])})),c(this.clientSuppliedCallbacks,a),this.registerCallbacks(!0)}if(n&&null!=n.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=function(e,t,n){var r="";if(n){if(!(r=vi(n))){var i="CDN base URL for integrations is not valid";throw yi({message:"[Analytics] load:: ".concat(i)}),Error("Failed to load Rudder SDK: ".concat(i))}return r}var s=Ii().sdkURL;return r=s?s.split("/").slice(0,-1).concat(Zr).join("/"):ei,t&&(r=r.replace(Xr,e)),r}(this.version,this.lockIntegrationsVersion,n&&n.destSDKBaseURL),n&&n.getSourceConfig)if("function"!=typeof n.getSourceConfig)yi(new Error('option "getSourceConfig" must be a function'));else{var u=n.getSourceConfig();u instanceof Promise?u.then((function(e){return s.processResponse(200,e)})).catch(yi):this.processResponse(200,u)}else{var l=function(e){return Yr.concat(Yr.includes("?")?"&":"?").concat(e?"writeKey=".concat(e):"")}(e);n&&n.configUrl&&(l=function(e,t){var n=e;-1===n.indexOf("sourceConfig")&&(n="".concat(vi(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,l));try{!function(e,t,n,r){var i=r.bind(e),s=new XMLHttpRequest;s.open("GET",t,!0),s.setRequestHeader("Authorization","Basic ".concat(btoa("".concat(n,":")))),s.onload=function(){var e=s.status;200==e?i(200,s.responseText):(yi(new Error("".concat(ci," ").concat(e," for url: ").concat(t))),i(e))},s.send()}(this,l,e,this.processResponse)}catch(e){yi(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())}},{key:"load",value:function(e,t,n){if(!this.loaded){var r=O(n);if(this.arePolyfillsRequired(r)){var i="polyfill";Oa(i,"https://polyfill.io/v3/polyfill.min.js?features=Number.isNaN%2CURL%2CArray.prototype.find%2CArray.prototype.includes%2CPromise%2CString.prototype.endsWith%2CString.prototype.includes%2CString.prototype.startsWith%2CObject.entries%2CObject.values%2CElement.prototype.dataset%2CString.prototype.replaceAll",{skipDatasetAttributes:!0});var s=this,o=setInterval((function(){!window.hasOwnProperty(i)&&null===document.getElementById(i)||"undefined"==typeof Promise||(clearInterval(o),s.loadAfterPolyfill(e,t,r))}),100);setTimeout((function(){clearInterval(o)}),ti)}else this.loadAfterPolyfill(e,t,r)}}},{key:"ready",value:function(e){this.loaded?"function"!=typeof e?ut.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(){Oa("ad-block","//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js")}},{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)):ut.error("Provided input should be in string format")}}]),e}(),Wa=new Ja;v(Wa),window.addEventListener("error",(function(e){yi(e,void 0,Wa)}),!0),Wa.initializeCallbacks(),Wa.registerCallbacks(!1);var Ya,Xa=window.rudderanalytics,Za=Array.isArray(Xa);if(Za)for(var eu=0;eu<Xa.length;){if(Xa[eu]&&"load"===Xa[eu][0]){Ya=Xa[eu],Xa.splice(eu,1);break}eu+=1}!function(e){function t(e,t){var n={};return Object.keys(e).forEach((function(r){r.startsWith(t)&&(n[r.substr(t.length)]=e[r])})),n}var n=function(e){var t={};try{new URL(e).searchParams.forEach((function(e,n){t[n]=e}))}catch(e){}return t}(window.location.href);n.ajs_aid&&Wa.toBeProcessedArray.push(["setAnonymousId",n.ajs_aid]),n.ajs_uid&&Wa.toBeProcessedArray.push(["identify",n.ajs_uid,t(n,"ajs_trait_")]),n.ajs_event&&Wa.toBeProcessedArray.push(["track",n.ajs_event,t(n,"ajs_prop_")])}(),Za&&Xa.forEach((function(e){return Wa.toBeProcessedArray.push(e)})),Ya&&Ya.length>0&&(Ya.shift(),Wa.load.apply(Wa,l(Ya)));var tu=Wa.ready.bind(Wa),nu=Wa.identify.bind(Wa),ru=Wa.page.bind(Wa),iu=Wa.track.bind(Wa),su=Wa.alias.bind(Wa),ou=Wa.group.bind(Wa),au=Wa.reset.bind(Wa),uu=Wa.load.bind(Wa),cu=Wa.initialized=!0,lu=Wa.getUserId.bind(Wa),hu=Wa.getSessionId.bind(Wa),fu=Wa.getUserTraits.bind(Wa),du=Wa.getAnonymousId.bind(Wa),pu=Wa.setAnonymousId.bind(Wa),gu=Wa.getGroupId.bind(Wa),yu=Wa.getGroupTraits.bind(Wa),vu=Wa.startSession.bind(Wa),mu=Wa.endSession.bind(Wa),bu=Wa.setAuthToken.bind(Wa);e.alias=su,e.endSession=mu,e.getAnonymousId=du,e.getGroupId=gu,e.getGroupTraits=yu,e.getSessionId=hu,e.getUserId=lu,e.getUserTraits=fu,e.group=ou,e.identify=nu,e.initialized=cu,e.load=uu,e.page=ru,e.ready=tu,e.reset=au,e.setAnonymousId=pu,e.setAuthToken=bu,e.startSession=vu,e.track=iu,Object.defineProperty(e,"__esModule",{value:!0})}(t)},396:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.Analytics=t.createAnalyticsInstance=void 0;var i=n(316),s=n(706);function o(e){var t,n,o={},a={},u={},c=function(e,n){return null==t?void 0:t.getFeatureValue(e,n)},l=function(){return(null==n?void 0:n.getUserId())||""};return{initialise:function(e){var r=e.growthbookKey,o=e.growthbookDecryptionKey,u=e.rudderstackKey,l=e.growthbookOptions;if(n=s.RudderStack.getRudderStackInstance(u),r&&o){t=i.Growthbook.getGrowthBookInstance(r,o,l);var h=setInterval((function(){Object.keys(a).length>0?clearInterval(h):a=c("tracking-buttons-config",{})}),1e3)}},setAttributes:function(e){var i=e.country,s=e.user_language,a=e.device_language,u=e.device_type,c=e.account_type,h=e.user_id,f=e.app_id,d=e.utm_source,p=e.utm_medium,g=e.utm_campaign,y=e.is_authorised,v=e.url,m=e.domain;if(t||n){var b=null!=h?h:l();t&&t.setAttributes({id:b||l(),country:i,user_language:s,device_language:a,device_type:u,utm_source:d,utm_medium:p,utm_campaign:g,is_authorised:y,url:v,domain:m}),o=r(r(r(r(r(r({},o),void 0!==s&&{user_language:s}),void 0!==c&&{account_type:c}),void 0!==f&&{app_id:f}),void 0!==u&&{device_type:u}),void 0!==v&&{url:v})}},identifyEvent:function(e){var t=e||l();n&&(null==n||n.identifyEvent(t,{language:(null==o?void 0:o.user_language)||"en"}))},getFeatureState:function(e){var n,r;return null===(r=null===(n=null==t?void 0:t.getFeatureState(e))||void 0===n?void 0:n.experimentResult)||void 0===r?void 0:r.name},getFeatureValue:c,isFeatureOn:function(e){return null==t?void 0:t.isOn(e)},setUrl:function(e){return null==t?void 0:t.setUrl(e)},getId:l,trackEvent:function(e,t){n&&(navigator.onLine?(Object.keys(u).length>0&&Object.keys(u).forEach((function(e){n.track(u[e].event,u[e].payload),delete u[e]})),e in a?a[e]&&(null==n||n.track(e,r(r({},o),t))):null==n||n.track(e,r(r({},o),t))):u[e+t.action]={event:e,payload:r(r({},o),t)})},getInstances:function(){return{ab:t,tracking:n}},pageView:function(e,t){void 0===t&&(t="Deriv App"),n&&(null==n||n.pageView(e,t,l()))},reset:function(){n&&(null==n||n.reset())}}}t.createAnalyticsInstance=o,t.Analytics=o()},316:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)},i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return s(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Growthbook=void 0;var a=n(200),u=o(n(202)),c=function(){function e(e,t,n){void 0===n&&(n={});var i=this;this.setAttributes=function(e){var t=e.id,n=e.country,s=e.user_language,o=e.device_language,a=e.device_type,u=e.utm_source,c=e.utm_medium,l=e.utm_campaign,h=e.is_authorised,f=e.url,d=e.domain,p=e.utm_content,g=i.GrowthBook.getAttributes();i.GrowthBook.setAttributes(r(r(r(r(r(r(r(r(r(r(r(r(r({},g),{id:t}),void 0!==n&&{country:n}),void 0!==s&&{user_language:s}),void 0!==o&&{device_language:o}),void 0!==a&&{device_type:a}),void 0!==u&&{utm_source:u}),void 0!==c&&{utm_medium:c}),void 0!==l&&{utm_campaign:l}),void 0!==h&&{is_authorised:h}),void 0!==f&&{url:f}),void 0!==d&&{domain:d}),void 0!==p&&{utm_content:p}))},this.getFeatureValue=function(e,t){return i.GrowthBook.getFeatureValue(e,t)},this.getFeatureState=function(e){return i.GrowthBook.evalFeature(e)},this.setUrl=function(e){return i.GrowthBook.setURL(e)},this.isOn=function(e){return i.GrowthBook.isOn(e)},this.init=function(){return i.GrowthBook.loadFeatures().catch((function(e){return console.error(e)}))},this.GrowthBook=new a.GrowthBook(r({apiHost:"https://cdn.growthbook.io",clientKey:e,decryptionKey:t,antiFlicker:!1,navigateDelay:0,antiFlickerTimeout:3500,subscribeToChanges:!0,enableDevMode:null===window||void 0===window?void 0:window.location.hostname.includes("localhost"),trackingCallback:function(e,t){window.dataLayer&&window.dataLayer.push({event:"experiment_viewed",event_category:"experiment",rudder_anonymous_id:u.getAnonymousId(),experiment_id:e.key,variation_id:t.variationId}),u.track("experiment_viewed",{experimentId:e.key,variationId:t.variationId})}},n)),this.init()}return e.getGrowthBookInstance=function(t,n,r){return e._instance||(e._instance=new e(t,n,r)),e._instance},e}();t.Growthbook=c},706:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.RudderStack=void 0;var o=s(n(202)),a=function(){function e(e){var t=this;this.has_identified=!1,this.has_initialized=!1,this.current_page="",this.getAnonymousId=function(){return o.getAnonymousId()},this.getUserId=function(){return o.getUserId()},this.init=function(e){e&&(o.load(e,"https://deriv-dataplane.rudderstack.com"),o.ready((function(){t.has_initialized=!0,t.has_identified=!(!t.getUserId()&&!t.getAnonymousId())})))},this.identifyEvent=function(e,n){o.identify(e,n),t.has_identified=!0},this.pageView=function(e,n,r){void 0===n&&(n="Deriv App"),t.has_initialized&&t.has_identified&&e!==t.current_page&&(o.page(n,e,{user_id:r}),t.current_page=e)},this.reset=function(){t.has_initialized&&(o.reset(),t.has_identified=!1)},this.track=function(e,n){var r=Object.fromEntries(Object.entries(n).filter((function(e){return e[0],void 0!==e[1]})));if(t.has_initialized&&t.has_identified)try{o.track(e,r)}catch(e){console.error(e)}},this.init(e)}return e.getRudderStackInstance=function(t){return e._instance||(e._instance=new e(t)),e._instance},e}();t.RudderStack=a}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var s=t[r]={exports:{}};return e[r].call(s.exports,s,s.exports,n),s.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{"use strict";var e=r;Object.defineProperty(e,"__esModule",{value:!0}),e.Analytics=void 0;var t=n(396);Object.defineProperty(e,"Analytics",{enumerable:!0,get:function(){return t.Analytics}})})(),r})()));
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@deriv-com/analytics",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.6.1",
|
4
4
|
"description": "The analytics package contains all the utility functions used for tracking user events and sending them to the respective platform such as Rudderstack.",
|
5
5
|
"keywords": [
|
6
6
|
"rudderstack",
|
@@ -12,12 +12,14 @@
|
|
12
12
|
"types": "lib/index.d.ts",
|
13
13
|
"scripts": {
|
14
14
|
"test": "./node_modules/.bin/jest",
|
15
|
-
"build": "tsc",
|
15
|
+
"build": "tsc && npm run build:webpack",
|
16
16
|
"prepare": "npm run build && husky install",
|
17
|
-
"prepublishOnly": "npm test"
|
17
|
+
"prepublishOnly": "npm test",
|
18
|
+
"build:webpack": "webpack"
|
18
19
|
},
|
19
20
|
"files": [
|
20
|
-
"lib/**/*"
|
21
|
+
"lib/**/*",
|
22
|
+
"dist/**/*"
|
21
23
|
],
|
22
24
|
"repository": {
|
23
25
|
"type": "git",
|
@@ -33,7 +35,10 @@
|
|
33
35
|
"lint-staged": "^15.0.1",
|
34
36
|
"prettier": "^3.0.3",
|
35
37
|
"ts-jest": "^29.1.1",
|
36
|
-
"
|
38
|
+
"ts-loader": "^9.5.1",
|
39
|
+
"typescript": "^4.9.5",
|
40
|
+
"webpack": "^5.91.0",
|
41
|
+
"webpack-cli": "^5.1.4"
|
37
42
|
},
|
38
43
|
"dependencies": {
|
39
44
|
"@growthbook/growthbook": "^0.36.0",
|