rudder-sdk-js 2.21.0 → 2.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +37 -0
- package/index.d.ts +7 -0
- package/index.es.js +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
- package/service-worker/index.es.js +38 -10
- package/service-worker/index.js +38 -10
package/index.es.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
function e(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 t(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?e(Object(r),!0).forEach((function(e){s(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):e(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function n(e){return n="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},n(e)}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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,r.key,r)}}function o(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(){return a=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},a.apply(this,arguments)}function u(e){return function(e){if(Array.isArray(e))return c(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)return;if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(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 c(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}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function l(e){var t=e.default;if("function"==typeof t){var n=function e(){if(this instanceof e){var n=[null];n.push.apply(n,arguments);var r=Function.bind.apply(t,n);return new r}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}var f={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)}f.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}}();var h,d=f.exports,p={exports:{}};h=p.exports,(h=p.exports=function(e){return e.trim?e.trim():h.right(h.left(e))}).left=function(e){return e.trimLeft?e.trimLeft():e.replace(/^\s\s*/,"")},h.right=function(e){if(e.trimRight)return e.trimRight();for(var t=/\s/,n=e.length;t.test(e.charAt(--n)););return e.slice(0,n+1)};var g=p.exports,y=/(\w+)\[(\d+)\]/,v=function(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}},m=function(e){if("string"!=typeof e)return{};if(""==(e=g(e)))return{};"?"==e.charAt(0)&&(e=e.slice(1));for(var t={},n=e.split("&"),r=0;r<n.length;r++){var i,o=n[r].split("="),s=v(o[0]);(i=y.exec(s))?(t[i[1]]=t[i[1]]||[],t[i[1]][i[2]]=v(o[1])):t[o[0]]=null==o[1]?"":v(o[1])}return t};function A(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]}function I(e){return function t(n){return 0===arguments.length||A(n)?t:e.apply(this,arguments)}}function E(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return A(n)?t:I((function(t){return e(n,t)}));default:return A(n)&&A(r)?t:A(n)?I((function(t){return e(t,r)})):A(r)?I((function(t){return e(n,t)})):e(n,r)}}}function b(e){return function t(n,r,i){switch(arguments.length){case 0:return t;case 1:return A(n)?t:E((function(t,r){return e(n,t,r)}));case 2:return A(n)&&A(r)?t:A(n)?E((function(t,n){return e(t,r,n)})):A(r)?E((function(t,r){return e(n,t,r)})):I((function(t){return e(n,r,t)}));default:return A(n)&&A(r)&&A(i)?t:A(n)&&A(r)?E((function(t,n){return e(t,n,i)})):A(n)&&A(i)?E((function(t,n){return e(t,r,n)})):A(r)&&A(i)?E((function(t,r){return e(n,t,r)})):A(n)?I((function(t){return e(t,r,i)})):A(r)?I((function(t){return e(n,t,i)})):A(i)?I((function(t){return e(n,r,t)})):e(n,r,i)}}}function k(e,t){return Object.prototype.hasOwnProperty.call(t,e)}var O=I((function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}));function S(e,t,n,r){var i=function(i){for(var o=t.length,s=0;s<o;){if(e===t[s])return n[s];s+=1}for(var a in t[s]=e,n[s]=i,e)e.hasOwnProperty(a)&&(i[a]=r?S(e[a],t,n,!0):e[a]);return i};switch(O(e)){case"Object":return i(Object.create(Object.getPrototypeOf(e)));case"Array":return i([]);case"Date":return new Date(e.valueOf());case"RegExp":return function(e){return new RegExp(e.source,(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.sticky?"y":"")+(e.unicode?"u":""))}(e);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=I((function(e){return null!=e&&"function"==typeof e.clone?e.clone():S(e,[],[],!0)}));function _(e){return"[object Object]"===Object.prototype.toString.call(e)}var T=b((function(e,t,n){var r,i={};for(r in t)k(r,t)&&(i[r]=k(r,n)?e(r,t[r],n[r]):t[r]);for(r in n)k(r,n)&&!k(r,i)&&(i[r]=n[r]);return i})),R=b((function e(t,n,r){return T((function(n,r,i){return _(r)&&_(i)?e(t,r,i):t(n,r,i)}),n,r)})),C=b((function(e,t,n){return R((function(t,n,r){return e(n,r)}),t,n)})),P={};!function(e){function t(e){switch(e){case"http:":return 80;case"https:":return 443;default:return location.port}}e.parse=function(e){var n=document.createElement("a");return n.href=e,{href:n.href,host:n.host||location.host,port:"0"===n.port||""===n.port?t(n.protocol):n.port,hash:n.hash,hostname:n.hostname||location.hostname,pathname:"/"!=n.pathname.charAt(0)?"/"+n.pathname:n.pathname,protocol:n.protocol&&":"!=n.protocol?n.protocol:location.protocol,search:n.search,query:n.search.slice(1)}},e.isAbsolute=function(e){return 0==e.indexOf("//")||!!~e.indexOf("://")},e.isRelative=function(t){return!e.isAbsolute(t)},e.isCrossDomain=function(t){t=e.parse(t);var n=e.parse(window.location.href);return t.hostname!==n.hostname||t.port!==n.port||t.protocol!==n.protocol}}(P);const x=function(e){return null!=e&&"object"==typeof e&&!1===Array.isArray(e)};var L=function(e,t,n){if(x(n)||(n={default:n}),!N(e))return void 0!==n.default?n.default:e;"number"==typeof t&&(t=String(t));const r=Array.isArray(t),i="string"==typeof t,o=n.separator||".",s=n.joinChar||("string"==typeof o?o:".");if(!i&&!r)return e;if(i&&t in e)return D(t,e,n)?e[t]:n.default;let a=r?t:function(e,t,n){if("function"==typeof n.split)return n.split(e);return e.split(t)}(t,o,n),u=a.length,c=0;do{let t=a[c];for("number"==typeof t&&(t=String(t));t&&"\\"===t.slice(-1);)t=M([t.slice(0,-1),a[++c]||""],s,n);if(t in e){if(!D(t,e,n))return n.default;e=e[t]}else{let r=!1,i=c+1;for(;i<u;)if(t=M([t,a[i++]],s,n),r=t in e){if(!D(t,e,n))return n.default;e=e[t],c=i-1;break}if(!r)return n.default}}while(++c<u&&N(e));return c===u?e:n.default};function M(e,t,n){return"function"==typeof n.join?n.join(e):e[0]+t+e[1]}function D(e,t,n){return"function"!=typeof n.isValid||n.isValid(e,t)}function N(e){return x(e)||Array.isArray(e)||"function"==typeof e}for(var B,G=256,U=[];G--;)U[G]=(G+256).toString(16).substring(1);var j,F,H,z,K,Q,V,q,W,Y,J,X,$,Z,ee,te,ne,re,ie,oe,se,ae,ue,ce,le,fe,he,de,pe,ge,ye,ve,me,Ae,Ie,Ee,be,ke,Oe,Se,we,_e,Te,Re,Ce,Pe,xe,Le,Me,De,Ne,Be,Ge,Ue,je,Fe,He,ze,Ke,Qe,Ve,qe,We,Ye,Je,Xe,$e,Ze,et,tt,nt=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=document.getElementById(e);if(!r){var i=document.createElement("script");i.src=t,i.async=void 0===n.async||n.async,i.type="text/javascript",i.id=e,!0!==n.skipDatasetAttributes&&(i.setAttribute("data-loader","RS_JS_SDK"),void 0!==n.isNonNativeSDK&&i.setAttribute("data-isNonNativeSDK",n.isNonNativeSDK));var o=document.getElementsByTagName("head");if(0!==o.length)o[0].insertBefore(i,o[0].firstChild);else{var s=document.getElementsByTagName("script")[0];s.parentNode.insertBefore(i,s)}}},rt=4,it=function(e){switch(e.toUpperCase()){case"INFO":rt=1;break;case"DEBUG":rt=2;break;case"WARN":rt=3;break;default:rt=4}},ot=function(){var e;rt<=1&&(e=console).info.apply(e,arguments)},st=function(){var e;rt<=3&&(e=console).warn.apply(e,arguments)},at=function(){var e;rt<=4&&(e=console).error.apply(e,arguments)},ut="ADOBE_ANALYTICS",ct=(j={"Adobe Analytics":ut,ADOBEANALYTICS:ut,"ADOBE ANALYTICS":ut},s(j,ut,ut),s(j,"AdobeAnalytics",ut),s(j,"adobeanalytics",ut),s(j,"adobe analytics",ut),s(j,"Adobe analytics",ut),s(j,"adobe Analytics",ut),j),lt=(F={},s(F,"AM","AM"),s(F,"AMPLITUDE","AM"),s(F,"Amplitude","AM"),s(F,"am","AM"),F),ft=(H={},s(H,"APPCUES","APPCUES"),s(H,"Appcues","APPCUES"),s(H,"App Cues","APPCUES"),s(H,"appcues","APPCUES"),H),ht=(z={},s(z,"BINGADS","BINGADS"),s(z,"BingAds","BINGADS"),s(z,"bingads","BINGADS"),s(z,"Bing Ads","BINGADS"),s(z,"Bing ads","BINGADS"),s(z,"bing Ads","BINGADS"),s(z,"bing ads","BINGADS"),z),dt=(K={},s(K,"BRAZE","BRAZE"),s(K,"Braze","BRAZE"),s(K,"braze","BRAZE"),K),pt=(Q={},s(Q,"BUGSNAG","BUGSNAG"),s(Q,"bugsnag","BUGSNAG"),s(Q,"Bugsnag","BUGSNAG"),Q),gt="CHARTBEAT",yt=(V={},s(V,gt,gt),s(V,"Chartbeat",gt),s(V,"chartbeat",gt),s(V,"Chart Beat",gt),s(V,"chart beat",gt),V),vt="CLEVERTAP",mt=(q={},s(q,vt,vt),s(q,"Clevertap",vt),s(q,"clevertap",vt),q),At="COMSCORE",It=(s(W={},At,At),s(W,"Comscore",At),s(W,"Com Score",At),s(W,"com Score",At),s(W,"com score",At),s(W,"Com score",At),W),Et=(s(Y={},"CRITEO","CRITEO"),s(Y,"Criteo","CRITEO"),s(Y,"criteo","CRITEO"),Y),bt="CUSTOMERIO",kt=(s(J={},bt,bt),s(J,"Customerio",bt),s(J,"Customer.io",bt),s(J,"CUSTOMER.IO",bt),s(J,"customer.io",bt),J),Ot=(s(X={},"DRIP","DRIP"),s(X,"Drip","DRIP"),s(X,"drip","DRIP"),X),St="FACEBOOK_PIXEL",wt=(s($={},St,St),s($,"FB Pixel",St),s($,"Facebook Pixel",St),s($,"facebook pixel",St),s($,"fbpixel",St),s($,"FBPIXEL",St),s($,"FB_PIXEL",St),$),_t="FULLSTORY",Tt=(s(Z={},_t,_t),s(Z,"Fullstory",_t),s(Z,"FullStory",_t),s(Z,"full Story",_t),s(Z,"Full Story",_t),s(Z,"Full story",_t),s(Z,"full story",_t),s(Z,"fullstory",_t),Z),Rt=(s(ee={},"GA","GA"),s(ee,"Google Analytics","GA"),s(ee,"GoogleAnalytics","GA"),s(ee,"GOOGLE ANALYTICS","GA"),s(ee,"google analytics","GA"),ee),Ct=(s(te={},"GA4","GA4"),s(te,"Google Analytics 4","GA4"),s(te,"Google analytics 4","GA4"),s(te,"google analytics 4","GA4"),s(te,"Google Analytics4","GA4"),s(te,"Google analytics4","GA4"),s(te,"google analytics4","GA4"),s(te,"GoogleAnalytics4","GA4"),te),Pt="GOOGLEADS",xt=(s(ne={},Pt,Pt),s(ne,"Google Ads",Pt),s(ne,"GoogleAds",Pt),s(ne,"GOOGLE ADS",Pt),s(ne,"google ads",Pt),s(ne,"googleads",Pt),ne),Lt="GOOGLE_OPTIMIZE",Mt=(s(re={},Lt,Lt),s(re,"Google Optimize",Lt),s(re,"GoogleOptimize",Lt),s(re,"Googleoptimize",Lt),s(re,"GOOGLEOPTIMIZE",Lt),s(re,"google optimize",Lt),s(re,"Google optimize",Lt),s(re,"GOOGLE OPTIMIZE",Lt),re),Dt=(s(ie={},"GTM","GTM"),s(ie,"Google Tag Manager","GTM"),s(ie,"google tag manager","GTM"),s(ie,"googletag manager","GTM"),s(ie,"googletagmanager","GTM"),ie),Nt=(s(oe={},"HEAP","HEAP"),s(oe,"Heap","HEAP"),s(oe,"heap","HEAP"),s(oe,"Heap.io","HEAP"),oe),Bt=(s(se={},"HOTJAR","HOTJAR"),s(se,"Hotjar","HOTJAR"),s(se,"hotjar","HOTJAR"),s(se,"Hot Jar","HOTJAR"),s(se,"hot jar","HOTJAR"),se),Gt=(s(ae={},"HS","HS"),s(ae,"Hubspot","HS"),s(ae,"HUBSPOT","HS"),s(ae,"hub spot","HS"),s(ae,"Hub Spot","HS"),s(ae,"Hub spot","HS"),ae),Ut=(s(ue={},"INTERCOM","INTERCOM"),s(ue,"Intercom","INTERCOM"),s(ue,"intercom","INTERCOM"),ue),jt=(s(ce={},"KEEN","KEEN"),s(ce,"Keen","KEEN"),s(ce,"Keen.io","KEEN"),s(ce,"keen","KEEN"),s(ce,"keen.io","KEEN"),ce),Ft="KISSMETRICS",Ht=(s(le={},Ft,Ft),s(le,"Kissmetrics",Ft),s(le,"kissmetrics",Ft),le),zt=(s(fe={},"KLAVIYO","KLAVIYO"),s(fe,"Klaviyo","KLAVIYO"),s(fe,"klaviyo","KLAVIYO"),fe),Kt="LAUNCHDARKLY",Qt=(s(he={},Kt,Kt),s(he,"LaunchDarkly",Kt),s(he,"Launch_Darkly",Kt),s(he,"Launch Darkly",Kt),s(he,"launchDarkly",Kt),s(he,"launch darkly",Kt),he),Vt="LINKEDIN_INSIGHT_TAG",qt=(s(de={},Vt,Vt),s(de,"LinkedIn Insight Tag",Vt),s(de,"LinkedIn insight tag",Vt),s(de,"linkedIn insight tag",Vt),s(de,"Linkedin_insight_tag",Vt),s(de,"LinkedinInsighttag",Vt),s(de,"LinkedinInsightTag",Vt),s(de,"LinkedInInsightTag",Vt),s(de,"Linkedininsighttag",Vt),s(de,"LINKEDININSIGHTTAG",Vt),s(de,"linkedininsighttag",Vt),de),Wt=(s(pe={},"LOTAME","LOTAME"),s(pe,"Lotame","LOTAME"),s(pe,"lotame","LOTAME"),pe),Yt=(s(ge={},"LYTICS","LYTICS"),s(ge,"Lytics","LYTICS"),s(ge,"lytics","LYTICS"),ge),Jt=(s(ye={},"MP","MP"),s(ye,"MIXPANEL","MP"),s(ye,"Mixpanel","MP"),s(ye,"MIX PANEL","MP"),s(ye,"Mix panel","MP"),s(ye,"Mix Panel","MP"),ye),Xt="MOENGAGE",$t=(s(ve={},Xt,Xt),s(ve,"MoEngage",Xt),s(ve,"moengage",Xt),s(ve,"Moengage",Xt),s(ve,"Mo Engage",Xt),s(ve,"mo engage",Xt),s(ve,"Mo engage",Xt),ve),Zt="OPTIMIZELY",en=(s(me={},Zt,Zt),s(me,"Optimizely",Zt),s(me,"optimizely",Zt),me),tn=(s(Ae={},"PENDO","PENDO"),s(Ae,"Pendo","PENDO"),s(Ae,"pendo","PENDO"),Ae),nn="PINTEREST_TAG",rn=(s(Ie={},nn,nn),s(Ie,"PinterestTag",nn),s(Ie,"Pinterest_Tag",nn),s(Ie,"PINTERESTTAG",nn),s(Ie,"pinterest",nn),s(Ie,"PinterestAds",nn),s(Ie,"Pinterest_Ads",nn),s(Ie,"Pinterest",nn),s(Ie,"Pinterest Tag",nn),s(Ie,"Pinterest tag",nn),s(Ie,"PINTEREST TAG",nn),s(Ie,"pinterest tag",nn),s(Ie,"Pinterest Ads",nn),s(Ie,"Pinterest ads",nn),Ie),on="POST_AFFILIATE_PRO",sn=(s(Ee={},on,on),s(Ee,"PostAffiliatePro",on),s(Ee,"Post_affiliate_pro",on),s(Ee,"Post Affiliate Pro",on),s(Ee,"Post affiliate pro",on),s(Ee,"post affiliate pro",on),s(Ee,"postaffiliatepro",on),s(Ee,"POSTAFFILIATEPRO",on),Ee),an="POSTHOG",un=(s(be={},an,an),s(be,"PostHog",an),s(be,"Posthog",an),s(be,"posthog",an),s(be,"Post Hog",an),s(be,"Post hog",an),s(be,"post hog",an),be),cn="PROFITWELL",ln=(s(ke={},cn,cn),s(ke,"ProfitWell",cn),s(ke,"profitwell",cn),s(ke,"Profitwell",cn),s(ke,"Profit Well",cn),s(ke,"profit well",cn),s(ke,"Profit well",cn),ke),fn="QUALTRICS",hn=(s(Oe={},fn,fn),s(Oe,"Qualtrics",fn),s(Oe,"qualtrics",fn),Oe),dn="QUANTUMMETRIC",pn=(s(Se={},dn,dn),s(Se,"Quantum Metric",dn),s(Se,"quantum Metric",dn),s(Se,"quantum metric",dn),s(Se,"QuantumMetric",dn),s(Se,"quantumMetric",dn),s(Se,"quantummetric",dn),s(Se,"Quantum_Metric",dn),Se),gn="REDDIT_PIXEL",yn=(s(we={},gn,gn),s(we,"Reddit_Pixel",gn),s(we,"RedditPixel",gn),s(we,"REDDITPIXEL",gn),s(we,"redditpixel",gn),s(we,"Reddit Pixel",gn),s(we,"REDDIT PIXEL",gn),s(we,"reddit pixel",gn),we),vn=(s(_e={},"SENTRY","SENTRY"),s(_e,"sentry","SENTRY"),s(_e,"Sentry","SENTRY"),_e),mn="SNAP_PIXEL",An=(s(Te={},mn,mn),s(Te,"Snap_Pixel",mn),s(Te,"SnapPixel",mn),s(Te,"SNAPPIXEL",mn),s(Te,"snappixel",mn),s(Te,"Snap Pixel",mn),s(Te,"SNAP PIXEL",mn),s(Te,"snap pixel",mn),Te),In="TVSQUARED",En=(s(Re={},In,In),s(Re,"TVSquared",In),s(Re,"tvsquared",In),s(Re,"tvSquared",In),s(Re,"TvSquared",In),s(Re,"Tvsquared",In),s(Re,"TV Squared",In),s(Re,"tv squared",In),s(Re,"tv Squared",In),Re),bn=(s(Ce={},"VWO","VWO"),s(Ce,"VisualWebsiteOptimizer","VWO"),s(Ce,"Visualwebsiteoptimizer","VWO"),s(Ce,"visualwebsiteoptimizer","VWO"),s(Ce,"vwo","VWO"),s(Ce,"Visual Website Optimizer","VWO"),s(Ce,"Visual website optimizer","VWO"),s(Ce,"visual website optimizer","VWO"),Ce),kn=(s(Pe={},"GA360","GA360"),s(Pe,"Google Analytics 360","GA360"),s(Pe,"Google analytics 360","GA360"),s(Pe,"google analytics 360","GA360"),s(Pe,"Google Analytics360","GA360"),s(Pe,"Google analytics360","GA360"),s(Pe,"google analytics360","GA360"),s(Pe,"GoogleAnalytics360","GA360"),s(Pe,"GA 360","GA360"),Pe),On=(s(xe={},"ADROLL","ADROLL"),s(xe,"Adroll","ADROLL"),s(xe,"Ad roll","ADROLL"),s(xe,"ad roll","ADROLL"),s(xe,"adroll","ADROLL"),xe),Sn="DCM_FLOODLIGHT",wn=(s(Le={},Sn,Sn),s(Le,"DCM Floodlight",Sn),s(Le,"dcm floodlight",Sn),s(Le,"Dcm Floodlight",Sn),s(Le,"DCMFloodlight",Sn),s(Le,"dcmfloodlight",Sn),s(Le,"DcmFloodlight",Sn),s(Le,"dcm_floodlight",Sn),s(Le,"DCM_Floodlight",Sn),Le),_n=(s(Me={},"MATOMO","MATOMO"),s(Me,"Matomo","MATOMO"),s(Me,"matomo","MATOMO"),Me),Tn=(s(De={},"VERO","VERO"),s(De,"Vero","VERO"),s(De,"vero","VERO"),De),Rn="MOUSEFLOW",Cn=(s(Ne={},Rn,Rn),s(Ne,"Mouseflow",Rn),s(Ne,"mouseflow",Rn),s(Ne,"mouseFlow",Rn),s(Ne,"MouseFlow",Rn),s(Ne,"Mouse flow",Rn),s(Ne,"mouse flow",Rn),s(Ne,"mouse Flow",Rn),s(Ne,"Mouse Flow",Rn),Ne),Pn="ROCKERBOX",xn=(s(Be={},Pn,Pn),s(Be,"Rockerbox",Pn),s(Be,"rockerbox",Pn),s(Be,"RockerBox",Pn),s(Be,"Rocker box",Pn),s(Be,"rocker box",Pn),s(Be,"Rocker Box",Pn),Be),Ln="CONVERTFLOW",Mn=(s(Ge={},Ln,Ln),s(Ge,"Convertflow",Ln),s(Ge,"convertflow",Ln),s(Ge,"convertFlow",Ln),s(Ge,"ConvertFlow",Ln),s(Ge,"Convert flow",Ln),s(Ge,"convert flow",Ln),s(Ge,"convert Flow",Ln),s(Ge,"Convert Flow",Ln),s(Ge,"CONVERT FLOW",Ln),Ge),Dn="SNAPENGAGE",Nn=(s(Ue={},Dn,Dn),s(Ue,"SnapEngage",Dn),s(Ue,"Snap_Engage",Dn),s(Ue,"snapengage",Dn),s(Ue,"SNAP ENGAGE",Dn),s(Ue,"Snap Engage",Dn),s(Ue,"snap engage",Dn),Ue),Bn="LIVECHAT",Gn=(s(je={},Bn,Bn),s(je,"LiveChat",Bn),s(je,"Live_Chat",Bn),s(je,"livechat",Bn),s(je,"LIVE CHAT",Bn),s(je,"Live Chat",Bn),s(je,"live chat",Bn),je),Un="SHYNET",jn=(s(Fe={},Un,Un),s(Fe,"shynet",Un),s(Fe,"ShyNet",Un),s(Fe,"shyNet",Un),s(Fe,"Shynet",Un),s(Fe,"shy net",Un),s(Fe,"Shy Net",Un),s(Fe,"shy Net",Un),s(Fe,"Shy net",Un),Fe),Fn=(s(He={},"WOOPRA","WOOPRA"),s(He,"Woopra","WOOPRA"),s(He,"woopra","WOOPRA"),He),Hn="ROLLBAR",zn=(s(ze={},Hn,Hn),s(ze,"RollBar",Hn),s(ze,"Roll_Bar",Hn),s(ze,"rollbar",Hn),s(ze,"Rollbar",Hn),s(ze,"ROLL BAR",Hn),s(ze,"Roll Bar",Hn),s(ze,"roll bar",Hn),ze),Kn="QUORA_PIXEL",Qn=(s(Ke={},Kn,Kn),s(Ke,"Quora Pixel",Kn),s(Ke,"Quora pixel",Kn),s(Ke,"QUORA PIXEL",Kn),s(Ke,"QuoraPixel",Kn),s(Ke,"Quorapixel",Kn),s(Ke,"QUORAPIXEL",Kn),s(Ke,"Quora_Pixel",Kn),s(Ke,"quora_pixel",Kn),s(Ke,"Quora",Kn),Ke),Vn=(s(Qe={},"JUNE","JUNE"),s(Qe,"June","JUNE"),s(Qe,"june","JUNE"),Qe),qn=(s(Ve={},"ENGAGE","ENGAGE"),s(Ve,"Engage","ENGAGE"),s(Ve,"engage","ENGAGE"),Ve),Wn=(s(qe={},"ITERABLE","ITERABLE"),s(qe,"Iterable","ITERABLE"),s(qe,"iterable","ITERABLE"),qe),Yn="YANDEX_METRICA",Jn=(s(We={},Yn,Yn),s(We,"Yandexmetrica",Yn),s(We,"yandexmetrica",Yn),s(We,"yandexMetrica",Yn),s(We,"YandexMetrica",Yn),We),Xn=(s(Ye={},"REFINER","REFINER"),s(Ye,"Refiner","REFINER"),s(Ye,"refiner","REFINER"),Ye),$n=(s(Je={},"QUALAROO","QUALAROO"),s(Je,"Qualaroo","QUALAROO"),s(Je,"qualaroo","QUALAROO"),Je),Zn="PODSIGHTS",er=(s(Xe={},Zn,Zn),s(Xe,"Podsights",Zn),s(Xe,"PodSights",Zn),s(Xe,"pod Sights",Zn),s(Xe,"Pod Sights",Zn),s(Xe,"pod sights",Zn),s(Xe,"POD SIGHTS",Zn),s(Xe,"Pod sights",Zn),Xe),tr=(s($e={},"AXEPTIO","AXEPTIO"),s($e,"Axeptio","AXEPTIO"),s($e,"axeptio","AXEPTIO"),$e),nr="SATISMETER",rr=(s(Ze={},nr,nr),s(Ze,"Satismeter",nr),s(Ze,"SatisMeter",nr),s(Ze,"SATISMETER",nr),Ze),ir="MICROSOFT_CLARITY",or=(s(et={},ir,ir),s(et,"Microsoft Clarity",ir),s(et,"Microsoft clarity",ir),s(et,"microsoft clarity",ir),s(et,"Microsoft_clarity",ir),s(et,"MicrosoftClarity",ir),s(et,"MICROSOFTCLARITY",ir),s(et,"microsoftclarity",ir),s(et,"microsoftClarity",ir),et),sr=t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t({All:"All"},ct),lt),ft),ht),dt),pt),yt),mt),It),Et),kt),Ot),wt),Tt),Rt),Ct),kn),xt),Mt),Dt),Nt),Bt),Gt),Ut),jt),Ht),zt),Qt),qt),Wt),Yt),Jt),$t),en),tn),rn),sn),un),ln),hn),pn),yn),vn),An),En),bn),On),wn),_n),Tn),Cn),Mn),Nn),Gn),jn),Fn),zn),Qn),Vn),qn),Wn),xn),Jn),Xn),$n),er),tr),rr),or),ar={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"},ur=["anonymous_id","id","sent_at","received_at","timestamp","original_timestamp","event_text","event"],cr="https://api.rudderlabs.com/sourceConfig/?p=npm&v=2.21.0",lr="https://cdn.rudderlabs.com/v1.1/".concat("js-integrations"),fr=["bugsnag"],hr=["Lax","None","Strict"],dr={exports:{}},pr={exports:{}};function gr(){return tt?pr.exports:(tt=1,pr.exports=(e=e||function(e,t){var n=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),r={},i=r.lib={},o=i.Base={extend:function(e){var t=n(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)}},s=i.WordArray=o.extend({init:function(e,n){e=this.words=e||[],this.sigBytes=n!=t?n:4*e.length},toString:function(e){return(e||u).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,i=e.sigBytes;if(this.clamp(),r%4)for(var o=0;o<i;o++){var s=n[o>>>2]>>>24-o%4*8&255;t[r+o>>>2]|=s<<24-(r+o)%4*8}else for(o=0;o<i;o+=4)t[r+o>>>2]=n[o>>>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=o.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n,r=[],i=function(t){var n=987654321,r=4294967295;return function(){var i=((n=36969*(65535&n)+(n>>16)&r)<<16)+(t=18e3*(65535&t)+(t>>16)&r)&r;return i/=4294967296,(i+=.5)*(e.random()>.5?1:-1)}},o=0;o<t;o+=4){var a=i(4294967296*(n||e.random()));n=987654071*a(),r.push(4294967296*a()|0)}return new s.init(r,t)}}),a=r.enc={},u=a.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var o=t[i>>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new s.init(n,t/2)}},c=a.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var o=t[i>>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new s.init(n,t)}},l=a.Utf8={stringify:function(e){try{return decodeURIComponent(escape(c.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return c.parse(unescape(encodeURIComponent(e)))}},f=i.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new s.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=l.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,r=n.words,i=n.sigBytes,o=this.blockSize,a=i/(4*o),u=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*o,c=e.min(4*u,i);if(u){for(var l=0;l<u;l+=o)this._doProcessBlock(r,l);var f=r.splice(0,u);n.sigBytes-=c}return new s.init(f,c)},clone:function(){var e=o.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});i.Hasher=f.extend({cfg:o.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){f.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 h.HMAC.init(e,n).finalize(t)}}});var h=r.algo={};return r}(Math),e));var e}var yr,vr={exports:{}};function mr(){return yr?vr.exports:(yr=1,vr.exports=(e=gr(),function(){var t=e,n=t.lib.WordArray;function r(e,t,r){for(var i=[],o=0,s=0;s<t;s++)if(s%4){var a=r[e.charCodeAt(s-1)]<<s%4*2,u=r[e.charCodeAt(s)]>>>6-s%4*2;i[o>>>2]|=(a|u)<<24-o%4*8,o++}return n.create(i,o)}t.enc.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,r=this._map;e.clamp();for(var i=[],o=0;o<n;o+=3)for(var s=(t[o>>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,a=0;a<4&&o+.75*a<n;a++)i.push(r.charAt(s>>>6*(3-a)&63));var u=r.charAt(64);if(u)for(;i.length%4;)i.push(u);return i.join("")},parse:function(e){var t=e.length,n=this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var o=0;o<n.length;o++)i[n.charCodeAt(o)]=o}var s=n.charAt(64);if(s){var a=e.indexOf(s);-1!==a&&(t=a)}return r(e,t,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),e.enc.Base64));var e}var Ar,Ir={exports:{}};function Er(){return Ar?Ir.exports:(Ar=1,Ir.exports=(e=gr(),function(t){var n=e,r=n.lib,i=r.WordArray,o=r.Hasher,s=n.algo,a=[];!function(){for(var e=0;e<64;e++)a[e]=4294967296*t.abs(t.sin(e+1))|0}();var u=s.MD5=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,i=e[r];e[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o=this._hash.words,s=e[t+0],u=e[t+1],d=e[t+2],p=e[t+3],g=e[t+4],y=e[t+5],v=e[t+6],m=e[t+7],A=e[t+8],I=e[t+9],E=e[t+10],b=e[t+11],k=e[t+12],O=e[t+13],S=e[t+14],w=e[t+15],_=o[0],T=o[1],R=o[2],C=o[3];_=c(_,T,R,C,s,7,a[0]),C=c(C,_,T,R,u,12,a[1]),R=c(R,C,_,T,d,17,a[2]),T=c(T,R,C,_,p,22,a[3]),_=c(_,T,R,C,g,7,a[4]),C=c(C,_,T,R,y,12,a[5]),R=c(R,C,_,T,v,17,a[6]),T=c(T,R,C,_,m,22,a[7]),_=c(_,T,R,C,A,7,a[8]),C=c(C,_,T,R,I,12,a[9]),R=c(R,C,_,T,E,17,a[10]),T=c(T,R,C,_,b,22,a[11]),_=c(_,T,R,C,k,7,a[12]),C=c(C,_,T,R,O,12,a[13]),R=c(R,C,_,T,S,17,a[14]),_=l(_,T=c(T,R,C,_,w,22,a[15]),R,C,u,5,a[16]),C=l(C,_,T,R,v,9,a[17]),R=l(R,C,_,T,b,14,a[18]),T=l(T,R,C,_,s,20,a[19]),_=l(_,T,R,C,y,5,a[20]),C=l(C,_,T,R,E,9,a[21]),R=l(R,C,_,T,w,14,a[22]),T=l(T,R,C,_,g,20,a[23]),_=l(_,T,R,C,I,5,a[24]),C=l(C,_,T,R,S,9,a[25]),R=l(R,C,_,T,p,14,a[26]),T=l(T,R,C,_,A,20,a[27]),_=l(_,T,R,C,O,5,a[28]),C=l(C,_,T,R,d,9,a[29]),R=l(R,C,_,T,m,14,a[30]),_=f(_,T=l(T,R,C,_,k,20,a[31]),R,C,y,4,a[32]),C=f(C,_,T,R,A,11,a[33]),R=f(R,C,_,T,b,16,a[34]),T=f(T,R,C,_,S,23,a[35]),_=f(_,T,R,C,u,4,a[36]),C=f(C,_,T,R,g,11,a[37]),R=f(R,C,_,T,m,16,a[38]),T=f(T,R,C,_,E,23,a[39]),_=f(_,T,R,C,O,4,a[40]),C=f(C,_,T,R,s,11,a[41]),R=f(R,C,_,T,p,16,a[42]),T=f(T,R,C,_,v,23,a[43]),_=f(_,T,R,C,I,4,a[44]),C=f(C,_,T,R,k,11,a[45]),R=f(R,C,_,T,w,16,a[46]),_=h(_,T=f(T,R,C,_,d,23,a[47]),R,C,s,6,a[48]),C=h(C,_,T,R,m,10,a[49]),R=h(R,C,_,T,S,15,a[50]),T=h(T,R,C,_,y,21,a[51]),_=h(_,T,R,C,k,6,a[52]),C=h(C,_,T,R,p,10,a[53]),R=h(R,C,_,T,E,15,a[54]),T=h(T,R,C,_,u,21,a[55]),_=h(_,T,R,C,A,6,a[56]),C=h(C,_,T,R,w,10,a[57]),R=h(R,C,_,T,v,15,a[58]),T=h(T,R,C,_,O,21,a[59]),_=h(_,T,R,C,g,6,a[60]),C=h(C,_,T,R,b,10,a[61]),R=h(R,C,_,T,d,15,a[62]),T=h(T,R,C,_,I,21,a[63]),o[0]=o[0]+_|0,o[1]=o[1]+T|0,o[2]=o[2]+R|0,o[3]=o[3]+C|0},_doFinalize:function(){var e=this._data,n=e.words,r=8*this._nDataBytes,i=8*e.sigBytes;n[i>>>5]|=128<<24-i%32;var o=t.floor(r/4294967296),s=r;n[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n[14+(i+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),e.sigBytes=4*(n.length+1),this._process();for(var a=this._hash,u=a.words,c=0;c<4;c++){var l=u[c];u[c]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return a},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function c(e,t,n,r,i,o,s){var a=e+(t&n|~t&r)+i+s;return(a<<o|a>>>32-o)+t}function l(e,t,n,r,i,o,s){var a=e+(t&r|n&~r)+i+s;return(a<<o|a>>>32-o)+t}function f(e,t,n,r,i,o,s){var a=e+(t^n^r)+i+s;return(a<<o|a>>>32-o)+t}function h(e,t,n,r,i,o,s){var a=e+(n^(t|~r))+i+s;return(a<<o|a>>>32-o)+t}n.MD5=o._createHelper(u),n.HmacMD5=o._createHmacHelper(u)}(Math),e.MD5));var e}var br,kr={exports:{}},Or={exports:{}};function Sr(){return br?Or.exports:(br=1,Or.exports=(a=gr(),t=(e=a).lib,n=t.WordArray,r=t.Hasher,i=e.algo,o=[],s=i.SHA1=r.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],s=n[2],a=n[3],u=n[4],c=0;c<80;c++){if(c<16)o[c]=0|e[t+c];else{var l=o[c-3]^o[c-8]^o[c-14]^o[c-16];o[c]=l<<1|l>>>31}var f=(r<<5|r>>>27)+u+o[c];f+=c<20?1518500249+(i&s|~i&a):c<40?1859775393+(i^s^a):c<60?(i&s|i&a|s&a)-1894007588:(i^s^a)-899497514,u=a,a=s,s=i<<30|i>>>2,i=r,r=f}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+s|0,n[3]=n[3]+a|0,n[4]=n[4]+u|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(r+64>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=r.clone.call(this);return e._hash=this._hash.clone(),e}}),e.SHA1=r._createHelper(s),e.HmacSHA1=r._createHmacHelper(s),a.SHA1));var e,t,n,r,i,o,s,a}var wr,_r,Tr={exports:{}};function Rr(){return _r?kr.exports:(_r=1,kr.exports=function(e){return n=(t=e).lib,r=n.Base,i=n.WordArray,o=t.algo,s=o.MD5,a=o.EvpKDF=r.extend({cfg:r.extend({keySize:4,hasher:s,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n=this.cfg,r=n.hasher.create(),o=i.create(),s=o.words,a=n.keySize,u=n.iterations;s.length<a;){c&&r.update(c);var c=r.update(e).finalize(t);r.reset();for(var l=1;l<u;l++)c=r.finalize(c),r.reset();o.concat(c)}return o.sigBytes=4*a,o}}),t.EvpKDF=function(e,t,n){return a.create(n).compute(e,t)},e.EvpKDF;var t,n,r,i,o,s,a}(gr(),Sr(),wr||(wr=1,Tr.exports=(e=gr(),void function(){var t=e,n=t.lib.Base,r=t.enc.Utf8;t.algo.HMAC=n.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=r.parse(t));var n=e.blockSize,i=4*n;t.sigBytes>i&&(t=e.finalize(t)),t.clamp();for(var o=this._oKey=t.clone(),s=this._iKey=t.clone(),a=o.words,u=s.words,c=0;c<n;c++)a[c]^=1549556828,u[c]^=909522486;o.sigBytes=s.sigBytes=i,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,n=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(n))}})}()))));var e}var Cr,Pr,xr={exports:{}};var Lr=dr.exports=function(e){return function(){var t=e,n=t.lib.BlockCipher,r=t.algo,i=[],o=[],s=[],a=[],u=[],c=[],l=[],f=[],h=[],d=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var n=0,r=0;for(t=0;t<256;t++){var p=r^r<<1^r<<2^r<<3^r<<4;p=p>>>8^255&p^99,i[n]=p,o[p]=n;var g=e[n],y=e[g],v=e[y],m=257*e[p]^16843008*p;s[n]=m<<24|m>>>8,a[n]=m<<16|m>>>16,u[n]=m<<8|m>>>24,c[n]=m,m=16843009*v^65537*y^257*g^16843008*n,l[p]=m<<24|m>>>8,f[p]=m<<16|m>>>16,h[p]=m<<8|m>>>24,d[p]=m,n?(n=g^e[e[e[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=n.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,n=e.sigBytes/4,r=4*((this._nRounds=n+6)+1),o=this._keySchedule=[],s=0;s<r;s++)if(s<n)o[s]=t[s];else{var a=o[s-1];s%n?n>6&&s%n==4&&(a=i[a>>>24]<<24|i[a>>>16&255]<<16|i[a>>>8&255]<<8|i[255&a]):(a=i[(a=a<<8|a>>>24)>>>24]<<24|i[a>>>16&255]<<16|i[a>>>8&255]<<8|i[255&a],a^=p[s/n|0]<<24),o[s]=o[s-n]^a}for(var u=this._invKeySchedule=[],c=0;c<r;c++)s=r-c,a=c%4?o[s]:o[s-4],u[c]=c<4||s<=4?a:l[i[a>>>24]]^f[i[a>>>16&255]]^h[i[a>>>8&255]]^d[i[255&a]]}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,s,a,u,c,i)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,l,f,h,d,o),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,r,i,o,s,a){for(var u=this._nRounds,c=e[t]^n[0],l=e[t+1]^n[1],f=e[t+2]^n[2],h=e[t+3]^n[3],d=4,p=1;p<u;p++){var g=r[c>>>24]^i[l>>>16&255]^o[f>>>8&255]^s[255&h]^n[d++],y=r[l>>>24]^i[f>>>16&255]^o[h>>>8&255]^s[255&c]^n[d++],v=r[f>>>24]^i[h>>>16&255]^o[c>>>8&255]^s[255&l]^n[d++],m=r[h>>>24]^i[c>>>16&255]^o[l>>>8&255]^s[255&f]^n[d++];c=g,l=y,f=v,h=m}g=(a[c>>>24]<<24|a[l>>>16&255]<<16|a[f>>>8&255]<<8|a[255&h])^n[d++],y=(a[l>>>24]<<24|a[f>>>16&255]<<16|a[h>>>8&255]<<8|a[255&c])^n[d++],v=(a[f>>>24]<<24|a[h>>>16&255]<<16|a[c>>>8&255]<<8|a[255&l])^n[d++],m=(a[h>>>24]<<24|a[c>>>16&255]<<16|a[l>>>8&255]<<8|a[255&f])^n[d++],e[t]=g,e[t+1]=y,e[t+2]=v,e[t+3]=m},keySize:8});t.AES=n._createHelper(g)}(),e.AES}(gr(),mr(),Er(),Rr(),Cr||(Cr=1,xr.exports=(Pr=gr(),Rr(),void(Pr.lib.Cipher||function(e){var t=Pr,n=t.lib,r=n.Base,i=n.WordArray,o=n.BufferedBlockAlgorithm,s=t.enc;s.Utf8;var a=s.Base64,u=t.algo.EvpKDF,c=n.Cipher=o.extend({cfg:r.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,n){this.cfg=this.cfg.extend(n),this._xformMode=e,this._key=t,this.reset()},reset:function(){o.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?m:y}return function(t){return{encrypt:function(n,r,i){return e(r).encrypt(t,n,r,i)},decrypt:function(n,r,i){return e(r).decrypt(t,n,r,i)}}}}()});n.StreamCipher=c.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var l=t.mode={},f=n.BlockCipherMode=r.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),h=l.CBC=function(){var t=f.extend();function n(t,n,r){var i=this._iv;if(i){var o=i;this._iv=e}else o=this._prevBlock;for(var s=0;s<r;s++)t[n+s]^=o[s]}return t.Encryptor=t.extend({processBlock:function(e,t){var r=this._cipher,i=r.blockSize;n.call(this,e,t,i),r.encryptBlock(e,t),this._prevBlock=e.slice(t,t+i)}}),t.Decryptor=t.extend({processBlock:function(e,t){var r=this._cipher,i=r.blockSize,o=e.slice(t,t+i);r.decryptBlock(e,t),n.call(this,e,t,i),this._prevBlock=o}}),t}(),d=(t.pad={}).Pkcs7={pad:function(e,t){for(var n=4*t,r=n-e.sigBytes%n,o=r<<24|r<<16|r<<8|r,s=[],a=0;a<r;a+=4)s.push(o);var u=i.create(s,r);e.concat(u)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}};n.BlockCipher=c.extend({cfg:c.cfg.extend({mode:h,padding:d}),reset:function(){c.reset.call(this);var e=this.cfg,t=e.iv,n=e.mode;if(this._xformMode==this._ENC_XFORM_MODE)var r=n.createEncryptor;else r=n.createDecryptor,this._minBufferSize=1;this._mode&&this._mode.__creator==r?this._mode.init(this,t&&t.words):(this._mode=r.call(n,this,t&&t.words),this._mode.__creator=r)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){e.pad(this._data,this.blockSize);var t=this._process(!0)}else t=this._process(!0),e.unpad(t);return t},blockSize:4});var p=n.CipherParams=r.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),g=(t.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,n=e.salt;if(n)var r=i.create([1398893684,1701076831]).concat(n).concat(t);else r=t;return r.toString(a)},parse:function(e){var t=a.parse(e),n=t.words;if(1398893684==n[0]&&1701076831==n[1]){var r=i.create(n.slice(2,4));n.splice(0,4),t.sigBytes-=16}return p.create({ciphertext:t,salt:r})}},y=n.SerializableCipher=r.extend({cfg:r.extend({format:g}),encrypt:function(e,t,n,r){r=this.cfg.extend(r);var i=e.createEncryptor(n,r),o=i.finalize(t),s=i.cfg;return p.create({ciphertext:o,key:n,iv:s.iv,algorithm:e,mode:s.mode,padding:s.padding,blockSize:e.blockSize,formatter:r.format})},decrypt:function(e,t,n,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),e.createDecryptor(n,r).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),v=(t.kdf={}).OpenSSL={execute:function(e,t,n,r){r||(r=i.random(8));var o=u.create({keySize:t+n}).compute(e,r),s=i.create(o.words.slice(t),4*n);return o.sigBytes=4*t,p.create({key:o,iv:s,salt:r})}},m=n.PasswordBasedCipher=y.extend({cfg:y.cfg.extend({kdf:v}),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 o=y.encrypt.call(this,e,t,i.key,r);return o.mixIn(i),o},decrypt:function(e,t,n,r){r=this.cfg.extend(r),t=this._parse(t,r.format);var i=r.kdf.execute(n,e.keySize,e.ivSize,t.salt);return r.iv=i.iv,y.decrypt.call(this,e,t,i.key,r)}})}())))),Mr={exports:{}},Dr=Mr.exports=function(e){return e.enc.Utf8}(gr()),Nr={exports:{}},Br={exports:{}},Gr=6e4,Ur=36e5,jr=24*Ur,Fr=function(e,t){return t=t||{},"string"==typeof e?function(e){if((e=""+e).length>1e4)return;var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(!t)return;var n=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*n;case"days":case"day":case"d":return n*jr;case"hours":case"hour":case"hrs":case"hr":case"h":return n*Ur;case"minutes":case"minute":case"mins":case"min":case"m":return n*Gr;case"seconds":case"second":case"secs":case"sec":case"s":return 1e3*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n}}(e):t.long?function(e){return Hr(e,jr,"day")||Hr(e,Ur,"hour")||Hr(e,Gr,"minute")||Hr(e,1e3,"second")||e+" ms"}(e):function(e){return e>=jr?Math.round(e/jr)+"d":e>=Ur?Math.round(e/Ur)+"h":e>=Gr?Math.round(e/Gr)+"m":e>=1e3?Math.round(e/1e3)+"s":e+"ms"}(e)};function Hr(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}!function(e,t){t=Br.exports=function(e){function r(){}function o(){var e=o,r=+new Date,s=r-(n||r);e.diff=s,e.prev=n,e.curr=r,n=r,null==e.useColors&&(e.useColors=t.useColors()),null==e.color&&e.useColors&&(e.color=i());var a=Array.prototype.slice.call(arguments);a[0]=t.coerce(a[0]),"string"!=typeof a[0]&&(a=["%o"].concat(a));var u=0;a[0]=a[0].replace(/%([a-z%])/g,(function(n,r){if("%%"===n)return n;u++;var i=t.formatters[r];if("function"==typeof i){var o=a[u];n=i.call(e,o),a.splice(u,1),u--}return n})),"function"==typeof t.formatArgs&&(a=t.formatArgs.apply(e,a));var c=o.log||t.log||console.log.bind(console);c.apply(e,a)}r.enabled=!1,o.enabled=!0;var s=t.enabled(e)?o:r;return s.namespace=e,s},t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){t.save(e);for(var n=(e||"").split(/[\s,]+/),r=n.length,i=0;i<r;i++)n[i]&&("-"===(e=n[i].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=Fr,t.names=[],t.skips=[],t.formatters={};var n,r=0;function i(){return t.colors[r++%t.colors.length]}}(0,Br.exports),function(e,t){function n(){var e;try{e=t.storage.debug}catch(e){}return e}(t=e.exports=Br.exports).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(){var e=arguments,n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),!n)return e;var r="color: "+this.color;e=[e[0],r,"color: inherit"].concat(Array.prototype.slice.call(e,1));var i=0,o=0;return e[0].replace(/%[a-z%]/g,(function(e){"%%"!==e&&(i++,"%c"===e&&(o=i))})),e.splice(o,0,r),e},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=n,t.useColors=function(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){return JSON.stringify(e)},t.enable(n())}(Nr,Nr.exports);var zr=Nr.exports("cookie"),Kr=function(e,t,n){switch(arguments.length){case 3:case 2:return Qr(e,t,n);case 1:return qr(e);default:return Vr()}};function Qr(e,t,n){n=n||{};var r=Wr(e)+"="+Wr(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}function Vr(){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[Yr((t=r[i].split("="))[0])]=Yr(t[1]);return n}(e)}function qr(e){return Vr()[e]}function Wr(e){try{return encodeURIComponent(e)}catch(t){zr("error `encode(%o)` - %o",e,t)}}function Yr(e){try{return decodeURIComponent(e)}catch(t){zr("error `decode(%o)` - %o",e,t)}}var Jr={exports:{}},Xr=Math.max,$r=function(e,t){var n=t?t.length:0;if(!n)return[];for(var r=Xr(Number(e)||0,0),i=Xr(n-r,0),o=new Array(i),s=0;s<i;s+=1)o[s]=t[s+r];return o},Zr=Math.max,ei=function(e){if(null==e||!e.length)return[];for(var t=new Array(Zr(e.length-2,0)),n=1;n<e.length;n+=1)t[n-1]=e[n];return t},ti=$r,ni=ei,ri=Object.prototype.hasOwnProperty,ii=Object.prototype.toString,oi=function(e){return Boolean(e)&&"object"==typeof e},si=function(e){return Boolean(e)&&"[object Object]"===ii.call(e)},ai=function(e,t,n,r){return ri.call(t,r)&&void 0===e[r]&&(e[r]=n),t},ui=function(e,t,n,r){return ri.call(t,r)&&(si(e[r])&&si(n)?e[r]=li(e[r],n):void 0===e[r]&&(e[r]=n)),t},ci=function(e,t){if(!oi(t))return t;e=e||ai;for(var n=ti(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},li=function(e){return ci.apply(null,[ui,e].concat(ni(arguments)))};Jr.exports=function(e){return ci.apply(null,[null,e].concat(ni(arguments)))},Jr.exports.deep=li;var fi={exports:{}},hi="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function di(){throw new Error("setTimeout has not been defined")}function pi(){throw new Error("clearTimeout has not been defined")}var gi=di,yi=pi;function vi(e){if(gi===setTimeout)return setTimeout(e,0);if((gi===di||!gi)&&setTimeout)return gi=setTimeout,setTimeout(e,0);try{return gi(e,0)}catch(t){try{return gi.call(null,e,0)}catch(t){return gi.call(this,e,0)}}}"function"==typeof hi.setTimeout&&(gi=setTimeout),"function"==typeof hi.clearTimeout&&(yi=clearTimeout);var mi,Ai=[],Ii=!1,Ei=-1;function bi(){Ii&&mi&&(Ii=!1,mi.length?Ai=mi.concat(Ai):Ei=-1,Ai.length&&ki())}function ki(){if(!Ii){var e=vi(bi);Ii=!0;for(var t=Ai.length;t;){for(mi=Ai,Ai=[];++Ei<t;)mi&&mi[Ei].run();Ei=-1,t=Ai.length}mi=null,Ii=!1,function(e){if(yi===clearTimeout)return clearTimeout(e);if((yi===pi||!yi)&&clearTimeout)return yi=clearTimeout,clearTimeout(e);try{yi(e)}catch(t){try{return yi.call(null,e)}catch(t){return yi.call(this,e)}}}(e)}}function Oi(e,t){this.fun=e,this.array=t}Oi.prototype.run=function(){this.fun.apply(null,this.array)};function Si(){}var wi=Si,_i=Si,Ti=Si,Ri=Si,Ci=Si,Pi=Si,xi=Si;var Li=hi.performance||{},Mi=Li.now||Li.mozNow||Li.msNow||Li.oNow||Li.webkitNow||function(){return(new Date).getTime()};var Di=new Date;var Ni={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];Ai.push(new Oi(e,t)),1!==Ai.length||Ii||vi(ki)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:wi,addListener:_i,once:Ti,off:Ri,removeListener:Ci,removeAllListeners:Pi,emit:xi,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*Mi.call(Li),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-Di)/1e3}},Bi={exports:{}},Gi={exports:{}},Ui=1e3,ji=60*Ui,Fi=60*ji,Hi=24*Fi,zi=365.25*Hi,Ki=function(e,t){t=t||{};var n=typeof e;if("string"===n&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(!t)return;var n=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return n*zi;case"days":case"day":case"d":return n*Hi;case"hours":case"hour":case"hrs":case"hr":case"h":return n*Fi;case"minutes":case"minute":case"mins":case"min":case"m":return n*ji;case"seconds":case"second":case"secs":case"sec":case"s":return n*Ui;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}(e);if("number"===n&&!1===isNaN(e))return t.long?function(e){return Qi(e,Hi,"day")||Qi(e,Fi,"hour")||Qi(e,ji,"minute")||Qi(e,Ui,"second")||e+" ms"}(e):function(e){if(e>=Hi)return Math.round(e/Hi)+"d";if(e>=Fi)return Math.round(e/Fi)+"h";if(e>=ji)return Math.round(e/ji)+"m";if(e>=Ui)return Math.round(e/Ui)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function Qi(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}!function(e,t){var n;function r(e){function r(){if(r.enabled){var e=r,i=+new Date,o=i-(n||i);e.diff=o,e.prev=n,e.curr=i,n=i;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=t.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var u=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,(function(n,r){if("%%"===n)return n;u++;var i=t.formatters[r];if("function"==typeof i){var o=s[u];n=i.call(e,o),s.splice(u,1),u--}return n})),t.formatArgs.call(e,s);var c=r.log||t.log||console.log.bind(console);c.apply(e,s)}}return r.namespace=e,r.enabled=t.enabled(e),r.useColors=t.useColors(),r.color=function(e){var n,r=0;for(n in e)r=(r<<5)-r+e.charCodeAt(n),r|=0;return t.colors[Math.abs(r)%t.colors.length]}(e),"function"==typeof t.init&&t.init(r),r}(t=Gi.exports=r.debug=r.default=r).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){t.save(e),t.names=[],t.skips=[];for(var n=("string"==typeof e?e:"").split(/[\s,]+/),r=n.length,i=0;i<r;i++)n[i]&&("-"===(e=n[i].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=Ki,t.names=[],t.skips=[],t.formatters={}}(0,Gi.exports),function(e,t){function n(){var e;try{e=t.storage.debug}catch(e){}return!e&&void 0!==Ni&&"env"in Ni&&(e=Ni.env.DEBUG),e}(t=e.exports=Gi.exports).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),!n)return;var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var i=0,o=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(i++,"%c"===e&&(o=i))})),e.splice(o,0,r)},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=n,t.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(n())}(Bi,Bi.exports);var Vi=Bi.exports("cookie"),qi=function(e,t,n){switch(arguments.length){case 3:case 2:return Wi(e,t,n);case 1:return Ji(e);default:return Yi()}};function Wi(e,t,n){n=n||{};var r=Xi(e)+"="+Xi(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}function Yi(){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[$i((t=r[i].split("="))[0])]=$i(t[1]);return n}(e)}function Ji(e){return Yi()[e]}function Xi(e){try{return encodeURIComponent(e)}catch(t){Vi("error `encode(%o)` - %o",e,t)}}function $i(e){try{return decodeURIComponent(e)}catch(t){Vi("error `decode(%o)` - %o",e,t)}}!function(e,t){var n=P.parse,r=qi;function i(e){for(var n=t.cookie,r=t.levels(e),i=0;i<r.length;++i){var o="__tld__",s=r[i],a={domain:"."+s};if(n(o,1,a),n(o))return n(o,null,a),s}return""}i.levels=function(e){var t=n(e).hostname.split("."),r=t[t.length-1],i=[];if(4===t.length&&r===parseInt(r,10))return i;if(t.length<=1)return i;for(var o=t.length-2;o>=0;--o)i.push(t.slice(o).join("."));return i},i.cookie=r,t=e.exports=i}(fi,fi.exports);var Zi=fi.exports,eo=new(function(){function e(t){r(this,e),this.cOpts={},this.options(t),this.isSupportAvailable=this.checkSupportAvailability()}return o(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(Zi(window.location.href));return"."===t&&(t=null),this.cOpts=Jr.exports(e,{maxage:31536e6,path:"/",domain:t,samesite:"Lax"}),this.cOpts}},{key:"set",value:function(e,t){try{return Kr(e,t,w(this.cOpts)),!0}catch(e){return at(e),!1}}},{key:"get",value:function(e){return Kr(e)}},{key:"remove",value:function(e){try{return Kr(e,null,w(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}())({}),to={exports:{}},no=to.exports=function(){var e=window.localStorage;function t(e){return e=JSON.stringify(e),!!/^\{[\s\S]*\}$/.test(e)}function n(e){return void 0===e||"function"==typeof e?e+"":JSON.stringify(e)}function r(e){if("string"==typeof e)try{return JSON.parse(e)}catch(t){return e}}function i(e){return"[object Function]"==={}.toString.call(e)}function o(e){return"[object Array]"===Object.prototype.toString.call(e)}function s(e){var t="_Is_Incognit",n="yes";try{e.setItem(t,n)}catch(t){if("QuotaExceededError"===t.name){var r=function(){};e.__proto__={setItem:r,getItem:r,removeItem:r,clear:r}}}finally{e.getItem(t)===n&&e.removeItem(t)}return e}function a(){if(!(this instanceof a))return new a}e=s(e),a.prototype={set:function(r,i){if(r&&!t(r))e.setItem(r,n(i));else if(t(r))for(var o in r)this.set(o,r[o]);return this},get:function(t){if(!t){var n={};return this.forEach((function(e,t){return n[e]=t})),n}if("?"===t.charAt(0))return this.has(t.substr(1));var i=arguments;if(i.length>1){for(var o={},s=0,a=i.length;s<a;s++){var u=r(e.getItem(i[s]));this.has(i[s])&&(o[i[s]]=u)}return o}return r(e.getItem(t))},clear:function(){return e.clear(),this},remove:function(t){var n=this.get(t);return e.removeItem(t),n},has:function(e){return{}.hasOwnProperty.call(this.get(),e)},keys:function(){var e=[];return this.forEach((function(t){e.push(t)})),e},forEach:function(t){for(var n=0,r=e.length;n<r;n++){var i=e.key(n);t(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 u=null;function c(e,n){var r=arguments,s=null;if(u||(u=a()),0===r.length)return u.get();if(1===r.length){if("string"==typeof e)return u.get(e);if(t(e))return u.set(e)}if(2===r.length&&"string"==typeof e){if(!n)return u.remove(e);if(n&&"string"==typeof n)return u.set(e,n);n&&i(n)&&(s=null,s=n(e,u.get(e)),c.set(e,s))}if(2===r.length&&o(e)&&i(n))for(var l=0,f=e.length;l<f;l++)s=n(e[l],u.get(e[l])),c.set(e[l],s);return c}for(var l in a.prototype)c[l]=a.prototype[l];return c}(),ro=new(function(){function e(t){r(this,e),this.sOpts={},this.enabled=this.checkSupportAvailability(),this.options(t)}return o(e,[{key:"options",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 0===arguments.length||(Jr.exports(e,{enabled:!0}),this.enabled=e.enabled&&this.enabled,this.sOpts=e),this.sOpts}},{key:"set",value:function(e,t){return no.set(e,t)}},{key:"get",value:function(e){return no.get(e)}},{key:"remove",value:function(e){return no.remove(e)}},{key:"checkSupportAvailability",value:function(){var e="test_rudder_ls";return this.set(e,!0),!!this.get(e)&&(this.remove(e),!0)}}]),e}())({}),io="rl_user_id",oo="rl_trait",so="rl_anonymous_id",ao="rl_group_id",uo="rl_group_trait",co="rl_page_init_referrer",lo="rl_page_init_referring_domain",fo="rl_session",ho="RudderEncrypt:",po="Rudder",go={segment:"ajs_anonymous_id"};function yo(e){try{return e?JSON.parse(e):null}catch(t){return at(t),e||null}}function vo(e){return e.replace(/^\s+|\s+$/gm,"")}function mo(e){return!e||"string"==typeof e&&""===vo(e)?e:e.substring(0,ho.length)===ho?Lr.decrypt(e.substring(ho.length),po).toString(Dr):e}var Ao=function(){function e(){r(this,e),eo.isSupportAvailable?this.storage=eo:(ro.enabled&&(this.storage=ro),this.storage||at("No storage is available :: initializing the SDK without storage"))}return o(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""===vo(e)?e:"".concat(ho).concat(Lr.encrypt(e,po).toString())}(function(e){return JSON.stringify(e)}(t)))}},{key:"setStringItem",value:function(e,t){"string"==typeof t?this.setItem(e,t):at("[Storage] ".concat(e," should be string"))}},{key:"setUserId",value:function(e){this.setStringItem(io,e)}},{key:"setUserTraits",value:function(e){this.setItem(oo,e)}},{key:"setGroupId",value:function(e){this.setStringItem(ao,e)}},{key:"setGroupTraits",value:function(e){this.setItem(uo,e)}},{key:"setAnonymousId",value:function(e){this.setStringItem(so,e)}},{key:"setInitialReferrer",value:function(e){this.setItem(co,e)}},{key:"setInitialReferringDomain",value:function(e){this.setItem(lo,e)}},{key:"setSessionInfo",value:function(e){this.setItem(fo,e)}},{key:"getItem",value:function(e){return yo(mo(this.storage.get(e)))}},{key:"getUserId",value:function(){return this.getItem(io)}},{key:"getUserTraits",value:function(){return this.getItem(oo)}},{key:"getGroupId",value:function(){return this.getItem(ao)}},{key:"getGroupTraits",value:function(){return this.getItem(uo)}},{key:"fetchExternalAnonymousId",value:function(e){var t,n=e.toLowerCase();return Object.keys(go).includes(n)&&"segment"===n?(ro.enabled&&(t=ro.get(go[n])),!t&&eo.isSupportAvailable&&(t=eo.get(go[n])),t):t}},{key:"getAnonymousId",value:function(e){var t=yo(mo(this.storage.get(so)));if(t)return t;var n=L(e,"autoCapture.source");if(!0===L(e,"autoCapture.enabled")&&"string"==typeof n){var r=this.fetchExternalAnonymousId(n);if(r)return r}return t}},{key:"getInitialReferrer",value:function(){return this.getItem(co)}},{key:"getInitialReferringDomain",value:function(){return this.getItem(lo)}},{key:"getSessionInfo",value:function(){return this.getItem(fo)}},{key:"removeItem",value:function(e){return this.storage.remove(e)}},{key:"removeSessionInfo",value:function(){this.removeItem(fo)}},{key:"clear",value:function(e){this.storage.remove(io),this.storage.remove(oo),this.storage.remove(ao),this.storage.remove(uo),e&&this.storage.remove(so)}}]),e}(),Io=new Ao;function Eo(e,t){if(null!=t)return t}function bo(e){return e&&e.endsWith("/")?e.replace(/\/+$/,""):e}function ko(){return function(){var e,t=0,n="";if(!B||G+16>256){for(B=Array(t=256);t--;)B[t]=256*Math.random()|0;t=G=0}for(;t<16;t++)e=B[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++,n}()}function Oo(){return(new Date).toISOString()}function So(e){window.rsBugsnagClient&&window.rsBugsnagClient.leaveBreadcrumb(e)}function wo(e){window.rsBugsnagClient&&window.rsBugsnagClient.notify(e)}function _o(e,t){var n;try{n="string"==typeof e?e:e instanceof Error||e.message?e.message:JSON.stringify(e)}catch(e){n=""}try{if(e instanceof Event){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(n="error in script loading:: src:: ".concat(e.target.src," id:: ").concat(e.target.id),"ad-block"===e.target.id)return void t.page("RudderJS-Initiated","ad-block page request",{path:"/ad-blocked",title:n},t.sendAdblockPageOptions)}n='[handleError]:: "'.concat(n,'"'),at(n);var r=e;e instanceof Error||(r=new Error(n)),wo(r)}catch(t){at("[handleError] Exception:: ",t),at("[handleError] Original error:: ",JSON.stringify(e)),wo(t)}}function To(){var e=Po(),t=e?P.parse(e).pathname:window.location.pathname,n=window.location.search,r=document.title,i=function(e){var t=Po(),n=t?t.indexOf("?")>-1?t:t+e:window.location.href,r=n.indexOf("#");return r>-1?n.slice(0,r):n}(n),o=window.location.href,s=Ro();return{path:t,referrer:s,referring_domain:Co(s),search:n,title:r,url:i,tab_url:o,initial_referrer:Io.getInitialReferrer(),initial_referring_domain:Io.getInitialReferringDomain()}}function Ro(){return document.referrer||"$direct"}function Co(e){var t=e.split("/");return t.length>=3?t[2]:""}function Po(){for(var e,t=document.getElementsByTagName("link"),n=0;e=t[n];n++)if("canonical"===e.getAttribute("rel"))return e.getAttribute("href")}function xo(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 Lo(e){xo(e,sr)}function Mo(e,t){var r=[];if(!t||0===t.length)return r;var i=!0;void 0!==e.All&&(i=e.All);var o=[];return"string"==typeof t[0]?t.forEach((function(e){o.push({intgName:e,intObj:e})})):"object"===n(t[0])&&t.forEach((function(e){o.push({intgName:e.name,intObj:e})})),o.forEach((function(t){var n=t.intgName,o=t.intObj;if(i){var s=!0;null!=e[n]&&0==e[n]&&(s=!1),s&&r.push(o)}else null!=e[n]&&1==e[n]&&r.push(o)})),r}for(var Do,No=function(){for(var e,t=document.getElementsByTagName("script"),n=!1,r=0;r<t.length;r+=1){var i=bo(t[r].getAttribute("src"));if(i){var o=i.match(/^.*rudder-analytics(-staging)?(\.min)?\.js$/);if(o){e=i,n=void 0!==o[1];break}}}return{sdkURL:e,isStaging:n}},Bo=function(e){return"string"==typeof e||null==e?e:JSON.stringify(e)},Go=o((function e(){r(this,e),this.build="1.0.0",this.name="RudderLabs JavaScript SDK",this.namespace="com.rudderlabs.javascript",this.version="2.21.0"})),Uo=o((function e(){r(this,e),this.name="RudderLabs JavaScript SDK",this.version="2.21.0"})),jo=o((function e(){r(this,e),this.name="",this.version=""})),Fo=o((function e(){r(this,e),this.density=0,this.width=0,this.height=0,this.innerWidth=0,this.innerHeight=0})),Ho=o((function e(){r(this,e),this.app=new Go,this.traits=null,this.library=new Uo,this.userAgent=null,this.device=null,this.network=null,this.os=new jo,this.locale=null,this.screen=new Fo})),zo=function(){function e(){r(this,e),this.channel="web",this.context=new Ho,this.type=null,this.messageId=ko(),this.originalTimestamp=(new Date).toISOString(),this.anonymousId=null,this.userId=null,this.event=null,this.properties={},this.integrations={},this.integrations.All=!0}return o(e,[{key:"getProperty",value:function(e){return this.properties[e]}},{key:"addProperty",value:function(e,t){this.properties[e]=t}}]),e}(),Ko=function(){function e(){r(this,e),this.message=new zo}return o(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}(),Qo=function(){function e(){r(this,e),this.rudderProperty=null,this.rudderUserProperty=null,this.event=null,this.userId=null,this.type=null}return o(e,[{key:"setType",value:function(e){return this.type=e,this}},{key:"build",value:function(){var e=new Ko;return e.setUserId(this.userId),e.setType(this.type),e.setEventName(this.event),e.setProperty(this.rudderProperty),e.setUserProperty(this.rudderUserProperty),e}}]),e}(),Vo={},qo=256,Wo=[];qo--;)Wo[qo]=(qo+256).toString(16).substring(1);Vo.v4=function(){var e,t=0,n="";if(!Do||qo+16>256){for(Do=Array(t=256);t--;)Do[t]=256*Math.random()|0;t=qo=0}for(;t<16;t++)e=Do[qo+t],n+=6==t?Wo[15&e|64]:8==t?Wo[63&e|128]:Wo[e],1&t&&t>1&&t<11&&(n+="-");return qo++,n};var Yo,Jo={},Xo=Object.prototype.hasOwnProperty,$o=String.prototype.charAt,Zo=Object.prototype.toString,es=function(e,t){return $o.call(e,t)},ts=function(e,t){return Xo.call(e,t)},ns=function(e,t){t=t||ts;for(var n=[],r=0,i=e.length;r<i;r+=1)t(e,r)&&n.push(String(r));return n},rs=function(e){return null==e?[]:(t=e,"[object String]"===Zo.call(t)?ns(e,es):function(e){return null!=e&&"function"!=typeof e&&"number"==typeof e.length}(e)?ns(e,ts):function(e,t){t=t||ts;var n=[];for(var r in e)t(e,r)&&n.push(String(r));return n}(e));var t},is=new Uint8Array(16);function os(){if(!Yo&&!(Yo="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Yo(is)}var ss=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function as(e){return"string"==typeof e&&ss.test(e)}for(var us,cs,ls=[],fs=0;fs<256;++fs)ls.push((fs+256).toString(16).substr(1));function hs(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(ls[e[t+0]]+ls[e[t+1]]+ls[e[t+2]]+ls[e[t+3]]+"-"+ls[e[t+4]]+ls[e[t+5]]+"-"+ls[e[t+6]]+ls[e[t+7]]+"-"+ls[e[t+8]]+ls[e[t+9]]+"-"+ls[e[t+10]]+ls[e[t+11]]+ls[e[t+12]]+ls[e[t+13]]+ls[e[t+14]]+ls[e[t+15]]).toLowerCase();if(!as(n))throw TypeError("Stringified UUID is invalid");return n}var ds=0,ps=0;function gs(e){if(!as(e))throw TypeError("Invalid UUID");var t,n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n}function ys(e,t,n){function r(e,r,i,o){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t}(e)),"string"==typeof r&&(r=gs(r)),16!==r.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var s=new Uint8Array(16+e.length);if(s.set(r),s.set(e,r.length),(s=n(s))[6]=15&s[6]|t,s[8]=63&s[8]|128,i){o=o||0;for(var a=0;a<16;++a)i[o+a]=s[a];return i}return hs(s)}try{r.name=e}catch(e){}return r.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",r.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",r}function vs(e){return 14+(e+64>>>9<<4)+1}function ms(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function As(e,t,n,r,i,o){return ms((s=ms(ms(t,e),ms(r,o)))<<(a=i)|s>>>32-a,n);var s,a}function Is(e,t,n,r,i,o,s){return As(t&n|~t&r,e,t,i,o,s)}function Es(e,t,n,r,i,o,s){return As(t&r|n&~r,e,t,i,o,s)}function bs(e,t,n,r,i,o,s){return As(t^n^r,e,t,i,o,s)}function ks(e,t,n,r,i,o,s){return As(n^(t|~r),e,t,i,o,s)}var Os=ys("v3",48,(function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var n=0;n<t.length;++n)e[n]=t.charCodeAt(n)}return function(e){for(var t=[],n=32*e.length,r="0123456789abcdef",i=0;i<n;i+=8){var o=e[i>>5]>>>i%32&255,s=parseInt(r.charAt(o>>>4&15)+r.charAt(15&o),16);t.push(s)}return t}(function(e,t){e[t>>5]|=128<<t%32,e[vs(t)-1]=t;for(var n=1732584193,r=-271733879,i=-1732584194,o=271733878,s=0;s<e.length;s+=16){var a=n,u=r,c=i,l=o;n=Is(n,r,i,o,e[s],7,-680876936),o=Is(o,n,r,i,e[s+1],12,-389564586),i=Is(i,o,n,r,e[s+2],17,606105819),r=Is(r,i,o,n,e[s+3],22,-1044525330),n=Is(n,r,i,o,e[s+4],7,-176418897),o=Is(o,n,r,i,e[s+5],12,1200080426),i=Is(i,o,n,r,e[s+6],17,-1473231341),r=Is(r,i,o,n,e[s+7],22,-45705983),n=Is(n,r,i,o,e[s+8],7,1770035416),o=Is(o,n,r,i,e[s+9],12,-1958414417),i=Is(i,o,n,r,e[s+10],17,-42063),r=Is(r,i,o,n,e[s+11],22,-1990404162),n=Is(n,r,i,o,e[s+12],7,1804603682),o=Is(o,n,r,i,e[s+13],12,-40341101),i=Is(i,o,n,r,e[s+14],17,-1502002290),n=Es(n,r=Is(r,i,o,n,e[s+15],22,1236535329),i,o,e[s+1],5,-165796510),o=Es(o,n,r,i,e[s+6],9,-1069501632),i=Es(i,o,n,r,e[s+11],14,643717713),r=Es(r,i,o,n,e[s],20,-373897302),n=Es(n,r,i,o,e[s+5],5,-701558691),o=Es(o,n,r,i,e[s+10],9,38016083),i=Es(i,o,n,r,e[s+15],14,-660478335),r=Es(r,i,o,n,e[s+4],20,-405537848),n=Es(n,r,i,o,e[s+9],5,568446438),o=Es(o,n,r,i,e[s+14],9,-1019803690),i=Es(i,o,n,r,e[s+3],14,-187363961),r=Es(r,i,o,n,e[s+8],20,1163531501),n=Es(n,r,i,o,e[s+13],5,-1444681467),o=Es(o,n,r,i,e[s+2],9,-51403784),i=Es(i,o,n,r,e[s+7],14,1735328473),n=bs(n,r=Es(r,i,o,n,e[s+12],20,-1926607734),i,o,e[s+5],4,-378558),o=bs(o,n,r,i,e[s+8],11,-2022574463),i=bs(i,o,n,r,e[s+11],16,1839030562),r=bs(r,i,o,n,e[s+14],23,-35309556),n=bs(n,r,i,o,e[s+1],4,-1530992060),o=bs(o,n,r,i,e[s+4],11,1272893353),i=bs(i,o,n,r,e[s+7],16,-155497632),r=bs(r,i,o,n,e[s+10],23,-1094730640),n=bs(n,r,i,o,e[s+13],4,681279174),o=bs(o,n,r,i,e[s],11,-358537222),i=bs(i,o,n,r,e[s+3],16,-722521979),r=bs(r,i,o,n,e[s+6],23,76029189),n=bs(n,r,i,o,e[s+9],4,-640364487),o=bs(o,n,r,i,e[s+12],11,-421815835),i=bs(i,o,n,r,e[s+15],16,530742520),n=ks(n,r=bs(r,i,o,n,e[s+2],23,-995338651),i,o,e[s],6,-198630844),o=ks(o,n,r,i,e[s+7],10,1126891415),i=ks(i,o,n,r,e[s+14],15,-1416354905),r=ks(r,i,o,n,e[s+5],21,-57434055),n=ks(n,r,i,o,e[s+12],6,1700485571),o=ks(o,n,r,i,e[s+3],10,-1894986606),i=ks(i,o,n,r,e[s+10],15,-1051523),r=ks(r,i,o,n,e[s+1],21,-2054922799),n=ks(n,r,i,o,e[s+8],6,1873313359),o=ks(o,n,r,i,e[s+15],10,-30611744),i=ks(i,o,n,r,e[s+6],15,-1560198380),r=ks(r,i,o,n,e[s+13],21,1309151649),n=ks(n,r,i,o,e[s+4],6,-145523070),o=ks(o,n,r,i,e[s+11],10,-1120210379),i=ks(i,o,n,r,e[s+2],15,718787259),r=ks(r,i,o,n,e[s+9],21,-343485551),n=ms(n,a),r=ms(r,u),i=ms(i,c),o=ms(o,l)}return[n,r,i,o]}(function(e){if(0===e.length)return[];for(var t=8*e.length,n=new Uint32Array(vs(t)),r=0;r<t;r+=8)n[r>>5]|=(255&e[r/8])<<r%32;return n}(e),8*e.length))})),Ss=Os;function ws(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:case 3:return t^n^r;case 2:return t&n^t&r^n&r}}function _s(e,t){return e<<t|e>>>32-t}var Ts=ys("v5",80,(function(e){var t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var r=unescape(encodeURIComponent(e));e=[];for(var i=0;i<r.length;++i)e.push(r.charCodeAt(i))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var o=e.length/4+2,s=Math.ceil(o/16),a=new Array(s),u=0;u<s;++u){for(var c=new Uint32Array(16),l=0;l<16;++l)c[l]=e[64*u+4*l]<<24|e[64*u+4*l+1]<<16|e[64*u+4*l+2]<<8|e[64*u+4*l+3];a[u]=c}a[s-1][14]=8*(e.length-1)/Math.pow(2,32),a[s-1][14]=Math.floor(a[s-1][14]),a[s-1][15]=8*(e.length-1)&4294967295;for(var f=0;f<s;++f){for(var h=new Uint32Array(80),d=0;d<16;++d)h[d]=a[f][d];for(var p=16;p<80;++p)h[p]=_s(h[p-3]^h[p-8]^h[p-14]^h[p-16],1);for(var g=n[0],y=n[1],v=n[2],m=n[3],A=n[4],I=0;I<80;++I){var E=Math.floor(I/20),b=_s(g,5)+ws(E,y,v,m)+A+t[E]+h[I]>>>0;A=m,m=v,v=_s(y,30)>>>0,y=g,g=b}n[0]=n[0]+g>>>0,n[1]=n[1]+y>>>0,n[2]=n[2]+v>>>0,n[3]=n[3]+m>>>0,n[4]=n[4]+A>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]})),Rs=Ts;var Cs=Object.freeze({__proto__:null,v1:function(e,t,n){var r=t&&n||0,i=t||new Array(16),o=(e=e||{}).node||us,s=void 0!==e.clockseq?e.clockseq:cs;if(null==o||null==s){var a=e.random||(e.rng||os)();null==o&&(o=us=[1|a[0],a[1],a[2],a[3],a[4],a[5]]),null==s&&(s=cs=16383&(a[6]<<8|a[7]))}var u=void 0!==e.msecs?e.msecs:Date.now(),c=void 0!==e.nsecs?e.nsecs:ps+1,l=u-ds+(c-ps)/1e4;if(l<0&&void 0===e.clockseq&&(s=s+1&16383),(l<0||u>ds)&&void 0===e.nsecs&&(c=0),c>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");ds=u,ps=c,cs=s;var f=(1e4*(268435455&(u+=122192928e5))+c)%4294967296;i[r++]=f>>>24&255,i[r++]=f>>>16&255,i[r++]=f>>>8&255,i[r++]=255&f;var h=u/4294967296*1e4&268435455;i[r++]=h>>>8&255,i[r++]=255&h,i[r++]=h>>>24&15|16,i[r++]=h>>>16&255,i[r++]=s>>>8|128,i[r++]=255&s;for(var d=0;d<6;++d)i[r+d]=o[d];return t||hs(i)},v3:Ss,v4:function(e,t,n){var r=(e=e||{}).random||(e.rng||os)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return hs(r)},v5:Rs,NIL:"00000000-0000-0000-0000-000000000000",version:function(e){if(!as(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)},validate:as,stringify:hs,parse:gs}),Ps=rs,xs=l(Cs).v4,Ls={_data:{},length:0,setItem:function(e,t){return this._data[e]=t,this.length=Ps(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=Ps(this._data).length,null},clear:function(){this._data={},this.length=0},key:function(e){return Ps(this._data)[e]}};Jo.defaultEngine=function(){try{if(!window.localStorage)return!1;var e=xs();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:Ls,Jo.inMemoryEngine=Ls;var Ms=rs,Ds=Object.prototype.toString,Ns="function"==typeof Array.isArray?Array.isArray:function(e){return"[object Array]"===Ds.call(e)},Bs=function(e){return null!=e&&(Ns(e)||"function"!==e&&function(e){var t=typeof e;return"number"===t||"object"===t&&"[object Number]"===Ds.call(e)}(e.length))},Gs=function(e,t){for(var n=0;n<t.length&&!1!==e(t[n],n,t);n+=1);},Us=function(e,t){for(var n=Ms(t),r=0;r<n.length&&!1!==e(t[n[r]],n[r],t);r+=1);},js=function(e,t){return(Bs(t)?Gs:Us).call(this,e,t)},Fs=Jo.defaultEngine,Hs=Jo.inMemoryEngine,zs=js,Ks=rs,Qs=JSON;function Vs(e,t,n,r){this.id=t,this.name=e,this.keys=n||{},this.engine=r||Fs,this.originalEngine=this.engine}Vs.prototype.set=function(e,t){var n=this._createValidKey(e);if(n)try{this.engine.setItem(n,Qs.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))}},Vs.prototype.get=function(e){try{var t=this.engine.getItem(this._createValidKey(e));return null===t?null:Qs.parse(t)}catch(e){return null}},Vs.prototype.getOriginalEngine=function(){return this.originalEngine},Vs.prototype.remove=function(e){this.engine.removeItem(this._createValidKey(e))},Vs.prototype._createValidKey=function(e){var t,n=this.name,r=this.id;return Ks(this.keys).length?(zs((function(i){i===e&&(t=[n,r,e].join("."))}),this.keys),t):[n,r,e].join(".")},Vs.prototype._swapEngine=function(){var e=this;zs((function(t){var n=e.get(t);Hs.setItem([e.name,e.id,t].join("."),n),e.remove(t)}),this.keys),this.engine=Hs};var qs=Vs;var Ws=js,Ys={setTimeout:function(e,t){return window.setTimeout(e,t)},clearTimeout:function(e){return window.clearTimeout(e)},Date:window.Date},Js=Ys,Xs={ASAP:1,RESCHEDULE:2,ABANDON:3};function $s(){this.tasks={},this.nextId=1}$s.prototype.now=function(){return+new Js.Date},$s.prototype.run=function(e,t,n){var r=this.nextId++;return this.tasks[r]=Js.setTimeout(this._handle(r,e,t,n||Xs.ASAP),t),r},$s.prototype.cancel=function(e){this.tasks[e]&&(Js.clearTimeout(this.tasks[e]),delete this.tasks[e])},$s.prototype.cancelAll=function(){Ws(Js.clearTimeout,this.tasks),this.tasks={}},$s.prototype._handle=function(e,t,n,r){var i=this,o=i.now();return function(){if(delete i.tasks[e],!(r>=Xs.RESCHEDULE&&o+2*n<i.now()))return t();r===Xs.RESCHEDULE&&i.run(t,n,r)}},$s.setClock=function(e){Js=e},$s.resetClock=function(){Js=Ys},$s.Modes=Xs;var Zs=$s,ea=ta;function ta(e){return ta.enabled(e)?function(t){t=na(t);var n=new Date,r=n-(ta[e]||n);ta[e]=n,t=e+" "+t+" +"+ta.humanize(r),window.console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}:function(){}}function na(e){return e instanceof Error?e.stack||e.message:e}ta.names=[],ta.skips=[],ta.enable=function(e){try{localStorage.debug=e}catch(e){}for(var t=(e||"").split(/[\s,]+/),n=t.length,r=0;r<n;r++)"-"===(e=t[r].replace("*",".*?"))[0]?ta.skips.push(new RegExp("^"+e.substr(1)+"$")):ta.names.push(new RegExp("^"+e+"$"))},ta.disable=function(){ta.enable("")},ta.humanize=function(e){var t=6e4,n=60*t;return e>=n?(e/n).toFixed(1)+"h":e>=t?(e/t).toFixed(1)+"m":e>=1e3?(e/1e3|0)+"s":e+"ms"},ta.enabled=function(e){for(var t=0,n=ta.skips.length;t<n;t++)if(ta.skips[t].test(e))return!1;for(t=0,n=ta.names.length;t<n;t++)if(ta.names[t].test(e))return!0;return!1};try{window.localStorage&&ta.enable(localStorage.debug)}catch(e){}var ra=Vo.v4,ia=qs,oa=js,sa=Zs,aa=ea("localstorage-retry");function ua(e,t){return function(){return e.apply(t,arguments)}}function ca(e,t,n){"function"==typeof t&&(n=t),this.name=e,this.id=ra(),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 sa,this._processId=0,this._store=new ia(this.name,this.id,this.keys),this._store.set(this.keys.IN_PROGRESS,{}),this._store.set(this.keys.QUEUE,[]),this._ack=ua(this._ack,this),this._checkReclaim=ua(this._checkReclaim,this),this._processHead=ua(this._processHead,this),this._running=!1}(0,f.exports)(ca.prototype),ca.prototype.start=function(){this._running&&this.stop(),this._running=!0,this._ack(),this._checkReclaim(),this._processHead()},ca.prototype.stop=function(){this._schedule.cancelAll(),this._running=!1},ca.prototype.shouldRetry=function(e,t){return!(t>this.maxAttempts)},ca.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))},ca.prototype.addItem=function(e){this._enqueue({item:e,attemptNumber:0,time:this._schedule.now(),id:ra()})},ca.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||ra()}):this.emit("discard",e,t)},ca.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()},ca.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(),o=[];function s(n,r){o.push({item:n.item,done:function(i,o){var s=t.get(e.keys.IN_PROGRESS)||{};delete s[r],t.set(e.keys.IN_PROGRESS,s),e.emit("processed",i,o,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=ra();r[c]={item:u.item,attemptNumber:u.attemptNumber,time:e._schedule.now()},s(u,c)}t.set(this.keys.QUEUE,n),t.set(this.keys.IN_PROGRESS,r),oa((function(t){try{e.fn(t.item,t.done)}catch(e){aa("Process function threw error: "+e)}}),o),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,sa.Modes.ASAP))},ca.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,sa.Modes.ASAP)},ca.prototype._checkReclaim=function(){var e=this;oa((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,sa.Modes.ABANDON))}),e.timeouts.RECLAIM_WAIT,sa.Modes.ABANDON)}(t))}),function(t){for(var n=[],r=e._store.getOriginalEngine(),i=0;i<r.length;i++){var o=r.key(i).split(".");3===o.length&&(o[0]===t&&"ack"===o[2]&&n.push(new ia(t,o[1],e.keys)))}return n}(this.name)),this._schedule.run(this._checkReclaim,this.timeouts.RECLAIM_TIMER,sa.Modes.RESCHEDULE)},ca.prototype._reclaim=function(e){var t=this,n=new ia(this.name,e,this.keys),r={queue:this._store.get(this.keys.QUEUE)||[]},i={inProgress:n.get(this.keys.IN_PROGRESS)||{},queue:n.get(this.keys.QUEUE)||[]},o=[],s=function(e,n){oa((function(e){var i=e.id||ra();o.indexOf(i)>=0?t.emit("duplication",e.item,e.attemptNumber):(r.queue.push({item:e.item,attemptNumber:e.attemptNumber+n,time:t._schedule.now(),id:i}),o.push(i))}),e)};s(i.queue,0),s(i.inProgress,1),r.queue=r.queue.sort((function(e,t){return e.time-t.time})),this._store.set(this.keys.QUEUE,r.queue),n.remove(this.keys.IN_PROGRESS),n.remove(this.keys.QUEUE),n.remove(this.keys.RECLAIM_START),n.remove(this.keys.RECLAIM_END),n.remove(this.keys.ACK),this._processHead()};var la=ca,fa={maxRetryDelay:36e4,minRetryDelay:1e3,backoffFactor:2,maxAttempts:10,maxItems:100},ha=function(){function e(){r(this,e),this.url="",this.writeKey=""}return o(e,[{key:"init",value:function(e,t,n){this.url=t,this.writeKey=e,n&&a(fa,n),this.payloadQueue=new la("rudder",fa,function(e,t){e.message.sentAt=Oo(),this.processQueueElement(e.url,e.headers,e.message,1e4,(function(e,n){if(e)return t(e);t(null,n)}))}.bind(this)),this.payloadQueue.start()}},{key:"processQueueElement",value:function(e,t,n,r,i){try{var o=new XMLHttpRequest;for(var s in o.open("POST",e,!0),t)o.setRequestHeader(s,t[s]);o.timeout=r,o.ontimeout=i,o.onerror=i,o.onreadystatechange=function(){4===o.readyState&&(429===o.status||o.status>=500&&o.status<600?(_o(new Error("request failed with status: ".concat(o.status).concat(o.statusText," for url: ").concat(e))),i(new Error("request failed with status: ".concat(o.status).concat(o.statusText," for url: ").concat(e)))):i(null,o.status))},o.send(JSON.stringify(n,Eo))}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}(),da="queue",pa=64e3,ga=function(){function e(){r(this,e),this.storage=ro,this.maxItems=10,this.flushQueueTimeOut=void 0,this.timeOutActive=!1,this.flushQueueTimeOutInterval=6e5,this.url="",this.writekey="",this.queueName="".concat(da,".").concat(Date.now()),this.send=navigator.sendBeacon&&navigator.sendBeacon.bind(navigator)}return o(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);var r=this.sendQueueDataForBeacon.bind(this);window.addEventListener("unload",r)}},{key:"getQueue",value:function(){return this.storage.get(this.queueName)}},{key:"setQueue",value:function(e){this.storage.set(this.queueName,e)}},{key:"enqueue",value:function(e){var t=this.getQueue()||[];(t=t.slice(-(this.maxItems-1))).push(e);var n=t.slice(0),r={batch:n};JSON.stringify(r,Eo).length>pa&&(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={batch:e},n=JSON.stringify(t,Eo),r=new Blob([n],{type:"text/plain"});try{this.send("".concat(this.url,"?writeKey=").concat(this.writekey),r)||_o(new Error("Unable to queue data to browser's beacon queue"))}catch(e){_o(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}(),ya=function(){function e(){r(this,e),this.queue=void 0}return o(e,[{key:"initialize",value:function(e,t,r){var i={},o=bo(t);r&&r.useBeacon&&navigator.sendBeacon?(r&&r.beaconQueueOptions&&null!=r.beaconQueueOptions&&"object"===n(r.beaconQueueOptions)&&(i=r.beaconQueueOptions),o="".concat(o,"/beacon/v1/batch"),this.queue=new ga):(r&&r.useBeacon&&ot("[EventRepository] sendBeacon feature not available in this browser :: fallback to XHR"),r&&r.queueOptions&&null!=r.queueOptions&&"object"===n(r.queueOptions)&&(i=r.queueOptions),this.queue=new ha),this.queue.init(e,o,i)}},{key:"enqueue",value:function(e,t){var n=e.getElementContent();n.originalTimestamp=n.originalTimestamp||Oo(),n.sentAt=Oo(),JSON.stringify(n,Eo).length>32e3&&at("[EventRepository] enqueue:: message length greater 32 Kb ",n),this.queue.enqueue(n,t)}}]),e}(),va=new ya,ma=function(){return navigator&&navigator.language},Aa=function(){return navigator&&navigator.userAgent};function Ia(e){return decodeURIComponent(atob(e).split("").map((function(e){return"%".concat("00".concat(e.charCodeAt(0).toString(16)).slice(-2))})).join(""))}function Ea(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Ia(e=e.endsWith("..")?e.substr(0,e.length-2):e)}var ba=/^[a-zA-Z0-9\-_.]+$/;function ka(e,t,n,r){var i=function(e,t){return[e,(new Date).getTimezoneOffset(),t].join("*")}(n,r),o=t||0,s=function(e){for(var t=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}(),n=-1,r=0;r<e.length;r++)n=n>>>8^t[255&(n^e.charCodeAt(r))];return(-1^n)>>>0}([i,Math.floor(Date.now()/6e4)-o,e].join("*"));return s.toString(36)}function Oa(e){var t=function(e){var t=e.split("*"),n=t.length%2==0;return t.length<4||!n||1!==Number(t.shift())?null:{checksum:t.shift(),serializedIds:t.join("*")}}(e);if(!t)return null;var n=t.checksum,r=t.serializedIds;return function(e,t){for(var n=Aa(),r=ma(),i=0;i<=1;i+=1)if(ka(e,i,n,r)===t)return!0;return!1}(r,n)?function(e){for(var t={},n=e.split("*"),r=0;r<n.length;r+=2){var i=n[r];if(ba.test(i)){var o=Ea(n[r+1]);t[i]=o}}return t}(r):null}var Sa={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"},wa=function(){function e(){var t=this;if(r(this,e),!window.OneTrust||!window.OnetrustActiveGroups)throw new Error("OneTrust resources are not accessible. Thus all the destinations will be loaded");var n=window.OnetrustActiveGroups.split(","),i=window.OneTrust.GetDomainData().Groups;this.userSetConsentGroupNames=[],i.forEach((function(e){var r=e.CustomGroupId,i=e.GroupName;n.includes(r)&&t.userSetConsentGroupNames.push(i.toUpperCase().trim())}))}return o(e,[{key:"isEnabled",value:function(e){var t=this;try{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.userSetConsentGroupNames.includes(e.toUpperCase().trim())}))}catch(e){return at("Error during onetrust cookie consent management ".concat(e)),!0}}}]),e}(),_a=function(){function e(){r(this,e)}return o(e,null,[{key:"initialize",value:function(e){var t;return null!=e&&null!==(t=e.oneTrust)&&void 0!==t&&t.enabled?new wa:null}}]),e}(),Ta={SDK:{name:"JS",installType:"npm"}},Ra="{{RS_BUGSNAG_API_KEY}}",Ca=["rudder-analytics.min.js"].concat(u(Object.keys(Sa).map((function(e){return"".concat(Sa[e],".min.js")}))));function Pa(e){if(void 0!==window.Bugsnag){if(null===Ra.match(/{{.+}}/)){var t=window.location.hostname;window.rsBugsnagClient=window.Bugsnag.start({apiKey:Ra,appVersion:"2.21.0",metadata:Ta,onError:function(t){try{var n=L(t,"errors.0.stacktrace.0.file");if(!n||"string"!=typeof n)return!1;var r=n.substring(n.lastIndexOf("/")+1);if(!Ca.includes(r))return!1;t.addMetadata("source",{sourceId:e});var i=t.errors[0].errorMessage;return t.context=i,i.includes("error in script loading")&&(t.context="Script load failures"),t.severity="error",!0}catch(e){return!1}},autoTrackSessions:!1,collectUserIp:!1,enabledBreadcrumbTypes:["error","log","user"],maxEvents:100,releaseStage:t&&["localhost","127.0.0.1","[::1]"].includes(t)?"development":"production"})}}}var xa=new(function(){function e(){r(this,e),this.storage=Io,this.timeout=18e5,this.sessionInfo={autoTrack:!0}}return o(e,[{key:"initialize",value:function(e){try{var t;if(this.sessionInfo=this.storage.getSessionInfo()||this.sessionInfo,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&&(st("[Session]:: Provided timeout value 0 will disable the auto session tracking feature."),this.sessionInfo.autoTrack=!1),n>0&&n<1e4&&st('[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){_o(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;at('[Session]:: "sessionId" should at least be "'.concat(10,'" digits long'))}else at('[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:"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}()),La=function(e,t){if(!Array.isArray(e)||!Array.isArray(t))return w(t);var n=w(e);return t.forEach((function(e,t){n[t]=Ma(n[t],e)})),n},Ma=function(e,t){return C(La,e,t)},Da=function(){function e(){r(this,e),this.initialized=!1,this.clientIntegrations=[],this.loadOnlyIntegrations={},this.clientIntegrationObjects=void 0,this.successfullyLoadedIntegration=[],this.failedToBeLoadedIntegration=[],this.toBeProcessedArray=[],this.toBeProcessedByIntegrationArray=[],this.storage=Io,this.eventRepository=va,this.sendAdblockPage=!1,this.sendAdblockPageOptions={},this.clientSuppliedCallbacks={},this.readyCallbacks=[],this.methodToCallbackMapping={syncPixel:"syncPixelCallback"},this.loaded=!1,this.loadIntegration=!0,this.dynamicallyLoadedIntegrations={},this.destSDKBaseURL=lr,this.cookieConsentOptions={},this.logLevel=void 0,this.clientIntegrationsReady=!1,this.uSession=xa}return o(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=Ro();this.storage.setInitialReferrer(e),this.storage.setInitialReferringDomain(Co(e))}}},{key:"allModulesInitialized",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Promise((function(n){e.clientIntegrations.every((function(t){return null!=e.dynamicallyLoadedIntegrations["".concat(Sa[t.name]).concat("_RS")]}))||t>=2e4?n(e):e.pause(1e3).then((function(){return e.allModulesInitialized(t+1e3).then(n)}))}))}},{key:"executeReadyCallback",value:function(){this.readyCallbacks.forEach((function(e){return e()}))}},{key:"integrationSDKLoaded",value:function(e,t){try{return window.hasOwnProperty(e)&&window[e][t]&&void 0!==window[e][t].prototype.constructor}catch(e){return _o(e),!1}}},{key:"processResponse",value:function(e,t){var r,i=this;try{var o=t;try{if("string"==typeof t&&(o=JSON.parse(t)),!o||"object"!==n(o)||Array.isArray(o))throw new Error("Invalid source configuration")}catch(e){return void _o(e)}if(!0===L(o.source.config,"statsCollection.errorReports.enabled")){var s=L(o.source.config,"statsCollection.errorReports.provider")||"bugsnag";fr.includes(s)||at("Invalid error reporting provider value"),"bugsnag"===s&&(r="bugsnag",window.hasOwnProperty(r)||nt(r,"https://d2wy8f7a9ursnm.cloudfront.net/v7/bugsnag.min.js",{isNonNativeSDK:"true"}),function(e){if(!window.hasOwnProperty("rsBugsnagClient"))if(void 0!==window.Bugsnag)Pa(e);else{var t=setInterval((function(){void 0!==window.Bugsnag&&(clearInterval(t),Pa(e))}),100);setTimeout((function(){clearInterval(t)}),1e4)}}(o.source.id))}if(o.source.destinations.forEach((function(e,t){e.enabled&&this.clientIntegrations.push({name:e.destinationDefinition.name,config:e.config})}),this),this.clientIntegrations=Mo(this.loadOnlyIntegrations,this.clientIntegrations),Object.keys(this.cookieConsentOptions).length)try{var a=_a.initialize(this.cookieConsentOptions);this.clientIntegrations=this.clientIntegrations.filter((function(e){return!a||a&&a.isEnabled(e.config)}))}catch(e){_o(e)}var u="";No().isStaging&&(u="-staging"),So("Starting device-mode initialization"),this.clientIntegrations.forEach((function(e){var t=Sa[e.name],n="".concat(t).concat("_RS"),r="".concat(i.destSDKBaseURL,"/").concat(t).concat(u,".min.js");window.hasOwnProperty(n)||nt(n,r,{isNonNativeSDK:!0});var o=i,s=setInterval((function(){if(o.integrationSDKLoaded(n,t)){var r,i=window[n];clearInterval(s);try{So("[Analytics] processResponse :: trying to initialize integration name:: ".concat(n)),(r=new i[t](e.config,o)).init(),o.isInitialized(r).then((function(){o.dynamicallyLoadedIntegrations[n]=i[t]}))}catch(e){e.message="[Analytics] 'integration.init()' failed :: ".concat(n," :: ").concat(e.message),_o(e),o.failedToBeLoadedIntegration.push(r)}}}),100);setTimeout((function(){clearInterval(s)}),1e4)}));var c=this;this.allModulesInitialized().then((function(){if(!c.clientIntegrations||0==c.clientIntegrations.length)return i.clientIntegrationsReady=!0,i.executeReadyCallback(),void(i.toBeProcessedByIntegrationArray=[]);c.replayEvents(c)}))}catch(e){_o(e)}}},{key:"replayEvents",value:function(e){So("Started replaying buffered events"),e.clientIntegrationObjects=[],e.clientIntegrationObjects=e.successfullyLoadedIntegration,e.clientIntegrationObjects.every((function(e){return!e.isReady||e.isReady()}))&&(e.clientIntegrationsReady=!0,e.executeReadyCallback()),e.toBeProcessedByIntegrationArray.forEach((function(t){var n=t[0];t.shift(),Object.keys(t[0].message.integrations).length>0&&Lo(t[0].message.integrations);for(var r=Mo(t[0].message.integrations,e.clientIntegrationObjects),i=0;i<r.length;i+=1)try{if(!r[i].isFailed||!r[i].isFailed())if(r[i][n])if(!e.IsEventBlackListed(t[0].message.event,r[i].name)){var o,s=w(t);(o=r[i])[n].apply(o,u(s))}}catch(e){_o(e)}})),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>=1e4?(t.failedToBeLoadedIntegration.push(e),r(t)):t.pause(1e3).then((function(){return t.isInitialized(e,n+1e3).then(r)}))}))}},{key:"page",value:function(e,t,r,i,o){if(So("Page event"),this.loaded){"function"==typeof i&&(o=i,i=null),"function"==typeof r&&(o=r,i=r=null),"function"==typeof t&&(o=t,i=r=t=null),"object"===n(e)&&null!=e&&null!=e&&(i=t,r=e,t=e=null),"object"===n(t)&&null!=t&&null!=t&&(i=r,r=t,t=null),"string"==typeof e&&"string"!=typeof t&&(t=e,e=null),this.sendAdblockPage&&"RudderJS-Initiated"!=e&&this.sendSampleRequest();var s=(new Qo).setType("page").build();r||(r={}),t&&(s.message.name=r.name=t),e&&(s.message.category=r.category=e),s.message.properties=this.getPageProperties(r),this.processAndSendDataToDestinations("page",s,i,o)}}},{key:"track",value:function(e,t,n,r){if(So("Track event"),this.loaded){"function"==typeof n&&(r=n,n=null),"function"==typeof t&&(r=t,n=null,t=null);var i=(new Qo).setType("track").build();e&&i.setEventName(e),i.setProperty(t||{}),this.processAndSendDataToDestinations("track",i,n,r)}}},{key:"identify",value:function(e,t,r,i){if(So("Identify event"),this.loaded){if("function"==typeof r&&(i=r,r=null),"function"==typeof t&&(i=t,r=null,t=null),"object"===n(e)&&(r=t,t=e,e=this.userId),e&&this.userId&&e!==this.userId&&this.reset(),this.userId=Bo(e),this.storage.setUserId(this.userId),t){for(var o in t)this.userTraits[o]=t[o];this.storage.setUserTraits(this.userTraits)}var s=(new Qo).setType("identify").build();this.processAndSendDataToDestinations("identify",s,r,i)}}},{key:"alias",value:function(e,t,r,i){if(So("Alias event"),this.loaded){"function"==typeof r&&(i=r,r=null),"function"==typeof t&&(i=t,r=null,t=null),"object"===n(t)&&(r=t,t=null);var o=(new Qo).setType("alias").build();o.message.previousId=Bo(t)||(this.userId?this.userId:this.getAnonymousId()),o.message.userId=Bo(e),this.processAndSendDataToDestinations("alias",o,r,i)}}},{key:"group",value:function(e,t,r,i){if(So("Group event"),this.loaded&&arguments.length){"function"==typeof r&&(i=r,r=null),"function"==typeof t&&(i=t,r=null,t=null),"object"===n(e)&&(r=t,t=e,e=this.groupId),this.groupId=Bo(e),this.storage.setGroupId(this.groupId);var o=(new Qo).setType("group").build();if(t)for(var s in t)this.groupTraits[s]=t[s];else this.groupTraits={};this.storage.setGroupTraits(this.groupTraits),this.processAndSendDataToDestinations("group",o,r,i)}}},{key:"IsEventBlackListed",value:function(e,t){if(!e||"string"!=typeof e)return!1;var n=sr[t],r=this.clientIntegrations.find((function(e){return e.name===n})).config,i=r.blacklistedEvents,o=r.whitelistedEvents,s=r.eventFilteringOption;if(!s)return!1;var a=e.trim().toUpperCase();switch(s){case"disable":default:return!1;case"blacklistedEvents":return!!Array.isArray(i)&&void 0!==i.find((function(e){return e.eventName.trim().toUpperCase()===a}));case"whitelistedEvents":return!Array.isArray(o)||void 0===o.find((function(e){return e.eventName.trim().toUpperCase()===a}))}}},{key:"processAndSendDataToDestinations",value:function(e,n,r,i){var o=this;try{this.anonymousId||this.setAnonymousId(),So("Started sending data to destinations"),n.message.context.traits=t({},this.userTraits),n.message.anonymousId=this.anonymousId,n.message.userId=n.message.userId?n.message.userId:this.userId,"group"==e&&(this.groupId&&(n.message.groupId=this.groupId),this.groupTraits&&(n.message.traits=t({},this.groupTraits)));try{var s=this.uSession.getSessionInfo(),a=s.sessionId,u=s.sessionStart;n.message.context.sessionId=a,u&&(n.message.context.sessionStart=!0)}catch(e){_o(e)}this.processOptionsParam(n,r),function(e,t){var n=e.properties,r=e.traits;n&&Object.keys(n).forEach((function(e){ur.indexOf(e.toLowerCase())>=0&&at("Warning! : Reserved keyword used in properties--\x3e ".concat(e," with ").concat(t," call"))})),r&&Object.keys(r).forEach((function(e){ur.indexOf(e.toLowerCase())>=0&&at("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){ur.indexOf(e.toLowerCase())>=0&&at("Warning! : Reserved keyword used in traits --\x3e ".concat(e," with ").concat(t," call"))}))}(n.message,e);var c=n.message.integrations||{All:!0};if(Lo(c),n.message.integrations=c,this.clientIntegrationObjects)Mo(c,this.clientIntegrationObjects).forEach((function(t){try{if(!t.isFailed||!t.isFailed())if(t[e])if(!o.IsEventBlackListed(n.message.event,t.name)){var r=w(n);t[e](r)}}catch(e){e.message="[sendToNative]::[Destination:".concat(t.name,"]:: ").concat(e),_o(e)}}));else this.toBeProcessedByIntegrationArray.push([e,n]);xo(n.message.integrations,ar),this.eventRepository.enqueue(n,e),i&&i()}catch(e){_o(e)}}},{key:"utm",value:function(e){var t;"?"===e.charAt(0)&&(e=e.substring(1)),e=e.replace(/\?/g,"&");var n=m(e),r={};for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&"utm_"===i.substr(0,4)&&("campaign"===(t=i.substr(4))&&(t="name"),r[t]=n[i]);return r}},{key:"addCampaignInfo",value:function(e){var t=e.message.context;if(t&&"object"===n(t)){var r=To().search;e.message.context.campaign=this.utm(r)}}},{key:"processOptionsParam",value:function(e,r){var i=e.message,o=i.type,a=i.properties;this.addCampaignInfo(e),e.message.context.page=this.getContextPageProperties("page"===o?a:void 0);var u=["integrations","anonymousId","originalTimestamp"];for(var c in r)u.includes(c)?e.message[c]=r[c]:"context"!==c?e.message.context=Ma(e.message.context,s({},c,r[c])):"object"===n(r[c])&&null!=r[c]?e.message.context=Ma(e.message.context,t({},r[c])):at("[Analytics: processOptionsParam] context passed in options is not object")}},{key:"getPageProperties",value:function(e,t){var n=To(),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=To(),n={};for(var r in t)n[r]=e&&e[r]?e[r]:t[r];return n}},{key:"reset",value:function(e){So("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))}},{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:"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?Oa(t):null,r=n?n.rs_amp_id:null;this.anonymousId=e||r||ko(),this.storage.setAnonymousId(this.anonymousId)}},{key:"isValidWriteKey",value:function(e){return!(!e||"string"!=typeof e||0==e.trim().length)}},{key:"isValidServerUrl",value:function(e){return!(!e||"string"!=typeof e||0==e.trim().length)}},{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,r,i){var o=this;if(i&&i.logLevel&&(this.logLevel=i.logLevel,it(i.logLevel)),!this.storage||0===Object.keys(this.storage).length)throw Error("Cannot proceed as no storage is available");if(i&&i.cookieConsentManager&&(this.cookieConsentOptions=w(i.cookieConsentManager)),!this.isValidWriteKey(e)||!this.isValidServerUrl(r))throw Error("Unable to load the SDK due to invalid writeKey or serverUrl");var s={};if(i&&i.setCookieDomain&&(s=t(t({},s),{},{domain:i.setCookieDomain})),i&&"boolean"==typeof i.secureCookie&&(s=t(t({},s),{},{secure:i.secureCookie})),i&&hr.includes(i.sameSiteCookie)&&(s=t(t({},s),{},{samesite:i.sameSiteCookie})),this.storage.options(s),i&&i.integrations&&(a(this.loadOnlyIntegrations,i.integrations),Lo(this.loadOnlyIntegrations)),i&&i.sendAdblockPage&&(this.sendAdblockPage=!0),i&&i.sendAdblockPageOptions&&"object"===n(i.sendAdblockPageOptions)&&(this.sendAdblockPageOptions=i.sendAdblockPageOptions),this.uSession.initialize(i),i&&i.clientSuppliedCallbacks){var u={};Object.keys(this.methodToCallbackMapping).forEach((function(e){o.methodToCallbackMapping.hasOwnProperty(e)&&i.clientSuppliedCallbacks[o.methodToCallbackMapping[e]]&&(u[e]=i.clientSuppliedCallbacks[o.methodToCallbackMapping[e]])})),a(this.clientSuppliedCallbacks,u),this.registerCallbacks(!0)}if(i&&null!=i.loadIntegration&&(this.loadIntegration=!!i.loadIntegration),this.eventRepository.initialize(e,r,i),this.initializeUser(i?i.anonymousIdOptions:void 0),this.setInitialPageProperties(),this.loaded=!0,i&&i.destSDKBaseURL){if(this.destSDKBaseURL=bo(i.destSDKBaseURL),!this.destSDKBaseURL)throw _o({message:"[Analytics] load:: CDN base URL is not valid"}),Error("failed to load")}else{var c=No().sdkURL;c&&(this.destSDKBaseURL=c.split("/").slice(0,-1).concat("js-integrations").join("/"))}if(i&&i.getSourceConfig)if("function"!=typeof i.getSourceConfig)_o(new Error('option "getSourceConfig" must be a function'));else{var l=i.getSourceConfig();l instanceof Promise?l.then((function(e){return o.processResponse(200,e)})).catch(_o):this.processResponse(200,l),Ba(this)}else{var f=function(e){return cr.concat(cr.includes("?")?"&":"?").concat(e?"writeKey=".concat(e):"")}(e);i&&i.configUrl&&(f=function(e,t){var n=e;-1===n.indexOf("sourceConfig")&&(n="".concat(bo(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)}(i.configUrl,f));try{!function(e,t,n,r){var i=r.bind(e),o=new XMLHttpRequest;o.open("GET",t,!0),o.setRequestHeader("Authorization","Basic ".concat(btoa("".concat(n,":")))),o.onload=function(){var e=o.status;200==e?i(200,o.responseText):(_o(new Error("request failed with status: ".concat(o.status," for url: ").concat(t))),i(e))},o.send()}(this,f,e,this.processResponse)}catch(e){_o(e)}Ba(this)}}},{key:"load",value:function(e,t,n){if(!this.loaded)if(String.prototype.endsWith&&String.prototype.startsWith&&String.prototype.includes&&Array.prototype.find&&Array.prototype.includes&&Promise&&Object.entries&&Object.values&&String.prototype.replaceAll&&this.isDatasetAvailable())this.loadAfterPolyfill(e,t,n);else{var r="polyfill";nt(r,"https://polyfill.io/v3/polyfill.min.js?features=Array.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 i=this,o=setInterval((function(){(window.hasOwnProperty(r)||null!==document.getElementById(r))&&(clearInterval(o),i.loadAfterPolyfill(e,t,n))}),100);setTimeout((function(){clearInterval(o)}),1e4)}}},{key:"ready",value:function(e){this.loaded&&("function"!=typeof e?at("ready callback is not a function"):this.clientIntegrationsReady?e():this.readyCallbacks.push(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(){nt("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()}}]),e}(),Na=new Da;function Ba(e){if(e.toBeProcessedArray.length)for(;e.toBeProcessedArray.length>0;){var t=u(e.toBeProcessedArray[0]);e.toBeProcessedArray.shift();var n=t[0];t.shift(),e[n].apply(e,u(t))}}d(Na),window.addEventListener("error",(function(e){_o(e,Na)}),!0),Na.initializeCallbacks(),Na.registerCallbacks(!1);var Ga,Ua=window.rudderanalytics,ja=Array.isArray(Ua);if(ja)for(var Fa=0;Fa<Ua.length;){if(Ua[Fa]&&"load"===Ua[Fa][0]){Ga=Ua[Fa],Ua.splice(Fa,1);break}Fa+=1}!function(e){var t="ajs_trait_",n="ajs_prop_";function r(e,t){var n={};return Object.keys(e).forEach((function(r){r.startsWith(t)&&(n[r.substr(t.length)]=e[r])})),n}var i=m(e);i.ajs_aid&&Na.toBeProcessedArray.push(["setAnonymousId",i.ajs_aid]),i.ajs_uid&&Na.toBeProcessedArray.push(["identify",i.ajs_uid,r(i,t)]),i.ajs_event&&Na.toBeProcessedArray.push(["track",i.ajs_event,r(i,n)])}(window.location.search),ja&&Ua.forEach((function(e){return Na.toBeProcessedArray.push(e)})),Ga&&Ga.length&&(Ga.shift(),Na.load.apply(Na,u(Ga)));var Ha=Na.ready.bind(Na),za=Na.identify.bind(Na),Ka=Na.page.bind(Na),Qa=Na.track.bind(Na),Va=Na.alias.bind(Na),qa=Na.group.bind(Na),Wa=Na.reset.bind(Na),Ya=Na.load.bind(Na),Ja=Na.initialized=!0,Xa=Na.getUserId.bind(Na),$a=Na.getUserTraits.bind(Na),Za=Na.getAnonymousId.bind(Na),eu=Na.setAnonymousId.bind(Na),tu=Na.getGroupId.bind(Na),nu=Na.getGroupTraits.bind(Na),ru=Na.startSession.bind(Na),iu=Na.endSession.bind(Na);export{Va as alias,iu as endSession,Za as getAnonymousId,tu as getGroupId,nu as getGroupTraits,Xa as getUserId,$a as getUserTraits,qa as group,za as identify,Ja as initialized,Ya as load,Ka as page,Ha as ready,Wa as reset,eu as setAnonymousId,ru as startSession,Qa as track};
|
1
|
+
function e(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 t(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?e(Object(r),!0).forEach((function(e){s(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):e(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function n(e){return n="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},n(e)}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,l(r.key),r)}}function o(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function s(e,t,n){return(t=l(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(){return a=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},a.apply(this,arguments)}function u(e){return function(e){if(Array.isArray(e))return c(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)return;if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(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 c(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 l(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,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function f(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];n.push.apply(n,arguments);var r=Function.bind.apply(t,n);return new r}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}var h={},d={get exports(){return h},set exports(e){h=e}};!function(e){function t(e){if(e)return function(e){for(var n in t.prototype)e[n]=t.prototype[n];return e}(e)}d.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}}();var p,g=h,y={},v={get exports(){return y},set exports(e){y=e}};p=y,(p=v.exports=function(e){return e.trim?e.trim():p.right(p.left(e))}).left=function(e){return e.trimLeft?e.trimLeft():e.replace(/^\s\s*/,"")},p.right=function(e){if(e.trimRight)return e.trimRight();for(var t=/\s/,n=e.length;t.test(e.charAt(--n)););return e.slice(0,n+1)};var m=y,A=/(\w+)\[(\d+)\]/,I=function(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}},E=function(e){if("string"!=typeof e)return{};if(""==(e=m(e)))return{};"?"==e.charAt(0)&&(e=e.slice(1));for(var t={},n=e.split("&"),r=0;r<n.length;r++){var i,o=n[r].split("="),s=I(o[0]);(i=A.exec(s))?(t[i[1]]=t[i[1]]||[],t[i[1]][i[2]]=I(o[1])):t[o[0]]=null==o[1]?"":I(o[1])}return t};function b(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]}function k(e){return function t(n){return 0===arguments.length||b(n)?t:e.apply(this,arguments)}}function O(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return b(n)?t:k((function(t){return e(n,t)}));default:return b(n)&&b(r)?t:b(n)?k((function(t){return e(t,r)})):b(r)?k((function(t){return e(n,t)})):e(n,r)}}}function S(e){return function t(n,r,i){switch(arguments.length){case 0:return t;case 1:return b(n)?t:O((function(t,r){return e(n,t,r)}));case 2:return b(n)&&b(r)?t:b(n)?O((function(t,n){return e(t,r,n)})):b(r)?O((function(t,r){return e(n,t,r)})):k((function(t){return e(n,r,t)}));default:return b(n)&&b(r)&&b(i)?t:b(n)&&b(r)?O((function(t,n){return e(t,n,i)})):b(n)&&b(i)?O((function(t,n){return e(t,r,n)})):b(r)&&b(i)?O((function(t,r){return e(n,t,r)})):b(n)?k((function(t){return e(t,r,i)})):b(r)?k((function(t){return e(n,t,i)})):b(i)?k((function(t){return e(n,r,t)})):e(n,r,i)}}}function w(e,t){return Object.prototype.hasOwnProperty.call(t,e)}var T=k((function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}));function _(e,t,n,r){var i=function(i){for(var o=t.length,s=0;s<o;){if(e===t[s])return n[s];s+=1}for(var a in t[s]=e,n[s]=i,e)e.hasOwnProperty(a)&&(i[a]=r?_(e[a],t,n,!0):e[a]);return i};switch(T(e)){case"Object":return i(Object.create(Object.getPrototypeOf(e)));case"Array":return i([]);case"Date":return new Date(e.valueOf());case"RegExp":return function(e){return new RegExp(e.source,(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.sticky?"y":"")+(e.unicode?"u":""))}(e);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 R=k((function(e){return null!=e&&"function"==typeof e.clone?e.clone():_(e,[],[],!0)}));function C(e){return"[object Object]"===Object.prototype.toString.call(e)}var P=S((function(e,t,n){var r,i={};for(r in t)w(r,t)&&(i[r]=w(r,n)?e(r,t[r],n[r]):t[r]);for(r in n)w(r,n)&&!w(r,i)&&(i[r]=n[r]);return i})),L=S((function e(t,n,r){return P((function(n,r,i){return C(r)&&C(i)?e(t,r,i):t(n,r,i)}),n,r)})),x=S((function(e,t,n){return L((function(t,n,r){return e(n,r)}),t,n)})),M={};!function(e){function t(e){switch(e){case"http:":return 80;case"https:":return 443;default:return location.port}}e.parse=function(e){var n=document.createElement("a");return n.href=e,{href:n.href,host:n.host||location.host,port:"0"===n.port||""===n.port?t(n.protocol):n.port,hash:n.hash,hostname:n.hostname||location.hostname,pathname:"/"!=n.pathname.charAt(0)?"/"+n.pathname:n.pathname,protocol:n.protocol&&":"!=n.protocol?n.protocol:location.protocol,search:n.search,query:n.search.slice(1)}},e.isAbsolute=function(e){return 0==e.indexOf("//")||!!~e.indexOf("://")},e.isRelative=function(t){return!e.isAbsolute(t)},e.isCrossDomain=function(t){t=e.parse(t);var n=e.parse(window.location.href);return t.hostname!==n.hostname||t.port!==n.port||t.protocol!==n.protocol}}(M);const D=function(e){return null!=e&&"object"==typeof e&&!1===Array.isArray(e)};var N=function(e,t,n){if(D(n)||(n={default:n}),!U(e))return void 0!==n.default?n.default:e;"number"==typeof t&&(t=String(t));const r=Array.isArray(t),i="string"==typeof t,o=n.separator||".",s=n.joinChar||("string"==typeof o?o:".");if(!i&&!r)return e;if(i&&t in e)return G(t,e,n)?e[t]:n.default;let a=r?t:function(e,t,n){if("function"==typeof n.split)return n.split(e);return e.split(t)}(t,o,n),u=a.length,c=0;do{let t=a[c];for("number"==typeof t&&(t=String(t));t&&"\\"===t.slice(-1);)t=B([t.slice(0,-1),a[++c]||""],s,n);if(t in e){if(!G(t,e,n))return n.default;e=e[t]}else{let r=!1,i=c+1;for(;i<u;)if(t=B([t,a[i++]],s,n),r=t in e){if(!G(t,e,n))return n.default;e=e[t],c=i-1;break}if(!r)return n.default}}while(++c<u&&U(e));return c===u?e:n.default};function B(e,t,n){return"function"==typeof n.join?n.join(e):e[0]+t+e[1]}function G(e,t,n){return"function"!=typeof n.isValid||n.isValid(e,t)}function U(e){return D(e)||Array.isArray(e)||"function"==typeof e}for(var j,F=256,H=[];F--;)H[F]=(F+256).toString(16).substring(1);var z,K,Q,V,q,W,Y,J,X,$,Z,ee,te,ne,re,ie,oe,se,ae,ue,ce,le,fe,he,de,pe,ge,ye,ve,me,Ae,Ie,Ee,be,ke,Oe,Se,we,Te,_e,Re,Ce,Pe,Le,xe,Me,De,Ne,Be,Ge,Ue,je,Fe,He,ze,Ke,Qe,Ve,qe,We,Ye,Je,Xe,$e,Ze,et,tt,nt,rt,it,ot,st,at=4,ut=function(e){switch(e.toUpperCase()){case"INFO":at=1;break;case"DEBUG":at=2;break;case"WARN":at=3;break;default:at=4}},ct=function(){var e;at<=1&&(e=console).info.apply(e,arguments)},lt=function(){var e;at<=2&&(e=console).log.apply(e,arguments)},ft=function(){var e;at<=3&&(e=console).warn.apply(e,arguments)},ht=function(){var e;at<=4&&(e=console).error.apply(e,arguments)},dt="ADOBE_ANALYTICS",pt=(z={"Adobe Analytics":dt,ADOBEANALYTICS:dt,"ADOBE ANALYTICS":dt},s(z,dt,dt),s(z,"AdobeAnalytics",dt),s(z,"adobeanalytics",dt),s(z,"adobe analytics",dt),s(z,"Adobe analytics",dt),s(z,"adobe Analytics",dt),z),gt=(K={},s(K,"AM","AM"),s(K,"AMPLITUDE","AM"),s(K,"Amplitude","AM"),s(K,"am","AM"),K),yt=(Q={},s(Q,"APPCUES","APPCUES"),s(Q,"Appcues","APPCUES"),s(Q,"App Cues","APPCUES"),s(Q,"appcues","APPCUES"),Q),vt=(V={},s(V,"BINGADS","BINGADS"),s(V,"BingAds","BINGADS"),s(V,"bingads","BINGADS"),s(V,"Bing Ads","BINGADS"),s(V,"Bing ads","BINGADS"),s(V,"bing Ads","BINGADS"),s(V,"bing ads","BINGADS"),V),mt=(q={},s(q,"BRAZE","BRAZE"),s(q,"Braze","BRAZE"),s(q,"braze","BRAZE"),q),At=(W={},s(W,"BUGSNAG","BUGSNAG"),s(W,"bugsnag","BUGSNAG"),s(W,"Bugsnag","BUGSNAG"),W),It="CHARTBEAT",Et=(Y={},s(Y,It,It),s(Y,"Chartbeat",It),s(Y,"chartbeat",It),s(Y,"Chart Beat",It),s(Y,"chart beat",It),Y),bt="CLEVERTAP",kt=(J={},s(J,bt,bt),s(J,"Clevertap",bt),s(J,"clevertap",bt),J),Ot="COMSCORE",St=(X={},s(X,Ot,Ot),s(X,"Comscore",Ot),s(X,"Com Score",Ot),s(X,"com Score",Ot),s(X,"com score",Ot),s(X,"Com score",Ot),X),wt=($={},s($,"CRITEO","CRITEO"),s($,"Criteo","CRITEO"),s($,"criteo","CRITEO"),$),Tt="CUSTOMERIO",_t=(Z={},s(Z,Tt,Tt),s(Z,"Customerio",Tt),s(Z,"Customer.io",Tt),s(Z,"CUSTOMER.IO",Tt),s(Z,"customer.io",Tt),Z),Rt=(ee={},s(ee,"DRIP","DRIP"),s(ee,"Drip","DRIP"),s(ee,"drip","DRIP"),ee),Ct="FACEBOOK_PIXEL",Pt=(s(te={},Ct,Ct),s(te,"FB Pixel",Ct),s(te,"Facebook Pixel",Ct),s(te,"facebook pixel",Ct),s(te,"fbpixel",Ct),s(te,"FBPIXEL",Ct),s(te,"FB_PIXEL",Ct),te),Lt="FULLSTORY",xt=(s(ne={},Lt,Lt),s(ne,"Fullstory",Lt),s(ne,"FullStory",Lt),s(ne,"full Story",Lt),s(ne,"Full Story",Lt),s(ne,"Full story",Lt),s(ne,"full story",Lt),s(ne,"fullstory",Lt),ne),Mt=(s(re={},"GA","GA"),s(re,"Google Analytics","GA"),s(re,"GoogleAnalytics","GA"),s(re,"GOOGLE ANALYTICS","GA"),s(re,"google analytics","GA"),re),Dt=(s(ie={},"GA4","GA4"),s(ie,"Google Analytics 4","GA4"),s(ie,"Google analytics 4","GA4"),s(ie,"google analytics 4","GA4"),s(ie,"Google Analytics4","GA4"),s(ie,"Google analytics4","GA4"),s(ie,"google analytics4","GA4"),s(ie,"GoogleAnalytics4","GA4"),ie),Nt="GOOGLEADS",Bt=(s(oe={},Nt,Nt),s(oe,"Google Ads",Nt),s(oe,"GoogleAds",Nt),s(oe,"GOOGLE ADS",Nt),s(oe,"google ads",Nt),s(oe,"googleads",Nt),oe),Gt="GOOGLE_OPTIMIZE",Ut=(s(se={},Gt,Gt),s(se,"Google Optimize",Gt),s(se,"GoogleOptimize",Gt),s(se,"Googleoptimize",Gt),s(se,"GOOGLEOPTIMIZE",Gt),s(se,"google optimize",Gt),s(se,"Google optimize",Gt),s(se,"GOOGLE OPTIMIZE",Gt),se),jt=(s(ae={},"GTM","GTM"),s(ae,"Google Tag Manager","GTM"),s(ae,"google tag manager","GTM"),s(ae,"googletag manager","GTM"),s(ae,"googletagmanager","GTM"),ae),Ft=(s(ue={},"HEAP","HEAP"),s(ue,"Heap","HEAP"),s(ue,"heap","HEAP"),s(ue,"Heap.io","HEAP"),ue),Ht=(s(ce={},"HOTJAR","HOTJAR"),s(ce,"Hotjar","HOTJAR"),s(ce,"hotjar","HOTJAR"),s(ce,"Hot Jar","HOTJAR"),s(ce,"hot jar","HOTJAR"),ce),zt=(s(le={},"HS","HS"),s(le,"Hubspot","HS"),s(le,"HUBSPOT","HS"),s(le,"hub spot","HS"),s(le,"Hub Spot","HS"),s(le,"Hub spot","HS"),le),Kt=(s(fe={},"INTERCOM","INTERCOM"),s(fe,"Intercom","INTERCOM"),s(fe,"intercom","INTERCOM"),fe),Qt=(s(he={},"KEEN","KEEN"),s(he,"Keen","KEEN"),s(he,"Keen.io","KEEN"),s(he,"keen","KEEN"),s(he,"keen.io","KEEN"),he),Vt="KISSMETRICS",qt=(s(de={},Vt,Vt),s(de,"Kissmetrics",Vt),s(de,"kissmetrics",Vt),de),Wt=(s(pe={},"KLAVIYO","KLAVIYO"),s(pe,"Klaviyo","KLAVIYO"),s(pe,"klaviyo","KLAVIYO"),pe),Yt="LAUNCHDARKLY",Jt=(s(ge={},Yt,Yt),s(ge,"LaunchDarkly",Yt),s(ge,"Launch_Darkly",Yt),s(ge,"Launch Darkly",Yt),s(ge,"launchDarkly",Yt),s(ge,"launch darkly",Yt),ge),Xt="LINKEDIN_INSIGHT_TAG",$t=(s(ye={},Xt,Xt),s(ye,"LinkedIn Insight Tag",Xt),s(ye,"LinkedIn insight tag",Xt),s(ye,"linkedIn insight tag",Xt),s(ye,"Linkedin_insight_tag",Xt),s(ye,"LinkedinInsighttag",Xt),s(ye,"LinkedinInsightTag",Xt),s(ye,"LinkedInInsightTag",Xt),s(ye,"Linkedininsighttag",Xt),s(ye,"LINKEDININSIGHTTAG",Xt),s(ye,"linkedininsighttag",Xt),ye),Zt=(s(ve={},"LOTAME","LOTAME"),s(ve,"Lotame","LOTAME"),s(ve,"lotame","LOTAME"),ve),en=(s(me={},"LYTICS","LYTICS"),s(me,"Lytics","LYTICS"),s(me,"lytics","LYTICS"),me),tn=(s(Ae={},"MP","MP"),s(Ae,"MIXPANEL","MP"),s(Ae,"Mixpanel","MP"),s(Ae,"MIX PANEL","MP"),s(Ae,"Mix panel","MP"),s(Ae,"Mix Panel","MP"),Ae),nn="MOENGAGE",rn=(s(Ie={},nn,nn),s(Ie,"MoEngage",nn),s(Ie,"moengage",nn),s(Ie,"Moengage",nn),s(Ie,"Mo Engage",nn),s(Ie,"mo engage",nn),s(Ie,"Mo engage",nn),Ie),on="OPTIMIZELY",sn=(s(Ee={},on,on),s(Ee,"Optimizely",on),s(Ee,"optimizely",on),Ee),an=(s(be={},"PENDO","PENDO"),s(be,"Pendo","PENDO"),s(be,"pendo","PENDO"),be),un="PINTEREST_TAG",cn=(s(ke={},un,un),s(ke,"PinterestTag",un),s(ke,"Pinterest_Tag",un),s(ke,"PINTERESTTAG",un),s(ke,"pinterest",un),s(ke,"PinterestAds",un),s(ke,"Pinterest_Ads",un),s(ke,"Pinterest",un),s(ke,"Pinterest Tag",un),s(ke,"Pinterest tag",un),s(ke,"PINTEREST TAG",un),s(ke,"pinterest tag",un),s(ke,"Pinterest Ads",un),s(ke,"Pinterest ads",un),ke),ln="POST_AFFILIATE_PRO",fn=(s(Oe={},ln,ln),s(Oe,"PostAffiliatePro",ln),s(Oe,"Post_affiliate_pro",ln),s(Oe,"Post Affiliate Pro",ln),s(Oe,"Post affiliate pro",ln),s(Oe,"post affiliate pro",ln),s(Oe,"postaffiliatepro",ln),s(Oe,"POSTAFFILIATEPRO",ln),Oe),hn="POSTHOG",dn=(s(Se={},hn,hn),s(Se,"PostHog",hn),s(Se,"Posthog",hn),s(Se,"posthog",hn),s(Se,"Post Hog",hn),s(Se,"Post hog",hn),s(Se,"post hog",hn),Se),pn="PROFITWELL",gn=(s(we={},pn,pn),s(we,"ProfitWell",pn),s(we,"profitwell",pn),s(we,"Profitwell",pn),s(we,"Profit Well",pn),s(we,"profit well",pn),s(we,"Profit well",pn),we),yn="QUALTRICS",vn=(s(Te={},yn,yn),s(Te,"Qualtrics",yn),s(Te,"qualtrics",yn),Te),mn="QUANTUMMETRIC",An=(s(_e={},mn,mn),s(_e,"Quantum Metric",mn),s(_e,"quantum Metric",mn),s(_e,"quantum metric",mn),s(_e,"QuantumMetric",mn),s(_e,"quantumMetric",mn),s(_e,"quantummetric",mn),s(_e,"Quantum_Metric",mn),_e),In="REDDIT_PIXEL",En=(s(Re={},In,In),s(Re,"Reddit_Pixel",In),s(Re,"RedditPixel",In),s(Re,"REDDITPIXEL",In),s(Re,"redditpixel",In),s(Re,"Reddit Pixel",In),s(Re,"REDDIT PIXEL",In),s(Re,"reddit pixel",In),Re),bn=(s(Ce={},"SENTRY","SENTRY"),s(Ce,"sentry","SENTRY"),s(Ce,"Sentry","SENTRY"),Ce),kn="SNAP_PIXEL",On=(s(Pe={},kn,kn),s(Pe,"Snap_Pixel",kn),s(Pe,"SnapPixel",kn),s(Pe,"SNAPPIXEL",kn),s(Pe,"snappixel",kn),s(Pe,"Snap Pixel",kn),s(Pe,"SNAP PIXEL",kn),s(Pe,"snap pixel",kn),Pe),Sn="TVSQUARED",wn=(s(Le={},Sn,Sn),s(Le,"TVSquared",Sn),s(Le,"tvsquared",Sn),s(Le,"tvSquared",Sn),s(Le,"TvSquared",Sn),s(Le,"Tvsquared",Sn),s(Le,"TV Squared",Sn),s(Le,"tv squared",Sn),s(Le,"tv Squared",Sn),Le),Tn=(s(xe={},"VWO","VWO"),s(xe,"VisualWebsiteOptimizer","VWO"),s(xe,"Visualwebsiteoptimizer","VWO"),s(xe,"visualwebsiteoptimizer","VWO"),s(xe,"vwo","VWO"),s(xe,"Visual Website Optimizer","VWO"),s(xe,"Visual website optimizer","VWO"),s(xe,"visual website optimizer","VWO"),xe),_n=(s(Me={},"GA360","GA360"),s(Me,"Google Analytics 360","GA360"),s(Me,"Google analytics 360","GA360"),s(Me,"google analytics 360","GA360"),s(Me,"Google Analytics360","GA360"),s(Me,"Google analytics360","GA360"),s(Me,"google analytics360","GA360"),s(Me,"GoogleAnalytics360","GA360"),s(Me,"GA 360","GA360"),Me),Rn=(s(De={},"ADROLL","ADROLL"),s(De,"Adroll","ADROLL"),s(De,"Ad roll","ADROLL"),s(De,"ad roll","ADROLL"),s(De,"adroll","ADROLL"),De),Cn="DCM_FLOODLIGHT",Pn=(s(Ne={},Cn,Cn),s(Ne,"DCM Floodlight",Cn),s(Ne,"dcm floodlight",Cn),s(Ne,"Dcm Floodlight",Cn),s(Ne,"DCMFloodlight",Cn),s(Ne,"dcmfloodlight",Cn),s(Ne,"DcmFloodlight",Cn),s(Ne,"dcm_floodlight",Cn),s(Ne,"DCM_Floodlight",Cn),Ne),Ln=(s(Be={},"MATOMO","MATOMO"),s(Be,"Matomo","MATOMO"),s(Be,"matomo","MATOMO"),Be),xn=(s(Ge={},"VERO","VERO"),s(Ge,"Vero","VERO"),s(Ge,"vero","VERO"),Ge),Mn="MOUSEFLOW",Dn=(s(Ue={},Mn,Mn),s(Ue,"Mouseflow",Mn),s(Ue,"mouseflow",Mn),s(Ue,"mouseFlow",Mn),s(Ue,"MouseFlow",Mn),s(Ue,"Mouse flow",Mn),s(Ue,"mouse flow",Mn),s(Ue,"mouse Flow",Mn),s(Ue,"Mouse Flow",Mn),Ue),Nn="ROCKERBOX",Bn=(s(je={},Nn,Nn),s(je,"Rockerbox",Nn),s(je,"rockerbox",Nn),s(je,"RockerBox",Nn),s(je,"Rocker box",Nn),s(je,"rocker box",Nn),s(je,"Rocker Box",Nn),je),Gn="CONVERTFLOW",Un=(s(Fe={},Gn,Gn),s(Fe,"Convertflow",Gn),s(Fe,"convertflow",Gn),s(Fe,"convertFlow",Gn),s(Fe,"ConvertFlow",Gn),s(Fe,"Convert flow",Gn),s(Fe,"convert flow",Gn),s(Fe,"convert Flow",Gn),s(Fe,"Convert Flow",Gn),s(Fe,"CONVERT FLOW",Gn),Fe),jn="SNAPENGAGE",Fn=(s(He={},jn,jn),s(He,"SnapEngage",jn),s(He,"Snap_Engage",jn),s(He,"snapengage",jn),s(He,"SNAP ENGAGE",jn),s(He,"Snap Engage",jn),s(He,"snap engage",jn),He),Hn="LIVECHAT",zn=(s(ze={},Hn,Hn),s(ze,"LiveChat",Hn),s(ze,"Live_Chat",Hn),s(ze,"livechat",Hn),s(ze,"LIVE CHAT",Hn),s(ze,"Live Chat",Hn),s(ze,"live chat",Hn),ze),Kn="SHYNET",Qn=(s(Ke={},Kn,Kn),s(Ke,"shynet",Kn),s(Ke,"ShyNet",Kn),s(Ke,"shyNet",Kn),s(Ke,"Shynet",Kn),s(Ke,"shy net",Kn),s(Ke,"Shy Net",Kn),s(Ke,"shy Net",Kn),s(Ke,"Shy net",Kn),Ke),Vn=(s(Qe={},"WOOPRA","WOOPRA"),s(Qe,"Woopra","WOOPRA"),s(Qe,"woopra","WOOPRA"),Qe),qn="ROLLBAR",Wn=(s(Ve={},qn,qn),s(Ve,"RollBar",qn),s(Ve,"Roll_Bar",qn),s(Ve,"rollbar",qn),s(Ve,"Rollbar",qn),s(Ve,"ROLL BAR",qn),s(Ve,"Roll Bar",qn),s(Ve,"roll bar",qn),Ve),Yn="QUORA_PIXEL",Jn=(s(qe={},Yn,Yn),s(qe,"Quora Pixel",Yn),s(qe,"Quora pixel",Yn),s(qe,"QUORA PIXEL",Yn),s(qe,"QuoraPixel",Yn),s(qe,"Quorapixel",Yn),s(qe,"QUORAPIXEL",Yn),s(qe,"Quora_Pixel",Yn),s(qe,"quora_pixel",Yn),s(qe,"Quora",Yn),qe),Xn=(s(We={},"JUNE","JUNE"),s(We,"June","JUNE"),s(We,"june","JUNE"),We),$n=(s(Ye={},"ENGAGE","ENGAGE"),s(Ye,"Engage","ENGAGE"),s(Ye,"engage","ENGAGE"),Ye),Zn=(s(Je={},"ITERABLE","ITERABLE"),s(Je,"Iterable","ITERABLE"),s(Je,"iterable","ITERABLE"),Je),er="YANDEX_METRICA",tr=(s(Xe={},er,er),s(Xe,"Yandexmetrica",er),s(Xe,"yandexmetrica",er),s(Xe,"yandexMetrica",er),s(Xe,"YandexMetrica",er),Xe),nr=(s($e={},"REFINER","REFINER"),s($e,"Refiner","REFINER"),s($e,"refiner","REFINER"),$e),rr=(s(Ze={},"QUALAROO","QUALAROO"),s(Ze,"Qualaroo","QUALAROO"),s(Ze,"qualaroo","QUALAROO"),Ze),ir="PODSIGHTS",or=(s(et={},ir,ir),s(et,"Podsights",ir),s(et,"PodSights",ir),s(et,"pod Sights",ir),s(et,"Pod Sights",ir),s(et,"pod sights",ir),s(et,"POD SIGHTS",ir),s(et,"Pod sights",ir),et),sr=(s(tt={},"AXEPTIO","AXEPTIO"),s(tt,"Axeptio","AXEPTIO"),s(tt,"axeptio","AXEPTIO"),tt),ar="SATISMETER",ur=(s(nt={},ar,ar),s(nt,"Satismeter",ar),s(nt,"SatisMeter",ar),s(nt,"SATISMETER",ar),nt),cr="MICROSOFT_CLARITY",lr=(s(rt={},cr,cr),s(rt,"Microsoft Clarity",cr),s(rt,"Microsoft clarity",cr),s(rt,"microsoft clarity",cr),s(rt,"Microsoft_clarity",cr),s(rt,"MicrosoftClarity",cr),s(rt,"MICROSOFTCLARITY",cr),s(rt,"microsoftclarity",cr),s(rt,"microsoftClarity",cr),rt),fr="SENDINBLUE",hr=(s(it={},fr,fr),s(it,"Sendinblue",fr),s(it,"sendinblue",fr),s(it,"SendinBlue",fr),it),dr=(s(ot={},"OLARK","OLARK"),s(ot,"Olark","OLARK"),s(ot,"olark","OLARK"),ot),pr=t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t(t({All:"All"},pt),gt),yt),vt),mt),At),Et),kt),St),wt),_t),Rt),Pt),xt),Mt),Dt),_n),Bt),Ut),jt),Ft),Ht),zt),Kt),Qt),qt),Wt),Jt),$t),Zt),en),tn),rn),sn),an),cn),fn),dn),gn),vn),An),En),bn),On),wn),Tn),Rn),Pn),Ln),xn),Dn),Un),Fn),zn),Qn),Vn),Wn),Jn),Xn),$n),Zn),Bn),tr),nr),rr),or),sr),ur),lr),hr),dr),gr={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"},yr=["anonymous_id","id","sent_at","received_at","timestamp","original_timestamp","event_text","event"],vr="https://api.rudderlabs.com/sourceConfig/?p=npm&v=2.22.0",mr="".concat("https://cdn.rudderlabs.com","/").concat("v1.1","/").concat("js-integrations"),Ar=["bugsnag"],Ir=["Lax","None","Strict"],Er={},br={},kr={get exports(){return br},set exports(e){br=e}};function Or(){return st||(st=1,kr.exports=(e=e||function(e,t){var n=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),r={},i=r.lib={},o=i.Base={extend:function(e){var t=n(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)}},s=i.WordArray=o.extend({init:function(e,n){e=this.words=e||[],this.sigBytes=n!=t?n:4*e.length},toString:function(e){return(e||u).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,i=e.sigBytes;if(this.clamp(),r%4)for(var o=0;o<i;o++){var s=n[o>>>2]>>>24-o%4*8&255;t[r+o>>>2]|=s<<24-(r+o)%4*8}else for(o=0;o<i;o+=4)t[r+o>>>2]=n[o>>>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=o.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n,r=[],i=function(t){var n=987654321,r=4294967295;return function(){var i=((n=36969*(65535&n)+(n>>16)&r)<<16)+(t=18e3*(65535&t)+(t>>16)&r)&r;return i/=4294967296,(i+=.5)*(e.random()>.5?1:-1)}},o=0;o<t;o+=4){var a=i(4294967296*(n||e.random()));n=987654071*a(),r.push(4294967296*a()|0)}return new s.init(r,t)}}),a=r.enc={},u=a.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var o=t[i>>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new s.init(n,t/2)}},c=a.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var o=t[i>>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new s.init(n,t)}},l=a.Utf8={stringify:function(e){try{return decodeURIComponent(escape(c.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return c.parse(unescape(encodeURIComponent(e)))}},f=i.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new s.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=l.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,r=n.words,i=n.sigBytes,o=this.blockSize,a=i/(4*o),u=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*o,c=e.min(4*u,i);if(u){for(var l=0;l<u;l+=o)this._doProcessBlock(r,l);var f=r.splice(0,u);n.sigBytes-=c}return new s.init(f,c)},clone:function(){var e=o.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});i.Hasher=f.extend({cfg:o.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){f.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 h.HMAC.init(e,n).finalize(t)}}});var h=r.algo={};return r}(Math),e)),br;var e}var Sr,wr={},Tr={get exports(){return wr},set exports(e){wr=e}};function _r(){return Sr||(Sr=1,Tr.exports=(e=Or(),function(){var t=e,n=t.lib.WordArray;function r(e,t,r){for(var i=[],o=0,s=0;s<t;s++)if(s%4){var a=r[e.charCodeAt(s-1)]<<s%4*2,u=r[e.charCodeAt(s)]>>>6-s%4*2;i[o>>>2]|=(a|u)<<24-o%4*8,o++}return n.create(i,o)}t.enc.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,r=this._map;e.clamp();for(var i=[],o=0;o<n;o+=3)for(var s=(t[o>>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,a=0;a<4&&o+.75*a<n;a++)i.push(r.charAt(s>>>6*(3-a)&63));var u=r.charAt(64);if(u)for(;i.length%4;)i.push(u);return i.join("")},parse:function(e){var t=e.length,n=this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var o=0;o<n.length;o++)i[n.charCodeAt(o)]=o}var s=n.charAt(64);if(s){var a=e.indexOf(s);-1!==a&&(t=a)}return r(e,t,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),e.enc.Base64)),wr;var e}var Rr,Cr={},Pr={get exports(){return Cr},set exports(e){Cr=e}};function Lr(){return Rr||(Rr=1,Pr.exports=(e=Or(),function(t){var n=e,r=n.lib,i=r.WordArray,o=r.Hasher,s=n.algo,a=[];!function(){for(var e=0;e<64;e++)a[e]=4294967296*t.abs(t.sin(e+1))|0}();var u=s.MD5=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,i=e[r];e[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o=this._hash.words,s=e[t+0],u=e[t+1],d=e[t+2],p=e[t+3],g=e[t+4],y=e[t+5],v=e[t+6],m=e[t+7],A=e[t+8],I=e[t+9],E=e[t+10],b=e[t+11],k=e[t+12],O=e[t+13],S=e[t+14],w=e[t+15],T=o[0],_=o[1],R=o[2],C=o[3];T=c(T,_,R,C,s,7,a[0]),C=c(C,T,_,R,u,12,a[1]),R=c(R,C,T,_,d,17,a[2]),_=c(_,R,C,T,p,22,a[3]),T=c(T,_,R,C,g,7,a[4]),C=c(C,T,_,R,y,12,a[5]),R=c(R,C,T,_,v,17,a[6]),_=c(_,R,C,T,m,22,a[7]),T=c(T,_,R,C,A,7,a[8]),C=c(C,T,_,R,I,12,a[9]),R=c(R,C,T,_,E,17,a[10]),_=c(_,R,C,T,b,22,a[11]),T=c(T,_,R,C,k,7,a[12]),C=c(C,T,_,R,O,12,a[13]),R=c(R,C,T,_,S,17,a[14]),T=l(T,_=c(_,R,C,T,w,22,a[15]),R,C,u,5,a[16]),C=l(C,T,_,R,v,9,a[17]),R=l(R,C,T,_,b,14,a[18]),_=l(_,R,C,T,s,20,a[19]),T=l(T,_,R,C,y,5,a[20]),C=l(C,T,_,R,E,9,a[21]),R=l(R,C,T,_,w,14,a[22]),_=l(_,R,C,T,g,20,a[23]),T=l(T,_,R,C,I,5,a[24]),C=l(C,T,_,R,S,9,a[25]),R=l(R,C,T,_,p,14,a[26]),_=l(_,R,C,T,A,20,a[27]),T=l(T,_,R,C,O,5,a[28]),C=l(C,T,_,R,d,9,a[29]),R=l(R,C,T,_,m,14,a[30]),T=f(T,_=l(_,R,C,T,k,20,a[31]),R,C,y,4,a[32]),C=f(C,T,_,R,A,11,a[33]),R=f(R,C,T,_,b,16,a[34]),_=f(_,R,C,T,S,23,a[35]),T=f(T,_,R,C,u,4,a[36]),C=f(C,T,_,R,g,11,a[37]),R=f(R,C,T,_,m,16,a[38]),_=f(_,R,C,T,E,23,a[39]),T=f(T,_,R,C,O,4,a[40]),C=f(C,T,_,R,s,11,a[41]),R=f(R,C,T,_,p,16,a[42]),_=f(_,R,C,T,v,23,a[43]),T=f(T,_,R,C,I,4,a[44]),C=f(C,T,_,R,k,11,a[45]),R=f(R,C,T,_,w,16,a[46]),T=h(T,_=f(_,R,C,T,d,23,a[47]),R,C,s,6,a[48]),C=h(C,T,_,R,m,10,a[49]),R=h(R,C,T,_,S,15,a[50]),_=h(_,R,C,T,y,21,a[51]),T=h(T,_,R,C,k,6,a[52]),C=h(C,T,_,R,p,10,a[53]),R=h(R,C,T,_,E,15,a[54]),_=h(_,R,C,T,u,21,a[55]),T=h(T,_,R,C,A,6,a[56]),C=h(C,T,_,R,w,10,a[57]),R=h(R,C,T,_,v,15,a[58]),_=h(_,R,C,T,O,21,a[59]),T=h(T,_,R,C,g,6,a[60]),C=h(C,T,_,R,b,10,a[61]),R=h(R,C,T,_,d,15,a[62]),_=h(_,R,C,T,I,21,a[63]),o[0]=o[0]+T|0,o[1]=o[1]+_|0,o[2]=o[2]+R|0,o[3]=o[3]+C|0},_doFinalize:function(){var e=this._data,n=e.words,r=8*this._nDataBytes,i=8*e.sigBytes;n[i>>>5]|=128<<24-i%32;var o=t.floor(r/4294967296),s=r;n[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n[14+(i+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),e.sigBytes=4*(n.length+1),this._process();for(var a=this._hash,u=a.words,c=0;c<4;c++){var l=u[c];u[c]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return a},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function c(e,t,n,r,i,o,s){var a=e+(t&n|~t&r)+i+s;return(a<<o|a>>>32-o)+t}function l(e,t,n,r,i,o,s){var a=e+(t&r|n&~r)+i+s;return(a<<o|a>>>32-o)+t}function f(e,t,n,r,i,o,s){var a=e+(t^n^r)+i+s;return(a<<o|a>>>32-o)+t}function h(e,t,n,r,i,o,s){var a=e+(n^(t|~r))+i+s;return(a<<o|a>>>32-o)+t}n.MD5=o._createHelper(u),n.HmacMD5=o._createHmacHelper(u)}(Math),e.MD5)),Cr;var e}var xr,Mr={},Dr={get exports(){return Mr},set exports(e){Mr=e}},Nr={},Br={get exports(){return Nr},set exports(e){Nr=e}};function Gr(){return xr||(xr=1,Br.exports=(a=Or(),t=(e=a).lib,n=t.WordArray,r=t.Hasher,i=e.algo,o=[],s=i.SHA1=r.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],s=n[2],a=n[3],u=n[4],c=0;c<80;c++){if(c<16)o[c]=0|e[t+c];else{var l=o[c-3]^o[c-8]^o[c-14]^o[c-16];o[c]=l<<1|l>>>31}var f=(r<<5|r>>>27)+u+o[c];f+=c<20?1518500249+(i&s|~i&a):c<40?1859775393+(i^s^a):c<60?(i&s|i&a|s&a)-1894007588:(i^s^a)-899497514,u=a,a=s,s=i<<30|i>>>2,i=r,r=f}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+s|0,n[3]=n[3]+a|0,n[4]=n[4]+u|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(r+64>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=r.clone.call(this);return e._hash=this._hash.clone(),e}}),e.SHA1=r._createHelper(s),e.HmacSHA1=r._createHmacHelper(s),a.SHA1)),Nr;var e,t,n,r,i,o,s,a}var Ur,jr,Fr={},Hr={get exports(){return Fr},set exports(e){Fr=e}};function zr(){return jr||(jr=1,Dr.exports=function(e){return n=(t=e).lib,r=n.Base,i=n.WordArray,o=t.algo,s=o.MD5,a=o.EvpKDF=r.extend({cfg:r.extend({keySize:4,hasher:s,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n=this.cfg,r=n.hasher.create(),o=i.create(),s=o.words,a=n.keySize,u=n.iterations;s.length<a;){c&&r.update(c);var c=r.update(e).finalize(t);r.reset();for(var l=1;l<u;l++)c=r.finalize(c),r.reset();o.concat(c)}return o.sigBytes=4*a,o}}),t.EvpKDF=function(e,t,n){return a.create(n).compute(e,t)},e.EvpKDF;var t,n,r,i,o,s,a}(Or(),Gr(),Ur||(Ur=1,Hr.exports=(e=Or(),void function(){var t=e,n=t.lib.Base,r=t.enc.Utf8;t.algo.HMAC=n.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=r.parse(t));var n=e.blockSize,i=4*n;t.sigBytes>i&&(t=e.finalize(t)),t.clamp();for(var o=this._oKey=t.clone(),s=this._iKey=t.clone(),a=o.words,u=s.words,c=0;c<n;c++)a[c]^=1549556828,u[c]^=909522486;o.sigBytes=s.sigBytes=i,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,n=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(n))}})}())))),Mr;var e}var Kr,Qr,Vr={},qr={get exports(){return Vr},set exports(e){Vr=e}};({get exports(){return Er},set exports(e){Er=e}}).exports=function(e){return function(){var t=e,n=t.lib.BlockCipher,r=t.algo,i=[],o=[],s=[],a=[],u=[],c=[],l=[],f=[],h=[],d=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var n=0,r=0;for(t=0;t<256;t++){var p=r^r<<1^r<<2^r<<3^r<<4;p=p>>>8^255&p^99,i[n]=p,o[p]=n;var g=e[n],y=e[g],v=e[y],m=257*e[p]^16843008*p;s[n]=m<<24|m>>>8,a[n]=m<<16|m>>>16,u[n]=m<<8|m>>>24,c[n]=m,m=16843009*v^65537*y^257*g^16843008*n,l[p]=m<<24|m>>>8,f[p]=m<<16|m>>>16,h[p]=m<<8|m>>>24,d[p]=m,n?(n=g^e[e[e[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=n.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,n=e.sigBytes/4,r=4*((this._nRounds=n+6)+1),o=this._keySchedule=[],s=0;s<r;s++)if(s<n)o[s]=t[s];else{var a=o[s-1];s%n?n>6&&s%n==4&&(a=i[a>>>24]<<24|i[a>>>16&255]<<16|i[a>>>8&255]<<8|i[255&a]):(a=i[(a=a<<8|a>>>24)>>>24]<<24|i[a>>>16&255]<<16|i[a>>>8&255]<<8|i[255&a],a^=p[s/n|0]<<24),o[s]=o[s-n]^a}for(var u=this._invKeySchedule=[],c=0;c<r;c++)s=r-c,a=c%4?o[s]:o[s-4],u[c]=c<4||s<=4?a:l[i[a>>>24]]^f[i[a>>>16&255]]^h[i[a>>>8&255]]^d[i[255&a]]}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,s,a,u,c,i)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,l,f,h,d,o),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,r,i,o,s,a){for(var u=this._nRounds,c=e[t]^n[0],l=e[t+1]^n[1],f=e[t+2]^n[2],h=e[t+3]^n[3],d=4,p=1;p<u;p++){var g=r[c>>>24]^i[l>>>16&255]^o[f>>>8&255]^s[255&h]^n[d++],y=r[l>>>24]^i[f>>>16&255]^o[h>>>8&255]^s[255&c]^n[d++],v=r[f>>>24]^i[h>>>16&255]^o[c>>>8&255]^s[255&l]^n[d++],m=r[h>>>24]^i[c>>>16&255]^o[l>>>8&255]^s[255&f]^n[d++];c=g,l=y,f=v,h=m}g=(a[c>>>24]<<24|a[l>>>16&255]<<16|a[f>>>8&255]<<8|a[255&h])^n[d++],y=(a[l>>>24]<<24|a[f>>>16&255]<<16|a[h>>>8&255]<<8|a[255&c])^n[d++],v=(a[f>>>24]<<24|a[h>>>16&255]<<16|a[c>>>8&255]<<8|a[255&l])^n[d++],m=(a[h>>>24]<<24|a[c>>>16&255]<<16|a[l>>>8&255]<<8|a[255&f])^n[d++],e[t]=g,e[t+1]=y,e[t+2]=v,e[t+3]=m},keySize:8});t.AES=n._createHelper(g)}(),e.AES}(Or(),_r(),Lr(),zr(),Kr||(Kr=1,qr.exports=(Qr=Or(),zr(),void(Qr.lib.Cipher||function(e){var t=Qr,n=t.lib,r=n.Base,i=n.WordArray,o=n.BufferedBlockAlgorithm,s=t.enc;s.Utf8;var a=s.Base64,u=t.algo.EvpKDF,c=n.Cipher=o.extend({cfg:r.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,n){this.cfg=this.cfg.extend(n),this._xformMode=e,this._key=t,this.reset()},reset:function(){o.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?m:y}return function(t){return{encrypt:function(n,r,i){return e(r).encrypt(t,n,r,i)},decrypt:function(n,r,i){return e(r).decrypt(t,n,r,i)}}}}()});n.StreamCipher=c.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var l=t.mode={},f=n.BlockCipherMode=r.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),h=l.CBC=function(){var t=f.extend();function n(t,n,r){var i=this._iv;if(i){var o=i;this._iv=e}else o=this._prevBlock;for(var s=0;s<r;s++)t[n+s]^=o[s]}return t.Encryptor=t.extend({processBlock:function(e,t){var r=this._cipher,i=r.blockSize;n.call(this,e,t,i),r.encryptBlock(e,t),this._prevBlock=e.slice(t,t+i)}}),t.Decryptor=t.extend({processBlock:function(e,t){var r=this._cipher,i=r.blockSize,o=e.slice(t,t+i);r.decryptBlock(e,t),n.call(this,e,t,i),this._prevBlock=o}}),t}(),d=(t.pad={}).Pkcs7={pad:function(e,t){for(var n=4*t,r=n-e.sigBytes%n,o=r<<24|r<<16|r<<8|r,s=[],a=0;a<r;a+=4)s.push(o);var u=i.create(s,r);e.concat(u)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}};n.BlockCipher=c.extend({cfg:c.cfg.extend({mode:h,padding:d}),reset:function(){c.reset.call(this);var e=this.cfg,t=e.iv,n=e.mode;if(this._xformMode==this._ENC_XFORM_MODE)var r=n.createEncryptor;else r=n.createDecryptor,this._minBufferSize=1;this._mode&&this._mode.__creator==r?this._mode.init(this,t&&t.words):(this._mode=r.call(n,this,t&&t.words),this._mode.__creator=r)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){e.pad(this._data,this.blockSize);var t=this._process(!0)}else t=this._process(!0),e.unpad(t);return t},blockSize:4});var p=n.CipherParams=r.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),g=(t.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,n=e.salt;if(n)var r=i.create([1398893684,1701076831]).concat(n).concat(t);else r=t;return r.toString(a)},parse:function(e){var t=a.parse(e),n=t.words;if(1398893684==n[0]&&1701076831==n[1]){var r=i.create(n.slice(2,4));n.splice(0,4),t.sigBytes-=16}return p.create({ciphertext:t,salt:r})}},y=n.SerializableCipher=r.extend({cfg:r.extend({format:g}),encrypt:function(e,t,n,r){r=this.cfg.extend(r);var i=e.createEncryptor(n,r),o=i.finalize(t),s=i.cfg;return p.create({ciphertext:o,key:n,iv:s.iv,algorithm:e,mode:s.mode,padding:s.padding,blockSize:e.blockSize,formatter:r.format})},decrypt:function(e,t,n,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),e.createDecryptor(n,r).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),v=(t.kdf={}).OpenSSL={execute:function(e,t,n,r){r||(r=i.random(8));var o=u.create({keySize:t+n}).compute(e,r),s=i.create(o.words.slice(t),4*n);return o.sigBytes=4*t,p.create({key:o,iv:s,salt:r})}},m=n.PasswordBasedCipher=y.extend({cfg:y.cfg.extend({kdf:v}),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 o=y.encrypt.call(this,e,t,i.key,r);return o.mixIn(i),o},decrypt:function(e,t,n,r){r=this.cfg.extend(r),t=this._parse(t,r.format);var i=r.kdf.execute(n,e.keySize,e.ivSize,t.salt);return r.iv=i.iv,y.decrypt.call(this,e,t,i.key,r)}})}()))));var Wr=Er,Yr={};({get exports(){return Yr},set exports(e){Yr=e}}).exports=function(e){return e.enc.Utf8}(Or());var Jr=Yr,Xr={},$r={get exports(){return Xr},set exports(e){Xr=e}},Zr={},ei={get exports(){return Zr},set exports(e){Zr=e}},ti=6e4,ni=36e5,ri=24*ni,ii=function(e,t){return t=t||{},"string"==typeof e?function(e){if((e=""+e).length>1e4)return;var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(!t)return;var n=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*n;case"days":case"day":case"d":return n*ri;case"hours":case"hour":case"hrs":case"hr":case"h":return n*ni;case"minutes":case"minute":case"mins":case"min":case"m":return n*ti;case"seconds":case"second":case"secs":case"sec":case"s":return 1e3*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n}}(e):t.long?function(e){return oi(e,ri,"day")||oi(e,ni,"hour")||oi(e,ti,"minute")||oi(e,1e3,"second")||e+" ms"}(e):function(e){return e>=ri?Math.round(e/ri)+"d":e>=ni?Math.round(e/ni)+"h":e>=ti?Math.round(e/ti)+"m":e>=1e3?Math.round(e/1e3)+"s":e+"ms"}(e)};function oi(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}!function(e,t){t=ei.exports=function(e){function r(){}function o(){var e=o,r=+new Date,s=r-(n||r);e.diff=s,e.prev=n,e.curr=r,n=r,null==e.useColors&&(e.useColors=t.useColors()),null==e.color&&e.useColors&&(e.color=i());var a=Array.prototype.slice.call(arguments);a[0]=t.coerce(a[0]),"string"!=typeof a[0]&&(a=["%o"].concat(a));var u=0;a[0]=a[0].replace(/%([a-z%])/g,(function(n,r){if("%%"===n)return n;u++;var i=t.formatters[r];if("function"==typeof i){var o=a[u];n=i.call(e,o),a.splice(u,1),u--}return n})),"function"==typeof t.formatArgs&&(a=t.formatArgs.apply(e,a));var c=o.log||t.log||console.log.bind(console);c.apply(e,a)}r.enabled=!1,o.enabled=!0;var s=t.enabled(e)?o:r;return s.namespace=e,s},t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){t.save(e);for(var n=(e||"").split(/[\s,]+/),r=n.length,i=0;i<r;i++)n[i]&&("-"===(e=n[i].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=ii,t.names=[],t.skips=[],t.formatters={};var n,r=0;function i(){return t.colors[r++%t.colors.length]}}(0,Zr),function(e,t){function n(){var e;try{e=t.storage.debug}catch(e){}return e}(t=$r.exports=Zr).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(){var e=arguments,n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),!n)return e;var r="color: "+this.color;e=[e[0],r,"color: inherit"].concat(Array.prototype.slice.call(e,1));var i=0,o=0;return e[0].replace(/%[a-z%]/g,(function(e){"%%"!==e&&(i++,"%c"===e&&(o=i))})),e.splice(o,0,r),e},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=n,t.useColors=function(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){return JSON.stringify(e)},t.enable(n())}(0,Xr);var si=Xr("cookie"),ai=function(e,t,n){switch(arguments.length){case 3:case 2:return ui(e,t,n);case 1:return li(e);default:return ci()}};function ui(e,t,n){n=n||{};var r=fi(e)+"="+fi(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}function ci(){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[hi((t=r[i].split("="))[0])]=hi(t[1]);return n}(e)}function li(e){return ci()[e]}function fi(e){try{return encodeURIComponent(e)}catch(t){si("error `encode(%o)` - %o",e,t)}}function hi(e){try{return decodeURIComponent(e)}catch(t){si("error `decode(%o)` - %o",e,t)}}var di={},pi={get exports(){return di},set exports(e){di=e}},gi=Math.max,yi=function(e,t){var n=t?t.length:0;if(!n)return[];for(var r=gi(Number(e)||0,0),i=gi(n-r,0),o=new Array(i),s=0;s<i;s+=1)o[s]=t[s+r];return o},vi=Math.max,mi=function(e){if(null==e||!e.length)return[];for(var t=new Array(vi(e.length-2,0)),n=1;n<e.length;n+=1)t[n-1]=e[n];return t},Ai=yi,Ii=mi,Ei=Object.prototype.hasOwnProperty,bi=Object.prototype.toString,ki=function(e){return Boolean(e)&&"object"==typeof e},Oi=function(e){return Boolean(e)&&"[object Object]"===bi.call(e)},Si=function(e,t,n,r){return Ei.call(t,r)&&void 0===e[r]&&(e[r]=n),t},wi=function(e,t,n,r){return Ei.call(t,r)&&(Oi(e[r])&&Oi(n)?e[r]=_i(e[r],n):void 0===e[r]&&(e[r]=n)),t},Ti=function(e,t){if(!ki(t))return t;e=e||Si;for(var n=Ai(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},_i=function(e){return Ti.apply(null,[wi,e].concat(Ii(arguments)))};pi.exports=function(e){return Ti.apply(null,[null,e].concat(Ii(arguments)))},di.deep=_i;var Ri={},Ci={get exports(){return Ri},set exports(e){Ri=e}},Pi="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function Li(){throw new Error("setTimeout has not been defined")}function xi(){throw new Error("clearTimeout has not been defined")}var Mi=Li,Di=xi;function Ni(e){if(Mi===setTimeout)return setTimeout(e,0);if((Mi===Li||!Mi)&&setTimeout)return Mi=setTimeout,setTimeout(e,0);try{return Mi(e,0)}catch(t){try{return Mi.call(null,e,0)}catch(t){return Mi.call(this,e,0)}}}"function"==typeof Pi.setTimeout&&(Mi=setTimeout),"function"==typeof Pi.clearTimeout&&(Di=clearTimeout);var Bi,Gi=[],Ui=!1,ji=-1;function Fi(){Ui&&Bi&&(Ui=!1,Bi.length?Gi=Bi.concat(Gi):ji=-1,Gi.length&&Hi())}function Hi(){if(!Ui){var e=Ni(Fi);Ui=!0;for(var t=Gi.length;t;){for(Bi=Gi,Gi=[];++ji<t;)Bi&&Bi[ji].run();ji=-1,t=Gi.length}Bi=null,Ui=!1,function(e){if(Di===clearTimeout)return clearTimeout(e);if((Di===xi||!Di)&&clearTimeout)return Di=clearTimeout,clearTimeout(e);try{Di(e)}catch(t){try{return Di.call(null,e)}catch(t){return Di.call(this,e)}}}(e)}}function zi(e,t){this.fun=e,this.array=t}zi.prototype.run=function(){this.fun.apply(null,this.array)};function Ki(){}var Qi=Ki,Vi=Ki,qi=Ki,Wi=Ki,Yi=Ki,Ji=Ki,Xi=Ki;var $i=Pi.performance||{},Zi=$i.now||$i.mozNow||$i.msNow||$i.oNow||$i.webkitNow||function(){return(new Date).getTime()};var eo=new Date;var to={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];Gi.push(new zi(e,t)),1!==Gi.length||Ui||Ni(Hi)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:Qi,addListener:Vi,once:qi,off:Wi,removeListener:Yi,removeAllListeners:Ji,emit:Xi,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*Zi.call($i),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-eo)/1e3}},no={},ro={get exports(){return no},set exports(e){no=e}},io={},oo={get exports(){return io},set exports(e){io=e}},so=1e3,ao=60*so,uo=60*ao,co=24*uo,lo=365.25*co,fo=function(e,t){t=t||{};var n=typeof e;if("string"===n&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(!t)return;var n=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return n*lo;case"days":case"day":case"d":return n*co;case"hours":case"hour":case"hrs":case"hr":case"h":return n*uo;case"minutes":case"minute":case"mins":case"min":case"m":return n*ao;case"seconds":case"second":case"secs":case"sec":case"s":return n*so;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}(e);if("number"===n&&!1===isNaN(e))return t.long?function(e){return ho(e,co,"day")||ho(e,uo,"hour")||ho(e,ao,"minute")||ho(e,so,"second")||e+" ms"}(e):function(e){if(e>=co)return Math.round(e/co)+"d";if(e>=uo)return Math.round(e/uo)+"h";if(e>=ao)return Math.round(e/ao)+"m";if(e>=so)return Math.round(e/so)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function ho(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}!function(e,t){var n;function r(e){function r(){if(r.enabled){var e=r,i=+new Date,o=i-(n||i);e.diff=o,e.prev=n,e.curr=i,n=i;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=t.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var u=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,(function(n,r){if("%%"===n)return n;u++;var i=t.formatters[r];if("function"==typeof i){var o=s[u];n=i.call(e,o),s.splice(u,1),u--}return n})),t.formatArgs.call(e,s);var c=r.log||t.log||console.log.bind(console);c.apply(e,s)}}return r.namespace=e,r.enabled=t.enabled(e),r.useColors=t.useColors(),r.color=function(e){var n,r=0;for(n in e)r=(r<<5)-r+e.charCodeAt(n),r|=0;return t.colors[Math.abs(r)%t.colors.length]}(e),"function"==typeof t.init&&t.init(r),r}(t=oo.exports=r.debug=r.default=r).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){t.save(e),t.names=[],t.skips=[];for(var n=("string"==typeof e?e:"").split(/[\s,]+/),r=n.length,i=0;i<r;i++)n[i]&&("-"===(e=n[i].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=fo,t.names=[],t.skips=[],t.formatters={}}(0,io),function(e,t){function n(){var e;try{e=t.storage.debug}catch(e){}return!e&&void 0!==to&&"env"in to&&(e=to.env.DEBUG),e}(t=ro.exports=io).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),!n)return;var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var i=0,o=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(i++,"%c"===e&&(o=i))})),e.splice(o,0,r)},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=n,t.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(n())}(0,no);var po=no("cookie"),go=function(e,t,n){switch(arguments.length){case 3:case 2:return yo(e,t,n);case 1:return mo(e);default:return vo()}};function yo(e,t,n){n=n||{};var r=Ao(e)+"="+Ao(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}function vo(){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[Io((t=r[i].split("="))[0])]=Io(t[1]);return n}(e)}function mo(e){return vo()[e]}function Ao(e){try{return encodeURIComponent(e)}catch(t){po("error `encode(%o)` - %o",e,t)}}function Io(e){try{return decodeURIComponent(e)}catch(t){po("error `decode(%o)` - %o",e,t)}}!function(e,t){var n=M.parse,r=go;function i(e){for(var n=t.cookie,r=t.levels(e),i=0;i<r.length;++i){var o="__tld__",s=r[i],a={domain:"."+s};if(n(o,1,a),n(o))return n(o,null,a),s}return""}i.levels=function(e){var t=n(e).hostname.split("."),r=t[t.length-1],i=[];if(4===t.length&&r===parseInt(r,10))return i;if(t.length<=1)return i;for(var o=t.length-2;o>=0;--o)i.push(t.slice(o).join("."));return i},i.cookie=r,t=e.exports=i}(Ci,Ri);var Eo=Ri,bo=new(function(){function e(t){r(this,e),this.cOpts={},this.options(t),this.isSupportAvailable=this.checkSupportAvailability()}return o(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(Eo(window.location.href));return"."===t&&(t=null),this.cOpts=di(e,{maxage:31536e6,path:"/",domain:t,samesite:"Lax"}),this.cOpts}},{key:"set",value:function(e,t){try{return ai(e,t,R(this.cOpts)),!0}catch(e){return ht(e),!1}}},{key:"get",value:function(e){return ai(e)}},{key:"remove",value:function(e){try{return ai(e,null,R(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}())({}),ko={};({get exports(){return ko},set exports(e){ko=e}}).exports=function(){var e=window.localStorage;function t(e){return e=JSON.stringify(e),!!/^\{[\s\S]*\}$/.test(e)}function n(e){return void 0===e||"function"==typeof e?e+"":JSON.stringify(e)}function r(e){if("string"==typeof e)try{return JSON.parse(e)}catch(t){return e}}function i(e){return"[object Function]"==={}.toString.call(e)}function o(e){return"[object Array]"===Object.prototype.toString.call(e)}function s(e){var t="_Is_Incognit",n="yes";try{e.setItem(t,n)}catch(t){if("QuotaExceededError"===t.name){var r=function(){};e.__proto__={setItem:r,getItem:r,removeItem:r,clear:r}}}finally{e.getItem(t)===n&&e.removeItem(t)}return e}function a(){if(!(this instanceof a))return new a}e=s(e),a.prototype={set:function(r,i){if(r&&!t(r))e.setItem(r,n(i));else if(t(r))for(var o in r)this.set(o,r[o]);return this},get:function(t){if(!t){var n={};return this.forEach((function(e,t){return n[e]=t})),n}if("?"===t.charAt(0))return this.has(t.substr(1));var i=arguments;if(i.length>1){for(var o={},s=0,a=i.length;s<a;s++){var u=r(e.getItem(i[s]));this.has(i[s])&&(o[i[s]]=u)}return o}return r(e.getItem(t))},clear:function(){return e.clear(),this},remove:function(t){var n=this.get(t);return e.removeItem(t),n},has:function(e){return{}.hasOwnProperty.call(this.get(),e)},keys:function(){var e=[];return this.forEach((function(t){e.push(t)})),e},forEach:function(t){for(var n=0,r=e.length;n<r;n++){var i=e.key(n);t(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 u=null;function c(e,n){var r=arguments,s=null;if(u||(u=a()),0===r.length)return u.get();if(1===r.length){if("string"==typeof e)return u.get(e);if(t(e))return u.set(e)}if(2===r.length&&"string"==typeof e){if(!n)return u.remove(e);if(n&&"string"==typeof n)return u.set(e,n);n&&i(n)&&(s=null,s=n(e,u.get(e)),c.set(e,s))}if(2===r.length&&o(e)&&i(n))for(var l=0,f=e.length;l<f;l++)s=n(e[l],u.get(e[l])),c.set(e[l],s);return c}for(var l in a.prototype)c[l]=a.prototype[l];return c}();var Oo=ko,So=new(function(){function e(t){r(this,e),this.sOpts={},this.enabled=this.checkSupportAvailability(),this.options(t)}return o(e,[{key:"options",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 0===arguments.length||(di(e,{enabled:!0}),this.enabled=e.enabled&&this.enabled,this.sOpts=e),this.sOpts}},{key:"set",value:function(e,t){return Oo.set(e,t)}},{key:"get",value:function(e){return Oo.get(e)}},{key:"remove",value:function(e){return Oo.remove(e)}},{key:"checkSupportAvailability",value:function(){var e="test_rudder_ls";return this.set(e,!0),!!this.get(e)&&(this.remove(e),!0)}}]),e}())({}),wo="rl_user_id",To="rl_trait",_o="rl_anonymous_id",Ro="rl_group_id",Co="rl_group_trait",Po="rl_page_init_referrer",Lo="rl_page_init_referring_domain",xo="rl_session",Mo="RudderEncrypt:",Do="Rudder",No={segment:"ajs_anonymous_id"};function Bo(e){try{return e?JSON.parse(e):null}catch(t){return ht(t),e||null}}function Go(e){return e.replace(/^\s+|\s+$/gm,"")}function Uo(e){return!e||"string"==typeof e&&""===Go(e)?e:e.substring(0,Mo.length)===Mo?Wr.decrypt(e.substring(Mo.length),Do).toString(Jr):e}var jo=function(){function e(){r(this,e),bo.isSupportAvailable?this.storage=bo:(So.enabled&&(this.storage=So),this.storage||ht("No storage is available :: initializing the SDK without storage"))}return o(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""===Go(e)?e:"".concat(Mo).concat(Wr.encrypt(e,Do).toString())}(function(e){return JSON.stringify(e)}(t)))}},{key:"setStringItem",value:function(e,t){"string"==typeof t?this.setItem(e,t):ht("[Storage] ".concat(e," should be string"))}},{key:"setUserId",value:function(e){this.setStringItem(wo,e)}},{key:"setUserTraits",value:function(e){this.setItem(To,e)}},{key:"setGroupId",value:function(e){this.setStringItem(Ro,e)}},{key:"setGroupTraits",value:function(e){this.setItem(Co,e)}},{key:"setAnonymousId",value:function(e){this.setStringItem(_o,e)}},{key:"setInitialReferrer",value:function(e){this.setItem(Po,e)}},{key:"setInitialReferringDomain",value:function(e){this.setItem(Lo,e)}},{key:"setSessionInfo",value:function(e){this.setItem(xo,e)}},{key:"getItem",value:function(e){return Bo(Uo(this.storage.get(e)))}},{key:"getUserId",value:function(){return this.getItem(wo)}},{key:"getUserTraits",value:function(){return this.getItem(To)}},{key:"getGroupId",value:function(){return this.getItem(Ro)}},{key:"getGroupTraits",value:function(){return this.getItem(Co)}},{key:"fetchExternalAnonymousId",value:function(e){var t,n=e.toLowerCase();return Object.keys(No).includes(n)&&"segment"===n?(So.enabled&&(t=So.get(No[n])),!t&&bo.isSupportAvailable&&(t=bo.get(No[n])),t):t}},{key:"getAnonymousId",value:function(e){var t=Bo(Uo(this.storage.get(_o)));if(t)return t;var n=N(e,"autoCapture.source");if(!0===N(e,"autoCapture.enabled")&&"string"==typeof n){var r=this.fetchExternalAnonymousId(n);if(r)return r}return t}},{key:"getInitialReferrer",value:function(){return this.getItem(Po)}},{key:"getInitialReferringDomain",value:function(){return this.getItem(Lo)}},{key:"getSessionInfo",value:function(){return this.getItem(xo)}},{key:"removeItem",value:function(e){return this.storage.remove(e)}},{key:"removeSessionInfo",value:function(){this.removeItem(xo)}},{key:"clear",value:function(e){this.storage.remove(wo),this.storage.remove(To),this.storage.remove(Ro),this.storage.remove(Co),e&&this.storage.remove(_o)}}]),e}(),Fo=new jo,Ho=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=document.getElementById(e);if(!r){var i=document.createElement("script");i.src=t,i.async=void 0===n.async||n.async,i.type="text/javascript",i.id=e,!0!==n.skipDatasetAttributes&&(i.setAttribute("data-loader","RS_JS_SDK"),void 0!==n.isNonNativeSDK&&i.setAttribute("data-isNonNativeSDK",n.isNonNativeSDK));var o=document.getElementsByTagName("head");if(0!==o.length)o[0].insertBefore(i,o[0].firstChild);else{var s=document.getElementsByTagName("script")[0];s.parentNode.insertBefore(i,s)}}};function zo(e){window.rsBugsnagClient&&window.rsBugsnagClient.leaveBreadcrumb(e)}function Ko(e){window.rsBugsnagClient&&window.rsBugsnagClient.notify(e)}function Qo(e,t,n){var r;try{r=function(e,t,n){var r;try{r="string"==typeof e?e:e instanceof Error||e.message?e.message:JSON.stringify(e)}catch(e){r=""}if(e instanceof Event){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,'"')}(e,t,n)}catch(t){ht("[handleError] Exception:: ",t),ht("[handleError] Original error:: ",JSON.stringify(e)),Ko(t)}if(r){ht(r);var i=e;e instanceof Error||(i=new Error(r)),Ko(i)}}function Vo(e,t){if(null!=t)return t}function qo(e){return e&&e.endsWith("/")?e.replace(/\/+$/,""):e}function Wo(){return function(){var e,t=0,n="";if(!j||F+16>256){for(j=Array(t=256);t--;)j[t]=256*Math.random()|0;t=F=0}for(;t<16;t++)e=j[F+t],n+=6==t?H[15&e|64]:8==t?H[63&e|128]:H[e],1&t&&t>1&&t<11&&(n+="-");return F++,n}()}function Yo(){return(new Date).toISOString()}function Jo(){var e=Zo(),t=e?M.parse(e).pathname:window.location.pathname,n=window.location.search,r=document.title,i=function(e){var t=Zo(),n=t?t.indexOf("?")>-1?t:t+e:window.location.href,r=n.indexOf("#");return r>-1?n.slice(0,r):n}(n),o=window.location.href,s=Xo();return{path:t,referrer:s,referring_domain:$o(s),search:n,title:r,url:i,tab_url:o,initial_referrer:Fo.getInitialReferrer(),initial_referring_domain:Fo.getInitialReferringDomain()}}function Xo(){return document.referrer||"$direct"}function $o(e){var t=e.split("/");return t.length>=3?t[2]:""}function Zo(){for(var e,t=document.getElementsByTagName("link"),n=0;e=t[n];n++)if("canonical"===e.getAttribute("rel"))return e.getAttribute("href")}function es(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 ts(e){es(e,pr)}function ns(e,t){var r=[];if(!t||0===t.length)return r;var i=!0;void 0!==e.All&&(i=e.All);var o=[];return"string"==typeof t[0]?t.forEach((function(e){o.push({intgName:e,intObj:e})})):"object"===n(t[0])&&t.forEach((function(e){o.push({intgName:e.name,intObj:e})})),o.forEach((function(t){var n=t.intgName,o=t.intObj;if(i){var s=!0;null!=e[n]&&0==e[n]&&(s=!1),s&&r.push(o)}else null!=e[n]&&1==e[n]&&r.push(o)})),r}for(var rs,is=function(){for(var e,t=document.getElementsByTagName("script"),n=!1,r=0;r<t.length;r+=1){var i=qo(t[r].getAttribute("src"));if(i){var o=i.match(/^.*rudder-analytics(-staging)?(\.min)?\.js$/);if(o){e=i,n=void 0!==o[1];break}}}return{sdkURL:e,isStaging:n}},os=function(e){return"string"==typeof e||null==e?e:JSON.stringify(e)},ss=o((function e(){r(this,e),this.name="RudderLabs JavaScript SDK",this.namespace="com.rudderlabs.javascript",this.version="2.22.0"})),as=o((function e(){r(this,e),this.name="RudderLabs JavaScript SDK",this.version="2.22.0"})),us=o((function e(){r(this,e),this.name="",this.version=""})),cs=o((function e(){r(this,e),this.density=0,this.width=0,this.height=0,this.innerWidth=0,this.innerHeight=0})),ls=o((function e(){var t;r(this,e),this.app=new ss,this.traits=null,this.library=new as,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 us,this.locale="undefined"==typeof navigator?null:navigator.language||navigator.browserLanguage,this.screen=(t=new cs,"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)})),fs=function(){function e(){r(this,e),this.channel="web",this.context=new ls,this.type=null,this.messageId=Wo(),this.originalTimestamp=(new Date).toISOString(),this.anonymousId=null,this.userId=null,this.event=null,this.properties={},this.integrations={},this.integrations.All=!0}return o(e,[{key:"getProperty",value:function(e){return this.properties[e]}},{key:"addProperty",value:function(e,t){this.properties[e]=t}}]),e}(),hs=function(){function e(){r(this,e),this.message=new fs}return o(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}(),ds=function(){function e(){r(this,e),this.rudderProperty=null,this.rudderUserProperty=null,this.event=null,this.userId=null,this.type=null}return o(e,[{key:"setType",value:function(e){return this.type=e,this}},{key:"build",value:function(){var e=new hs;return e.setUserId(this.userId),e.setType(this.type),e.setEventName(this.event),e.setProperty(this.rudderProperty),e.setUserProperty(this.rudderUserProperty),e}}]),e}(),ps={},gs=256,ys=[];gs--;)ys[gs]=(gs+256).toString(16).substring(1);ps.v4=function(){var e,t=0,n="";if(!rs||gs+16>256){for(rs=Array(t=256);t--;)rs[t]=256*Math.random()|0;t=gs=0}for(;t<16;t++)e=rs[gs+t],n+=6==t?ys[15&e|64]:8==t?ys[63&e|128]:ys[e],1&t&&t>1&&t<11&&(n+="-");return gs++,n};var vs,ms={},As=Object.prototype.hasOwnProperty,Is=String.prototype.charAt,Es=Object.prototype.toString,bs=function(e,t){return Is.call(e,t)},ks=function(e,t){return As.call(e,t)},Os=function(e,t){t=t||ks;for(var n=[],r=0,i=e.length;r<i;r+=1)t(e,r)&&n.push(String(r));return n},Ss=function(e){return null==e?[]:(t=e,"[object String]"===Es.call(t)?Os(e,bs):function(e){return null!=e&&"function"!=typeof e&&"number"==typeof e.length}(e)?Os(e,ks):function(e,t){t=t||ks;var n=[];for(var r in e)t(e,r)&&n.push(String(r));return n}(e));var t},ws=new Uint8Array(16);function Ts(){if(!vs&&!(vs="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return vs(ws)}var _s=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Rs(e){return"string"==typeof e&&_s.test(e)}for(var Cs,Ps,Ls=[],xs=0;xs<256;++xs)Ls.push((xs+256).toString(16).substr(1));function Ms(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(Ls[e[t+0]]+Ls[e[t+1]]+Ls[e[t+2]]+Ls[e[t+3]]+"-"+Ls[e[t+4]]+Ls[e[t+5]]+"-"+Ls[e[t+6]]+Ls[e[t+7]]+"-"+Ls[e[t+8]]+Ls[e[t+9]]+"-"+Ls[e[t+10]]+Ls[e[t+11]]+Ls[e[t+12]]+Ls[e[t+13]]+Ls[e[t+14]]+Ls[e[t+15]]).toLowerCase();if(!Rs(n))throw TypeError("Stringified UUID is invalid");return n}var Ds=0,Ns=0;function Bs(e){if(!Rs(e))throw TypeError("Invalid UUID");var t,n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n}function Gs(e,t,n){function r(e,r,i,o){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t}(e)),"string"==typeof r&&(r=Bs(r)),16!==r.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var s=new Uint8Array(16+e.length);if(s.set(r),s.set(e,r.length),(s=n(s))[6]=15&s[6]|t,s[8]=63&s[8]|128,i){o=o||0;for(var a=0;a<16;++a)i[o+a]=s[a];return i}return Ms(s)}try{r.name=e}catch(e){}return r.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",r.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",r}function Us(e){return 14+(e+64>>>9<<4)+1}function js(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function Fs(e,t,n,r,i,o){return js((s=js(js(t,e),js(r,o)))<<(a=i)|s>>>32-a,n);var s,a}function Hs(e,t,n,r,i,o,s){return Fs(t&n|~t&r,e,t,i,o,s)}function zs(e,t,n,r,i,o,s){return Fs(t&r|n&~r,e,t,i,o,s)}function Ks(e,t,n,r,i,o,s){return Fs(t^n^r,e,t,i,o,s)}function Qs(e,t,n,r,i,o,s){return Fs(n^(t|~r),e,t,i,o,s)}var Vs=Gs("v3",48,(function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var n=0;n<t.length;++n)e[n]=t.charCodeAt(n)}return function(e){for(var t=[],n=32*e.length,r="0123456789abcdef",i=0;i<n;i+=8){var o=e[i>>5]>>>i%32&255,s=parseInt(r.charAt(o>>>4&15)+r.charAt(15&o),16);t.push(s)}return t}(function(e,t){e[t>>5]|=128<<t%32,e[Us(t)-1]=t;for(var n=1732584193,r=-271733879,i=-1732584194,o=271733878,s=0;s<e.length;s+=16){var a=n,u=r,c=i,l=o;n=Hs(n,r,i,o,e[s],7,-680876936),o=Hs(o,n,r,i,e[s+1],12,-389564586),i=Hs(i,o,n,r,e[s+2],17,606105819),r=Hs(r,i,o,n,e[s+3],22,-1044525330),n=Hs(n,r,i,o,e[s+4],7,-176418897),o=Hs(o,n,r,i,e[s+5],12,1200080426),i=Hs(i,o,n,r,e[s+6],17,-1473231341),r=Hs(r,i,o,n,e[s+7],22,-45705983),n=Hs(n,r,i,o,e[s+8],7,1770035416),o=Hs(o,n,r,i,e[s+9],12,-1958414417),i=Hs(i,o,n,r,e[s+10],17,-42063),r=Hs(r,i,o,n,e[s+11],22,-1990404162),n=Hs(n,r,i,o,e[s+12],7,1804603682),o=Hs(o,n,r,i,e[s+13],12,-40341101),i=Hs(i,o,n,r,e[s+14],17,-1502002290),n=zs(n,r=Hs(r,i,o,n,e[s+15],22,1236535329),i,o,e[s+1],5,-165796510),o=zs(o,n,r,i,e[s+6],9,-1069501632),i=zs(i,o,n,r,e[s+11],14,643717713),r=zs(r,i,o,n,e[s],20,-373897302),n=zs(n,r,i,o,e[s+5],5,-701558691),o=zs(o,n,r,i,e[s+10],9,38016083),i=zs(i,o,n,r,e[s+15],14,-660478335),r=zs(r,i,o,n,e[s+4],20,-405537848),n=zs(n,r,i,o,e[s+9],5,568446438),o=zs(o,n,r,i,e[s+14],9,-1019803690),i=zs(i,o,n,r,e[s+3],14,-187363961),r=zs(r,i,o,n,e[s+8],20,1163531501),n=zs(n,r,i,o,e[s+13],5,-1444681467),o=zs(o,n,r,i,e[s+2],9,-51403784),i=zs(i,o,n,r,e[s+7],14,1735328473),n=Ks(n,r=zs(r,i,o,n,e[s+12],20,-1926607734),i,o,e[s+5],4,-378558),o=Ks(o,n,r,i,e[s+8],11,-2022574463),i=Ks(i,o,n,r,e[s+11],16,1839030562),r=Ks(r,i,o,n,e[s+14],23,-35309556),n=Ks(n,r,i,o,e[s+1],4,-1530992060),o=Ks(o,n,r,i,e[s+4],11,1272893353),i=Ks(i,o,n,r,e[s+7],16,-155497632),r=Ks(r,i,o,n,e[s+10],23,-1094730640),n=Ks(n,r,i,o,e[s+13],4,681279174),o=Ks(o,n,r,i,e[s],11,-358537222),i=Ks(i,o,n,r,e[s+3],16,-722521979),r=Ks(r,i,o,n,e[s+6],23,76029189),n=Ks(n,r,i,o,e[s+9],4,-640364487),o=Ks(o,n,r,i,e[s+12],11,-421815835),i=Ks(i,o,n,r,e[s+15],16,530742520),n=Qs(n,r=Ks(r,i,o,n,e[s+2],23,-995338651),i,o,e[s],6,-198630844),o=Qs(o,n,r,i,e[s+7],10,1126891415),i=Qs(i,o,n,r,e[s+14],15,-1416354905),r=Qs(r,i,o,n,e[s+5],21,-57434055),n=Qs(n,r,i,o,e[s+12],6,1700485571),o=Qs(o,n,r,i,e[s+3],10,-1894986606),i=Qs(i,o,n,r,e[s+10],15,-1051523),r=Qs(r,i,o,n,e[s+1],21,-2054922799),n=Qs(n,r,i,o,e[s+8],6,1873313359),o=Qs(o,n,r,i,e[s+15],10,-30611744),i=Qs(i,o,n,r,e[s+6],15,-1560198380),r=Qs(r,i,o,n,e[s+13],21,1309151649),n=Qs(n,r,i,o,e[s+4],6,-145523070),o=Qs(o,n,r,i,e[s+11],10,-1120210379),i=Qs(i,o,n,r,e[s+2],15,718787259),r=Qs(r,i,o,n,e[s+9],21,-343485551),n=js(n,a),r=js(r,u),i=js(i,c),o=js(o,l)}return[n,r,i,o]}(function(e){if(0===e.length)return[];for(var t=8*e.length,n=new Uint32Array(Us(t)),r=0;r<t;r+=8)n[r>>5]|=(255&e[r/8])<<r%32;return n}(e),8*e.length))})),qs=Vs;function Ws(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:case 3:return t^n^r;case 2:return t&n^t&r^n&r}}function Ys(e,t){return e<<t|e>>>32-t}var Js=Gs("v5",80,(function(e){var t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var r=unescape(encodeURIComponent(e));e=[];for(var i=0;i<r.length;++i)e.push(r.charCodeAt(i))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var o=e.length/4+2,s=Math.ceil(o/16),a=new Array(s),u=0;u<s;++u){for(var c=new Uint32Array(16),l=0;l<16;++l)c[l]=e[64*u+4*l]<<24|e[64*u+4*l+1]<<16|e[64*u+4*l+2]<<8|e[64*u+4*l+3];a[u]=c}a[s-1][14]=8*(e.length-1)/Math.pow(2,32),a[s-1][14]=Math.floor(a[s-1][14]),a[s-1][15]=8*(e.length-1)&4294967295;for(var f=0;f<s;++f){for(var h=new Uint32Array(80),d=0;d<16;++d)h[d]=a[f][d];for(var p=16;p<80;++p)h[p]=Ys(h[p-3]^h[p-8]^h[p-14]^h[p-16],1);for(var g=n[0],y=n[1],v=n[2],m=n[3],A=n[4],I=0;I<80;++I){var E=Math.floor(I/20),b=Ys(g,5)+Ws(E,y,v,m)+A+t[E]+h[I]>>>0;A=m,m=v,v=Ys(y,30)>>>0,y=g,g=b}n[0]=n[0]+g>>>0,n[1]=n[1]+y>>>0,n[2]=n[2]+v>>>0,n[3]=n[3]+m>>>0,n[4]=n[4]+A>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]})),Xs=Js;var $s=Object.freeze({__proto__:null,v1:function(e,t,n){var r=t&&n||0,i=t||new Array(16),o=(e=e||{}).node||Cs,s=void 0!==e.clockseq?e.clockseq:Ps;if(null==o||null==s){var a=e.random||(e.rng||Ts)();null==o&&(o=Cs=[1|a[0],a[1],a[2],a[3],a[4],a[5]]),null==s&&(s=Ps=16383&(a[6]<<8|a[7]))}var u=void 0!==e.msecs?e.msecs:Date.now(),c=void 0!==e.nsecs?e.nsecs:Ns+1,l=u-Ds+(c-Ns)/1e4;if(l<0&&void 0===e.clockseq&&(s=s+1&16383),(l<0||u>Ds)&&void 0===e.nsecs&&(c=0),c>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");Ds=u,Ns=c,Ps=s;var f=(1e4*(268435455&(u+=122192928e5))+c)%4294967296;i[r++]=f>>>24&255,i[r++]=f>>>16&255,i[r++]=f>>>8&255,i[r++]=255&f;var h=u/4294967296*1e4&268435455;i[r++]=h>>>8&255,i[r++]=255&h,i[r++]=h>>>24&15|16,i[r++]=h>>>16&255,i[r++]=s>>>8|128,i[r++]=255&s;for(var d=0;d<6;++d)i[r+d]=o[d];return t||Ms(i)},v3:qs,v4:function(e,t,n){var r=(e=e||{}).random||(e.rng||Ts)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return Ms(r)},v5:Xs,NIL:"00000000-0000-0000-0000-000000000000",version:function(e){if(!Rs(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)},validate:Rs,stringify:Ms,parse:Bs}),Zs=Ss,ea=f($s).v4,ta={_data:{},length:0,setItem:function(e,t){return this._data[e]=t,this.length=Zs(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=Zs(this._data).length,null},clear:function(){this._data={},this.length=0},key:function(e){return Zs(this._data)[e]}};ms.defaultEngine=function(){try{if(!window.localStorage)return!1;var e=ea();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:ta,ms.inMemoryEngine=ta;var na=Ss,ra=Object.prototype.toString,ia="function"==typeof Array.isArray?Array.isArray:function(e){return"[object Array]"===ra.call(e)},oa=function(e){return null!=e&&(ia(e)||"function"!==e&&function(e){var t=typeof e;return"number"===t||"object"===t&&"[object Number]"===ra.call(e)}(e.length))},sa=function(e,t){for(var n=0;n<t.length&&!1!==e(t[n],n,t);n+=1);},aa=function(e,t){for(var n=na(t),r=0;r<n.length&&!1!==e(t[n[r]],n[r],t);r+=1);},ua=function(e,t){return(oa(t)?sa:aa).call(this,e,t)},ca=ms.defaultEngine,la=ms.inMemoryEngine,fa=ua,ha=Ss,da=JSON;function pa(e,t,n,r){this.id=t,this.name=e,this.keys=n||{},this.engine=r||ca,this.originalEngine=this.engine}pa.prototype.set=function(e,t){var n=this._createValidKey(e);if(n)try{this.engine.setItem(n,da.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))}},pa.prototype.get=function(e){try{var t=this.engine.getItem(this._createValidKey(e));return null===t?null:da.parse(t)}catch(e){return null}},pa.prototype.getOriginalEngine=function(){return this.originalEngine},pa.prototype.remove=function(e){this.engine.removeItem(this._createValidKey(e))},pa.prototype._createValidKey=function(e){var t,n=this.name,r=this.id;return ha(this.keys).length?(fa((function(i){i===e&&(t=[n,r,e].join("."))}),this.keys),t):[n,r,e].join(".")},pa.prototype._swapEngine=function(){var e=this;fa((function(t){var n=e.get(t);la.setItem([e.name,e.id,t].join("."),n),e.remove(t)}),this.keys),this.engine=la};var ga=pa;var ya=ua,va={setTimeout:function(e,t){return window.setTimeout(e,t)},clearTimeout:function(e){return window.clearTimeout(e)},Date:window.Date},ma=va,Aa={ASAP:1,RESCHEDULE:2,ABANDON:3};function Ia(){this.tasks={},this.nextId=1}Ia.prototype.now=function(){return+new ma.Date},Ia.prototype.run=function(e,t,n){var r=this.nextId++;return this.tasks[r]=ma.setTimeout(this._handle(r,e,t,n||Aa.ASAP),t),r},Ia.prototype.cancel=function(e){this.tasks[e]&&(ma.clearTimeout(this.tasks[e]),delete this.tasks[e])},Ia.prototype.cancelAll=function(){ya(ma.clearTimeout,this.tasks),this.tasks={}},Ia.prototype._handle=function(e,t,n,r){var i=this,o=i.now();return function(){if(delete i.tasks[e],!(r>=Aa.RESCHEDULE&&o+2*n<i.now()))return t();r===Aa.RESCHEDULE&&i.run(t,n,r)}},Ia.setClock=function(e){ma=e},Ia.resetClock=function(){ma=va},Ia.Modes=Aa;var Ea=Ia,ba=ka;function ka(e){return ka.enabled(e)?function(t){t=Oa(t);var n=new Date,r=n-(ka[e]||n);ka[e]=n,t=e+" "+t+" +"+ka.humanize(r),window.console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}:function(){}}function Oa(e){return e instanceof Error?e.stack||e.message:e}ka.names=[],ka.skips=[],ka.enable=function(e){try{localStorage.debug=e}catch(e){}for(var t=(e||"").split(/[\s,]+/),n=t.length,r=0;r<n;r++)"-"===(e=t[r].replace("*",".*?"))[0]?ka.skips.push(new RegExp("^"+e.substr(1)+"$")):ka.names.push(new RegExp("^"+e+"$"))},ka.disable=function(){ka.enable("")},ka.humanize=function(e){var t=6e4,n=60*t;return e>=n?(e/n).toFixed(1)+"h":e>=t?(e/t).toFixed(1)+"m":e>=1e3?(e/1e3|0)+"s":e+"ms"},ka.enabled=function(e){for(var t=0,n=ka.skips.length;t<n;t++)if(ka.skips[t].test(e))return!1;for(t=0,n=ka.names.length;t<n;t++)if(ka.names[t].test(e))return!0;return!1};try{window.localStorage&&ka.enable(localStorage.debug)}catch(e){}var Sa=ps.v4,wa=ga,Ta=ua,_a=Ea,Ra=ba("localstorage-retry");function Ca(e,t){return function(){return e.apply(t,arguments)}}function Pa(e,t,n){"function"==typeof t&&(n=t),this.name=e,this.id=Sa(),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 _a,this._processId=0,this._store=new wa(this.name,this.id,this.keys),this._store.set(this.keys.IN_PROGRESS,{}),this._store.set(this.keys.QUEUE,[]),this._ack=Ca(this._ack,this),this._checkReclaim=Ca(this._checkReclaim,this),this._processHead=Ca(this._processHead,this),this._running=!1}h(Pa.prototype),Pa.prototype.start=function(){this._running&&this.stop(),this._running=!0,this._ack(),this._checkReclaim(),this._processHead()},Pa.prototype.stop=function(){this._schedule.cancelAll(),this._running=!1},Pa.prototype.shouldRetry=function(e,t){return!(t>this.maxAttempts)},Pa.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))},Pa.prototype.addItem=function(e){this._enqueue({item:e,attemptNumber:0,time:this._schedule.now(),id:Sa()})},Pa.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||Sa()}):this.emit("discard",e,t)},Pa.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()},Pa.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(),o=[];function s(n,r){o.push({item:n.item,done:function(i,o){var s=t.get(e.keys.IN_PROGRESS)||{};delete s[r],t.set(e.keys.IN_PROGRESS,s),e.emit("processed",i,o,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=Sa();r[c]={item:u.item,attemptNumber:u.attemptNumber,time:e._schedule.now()},s(u,c)}t.set(this.keys.QUEUE,n),t.set(this.keys.IN_PROGRESS,r),Ta((function(t){try{e.fn(t.item,t.done)}catch(e){Ra("Process function threw error: "+e)}}),o),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,_a.Modes.ASAP))},Pa.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,_a.Modes.ASAP)},Pa.prototype._checkReclaim=function(){var e=this;Ta((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,_a.Modes.ABANDON))}),e.timeouts.RECLAIM_WAIT,_a.Modes.ABANDON)}(t))}),function(t){for(var n=[],r=e._store.getOriginalEngine(),i=0;i<r.length;i++){var o=r.key(i).split(".");3===o.length&&(o[0]===t&&"ack"===o[2]&&n.push(new wa(t,o[1],e.keys)))}return n}(this.name)),this._schedule.run(this._checkReclaim,this.timeouts.RECLAIM_TIMER,_a.Modes.RESCHEDULE)},Pa.prototype._reclaim=function(e){var t=this,n=new wa(this.name,e,this.keys),r={queue:this._store.get(this.keys.QUEUE)||[]},i={inProgress:n.get(this.keys.IN_PROGRESS)||{},queue:n.get(this.keys.QUEUE)||[]},o=[],s=function(e,n){Ta((function(e){var i=e.id||Sa();o.indexOf(i)>=0?t.emit("duplication",e.item,e.attemptNumber):(r.queue.push({item:e.item,attemptNumber:e.attemptNumber+n,time:t._schedule.now(),id:i}),o.push(i))}),e)};s(i.queue,0),s(i.inProgress,1),r.queue=r.queue.sort((function(e,t){return e.time-t.time})),this._store.set(this.keys.QUEUE,r.queue),n.remove(this.keys.IN_PROGRESS),n.remove(this.keys.QUEUE),n.remove(this.keys.RECLAIM_START),n.remove(this.keys.RECLAIM_END),n.remove(this.keys.ACK),this._processHead()};var La=Pa,xa={maxRetryDelay:36e4,minRetryDelay:1e3,backoffFactor:2,maxAttempts:10,maxItems:100},Ma=function(){function e(){r(this,e),this.url="",this.writeKey=""}return o(e,[{key:"init",value:function(e,t,n){this.url=t,this.writeKey=e,n&&a(xa,n),this.payloadQueue=new La("rudder",xa,function(e,t){e.message.sentAt=Yo(),this.processQueueElement(e.url,e.headers,e.message,1e4,(function(e,n){if(e)return t(e);t(null,n)}))}.bind(this)),this.payloadQueue.start()}},{key:"processQueueElement",value:function(e,t,n,r,i){try{var o=new XMLHttpRequest;for(var s in o.open("POST",e,!0),t)o.setRequestHeader(s,t[s]);o.timeout=r,o.ontimeout=i,o.onerror=i,o.onreadystatechange=function(){4===o.readyState&&(429===o.status||o.status>=500&&o.status<600?(Qo(new Error("request failed with status: ".concat(o.status).concat(o.statusText," for url: ").concat(e))),i(new Error("request failed with status: ".concat(o.status).concat(o.statusText," for url: ").concat(e)))):i(null,o.status))},o.send(JSON.stringify(n,Vo))}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}(),Da="queue",Na=64e3,Ba=function(){function e(){r(this,e),this.storage=So,this.maxItems=10,this.flushQueueTimeOut=void 0,this.timeOutActive=!1,this.flushQueueTimeOutInterval=6e5,this.url="",this.writekey="",this.queueName="".concat(Da,".").concat(Date.now()),this.send=navigator.sendBeacon&&navigator.sendBeacon.bind(navigator)}return o(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);var r=this.sendQueueDataForBeacon.bind(this);window.addEventListener("unload",r)}},{key:"getQueue",value:function(){return this.storage.get(this.queueName)}},{key:"setQueue",value:function(e){this.storage.set(this.queueName,e)}},{key:"enqueue",value:function(e){var t=this.getQueue()||[];(t=t.slice(-(this.maxItems-1))).push(e);var n=t.slice(0),r={batch:n};JSON.stringify(r,Vo).length>Na&&(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={batch:e},n=JSON.stringify(t,Vo),r=new Blob([n],{type:"text/plain"});try{this.send("".concat(this.url,"?writeKey=").concat(this.writekey),r)||Qo(new Error("Unable to queue data to browser's beacon queue"))}catch(e){Qo(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}(),Ga=function(){function e(){r(this,e),this.queue=void 0}return o(e,[{key:"initialize",value:function(e,t,r){var i={},o=qo(t);r&&r.useBeacon&&navigator.sendBeacon?(r&&r.beaconQueueOptions&&null!=r.beaconQueueOptions&&"object"===n(r.beaconQueueOptions)&&(i=r.beaconQueueOptions),o="".concat(o,"/beacon/v1/batch"),this.queue=new Ba):(r&&r.useBeacon&&ct("[EventRepository] sendBeacon feature not available in this browser :: fallback to XHR"),r&&r.queueOptions&&null!=r.queueOptions&&"object"===n(r.queueOptions)&&(i=r.queueOptions),this.queue=new Ma),this.queue.init(e,o,i)}},{key:"enqueue",value:function(e,t){var n=e.getElementContent();n.originalTimestamp=n.originalTimestamp||Yo(),n.sentAt=Yo(),JSON.stringify(n,Vo).length>32e3&&ht("[EventRepository] enqueue:: message length greater 32 Kb ",n),this.queue.enqueue(n,t)}}]),e}(),Ua=new Ga,ja=function(){return navigator&&navigator.language},Fa=function(){return navigator&&navigator.userAgent};function Ha(e){return decodeURIComponent(atob(e).split("").map((function(e){return"%".concat("00".concat(e.charCodeAt(0).toString(16)).slice(-2))})).join(""))}function za(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Ha(e=e.endsWith("..")?e.substr(0,e.length-2):e)}var Ka=/^[a-zA-Z0-9\-_.]+$/;function Qa(e,t,n,r){var i=function(e,t){return[e,(new Date).getTimezoneOffset(),t].join("*")}(n,r),o=t||0,s=function(e){for(var t=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}(),n=-1,r=0;r<e.length;r++)n=n>>>8^t[255&(n^e.charCodeAt(r))];return(-1^n)>>>0}([i,Math.floor(Date.now()/6e4)-o,e].join("*"));return s.toString(36)}function Va(e){var t=function(e){var t=e.split("*"),n=t.length%2==0;return t.length<4||!n||1!==Number(t.shift())?null:{checksum:t.shift(),serializedIds:t.join("*")}}(e);if(!t)return null;var n=t.checksum,r=t.serializedIds;return function(e,t){for(var n=Fa(),r=ja(),i=0;i<=1;i+=1)if(Qa(e,i,n,r)===t)return!0;return!1}(r,n)?function(e){for(var t={},n=e.split("*"),r=0;r<n.length;r+=2){var i=n[r];if(Ka.test(i)){var o=za(n[r+1]);t[i]=o}}return t}(r):null}var qa={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"},Wa=function(){function e(){var t=this;if(r(this,e),!window.OneTrust||!window.OnetrustActiveGroups)throw new Error("OneTrust resources are not accessible. Thus all the destinations will be loaded");this.userSetConsentGroupIds=window.OnetrustActiveGroups.split(",").filter((function(e){return e}));var n=window.OneTrust.GetDomainData().Groups;this.userSetConsentGroupNames=[],n.forEach((function(e){var n=e.CustomGroupId,r=e.GroupName;t.userSetConsentGroupIds.includes(n)&&t.userSetConsentGroupNames.push(r.toUpperCase().trim())})),this.userSetConsentGroupIds=this.userSetConsentGroupIds.map((function(e){return e.toUpperCase()}))}return o(e,[{key:"isEnabled",value:function(e){var t=this;try{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 ht("Error during onetrust cookie consent management ".concat(e)),!0}}}]),e}(),Ya=function(){function e(){r(this,e)}return o(e,null,[{key:"initialize",value:function(e){var t;return null!=e&&null!==(t=e.oneTrust)&&void 0!==t&&t.enabled?new Wa:null}}]),e}(),Ja={SDK:{name:"JS",installType:"npm"}},Xa="{{RS_BUGSNAG_API_KEY}}",$a=["rudder-analytics.min.js"].concat(u(Object.keys(qa).map((function(e){return"".concat(qa[e],".min.js")}))));function Za(e){if(void 0!==window.Bugsnag){if(null===Xa.match(/{{.+}}/)){var t=window.location.hostname;window.rsBugsnagClient=window.Bugsnag.start({apiKey:Xa,appVersion:"2.22.0",metadata:Ja,onError:function(t){try{var n=N(t,"errors.0.stacktrace.0.file");if(!n||"string"!=typeof n)return!1;var r=n.substring(n.lastIndexOf("/")+1);if(!$a.includes(r))return!1;t.addMetadata("source",{sourceId:e});var i=t.errors[0].errorMessage;return t.context=i,i.includes("error in script loading")&&(t.context="Script load failures"),t.severity="error",!0}catch(e){return!1}},autoTrackSessions:!1,collectUserIp:!1,enabledBreadcrumbTypes:["error","log","user"],maxEvents:100,releaseStage:t&&["localhost","127.0.0.1","[::1]"].includes(t)?"development":"production"})}}}var eu=new(function(){function e(){r(this,e),this.storage=Fo,this.timeout=18e5,this.sessionInfo=this.storage.getSessionInfo()||{autoTrack:!0}}return o(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&&(ft("[Session]:: Provided timeout value 0 will disable the auto session tracking feature."),this.sessionInfo.autoTrack=!1),n>0&&n<1e4&&ft('[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){Qo(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;ht('[Session]:: "sessionId" should at least be "'.concat(10,'" digits long'))}else ht('[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}()),tu=function(e,t){if(!Array.isArray(e)||!Array.isArray(t))return R(t);var n=R(e);return t.forEach((function(e,t){n[t]=nu(n[t],e)})),n},nu=function(e,t){return x(tu,e,t)},ru=function(){function e(){r(this,e),this.initialized=!1,this.clientIntegrations=[],this.loadOnlyIntegrations={},this.clientIntegrationObjects=void 0,this.successfullyLoadedIntegration=[],this.failedToBeLoadedIntegration=[],this.toBeProcessedArray=[],this.toBeProcessedByIntegrationArray=[],this.storage=Fo,this.eventRepository=Ua,this.sendAdblockPage=!1,this.sendAdblockPageOptions={},this.clientSuppliedCallbacks={},this.readyCallbacks=[],this.methodToCallbackMapping={syncPixel:"syncPixelCallback"},this.loaded=!1,this.loadIntegration=!0,this.integrationsData={},this.dynamicallyLoadedIntegrations={},this.destSDKBaseURL=mr,this.cookieConsentOptions={},this.logLevel=void 0,this.clientIntegrationsReady=!1,this.uSession=eu,this.version="2.22.0",this.lockIntegrationsVersion=!1}return o(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=Xo();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(qa[t.name]).concat("_RS")]}))||t>=2e4?n(e):e.pause(1e3).then((function(){return e.allModulesInitialized(t+1e3).then(n)}))}))}},{key:"executeReadyCallback",value:function(){this.readyCallbacks.forEach((function(e){return e()}))}},{key:"integrationSDKLoaded",value:function(e,t){try{return window.hasOwnProperty(e)&&window[e][t]&&void 0!==window[e][t].prototype.constructor}catch(e){return Qo(e),!1}}},{key:"processResponse",value:function(e,t){var r,i=this;try{var o=t;try{if("string"==typeof t&&(o=JSON.parse(t)),!o||"object"!==n(o)||Array.isArray(o))throw new Error("Invalid source configuration")}catch(e){return void Qo(e)}if(!0===N(o.source.config,"statsCollection.errorReports.enabled")){var s=N(o.source.config,"statsCollection.errorReports.provider")||"bugsnag";Ar.includes(s)||ht("Invalid error reporting provider value"),"bugsnag"===s&&(r="bugsnag",window.hasOwnProperty(r)||Ho(r,"https://d2wy8f7a9ursnm.cloudfront.net/v7/bugsnag.min.js",{isNonNativeSDK:"true"}),function(e){if(!window.hasOwnProperty("rsBugsnagClient"))if(void 0!==window.Bugsnag)Za(e);else{var t=setInterval((function(){void 0!==window.Bugsnag&&(clearInterval(t),Za(e))}),100);setTimeout((function(){clearInterval(t)}),1e4)}}(o.source.id))}if(o.source.destinations.forEach((function(e){e.enabled&&this.clientIntegrations.push({name:e.destinationDefinition.name,config:e.config})}),this),this.clientIntegrations=ns(this.loadOnlyIntegrations,this.clientIntegrations),Object.keys(this.cookieConsentOptions).length>0)try{var a=Ya.initialize(this.cookieConsentOptions);this.clientIntegrations=this.clientIntegrations.filter((function(e){return!a||a&&a.isEnabled(e.config)}))}catch(e){Qo(e)}var u="";is().isStaging&&(u="-staging"),zo("Starting device-mode initialization"),this.clientIntegrations.forEach((function(e){var t=qa[e.name],n="".concat(t).concat("_RS"),r="".concat(i.destSDKBaseURL,"/").concat(t).concat(u,".min.js");window.hasOwnProperty(n)||Ho(n,r,{isNonNativeSDK:!0});var o=i,s=setInterval((function(){if(o.integrationSDKLoaded(n,t)){var r,i=window[n];clearInterval(s);try{zo("[Analytics] processResponse :: trying to initialize integration name:: ".concat(n)),(r=new i[t](e.config,o)).init(),o.isInitialized(r).then((function(){o.dynamicallyLoadedIntegrations[n]=i[t]}))}catch(e){Qo(e,"[Analytics] 'integration.init()' failed :: ".concat(n," :: ").concat(e.message)),o.failedToBeLoadedIntegration.push(r)}}}),100);setTimeout((function(){clearInterval(s)}),1e4)}));var c=this;this.allModulesInitialized().then((function(){if(!c.clientIntegrations||0===c.clientIntegrations.length)return i.clientIntegrationsReady=!0,i.executeReadyCallback(),void(i.toBeProcessedByIntegrationArray=[]);c.replayEvents(c)}))}catch(e){Qo(e)}}},{key:"replayEvents",value:function(e){var t,n,r;zo("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=R(t),n.forEach((function(e){if(e.getDataForIntegrationsObject)try{r=nu(r,e.getDataForIntegrationsObject())}catch(e){lt("[Analytics: prepareDataForIntegrationsObj]",e)}})),r),e.clientIntegrationsReady=!0,e.executeReadyCallback()),e.toBeProcessedByIntegrationArray.forEach((function(t){var n=t[0];t.shift(),Object.keys(t[0].message.integrations).length>0&&ts(t[0].message.integrations);for(var r=ns(t[0].message.integrations,e.clientIntegrationObjects),i=0;i<r.length;i+=1)try{if(!r[i].isFailed||!r[i].isFailed())if(r[i][n])if(!e.IsEventBlackListed(t[0].message.event,r[i].name)){var o,s=R(t);(o=r[i])[n].apply(o,u(s))}}catch(e){Qo(e)}})),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>=1e4?(t.failedToBeLoadedIntegration.push(e),r(t)):t.pause(1e3).then((function(){return t.isInitialized(e,n+1e3).then(r)}))}))}},{key:"page",value:function(e,t,r,i,o){if(zo("Page event"),this.loaded){"function"==typeof i&&(o=i,i=null),"function"==typeof r&&(o=r,i=r=null),"function"==typeof t&&(o=t,i=r=t=null),"object"===n(e)&&null!=e&&null!=e&&(i=t,r=e,t=e=null),"object"===n(t)&&null!=t&&null!=t&&(i=r,r=t,t=null),"string"==typeof e&&"string"!=typeof t&&(t=e,e=null),this.sendAdblockPage&&"RudderJS-Initiated"!=e&&this.sendSampleRequest();var s=(new ds).setType("page").build();r||(r={}),t&&(s.message.name=r.name=t),e&&(s.message.category=r.category=e),s.message.properties=this.getPageProperties(r),this.processAndSendDataToDestinations("page",s,i,o)}}},{key:"track",value:function(e,t,n,r){if(zo("Track event"),this.loaded){"function"==typeof n&&(r=n,n=null),"function"==typeof t&&(r=t,n=null,t=null);var i=(new ds).setType("track").build();e&&i.setEventName(e),i.setProperty(t||{}),this.processAndSendDataToDestinations("track",i,n,r)}}},{key:"identify",value:function(e,t,r,i){if(zo("Identify event"),this.loaded){if("function"==typeof r&&(i=r,r=null),"function"==typeof t&&(i=t,r=null,t=null),"object"===n(e)&&(r=t,t=e,e=this.userId),e&&this.userId&&e!==this.userId&&this.reset(),this.userId=os(e),this.storage.setUserId(this.userId),t){for(var o in t)this.userTraits[o]=t[o];this.storage.setUserTraits(this.userTraits)}var s=(new ds).setType("identify").build();this.processAndSendDataToDestinations("identify",s,r,i)}}},{key:"alias",value:function(e,t,r,i){if(zo("Alias event"),this.loaded){"function"==typeof r&&(i=r,r=null),"function"==typeof t&&(i=t,r=null,t=null),"object"===n(t)&&(r=t,t=null);var o=(new ds).setType("alias").build();o.message.previousId=os(t)||(this.userId?this.userId:this.getAnonymousId()),o.message.userId=os(e),this.processAndSendDataToDestinations("alias",o,r,i)}}},{key:"group",value:function(e,t,r,i){if(zo("Group event"),this.loaded&&0!==arguments.length){"function"==typeof r&&(i=r,r=null),"function"==typeof t&&(i=t,r=null,t=null),"object"===n(e)&&(r=t,t=e,e=this.groupId),this.groupId=os(e),this.storage.setGroupId(this.groupId);var o=(new ds).setType("group").build();if(t)for(var s in t)this.groupTraits[s]=t[s];else this.groupTraits={};this.storage.setGroupTraits(this.groupTraits),this.processAndSendDataToDestinations("group",o,r,i)}}},{key:"IsEventBlackListed",value:function(e,t){if(!e||"string"!=typeof e)return!1;var n=pr[t],r=this.clientIntegrations.find((function(e){return e.name===n})).config,i=r.blacklistedEvents,o=r.whitelistedEvents,s=r.eventFilteringOption;if(!s)return!1;var a=e.trim().toUpperCase();switch(s){case"disable":default:return!1;case"blacklistedEvents":return!!Array.isArray(i)&&i.some((function(e){return e.eventName.trim().toUpperCase()===a}));case"whitelistedEvents":return!Array.isArray(o)||!o.some((function(e){return e.eventName.trim().toUpperCase()===a}))}}},{key:"processAndSendDataToDestinations",value:function(e,n,r,i){var o=this;try{this.anonymousId||this.setAnonymousId(),zo("Started sending data to destinations"),n.message.context.traits=t({},this.userTraits),n.message.anonymousId=this.anonymousId,n.message.userId=n.message.userId?n.message.userId:this.userId,"group"==e&&(this.groupId&&(n.message.groupId=this.groupId),this.groupTraits&&(n.message.traits=t({},this.groupTraits)));try{var s=this.uSession.getSessionInfo(),a=s.sessionId,u=s.sessionStart;n.message.context.sessionId=a,u&&(n.message.context.sessionStart=!0)}catch(e){Qo(e)}this.processOptionsParam(n,r),function(e,t){var n=e.properties,r=e.traits;n&&Object.keys(n).forEach((function(e){yr.indexOf(e.toLowerCase())>=0&&ht("Warning! : Reserved keyword used in properties--\x3e ".concat(e," with ").concat(t," call"))})),r&&Object.keys(r).forEach((function(e){yr.indexOf(e.toLowerCase())>=0&&ht("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){yr.indexOf(e.toLowerCase())>=0&&ht("Warning! : Reserved keyword used in traits --\x3e ".concat(e," with ").concat(t," call"))}))}(n.message,e);var c=n.message.integrations||{All:!0};if(ts(c),n.message.integrations=c,this.clientIntegrationObjects)ns(c,this.clientIntegrationObjects).forEach((function(t){try{if((!t.isFailed||!t.isFailed())&&t[e])if(!o.IsEventBlackListed(n.message.event,t.name)){var r=R(n);t[e](r)}}catch(e){Qo(e,"[sendToNative]:: [Destination: ".concat(t.name,"]:: "))}}));else this.toBeProcessedByIntegrationArray.push([e,n]);es(n.message.integrations,gr),n.message.integrations=function(e,t){var n=R(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 nu(n,r)}(this.integrationsData,c),this.eventRepository.enqueue(n,e),i&&i()}catch(e){Qo(e)}}},{key:"utm",value:function(e){var t;"?"===e.charAt(0)&&(e=e.substring(1)),e=e.replace(/\?/g,"&");var n=E(e),r={};for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&"utm_"===i.substr(0,4)&&("campaign"===(t=i.substr(4))&&(t="name"),r[t]=n[i]);return r}},{key:"addCampaignInfo",value:function(e){var t=e.message.context;if(t&&"object"===n(t)){var r=Jo().search;e.message.context.campaign=this.utm(r)}}},{key:"processOptionsParam",value:function(e,r){var i=e.message,o=i.type,a=i.properties,u=i.context;this.addCampaignInfo(e),u.page=this.getContextPageProperties("page"===o?a:void 0);var c=["integrations","anonymousId","originalTimestamp"];for(var l in r)c.includes(l)?e.message[l]=r[l]:"context"!==l?e.message.context=nu(u,s({},l,r[l])):"object"===n(r[l])&&null!=r[l]?e.message.context=nu(u,t({},r[l])):ht("[Analytics: processOptionsParam] context passed in options is not object")}},{key:"getPageProperties",value:function(e,t){var n=Jo(),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=Jo(),n={};for(var r in t)n[r]=e&&e[r]?e[r]:t[r];return n}},{key:"reset",value:function(e){zo("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))}},{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?Va(t):null,r=n?n.rs_amp_id:null;this.anonymousId=e||r||Wo(),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,r,i){var o=this;if(i&&i.logLevel&&(this.logLevel=i.logLevel,ut(i.logLevel)),!this.storage||0===Object.keys(this.storage).length)throw Error("Cannot proceed as no storage is available");if(i&&i.cookieConsentManager&&(this.cookieConsentOptions=R(i.cookieConsentManager)),!this.isValidWriteKey(e)||!this.isValidServerUrl(r))throw Error("Unable to load the SDK due to invalid writeKey or serverUrl");var s={};if(i&&i.setCookieDomain&&(s=t(t({},s),{},{domain:i.setCookieDomain})),i&&"boolean"==typeof i.secureCookie&&(s=t(t({},s),{},{secure:i.secureCookie})),i&&Ir.includes(i.sameSiteCookie)&&(s=t(t({},s),{},{samesite:i.sameSiteCookie})),this.storage.options(s),i&&i.integrations&&(a(this.loadOnlyIntegrations,i.integrations),ts(this.loadOnlyIntegrations)),i&&i.sendAdblockPage&&(this.sendAdblockPage=!0),i&&i.sendAdblockPageOptions&&"object"===n(i.sendAdblockPageOptions)&&(this.sendAdblockPageOptions=i.sendAdblockPageOptions),this.uSession.initialize(i),i&&i.clientSuppliedCallbacks){var u={};Object.keys(this.methodToCallbackMapping).forEach((function(e){o.methodToCallbackMapping.hasOwnProperty(e)&&i.clientSuppliedCallbacks[o.methodToCallbackMapping[e]]&&(u[e]=i.clientSuppliedCallbacks[o.methodToCallbackMapping[e]])})),a(this.clientSuppliedCallbacks,u),this.registerCallbacks(!0)}if(i&&null!=i.loadIntegration&&(this.loadIntegration=!!i.loadIntegration),i&&void 0!==i.lockIntegrationsVersion&&(this.lockIntegrationsVersion=!0===i.lockIntegrationsVersion),this.eventRepository.initialize(e,r,i),this.initializeUser(i?i.anonymousIdOptions:void 0),this.setInitialPageProperties(),this.loaded=!0,this.destSDKBaseURL=function(e,t,n){var r="";if(n){if(!(r=qo(n))){var i="CDN base URL for integrations is not valid";throw Qo({message:"[Analytics] load:: ".concat(i)}),Error("Failed to load Rudder SDK: ".concat(i))}return r}var o=is().sdkURL;return r=o?o.split("/").slice(0,-1).concat("js-integrations").join("/"):mr,t&&(r=r.replace("v1.1",e)),r}(this.version,this.lockIntegrationsVersion,i&&i.destSDKBaseURL),i&&i.getSourceConfig)if("function"!=typeof i.getSourceConfig)Qo(new Error('option "getSourceConfig" must be a function'));else{var c=i.getSourceConfig();c instanceof Promise?c.then((function(e){return o.processResponse(200,e)})).catch(Qo):this.processResponse(200,c),ou(this)}else{var l=function(e){return vr.concat(vr.includes("?")?"&":"?").concat(e?"writeKey=".concat(e):"")}(e);i&&i.configUrl&&(l=function(e,t){var n=e;-1===n.indexOf("sourceConfig")&&(n="".concat(qo(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)}(i.configUrl,l));try{!function(e,t,n,r){var i=r.bind(e),o=new XMLHttpRequest;o.open("GET",t,!0),o.setRequestHeader("Authorization","Basic ".concat(btoa("".concat(n,":")))),o.onload=function(){var e=o.status;200==e?i(200,o.responseText):(Qo(new Error("request failed with status: ".concat(o.status," for url: ").concat(t))),i(e))},o.send()}(this,l,e,this.processResponse)}catch(e){Qo(e)}ou(this)}}},{key:"load",value:function(e,t,n){if(!this.loaded)if(String.prototype.endsWith&&String.prototype.startsWith&&String.prototype.includes&&Array.prototype.find&&Array.prototype.includes&&Promise&&Object.entries&&Object.values&&String.prototype.replaceAll&&this.isDatasetAvailable())this.loadAfterPolyfill(e,t,n);else{var r="polyfill";Ho(r,"https://polyfill.io/v3/polyfill.min.js?features=Array.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 i=this,o=setInterval((function(){(window.hasOwnProperty(r)||null!==document.getElementById(r))&&(clearInterval(o),i.loadAfterPolyfill(e,t,n))}),100);setTimeout((function(){clearInterval(o)}),1e4)}}},{key:"ready",value:function(e){this.loaded&&("function"!=typeof e?ht("ready callback is not a function"):this.clientIntegrationsReady?e():this.readyCallbacks.push(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(){Ho("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()}}]),e}(),iu=new ru;function ou(e){if(e.toBeProcessedArray.length>0)for(;e.toBeProcessedArray.length>0;){var t=u(e.toBeProcessedArray[0]);e.toBeProcessedArray.shift();var n=t[0];t.shift(),e[n].apply(e,u(t))}}g(iu),window.addEventListener("error",(function(e){Qo(e,void 0,iu)}),!0),iu.initializeCallbacks(),iu.registerCallbacks(!1);var su,au=window.rudderanalytics,uu=Array.isArray(au);if(uu)for(var cu=0;cu<au.length;){if(au[cu]&&"load"===au[cu][0]){su=au[cu],au.splice(cu,1);break}cu+=1}!function(e){var t="ajs_trait_",n="ajs_prop_";function r(e,t){var n={};return Object.keys(e).forEach((function(r){r.startsWith(t)&&(n[r.substr(t.length)]=e[r])})),n}var i=E(e);i.ajs_aid&&iu.toBeProcessedArray.push(["setAnonymousId",i.ajs_aid]),i.ajs_uid&&iu.toBeProcessedArray.push(["identify",i.ajs_uid,r(i,t)]),i.ajs_event&&iu.toBeProcessedArray.push(["track",i.ajs_event,r(i,n)])}(window.location.search),uu&&au.forEach((function(e){return iu.toBeProcessedArray.push(e)})),su&&su.length>0&&(su.shift(),iu.load.apply(iu,u(su)));var lu=iu.ready.bind(iu),fu=iu.identify.bind(iu),hu=iu.page.bind(iu),du=iu.track.bind(iu),pu=iu.alias.bind(iu),gu=iu.group.bind(iu),yu=iu.reset.bind(iu),vu=iu.load.bind(iu),mu=iu.initialized=!0,Au=iu.getUserId.bind(iu),Iu=iu.getSessionId.bind(iu),Eu=iu.getUserTraits.bind(iu),bu=iu.getAnonymousId.bind(iu),ku=iu.setAnonymousId.bind(iu),Ou=iu.getGroupId.bind(iu),Su=iu.getGroupTraits.bind(iu),wu=iu.startSession.bind(iu),Tu=iu.endSession.bind(iu);export{pu as alias,Tu as endSession,bu as getAnonymousId,Ou as getGroupId,Su as getGroupTraits,Iu as getSessionId,Au as getUserId,Eu as getUserTraits,gu as group,fu as identify,mu as initialized,vu as load,hu as page,lu as ready,yu as reset,ku as setAnonymousId,wu as startSession,du as track};
|