PageSourceSearch

https://www.productboard.com/_next/static/chunks/5107-8ac5e0c2087c3192.js

js productboard.com collected 2026-09-24 08:06:36 UTC 232,941 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5107],{367:(e,t)=>{"use strict";var n=/\d{10}/;t.is=function(e){return n.test(e)},t.parse=function(e){return new Date(1e3*parseInt(e,10))}},635:(e,t,n)=>{"use strict";n.d(t,{U:()=>p});var r,i=n(71450),o=n(31144),s=n(46467),u=n(60677),a=n(87442),c=n(54399),l=function(e,t,n){var r=t.reduce(function(e,t){var n=t.split(":"),r=n[0],i=n[1];return e[r]=i,e},{});return{type:"Counter",metric:e,value:1,tags:(0,i.Cl)((0,i.Cl)({},r),{library:"analytics.js",library_version:"web"===n?"next-".concat(u.r):"npm:next-".concat(u.r)})}};function d(e){console.error("Error sending segment performance metrics",e)}var f=function(){function e(e){var t,n,r,i,o,s=this;if(this.host=null!=(t=null==e?void 0:e.host)?t:c.a,this.sampleRate=null!=(n=null==e?void 0:e.sampleRate)?n:1,this.flushTimer=null!=(r=null==e?void 0:e.flushTimer)?r:3e4,this.maxQueueSize=null!=(i=null==e?void 0:e.maxQueueSize)?i:20,this.protocol=null!=(o=null==e?void 0:e.protocol)?o:"https",this.queue=[],this.sampleRate>0){var u=!1,a=function(){u||(u=!0,s.flush().catch(d),u=!1,setTimeout(a,s.flushTimer))};a()}}return e.prototype.increment=function(e,t){if(!(!e.includes("analytics_js.")||0===t.length||Math.random()>this.sampleRate)&&!(this.queue.length>=this.maxQueueSize)){var n=l(e,t,(0,a.X)());this.queue.push(n),e.includes("error")&&this.flush().catch(d)}},e.prototype.flush=function(){return(0,i.sH)(this,void 0,void 0,function(){var e=this;return(0,i.YH)(this,function(t){switch(t.label){case 0:if(this.queue.length<=0)return[2];return[4,this.send().catch(function(t){d(t),e.sampleRate=0})];case 1:return t.sent(),[2]}})})},e.prototype.send=function(){return(0,i.sH)(this,void 0,void 0,function(){var e,t,n;return(0,i.YH)(this,function(r){return e={series:this.queue},this.queue=[],t={"Content-Type":"text/plain"},n="".concat(this.protocol,"://").concat(this.host,"/m"),[2,(0,s.h)(n,{headers:t,body:JSON.stringify(e),method:"POST"})]})})},e}(),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,i.C6)(t,e),t.initRemoteMetrics=function(e){r=new f(e)},t.prototype.increment=function(t,n,i){e.prototype.increment.call(this,t,n,i),null==r||r.increment(t,null!=i?i:[])},t}(o.p)},4102:(e,t,n)=>{"use strict";n.d(t,{g:()=>o,M:()=>s});var r=n(71450),i=n(72163),o="onRemoveFromFuture",s=function(e){function t(t,n,r){var i=e.call(this)||this;return i.future=[],i.maxAttempts=t,i.queue=n,i.seen=null!=r?r:{},i}return(0,r.C6)(t,e),t.prototype.push=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=t.map(function(t){return!(e.updateAttempts(t)>e.maxAttempts||e.includes(t))&&(e.queue.push(t),!0)});return this.queue=this.queue.sort(function(t,n){return e.getAttempts(t)-e.getAttempts(n)}),r},t.prototype.pushWithBackoff=function(e,t){var n,r,i,s,u,a=this;if(void 0===t&&(t=0),0==t&&0===this.getAttempts(e))return this.push(e)[0];var c=this.updateAttempts(e);if(c>this.maxAttempts||this.includes(e))return!1;var l=(n={attempt:c-1},r=Math.random()+1,i=n.minTimeout,s=n.factor,Math.min(r*(void 0===i?500:i)*Math.pow(void 0===s?2:s,n.attempt),void 0===(u=n.maxTimeout)?1/0:u));return t>0&&l<t&&(l=t),setTimeout(function(){a.queue.push(e),a.future=a.future.filter(function(t){return t.id!==e.id}),a.emit(o)},l),this.future.push(e),!0},t.prototype.getAttempts=function(e){var t;return null!=(t=this.seen[e.id])?t:0},t.prototype.updateAttempts=function(e){return this.seen[e.id]=this.getAttempts(e)+1,this.getAttempts(e)},t.prototype.includes=function(e){return this.queue.includes(e)||this.future.includes(e)||!!this.queue.find(function(t){return t.id===e.id})||!!this.future.find(function(t){return t.id===e.id})},t.prototype.pop=function(){return this.queue.shift()},Object.defineProperty(t.prototype,"length",{get:function(){return this.queue.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"todo",{get:function(){return this.queue.length+this.future.length},enumerable:!1,configurable:!0}),t}(i.v)},6266:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};
1Object.defineProperty(t,"__esModule",{value:!0}),t.Alias=void 0;var i=r(n(43770)),o=n(59284);function s(e,t){o.Facade.call(this,e,t)}t.Alias=s,i.default(s,o.Facade),s.prototype.action=function(){return"alias"},s.prototype.type=s.prototype.action,s.prototype.previousId=function(){return this.field("previousId")||this.field("from")},s.prototype.from=s.prototype.previousId,s.prototype.userId=function(){return this.field("userId")||this.field("to")},s.prototype.to=s.prototype.userId},11556:(e,t,n)=>{"use strict";function r(e,t){return new Promise(function(n,r){var i=setTimeout(function(){r(Error("Promise timed out"))},t);e.then(function(e){return clearTimeout(i),n(e)}).catch(r)})}function i(e,t,n){var i=function(){try{return Promise.resolve(t(e))}catch(e){return Promise.reject(e)}};return new Promise(function(e){return setTimeout(e,n)}).then(function(){return r(i(),1e3)}).catch(function(t){null==e||e.log("warn","Callback Error",{error:t}),null==e||e.stats.increment("callback_error")}).then(function(){return e})}n.d(t,{s2:()=>r,w_:()=>i})},12519:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.clone=void 0,t.clone=function e(t){if("object"!=typeof t)return t;if("[object Object]"===Object.prototype.toString.call(t)){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=e(t[r]));return n}return Array.isArray(t)?t.map(e):t}},14270:(e,t,n)=>{"use strict";n.d(t,{Q:()=>rx});var r,i,o,s,u,a,c,l,d,f,p,h=n(71450),v=n(91905),g=function(e){return function(){var t=(0,h.Cl)({},e.config);return{logger:t.loggerProvider,logLevel:t.logLevel}}},y=function(e,t){var n,r;t=(t=t.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"");try{for(var i=(0,h.Ju)(t.split(".")),o=i.next();!o.done;o=i.next()){var s=o.value;if(!(s in e))return;e=e[s]}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return e},m=function(e,t){return function(){var n,r,i={};try{for(var o=(0,h.Ju)(t),s=o.next();!s.done;s=o.next()){var u=s.value;i[u]=y(e,u)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i}},b=function(e,t,n,r,i){return void 0===i&&(i=null),function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];var u=n(),a=u.logger,c=u.logLevel;if(c&&c<v.$.Debug||!c||!a)return e.apply(i,o);var l={type:"invoke public method",name:t,args:o,stacktrace:(Error().stack||"").split("\n").slice(3).map(function(e){return e.trim()}),time:{start:new Date().toISOString()},states:{}};r&&l.states&&(l.states.before=r());var d=e.apply(i,o);return d&&d.promise?d.promise.then(function(){r&&l.states&&(l.states.after=r()),l.time&&(l.time.end=new Date().toISOString()),a.debug(JSON.stringify(l,null,2))}):(r&&l.states&&(l.states.after=r()),l.time&&(l.time.end=new Date().toISOString()),a.debug(JSON.stringify(l,null,2))),d}},w=function(e){return{promise:e||Promise.resolve()}},_=function(){var e="ampIntegrationContext";return"undefined"!=typeof globalThis&&void 0!==globalThis[e]?globalThis[e]:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof self?self:void 0!==n.g?n.g:void 0},S=function(){var e,t=_();return(null==(e=null==t?void 0:t.location)?void 0:e.search)?t.location.search.substring(1).split("&").filter(Boolean).reduce(function(e,t){var n=t.split("=",2),r=E(n[0]),i=E(n[1]);return i&&(e[r]=i),e},{}):{}},E=function(e){void 0===e&&(e="");try{return decodeURIComponent(e)}catch(e){return""}},I=function(){function e(){}return e.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:k(),platform:"Web",os:void 0,deviceModel:void 0}},e}(),k=function(){return"undefined"!=typeof navigator&&(navigator.languages&&navigator.languages[0]||navigator.language)||""},C=function(){function e(){this.queue=[]}return e.prototype.logEvent=function(e){this.receiver?this.receiver(e):this.queue.length<512&&this.queue.push(e)},e.prototype.setEventReceiver=function(e){this.receiver=e,this.queue.length>0&&(this.queue.forEach(function(t){e(t)}),this.queue=[])},e}(),x=function(){return(x=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function O(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);
1if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function P(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}"function"==typeof SuppressedError&&SuppressedError;var T=function(e,t){var n,r,i=typeof e;if(i!==typeof t)return!1;try{for(var o=O(["string","number","boolean","undefined"]),s=o.next();!s.done;s=o.next())if(s.value===i)return e===t}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}if(null==e&&null==t)return!0;if(null==e||null==t||e.length!==t.length)return!1;var u=Array.isArray(e),a=Array.isArray(t);if(u!==a)return!1;if(u&&a){for(var c=0;c<e.length;c++)if(!T(e[c],t[c]))return!1}else{if(!T(Object.keys(e).sort(),Object.keys(t).sort()))return!1;var l=!0;return Object.keys(e).forEach(function(n){T(e[n],t[n])||(l=!1)}),l}return!0};Object.entries||(Object.entries=function(e){for(var t=Object.keys(e),n=t.length,r=Array(n);n--;)r[n]=[t[n],e[t[n]]];return r});var A=function(){function e(){this.identity={userProperties:{}},this.listeners=new Set}return e.prototype.editIdentity=function(){var e=this,t=x({},this.identity.userProperties),n=x(x({},this.identity),{userProperties:t});return{setUserId:function(e){return n.userId=e,this},setDeviceId:function(e){return n.deviceId=e,this},setUserProperties:function(e){return n.userProperties=e,this},setOptOut:function(e){return n.optOut=e,this},updateUserProperties:function(e){var t,r,i,o,s,u,a=n.userProperties||{};try{for(var c=O(Object.entries(e)),l=c.next();!l.done;l=c.next()){var d=P(l.value,2),f=d[0],p=d[1];switch(f){case"$set":try{for(var h=(i=void 0,O(Object.entries(p))),v=h.next();!v.done;v=h.next()){var g=P(v.value,2),y=g[0],m=g[1];a[y]=m}}catch(e){i={error:e}}finally{try{v&&!v.done&&(o=h.return)&&o.call(h)}finally{if(i)throw i.error}}break;case"$unset":try{for(var b=(s=void 0,O(Object.keys(p))),w=b.next();!w.done;w=b.next()){var y=w.value;delete a[y]}}catch(e){s={error:e}}finally{try{w&&!w.done&&(u=b.return)&&u.call(b)}finally{if(s)throw s.error}}break;case"$clearAll":a={}}}}catch(e){t={error:e}}finally{try{l&&!l.done&&(r=c.return)&&r.call(c)}finally{if(t)throw t.error}}return n.userProperties=a,this},commit:function(){return e.setIdentity(n),this}}},e.prototype.getIdentity=function(){return x({},this.identity)},e.prototype.setIdentity=function(e){var t=x({},this.identity);this.identity=x({},e),T(t,this.identity)||this.listeners.forEach(function(t){t(e)})},e.prototype.addIdentityListener=function(e){this.listeners.add(e)},e.prototype.removeIdentityListener=function(e){this.listeners.delete(e)},e}(),H="undefined"!=typeof globalThis?globalThis:void 0!==n.g?n.g:self,R=function(){function e(){this.identityStore=new A,this.eventBridge=new C,this.applicationContextProvider=new I}return e.getInstance=function(t){return H.analyticsConnectorInstances||(H.analyticsConnectorInstances={}),H.analyticsConnectorInstances[t]||(H.analyticsConnectorInstances[t]=new e),H.analyticsConnectorInstances[t]},e}(),j=function(e){return void 0===e&&(e="$default_instance"),R.getInstance(e)},N=function(e,t){j(t).identityStore.editIdentity().setUserId(e).commit()},L=function(e,t){j(t).identityStore.editIdentity().setDeviceId(e).commit()};!function(e){e.Unknown="unknown",e.Skipped="skipped",e.Success="success",e.RateLimit="rate_limit",e.PayloadTooLarge="payload_too_large",e.Invalid="invalid",e.Failed="failed",e.Timeout="Timeout",e.SystemError="SystemError"}(r||(r={}));var M=n(95690),D=function(e,t){var n=Math.max(t,1);return e.reduce(function(e,t,r){var i=Math.floor(r/n);return e[i]||(e[i]=[]),e[i].push(t),e},[])},q=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=r.Unknown),{event:e,code:t,message:n}},U="Amplitude Logger ",F=function(){function e(){this.logLevel=v.$.None}return e.prototype.disable=function(){this.logLevel=v.$.None},e.prototype.enable=function(e){void 0===e&&(e=v.$.Warn),this.logLevel=e},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<v.$.Verbose||console.log("".concat(U,"[Log]: ").concat(e.join(" ")))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<v.$.Warn||console.warn("".concat(U,"[Warn]: ").concat(e.join(" ")))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<v.$.Error||console.error("".concat(U,"[Error]: ").concat(e.join(" ")))},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<v.$.Debug||console.log("".concat(U,"[Debug]: ").concat(e.join(" ")))},e}(),Y=function(){return{flushMaxRetries:12,flushQueueSize:200,flushIntervalMillis:1e4,instanceName:"$default_instance",logLevel:v.$.Warn,loggerProvider:new F,offline:!1,optOut:!1,serverUrl:M.mJ,serverZone:"US",useBatch:!1}},z=function(){function e(e){this._optOut=!1;var t,n,r,i,o=Y();this.apiKey=e.apiKey,this.flushIntervalMillis=null!=(t=e.flushIntervalMillis)?t:o.flushIntervalMillis,this.flushMaxRetries=e.flushMaxRetries||o.flushMaxRetries,this.flushQueueSize=e.flushQueueSize||o.flushQueueSize,this.instanceName=e.instanceName||o.instanceName,this.loggerProvider=e.loggerProvider||o.loggerProvider,this.logLevel=null!=(n=e.logLevel)?n:o.logLevel,this.minIdLength=e.minIdLength,this.plan=e.plan,this.ingestionMetadata=e.ingestionMetadata,this.offline=void 0!==e.offline?e.offline:o.offline,this.optOut=null!=(r=e.optOut)?r:o.optOut,this.serverUrl=e.serverUrl,this.serverZone=e.serverZone||o.serverZone,this.storageProvider=e.storageProvider,this.transportProvider=e.transportProvider,this.useBatch=null!=(i=e.useBatch)?i:o.useBatch,this.loggerProvider.enable(this.logLevel);var s=$(e.serverUrl,e.serverZone,e.useBatch);this.serverZone=s.serverZone,this.serverUrl=s.serverUrl}return Object.defineProperty(e.prototype,"optOut",{get:function(){return this._optOut},set:function(e){this._optOut=e}
1,enumerable:!1,configurable:!0}),e}(),$=function(e,t,n){if(void 0===e&&(e=""),void 0===t&&(t=Y().serverZone),void 0===n&&(n=Y().useBatch),e)return{serverUrl:e,serverZone:void 0};var r,i=["US","EU"].includes(t)?t:Y().serverZone;return{serverZone:i,serverUrl:(r=n,"EU"===i?r?M.OP:M.bu:r?M.pL:M.mJ)}},K=function(){function e(){this.sdk={metrics:{histogram:{}}}}return e.prototype.recordHistogram=function(e,t){this.sdk.metrics.histogram[e]=t},e}(),J=(0,h.fX)([],(0,h.zs)(Array(256).keys()),!1).map(function(e){return e.toString(16).padStart(2,"0")}),V=function(e){var t,n=_();if(!(null==(t=null==n?void 0:n.crypto)?void 0:t.getRandomValues))return e?(e^16*Math.random()>>e/4).toString(16):(String(1e7)+String(-1e3)+String(-4e3)+String(-8e3)+String(-1e11)).replace(/[018]/g,V);var r=n.crypto.getRandomValues(new Uint8Array(16));return r[6]=15&r[6]|64,r[8]=63&r[8]|128,(0,h.fX)([],(0,h.zs)(r.entries()),!1).map(function(e){var t=(0,h.zs)(e,2),n=t[0],r=t[1];return[4,6,8,10].includes(n)?"-".concat(J[r]):J[r]}).join("")};function B(e){var t="";try{"body"in e&&(t=JSON.stringify(e.body,null,2))}catch(e){}return t}var W=function(){function e(){this.name="amplitude",this.type="destination",this.retryTimeout=1e3,this.throttleTimeout=3e4,this.storageKey="",this.scheduleId=null,this.scheduledTimeout=0,this.flushId=null,this.queue=[]}return e.prototype.setup=function(e){var t;return(0,h.sH)(this,void 0,void 0,function(){var n,r=this;return(0,h.YH)(this,function(i){switch(i.label){case 0:return this.config=e,this.storageKey="".concat(M.fS,"_").concat(this.config.apiKey.substring(0,10)),[4,null==(t=this.config.storageProvider)?void 0:t.get(this.storageKey)];case 1:return(n=i.sent())&&n.length>0&&Promise.all(n.map(function(e){return r.execute(e)})).catch(),[2,Promise.resolve(void 0)]}})})},e.prototype.execute=function(e){var t=this;return e.insert_id||(e.insert_id=V()),new Promise(function(n){t.queue.push({event:e,attempts:0,callback:function(e){return n(e)},timeout:0}),t.schedule(t.config.flushIntervalMillis),t.saveEvents()})},e.prototype.removeEventsExceedFlushMaxRetries=function(e){var t=this;return e.filter(function(e){return e.attempts+=1,e.attempts<t.config.flushMaxRetries||(t.fulfillRequest([e],500,"Event rejected due to exceeded retry count"),!1)})},e.prototype.scheduleEvents=function(e){var t=this;e.forEach(function(e){t.schedule(0===e.timeout?t.config.flushIntervalMillis:e.timeout)})},e.prototype.schedule=function(e){var t=this;if(!this.config.offline&&(null===this.scheduleId||this.scheduleId&&e>this.scheduledTimeout)){this.scheduleId&&clearTimeout(this.scheduleId),this.scheduledTimeout=e,this.scheduleId=setTimeout(function(){t.queue=t.queue.map(function(e){return e.timeout=0,e}),t.flush(!0)},e);return}},e.prototype.resetSchedule=function(){this.scheduleId=null,this.scheduledTimeout=0},e.prototype.flush=function(e){return void 0===e&&(e=!1),(0,h.sH)(this,void 0,void 0,function(){var t,n,r=this;return(0,h.YH)(this,function(i){switch(i.label){case 0:if(this.config.offline)return this.resetSchedule(),this.config.loggerProvider.debug("Skipping flush while offline."),[2];if(this.flushId)return this.resetSchedule(),this.config.loggerProvider.debug("Skipping flush because previous flush has not resolved."),[2];return this.flushId=this.scheduleId,this.resetSchedule(),t=[],n=[],this.queue.forEach(function(e){return 0===e.timeout?t.push(e):n.push(e)}),[4,D(t,this.config.flushQueueSize).reduce(function(t,n){return(0,h.sH)(r,void 0,void 0,function(){return(0,h.YH)(this,function(r){switch(r.label){case 0:return[4,t];case 1:return r.sent(),[4,this.send(n,e)];case 2:return[2,r.sent()]}})})},Promise.resolve())];case 1:return i.sent(),this.flushId=null,this.scheduleEvents(this.queue),[2]}})})},e.prototype.send=function(e,t){return void 0===t&&(t=!0),(0,h.sH)(this,void 0,void 0,function(){var n,i,o,s;return(0,h.YH)(this,function(u){switch(u.label){case 0:if(!this.config.apiKey)return[2,this.fulfillRequest(e,400,"Event rejected due to missing API key")];n={api_key:this.config.apiKey,events:e.map(function(e){var t=e.event;return t.extra,(0,h.Tt)(t,["extra"])}),options:{min_id_length:this.config.minIdLength},client_upload_time:new Date().toISOString(),request_metadata:this.config.requestMetadata},this.config.requestMetadata=new K,u.label=1;case 1:return u.trys.push([1,3,,4]),i=$(this.config.serverUrl,this.config.serverZone,this.config.useBatch).serverUrl,[4,this.config.transportProvider.send(i,n)];case 2:if(null===(o=u.sent()))return this.fulfillRequest(e,0,"Unexpected error occurred"),[2];if(!t)return"body"in o?this.fulfillRequest(e,o.statusCode,"".concat(o.status,": ").concat(B(o))):this.fulfillRequest(e,o.statusCode,o.status),[2];return this.handleResponse(o,e),[3,4];case 3:var a;return s=(a=u.sent())instanceof Error?a.message:String(a),this.config.loggerProvider.error(s),this.handleResponse({status:r.Failed,statusCode:0},e),[3,4];case 4:return[2]}})})},e.prototype.handleResponse=function(e,t){var n=e.status;switch(n){case r.Success:this.handleSuccessResponse(e,t);break;case r.Invalid:this.handleInvalidResponse(e,t);break;case r.PayloadTooLarge:this.handlePayloadTooLargeResponse(e,t);break;case r.RateLimit:this.handleRateLimitResponse(e,t);break;default:this.config.loggerProvider.warn("{code: 0, error: \"Status '".concat(n,"' provided for ").concat(t.length,' events"}')),this.handleOtherResponse(t)}},e.prototype.handleSuccessResponse=function(e,t){this.fulfillRequest(t,e.statusCode,"Event tracked successfully")},e.prototype.handleInvalidResponse=function(e,t){var n=this;if(e.body.missingField||e.body.error.startsWith("Invalid API key"))return void this.fulfillRequest(t,e.statusCode,e.body.error);var r=new Set((0,h.fX)((0,h.fX)((0,h.fX)((0,h.fX)([],(0,h.zs)(Object.values(e.body.eventsWithInvalidFields)),!1),(0,h.zs)(Object.values(e.body.eventsWithMissingFields)),!1),(0,h.zs)(Object.values(e.body.eventsWithInvalidIdLengths)),!1),(0,h.zs)(e.body.silencedEvents),!1).flat()),i=t.filter(function(t,i){return!r.has(i)||void n.fulfillRequest([t],e.statusCode,e.body.error)});i.length>0&&this.config.loggerProvider.warn(B(e));
1var o=this.removeEventsExceedFlushMaxRetries(i);this.scheduleEvents(o)},e.prototype.handlePayloadTooLargeResponse=function(e,t){if(1===t.length)return void this.fulfillRequest(t,e.statusCode,e.body.error);this.config.loggerProvider.warn(B(e)),this.config.flushQueueSize/=2;var n=this.removeEventsExceedFlushMaxRetries(t);this.scheduleEvents(n)},e.prototype.handleRateLimitResponse=function(e,t){var n=this,r=Object.keys(e.body.exceededDailyQuotaUsers),i=Object.keys(e.body.exceededDailyQuotaDevices),o=e.body.throttledEvents,s=new Set(r),u=new Set(i),a=new Set(o),c=t.filter(function(t,r){return t.event.user_id&&s.has(t.event.user_id)||t.event.device_id&&u.has(t.event.device_id)?void n.fulfillRequest([t],e.statusCode,e.body.error):(a.has(r)&&(t.timeout=n.throttleTimeout),!0)});c.length>0&&this.config.loggerProvider.warn(B(e));var l=this.removeEventsExceedFlushMaxRetries(c);this.scheduleEvents(l)},e.prototype.handleOtherResponse=function(e){var t=this,n=e.map(function(e){return e.timeout=e.attempts*t.retryTimeout,e}),r=this.removeEventsExceedFlushMaxRetries(n);this.scheduleEvents(r)},e.prototype.fulfillRequest=function(e,t,n){this.removeEvents(e),e.forEach(function(e){return e.callback(q(e.event,t,n))})},e.prototype.saveEvents=function(){if(this.config.storageProvider){var e=this.queue.map(function(e){return e.event});this.config.storageProvider.set(this.storageKey,e)}},e.prototype.removeEvents=function(e){this.queue=this.queue.filter(function(t){return!e.some(function(e){return e.event.insert_id===t.event.insert_id})}),this.saveEvents()},e}(),X=function(){function e(){this.name="identity",this.type="before",this.identityStore=j().identityStore}return e.prototype.execute=function(e){return(0,h.sH)(this,void 0,void 0,function(){var t;return(0,h.YH)(this,function(n){return(t=e.user_properties)&&this.identityStore.editIdentity().updateUserProperties(t).commit(),[2,e]})})},e.prototype.setup=function(e){return(0,h.sH)(this,void 0,void 0,function(){return(0,h.YH)(this,function(t){return e.instanceName&&(this.identityStore=j(e.instanceName).identityStore),[2]})})},e}(),Q=n(39491),G=n(16069),Z=function(){function e(){this.productId="",this.quantity=1,this.price=0}return e.prototype.setProductId=function(e){return this.productId=e,this},e.prototype.setQuantity=function(e){return e>0&&(this.quantity=e),this},e.prototype.setPrice=function(e){return this.price=e,this},e.prototype.setRevenueType=function(e){return this.revenueType=e,this},e.prototype.setCurrency=function(e){return this.currency=e,this},e.prototype.setRevenue=function(e){return this.revenue=e,this},e.prototype.setReceipt=function(e){return this.receipt=e,this},e.prototype.setReceiptSig=function(e){return this.receiptSig=e,this},e.prototype.setEventProperties=function(e){return(0,G.a)(e)&&(this.properties=e),this},e.prototype.getEventProperties=function(){var e=this.properties?(0,h.Cl)({},this.properties):{};return e[i.REVENUE_PRODUCT_ID]=this.productId,e[i.REVENUE_QUANTITY]=this.quantity,e[i.REVENUE_PRICE]=this.price,e[i.REVENUE_TYPE]=this.revenueType,e[i.REVENUE_CURRENCY]=this.currency,e[i.REVENUE]=this.revenue,e[i.RECEIPT]=this.receipt,e[i.RECEIPT_SIG]=this.receiptSig,e},e}();!function(e){e.REVENUE_PRODUCT_ID="$productId",e.REVENUE_QUANTITY="$quantity",e.REVENUE_PRICE="$price",e.REVENUE_TYPE="$revenueType",e.REVENUE_CURRENCY="$currency",e.REVENUE="$revenue",e.RECEIPT="$receipt",e.RECEIPT_SIG="$receiptSig"}(i||(i={}));var ee=function(e,t){return void 0===t&&(t=Date.now()),Date.now()-t>e};!function(e){e.SET="$set",e.SET_ONCE="$setOnce",e.ADD="$add",e.APPEND="$append",e.PREPEND="$prepend",e.REMOVE="$remove",e.PREINSERT="$preInsert",e.POSTINSERT="$postInsert",e.UNSET="$unset",e.CLEAR_ALL="$clearAll"}(o||(o={})),function(e){e.IDENTIFY="$identify",e.GROUP_IDENTIFY="$groupidentify",e.REVENUE="revenue_amount"}(s||(s={}));var et=function(){function e(e){this.client=e,this.queue=[],this.applying=!1,this.plugins=[]}return e.prototype.register=function(e,t){var n,r;return(0,h.sH)(this,void 0,void 0,function(){return(0,h.YH)(this,function(i){switch(i.label){case 0:if(this.plugins.some(function(t){return t.name===e.name}))return t.loggerProvider.warn("Plugin with name ".concat(e.name," already exists, skipping registration")),[2];return void 0===e.name&&(e.name=V(),t.loggerProvider.warn("Plugin name is undefined. \n      Generating a random UUID for plugin name: ".concat(e.name,". \n      Set a name for the plugin to prevent it from being added multiple times."))),e.type=null!=(n=e.type)?n:"enrichment",[4,null==(r=e.setup)?void 0:r.call(e,t,this.client)];case 1:return i.sent(),this.plugins.push(e),[2]}})})},e.prototype.deregister=function(e,t){var n;return(0,h.sH)(this,void 0,void 0,function(){var r,i;return(0,h.YH)(this,function(o){switch(o.label){case 0:if(-1===(r=this.plugins.findIndex(function(t){return t.name===e})))return t.loggerProvider.warn("Plugin with name ".concat(e," does not exist, skipping deregistration")),[2];return i=this.plugins[r],this.plugins.splice(r,1),[4,null==(n=i.teardown)?void 0:n.call(i)];case 1:return o.sent(),[2]}})})},e.prototype.reset=function(e){this.applying=!1,this.plugins.map(function(e){var t;return null==(t=e.teardown)?void 0:t.call(e)}),this.plugins=[],this.client=e},e.prototype.push=function(e){var t=this;return new Promise(function(n){t.queue.push([e,n]),t.scheduleApply(0)})},e.prototype.scheduleApply=function(e){var t=this;this.applying||(this.applying=!0,setTimeout(function(){t.apply(t.queue.shift()).then(function(){t.applying=!1,t.queue.length>0&&t.scheduleApply(0)})},e))},e.prototype.apply=function(e){return(0,h.sH)(this,void 0,void 0,function(){var t,n,r,i,o,s,u,a,c,l,d,f,p,v;return(0,h.YH)(this,function(g){switch(g.label){case 0:if(!e)return[2];
1t=(0,h.zs)(e,1)[0],n=(0,h.zs)(e,2)[1],r=this.plugins.filter(function(e){return"before"===e.type}),g.label=1;case 1:g.trys.push([1,6,7,8]),o=(i=(0,h.Ju)(r)).next(),g.label=2;case 2:if(o.done)return[3,5];if(!(s=o.value).execute)return[3,4];return[4,s.execute((0,h.Cl)({},t))];case 3:if(null===(u=g.sent()))return n({event:t,code:0,message:""}),[2];t=u,g.label=4;case 4:return o=i.next(),[3,2];case 5:return[3,8];case 6:return d={error:g.sent()},[3,8];case 7:try{o&&!o.done&&(f=i.return)&&f.call(i)}finally{if(d)throw d.error}return[7];case 8:a=this.plugins.filter(function(e){return"enrichment"===e.type||void 0===e.type}),g.label=9;case 9:g.trys.push([9,14,15,16]),l=(c=(0,h.Ju)(a)).next(),g.label=10;case 10:if(l.done)return[3,13];if(!(s=l.value).execute)return[3,12];return[4,s.execute((0,h.Cl)({},t))];case 11:if(null===(u=g.sent()))return n({event:t,code:0,message:""}),[2];t=u,g.label=12;case 12:return l=c.next(),[3,10];case 13:return[3,16];case 14:return p={error:g.sent()},[3,16];case 15:try{l&&!l.done&&(v=c.return)&&v.call(c)}finally{if(p)throw p.error}return[7];case 16:return Promise.all(this.plugins.filter(function(e){return"destination"===e.type}).map(function(e){var n=(0,h.Cl)({},t);return e.execute(n).catch(function(e){return q(n,0,String(e))})})).then(function(e){var r=(0,h.zs)(e,1)[0]||q(t,100,"Event not tracked, no destination plugins on the instance");n(r)}),[2]}})})},e.prototype.flush=function(){return(0,h.sH)(this,void 0,void 0,function(){var e,t=this;return(0,h.YH)(this,function(n){switch(n.label){case 0:return e=this.queue,this.queue=[],[4,Promise.all(e.map(function(e){return t.apply(e)}))];case 1:return n.sent(),[4,Promise.all(this.plugins.filter(function(e){return"destination"===e.type}).map(function(e){return e.flush&&e.flush()}))];case 2:return n.sent(),[2]}})})},e.prototype.onIdentityChanged=function(e){this.plugins.forEach(function(t){var n;null==(n=t.onIdentityChanged)||n.call(t,e)})},e.prototype.onSessionIdChanged=function(e){this.plugins.forEach(function(t){var n;null==(n=t.onSessionIdChanged)||n.call(t,e)})},e.prototype.onOptOutChanged=function(e){this.plugins.forEach(function(t){var n;null==(n=t.onOptOutChanged)||n.call(t,e)})},e}(),en=function(e,t){return(0,h.Cl)((0,h.Cl)({},t),{event_type:s.IDENTIFY,user_properties:e.getUserProperties()})},er=function(e,t,n,r){var i;return(0,h.Cl)((0,h.Cl)({},r),{event_type:s.GROUP_IDENTIFY,group_properties:n.getUserProperties(),groups:((i={})[e]=t,i)})},ei=function(e,t,n){var r,i=new Q.T$;return i.set(e,t),(0,h.Cl)((0,h.Cl)({},n),{event_type:s.IDENTIFY,user_properties:i.getUserProperties(),groups:((r={})[e]=t,r)})},eo=function(){function e(e){void 0===e&&(e="$default"),this.initializing=!1,this.isReady=!1,this.q=[],this.dispatchQ=[],this.logEvent=this.track.bind(this),this.timeline=new et(this),this.name=e}return e.prototype._init=function(e){return(0,h.sH)(this,void 0,void 0,function(){return(0,h.YH)(this,function(t){switch(t.label){case 0:return this.config=e,this.timeline.reset(this),[4,this.runQueuedFunctions("q")];case 1:return t.sent(),this.isReady=!0,[2]}})})},e.prototype.runQueuedFunctions=function(e){return(0,h.sH)(this,void 0,void 0,function(){var t,n,r,i,o,s;return(0,h.YH)(this,function(u){switch(u.label){case 0:t=this[e],this[e]=[],u.label=1;case 1:u.trys.push([1,8,9,10]),r=(n=(0,h.Ju)(t)).next(),u.label=2;case 2:if(r.done)return[3,7];if(!((i=(0,r.value)())&&"promise"in i))return[3,4];return[4,i.promise];case 3:return u.sent(),[3,6];case 4:return[4,i];case 5:u.sent(),u.label=6;case 6:return r=n.next(),[3,2];case 7:return[3,10];case 8:return o={error:u.sent()},[3,10];case 9:try{r&&!r.done&&(s=n.return)&&s.call(n)}finally{if(o)throw o.error}return[7];case 10:if(!this[e].length)return[3,12];return[4,this.runQueuedFunctions(e)];case 11:u.sent(),u.label=12;case 12:return[2]}})})},e.prototype.track=function(e,t,n){var r=(0,h.Cl)((0,h.Cl)((0,h.Cl)({},"string"==typeof e?{event_type:e}:e),n),t&&{event_properties:t});return w(this.dispatch(r))},e.prototype.identify=function(e,t){var n=en(e,t);return w(this.dispatch(n))},e.prototype.groupIdentify=function(e,t,n,r){var i=er(e,t,n,r);return w(this.dispatch(i))},e.prototype.setGroup=function(e,t,n){var r=ei(e,t,n);return w(this.dispatch(r))},e.prototype.revenue=function(e,t){var n=(0,h.Cl)((0,h.Cl)({},t),{event_type:s.REVENUE,event_properties:e.getEventProperties()});return w(this.dispatch(n))},e.prototype.add=function(e){return this.isReady?this._addPlugin(e):(this.q.push(this._addPlugin.bind(this,e)),w())},e.prototype._addPlugin=function(e){return w(this.timeline.register(e,this.config))},e.prototype.remove=function(e){return this.isReady?this._removePlugin(e):(this.q.push(this._removePlugin.bind(this,e)),w())},e.prototype._removePlugin=function(e){return w(this.timeline.deregister(e,this.config))},e.prototype.dispatchWithCallback=function(e,t){if(!this.isReady)return t(q(e,0,"Client not initialized"));this.process(e).then(t)},e.prototype.dispatch=function(e){return(0,h.sH)(this,void 0,void 0,function(){var t=this;return(0,h.YH)(this,function(n){return this.isReady?[2,this.process(e)]:[2,new Promise(function(n){t.dispatchQ.push(t.dispatchWithCallback.bind(t,e,n))})]})})},e.prototype.getOperationAppliedUserProperties=function(e){var t={};if(void 0===e)return t;var n={};return Object.keys(e).forEach(function(t){Object.values(o).includes(t)||(n[t]=e[t])}),Q.Se.forEach(function(n){if(Object.keys(e).includes(n)){var r=e[n];switch(n){case o.CLEAR_ALL:Object.keys(t).forEach(function(e){delete t[e]});break;case o.UNSET:Object.keys(r).forEach(function(e){delete t[e]});break;case o.SET:Object.assign(t,r)}}}),Object.assign(t,n),t},e.prototype.process=function(e){return(0,h.sH)(this,void 0,void 0,function(){var t,n,r;return(0,h.YH)(this,function(i){switch(i.label){case 0:if(i.trys.push([0,2,,3]),this.config.optOut)return[2,q(e,0,"Event skipped due to optOut config")];return e.event_type===s.IDENTIFY&&(t=this.getOperationAppliedUserProperties(e.user_properties),this.timeline.onIdentityChanged({userProperties:t})),[4,this.timeline.push(e)];case 1:return 200===(n=i.sent()).code?this.config.loggerProvider.log(n.message):100===n.code?this.config.loggerProvider.warn(n.message):this.config.loggerProvider.error(n.message),[2,n];case 2:return r=String(i.sent()),this.config.loggerProvider.error(r),[2,n=q(e,0,r)];case 3:return[2]}})})},e.prototype.setOptOut=function(e){if(!this.isReady)return void this.q.push(this._setOptOut.bind(this,!!e));this._setOptOut(e)},e.prototype._setOptOut=function(e){this.config.optOut!==e&&(this.timeline.onOptOutChanged(e),this.config.optOut=!!e)},e.prototype.flush=function(){return w(this.timeline.flush())},e.prototype.plugin=function(e){var t=this.timeline.plugins.find(function(t){return t.name===e});return void 0===t?void this.config.loggerProvider.debug("Cannot find plugin with name ".concat(e)):t},e.prototype.plugins=function(e){return this.timeline.plugins.filter(function(t){return t instanceof e})},e}(),es=function(e,t){return"boolean"==typeof e?e:(null==e?void 0:e[t])!==!1},eu=function(e){return es(e,"attribution")},ea=function(e){return es(e,"pageViews")},ec=function(e){return es(e,"sessions")},el=function(e){return"object"==typeof e&&(!0===e.networkTracking||"object"==typeof e.networkTracking)},ed=function(e){return"boolean"==typeof e?e:"object"==typeof e&&(!0===e.elementInteractions||"object"==typeof e.elementInteractions)},ef=function(e){if(ed(e.autocapture)&&"object"==typeof e.autocapture&&"object"==typeof e.autocapture.elementInteractions)return e.autocapture.elementInteractions},ep=function(e){if(el(e.autocapture)){if("object"==typeof e.autocapture&&"object"==typeof e.autocapture.
1networkTracking)return e.autocapture.networkTracking;else if(e.networkTrackingOptions)return e.networkTrackingOptions}},eh=function(e){var t,n=function(){return!1},r=void 0,i=e.pageCounter;return ea(e.defaultTracking)&&(n=void 0,t=void 0,e.defaultTracking&&"object"==typeof e.defaultTracking&&e.defaultTracking.pageViews&&"object"==typeof e.defaultTracking.pageViews&&("trackOn"in e.defaultTracking.pageViews&&(n=e.defaultTracking.pageViews.trackOn),"trackHistoryChanges"in e.defaultTracking.pageViews&&(r=e.defaultTracking.pageViews.trackHistoryChanges),"eventType"in e.defaultTracking.pageViews&&e.defaultTracking.pageViews.eventType&&(t=e.defaultTracking.pageViews.eventType))),{trackOn:n,trackHistoryChanges:r,eventType:t,pageCounter:i}},ev=function(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.name,o=r.args,s=r.resolve,u=e&&e[i];if("function"==typeof u){var a=u.apply(e,o);"function"==typeof s&&s(null==a?void 0:a.promise)}}return e},eg=function(e){return e&&void 0!==e._q},ey=function(){if("undefined"==typeof navigator)return"";var e,t,n,r,i=navigator.userLanguage;return null!=(r=null!=(n=null!=(t=null==(e=navigator.languages)?void 0:e[0])?t:navigator.language)?n:i)?r:""},em="2.17.8",eb=function(){function e(){this.name="@amplitude/plugin-context-browser",this.type="before",this.library="".concat("amplitude-ts","/").concat(em),"undefined"!=typeof navigator&&(this.userAgent=navigator.userAgent)}return e.prototype.setup=function(e){return this.config=e,Promise.resolve(void 0)},e.prototype.execute=function(e){var t,n;return(0,h.sH)(this,void 0,void 0,function(){var r,i,o;return(0,h.YH)(this,function(s){return r=new Date().getTime(),i=null!=(t=this.config.lastEventId)?t:-1,o=null!=(n=e.event_id)?n:i+1,this.config.lastEventId=o,e.time||(this.config.lastEventTime=r),[2,(0,h.Cl)((0,h.Cl)((0,h.Cl)((0,h.Cl)((0,h.Cl)((0,h.Cl)((0,h.Cl)((0,h.Cl)({user_id:this.config.userId,device_id:this.config.deviceId,session_id:this.config.sessionId,time:r},this.config.appVersion&&{app_version:this.config.appVersion}),this.config.trackingOptions.platform&&{platform:"Web"}),this.config.trackingOptions.language&&{language:ey()}),this.config.trackingOptions.ipAddress&&{ip:"$remote"}),{insert_id:V(),partner_id:this.config.partnerId,plan:this.config.plan}),this.config.ingestionMetadata&&{ingestion_metadata:{source_name:this.config.ingestionMetadata.sourceName,source_version:this.config.ingestionMetadata.sourceVersion}}),e),{event_id:o,library:this.library,user_agent:this.userAgent})]})})},e}(),ew=function(){function e(){this.memoryStorage=new Map}return e.prototype.isEnabled=function(){return(0,h.sH)(this,void 0,void 0,function(){return(0,h.YH)(this,function(e){return[2,!0]})})},e.prototype.get=function(e){return(0,h.sH)(this,void 0,void 0,function(){return(0,h.YH)(this,function(t){return[2,this.memoryStorage.get(e)]})})},e.prototype.getRaw=function(e){return(0,h.sH)(this,void 0,void 0,function(){var t;return(0,h.YH)(this,function(n){switch(n.label){case 0:return[4,this.get(e)];case 1:return[2,(t=n.sent())?JSON.stringify(t):void 0]}})})},e.prototype.set=function(e,t){return(0,h.sH)(this,void 0,void 0,function(){return(0,h.YH)(this,function(n){return this.memoryStorage.set(e,t),[2]})})},e.prototype.remove=function(e){return(0,h.sH)(this,void 0,void 0,function(){return(0,h.YH)(this,function(t){return this.memoryStorage.delete(e),[2]})})},e.prototype.reset=function(){return(0,h.sH)(this,void 0,void 0,function(){return(0,h.YH)(this,function(e){return this.memoryStorage.clear(),[2]})})},e}(),e_=function(e,t,n){return void 0===t&&(t=""),void 0===n&&(n=10),[M.r,t,e.substring(0,n)].filter(Boolean).join("_")},eS=function(){function e(e){this.options=(0,h.Cl)({},e)}return e.prototype.isEnabled=function(){return(0,h.sH)(this,void 0,void 0,function(){var t,n;return(0,h.YH)(this,function(r){switch(r.label){case 0:if(!_())return[2,!1];e.testValue=String(Date.now()),t=new e(this.options),n="AMP_TEST",r.label=1;case 1:return r.trys.push([1,4,5,7]),[4,t.set(n,e.testValue)];case 2:return r.sent(),[4,t.get(n)];case 3:return[2,r.sent()===e.testValue];case 4:return r.sent(),[2,!1];case 5:return[4,t.remove(n)];case 6:return r.sent(),[7];case 7:return[2]}})})},e.prototype.get=function(e){var t;return(0,h.sH)(this,void 0,void 0,function(){var n,r;return(0,h.YH)(this,function(i){switch(i.label){case 0:return[4,this.getRaw(e)];case 1:if(!(n=i.sent()))return[2,void 0];try{if(r=null!=(t=eE(n))?t:eI(n),void 0===r)return console.error("Amplitude Logger [Error]: Failed to decode cookie value for key: ".concat(e,", value: ").concat(n)),[2,void 0];return[2,JSON.parse(r)]}catch(t){return console.error("Amplitude Logger [Error]: Failed to parse cookie value for key: ".concat(e,", value: ").concat(n)),[2,void 0]}}})})},e.prototype.getRaw=function(e){var t,n;return(0,h.sH)(this,void 0,void 0,function(){var r,i;return(0,h.YH)(this,function(o){return(i=(null!=(n=null==(t=null==(r=_())?void 0:r.document)?void 0:t.cookie.split("; "))?n:[]).find(function(t){return 0===t.indexOf(e+"=")}))?[2,i.substring(e.length+1)]:[2,void 0]})})},e.prototype.set=function(e,t){var n;return(0,h.sH)(this,void 0,void 0,function(){var r,i,o,s,u,a,c;return(0,h.YH)(this,function(l){try{r=null!=(n=this.options.expirationDays)?n:0,i=null!==t?r:-1,o=void 0,i&&((s=new Date).setTime(s.getTime()+24*i*36e5),o=s),u="".concat(e,"=").concat(btoa(encodeURIComponent(JSON.stringify(t)))),o&&(u+="; expires=".concat(o.toUTCString())),u+="; path=/",this.options.domain&&(u+="; domain=".concat(this.options.domain)),this.options.secure&&(u+="; Secure"),this.options.sameSite&&(u+="; SameSite=".concat(this.options.sameSite)),(a=_())&&(a.document.cookie=u)}catch(t){c=t instanceof Error?t.message:String(t),console.error("Amplitude Logger [Error]: Failed to set cookie for key: ".concat(e,". Error: ").concat(c))}return[2]})})},e.prototype.remove=function(e){return(0,h.sH)(this,void 0,void 0,function(){return(0,h.YH)(this,function(t){switch(t.label){case 0:return[4,this.set(e,null)];case 1:return t.sent(),[2]}})})},e.prototype.reset=function(){return(0,h.sH)(this,void 0,void 0,function(){return(0,h.YH)(this,function(e){return[2]})})},e}(),eE=function(e){try{return decodeURIComponent(atob(e))}catch(e){return}},eI=function(e){try{return decodeURIComponent(atob(decodeURIComponent(e)))}catch(e){return}},ek=function(){function e(){}return e.prototype.send=function(e,t){return Promise.resolve(null)},e.prototype.buildResponse=function(e){if("object"!=typeof e)return null;var t,n,i,o,s,u,a,c,l,d,f,p,h,v,g,y,m,b,w,_,S,E,I=e.code||0,k=this.buildStatus(I);switch(k){case r.Success:return{status:k,statusCode:I,body:{eventsIngested:null!=(t=e.events_ingested)?t:0,payloadSizeBytes:null!=(n=e.payload_size_bytes)?n:0,serverUploadTime:null!=(i=e.server_upload_time)?i:0}};case r.Invalid:return{status:k,statusCode:I,body:{error:null!=(o=e.error)?o:"",missingField:null!=(s=e.missing_field)?s:"",eventsWithInvalidFields:null!=(u=e.events_with_invali
1d_fields)?u:{},eventsWithMissingFields:null!=(a=e.events_with_missing_fields)?a:{},eventsWithInvalidIdLengths:null!=(c=e.events_with_invalid_id_lengths)?c:{},epsThreshold:null!=(l=e.eps_threshold)?l:0,exceededDailyQuotaDevices:null!=(d=e.exceeded_daily_quota_devices)?d:{},silencedDevices:null!=(f=e.silenced_devices)?f:[],silencedEvents:null!=(p=e.silenced_events)?p:[],throttledDevices:null!=(h=e.throttled_devices)?h:{},throttledEvents:null!=(v=e.throttled_events)?v:[]}};case r.PayloadTooLarge:return{status:k,statusCode:I,body:{error:null!=(g=e.error)?g:""}};case r.RateLimit:return{status:k,statusCode:I,body:{error:null!=(y=e.error)?y:"",epsThreshold:null!=(m=e.eps_threshold)?m:0,throttledDevices:null!=(b=e.throttled_devices)?b:{},throttledUsers:null!=(w=e.throttled_users)?w:{},exceededDailyQuotaDevices:null!=(_=e.exceeded_daily_quota_devices)?_:{},exceededDailyQuotaUsers:null!=(S=e.exceeded_daily_quota_users)?S:{},throttledEvents:null!=(E=e.throttled_events)?E:[]}};case r.Timeout:default:return{status:k,statusCode:I}}},e.prototype.buildStatus=function(e){return e>=200&&e<300?r.Success:429===e?r.RateLimit:413===e?r.PayloadTooLarge:408===e?r.Timeout:e>=400&&e<500?r.Invalid:e>=500?r.Failed:r.Unknown},e}(),eC=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,h.C6)(t,e),t.prototype.send=function(e,t){return(0,h.sH)(this,void 0,void 0,function(){var n,r;return(0,h.YH)(this,function(i){switch(i.label){case 0:if("undefined"==typeof fetch)throw Error("FetchTransport is not supported");return[4,fetch(e,{headers:{"Content-Type":"application/json",Accept:"*/*"},body:JSON.stringify(t),method:"POST"})];case 1:return[4,(n=i.sent()).text()];case 2:r=i.sent();try{return[2,this.buildResponse(JSON.parse(r))]}catch(e){return[2,this.buildResponse({code:n.status})]}}})})},t}(ek),ex=function(){function e(e){this.storage=e}return e.prototype.isEnabled=function(){return(0,h.sH)(this,void 0,void 0,function(){var t,n,r;return(0,h.YH)(this,function(i){switch(i.label){case 0:if(!this.storage)return[2,!1];t=String(Date.now()),n=new e(this.storage),r="AMP_TEST",i.label=1;case 1:return i.trys.push([1,4,5,7]),[4,n.set(r,t)];case 2:return i.sent(),[4,n.get(r)];case 3:return[2,i.sent()===t];case 4:return i.sent(),[2,!1];case 5:return[4,n.remove(r)];case 6:return i.sent(),[7];case 7:return[2]}})})},e.prototype.get=function(e){return(0,h.sH)(this,void 0,void 0,function(){var t;return(0,h.YH)(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.getRaw(e)];case 1:if(!(t=n.sent()))return[2,void 0];return[2,JSON.parse(t)];case 2:return n.sent(),console.error("[Amplitude] Error: Could not get value from storage"),[2,void 0];case 3:return[2]}})})},e.prototype.getRaw=function(e){var t;return(0,h.sH)(this,void 0,void 0,function(){return(0,h.YH)(this,function(n){return[2,(null==(t=this.storage)?void 0:t.getItem(e))||void 0]})})},e.prototype.set=function(e,t){var n;return(0,h.sH)(this,void 0,void 0,function(){return(0,h.YH)(this,function(r){try{null==(n=this.storage)||n.setItem(e,JSON.stringify(t))}catch(e){}return[2]})})},e.prototype.remove=function(e){var t;return(0,h.sH)(this,void 0,void 0,function(){return(0,h.YH)(this,function(n){try{null==(t=this.storage)||t.removeItem(e)}catch(e){}return[2]})})},e.prototype.reset=function(){var e;return(0,h.sH)(this,void 0,void 0,function(){return(0,h.YH)(this,function(t){try{null==(e=this.storage)||e.clear()}catch(e){}return[2]})})},e}(),eO=function(e){function t(t){var n,r,i,o=this;try{i=null==(n=_())?void 0:n.localStorage}catch(e){null==(r=null==t?void 0:t.loggerProvider)||r.debug("Failed to access localStorage. error=".concat(JSON.stringify(e))),i=void 0}return(o=e.call(this,i)||this).loggerProvider=null==t?void 0:t.loggerProvider,o}return(0,h.C6)(t,e),t.prototype.set=function(t,n){var r;return(0,h.sH)(this,void 0,void 0,function(){var i;return(0,h.YH)(this,function(o){switch(o.label){case 0:if(!(Array.isArray(n)&&n.length>1e3))return[3,2];return i=n.length-1e3,[4,e.prototype.set.call(this,t,n.slice(0,1e3))];case 1:return o.sent(),null==(r=this.loggerProvider)||r.error("Failed to save ".concat(i," events because the queue length exceeded ").concat(1e3,".")),[3,4];case 2:return[4,e.prototype.set.call(this,t,n)];case 3:o.sent(),o.label=4;case 4:return[2]}})})},t}(ex),eP=function(e){function t(){var t;return e.call(this,null==(t=_())?void 0:t.sessionStorage)||this}return(0,h.C6)(t,e),t}(ex),eT=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={done:4},t}return(0,h.C6)(t,e),t.prototype.send=function(e,t){return(0,h.sH)(this,void 0,void 0,function(){var n=this;return(0,h.YH)(this,function(r){return[2,new Promise(function(r,i){"undefined"==typeof XMLHttpRequest&&i(Error("XHRTransport is not supported."));var o=new XMLHttpRequest;o.open("POST",e,!0),o.onreadystatechange=function(){if(o.readyState===n.state.done){var e=o.responseText;try{r(n.buildResponse(JSON.parse(e)))}catch(e){r(n.buildResponse({code:o.status}))}}},o.setRequestHeader("Content-Type","application/json"),o.setRequestHeader("Accept","*/*"),o.send(JSON.stringify(t))})]})})},t}(ek),eA=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,h.C6)(t,e),t.prototype.send=function(e,t){return(0,h.sH)(this,void 0,void 0,function(){var n=this;return(0,h.YH)(this,function(r){return[2,new Promise(function(r,i){var o=_();if(!(null==o?void 0:o.navigator.sendBeacon))throw Error("SendBeaconTransport is not supported");try{var s=JSON.stringify(t);if(o.navigator.sendBeacon(e,JSON.stringify(t)))return r(n.buildResponse({code:200,events_ingested:t.events.length,payload_size_bytes:s.length,server_upload_time:Date.now()}));return r(n.buildResponse({code:500}))}catch(e){i(e)}})]})})},t}(ek),eH=function(e){var t=parseInt(e,32);if(!isNaN(t))return t},eR=function(e){if(atob&&escape&&e)try{return decodeURIComponent(escape(atob(e)))}catch(e){return}},ej="[Amplitude]",eN="".concat(ej," Form Started"),eL="".concat(ej," Form Submitted"),eM="".concat(ej," File Downloaded"),eD="session_start",eq="session_end",eU="".concat(ej," File Extension"),eF="".concat(ej," File Name"),eY="".concat(ej," Link ID"),ez="".concat(ej," Link Text"),e$="".concat(ej," Link URL"),eK="".concat(ej," Form ID"),eJ="".concat(ej," Form Name"),eV="".concat(ej," Form Destination"),eB="cookie",eW=function(e){function t(t,n,r,i,o,s,u,a,c,l,d,f,p,h,g,y,m,b,w,_,S,E,I,k,C,x,O,P,T,A,H,R,j,N,L){void 0===r&&(r=new ew),void 0===i&&(i={domain:"",expiration:365,sameSite:"Lax",secure:!1,upgrade:!0}),void 0===a&&(a=1e3),void 0===c&&(c=5),void 0===l&&(l=30),void 0===d&&(d=eB),void 0===y&&(y=new F),void 0===m&&(m=v.$.Warn),void 0===w&&(w=!1),void 0===_&&(_=!1),void 0===I&&(I=""),void 0===k&&(k="US"),void 0===x&&(x=18e5),void 0===O&&(O=new eO({loggerProvider:y})),void 0===P&&(P={ipAddress:!0,language:!0,platform:!0}),void 0===T&&(T="fetch"),void 0===A&&(A=!1),void 0===H&&(H=!0);var M=e.call(this,{apiKey:t,storageProvider:O,transportProvider:eQ(T)})||this;return M.apiKey=t,M.appVersion=n,M.cookieOptions=i,M.defaultTracking=o,M.autocapture=s,M.flushIntervalMillis=a,M.flushMaxRetries=c,M.flushQueueSize=l,M.identityStorage=d,M.ingestionMetadata=f,M.instanceName=p,M.loggerProvider=y,M.logLevel=m,M.minIdLength=b,M.offline=w,M.partnerId=S,M.plan=E,M.serverUrl=I,M.serverZone=k,M.sessionTimeout=x,M.storageProvider=O,M.trackingOptions=P,M.transport=T,M.useBatch=A,M.fetchRemoteConfig=H,M.networkTrackingOptions=L,M.version=em,M._optOut=!1,M._cookieStorage=r,M.deviceId=u,M.lastEventId=h,M.lastEventTime=g,M.optOut=_,M.sessionId=C,M.pageCounter=j,M.userId=R,M.debugLogsEnabled=N,M.loggerProvider.enable(N?v.$.Debug:M.logLevel),M.networkTrackingOptions=L,M}return(0,h.C6)(t,e),Object.defineProperty(t.prototype,"cookieStorage",{get:function(){return this._cookieStorage},set:function(e){this._cookieStorage!==e&&(this._cookieStorage=e,this.updateStorage())}
1,enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"deviceId",{get:function(){return this._deviceId},set:function(e){this._deviceId!==e&&(this._deviceId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"userId",{get:function(){return this._userId},set:function(e){this._userId!==e&&(this._userId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sessionId",{get:function(){return this._sessionId},set:function(e){this._sessionId!==e&&(this._sessionId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"optOut",{get:function(){return this._optOut},set:function(e){this._optOut!==e&&(this._optOut=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastEventTime",{get:function(){return this._lastEventTime},set:function(e){this._lastEventTime!==e&&(this._lastEventTime=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastEventId",{get:function(){return this._lastEventId},set:function(e){this._lastEventId!==e&&(this._lastEventId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageCounter",{get:function(){return this._pageCounter},set:function(e){this._pageCounter!==e&&(this._pageCounter=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"debugLogsEnabled",{set:function(e){this._debugLogsEnabled!==e&&(this._debugLogsEnabled=e,this.updateStorage())},enumerable:!1,configurable:!0}),t.prototype.updateStorage=function(){var e={deviceId:this._deviceId,userId:this._userId,sessionId:this._sessionId,optOut:this._optOut,lastEventTime:this._lastEventTime,lastEventId:this._lastEventId,pageCounter:this._pageCounter,debugLogsEnabled:this._debugLogsEnabled};this.cookieStorage.set(e_(this.apiKey),e)},t}(z),eX=function(e,t){switch(void 0===e&&(e=eB),void 0===t&&(t={}),e){case"localStorage":return new eO;case"sessionStorage":return new eP;case"none":return new ew;default:return new eS((0,h.Cl)((0,h.Cl)({},t),{expirationDays:t.expiration}))}},eQ=function(e){return"xhr"===e?new eT:"beacon"===e?new eA:new eC},eG=function(){var e="ampIntegrationContext";return"undefined"!=typeof globalThis&&void 0!==globalThis[e]?globalThis[e]:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof self?self:void 0!==n.g?n.g:void 0},eZ=function(){var e,t=eG();return(null==(e=null==t?void 0:t.location)?void 0:e.search)?t.location.search.substring(1).split("&").filter(Boolean).reduce(function(e,t){var n=t.split("=",2),r=e0(n[0]),i=e0(n[1]);return i&&(e[r]=i),e},{}):{}},e0=function(e){void 0===e&&(e="");try{return decodeURIComponent(e)}catch(e){return""}},e1="dclid",e2="fbclid",e4="gbraid",e3="gclid",e6="ko_click_id",e5="li_fat_id",e7="msclkid",e9="rtd_cid",e8="ttclid",te="twclid",tt="wbraid",tn={utm_campaign:void 0,utm_content:void 0,utm_id:void 0,utm_medium:void 0,utm_source:void 0,utm_term:void 0,referrer:void 0,referring_domain:void 0,dclid:void 0,gbraid:void 0,gclid:void 0,fbclid:void 0,ko_click_id:void 0,li_fat_id:void 0,msclkid:void 0,rtd_cid:void 0,ttclid:void 0,twclid:void 0,wbraid:void 0},tr=function(){function e(){}return e.prototype.parse=function(){return(0,h.sH)(this,void 0,void 0,function(){return(0,h.YH)(this,function(e){return[2,(0,h.Cl)((0,h.Cl)((0,h.Cl)((0,h.Cl)({},tn),this.getUtmParam()),this.getReferrer()),this.getClickIds())]})})},e.prototype.getUtmParam=function(){var e=eZ();return{utm_campaign:e.utm_campaign,utm_content:e.utm_content,utm_id:e.utm_id,utm_medium:e.utm_medium,utm_source:e.utm_source,utm_term:e.utm_term}},e.prototype.getReferrer=function(){var e,t,n={referrer:void 0,referring_domain:void 0};try{n.referrer=document.referrer||void 0,n.referring_domain=null!=(t=null==(e=n.referrer)?void 0:e.split("/")[2])?t:void 0}catch(e){}return n},e.prototype.getClickIds=function(){var e,t=eZ();return(e={})[e1]=t[e1],e[e2]=t[e2],e[e4]=t[e4],e[e3]=t[e3],e[e6]=t[e6],e[e5]=t[e5],e[e7]=t[e7],e[e9]=t[e9],e[e8]=t[e8],e[te]=t[te],e[tt]=t[tt],e},e}();!function(e){e.SET="$set",e.SET_ONCE="$setOnce",e.ADD="$add",e.APPEND="$append",e.PREPEND="$prepend",e.REMOVE="$remove",e.PREINSERT="$preInsert",e.POSTINSERT="$postInsert",e.UNSET="$unset",e.CLEAR_ALL="$clearAll"}(u||(u={})),function(e){e.REVENUE_PRODUCT_ID="$productId",e.REVENUE_QUANTITY="$quantity",e.REVENUE_PRICE="$price",e.REVENUE_TYPE="$revenueType",e.REVENUE_CURRENCY="$currency",e.REVENUE="$revenue"}(a||(a={})),function(e){e.IDENTIFY="$identify",e.GROUP_IDENTIFY="$groupidentify",e.REVENUE="revenue_amount"}(c||(c={}));var ti=function(e){var t={};for(var n in e){var r=e[n];r&&(t[n]=r)}return t},to=function(e){void 0===e&&(e={});var t,n,r=eG(),i=void 0,o=!1,s=e.trackOn,u=e.trackHistoryChanges,a=e.eventType,c=void 0===a?"[Amplitude] Page Viewed":a,l=function(e){var t=e;try{t=decodeURI(e)}catch(e){null==i||i.error("Malformed URI sequence: ",e)}return t},d=function(){return(0,h.sH)(void 0,void 0,void 0,function(){var e,t,n;return(0,h.YH)(this,function(r){switch(r.label){case 0:return e=l("undefined"!=typeof location&&location.href||""),n={event_type:c},t=[{}],[4,ts()];case 1:return[2,(n.event_properties=h.Cl.apply(void 0,[h.Cl.apply(void 0,t.concat([r.sent()])),{"[Amplitude] Page Domain":"undefined"!=typeof location&&location.hostname||"","[Amplitude] Page Location":e,"[Amplitude] Page Path":"undefined"!=typeof location&&l(location.pathname)||"","[Amplitude] Page Title":"undefined"!=typeof document&&document.title||"","[Amplitude] Page URL":e.split("?")[0]}]),n)]}})})},f=function(){return void 0===s||"function"==typeof s&&s()},p="undefined"!=typeof location?location.href:null,v=function(){return(0,h.sH)(void 0,void 0,void 0,function(){var e,n,r,o;return(0,h.YH)(this,function(s){switch(s.label){case 0:if(n=ta(u,e=location.href,p||"")&&f(),p=e,!n)return[3,4];if(null==i||i.log("Tracking page view event"),null!=t)return[3,1];return[3,3];case 1:return o=(r=t).track,[4,d()];case 2:o.apply(r,[s.sent()]),s.label=3;case 3:s.label=4;case 4:return[2]}})})},g=function(){v()};return{name:"@amplitude/plugin-page-view-tracking-browser",type:"enrichment",setup:function(e,s){return(0,h.sH)(void 0,void 0,void 0,function(){var u,a;return(0,h.YH)(this,function(c){switch(c.label){case 0:if(t=s,n=e,(i=e.loggerProvider).log("Installing @amplitude/plugin-page-view-tracking-browser"),o=!0,r&&(r.addEventListener("popstate",g),r.history.pushState=new Proxy(r.history.pushState,{apply:function(e,t,n){var r=(0,h.zs)(n,3),i=r[0],s=r[1],u=r[2];e.apply(t,[i,s,u]),o&&v()}})),!f())return[3,2];return i.log("Tracking page view event"),a=(u=t).track,[4,d()];case 1:a.apply(u,[c.sent()]),c.label=2;case 2:return[2]}})})},execute:function(e){return(0,h.sH)(void 0,void 0,void 0,function(){var t;return(0,h.YH)(this,function(r){switch(r.label){case 0:if(!("attribution"===s&&tu(e)))return[3,2];
1return null==i||i.log("Enriching campaign event to page view event with campaign parameters"),[4,d()];case 1:e.event_type=(t=r.sent()).event_type,e.event_properties=(0,h.Cl)((0,h.Cl)({},e.event_properties),t.event_properties),r.label=2;case 2:return n&&e.event_type===c&&(n.pageCounter=n.pageCounter?n.pageCounter+1:1,e.event_properties=(0,h.Cl)((0,h.Cl)({},e.event_properties),{"[Amplitude] Page Counter":n.pageCounter})),[2,e]}})})},teardown:function(){return(0,h.sH)(void 0,void 0,void 0,function(){return(0,h.YH)(this,function(e){return r&&(r.removeEventListener("popstate",g),o=!1),[2]})})}}},ts=function(){return(0,h.sH)(void 0,void 0,void 0,function(){var e;return(0,h.YH)(this,function(t){switch(t.label){case 0:return e=ti,[4,new tr().parse()];case 1:return[2,e.apply(void 0,[t.sent()])]}})})},tu=function(e){if("$identify"===e.event_type&&e.user_properties){var t=e.user_properties,n=t[u.SET]||{},r=t[u.UNSET]||{},i=(0,h.fX)((0,h.fX)([],(0,h.zs)(Object.keys(n)),!1),(0,h.zs)(Object.keys(r)),!1);return Object.keys(tn).every(function(e){return i.includes(e)})}return!1},ta=function(e,t,n){if("pathOnly"!==e)return t!==n;if(""==n)return!0;var r=new URL(t),i=new URL(n);return r.origin+r.pathname!==i.origin+i.pathname},tc=function(){var e,t=[],n=function(e,n,r){e.addEventListener(n,r),t.push({element:e,type:n,handler:r})},r=function(){t.forEach(function(e){var t=e.element,n=e.type,r=e.handler;null==t||t.removeEventListener(n,r)}),t=[]};return{name:"@amplitude/plugin-form-interaction-tracking-browser",type:"enrichment",setup:function(t,r){return(0,h.sH)(void 0,void 0,void 0,function(){var i,o;return(0,h.YH)(this,function(s){return i=function(){if(!r)return void t.loggerProvider.warn("Form interaction tracking requires a later version of @amplitude/analytics-browser. Form interaction events are not tracked.");if("undefined"!=typeof document){var i=function(e){var t=!1;n(e,"change",function(){var n,i=td(e);t||r.track(eN,((n={})[eK]=tl(e.id),n[eJ]=tl(e.name),n[eV]=i,n)),t=!0}),n(e,"submit",function(){var n,i,o=td(e);t||r.track(eN,((n={})[eK]=tl(e.id),n[eJ]=tl(e.name),n[eV]=o,n)),r.track(eL,((i={})[eK]=tl(e.id),i[eJ]=tl(e.name),i[eV]=o,i)),t=!1})};Array.from(document.getElementsByTagName("form")).forEach(i),"undefined"!=typeof MutationObserver&&(e=new MutationObserver(function(e){e.forEach(function(e){e.addedNodes.forEach(function(e){"FORM"===e.nodeName&&i(e),"querySelectorAll"in e&&"function"==typeof e.querySelectorAll&&Array.from(e.querySelectorAll("form")).map(i)})})})).observe(document.body,{subtree:!0,childList:!0})}},"complete"===document.readyState?i():(o=_())?o.addEventListener("load",i):t.loggerProvider.debug("Form interaction tracking is not installed because global is undefined."),[2]})})},execute:function(e){return(0,h.sH)(void 0,void 0,void 0,function(){return(0,h.YH)(this,function(t){return[2,e]})})},teardown:function(){return(0,h.sH)(void 0,void 0,void 0,function(){return(0,h.YH)(this,function(t){return null==e||e.disconnect(),r(),[2]})})}}},tl=function(e){if("string"==typeof e)return e},td=function(e){var t=e.getAttribute("action");try{t=new URL(encodeURI(null!=t?t:""),window.location.href).href}catch(e){}return t},tf=function(){var e,t=[],n=function(e,n,r){e.addEventListener(n,r),t.push({element:e,type:n,handler:r})},r=function(){t.forEach(function(e){var t=e.element,n=e.type,r=e.handler;null==t||t.removeEventListener(n,r)}),t=[]};return{name:"@amplitude/plugin-file-download-tracking-browser",type:"enrichment",setup:function(t,r){return(0,h.sH)(void 0,void 0,void 0,function(){var i,o;return(0,h.YH)(this,function(s){return i=function(){if(!r)return void t.loggerProvider.warn("File download tracking requires a later version of @amplitude/analytics-browser. File download events are not tracked.");if("undefined"!=typeof document){var i=function(e){try{t=new URL(e.href,window.location.href)}catch(e){return}var t,i=o.exec(t.href),s=null==i?void 0:i[1];s&&n(e,"click",function(){var n;s&&r.track(eM,((n={})[eU]=s,n[eF]=t.pathname,n[eY]=e.id,n[ez]=e.text,n[e$]=e.href,n))})},o=/\.(pdf|xlsx?|docx?|txt|rtf|csv|exe|key|pp(s|t|tx)|7z|pkg|rar|gz|zip|avi|mov|mp4|mpe?g|wmv|midi?|mp3|wav|wma)(\?.+)?$/;
1Array.from(document.getElementsByTagName("a")).forEach(i),"undefined"!=typeof MutationObserver&&(e=new MutationObserver(function(e){e.forEach(function(e){e.addedNodes.forEach(function(e){"A"===e.nodeName&&i(e),"querySelectorAll"in e&&"function"==typeof e.querySelectorAll&&Array.from(e.querySelectorAll("a")).map(i)})})})).observe(document.body,{subtree:!0,childList:!0})}},"complete"===document.readyState?i():(o=_())?o.addEventListener("load",i):t.loggerProvider.debug("File download tracking is not installed because global is undefined."),[2]})})},execute:function(e){return(0,h.sH)(void 0,void 0,void 0,function(){return(0,h.YH)(this,function(t){return[2,e]})})},teardown:function(){return(0,h.sH)(void 0,void 0,void 0,function(){return(0,h.YH)(this,function(t){return null==e||e.disconnect(),r(),[2]})})}}},tp=!1,th=function(e){tp||void 0!==e.defaultTracking||(e.loggerProvider.warn("`options.defaultTracking` is set to undefined. This implicitly configures your Amplitude instance to track Page Views, Sessions, File Downloads, and Form Interactions. You can suppress this warning by explicitly setting a value to `options.defaultTracking`. The value must either be a boolean, to enable and disable all default events, or an object, for advanced configuration. For example:\n\namplitude.init(<YOUR_API_KEY>, {\n  defaultTracking: true,\n});\n\nVisit https://www.docs.developers.amplitude.com/data/sdks/browser-2/#tracking-default-events for more details."),tp=!0)},tv=function(){var e=_(),t=[],n=function(n,r){e&&(e.addEventListener(n,r),t.push({type:n,handler:r}))},r=function(){t.forEach(function(t){var n=t.type,r=t.handler;e&&e.removeEventListener(n,r)}),t=[]};return{name:"@amplitude/plugin-network-checker-browser",type:"before",setup:function(e,t){return(0,h.sH)(void 0,void 0,void 0,function(){return(0,h.YH)(this,function(r){return"undefined"==typeof navigator?(e.loggerProvider.debug("Network connectivity checker plugin is disabled because navigator is not available."),e.offline=!1):(e.offline=!navigator.onLine,n("online",function(){e.loggerProvider.debug("Network connectivity changed to online."),e.offline=!1,setTimeout(function(){t.flush()},e.flushIntervalMillis)}),n("offline",function(){e.loggerProvider.debug("Network connectivity changed to offline."),e.offline=!0})),[2]})})},teardown:function(){return(0,h.sH)(void 0,void 0,void 0,function(){return(0,h.YH)(this,function(e){return r(),[2]})})}}};!function(e){e.Unknown="unknown",e.Skipped="skipped",e.Success="success",e.RateLimit="rate_limit",e.PayloadTooLarge="payload_too_large",e.Invalid="invalid",e.Failed="failed",e.Timeout="Timeout",e.SystemError="SystemError"}(l||(l={})),function(e){e.US="US",e.EU="EU"}(d||(d={}));var tg="Remote config fetch rejected due to timeout after 5 seconds",ty="Unexpected error occurred",tm=function(){function e(e){var t=e.localConfig,n=e.configKeys,r=this;this.retryTimeout=1e3,this.attempts=0,this.sessionTargetingMatch=!1,this.metrics={},this.getRemoteConfig=function(e,t,n){return(0,h.sH)(r,void 0,void 0,function(){var r,i,o;return(0,h.YH)(this,function(s){switch(s.label){case 0:return r=Date.now(),[4,this.fetchWithTimeout(n)];case 1:if((i=s.sent())&&(o=i.configs&&i.configs[e]))return this.metrics.fetchTimeAPISuccess=Date.now()-r,[2,o[t]];return this.metrics.fetchTimeAPIFail=Date.now()-r,[2,void 0]}})})},this.fetchWithTimeout=function(e){return(0,h.sH)(r,void 0,void 0,function(){var t,n,r;return(0,h.YH)(this,function(i){switch(i.label){case 0:return t=new AbortController,n=setTimeout(function(){return t.abort()},5e3),[4,this.fetchRemoteConfig(t.signal,e)];case 1:return r=i.sent(),clearTimeout(n),[2,r]}})})},this.fetchRemoteConfig=function(e,t){return(0,h.sH)(r,void 0,void 0,function(){var n,r,i,o,s,u,a,c,d,f,p;return(0,h.YH)(this,function(v){switch(v.label){case 0:if(t===this.lastFetchedSessionId&&this.attempts>=this.localConfig.flushMaxRetries)return[2,this.completeRequest({err:"Remote config fetch rejected due to exceeded retry count"})];if(e.aborted)return[2,this.completeRequest({err:tg})];t!==this.lastFetchedSessionId&&(this.lastFetchedSessionId=t,this.attempts=0);v.label=1;case 1:v.trys.push([1,3,,4]),n=new URLSearchParams({api_key:this.localConfig.apiKey});try{for(i=(r=(0,h.Ju)(this.configKeys)).next();!i.done;
1i=r.next())o=i.value,n.append("config_keys",o)}catch(e){d={error:e}}finally{try{i&&!i.done&&(f=r.return)&&f.call(r)}finally{if(d)throw d.error}}return t&&n.set("session_id",String(t)),s={headers:{Accept:"*/*"},method:"GET"},u="".concat(this.getServerUrl(),"?").concat(n.toString()),this.attempts+=1,[4,fetch(u,(0,h.Cl)((0,h.Cl)({},s),{signal:e}))];case 2:if(null===(a=v.sent()))return[2,this.completeRequest({err:ty})];switch(new ek().buildStatus(a.status)){case l.Success:return this.attempts=0,[2,this.parseAndStoreConfig(a)];case l.Failed:return[2,this.retryFetch(e,t)];default:return[2,this.completeRequest({err:"Network error occurred, remote config fetch failed"})]}case 3:if(c=v.sent(),e.aborted)return[2,this.completeRequest({err:tg})];return[2,this.completeRequest({err:null!=(p=c.message)?p:ty})];case 4:return[2]}})})},this.retryFetch=function(e,t){return(0,h.sH)(r,void 0,void 0,function(){var n=this;return(0,h.YH)(this,function(r){switch(r.label){case 0:return[4,new Promise(function(e){return setTimeout(e,n.attempts*n.retryTimeout)})];case 1:return r.sent(),[2,this.fetchRemoteConfig(e,t)]}})})},this.parseAndStoreConfig=function(e){return(0,h.sH)(r,void 0,void 0,function(){var t;return(0,h.YH)(this,function(n){switch(n.label){case 0:return[4,e.json()];case 1:return t=n.sent(),this.completeRequest({success:"Remote config successfully fetched"}),[2,t]}})})},this.localConfig=t,this.configKeys=n}return e.prototype.getServerUrl=function(){return this.localConfig.serverZone===d.STAGING?"https://sr-client-cfg.stag2.amplitude.com/config":this.localConfig.serverZone===d.EU?"https://sr-client-cfg.eu.amplitude.com/config":"https://sr-client-cfg.amplitude.com/config"},e.prototype.completeRequest=function(e){var t=e.err,n=e.success;if(t)throw Error(t);n&&this.localConfig.loggerProvider.log(n)},e}(),tb=function(e){var t=e.localConfig,n=e.configKeys;return(0,h.sH)(void 0,void 0,void 0,function(){return(0,h.YH)(this,function(e){return[2,new tm({localConfig:t,configKeys:n})]})})},tw=function(){function e(e){this.config=e,this.config.loggerProvider.debug("Local configuration before merging with remote config",JSON.stringify(this.config,null,2))}return e.prototype.initialize=function(){return(0,h.sH)(this,void 0,void 0,function(){var e;return(0,h.YH)(this,function(t){switch(t.label){case 0:return e=this,[4,tb({localConfig:this.config,configKeys:["analyticsSDK"]})];case 1:return e.remoteConfigFetch=t.sent(),[2]}})})},e.prototype.generateJoinedConfig=function(){var e,t,n,r,i;return(0,h.sH)(this,void 0,void 0,function(){var o,s,u,a,c,l,d,f,p,v,g,y;return(0,h.YH)(this,function(m){switch(m.label){case 0:if(m.trys.push([0,3,,4]),!(s=this.remoteConfigFetch))return[3,2];return[4,this.remoteConfigFetch.getRemoteConfig("analyticsSDK","browserSDK",this.config.sessionId)];case 1:s=m.sent(),m.label=2;case 2:if(o=s,this.config.loggerProvider.debug("Remote configuration:",JSON.stringify(o,null,2)),o&&"autocapture"in o){if("boolean"==typeof o.autocapture&&(this.config.autocapture=o.autocapture),"object"==typeof o.autocapture){if(u=(0,h.Cl)({},o.autocapture),void 0===this.config.autocapture&&(this.config.autocapture=o.autocapture),"object"==typeof o.autocapture.elementInteractions&&(null==(e=o.autocapture.elementInteractions.pageUrlAllowlistRegex)?void 0:e.length)){u.elementInteractions=(0,h.Cl)({},o.autocapture.elementInteractions),c=null!=(t=(a=u.elementInteractions).pageUrlAllowlist)?t:[],l=[];try{for(f=(d=(0,h.Ju)(o.autocapture.elementInteractions.pageUrlAllowlistRegex)).next();!f.done;f=d.next()){p=f.value;try{l.push(new RegExp(p))}catch(e){this.config.loggerProvider.warn("Invalid regex pattern: ".concat(p),e)}}}catch(e){g={error:e}}finally{try{f&&!f.done&&(y=d.return)&&y.call(d)}finally{if(g)throw g.error}}a.pageUrlAllowlist=c.concat(l),delete a.pageUrlAllowlistRegex}"boolean"==typeof this.config.autocapture&&(this.config.autocapture=(0,h.Cl)({attribution:this.config.autocapture,fileDownloads:this.config.autocapture,formInteractions:this.config.autocapture,pageViews:this.config.autocapture,sessions:this.config.autocapture,elementInteractions:this.config.autocapture},u)),"object"==typeof this.config.autocapture&&(this.config.autocapture=(0,h.Cl)((0,h.Cl)({},this.config.autocapture),u))}this.config.defaultTracking=this.config.autocapture}return this.config.loggerProvider.debug("Joined configuration: ",JSON.stringify(this.config,null,2)),null!=(i=this.config).requestMetadata||(i.requestMetadata=new K),(null==(n=this.remoteConfigFetch)?void 0:n.metrics.fetchTimeAPISuccess)&&this.config.requestMetadata.recordHistogram("remote_config_fetch_time_API_success",this.remoteConfigFetch.metrics.fetchTimeAPISuccess),(null==(r=this.remoteConfigFetch)?void 0:r.metrics.fetchTimeAPIFail)&&this.config.requestMetadata.recordHistogram("remote_config_fetch_time_API_fail",this.remoteConfigFetch.metrics.fetchTimeAPIFail),[3,4];case 3:return v=m.sent(),this.config.loggerProvider.error("Failed to fetch remote configuration because of error: ",v),[3,4];case 4:return[2,this.config]}})})},e}(),t_=["a","button","input","select","textarea","label","video","audio",'[contenteditable="true" i]',"[data-amp-default-track]",".amp-default-track"],tS=["div","span","h1","h2","h3","h4","h5","h6"],tE="[Amplitude] Element Clicked",tI="[Amplitude] Element Tag",tk="[Amplitude] Element Text",tC="[Amplitude] Page URL",tx="https://app.amplitude.com",tO={US:tx,EU:"https://app.eu.amplitude.com",STAGING:"https://apps.stag2.amplitude.com"},tP=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function tT(e){return"function"==typeof e}function tA(e){return tT(null==e?void 0:e.then)}function tH(e){var t=e(function(e){Error.call(e),e.stack=Error().stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var tR=tH(function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map(function(e,t){return t+1+") "+e.toString()}).join("\n  "):"",this.name="UnsubscriptionError",this.errors=t}});function tj(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var tN=function(){var e;function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e,t,n,r,i,o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var s=(0,h.Ju)(o),u=s.next();!u.done;u=s.next())u.value.remove(this)}catch(t){e={error:t}}finally{try{u&&!u.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}else o.remove(this);var a=this.initialTeardown;
1if(tT(a))try{a()}catch(e){i=e instanceof tR?e.errors:[e]}var c=this._finalizers;if(c){this._finalizers=null;try{for(var l=(0,h.Ju)(c),d=l.next();!d.done;d=l.next()){var f=d.value;try{tD(f)}catch(e){i=null!=i?i:[],e instanceof tR?i=(0,h.fX)((0,h.fX)([],(0,h.zs)(i)),(0,h.zs)(e.errors)):i.push(e)}}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}}if(i)throw new tR(i)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)tD(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!=(n=this._finalizers)?n:[]).push(e)}},t.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},t.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},t.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&tj(t,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&tj(n,e),e instanceof t&&e._removeParent(this)},(e=new t).closed=!0,t.EMPTY=e,t}(),tL=tN.EMPTY;function tM(e){return e instanceof tN||e&&"closed"in e&&tT(e.remove)&&tT(e.add)&&tT(e.unsubscribe)}function tD(e){tT(e)?e():e.unsubscribe()}var tq={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},tU={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=tU.delegate;return(null==i?void 0:i.setTimeout)?i.setTimeout.apply(i,(0,h.fX)([e,t],(0,h.zs)(n))):setTimeout.apply(void 0,(0,h.fX)([e,t],(0,h.zs)(n)))},clearTimeout:function(e){var t=tU.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function tF(e){tU.setTimeout(function(){var t=tq.onUnhandledError;if(t)t(e);else throw e})}function tY(){}var tz=t$("C",void 0,void 0);function t$(e,t,n){return{kind:e,value:t,error:n}}var tK=null;function tJ(e){if(tq.useDeprecatedSynchronousErrorHandling){var t=!tK;if(t&&(tK={errorThrown:!1,error:null}),e(),t){var n=tK,r=n.errorThrown,i=n.error;if(tK=null,r)throw i}}else e()}var tV=function(e){function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,tM(t)&&t.add(n)):n.destination=t0,n}return(0,h.C6)(t,e),t.create=function(e,t,n){return new tQ(e,t,n)},t.prototype.next=function(e){this.isStopped?tZ(t$("N",e,void 0),this):this._next(e)},t.prototype.error=function(e){this.isStopped?tZ(t$("E",void 0,e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?tZ(tz,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(tN),tB=Function.prototype.bind;function tW(e,t){return tB.call(e,t)}var tX=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){tG(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){tG(e)}else tG(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){tG(e)}},e}(),tQ=function(e){function t(t,n,r){var i,o,s=e.call(this)||this;return tT(t)||!t?i={next:null!=t?t:void 0,error:null!=n?n:void 0,complete:null!=r?r:void 0}:s&&tq.useDeprecatedNextContext?((o=Object.create(t)).unsubscribe=function(){return s.unsubscribe()},i={next:t.next&&tW(t.next,o),error:t.error&&tW(t.error,o),complete:t.complete&&tW(t.complete,o)}):i=t,s.destination=new tX(i),s}return(0,h.C6)(t,e),t}(tV);function tG(e){if(tq.useDeprecatedSynchronousErrorHandling)tq.useDeprecatedSynchronousErrorHandling&&tK&&(tK.errorThrown=!0,tK.error=e);else tF(e)}function tZ(e,t){var n=tq.onStoppedNotification;n&&tU.setTimeout(function(){return n(e,t)})}var t0={closed:!0,next:tY,error:function(e){throw e},complete:tY},t1="function"==typeof Symbol&&Symbol.observable||"@@observable";function t2(e){return e}var t4=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r=this,i=!function(e){return e&&e instanceof tV||e&&tT(e.next)&&tT(e.error)&&tT(e.complete)&&tM(e)}(e)?new tQ(e,t,n):e;return tJ(function(){var e=r.operator,t=r.source;i.add(e?e.call(i,t):t?r._subscribe(i):r._trySubscribe(i))}),i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=t3(t))(function(t,r){var i=new tQ({next:function(t){try{e(t)}catch(e){r(e),i.unsubscribe()}},error:r,complete:t});n.subscribe(i)})},e.prototype._subscribe=function(e){var t;return null==(t=this.source)?void 0:t.subscribe(e)},e.prototype[t1]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return(0===e.length?t2:1===e.length?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)})(this)},e.prototype.toPromise=function(e){var t=this;return new(e=t3(e))(function(e,n){var r;t.subscribe(function(e){return r=e},function(e){return n(e)},function(){return e(r)})})},e.create=function(t){return new e(t)},e}();function t3(e){var t;return null!=(t=null!=e?e:tq.Promise)?t:Promise}function t6(e){return Symbol.asyncIterator&&tT(null==e?void 0:e[Symbol.asyncIterator])}function t5(e){return TypeError("You provided "+(null!==e&&"object"==typeof e?"an invali
1d object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}var t7="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";function t9(e){return tT(null==e?void 0:e[t7])}function t8(e){return(0,h.AQ)(this,arguments,function(){var t,n,r;return(0,h.YH)(this,function(i){switch(i.label){case 0:t=e.getReader(),i.label=1;case 1:i.trys.push([1,,9,10]),i.label=2;case 2:return[4,(0,h.N3)(t.read())];case 3:if(r=(n=i.sent()).value,!n.done)return[3,5];return[4,(0,h.N3)(void 0)];case 4:return[2,i.sent()];case 5:return[4,(0,h.N3)(r)];case 6:return[4,i.sent()];case 7:return i.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function ne(e){return tT(null==e?void 0:e.getReader)}function nt(e){if(e instanceof t4)return e;if(null!=e){var t,n,r,i;if(tT(e[t1])){return t=e,new t4(function(e){var n=t[t1]();if(tT(n.subscribe))return n.subscribe(e);throw TypeError("Provided object does not correctly implement Symbol.observable")})}if(tP(e)){return n=e,new t4(function(e){for(var t=0;t<n.length&&!e.closed;t++)e.next(n[t]);e.complete()})}if(tA(e)){return r=e,new t4(function(e){r.then(function(t){e.closed||(e.next(t),e.complete())},function(t){return e.error(t)}).then(null,tF)})}if(t6(e))return nn(e);if(t9(e)){return i=e,new t4(function(e){var t,n;try{for(var r=(0,h.Ju)(i),o=r.next();!o.done;o=r.next()){var s=o.value;if(e.next(s),e.closed)return}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}e.complete()})}if(ne(e))return nn(t8(e))}throw t5(e)}function nn(e){return new t4(function(t){(function(e,t){var n,r,i,o;return(0,h.sH)(this,void 0,void 0,function(){var s;return(0,h.YH)(this,function(u){switch(u.label){case 0:u.trys.push([0,5,6,11]),n=(0,h.xN)(e),u.label=1;case 1:return[4,n.next()];case 2:if((r=u.sent()).done)return[3,4];if(s=r.value,t.next(s),t.closed)return[2];u.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return i={error:u.sent()},[3,11];case 6:if(u.trys.push([6,,9,10]),!(r&&!r.done&&(o=n.return)))return[3,8];return[4,o.call(n)];case 7:u.sent(),u.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})})(e,t).catch(function(e){return t.error(e)})})}function nr(e){return function(t){if(tT(null==t?void 0:t.lift))return t.lift(function(t){try{return e(t,this)}catch(e){this.error(e)}});throw TypeError("Unable to lift unknown Observable type")}}function ni(e,t,n,r,i){return new no(e,t,n,r,i)}var no=function(e){function t(t,n,r,i,o,s){var u=e.call(this,t)||this;return u.onFinalize=o,u.shouldUnsubscribe=s,u._next=n?function(e){try{n(e)}catch(e){t.error(e)}}:e.prototype._next,u._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,u._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,u}return(0,h.C6)(t,e),t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),n||null==(t=this.onFinalize)||t.call(this)}},t}(tV);function ns(e,t){return nr(function(n,r){var i=0;n.subscribe(ni(r,function(n){r.next(e.call(t,n,i++))}))})}function nu(e,t,n,r,i){void 0===r&&(r=0),void 0===i&&(i=!1);var o=t.schedule(function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(o),!i)return o}function na(e,t,n){return(void 0===n&&(n=1/0),tT(t))?na(function(n,r){return ns(function(e,i){return t(n,e,r,i)})(nt(e(n,r)))},n):("number"==typeof t&&(n=t),nr(function(t,r){var i,o,s,u,a,c,l,d,f;return i=n,s=[],u=0,a=0,c=!1,l=function(){!c||s.length||u||r.complete()},d=function(e){return u<i?f(e):s.push(e)},f=function(t){u++;var n=!1;nt(e(t,a++)).subscribe(ni(r,function(e){o?d(e):r.next(e)},function(){n=!0},void 0,function(){if(n)try{for(u--;s.length&&u<i;)!function(){var e=s.shift();f(e)}();l()}catch(e){r.error(e)}}))},t.subscribe(ni(r,d,function(){c=!0,l()})),function(){}}))}var nc=Array.isArray,nl=["addListener","removeListener"],nd=["addEventListener","removeEventListener"],nf=["on","off"];function np(e,t,n,r){if(tT(n)&&(r=n,n=void 0),r){return np(e,t,n
1).pipe((i=r,ns(function(e){return nc(e)?i.apply(void 0,(0,h.fX)([],(0,h.zs)(e))):i(e)})))}var i,o,s,u,a=(0,h.zs)(tT((o=e).addEventListener)&&tT(o.removeEventListener)?nd.map(function(r){return function(i){return e[r](t,i,n)}}):tT((s=e).addListener)&&tT(s.removeListener)?nl.map(nh(e,t)):tT((u=e).on)&&tT(u.off)?nf.map(nh(e,t)):[],2),c=a[0],l=a[1];if(!c&&tP(e))return na(function(e){return np(e,t,n)})(nt(e));if(!c)throw TypeError("Invalid event target");return new t4(function(e){var t=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.next(1<t.length?t:t[0])};return c(t),function(){return l(t)}})}function nh(e,t){return function(n){return function(r){return e[n](t,r)}}}var nv=tH(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),ng=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return(0,h.C6)(t,e),t.prototype.lift=function(e){var t=new ny(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new nv},t.prototype.next=function(e){var t=this;tJ(function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var i=(0,h.Ju)(t.currentObservers),o=i.next();!o.done;o=i.next())o.value.next(e)}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}})},t.prototype.error=function(e){var t=this;tJ(function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}})},t.prototype.complete=function(){var e=this;tJ(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null==(e=this.observers)?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this.hasError,r=this.isStopped,i=this.observers;return n||r?tL:(this.currentObservers=null,i.push(e),new tN(function(){t.currentObservers=null,tj(i,e)}))},t.prototype._checkFinalizedStatuses=function(e){var t=this.hasError,n=this.thrownError,r=this.isStopped;t?e.error(n):r&&e.complete()},t.prototype.asObservable=function(){var e=new t4;return e.source=this,e},t.create=function(e,t){return new ny(e,t)},t}(t4),ny=function(e){function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return(0,h.C6)(t,e),t.prototype.next=function(e){var t,n;null==(n=null==(t=this.destination)?void 0:t.next)||n.call(t,e)},t.prototype.error=function(e){var t,n;null==(n=null==(t=this.destination)?void 0:t.error)||n.call(t,e)},t.prototype.complete=function(){var e,t;null==(t=null==(e=this.destination)?void 0:e.complete)||t.call(e)},t.prototype._subscribe=function(e){var t,n;return null!=(n=null==(t=this.source)?void 0:t.subscribe(e))?n:tL},t}(ng);function nm(e){void 0===e&&(e={});var t=e.connector,n=void 0===t?function(){return new ng}:t,r=e.resetOnError,i=void 0===r||r,o=e.resetOnComplete,s=void 0===o||o,u=e.resetOnRefCountZero,a=void 0===u||u;return function(e){var t,r,o,u=0,c=!1,l=!1,d=function(){null==r||r.unsubscribe(),r=void 0},f=function(){d(),t=o=void 0,c=l=!1},p=function(){var e=t;f(),null==e||e.unsubscribe()};return nr(function(e,h){u++,l||c||d();var v=o=null!=o?o:n();h.add(function(){0!=--u||l||c||(r=nb(p,a))}),v.subscribe(h),!t&&u>0&&(t=new tQ({next:function(e){return v.next(e)},error:function(e){l=!0,d(),r=nb(f,i,e),v.error(e)},complete:function(){c=!0,d(),r=nb(f,s),v.complete()}}),nt(e).subscribe(t))})(e)}}function nb(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(!0===t)return void e();if(!1!==t){var i=new tQ({next:function(){i.unsubscribe(),e()}});return nt(t.apply(void 0,(0,h.fX)([],(0,h.zs)(n)))).subscribe(i)}}var nw=["input","select","textarea"],n_=function(e,t){return function(n,r){var i,o,s,u=e.pageUrlAllowlist,a=e.shouldTrackEventResolver,c=null==(o=null==(i=null==r?void 0:r.tagName)?void 0:i.toLowerCase)?void 0:o.call(i);if(!c)return!1;if(a)return a(n,r);if(!nk(window.location.href,u))return!1;var l=String(null==r?void 0:r.getAttribute("type"))||"";if("string"==typeof l)switch(l.toLowerCase()){case"hidden":case"password":return!1}if(t&&!t.some(function(e){var t;return!!(null==(t=null==r?void 0:r.matches)?void 0:t.call(r,e))}))return!1;switch(c){case"input":case"select":case"textarea":return"change"===n||"click"===n;default:var d=null==(s=null==window?void 0:window.getComputedStyle)?void 0:s.call(window,r);if(d&&"pointer"===d.getPropertyValue("cursor")&&"click"===n)return!0;return"click"===n}}},nS=function(e){if(null==e)return!1;if("string"==typeof e&&(/^(?:(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11}
1)|((?:2131|1800|35[0-9]{3})[0-9]{11}))$/.test((e||"").replace(/[- ]/g,""))||/(^\d{3}-?\d{2}-?\d{4}$)/.test(e)))return!1;return!0},nE=function(e){var t,n,r,i=null==(n=null==(t=null==e?void 0:e.tagName)?void 0:t.toLowerCase)?void 0:n.call(t),o=e instanceof HTMLElement&&(null==(r=e.getAttribute("contenteditable"))?void 0:r.toLowerCase())==="true";return!nw.includes(i)&&!o},nI=function(e){var t="";return nE(e)&&e.childNodes&&e.childNodes.length&&e.childNodes.forEach(function(e){var n="";e&&3===e.nodeType?e.textContent&&(n=e.textContent):n=nI(e),t+=n.split(/(\s+)/).filter(nS).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}),t},nk=function(e,t){return!t||!t.length||t.some(function(t){return"string"==typeof t?e===t:e.match(t)})},nC=function(e){return Object.keys(e).reduce(function(t,n){var r=e[n];return null!=r&&("object"!=typeof r||0!==Object.keys(r).length)&&("string"!=typeof r||0!==r.trim().length)&&(t[n]=r),t},{})},nx=function(e){var t,n=e.parentElement;if(!n)return"";try{t=n.querySelector(":scope>span,h1,h2,h3,h4,h5,h6")}catch(e){t=null}if(t){var r=t.textContent||"";return nS(r)?r:""}return nx(n)},nO=function(e,t){return e?t.some(function(t){var n;return null==(n=null==e?void 0:e.matches)?void 0:n.call(e,t)})?e:nO(null==e?void 0:e.parentElement,t):null},nP=function(e){if(!e)return{};var t,n,r,i=null==(r=null==(n=null==e?void 0:e.tagName)?void 0:n.toLowerCase)?void 0:r.call(n);return nC(((t={})[tI]=i,t[tk]=nI(e),t[tC]=window.location.href.split("?")[0],t))},nT=function(e){return null!==e.event.target&&!!e.closestTrackedAncestor},nA=function(){function e(e){var t=(void 0===e?{}:e).origin,n=this;this.endpoint=tx,this.requestCallbacks={},this.onSelect=function(e){n.notify({action:"element-selected",data:e})},this.onTrack=function(e,t){"selector-mode-changed"===e?n.notify({action:"track-selector-mode-changed",data:t}):"selector-moved"===e&&n.notify({action:"track-selector-moved",data:t})},this.endpoint=void 0===t?tx:t}return e.prototype.notify=function(e){var t,n,r,i;null==(n=null==(t=this.logger)?void 0:t.debug)||n.call(t,"Message sent: ",JSON.stringify(e)),null==(i=null==(r=window.opener)?void 0:r.postMessage)||i.call(r,e,this.endpoint)},e.prototype.sendRequest=function(e,t,n){var r=this;void 0===n&&(n={timeout:15e3});var i="".concat(Date.now(),"-").concat(Math.random().toString(36).substr(2,9)),o={id:i,action:e,args:t};return new Promise(function(t,s){r.requestCallbacks[i]={resolve:t,reject:s},r.notify(o),(null==n?void 0:n.timeout)>0&&setTimeout(function(){s(Error("".concat(e," timed out (id: ").concat(i,")"))),delete r.requestCallbacks[i]},n.timeout)})},e.prototype.handleResponse=function(e){var t;if(!this.requestCallbacks[e.id]){null==(t=this.logger)||t.warn("No callback found for request id: ".concat(e.id));return}this.requestCallbacks[e.id].resolve(e.responseData),delete this.requestCallbacks[e.id]},e.prototype.setup=function(e){var t=this,n=void 0===e?{}:e,r=n.logger,i=n.endpoint,o=n.isElementSelectable,s=n.cssSelectorAllowlist,u=n.actionClickAllowlist;this.logger=r,i&&this.endpoint===tx&&(this.endpoint=i);var a=null;window.addEventListener("message",function(e){if(null==(r=null==(n=t.logger)?void 0:n.debug)||r.call(n,"Message received: ",JSON.stringify(e)),t.endpoint===e.origin){var n,r,i,c,l,d=null==e?void 0:e.data,f=null==d?void 0:d.action;if(f)if("id"in d)null==(c=null==(i=t.logger)?void 0:i.debug)||c.call(i,"Received Response to previous request: ",JSON.stringify(e)),t.handleResponse(d);else if("ping"===f)t.notify({action:"pong"});else if("initialize-visual-tagging-selector"===f){var p,h=null==d?void 0:d.data;(p="https://cdn.amplitude.com/libs/visual-tagging-selector-1.0.0-alpha.js.gz",new Promise(function(e,t){var n;try{var r=document.createElement("script");r.type="text/javascript",r.async=!0,r.src=p,r.addEventListener("load",function(){e({status:!0})},{once:!0}),r.addEventListener("error",function(){t({status:!1,message:"Failed to load the script ".concat(p)})}),null==(n=document.head)||n.appendChild(r)}catch(e){t(e)}})).then(function(){var e;a=null==(e=null==window?void 0:window.amplitudeVisualTaggingSelector)?void 0:e.call(window,{getEventTagProps:nP,isElementSelectable:function(e){return!o||o((null==h?void 0:h.actionType)||"click",e)},onTrack:t.onTrack,onSelect:t.onSelect,visualHighlightClass:"amp-visual-tagging-selector-highlight",messenger:t,cssSelectorAllowlist:s,actionClickAllowlist:u}),t.notify({action:"selector-loaded"})}).catch(function(){var e;null==(e=t.logger)||e.warn("Failed to initialize visual tagging selector")})}else"close-visual-tagging-selector"===f&&(null==(l=null==a?void 0:a.close)||l.call(a))}}),this.notify({action:"page-loaded"})},e}(),nH=["id","class","style","value","onclick","onchange","oninput","onblur","onsubmit","onfocus","onkeydown","onkeyup","onkeypress","data-reactid","data-react-checksum","data-reactroot"],nR=["type"],nj=["svg","path","g"],nN=["password","hidden"],nL=function(e){return e?function(e,t){for(var n=0,r=0;r<e.length;r++){var i=e[r];if(null===i)n+=4;else{var o=function e(t,n){void 0===n&&(n=!1);try{if(null==t){if(n)return"None";return null}if("string"==typeof t){if(n){if((t=t.replace(/\\/g,"\\\\").replace(/\n/g,"\\n").replace(/\t/g,"\\t").replace(/\r/g,"\\r")).includes('"'))return"'".concat(t,"'");if(t.includes("'"))return'"'.concat(t.replace(/'/g,"\\'"),'"');return"'".concat(t,"'")}return t}if("boolean"==typeof t)return t?"True":"False";else if(Array.isArray(t)){var r=t.map(function(t){return e(t,!0)});return"[".concat(r.join(", "),"]")}else if("object"==typeof t){var i=Object.entries(t).filter(function(e){var t=(0,h.zs)(e,1)[0];return null!=t}
1).map(function(t){var n=(0,h.zs)(t,2),r=n[0],i=n[1];return"".concat(String(e(r,!0)),": ").concat(String(e(i,!0)))}),o="{".concat(i.join(", "),"}");return o.includes("\\'")&&(o=o.replace(/'/g,"'").replace(/'/g,"\\'")),o}return t.toString()}catch(e){return null}}(i);n+=o?Array.from(o).length:4}if(n>1024)return e.slice(0,r)}return e}((function(e){var t=[];if(!e)return t;t.push(e);for(var n=e.parentElement;n&&"HTML"!==n.tagName;)t.push(n),n=n.parentElement;return t})(e).map(function(e){return function(e){if(null===e)return null;var t,n,r,i,o,s,u=String(e.tagName).toLowerCase(),a={tag:u},c=Array.from(null!=(i=null==(r=e.parentElement)?void 0:r.children)?i:[]);c.length&&(a.index=c.indexOf(e),a.indexOfType=c.filter(function(t){return t.tagName===e.tagName}).indexOf(e));var l=null==(s=null==(o=e.previousElementSibling)?void 0:o.tagName)?void 0:s.toLowerCase();l&&(a.prevSib=String(l));var d=e.getAttribute("id");d&&(a.id=String(d));var f=Array.from(e.classList);f.length&&(a.classes=f);var p={},v=Array.from(e.attributes).filter(function(e){return!nH.includes(e.name)}),g=!nE(e);if(!nN.includes(String(e.getAttribute("type")))&&!nj.includes(u))try{for(var y=(0,h.Ju)(v),m=y.next();!m.done;m=y.next()){var b=m.value;(!g||nR.includes(b.name))&&(p[b.name]=String(b.value).substring(0,128))}}catch(e){t={error:e}}finally{try{m&&!m.done&&(n=y.return)&&n.call(y)}finally{if(t)throw t.error}}return Object.keys(p).length&&(a.attrs=p),a}(e)}),1024):[]};function nM(e,t){return nr(function(n,r){var i=0;n.subscribe(ni(r,function(n){return e.call(t,n,i++)&&r.next(n)}))})}var nD=function(e){function t(t,n){return e.call(this)||this}return(0,h.C6)(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(tN),nq={setInterval:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=nq.delegate;return(null==i?void 0:i.setInterval)?i.setInterval.apply(i,(0,h.fX)([e,t],(0,h.zs)(n))):setInterval.apply(void 0,(0,h.fX)([e,t],(0,h.zs)(n)))},clearInterval:function(e){var t=nq.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},nU=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r.pending=!1,r}return(0,h.C6)(t,e),t.prototype.schedule=function(e,t){if(void 0===t&&(t=0),this.closed)return this;this.state=e;var n,r=this.id,i=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(i,r,t)),this.pending=!0,this.delay=t,this.id=null!=(n=this.id)?n:this.requestAsyncId(i,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return void 0===n&&(n=0),nq.setInterval(e.flush.bind(e,this),n)},t.prototype.recycleAsyncId=function(e,t,n){if(void 0===n&&(n=0),null!=n&&this.delay===n&&!1===this.pending)return t;null!=t&&nq.clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return Error("executing a cancelled action");this.pending=!1;var n=this._execute(e,t);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var n,r=!1;try{this.work(e)}catch(e){r=!0,n=e||Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),n},t.prototype.unsubscribe=function(){if(!this.closed){var t=this.id,n=this.scheduler,r=n.actions;this.work=this.state=this.scheduler=null,this.pending=!1,tj(r,this),null!=t&&(this.id=this.recycleAsyncId(n,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(nD),nF={now:function(){return(nF.delegate||Date).now()},delegate:void 0},nY=function(){function e(t,n){void 0===n&&(n=e.now),this.schedulerActionCtor=t,this.now=n}return e.prototype.schedule=function(e,t,n){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(n,t)},e.now=nF.now,e}(),nz=new(function(e){function t(t,n){void 0===n&&(n=nY.now);var r=e.call(this,t,n)||this;return r.actions=[],r._active=!1,r}return(0,h.C6)(t,e),t.prototype.flush=function(e){var t,n=this.actions;if(this._active)return void n.push(e);this._active=!0;do if(t=e.execute(e.state,e.delay))break;while(e=n.shift());if(this._active=!1,t){for(;e=n.shift();)e.unsubscribe();throw t}},t}(nY))(nU);function n$(e){return void 0===e&&(e=1/0),na(t2,e)}var nK=new t4(function(e){return e.complete()});function nJ(e){return e&&tT(e.schedule)}function nV(e){return e[e.length-1]}function nB(e){return nJ(nV(e))?e.pop():void 0}function nW(e,t){return void 0===t&&(t=0),nr(function(n,r){n.subscribe(ni(r,function(n){return nu(r,e,function(){return r.next(n)},t)},function(){return nu(r,e,function(){return r.complete()},t)},function(n){return nu(r,e,function(){return r.error(n)},t)}))})}function nX(e,t){return void 0===t&&(t=0),nr(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}function nQ(e,t){if(!e)throw Error("Iterable cannot be null");return new t4(function(n){nu(n,t,function(){var r=e[Symbol.asyncIterator]();nu(n,t,function(){r.next().then(function(e){e.done?n.complete():n.next(e.value)})},0,!0)})})}function nG(e,t){return t?function(e,t){if(null!=e){if(tT(e[t1]))return nt(e).pipe(nX(t),nW(t));if(tP(e))return new t4(function(n){var r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})});if(tA(e))return nt(e).pipe(nX(t),nW(t));if(t6(e))return nQ(e,t);if(t9(e))return new t4(function(n){var r;return nu(n,t,function(){r=e[t7](),nu(n,t,function(){var e,t,i;try{t=(e=r.next()).value,i=e.done}catch(e){n.error(e);return}i?n.complete():n.next(t)},0,!0)}),function(){return tT(null==r?void 0:r.return)&&r.return()}});if(ne(e))return nQ(t8(e),t)}throw t5(e)}(e,t):nt(e)}function nZ(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=nB(t),i=(e=1/0,"number"==typeof nV(t)?t.pop():e);return t.length?1===t.length?nt(t[0]):n$(i)(nG(t,r)):nK}function n0(e){return e<=0?function(){return nK}:nr(function(t,n){var r=0;t.subscribe(ni(n,function(t){++r<=e&&(n.next(t),e<=r&&n.complete())}))})}function n1(e){return e instanceof Date&&!isNaN(e)}var n2=tH(function(e){return function(t){void 0===t&&(t=null),e(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=t}});function n4(e){throw new n2(e)}!function(e){e.ClickObservable="clickObservable",e.ChangeObservable="changeObservable",e.NavigateObservable="navigateObservable",e.MutationObservable="mutationObservable"}(f||(f={}));var n3=function(e){void 0===e&&(e={});var t,n,r,i=e.dataAttributePrefix,o=void 0===i?"data-amp-track-":i,s=e.visualTaggingOptions,u=void 0===s?{enabled:!0,messenger:new nA}:s;e.cssSelectorAllowlist=null!=(t=e.cssSelectorAllowlist)?t:t_,e.actionClickAllowlist=null!=(n=e.actionClickAllowlist)?n:tS,e.debounceTime=null!=(r=e.debounceTime)?r:0;var a="@amplitude/plugin-autocapture-browser",c=[],l=function(){var e,t,n=np(document,"click",{capture:!0}).pipe(ns(function(e){return p(e,"click")}),nm()),r=np(document,"change",{capture:!0}).pipe(ns(function(e){return p(e,"change")}),nm());window.navigation&&(t=np(window.navigation,"navigate").pipe(ns(function(e){return p(e,"navigate")}),nm()));var i=new t4(function(e){var t=new MutationObserver(function(t){e.next(t)});return t.observe(document.body,{childList:!0,attributes:!0,characterData:!0,subtree:!0}),function(){return t.disconnect()}}).pipe(ns(function(e){return p(e,"mutation")}),nm());return(e={})[f.ClickObservable]=n,e[f.ChangeObservable]=r,e[f.NavigateObservable]=t,e[f.MutationObservable]=i,e},d=function(e,t){var n,r,i,s=null==(i=null==(r=null==t?void 0:t.tagName)?void 0:r.toLowerCase)?void 0:i.call(r),u="function"==typeof t.getBoundingClientRect?t.getBoundingClientRect():{left:null,top:null},a=t.getAttribute("aria-label"),c=t.getAttributeNames().reduce(function(e,n){if(n.startsWith(o)){var r=n.replace(o,""),i=t.getAttribute(n);r&&(e[r]=i||"")}return e},{}),l=nx(t),d=((n={})["[Amplitude] Element ID"]=t.getAttribute("id")||"",n["[Amplitude] Element Class"]=t.getAttribute("class"),n["[Amplitude] Element Hierarchy"]=nL(t),n[tI]=s,n[tk]=nI(t),n["[Amplitude] Element Position Left"]=null==u.left?null:Math.round(u.left),n["[Amplitude] Element Position Top"]=null==u.top?null:Math.round(u.top),n["[Amplitude] Element Aria Label"]=a,n["[Amplitude] Element Attributes"]=c,n["[Amplitude] Element Parent Label"]=l,n[tC]=window.location.href.split("?")[0],n["[Amplitude] Page Title"]="undefined"!=typeof document&&document.title||"",n["[Amplitude] Viewport Height"]=window.innerHeight,n["[Amplitude] Viewport Width"]=window.innerWidth,n);return"a"===s&&"click"===e&&t instanceof HTMLAnchorElement&&(d["[Amplitude] Element Href"]=t.href),nC(d)},p=function(t,n){var r={event:t,timestamp:Date.now(),type:n};if(("click"===r.type||"change"===r.type)&&null!==r.event.target){var i=nO(r.event.target,e.cssSelectorAllowlist);
1i&&(r.closestTrackedAncestor=i,r.targetElementProperties=d(r.type,i))}return r};return{name:a,type:"enrichment",setup:function(t,n){return(0,h.sH)(void 0,void 0,void 0,function(){var r,i,o,s,f,p,v,g,y,m;return(0,h.YH)(this,function(b){var w,_,S,E,I,k,C,x,O,P,T,A,H,R,j,N,L,M,D,q,U,F,Y,z,$,K,J,V,B,W,X,Q,G,Z;return"undefined"==typeof document?[2]:(r=n_(e,e.cssSelectorAllowlist),i=n_(e,e.actionClickAllowlist),_=(w={allObservables:o=l(),options:e,amplitude:n,shouldTrackEvent:r}).amplitude,S=w.allObservables,E=w.options,I=w.shouldTrackEvent,O=nZ((k=S.clickObservable).pipe(nr(function(e,t){var n,r=!1;e.subscribe(ni(t,function(e){var i=n;n=e,r&&t.next([i,e]),r=!0}))}),nM(function(e){var t=(0,h.zs)(e,2),n=t[0],r=t[1],i=n.event.target!==r.event.target,o=20>=Math.abs(r.event.screenX-n.event.screenX)&&20>=Math.abs(r.event.screenY-n.event.screenY);return i&&!o})),k.pipe((C=E.debounceTime,void 0===x&&(x=nz),nr(function(e,t){var n=null,r=null,i=null,o=function(){if(n){n.unsubscribe(),n=null;var e=r;r=null,t.next(e)}};function s(){var e=i+C,r=x.now();if(r<e){n=this.schedule(void 0,e-r),t.add(n);return}o()}e.subscribe(ni(t,function(e){r=e,i=x.now(),n||(n=x.schedule(s,C),t.add(n))},function(){o(),t.complete()},void 0,function(){r=n=null}))})),ns(function(){return"timeout"}))),s=k.pipe((void 0===P&&(P=nz),T=0,A=P,void 0===T&&(T=0),void 0===H&&(H=nz),R=-1,null!=A&&(nJ(A)?H=A:R=A),j=new t4(function(e){var t=n1(T)?T-H.now():T;t<0&&(t=0);var n=0;return H.schedule(function(){e.closed||(e.next(n++),0<=R?this.schedule(void 0,R):e.complete())},t)}),function e(t,n){return n?function(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n$(1)(nG(e,nB(e)))}(n.pipe(n0(1),nr(function(e,t){e.subscribe(ni(t,tY))})),r.pipe(e(t)))}:na(function(e,n){return nt(t(e,n)).pipe(n0(1),ns(function(){return e}))})}(function(){return j})),nM(nT),nM(function(e){return I("click",e.closestTrackedAncestor)}),nr(function(e,t){var n=[];return e.subscribe(ni(t,function(e){return n.push(e)},function(){t.next(n),t.complete()})),nt(O).subscribe(ni(t,function(){var e=n;n=[],t.next(e)},tY)),function(){n=null}})).subscribe(function(e){var t,n,r=(e.length,tE);try{for(var i=(0,h.Ju)(e),o=i.next();!o.done;o=i.next()){var s=o.value;null==_||_.track(r,s.targetElementProperties)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}}),c.push(s),L=(N={allObservables:o,getEventProperties:d,amplitude:n,shouldTrackEvent:r}).amplitude,M=N.allObservables,D=N.getEventProperties,q=N.shouldTrackEvent,f=M.changeObservable.pipe(nM(nT),nM(function(e){return q("change",e.closestTrackedAncestor)})).subscribe(function(e){null==L||L.track("[Amplitude] Element Changed",D("change",e.closestTrackedAncestor))}),c.push(f),F=(U={allObservables:o,options:e,getEventProperties:d,amplitude:n,shouldTrackEvent:r,shouldTrackActionClick:i}).amplitude,Y=U.allObservables,z=U.options,$=U.getEventProperties,K=U.shouldTrackEvent,J=U.shouldTrackActionClick,V=Y.clickObservable,B=Y.mutationObservable,W=Y.navigateObservable,X=V.pipe(nM(function(e){return!K("click",e.closestTrackedAncestor)}),ns(function(e){var t=nO(e.event.target,z.actionClickAllowlist);return e.closestTrackedAncestor=t,null!==e.closestTrackedAncestor&&(e.targetElementProperties=$(e.type,e.closestTrackedAncestor)),e}),nM(nT),nM(function(e){return J("click",e.closestTrackedAncestor)})),Q=[B],W&&Q.push(W),G=nZ.apply(void 0,(0,h.fX)([],(0,h.zs)(Q),!1)),p=X.pipe((Z=function(e){return G.pipe(n0(1),function(e,t){var n=n1(e)?{first:e}:"number"==typeof e?{each:e}:e,r=n.first,i=n.each,o=n.with,s=void 0===o?n4:o,u=n.scheduler,a=void 0===u?nz:u,c=n.meta,l=void 0===c?null:c;if(null==r&&null==i)throw TypeError("No timeout provided.");return nr(function(e,t){var n,o,u=null,c=0,d=function(e){o=nu(t,a,function(){try{n.unsubscribe(),nt(s({meta:l,lastValue:u,seen:c})).subscribe(t)}catch(e){t.error(e)}},e)};n=e.subscribe(ni(t,function(e){null==o||o.unsubscribe(),c++,t.next(u=e),i>0&&d(i)},void 0,void 0,function(){(null==o?void 0:o.closed)||null==o||o.unsubscribe(),u=null})),c||d(null!=r?"number"==typeof r?r:r-a.now():i)})}({first:500,with:function(){return nK}}),ns(function(){return e}))},nr(function(e,t){var n=null,r=0,i=!1,o=function(){return i&&!n&&t.complete()};e.subscribe(ni(t,function(e){null==n||n.unsubscribe(),nt(Z(e,r++)).subscribe(n=ni(t,function(e){return t.next(e)},function(){n=null,o()}))},function(){i=!0,o()}))}))).subscribe(function(e){null==F||F.track(tE,$("click",e.closestTrackedAncestor))}),c.push(p),null==(y=null==t?void 0:t.loggerProvider)||y.log("".concat(a," has been successfully added.")),window.opener&&u.enabled&&(v=e.cssSelectorAllowlist,g=e.actionClickAllowlist,null==(m
1=u.messenger)||m.setup((0,h.Cl)((0,h.Cl)({logger:null==t?void 0:t.loggerProvider},(null==t?void 0:t.serverZone)&&{endpoint:tO[t.serverZone]}),{isElementSelectable:n_(e,(0,h.fX)((0,h.fX)([],(0,h.zs)(v),!1),(0,h.zs)(g),!1)),cssSelectorAllowlist:v,actionClickAllowlist:g}))),[2])})})},execute:function(e){return(0,h.sH)(void 0,void 0,void 0,function(){return(0,h.YH)(this,function(t){return[2,e]})})},teardown:function(){return(0,h.sH)(void 0,void 0,void 0,function(){var e,t,n,r;return(0,h.YH)(this,function(i){try{for(t=(e=(0,h.Ju)(c)).next();!t.done;t=e.next())t.value.unsubscribe()}catch(e){n={error:e}}finally{try{t&&!t.done&&(r=e.return)&&r.call(e)}finally{if(n)throw n.error}}return[2]})})}}},n6=function(){function e(e){this.request=e}return Object.defineProperty(e.prototype,"headers",{get:function(){if(this._headers)return this._headers;var e=this.request.headers;if(Array.isArray(e))this._headers=e.reduce(function(e,t){var n=(0,h.zs)(t,2),r=n[0],i=n[1];return e[r]=i,e},{});else if(e instanceof Headers){var t={};e.forEach(function(e,n){t[n]=e}),this._headers=t}else"object"==typeof e&&(this._headers=e);return this._headers},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bodySize",{get:function(){if("number"==typeof this._bodySize)return this._bodySize;var e=_();if(null==e?void 0:e.TextEncoder){var t=this.request.body;return this._bodySize=n7(t,100),this._bodySize}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"method",{get:function(){return this.request.method},enumerable:!1,configurable:!0}),e}(),n5=function(){function e(e){this.body=e}return Object.defineProperty(e.prototype,"bodySize",{get:function(){return n7(this.body,100)},enumerable:!1,configurable:!0}),e}();function n7(e,t){var n,r,i,o,s=_(),u=null==s?void 0:s.TextEncoder;if(u){if("string"==typeof e)o=e,i=new u().encode(o).length;else if(e instanceof Blob)i=(o=e).size;else if(e instanceof URLSearchParams)o=e,i=new u().encode(o.toString()).length;else if(ArrayBuffer.isView(e))i=(o=e).byteLength;else if(e instanceof ArrayBuffer)i=(o=e).byteLength;else if(e instanceof FormData){var a=0,c=0;try{for(var l=(0,h.Ju)(e.entries()),d=l.next();!d.done;d=l.next()){var f=(0,h.zs)(d.value,2),p=f[0],v=f[1];if(a+=p.length,"string"==typeof v)a+=new u().encode(v).length;else{if(!(v instanceof Blob))return;a+=v.size}if(++c>=t)return}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}i=a}else if(e instanceof ReadableStream){o=e;return}return i}}var n9=function(){function e(e){this.response=e}return Object.defineProperty(e.prototype,"headers",{get:function(){var e;if(this._headers)return this._headers;if(this.response.headers instanceof Headers){var t=this.response.headers,n={};return null==(e=null==t?void 0:t.forEach)||e.call(t,function(e,t){n[t]=e}),this._headers=n,n}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bodySize",{get:function(){if(void 0!==this._bodySize)return this._bodySize;var e,t,n=null==(t=null==(e=this.response.headers)?void 0:e.get)?void 0:t.call(e,"content-length"),r=n?parseInt(n,10):void 0;return this._bodySize=r,r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"status",{get:function(){return this.response.status},enumerable:!1,configurable:!0}),e}(),n8=function(){function e(e,t,n){this.statusCode=e,this.headersString=t,this.size=n}return Object.defineProperty(e.prototype,"bodySize",{get:function(){return this.size},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"status",{get:function(){return this.statusCode},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"headers",{get:function(){if(this.headersString){var e,t,n={},r=this.headersString.split("\r\n");try{for(var i=(0,h.Ju)(r),o=i.next();!o.done;o=i.next()){var s=o.value,u=(0,h.zs)(s.split(": "),2),a=u[0],c=u[1];a&&c&&(n[a]=c)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}return n}},enumerable:!1,configurable:!0}),e}(),re=function(){function e(e,t,n,r,i,o,s,u,a,c,l){void 0===s&&(s=0),this.type=e,this.method=t,this.timestamp=n,this.startTime=r,this.url=i,this.requestWrapper=o,this.status=s,this.duration=u,this.responseWrapper=a,this.error=c,this.endTime=l}return e.prototype.toSerializable=function(){var e,t,n,r;
1return Object.fromEntries(Object.entries({type:this.type,method:this.method,url:this.url,timestamp:this.timestamp,status:this.status,duration:this.duration,error:this.error,startTime:this.startTime,endTime:this.endTime,requestHeaders:null==(e=this.requestWrapper)?void 0:e.headers,requestBodySize:null==(t=this.requestWrapper)?void 0:t.bodySize,responseHeaders:null==(n=this.responseWrapper)?void 0:n.headers,responseBodySize:null==(r=this.responseWrapper)?void 0:r.bodySize}).filter(function(e){var t=(0,h.zs)(e,2);return void 0!==(t[0],t[1])}))},e}(),rt=function(e,t){void 0===t&&(t=V()),this.callback=e,this.id=t},rn=new(function(){function e(t){this.eventCallbacks=new Map,this.isObserving=!1,this.logger=t;var n=_();e.isSupported()&&(this.globalScope=n)}return e.isSupported=function(){var e=_();return!!e&&!!e.fetch},e.prototype.subscribe=function(e,t){var n,r,i,o,s,u,a;if(this.logger||(this.logger=t),this.eventCallbacks.set(e.id,e),!this.isObserving){var c=null==(i=null==(r=null==(n=this.globalScope)?void 0:n.XMLHttpRequest)?void 0:r.prototype)?void 0:i.open,l=null==(u=null==(s=null==(o=this.globalScope)?void 0:o.XMLHttpRequest)?void 0:s.prototype)?void 0:u.send;c&&l&&this.observeXhr(c,l);var d=null==(a=this.globalScope)?void 0:a.fetch;d&&this.observeFetch(d),this.isObserving=!0}},e.prototype.unsubscribe=function(e){this.eventCallbacks.delete(e.id)},e.prototype.triggerEventCallbacks=function(e){var t=this;this.eventCallbacks.forEach(function(n){var r;try{n.callback(e)}catch(e){null==(r=t.logger)||r.debug("an unexpected error occurred while triggering event callbacks",e)}})},e.prototype.handleNetworkRequestEvent=function(e,t,n,r,i,o,s){if(void 0!==o&&void 0!==s){var u,a,c,l,d="GET";"object"==typeof t&&null!==t&&"url"in t&&"method"in t?(a=t.url,d=t.method):a=null==(u=null==t?void 0:t.toString)?void 0:u.call(t),d=(null==n?void 0:n.method)||d,r&&(c=r.status),i&&(l={name:i.name||"UnknownError",message:i.message||"An unknown error occurred"},c=0);var f=Math.floor(performance.now()-s),p=Math.floor(o+f),h=new re(e,d,o,o,a,n,c,f,r,l,p);this.triggerEventCallbacks(h)}},e.prototype.getTimestamps=function(){var e,t;return{startTime:null==(e=Date.now)?void 0:e.call(Date),durationStart:null==(t=null==performance?void 0:performance.now)?void 0:t.call(performance)}},e.prototype.observeFetch=function(e){var t=this;this.globalScope&&e&&(this.globalScope.fetch=function(n,r){return(0,h.sH)(t,void 0,void 0,function(){var t,i,o,s,u;return(0,h.YH)(this,function(a){switch(a.label){case 0:try{t=this.getTimestamps()}catch(e){null==(s=this.logger)||s.debug("an unexpected error occurred while retrieving timestamps",e)}a.label=1;case 1:return a.trys.push([1,3,,4]),[4,e(n,r)];case 2:return i=a.sent(),[3,4];case 3:return o=a.sent(),[3,4];case 4:try{this.handleNetworkRequestEvent("fetch",n,r?new n6(r):void 0,i?new n9(i):void 0,o,null==t?void 0:t.startTime,null==t?void 0:t.durationStart)}catch(e){null==(u=this.logger)||u.debug("an unexpected error occurred while handling fetch",e)}if(i)return[2,i];throw o}})})})},e.prototype.observeXhr=function(e,t){if(this.globalScope&&e&&t){var n=this.globalScope.XMLHttpRequest.prototype,r=this;n.open=function(){for(var t,n,i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];var s=(0,h.zs)(i,2),u=s[0],a=s[1];try{this.$$AmplitudeAnalyticsEvent=(0,h.Cl)({method:u,url:null==(t=null==a?void 0:a.toString)?void 0:t.call(a)},r.getTimestamps())}catch(e){null==(n=r.logger)||n.debug("an unexpected error occurred while calling xhr open",e)}return e.apply(this,i)},n.send=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var i=this,o=e[0],s=i.$$AmplitudeAnalyticsEvent;return i.addEventListener("loadend",function(){var e;try{var t=i.getAllResponseHeaders(),n=i.getResponseHeader("content-length"),u=new n8(i.status,t,n?parseInt(n,10):void 0),a=new n5(o);s.status=i.status,r.handleNetworkRequestEvent("xhr",{url:s.url,method:s.method},a,u,void 0,s.startTime,s.durationStart)}catch(t){null==(e=r.logger)||e.debug("an unexpected error occurred while handling xhr send",t)}}),t.apply(i,e)}}},e}()),rr="500-599";function ri(e,t){return RegExp("^"+t.replace(/[-[\]{}()+?.,\\^$|#\s]/g,"\\$&").replace(/\*/g,".*")+"$").test(e)}function ro(e,t){var n,r,i=t.split(",");try{for(var o=(0,h.Ju)(i),s=o.next();!s.done;
1s=o.next()){var u=s.value,a=(0,h.zs)(u.split("-").map(Number),2),c=a[0],l=a[1];if(e===c&&void 0===l||e>=c&&e<=l)return!0}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return!1}function rs(e){var t;if(e)try{var n=null==(t=_())?void 0:t.location.href,r=new URL(e,n),i=r.searchParams.toString(),o=r.hash.replace("#",""),s=r.href,u=r.host;r.hash="",r.search="";var a=r.href;return{query:i,fragment:o,href:s,hrefWithoutQueryOrHash:a,host:u}}catch(e){return}}(p||(p={})).NetworkObservable="networkObservable";var ru=function(e){void 0===e&&(e={});var t,n="@amplitude/plugin-network-capture-browser",r=[],i=function(){var e,n=new t4(function(e){var n=new rt(function(t){var n={event:t,timestamp:Date.now(),type:"network"};e.next(n)});return rn.subscribe(n,t),function(){rn.unsubscribe(n)}});return(e={})[p.NetworkObservable]=n,e};return{name:n,type:"enrichment",setup:function(o,s){return(0,h.sH)(void 0,void 0,void 0,function(){var u;return(0,h.YH)(this,function(a){var c,l,d,f;return"undefined"==typeof document?[2]:(l=(c={allObservables:i(),networkTrackingOptions:e,amplitude:s}).allObservables,d=c.networkTrackingOptions,f=c.amplitude,u=l.networkObservable.pipe(nM(function(e){return function(e,t){void 0===t&&(t={});var n,r,i=rs(e.url);if(!i)return!1;var o=i.host;return!(!1!==t.ignoreAmplitudeRequests&&(ri(o,"*.amplitude.com")||ri(o,"amplitude.com"))||(null==(n=t.ignoreHosts)?void 0:n.find(function(e){return ri(o,e)})))&&(!!t.captureRules||void 0===e.status||!!ro(e.status,rr))&&(!t.captureRules||((0,h.fX)([],(0,h.zs)(t.captureRules),!1).reverse().find(function(t){return void 0!==(r=function(e,t,n){if(!e.hosts||e.hosts.find(function(e){return ri(t,e)}))return(!n&&0!==n||!!ro(n,e.statusCodeRange||rr))&&!0}(t,o,e.status))}),!!r))&&!0}(e.event,d)})).subscribe(function(e){var t,n,r,i=e.event,o=rs(i.url);if(o){var s=null==(n=i.responseWrapper)?void 0:n.bodySize,u=null==(r=i.requestWrapper)?void 0:r.bodySize,a=((t={})["[Amplitude] URL"]=o.hrefWithoutQueryOrHash,t["[Amplitude] URL Query"]=o.query,t["[Amplitude] URL Fragment"]=o.fragment,t["[Amplitude] Request Method"]=i.method,t["[Amplitude] Status Code"]=i.status,t["[Amplitude] Start Time"]=i.startTime,t["[Amplitude] Completion Time"]=i.endTime,t["[Amplitude] Duration"]=i.duration,t["[Amplitude] Request Body Size"]=u,t["[Amplitude] Response Body Size"]=s,t["[Amplitude] Request Type"]=i.type,t);null==f||f.track("[Amplitude] Network Request",a)}}),r.push(u),null==(t=null==o?void 0:o.loggerProvider)||t.log("".concat(n," has been successfully added.")),[2])})})},execute:function(e){return(0,h.sH)(void 0,void 0,void 0,function(){return(0,h.YH)(this,function(t){return[2,e]})})},teardown:function(){return(0,h.sH)(void 0,void 0,void 0,function(){var e,t,n,i;return(0,h.YH)(this,function(o){try{for(t=(e=(0,h.Ju)(r)).next();!t.done;t=e.next())t.value.unsubscribe()}catch(e){n={error:e}}finally{try{t&&!t.done&&(i=e.return)&&i.call(e)}finally{if(n)throw n.error}}return[2]})})}}},ra="dclid",rc="fbclid",rl="gbraid",rd="gclid",rf="ko_click_id",rp="li_fat_id",rh="msclkid",rv="rtd_cid",rg="ttclid",ry="twclid",rm="wbraid",rb={utm_campaign:void 0,utm_content:void 0,utm_id:void 0,utm_medium:void 0,utm_source:void 0,utm_term:void 0,referrer:void 0,referring_domain:void 0,dclid:void 0,gbraid:void 0,gclid:void 0,fbclid:void 0,ko_click_id:void 0,li_fat_id:void 0,msclkid:void 0,rtd_cid:void 0,ttclid:void 0,twclid:void 0,wbraid:void 0},rw=function(e){var t=e.split(".");return t.length<=2?e:t.slice(t.length-2,t.length).join(".")},r_=function(e,t,n,r,i){void 0===i&&(i=!0),e.referrer;var o=e.referring_domain,s=(0,h.Tt)(e,["referrer","referring_domain"]),u=t||{},a=(u.referrer,u.referring_domain),c=(0,h.Tt)(u,["referrer","referring_domain"]);if(rS(n.excludeReferrers,e.referring_domain))return r.debug("This is not a new campaign because ".concat(e.referring_domain," is in the exclude referrer list.")),!1;if(!i&&Object.values(e).every(function(e){return!e})&&t)return r.debug("This is not a new campaign because this is a direct traffic in the same session."),!1;var l=JSON.stringify(s)!==JSON.stringify(c),d=rw(o||"")!==rw(a||""),f=!t||l||d;return f?r.debug("This is a new campaign. An $identify event will be sent."):r.debug("This is not a new campaign because it's the same as the previous one."),f},rS=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=""),e.some(function(e){return e instanceof RegExp?e.test(t):e===t})},rE=function(e){var t=e;
1return t?(t.startsWith(".")&&(t=t.substring(1)),[new RegExp("".concat(t.replace(".","\\."),"$"))]):[]},rI=function(){function e(){}return e.prototype.parse=function(){return(0,h.sH)(this,void 0,void 0,function(){return(0,h.YH)(this,function(e){return[2,(0,h.Cl)((0,h.Cl)((0,h.Cl)((0,h.Cl)({},rb),this.getUtmParam()),this.getReferrer()),this.getClickIds())]})})},e.prototype.getUtmParam=function(){var e=S();return{utm_campaign:e.utm_campaign,utm_content:e.utm_content,utm_id:e.utm_id,utm_medium:e.utm_medium,utm_source:e.utm_source,utm_term:e.utm_term}},e.prototype.getReferrer=function(){var e,t,n={referrer:void 0,referring_domain:void 0};try{n.referrer=document.referrer||void 0,n.referring_domain=null!=(t=null==(e=n.referrer)?void 0:e.split("/")[2])?t:void 0}catch(e){}return n},e.prototype.getClickIds=function(){var e,t=S();return(e={})[ra]=t[ra],e[rc]=t[rc],e[rl]=t[rl],e[rd]=t[rd],e[rf]=t[rf],e[rp]=t[rp],e[rh]=t[rh],e[rv]=t[rv],e[rg]=t[rg],e[ry]=t[ry],e[rm]=t[rm],e},e}(),rk=function(){function e(e,t){var n,r,i;this.shouldTrackNewCampaign=!1,this.options=(0,h.Cl)({initialEmptyValue:"EMPTY",resetSessionOnNewCampaign:!1,excludeReferrers:rE(null==(n=t.cookieOptions)?void 0:n.domain)},e),this.storage=t.cookieStorage,this.storageKey=(r=t.apiKey,void 0===i&&(i=10),[M.r,"MKTG",r.substring(0,i)].filter(Boolean).join("_")),this.currentCampaign=rb,this.sessionTimeout=t.sessionTimeout,this.lastEventTime=t.lastEventTime,this.logger=t.loggerProvider,t.loggerProvider.log("Installing web attribution tracking.")}return e.prototype.init=function(){return(0,h.sH)(this,void 0,void 0,function(){var e,t;return(0,h.YH)(this,function(n){switch(n.label){case 0:return[4,this.fetchCampaign()];case 1:if(t=h.zs.apply(void 0,[n.sent(),2]),this.currentCampaign=t[0],this.previousCampaign=t[1],e=!this.lastEventTime||ee(this.sessionTimeout,this.lastEventTime),!r_(this.currentCampaign,this.previousCampaign,this.options,this.logger,e))return[3,3];return this.shouldTrackNewCampaign=!0,[4,this.storage.set(this.storageKey,this.currentCampaign)];case 2:n.sent(),n.label=3;case 3:return[2]}})})},e.prototype.fetchCampaign=function(){return(0,h.sH)(this,void 0,void 0,function(){return(0,h.YH)(this,function(e){switch(e.label){case 0:return[4,Promise.all([new rI().parse(),this.storage.get(this.storageKey)])];case 1:return[2,e.sent()]}})})},e.prototype.generateCampaignEvent=function(e){this.shouldTrackNewCampaign=!1;var t,n,r=(t=this.currentCampaign,n=this.options,en(Object.entries((0,h.Cl)((0,h.Cl)({},rb),t)).reduce(function(e,t){var r,i=(0,h.zs)(t,2),o=i[0],s=i[1];return(e.setOnce("initial_".concat(o),null!=(r=null!=s?s:n.initialEmptyValue)?r:"EMPTY"),s)?e.set(o,s):e.unset(o)},new Q.T$)));return e&&(r.event_id=e),r},e.prototype.shouldSetSessionIdOnNewCampaign=function(){return this.shouldTrackNewCampaign&&!!this.options.resetSessionOnNewCampaign},e}(),rC=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,h.C6)(t,e),t.prototype.init=function(e,t,n){var r,i;return void 0===e&&(e=""),arguments.length>2?(r=t,i=n):"string"==typeof t?(r=t,i=void 0):(r=null==t?void 0:t.userId,i=t),w(this._init((0,h.Cl)((0,h.Cl)({},i),{userId:r,apiKey:e})))},t.prototype._init=function(t){var n,r,i;return(0,h.sH)(this,void 0,void 0,function(){var o,s,u,a,c,l=this;return(0,h.YH)(this,function(d){var f,p,v,g,y;switch(d.label){case 0:if(this.initializing)return[2];return this.initializing=!0,[4,(f=t.apiKey,p=t,v=this,void 0===p&&(p={}),(0,h.sH)(void 0,void 0,void 0,function(){var e,t,n,r,i,o,s,u,a,c,l,d,g,y,m,b,w,_,E,I,k,C,x,O,P,T,A,H,R,j,N,L,D,q,U,F,Y,z,$,K,J,B,W;return(0,h.YH)(this,function(X){var Q,G,Z;switch(X.label){case 0:if(e=p.identityStorage||eB,E={},e===eB)return[3,1];return n="",[3,5];case 1:if(null==(k=null==(I=p.cookieOptions)?void 0:I.domain))return[3,2];return r=k,[3,4];case 2:return[4,(0,h.sH)(void 0,void 0,void 0,function(){var e,t,n,r,i,o;return(0,h.YH)(this,function(s){switch(s.label){case 0:return[4,new eS().isEnabled()];case 1:if(!s.sent()||"undefined"==typeof location||!location.hostname)return[2,""];for(e=(null!=Q?Q:location.hostname).split("."),t=[],n="AMP_TLDTEST",r=e.length-2;r>=0;--r)t.push(e.slice(r).join("."));r=0,s.label=2;case 2:if(!(r<t.length))return[3,7];return[4,(o=new eS({domain:"."+(i=t[r])})).set(n,1)];case 3:return s.sent(),[4,o.get(n)];case 4:if(!s.sent())return[3,6];return[4,o.remove(n)];case 5:return s.sent(),[2,"."+i];case 6:return r++,[3,2];case 7:return[2,""]}})})];case 3:r=X.sent(),X.label=4;case 4:n=r,X.label=5;case 5:return t=h.Cl.apply(void 0,[(E.domain=n,E.expiration=365,E.sameSite="Lax",E.secure=!1,E.upgrade=!0,E),p.cookieOptions]),[4,(G=i=eX(p.identityStorage,t),void 0===(Z=null==(x=null==(C=p.cookieOptions)?void 0:C.upgrade)||x)&&(Z=!0),(0,h.sH)(void 0,void 0,void 0,function(){var e,t,n,r,i,o,s,u,a;return(0,h.YH)(this,function(c){switch(c.label){case 0:return e="".concat(M.r.toLowerCase(),"_").concat(f.substring(0,6)),[4,G.getRaw(e)];case 1:if(!(t=c.sent()))return[2,{optOut:!1}];if(!Z)return[3,3];
1return[4,G.remove(e)];case 2:c.sent(),c.label=3;case 3:return r=(n=(0,h.zs)(t.split("."),6))[0],i=n[1],o=n[2],s=n[3],u=n[4],a=n[5],[2,{deviceId:r,userId:eR(i),sessionId:eH(s),lastEventId:eH(a),lastEventTime:eH(u),optOut:!!o}]}})}))];case 6:return o=X.sent(),[4,i.get(e_(f))];case 7:return s=X.sent(),u=S(),a=null!=(H=null!=(A=null!=(T=null!=(P=null!=(O=p.deviceId)?O:u.ampDeviceId)?P:u.deviceId)?T:null==s?void 0:s.deviceId)?A:o.deviceId)?H:V(),c=null!=(R=null==s?void 0:s.lastEventId)?R:o.lastEventId,l=null!=(j=null==s?void 0:s.lastEventTime)?j:o.lastEventTime,d=null!=(L=null!=(N=p.optOut)?N:null==s?void 0:s.optOut)?L:o.optOut,g=null!=(D=null==s?void 0:s.sessionId)?D:o.sessionId,y=null!=(U=null!=(q=p.userId)?q:null==s?void 0:s.userId)?U:o.userId,v.previousSessionDeviceId=null!=(F=null==s?void 0:s.deviceId)?F:o.deviceId,v.previousSessionUserId=null!=(Y=null==s?void 0:s.userId)?Y:o.userId,m={ipAddress:null==($=null==(z=p.trackingOptions)?void 0:z.ipAddress)||$,language:null==(J=null==(K=p.trackingOptions)?void 0:K.language)||J,platform:null==(W=null==(B=p.trackingOptions)?void 0:B.platform)||W},b=null==s?void 0:s.pageCounter,w=null==s?void 0:s.debugLogsEnabled,void 0!==p.autocapture&&(p.defaultTracking=p.autocapture),[4,(_=new eW(f,p.appVersion,i,t,p.defaultTracking,p.autocapture,a,p.flushIntervalMillis,p.flushMaxRetries,p.flushQueueSize,e,p.ingestionMetadata,p.instanceName,c,l,p.loggerProvider,p.logLevel,p.minIdLength,p.offline,d,p.partnerId,p.plan,p.serverUrl,p.serverZone,g,p.sessionTimeout,p.storageProvider,m,p.transport,p.useBatch,p.fetchRemoteConfig,y,b,w,p.networkTrackingOptions)).storageProvider.isEnabled()];case 8:return X.sent()||(_.loggerProvider.warn("Storage provider ".concat(_.storageProvider.constructor.name," is not enabled. Falling back to MemoryStorage.")),_.storageProvider=new ew),[2,_]}})}))];case 1:if(!(o=d.sent()).fetchRemoteConfig)return[3,4];return[4,(g=o,(0,h.sH)(void 0,void 0,void 0,function(){var e;return(0,h.YH)(this,function(t){switch(t.label){case 0:return[4,(e=new tw(g)).initialize()];case 1:return t.sent(),[2,e]}})}))];case 2:return[4,d.sent().generateJoinedConfig()];case 3:o=d.sent(),d.label=4;case 4:return[4,e.prototype._init.call(this,o)];case 5:if(d.sent(),this.logBrowserOptions(o),!eu(this.config.defaultTracking))return[3,7];return s=eu((y=this.config).defaultTracking)&&y.defaultTracking&&"object"==typeof y.defaultTracking&&y.defaultTracking.attribution&&"object"==typeof y.defaultTracking.attribution?(0,h.Cl)({},y.defaultTracking.attribution):{},this.webAttribution=new rk(s,this.config),[4,this.webAttribution.init()];case 6:d.sent(),d.label=7;case 7:if(a=Number.isNaN(Number((u=S()).ampSessionId))?void 0:Number(u.ampSessionId),this.setSessionId(null!=(i=null!=(r=null!=(n=t.sessionId)?n:a)?r:this.config.sessionId)?i:Date.now()),(c=j(t.instanceName)).identityStore.setIdentity({userId:this.config.userId,deviceId:this.config.deviceId}),null===this.config.offline)return[3,9];return[4,this.add(tv()).promise];case 8:d.sent(),d.label=9;case 9:return[4,this.add(new W).promise];case 10:return d.sent(),[4,this.add(new eb).promise];case 11:return d.sent(),[4,this.add(new X).promise];case 12:if(d.sent(),th(this.config),!es(this.config.defaultTracking,"fileDownloads"))return[3,14];return this.config.loggerProvider.debug("Adding file download tracking plugin"),[4,this.add(tf()).promise];case 13:d.sent(),d.label=14;case 14:if(!es(this.config.defaultTracking,"formInteractions"))return[3,16];return this.config.loggerProvider.debug("Adding form interaction plugin"),[4,this.add(tc()).promise];case 15:d.sent(),d.label=16;case 16:if(!ea(this.config.defaultTracking))return[3,18];return this.config.loggerProvider.debug("Adding page view tracking plugin"),[4,this.add(to(eh(this.config))).promise];case 17:d.sent(),d.label=18;case 18:if(!ed(this.config.autocapture))return[3,20];return this.config.loggerProvider.debug("Adding user interactions plugin (autocapture plugin)"),[4,this.add(n3(ef(this.config))).promise];case 19:d.sent(),d.label=20;case 20:if(!el(this.config.autocapture))return[3,22];return this.config.loggerProvider.debug("Adding network tracking plugin"),[4,this.add(ru(ep(this.config))).promise];case 21:d.sent(),d.label=22;case 22:return this.initializing=!1,[4,this.runQueuedFunctions("dispatchQ")];case 23:return d.sent(),c.eventBridge.setEventReceiver(function(e){l.track(e.eventType,e.eventProperties)}),[2]}})})},t.prototype.getUserId=function(){var e;return null==(e=this.config)?void 0:e.userId},t.prototype.setUserId=function(e){if(!this.config)return void this.q.push(this.setUserId.bind(this,e));this.config.loggerProvider.debug("function setUserId: ",e),(e!==this.config.userId||void 0===e)&&(this.config.userId=e,this.timeline.onIdentityChanged({userId:e}),N(e,this.config.instanceName))},t.prototype.getDeviceId=function(){var e;return null==(e=this.config)?void 0:e.deviceId},t.prototype.setDeviceId=function(e){if(!this.config)return void this.q.push(this.setDeviceId.bind(this,e));this.config.loggerProvider.debug("function setDeviceId: ",e),e!==this.config.deviceId&&(this.config.deviceId=e,this.timeline.onIdentityChanged({deviceId:e}),L(e,this.config.instanceName))},t.prototype.reset=function(){this.setDeviceId(V()),this.setUserId(void 0)},t.prototype.getSessionId=function(){var e;return null==(e=this.config)?void 0:e.sessionId},t.prototype.setSessionId=function(e){var t,n=[];if(!this.config)return this.q.push(this.setSessionId.bind(this,e)),w(Promise.resolve());if(e===this.config.sessionId)return w(Promise.resolve());this.config.loggerProvider.debug("function setSessionId: ",e);var r=this.getSessionId();r!==e&&this.timeline.onSessionIdChanged(e);var i=this.config.lastEventTime,o=null!=(t=this.config.lastEventId)?t:-1;this.config.sessionId=e,this.config.lastEventTime=void 0,this.config.pageCounter=0,ec(this.config.defaultTracking)&&(r&&i&&n.push(this.track(eq,void 0,{device_id:this.previousSessionDeviceId,event_id:++o,session_id:r,time:i+1,user_id:this.previousSessionUserId}).promise),this.config.lastEventTime=this.config.sessionId);var s=this.trackCampaignEventIfNeeded(++o,n);return ec(this.config.defaultTracking)&&n.push(this.track(eD,void 0,{event_id:s?++o:o,session_id:this.config.sessionId,time:this.config.lastEventTime}).promise),this.previousSessionDeviceId=this.config.deviceId,this.previousSessionUserId=this.config.userId,w(Promise.all(n))},t.prototype.extendSession=function(){if(!this.config)return void this.q.push(this.extendSession.bind(this));
1this.config.lastEventTime=Date.now()},t.prototype.setTransport=function(e){if(!this.config)return void this.q.push(this.setTransport.bind(this,e));this.config.transportProvider=eQ(e)},t.prototype.identify=function(t,n){if(eg(t)){var r=t._q;t._q=[],t=ev(new Q.T$,r)}return(null==n?void 0:n.user_id)&&this.setUserId(n.user_id),(null==n?void 0:n.device_id)&&this.setDeviceId(n.device_id),e.prototype.identify.call(this,t,n)},t.prototype.groupIdentify=function(t,n,r,i){if(eg(r)){var o=r._q;r._q=[],r=ev(new Q.T$,o)}return e.prototype.groupIdentify.call(this,t,n,r,i)},t.prototype.revenue=function(t,n){if(eg(t)){var r=t._q;t._q=[],t=ev(new Z,r)}return e.prototype.revenue.call(this,t,n)},t.prototype.trackCampaignEventIfNeeded=function(e,t){if(!this.webAttribution||!this.webAttribution.shouldTrackNewCampaign)return!1;var n=this.webAttribution.generateCampaignEvent(e);return t?t.push(this.track(n).promise):this.track(n),this.config.loggerProvider.log("Tracking attribution."),!0},t.prototype.process=function(t){return(0,h.sH)(this,void 0,void 0,function(){var n,r,i;return(0,h.YH)(this,function(o){return n=Date.now(),r=ee(this.config.sessionTimeout,this.config.lastEventTime),i=this.webAttribution&&this.webAttribution.shouldSetSessionIdOnNewCampaign(),t.event_type!==eD&&t.event_type!==eq&&(!t.session_id||t.session_id===this.getSessionId())&&(r||i?(this.setSessionId(n),i&&this.config.loggerProvider.log("Created a new session for new campaign.")):r||this.trackCampaignEventIfNeeded()),[2,e.prototype.process.call(this,t)]})})},t.prototype.logBrowserOptions=function(e){try{var t=(0,h.Cl)((0,h.Cl)({},e),{apiKey:e.apiKey.substring(0,10)+"********"});this.config.loggerProvider.debug("Initialized Amplitude with BrowserConfig:",JSON.stringify(t))}catch(e){this.config.loggerProvider.error("Error logging browser config",e)}},t}(eo),rx=function(){var e=new rC;return{init:b(e.init.bind(e),"init",g(e),m(e,["config"])),add:b(e.add.bind(e),"add",g(e),m(e,["config.apiKey","timeline.plugins"])),remove:b(e.remove.bind(e),"remove",g(e),m(e,["config.apiKey","timeline.plugins"])),track:b(e.track.bind(e),"track",g(e),m(e,["config.apiKey","timeline.queue.length"])),logEvent:b(e.logEvent.bind(e),"logEvent",g(e),m(e,["config.apiKey","timeline.queue.length"])),identify:b(e.identify.bind(e),"identify",g(e),m(e,["config.apiKey","timeline.queue.length"])),groupIdentify:b(e.groupIdentify.bind(e),"groupIdentify",g(e),m(e,["config.apiKey","timeline.queue.length"])),setGroup:b(e.setGroup.bind(e),"setGroup",g(e),m(e,["config.apiKey","timeline.queue.length"])),revenue:b(e.revenue.bind(e),"revenue",g(e),m(e,["config.apiKey","timeline.queue.length"])),flush:b(e.flush.bind(e),"flush",g(e),m(e,["config.apiKey","timeline.queue.length"])),getUserId:b(e.getUserId.bind(e),"getUserId",g(e),m(e,["config","config.userId"])),setUserId:b(e.setUserId.bind(e),"setUserId",g(e),m(e,["config","config.userId"])),getDeviceId:b(e.getDeviceId.bind(e),"getDeviceId",g(e),m(e,["config","config.deviceId"])),setDeviceId:b(e.setDeviceId.bind(e),"setDeviceId",g(e),m(e,["config","config.deviceId"])),reset:b(e.reset.bind(e),"reset",g(e),m(e,["config","config.userId","config.deviceId"])),getSessionId:b(e.getSessionId.bind(e),"getSessionId",g(e),m(e,["config"])),setSessionId:b(e.setSessionId.bind(e),"setSessionId",g(e),m(e,["config"])),extendSession:b(e.extendSession.bind(e),"extendSession",g(e),m(e,["config"])),setOptOut:b(e.setOptOut.bind(e),"setOptOut",g(e),m(e,["config"])),setTransport:b(e.setTransport.bind(e),"setTransport",g(e),m(e,["config"]))}};rx()},16069:(e,t,n)=>{"use strict";n.d(t,{E:()=>o,a:()=>i});var r=n(71450),i=function(e){if(Object.keys(e).length>1e3)return!1;for(var t in e){var n=e[t];if(!o(t,n))return!1}return!0},o=function(e,t){var n,o;if("string"!=typeof e)return!1;if(Array.isArray(t)){var s=!0;try{for(var u=(0,r.Ju)(t),a=u.next();!a.done;a=u.next()){var c=a.value;if(Array.isArray(c))return!1;if("object"==typeof c)s=s&&i(c);else if(!["number","string"].includes(typeof c))return!1;if(!s)return!1}}catch(e){n={error:e}}finally{try{a&&!a.done&&(o=u.return)&&o.call(u)}finally{if(n)throw n.error}}}else if(null==t)return!1;else if("object"==typeof t)return i(t);else if(!["number","string","boolean"].includes(typeof t))return!1;return!0}},20569:(e,t,n)=>{"use strict";n.d(t,{m:()=>r});var r=function(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:null}},23458:(e,t,n)=>{"use strict";var r=n(42928),i=n(63984),o=n(367),s=Object.prototype.toString;e.exports=function(e){var t;if("[object Date]"===s.call(e))return e;return"[object Number]"===s.call(e)?new Date((t=e)<315576e5?1e3*t:t):r.is(e)?r.parse(e):i.is(e)?i.parse(e):o.is(e)?o.parse(e):new Date(e)}},23561:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esMo
1dule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Page=void 0;var i=r(n(43770)),o=n(59284),s=n(29485),u=r(n(31943));function a(e,t){o.Facade.call(this,e,t)}t.Page=a,i.default(a,o.Facade);var c=a.prototype;c.action=function(){return"page"},c.type=c.action,c.category=o.Facade.field("category"),c.name=o.Facade.field("name"),c.title=o.Facade.proxy("properties.title"),c.path=o.Facade.proxy("properties.path"),c.url=o.Facade.proxy("properties.url"),c.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")},c.properties=function(e){var t=this.field("properties")||{},n=this.category(),r=this.name();for(var i in e=e||{},n&&(t.category=n),r&&(t.name=r),e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=null==this[i]?this.proxy("properties."+i):this[i]();if(null==o)continue;t[e[i]]=o,i!==e[i]&&delete t[i]}return t},c.email=function(){var e=this.proxy("context.traits.email")||this.proxy("properties.email");if(e)return e;var t=this.userId();if(u.default(t))return t},c.fullName=function(){var e=this.category(),t=this.name();return t&&e?e+" "+t:t},c.event=function(e){return e?"Viewed "+e+" Page":"Loaded a Page"},c.track=function(e){var t=this.json();return t.event=this.event(e),t.timestamp=this.timestamp(),t.properties=this.properties(),new s.Track(t,this.opts)}},23879:(e,t,n)=>{"use strict";n.r(t),n.d(t,{applyDestinationMiddleware:()=>s,sourceMiddlewarePlugin:()=>u});var r=n(71450),i=n(28769),o=n(79409);function s(e,t,n){return(0,r.sH)(this,void 0,void 0,function(){var i,s,u,a,c;return(0,r.YH)(this,function(l){switch(l.label){case 0:i=(0,o.W)(t,{clone:!0,traverse:!1}).rawEvent(),s=0,u=n,l.label=1;case 1:if(!(s<u.length))return[3,4];return a=u[s],[4,function(t,n){return(0,r.sH)(this,void 0,void 0,function(){var i,s,u;return(0,r.YH)(this,function(a){switch(a.label){case 0:return i=!1,s=null,[4,n({payload:(0,o.W)(t,{clone:!0,traverse:!1}),integration:e,next:function(e){i=!0,null===e&&(s=null),e&&(s=e.obj)}})];case 1:return a.sent(),i||null===s||(s.integrations=(0,r.Cl)((0,r.Cl)({},t.integrations),((u={})[e]=!1,u))),[2,s]}})})}(i,a)];case 2:if(null===(c=l.sent()))return[2,null];i=c,l.label=3;case 3:return s++,[3,1];case 4:return[2,i]}})})}function u(e,t){function n(n){return(0,r.sH)(this,void 0,void 0,function(){var s;return(0,r.YH)(this,function(r){switch(r.label){case 0:return s=!1,[4,e({payload:(0,o.W)(n.event,{clone:!0,traverse:!1}),integrations:null!=t?t:{},next:function(e){s=!0,e&&(n.event=e.obj)}})];case 1:if(r.sent(),!s)throw new i.d({retry:!1,type:"middleware_cancellation",reason:"Middleware `next` function skipped"});return[2,n]}})})}return{name:"Source Middleware ".concat(e.name),type:"before",version:"0.1.0",isLoaded:function(){return!0},load:function(e){return Promise.resolve(e)},track:n,page:n,screen:n,identify:n,alias:n,group:n}}},26249:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Delete=void 0;var i=r(n(43770)),o=n(59284);function s(e,t){o.Facade.call(this,e,t)}t.Delete=s,i.default(s,o.Facade),s.prototype.type=function(){return"delete"}},27213:(e,t,n)=>{"use strict";function r(e,t,n){t.split&&(t=t.split("."));for(var r,i,o=0,s=t.length,u=e;o<s&&"__proto__"!=(i=""+t[o++])&&"constructor"!==i&&"prototype"!==i;)u=u[i]=o===s?n:typeof(r=u[i])==typeof t?r:0*t[o]!=0||~(""+t[o]).indexOf(".")?{}:[]}n.d(t,{J:()=>r})},28177:(e,t,n)=>{"use strict";n.d(t,{x:()=>f});var r=n(71450),i=n(4102),o=n(45437),s=n(61527),u={getItem:function(){},setItem:function(){},removeItem:function(){}};try{u=(0,s.B)()&&window.localStorage?window.localStorage:u}catch(e){console.warn("Unable to access localStorage",e)}function a(e){var t=u.getItem(e);return(t?JSON.parse(t):[]).map(function(e){return new o.o(e.event,e.id)})}function c(e){var t=u.getItem(e);return t?JSON.parse(t):{}}function l(e){u.removeItem(e)}function d(e,t,n){void 0===n&&(n=0);var r="persisted-queue:v1:".concat(e,":lock"),i=u.getItem(r),o=i?JSON.parse(i):null,s=null===o||new Date().getTime()>o;if(s){u.setItem(r,JSON.stringify(new Date().getTime()+50)),t(),u.removeItem(r);return}!s&&n<3?setTimeout(function(){d(e,t,n+1)},50):console.error("Unable to retrieve lock")}var f=function(e){function t(t,n){var i=e.call(this,t,[])||this,o="persisted-queue:v1:".concat(n,":items"),s="persisted-queue:v1:".concat(n,":seen"),f=[],p={};return d(n,function(){try{f=a(o),p=c(s),l(o),l(s),i.queue=(0,r.fX)((0,r.fX)([],f,!0),i.queue,!0),i.seen=(0,r.Cl)((0,r.Cl)({},p),i.seen)}catch(e){console.error(e)}}),window.addEventListener("pagehide",function(){if(i.todo>0){var e=(0,r.fX)((0,r.fX)([],i.queue,!0),i.future,!0);try{d(n,function(){var t,n,l,d;t=a(o),n=(0,r.fX)((0,r.fX)([],e,!0),t,!0).reduce(function(e,t){var n;return(0,r.Cl)((0,r.Cl)({},e),((n={})[t.id]=t,n))},{}),u.setItem(o,JSON.stringify(Object.values(n))),l=i.seen,d=c(s),u.setItem(s,JSON.stringify((0,r.Cl)((0,r.Cl)({},d),l)))})}catch(e){console.error(e)}}}),i}return(0,r.C6)(t,e),t}(i.M)},28290:(e,t,n)=>{"use strict";n.d(t,{I2:()=>c,YM:()=>l,qQ:()=>a});var r,i=n(64378),o=/(https:\/\/.*)\/analytics\.js\/v1\/(?:.*?)\/(?:platform|analytics.*)?/,s=function(){var e;return Array.prototype.slice.call(document.querySelectorAll("script")).forEac
1h(function(t){var n,r=null!=(n=t.getAttribute("src"))?n:"",i=o.exec(r);i&&i[1]&&(e=i[1])}),e},u=function(){var e;return null!=r?r:null==(e=(0,i.kJ)())?void 0:e._cdn},a=function(e){var t=(0,i.kJ)();t&&(t._cdn=e),r=e},c=function(){var e=u();if(e)return e;var t=s();return t||"https://cdn.segment.com"},l=function(){var e=c();return"".concat(e,"/next-integrations")}},28769:(e,t,n)=>{"use strict";n.d(t,{d:()=>a,j:()=>c});var r=n(55833),i=n(27213),o=n(71450),s=function(){function e(){this._logs=[]}return e.prototype.log=function(e,t,n){var r=new Date;this._logs.push({level:e,message:t,time:r,extras:n})},Object.defineProperty(e.prototype,"logs",{get:function(){return this._logs},enumerable:!1,configurable:!0}),e.prototype.flush=function(){if(this.logs.length>1){var e=this._logs.reduce(function(e,t){var n,r,i,s=(0,o.Cl)((0,o.Cl)({},t),{json:JSON.stringify(t.extras,null," "),extras:t.extras});delete s.time;var u=null!=(i=null==(r=t.time)?void 0:r.toISOString())?i:"";return e[u]&&(u="".concat(u,"-").concat(Math.random())),(0,o.Cl)((0,o.Cl)({},e),((n={})[u]=s,n))},{});console.table?console.table(e):console.log(e)}else this.logs.forEach(function(e){var t=e.level,n=e.message,r=e.extras;"info"===t||"debug"===t?console.log(n,null!=r?r:""):console[t](n,null!=r?r:"")});this._logs=[]},e}(),u=n(31144),a=function(e){var t,n,r;this.retry=null==(t=e.retry)||t,this.type=null!=(n=e.type)?n:"plugin Error",this.reason=null!=(r=e.reason)?r:""},c=function(){function e(e,t,n,i){void 0===t&&(t=(0,r.v4)()),void 0===n&&(n=new u.r),void 0===i&&(i=new s),this.attempts=0,this.event=e,this._id=t,this.logger=i,this.stats=n}return e.system=function(){},e.prototype.isSame=function(e){return e.id===this.id},e.prototype.cancel=function(e){if(e)throw e;throw new a({reason:"Context Cancel"})},e.prototype.log=function(e,t,n){this.logger.log(e,t,n)},Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),e.prototype.updateEvent=function(e,t){var n;if("integrations"===e.split(".")[0]){var r=e.split(".")[1];if((null==(n=this.event.integrations)?void 0:n[r])===!1)return this.event}return(0,i.J)(this.event,e,t),this.event},e.prototype.failedDelivery=function(){return this._failedDelivery},e.prototype.setFailedDelivery=function(e){this._failedDelivery=e},e.prototype.logs=function(){return this.logger.logs},e.prototype.flush=function(){this.logger.flush(),this.stats.flush()},e.prototype.toJSON=function(){return{id:this._id,event:this.event,logs:this.logger.logs,metrics:this.stats.metrics}},e}()},28800:(e,t,n)=>{"use strict";n.d(t,{a:()=>o,s:()=>i});var r=n(61527);function i(){return!(0,r.B)()||window.navigator.onLine}function o(){return!i()}},29023:e=>{function t(e){return function(t,n,r,o){var s,u=o&&"function"==typeof o.normalizer?o.normalizer:i;n=u(n);for(var a=!1;!a;)!function(){for(s in t){var e=u(s);if(0===n.indexOf(e)){var r=n.substr(e.length);if("."===r.charAt(0)||0===r.length){n=r.substr(1);var i=t[s];if(null==i||!n.length){a=!0;return}t=i;return}}}s=void 0,a=!0}();if(s)return null==t?t:e(t,s,r)}}function n(e,t){return e.hasOwnProperty(t)&&delete e[t],e}function r(e,t,n){return e.hasOwnProperty(t)&&(e[t]=n),e}function i(e){return e.replace(/[^a-zA-Z0-9\.]+/g,"").toLowerCase()}e.exports=t(function(e,t){if(e.hasOwnProperty(t))return e[t]}),e.exports.find=e.exports,e.exports.replace=function(e,n,i,o){return t(r).call(this,e,n,i,o),e},e.exports.del=function(e,r,i){return t(n).call(this,e,r,null,i),e}},29485:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Track=void 0;var i=r(n(43770)),o=n(59284),s=n(64050),u=r(n(31943)),a=r(n(29023));function c(e,t){o.Facade.call(this,e,t)}t.Track=c,i.default(c,o.Facade);var l=c.prototype;l.action=function(){return"track"},l.type=l.action,l.event=o.Facade.field("event"),l.value=o.Facade.proxy("properties.value"),l.category=o.Facade.proxy("properties.category"),l.id=o.Facade.proxy("properties.id"),l.productId=function(){return this.proxy("properties.product_id")||this.proxy("properties.productId")},l.promotionId=function(){return this.proxy("properties.promotion_id")||this.proxy("properties.promotionId")},l.cartId=function(){return this.proxy("properties.cart_id")||this.proxy("properties.cartId")},l.checkoutId=function(){return this.proxy("properties.checkout_id")||this.proxy("properties.checkoutId")},l.paymentId=function(){return this.proxy("properties.payment_id")||this.proxy("properties.paymentId")},l.couponId=function(){return this.proxy("properties.coupon_id")||this.proxy("properties.couponId")},l.wishlistId=function(){return this.proxy("properties.wishlist_id")||this.proxy("properties.wishlistId")},l.reviewId=function(){return this.proxy("properties.review_id")||this.proxy("properties.reviewId")},l.orderId=function(){return this.proxy("properties.id")||this.proxy("properties.order_id")||this.proxy("properties.orderId")},l.sku=o.Facade.proxy("properties.sku"),l.tax=o.Facade.proxy("properties.tax"),l.name=o.Facade.proxy("properties.name"),l.price=o.Facade.proxy("properties.price"),l.total=o.Facade.proxy("properties.total"),l.repeat=o.Facade.proxy("properties.repeat"),l.coupon=o.Facade.proxy("properties.coupon"),l.shipping=o.Facade.proxy("properties.shipping"),l.discount=o.Facade.proxy("properties.discount"),l.shippingMethod=function(){return this.proxy("properties.shipping_method")||this.proxy("properties.shippingMethod")},l.paymentMethod=function(){return this.proxy("properties.payment_method")||this.proxy("properties.paymentMethod")},l.description=o.Facade.proxy("properties.description"),l.plan=o.Facade.proxy("properties.plan"),l.subtotal=function(){var e=a.default(this.properties(),"subtotal"),t=this.total()||this.revenue();if(e)return e;if(!t)return 0;if(this.total()){var n=this.tax();n&&(t-=n),(n=this.shipping())&&(t-=n),(n=this.discount())&&(t+=n)}return t},l.products=function(){var e=this.properties(),t=a.default(e,"products");return Array.isArray(t)?t.filter(function(e){return null!==e}):[]},l.quantity=function(){return(this.obj.properties||{}).quantity||1},l.currency=function(){return(this.obj.properties||{}).currency||"USD"},l.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")},l.query=o.Facade.proxy("options.query"),l.properties=function(e){var t=this.field("properties")||{};for(var n in e=e||{})if(Object.prototype.hasOwnProperty.call(e,n)){var r=null==this[n]?this.proxy("properties."+n):this[n]();if(null==r)continue;t[e[n]]=r,delete t[n]}return t},l.username=function(){return this.proxy("traits.username")||this.proxy("properties.username")||this.userId()||this.sessionId()},l.email=function(){var e=this.proxy("traits.email")||this.proxy("properties.email")||this.proxy("options.traits.email");if(e)return e;var t=this.userId();if(u.default(t))return t},l.revenue=function(){var e=this.proxy("properties.revenue"),t=this.event();return!e&&t&&t.match(/^[ _]?completed[ _]?order[ _]?|^[ _]?order[ _]?completed[ _]?$/i)&&(e=this.proxy("properties.total")),function(e){if(e&&("number"==typeof e||"string"==typeof e&&!isNaN(e=parseFloat(e=e.replace(/\$/g,"")))))return e}(e)},l.cents=function(){var e=this.revenue();return"number"!=typeof e?this.value()||0:100*e},l.identify=function(){var e=this.json();return e.traits=this.traits(),new s.Identify(e,this.opts)}},31144:(e,t,n)=>{"use strict";n.d(t,{p:()=>i,r:()=>o});var r=n(71450),i=function(){function e(){this.metrics=[]}return e.prototype.increment=function(e,t,n){void 0===t&&(t=1),this.metrics.push({metric:e,value:t,tags:null!=n?n:[],type:"counter",timestamp:Date.now()})},e.prototype.gauge=function(e,t,n){this.metrics.push({metric:e,value:t,tags:null!=n?n:[],type:"gauge",timestamp:Date.now()})},e.prototype.flush=function(){var e=this.metrics.map(function(e){return(0,r.Cl)((0,r.Cl)({},e),{tags:e.tags.join(",")})});console.table?console.table(e):console.log(e),this.metrics=[]},e.prototype.serialize=function(){return this.metrics.map(function(e){return{m:e.metric,v:e.value,t:e.tags,k:({gauge:"g",counter:"c"})[e.type],e:e.timestamp}})},e}(),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,r.C6)(t,e),t.prototype.gauge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},t.prototype.increment=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},t.prototype.flush=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},t.prototype.serialize=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return[]},t}(i)},31943:(e,t)=>
1{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=/.+\@.+\..+/;t.default=function(e){return n.test(e)}},34650:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.Delete=t.Screen=t.Page=t.Track=t.Identify=t.Group=t.Alias=t.Facade=void 0;var i=n(59284);Object.defineProperty(t,"Facade",{enumerable:!0,get:function(){return i.Facade}});var o=n(6266);Object.defineProperty(t,"Alias",{enumerable:!0,get:function(){return o.Alias}});var s=n(48065);Object.defineProperty(t,"Group",{enumerable:!0,get:function(){return s.Group}});var u=n(64050);Object.defineProperty(t,"Identify",{enumerable:!0,get:function(){return u.Identify}});var a=n(29485);Object.defineProperty(t,"Track",{enumerable:!0,get:function(){return a.Track}});var c=n(23561);Object.defineProperty(t,"Page",{enumerable:!0,get:function(){return c.Page}});var l=n(65522);Object.defineProperty(t,"Screen",{enumerable:!0,get:function(){return l.Screen}});var d=n(26249);Object.defineProperty(t,"Delete",{enumerable:!0,get:function(){return d.Delete}}),t.default=r(r({},i.Facade),{Alias:o.Alias,Group:s.Group,Identify:u.Identify,Track:a.Track,Page:c.Page,Screen:l.Screen,Delete:d.Delete})},38039:(e,t,n)=>{"use strict";n.d(t,{_:()=>i});var r=n(71450),i=function(e,t){return(0,r.sH)(void 0,void 0,void 0,function(){var n;return(0,r.YH)(this,function(i){return[2,(n=function(i){return(0,r.sH)(void 0,void 0,void 0,function(){var o;return(0,r.YH)(this,function(r){switch(r.label){case 0:if(!e(i))return[3,2];return o=n,[4,t()];case 1:return[2,o.apply(void 0,[r.sent()])];case 2:return[2]}})})})(void 0)]})})}},38050:e=>{"use strict";e.exports=self.fetch.bind(self),e.exports.default=e.exports},39491:(e,t,n)=>{"use strict";n.d(t,{Se:()=>a,T$:()=>u});var r,i=n(71450),o=n(95690),s=n(16069),u=function(){function e(){this._propertySet=new Set,this._properties={}}return e.prototype.getUserProperties=function(){return(0,i.Cl)({},this._properties)},e.prototype.set=function(e,t){return this._safeSet(r.SET,e,t),this},e.prototype.setOnce=function(e,t){return this._safeSet(r.SET_ONCE,e,t),this},e.prototype.append=function(e,t){return this._safeSet(r.APPEND,e,t),this},e.prototype.prepend=function(e,t){return this._safeSet(r.PREPEND,e,t),this},e.prototype.postInsert=function(e,t){return this._safeSet(r.POSTINSERT,e,t),this},e.prototype.preInsert=function(e,t){return this._safeSet(r.PREINSERT,e,t),this},e.prototype.remove=function(e,t){return this._safeSet(r.REMOVE,e,t),this},e.prototype.add=function(e,t){return this._safeSet(r.ADD,e,t),this},e.prototype.unset=function(e){return this._safeSet(r.UNSET,e,o.mG),this},e.prototype.clearAll=function(){return this._properties={},this._properties[r.CLEAR_ALL]=o.mG,this},e.prototype._safeSet=function(e,t,n){if(this._validate(e,t,n)){var r=this._properties[e];return void 0===r&&(r={},this._properties[e]=r),r[t]=n,this._propertySet.add(t),!0}return!1},e.prototype._validate=function(e,t,n){return!(void 0!==this._properties[r.CLEAR_ALL]||this._propertySet.has(t))&&(e===r.ADD?"number"==typeof n:e===r.UNSET||e===r.REMOVE||(0,s.E)(t,n))},e}();!function(e){e.SET="$set",e.SET_ONCE="$setOnce",e.ADD="$add",e.APPEND="$append",e.PREPEND="$prepend",e.REMOVE="$remove",e.PREINSERT="$preInsert",e.POSTINSERT="$postInsert",e.UNSET="$unset",e.CLEAR_ALL="$clearAll"}(r||(r={}));var a=[r.CLEAR_ALL,r.UNSET,r.SET,r.SET_ONCE,r.ADD,r.APPEND,r.PREPEND,r.PREINSERT,r.POSTINSERT,r.REMOVE]},42928:(e,t)=>{"use strict";var n=/^(\d{4})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:([ T])(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;t.parse=function(e){var t=[1,5,6,7,11,12],r=n.exec(e),i=0;if(!r)return new Date(e);for(var o,s=0;o=t[s];s++)r[o]=parseInt(r[o],10)||0;return r[2]=parseInt(r[2],10)||1,r[3]=parseInt(r[3],10)||1,r[2]--,r[8]=r[8]?(r[8]+"00").substring(0,3):0," "===r[4]?i=new Date().getTimezoneOffset():"Z"!==r[9]&&r[10]&&(i=60*r[11]+r[12],"+"===r[10]&&(i=0-i)),new Date(Date.UTC(r[1],r[2],r[3],r[5],r[6]+i,r[7],r[8]))},t.is=function(e,t){return"string"==typeof e&&(!t||!1!==/^\d{4}-\d{2}-\d{2}/.test(e))&&n.test(e)}},43770:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},45437:(e,t,n)=>{"use strict";n.d(t,{o:()=>s});var r=n(71450),i=n(28769),o=n(635),s=function(e){function t(t,n){return e.call(this,t,n,new o.U)||this}return(0,r.C6)(t,e),t.system=function(){return new this({type:"track",event:"system"})},t}(i.j)},46467:(e,t,n)=>{"use strict";n.d(t,{h:()=>s});var r=n(38050),i=n.n(r),o=n(20569),s=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=(0,o.m)();return(n&&n.fetch||i()).apply(void 0,e)}},48065:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esMo
vendor: 8,880 bytes, line 1
1dule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Group=void 0;var i=r(n(43770)),o=r(n(31943)),s=r(n(23458)),u=n(59284);function a(e,t){u.Facade.call(this,e,t)}t.Group=a,i.default(a,u.Facade);var c=a.prototype;c.action=function(){return"group"},c.type=c.action,c.groupId=u.Facade.field("groupId"),c.created=function(){var e=this.proxy("traits.createdAt")||this.proxy("traits.created")||this.proxy("properties.createdAt")||this.proxy("properties.created");if(e)return s.default(e)},c.email=function(){var e=this.proxy("traits.email");if(e)return e;var t=this.groupId();if(o.default(t))return t},c.traits=function(e){var t=this.properties(),n=this.groupId();for(var r in e=e||{},n&&(t.id=n),e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=null==this[r]?this.proxy("traits."+r):this[r]();if(null==i)continue;t[e[r]]=i,delete t[r]}return t},c.name=u.Facade.proxy("traits.name"),c.industry=u.Facade.proxy("traits.industry"),c.employees=u.Facade.proxy("traits.employees"),c.properties=function(){return this.field("traits")||this.field("properties")||{}}},54399:(e,t,n)=>{"use strict";n.d(t,{a:()=>r});var r="api.segment.io/v1"},55833:(e,t,n)=>{"use strict";n.d(t,{v4:()=>s});for(var r,i=256,o=[];i--;)o[i]=(i+256).toString(16).substring(1);function s(){var e,t=0,n="";if(!r||i+16>256){for(r=Array(t=256);t--;)r[t]=256*Math.random()|0;t=i=0}for(;t<16;t++)e=r[i+t],6==t?n+=o[15&e|64]:8==t?n+=o[63&e|128]:n+=o[e],1&t&&t>1&&t<11&&(n+="-");return i++,n}},59284:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Facade=void 0;var i=r(n(63462)),o=n(12519),s=r(n(99202)),u=r(n(23458)),a=r(n(29023)),c=r(n(95043));function l(e,t){t=t||{},this.raw=o.clone(e),"clone"in t||(t.clone=!0),t.clone&&(e=o.clone(e)),"traverse"in t||(t.traverse=!0),"timestamp"in e?e.timestamp=u.default(e.timestamp):e.timestamp=new Date,t.traverse&&c.default(e),this.opts=t,this.obj=e}t.Facade=l;var d=l.prototype;function f(e){return o.clone(e)}d.proxy=function(e){var t=e.split("."),n=this[e=t.shift()]||this.obj[e];return n?("function"==typeof n&&(n=n.call(this)||{}),0===t.length||(n=a.default(n,t.join("."))),this.opts.clone?f(n):n):n},d.field=function(e){var t=this.obj[e];return this.opts.clone?f(t):t},l.proxy=function(e){return function(){return this.proxy(e)}},l.field=function(e){return function(){return this.field(e)}},l.multi=function(e){return function(){var t=this.proxy(e+"s");if(Array.isArray(t))return t;var n=this.proxy(e);return n&&(n=[this.opts.clone?o.clone(n):n]),n||[]}},l.one=function(e){return function(){var t=this.proxy(e);if(t)return t;var n=this.proxy(e+"s");if(Array.isArray(n))return n[0]}},d.json=function(){var e=this.opts.clone?o.clone(this.obj):this.obj;return this.type&&(e.type=this.type()),e},d.rawEvent=function(){return this.raw},d.options=function(e){var t=this.obj.options||this.obj.context||{},n=this.opts.clone?o.clone(t):t;if(!e)return n;if(this.enabled(e)){var r=this.integrations(),i=r[e]||a.default(r,e);return"object"!=typeof i&&(i=a.default(this.options(),e)),"object"==typeof i?i:{}}},d.context=d.options,d.enabled=function(e){var t=this.proxy("options.providers.all");"boolean"!=typeof t&&(t=this.proxy("options.all")),"boolean"!=typeof t&&(t=this.proxy("integrations.all")),"boolean"!=typeof t&&(t=!0);var n=t&&s.default(e),r=this.integrations();if(r.providers&&r.providers.hasOwnProperty(e)&&(n=r.providers[e]),r.hasOwnProperty(e)){var i=r[e];n="boolean"!=typeof i||i}return!!n},d.integrations=function(){return this.obj.integrations||this.proxy("options.providers")||this.options()},d.active=function(){var e=this.proxy("options.active");return null==e&&(e=!0),e},d.anonymousId=function(){return this.field("anonymousId")||this.field("sessionId")},d.sessionId=d.anonymousId,d.groupId=l.proxy("options.groupId"),d.traits=function(e){var t=this.proxy("options.traits")||{},n=this.userId();for(var r in e=e||{},n&&(t.id=n),e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=null==this[r]?this.proxy("options.traits."+r):this[r]();if(null==i)continue;t[e[r]]=i,delete t[r]}return t},d.library=function(){var e=this.proxy("options.library");return e?"string"==typeof e?{name:e,version:null}:e:{name:"unknown",version:null}},d.device=function(){var e=this.proxy("context.device");("object"!=typeof e||null===e)&&(e={});var t=this.library().name;return e.type||(t.indexOf("ios")>-1&&(e.type="ios"),t.indexOf("android")>-1&&(e.type="android")),e},d.userAgent=l.proxy("context.userAgent"),d.timezone=l.proxy("context.timezone"),d.timestamp=l.field("timestamp"),d.channel=l.field("channel"),d.ip=l.proxy("context.ip"),d.userId=l.field("userId"),i.default(d)},59315:(e,t,n)=>{"use strict";function r(e,t){var n=t.methodName,r=t.integrationName,i=t.type,o=t.didError;e.stats.increment("analytics_js.integration.invoke".concat(void 0!==o&&o?".error":""),1,["method:".concat(n),"integration_name:".concat(r),"type:".concat(i)])}n.d(t,{y:()=>r})},60677:(e,t,n)=>{"use strict";n.d(t,{r:()=>r});var r="1.81.0"},61527:(e,t,n)=>{"use strict";function r(){return"undefined"!=typeof window}function i(){return!r()}n.d(t,{B:()=>r,S:()=>i})},63462:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(29023));function o(e,t){return function(){var n=this.traits(),r=this.properties?this.properties():{};return i.default(n,"address."+e)||i.default(n,e)||(t?i.default(n,"address."+t):null)||(t?i.default(n,t):null)||i.default(r,"address."+e)||i.default(r,e)||(t?i.default(r,"address."+t):null)||(t?i.default(r,t):null)}}t.default=function(e){e.zip=o("postalCode","zip"),e.country=o("country"),e.street=o("street"),e.state=o("state"),e.city=o("city"),e.region=o("region")}},63984:(e,t)=>{"use strict";var n=/\d{13}/;t.is=function(e){return n.test(e)},t.parse=function(e){return new Date(e=parseInt(e,10))}},64050:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Identify=void 0;var i=n(59284),o=r(n(29023)),s=r(n(43770)),u=r(n(31943)),a=r(n(23458)),c=function(e){return e.trim()};function l(e,t){i.Facade.call(this,e,t)}t.Identify=l,s.default(l,i.Facade);var d=l.prototype;d.action=function(){return"identify"},d.type=d.action,d.traits=function(e){var t=this.field("traits")||{},n=this.userId();for(var r in e=e||{},n&&(t.id=n),e){var i=null==this[r]?this.proxy("traits."+r):this[r]();null!=i&&(t[e[r]]=i,r!==e[r]&&delete t[r])}return t},d.email=function(){var e=this.proxy("traits.email");if(e)return e;var t=this.userId();if(u.default(t))return t},d.created=function(){var e=this.proxy("traits.created")||this.proxy("traits.createdAt");if(e)return a.default(e)},d.companyCreated=function(){var e=this.proxy("traits.company.created")||this.proxy("traits.company.createdAt");if(e)return a.default(e)},d.companyName=function(){return this.proxy("traits.company.name")},d.name=function(){var e=this.proxy("traits.name");if("string"==typeof e)return c(e);var t=this.firstName(),n=this.lastName();if(t&&n)return c(t+" "+n)},d.firstName=function(){var e=this.proxy("traits.firstName");if("string"==typeof e)return c(e);var t=this.proxy("traits.name");if("string"==typeof t)return c(t).split(" ")[0]},d.lastName=function(){var e=this.proxy("traits.lastName");if("string"==typeof e)return c(e);var t=this.proxy("traits.name");if("string"==typeof t){var n=c(t).indexOf(" ");if(-1!==n)return c(t.substr(n+1))}},d.uid=function(){return this.userId()||this.username()||this.email()},d.description=function(){return this.proxy("traits.description")||this.proxy("traits.background")},d.age=function(){var e=this.birthday(),t=o.default(this.traits(),"age");return null!=t?t:e instanceof Date?new Date().getFullYear()-e.getFullYear():void 0},d.avatar=function(){var e=this.traits();return o.default(e,"avatar")||o.default(e,"photoUrl")||o.default(e,"avatarUrl")},d.position=function(){var e=this.traits();return o.default(e,"position")||o.default(e,"jobTitle")},d.username=i.Facade.proxy("traits.username"),d.website=i.Facade.one("traits.website"),d.websites=i.Facade.multi("traits.website"),d.phone=i.Facade.one("traits.phone"),d.phones=i.Facade.multi("traits.phone"),d.address=i.Facade.proxy("traits.address"),d.gender=i.Facade.proxy("traits.gender"),d.birthday=i.Facade.proxy("traits.birthday")},64071:(e,t,n)=>{"use strict";n.d(t,{u:()=>r});var r=function(){var e,t,n=!1,r=new Promise(function(r,i){e=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];n=!0,r.apply(void 0,e)},t=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];n=!0,i.apply(void 0,e)}});return{resolve:e,reject:t,promise:r,isSettled:function(){return n}}}},64378:(e,t,n)=>{"use strict";n.d(t,{Ud:()=>s,kJ:()=>i,rY:()=>
1o});var r="analytics";function i(){return window[r]}function o(e){r=e}function s(e){window[r]=e}},64952:(e,t,n)=>{"use strict";n.d(t,{N:()=>eV});var r,i,o=n(71450),s=n(87358);function u(){return void 0!==s&&s.env?s.env:{}}var a=n(28290),c=n(74453);function l(e,t,n,r){var i,o=[e,t,n,r],s=(0,c.Qd)(e)?e.event:e;if(!s||!(0,c.Kg)(s))throw Error("Event missing");var u=(0,c.Qd)(e)?null!=(i=e.properties)?i:{}:(0,c.Qd)(t)?t:{},a={};return(0,c.Tn)(n)||(a=null!=n?n:{}),(0,c.Qd)(e)&&!(0,c.Tn)(t)&&(a=null!=t?t:{}),[s,u,a,o.find(c.Tn)]}function d(e,t,n,r,i){var o,s,u=null,a=null,l=[e,t,n,r,i],d=l.filter(c.Kg);1===d.length?(a=(0,c.Kg)(l[1])?l[1]:d[0],u=null):2===d.length&&("string"==typeof l[0]&&(u=l[0]),"string"==typeof l[1]&&(a=l[1]));var f=l.find(c.Tn),p=l.filter(c.Qd);return 1===p.length?(0,c.Qd)(l[2])?(s={},o=l[2]):(0,c.Qd)(l[3])?(o={},s=l[3]):(o=p[0],s={}):2===p.length&&(o=p[0],s=p[1]),[u,a,null!=o?o:o={},null!=s?s:s={},f]}var f=function(e){return function(){for(var t,n,r,i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];for(var s={},u=["callback","options","traits","id"],a=0;a<i.length;a++){var l=i[a],d=u.pop();if("id"===d){if((0,c.Kg)(l)||(0,c.Et)(l)){s.id=l.toString();continue}if(null==l)continue;d=u.pop()}if(("traits"===d||"options"===d)&&(null==l||(0,c.Qd)(l))&&(s[d]=l),(0,c.Tn)(l)){s.callback=l;break}}return[null!=(t=s.id)?t:e.id(),null!=(n=s.traits)?n:{},null!=(r=s.options)?r:{},s.callback]}};function p(e,t,n,r){(0,c.Et)(e)&&(e=e.toString()),(0,c.Et)(t)&&(t=t.toString());var i=[e,t,n,r],o=i.filter(c.Kg),s=o[0],u=void 0===s?e:s,a=o[1],l=i.filter(c.Qd)[0];return[u,void 0===a?null:a,void 0===l?{}:l,i.find(c.Tn)]}var h=n(28800),v=n(45437),g=n(11556),y=n(72163),m=n(55833),b=function(e,t,n,r,i,o){return{__t:"bpc",c:t,p:r,u:e,s:n,t:i,r:o}},w=Object.keys(b("","","","","","")),_=function(e){var t=e.indexOf("#");return -1===t?e:e.slice(0,t)},S=function(e){try{return new URL(e).pathname}catch(t){return"/"===e[0]?e:"/"+e}},E=function(e){var t=e.c,n=e.p,r=e.s,i=e.u,o=e.r,s=e.t,u=t?S(t):n,a=t?t.indexOf("?")>-1?t:t+r:_(i);return{path:u,referrer:o,search:r,title:s,url:a}},I=function(){var e=document.querySelector("link[rel='canonical']");return b(location.href,e&&e.getAttribute("href")||void 0,location.search,location.pathname,document.title,document.referrer)},k=function(e,t){void 0===t&&(t=E(I()));var n,r,i,s=e.context;"page"===e.type&&(i=e.properties&&(n=e.properties,r=Object.keys(t),Object.assign.apply(Object,(0,o.fX)([{}],r.map(function(e){var t;if(n&&Object.prototype.hasOwnProperty.call(n,e))return(t={})[e]=n[e],t}),!1))),e.properties=(0,o.Cl)((0,o.Cl)((0,o.Cl)({},t),e.properties),e.name?{name:e.name}:{})),s.page=(0,o.Cl)((0,o.Cl)((0,o.Cl)({},t),i),s.page)},C=n(27213),x=function(e){function t(t,n){var r=e.call(this,"".concat(t," ").concat(n))||this;return r.field=t,r}return(0,o.C6)(t,e),t}(Error),O="is not a string",P="is not an object",T=function(e){var t,n;this.settings=e,this.createMessageId=e.createMessageId,this.onEventMethodCall=null!=(t=e.onEventMethodCall)?t:function(){},this.onFinishedEvent=null!=(n=e.onFinishedEvent)?n:function(){}},A=function(e){function t(t){var n=e.call(this,{createMessageId:function(){return"ajs-next-".concat(Date.now(),"-").concat((0,m.v4)())},onEventMethodCall:function(e){var t=e.options;n.maybeUpdateAnonId(t)},onFinishedEvent:function(e){return n.addIdentity(e),e}})||this;return n.user=t,n}return(0,o.C6)(t,e),t.prototype.maybeUpdateAnonId=function(e){(null==e?void 0:e.anonymousId)&&this.user.anonymousId(e.anonymousId)},t.prototype.addIdentity=function(e){this.user.id()&&(e.userId=this.user.id()),this.user.anonymousId()&&(e.anonymousId=this.user.anonymousId())},t.prototype.track=function(t,n,r,i,o){var s=e.prototype.track.call(this,t,n,r,i);return k(s,o),s},t.prototype.page=function(t,n,r,i,o,s){var u=e.prototype.page.call(this,t,n,r,i,o);return k(u,s),u},t.prototype.screen=function(t,n,r,i,o,s){var u=e.prototype.screen.call(this,t,n,r,i,o);return k(u,s),u},t.prototype.identify=function(t,n,r,i,o){var s=e.prototype.identify.call(this,t,n,r,i);return k(s,o),s},t.prototype.group=function(t,n,r,i,o){var s=e.prototype.group.call(this,t,n,r,i);return k(s,o),s},t.prototype.alias=function(t,n,r,i,o){var s=e.prototype.alias.call(this,t,n,r,i);return k(s,o),s},t}(function(){function e(e){this.settings=new T(e)}return e.prototype.track=function(e,t,n,r){return this.settings.onEventMethodCall({type:"track",options:n}),this.normalize((0,o.Cl)((0,o.Cl)({},this.baseEvent()),{event:e,type:"track",properties:null!=t?t:{},options:(0,o.Cl)({},n),integrations:(0,o.Cl)({},r)}))},e.prototype.page=function(e,t,n,r,i){this.settings.onEventMethodCall({type:"page",options:r});var s,u={type:"page",properties:(0,o.Cl)({},n),options:(0,o.Cl)({},r),integrations:(0,o.Cl)({},i)};return null!==e&&(u.category=e,u.properties=null!=(s=u.properties)?s:{},u.properties.category=e),null!==t&&(u.name=t),this.normalize((0,o.Cl)((0,o.Cl)({},this.baseEvent()),u))},e.prototype.screen=function(e,t,n,r,i){this.settings.onEventMethodCall({type:"screen",options:r});var s={type:"screen",properties:(0,o.Cl)({},n),options:(0,o.Cl)({},r),integrations:(0,o.Cl)({},i)};return null!==e&&(s.category=e),null!==t&&(s.name=t),this.normalize((0,o.Cl)((0,o.Cl)({},this.baseEvent()),s))},e.prototype.identify=function(e,t,n,r){return this.settings.onEventMethodCall({type:"identify",options:n}),this.normalize((0,o.Cl)((0,o.Cl)({},this.baseEvent()),{type:"identify",userId:e,traits:null!=t?t:{},options:(0,o.Cl)({},n),integrations:r}))},e.prototype.group=function(e,t,n,r){return this.settings.onEventMethodCall({type:"group",options:n}),this.normalize((0,o.Cl)((0,o.Cl)({},this.baseEvent()),{type:"group",traits:null!=t?t:{},options:(0,o.Cl)({},n),integrations:(0,o.Cl)({},r),groupId:e}))},e.prototype.alias=function(e,t,n,r){this.settings.onEventMethodCall({type:"alias",options:n});var i={userId:e,type:"alias",options:(0,o.Cl)({},n),integrations:(0,o.Cl)({},r)};return(null!==t&&(i.previousId=t),void 0===e)?this.normalize((0,o.Cl)((0,o.Cl)({},i),this.baseEvent())):this.normalize((0,o.Cl)((0,o.Cl)({},this.baseEvent()),i))},e.prototype.baseEvent=function(){return{integrations:{},options:{}}},e.prototype.context=function(e){var t,n=["userId","anonymousId","timestamp","messageId"];delete e.integrations;var r=Object.keys(e),i=null!=(t=e.context)?t:{},o={};return r.forEach(function(t){"context"!==t&&(n.includes(t)?(0,C.J)(o,t,e[t]):(0,C.J)(i,t,e[t]))}),[i,o]},e.prototype.normalize=function(e){var t,n,r,i=Object.keys(null!=(n=e.integrations)?n:{}).reduce(function(t,n){var r,i;return(0,o.Cl)((0,o.Cl)({},t),((r={})[n]=!!(null==(i=e.integrations)?void 0:i[n]),r))},{});t=e.options||{},e.options=Object.keys(t).filter(function(e){return function(e,t){return void 0!==t}(e,t[e])}).reduce(function(e,n){return e[n]=t[n],e},{});var s=(0,o.Cl)((0,o.Cl)({},i),null==(r=e.options)?void 0:r.integrations),u=e.options?this.context(e.options):[],a=u[0],l=u[1],d=e.options,f=(0,o.Tt)(e,["options"]),p=(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({timestamp:new Date},f),{context:a,integrations:s}),l),{messageId:d.messageId||this.settings.createMessageId()});return this.settings.onFinishedEvent(p),!function(e){if(!(0,c.t2)(e))throw new x("Event","is nil");if("object"!=typeof e)throw new x("Event",P);if(!(0,c.Kg)(e.type))throw new x(".type",O);if(!(0,c.Kg)(e.messageId))throw new x(".messageId",O);if("track"===e.type){if(!(0,c.Kg)(e.event))throw new x(".event",O);if(!(0,c.Qd)(e.properties))throw new x(".properties",P)}["group","identify"].includes(e.type)&&function(e){if(!(0,c.Qd)(e.traits))throw new x(".traits",P)}(e)}(p),p},e}()),H=function(e){return"addMiddleware"in e&&"destination"===e.type},R=n(28177),j=n(4102),N=n(28769),L=function(){var e,t,n=0;return{done:function(){return e},run:function(r){var i=r();return"object"==typeof i&&null!==i&&"then"in i&&"function"==typeof i.then&&(1==++n&&(e=new Promise(function(e){return t=e})),i.finally(function(){return 0==--n&&t()})),i}}},M=n(89288),D=function(e){function t(t){return e.call(this,"string"==typeof t?new R.x(4,t):t)||this}return(0,o.C6)(t,e),t.prototype.flush=function(){return(0,o.sH)(this,void 0,void 0,function(){return(0,o.YH)(this,function(t){return(0,h.a)()?[2,[]]:[2,e.prototype.flush.call(this)]})})},t}(function(e){function t(t){var n=e.call(this)||this;return n.criticalTasks=L(),n.plugins=[],n.failedInitializations=[],n.flushing=!1,n.queue=t,n.queue.on(j.g,function(){n.scheduleFlush(0)}),n}return(0,o.C6)(t,e),t.prototype.register=function(e,t,n){return(0,o.sH)(this,void 0,void 0,function(){var r,i,s=this;return(0,o.YH)(this,function(o){switch(o.label){case 0:if(this.plugins.push(t),r=function(n){s.failedInitializations.push(t.name),s.emit("initialization_failure",t),console.warn(t.name,n),e.log("warn","Failed to load destination",{plugin:t.name,error:n}),s.plugins=s.plugins.filter(function(e){return e!==t})},"destination"!==t.type||"Segment.io"===t.name)return[3,1];return t.load(e,n).catch(r),[3,4];case 1:return o.trys.push([1,3,,4]),[4,t.load(e,n)];case 2:return o.sent(),[3,4];case 3:return i=o.sent(),r(i),[3,4];case 4:return[2]}})})},t.prototype.deregister=function(e,t,n){return(0,o.sH)(this,void 0,void 0,function(){var r;return(0,o.YH)(this,function(i){switch(i.label){case 0:if(i.trys.push([0,3,,4]),!t.unload)return[3,2];return[4,Promise.resolve(t.unload(e,n))];case 1:i.sent(),i.label=2;case 2:return this.plugins=this.plugins.filter(function(e){return e.name!==t.name}),[3,4];case 3:return r=i.sent(),e.log("warn","Failed to unload destination",{plugin:t.name,error:r}),[3,4];case 4:return[2]}})})},t.prototype.dispatch=function(e){return(0,o.sH)(this,void 0,void 0,function(){var t;
1return(0,o.YH)(this,function(n){return e.log("debug","Dispatching"),e.stats.increment("message_dispatched"),this.queue.push(e),t=this.subscribeToDelivery(e),this.scheduleFlush(0),[2,t]})})},t.prototype.subscribeToDelivery=function(e){return(0,o.sH)(this,void 0,void 0,function(){var t=this;return(0,o.YH)(this,function(n){return[2,new Promise(function(n){var r=function(i,o){i.isSame(e)&&(t.off("flush",r),n(i))};t.on("flush",r)})]})})},t.prototype.dispatchSingle=function(e){return(0,o.sH)(this,void 0,void 0,function(){var t=this;return(0,o.YH)(this,function(n){return e.log("debug","Dispatching"),e.stats.increment("message_dispatched"),this.queue.updateAttempts(e),e.attempts=1,[2,this.deliver(e).catch(function(n){return t.enqueuRetry(n,e)?t.subscribeToDelivery(e):(e.setFailedDelivery({reason:n}),e)})]})})},t.prototype.isEmpty=function(){return 0===this.queue.length},t.prototype.scheduleFlush=function(e){var t=this;void 0===e&&(e=500),this.flushing||(this.flushing=!0,setTimeout(function(){t.flush().then(function(){setTimeout(function(){t.flushing=!1,t.queue.length&&t.scheduleFlush(0)},0)})},e))},t.prototype.deliver=function(e){return(0,o.sH)(this,void 0,void 0,function(){var t,n,r,i;return(0,o.YH)(this,function(o){switch(o.label){case 0:return[4,this.criticalTasks.done()];case 1:o.sent(),t=Date.now(),o.label=2;case 2:return o.trys.push([2,4,,5]),[4,this.flushOne(e)];case 3:return e=o.sent(),n=Date.now()-t,this.emit("delivery_success",e),e.stats.gauge("delivered",n),e.log("debug","Delivered",e.event),[2,e];case 4:throw i=r=o.sent(),e.log("error","Failed to deliver",i),this.emit("delivery_failure",e,i),e.stats.increment("delivery_failed"),r;case 5:return[2]}})})},t.prototype.enqueuRetry=function(e,t){return!!(!(e instanceof N.d)||e.retry)&&this.queue.pushWithBackoff(t)},t.prototype.flush=function(){return(0,o.sH)(this,void 0,void 0,function(){var e,t;return(0,o.YH)(this,function(n){switch(n.label){case 0:if(0===this.queue.length||!(e=this.queue.pop()))return[2,[]];e.attempts=this.queue.getAttempts(e),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.deliver(e)];case 2:return e=n.sent(),this.emit("flush",e,!0),[3,4];case 3:return t=n.sent(),this.enqueuRetry(t,e)||(e.setFailedDelivery({reason:t}),this.emit("flush",e,!1)),[2,[]];case 4:return[2,[e]]}})})},t.prototype.isReady=function(){return!0},t.prototype.availableExtensions=function(e){var t,n,r=(t="type",n={},this.plugins.filter(function(t){if("destination"!==t.type&&"Segment.io"!==t.name)return!0;var n,r,i,o=void 0;return null==(n=t.alternativeNames)||n.forEach(function(t){void 0!==e[t]&&(o=e[t])}),null!=(i=null!=(r=e[t.name])?r:o)?i:!1!==("Segment.io"===t.name||e.All)}).forEach(function(e){var r,i=void 0;if("string"==typeof t){var s=e[t];i="string"!=typeof s?JSON.stringify(s):s}else t instanceof Function&&(i=t(e));void 0!==i&&(n[i]=(0,o.fX)((0,o.fX)([],null!=(r=n[i])?r:[],!0),[e],!1))}),n),i=r.before,s=r.enrichment,u=r.destination,a=r.after;return{before:void 0===i?[]:i,enrichment:void 0===s?[]:s,destinations:void 0===u?[]:u,after:void 0===a?[]:a}},t.prototype.flushOne=function(e){var t,n;return(0,o.sH)(this,void 0,void 0,function(){var r,i,s,u,a,c,l,d,f,p,h,v,g;return(0,o.YH)(this,function(o){switch(o.label){case 0:if(!this.isReady())throw Error("Not ready");e.attempts>1&&this.emit("delivery_retry",e),i=(r=this.availableExtensions(null!=(t=e.event.integrations)?t:{}
vendor: 4,218 bytes, line 1
1)).before,s=r.enrichment,u=0,a=i,o.label=1;case 1:if(!(u<a.length))return[3,4];return c=a[u],[4,(0,M.D)(e,c)];case 2:(l=o.sent())instanceof N.j&&(e=l),this.emit("message_enriched",e,c),o.label=3;case 3:return u++,[3,1];case 4:d=0,f=s,o.label=5;case 5:if(!(d<f.length))return[3,8];return p=f[d],[4,(0,M.C)(e,p)];case 6:(l=o.sent())instanceof N.j&&(e=l),this.emit("message_enriched",e,p),o.label=7;case 7:return d++,[3,5];case 8:return v=(h=this.availableExtensions(null!=(n=e.event.integrations)?n:{})).destinations,g=h.after,[4,new Promise(function(t,n){setTimeout(function(){Promise.all(v.map(function(t){return(0,M.C)(e,t)})).then(t).catch(n)},0)})];case 9:return o.sent(),e.stats.increment("message_delivered"),this.emit("message_delivered",e),[4,Promise.all(g.map(function(t){return(0,M.C)(e,t)}))];case 10:return o.sent(),[2,e]}})})},t}(y.v));function q(e){for(var t=e.constructor.prototype,n=0,r=Object.getOwnPropertyNames(t);n<r.length;n++){var i=r[n];if("constructor"!==i){var o=Object.getOwnPropertyDescriptor(e.constructor.prototype,i);o&&"function"==typeof o.value&&(e[i]=e[i].bind(e))}}return e}var U={Cookie:"cookie",LocalStorage:"localStorage",Memory:"memory"},F=function(e,t,n,r){console.warn("".concat(e.constructor.name,": Can't ").concat(t,' key "').concat(n,'" | Err: ').concat(r))},Y=function(){function e(e){this.stores=e}return e.prototype.get=function(e){for(var t=null,n=0,r=this.stores;n<r.length;n++){var i=r[n];try{if(null!=(t=i.get(e)))return t}catch(t){F(i,"get",e,t)}}return null},e.prototype.set=function(e,t){this.stores.forEach(function(n){try{n.set(e,t)}catch(t){F(n,"set",e,t)}})},e.prototype.clear=function(e){this.stores.forEach(function(t){try{t.remove(e)}catch(n){F(t,"remove",e,n)}})},e.prototype.getAndSync=function(e){var t=this.get(e),n="number"==typeof t?t.toString():t;return this.set(e,n),n},e}(),z=function(){function e(){this.cache={}}return e.prototype.get=function(e){var t;return null!=(t=this.cache[e])?t:null},e.prototype.set=function(e,t){this.cache[e]=t},e.prototype.remove=function(e){delete this.cache[e]},e}();function $(e){return e&&e.stores&&Array.isArray(e.stores)&&e.stores.every(function(e){return Object.values(U).includes(e)})}function K(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var J=function e(t,n){function r(e,r,i){if("undefined"!=typeof document){"number"==typeof(i=K({},n,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var o="";for(var s in i)i[s]&&(o+="; "+s,!0!==i[s]&&(o+="="+i[s].split(";")[0]));return document.cookie=e+"="+t.write(r,e)+o}}return Object.create({set:r,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var n=document.cookie?document.cookie.split("; "):[],r={},i=0;i<n.length;i++){var o=n[i].split("="),s=o.slice(1).join("=");try{var u=decodeURIComponent(o[0]);if(r[u]=t.read(s,u),e===u)break}catch(e){}}return e?r[e]:r}},remove:function(e,t){r(e,"",K({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,K({},this.attributes,t))},withConverter:function(t){return e(K({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});function V(e){var t=function(e){try{return new URL(e)}catch(e){return}}(e);if(t)for(var n=function(e){var t=e.hostname.split("."),n=t[t.length-1],r=[];if(4===t.length&&parseInt(n,10)>0||t.length<=1)return r;for(var i=t.length-2;i>=0;--i)r.push(t.slice(i).join("."));return r}(t),r=0;r<n.length;++r){var i="__tld__",o=n[r],s={domain:"."+o};try{if(J.set(i,"1",s),J.get(i))return J.remove(i,s),o}catch(e){return}}}var B=function(){function e(t){void 0===t&&(t=e.defaults),this.options=(0,o.Cl)((0,o.Cl)({},e.defaults),t)}return Object.defineProperty(e,"defaults",{get:function(){return{maxage:365,domain:V(window.location.href),path:"/",sameSite:"Lax"}}
1,enumerable:!1,configurable:!0}),e.prototype.opts=function(){return{sameSite:this.options.sameSite,expires:this.options.maxage,domain:this.options.domain,path:this.options.path,secure:this.options.secure}},e.prototype.get=function(e){var t;try{var n=J.get(e);if(null==n)return null;try{return null!=(t=JSON.parse(n))?t:null}catch(e){return null!=n?n:null}}catch(e){return null}},e.prototype.set=function(e,t){"string"==typeof t?J.set(e,t,this.opts()):null===t?J.remove(e,this.opts()):J.set(e,JSON.stringify(t),this.opts())},e.prototype.remove=function(e){return J.remove(e,this.opts())},e}(),W=function(){function e(){}return e.prototype.localStorageWarning=function(e,t){console.warn("Unable to access ".concat(e,", localStorage may be ").concat(t))},e.prototype.get=function(e){var t;try{var n=localStorage.getItem(e);if(null===n)return null;try{return null!=(t=JSON.parse(n))?t:null}catch(e){return null!=n?n:null}}catch(t){return this.localStorageWarning(e,"unavailable"),null}},e.prototype.set=function(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch(t){this.localStorageWarning(e,"full")}},e.prototype.remove=function(e){try{return localStorage.removeItem(e)}catch(t){this.localStorageWarning(e,"unavailable")}},e}();function X(e){return e.map(function(e){var t,n;switch("object"==typeof e&&void 0!==e.name?(t=e.name,n=e.settings):t=e,t){case U.Cookie:return new B(n);case U.LocalStorage:return new W;case U.Memory:return new z;default:throw Error("Unknown Store Type: ".concat(e))}})}function Q(e,t){return e.map(function(e){return t&&e===U.Cookie?{name:e,settings:t}:e})}var G={persist:!0,cookie:{key:"ajs_user_id",oldKey:"ajs_user"},localStorage:{key:"ajs_user_traits"}},Z=function(){function e(e,t){void 0===e&&(e=G);var n,r,i,s,u=this;this.options={},this.id=function(e){if(u.options.disable)return null;var t=u.identityStore.getAndSync(u.idKey);void 0!==e&&(u.identityStore.set(u.idKey,e),e!==t&&null!==t&&null!==e&&u.anonymousId(null));var n=u.identityStore.getAndSync(u.idKey);if(n)return n;var r=u.legacyUserStore.get(G.cookie.oldKey);return r?"object"==typeof r?r.id:r:null},this.anonymousId=function(e){var t,n;if(u.options.disable)return null;if(void 0===e){var r=null!=(t=u.identityStore.getAndSync(u.anonKey))?t:null==(n=u.legacySIO())?void 0:n[0];if(r)return r}return null===e?u.identityStore.set(u.anonKey,null):u.identityStore.set(u.anonKey,null!=e?e:(0,m.v4)()),u.identityStore.getAndSync(u.anonKey)},this.traits=function(e){var t;if(!u.options.disable)return null===e&&(e={}),e&&u.traitsStore.set(u.traitsKey,null!=e?e:{}),null!=(t=u.traitsStore.get(u.traitsKey))?t:{}},this.options=(0,o.Cl)((0,o.Cl)({},G),e),this.cookieOptions=t,this.idKey=null!=(r=null==(n=e.cookie)?void 0:n.key)?r:G.cookie.key,this.traitsKey=null!=(s=null==(i=e.localStorage)?void 0:i.key)?s:G.localStorage.key,this.anonKey="ajs_anonymous_id",this.identityStore=this.createStorage(this.options,t),this.legacyUserStore=this.createStorage(this.options,t,function(e){return e===U.Cookie}),this.traitsStore=this.createStorage(this.options,t,function(e){return e!==U.Cookie});var a=this.legacyUserStore.get(G.cookie.oldKey);a&&"object"==typeof a&&(a.id&&this.id(a.id),a.traits&&this.traits(a.traits)),q(this)}return e.prototype.legacySIO=function(){var e=this.legacyUserStore.get("_sio");if(!e)return null;var t=e.split("----");return[t[0],t[1]]},e.prototype.identify=function(e,t){if(!this.options.disable){t=null!=t?t:{};var n=this.id();(null===n||n===e)&&(t=(0,o.Cl)((0,o.Cl)({},this.traits()),t)),e&&this.id(e),this.traits(t)}},e.prototype.logout=function(){this.anonymousId(null),this.id(null),this.traits({})},e.prototype.reset=function(){this.logout(),this.identityStore.clear(this.idKey),this.identityStore.clear(this.anonKey),this.traitsStore.clear(this.traitsKey)},e.prototype.load=function(){return new e(this.options,this.cookieOptions)},e.prototype.save=function(){return!0},e.prototype.createStorage=function(e,t,n){var r=[U.LocalStorage,U.Cookie,U.Memory];return e.disable?new Y([]):e.persist?(void 0!==e.storage&&null!==e.storage&&$(e.storage)&&(r=e.storage.stores),e.localStorageFallbackDisabled&&(r=r.filter(function(e){return e!==U.LocalStorage})),n&&(r=r.filter(n)),new Y(X(Q(r,t)))):new Y([new z])},e.defaults=G,e}
1(),ee={persist:!0,cookie:{key:"ajs_group_id"},localStorage:{key:"ajs_group_properties"}},et=function(e){function t(t,n){void 0===t&&(t=ee);var r=e.call(this,(0,o.Cl)((0,o.Cl)({},ee),t),n)||this;return r.anonymousId=function(e){},q(r),r}return(0,o.C6)(t,e),t}(Z),en=n(60677),er=n(20569),ei=n(64378),eo=n(87442),es=function(e,t,n){n.getAndRemove(e).forEach(function(e){eh(t,e).catch(console.error)})},eu=es.bind(void 0,"on"),ea=es.bind(void 0,"setAnonymousId"),ec=function(e,t){Object.keys(t.calls).forEach(function(n){t.getAndRemove(n).forEach(function(t){setTimeout(function(){eh(e,t).catch(console.error)},0)})})},el=function(e){if(ed(e))return E(e.pop())},ed=function(e){var t=e[e.length-1];if("object"!==Object.prototype.toString.call(t).slice(8,-1).toLowerCase()||"bpc"!==t.__t)return!1;for(var n in t)if(!w.includes(n))return!1;return!0},ef=function(e,t,n,r){void 0===n&&(n=function(){}),void 0===r&&(r=console.error),this.method=e,this.resolve=n,this.reject=r,this.called=!1,this.args=t},ep=function(){function e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._callMap={},this.add.apply(this,e)}return Object.defineProperty(e.prototype,"calls",{get:function(){return this._pushSnippetWindowBuffer(),this._callMap},set:function(e){this._callMap=e},enumerable:!1,configurable:!0}),e.prototype.get=function(e){var t;return null!=(t=this.calls[e])?t:[]},e.prototype.getAndRemove=function(e){var t=this.get(e);return this.calls[e]=[],t},e.prototype.add=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];t.forEach(function(t){["track","screen","alias","group","page","identify"].includes(t.method)&&!ed(t.args)&&(t.args=(0,o.fX)((0,o.fX)([],t.args,!0),[I()],!1)),e.calls[t.method]?e.calls[t.method].push(t):e.calls[t.method]=[t]})},e.prototype.clear=function(){this._pushSnippetWindowBuffer(),this.calls={}},e.prototype.toArray=function(){var e;return(e=[]).concat.apply(e,Object.values(this.calls))},e.prototype._pushSnippetWindowBuffer=function(){if("npm"!==(0,eo.X)()){var e=(0,ei.kJ)();if(Array.isArray(e)){var t=e.splice(0,e.length).map(function(e){return new ef(e[0],e.slice(1))});this.add.apply(this,t)}}},e}();function eh(e,t){return(0,o.sH)(this,void 0,void 0,function(){var n,r;return(0,o.YH)(this,function(i){switch(i.label){case 0:var o;if(i.trys.push([0,3,,4]),t.called)return[2,void 0];if(t.called=!0,!("object"==typeof(o=n=e[t.method].apply(e,t.args))&&null!==o&&"then"in o&&"function"==typeof o.then))return[3,2];return[4,n];case 1:i.sent(),i.label=2;case 2:return t.resolve(n),[3,4];case 3:return r=i.sent(),t.reject(r),[3,4];case 4:return[2]}})})}var ev=function(){function e(e){var t=this;this.trackSubmit=this._createMethod("trackSubmit"),this.trackClick=this._createMethod("trackClick"),this.trackLink=this._createMethod("trackLink"),this.pageView=this._createMethod("pageview"),this.identify=this._createMethod("identify"),this.reset=this._createMethod("reset"),this.group=this._createMethod("group"),this.track=this._createMethod("track"),this.ready=this._createMethod("ready"),this.alias=this._createMethod("alias"),this.debug=this._createChainableMethod("debug"),this.page=this._createMethod("page"),this.once=this._createChainableMethod("once"),this.off=this._createChainableMethod("off"),this.on=this._createChainableMethod("on"),this.addSourceMiddleware=this._createMethod("addSourceMiddleware"),this.setAnonymousId=this._createMethod("setAnonymousId"),this.addDestinationMiddleware=this._createMethod("addDestinationMiddleware"),this.screen=this._createMethod("screen"),this.register=this._createMethod("register"),this.deregister=this._createMethod("deregister"),this.user=this._createMethod("user"),this.VERSION=en.r,this._preInitBuffer=new ep,this._promise=e(this._preInitBuffer),this._promise.then(function(e){var n=e[0],r=e[1];t.instance=n,t.ctx=r}).catch(function(){})}return e.prototype.then=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(e=this._promise).then.apply(e,t)},e.prototype.catch=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(e=this._promise).catch.apply(e,t)},e.prototype.finally=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(e=this._promise).finally.apply(e,t)},e.prototype._createMethod=function(e){var t=this;return function(){for(var n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return t.instance?Promise.resolve((n=t.instance)[e].apply(n,r)):new Promise(function(n,i){t._preInitBuffer.add(new ef(e,r,n,i)
1)})}},e.prototype._createChainableMethod=function(e){var t=this;return function(){for(var n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return t.instance?(n=t.instance)[e].apply(n,r):t._preInitBuffer.add(new ef(e,r)),t}},e}(),eg=n(79409),ey=n(46467),em=function(e){var t=!1;window.addEventListener("pagehide",function(){t||e(t=!0)}),document.addEventListener("visibilitychange",function(){if("hidden"==document.visibilityState){if(t)return;t=!0}else t=!1;e(t)})},eb=function(e){function t(t,n){var r=e.call(this,t)||this;return r.retryTimeout=n,r.name="RateLimitError",r}return(0,o.C6)(t,e),t}(Error),ew=function(e){return(0,o.Cl)({"Content-Type":"text/plain"},"function"==typeof e?e():e)};function e_(e){return(encodeURI(JSON.stringify(e)).split(/%..|./).length-1)/1024}var eS=n(38039);function eE(e,t,n,r){var i=this;e||setTimeout(function(){return(0,o.sH)(i,void 0,void 0,function(){var e,i;return(0,o.YH)(this,function(s){switch(s.label){case 0:return e=!0,[4,function(e,t){return(0,o.sH)(this,void 0,void 0,function(){var n,r=this;return(0,o.YH)(this,function(i){switch(i.label){case 0:if(n=[],(0,h.a)())return[2,t];return[4,(0,eS._)(function(){return t.length>0&&!(0,h.a)()},function(){return(0,o.sH)(r,void 0,void 0,function(){var r;return(0,o.YH)(this,function(i){switch(i.label){case 0:if(!(r=t.pop()))return[2];return[4,(0,M.C)(r,e)];case 1:return i.sent()instanceof v.o||n.push(r),[2]}})})})];case 1:return i.sent(),n.map(function(e){return t.pushWithBackoff(e)}),[2,t]}})})}(n,t)];case 1:return i=s.sent(),e=!1,t.todo>0&&r(e,i,n,r),[2]}})})},5e3*Math.random())}var eI=n(54399),ek=function(e){return"Segment.io"===e.name},eC="This is being deprecated and will be not be available in future releases of Analytics JS",ex=(0,er.m)(),eO=null==ex?void 0:ex.analytics,eP=function(){function e(e,t){var n;this.timeout=300,this._getSegmentPluginMetadata=function(){var e;return null==(e=t.plugins.find(ek))?void 0:e.metadata},this.writeKey=e.writeKey,this.cdnSettings=null!=(n=e.cdnSettings)?n:{integrations:{"Segment.io":{apiKey:""}}},this.cdnURL=e.cdnURL}return Object.defineProperty(e.prototype,"apiHost",{get:function(){var e,t;return null==(t=null==(e=this._getSegmentPluginMetadata)?void 0:e.call(this))?void 0:t.apiHost},enumerable:!1,configurable:!0}),e}();function eT(){console.warn(eC)}var eA=function(e){function t(t,n,r,i,s){var u,a,c,l,d,f,p=this;(p=e.call(this)||this)._debug=!1,p.initialized=!1,p.user=function(){return p._user},p.init=p.initialize.bind(p),p.log=eT,p.addIntegrationMiddleware=eT,p.listeners=eT,p.addEventListener=eT,p.removeAllListeners=eT,p.removeListener=eT,p.removeEventListener=eT,p.hasListeners=eT,p.add=eT,p.addIntegration=eT;var h=null==n?void 0:n.cookie,v=null!=(d=null==n?void 0:n.disableClientPersistence)&&d;p.queue=null!=r?r:(u="".concat(t.writeKey,":event-queue"),void 0===(a=null==n?void 0:n.retryQueue)&&(a=!1),void 0===(c=v)&&(c=!1),l=a?10:1,new D(c?new j.M(l,[]):new R.x(l,u))),p.settings=new eP(t,p.queue);var g=null==n?void 0:n.storage;return p._universalStorage=p.createStore(v,g,h),p._user=null!=i?i:new Z((0,o.Cl)({persist:!v,storage:null==n?void 0:n.storage},null==n?void 0:n.user),h).load(),p._group=null!=s?s:new et((0,o.Cl)({persist:!v,storage:null==n?void 0:n.storage},null==n?void 0:n.group),h).load(),p.eventFactory=new A(p._user),p.integrations=null!=(f=null==n?void 0:n.integrations)?f:{},p.options=null!=n?n:{},q(p),p}return(0,o.C6)(t,e),t.prototype.createStore=function(e,t,n){return new Y(e?[new z]:t&&$(t)?X(Q(t.stores,n)):X([U.LocalStorage,{name:U.Cookie,settings:n},U.Memory]))},Object.defineProperty(t.prototype,"storage",{get:function(){return this._universalStorage},enumerable:!1,configurable:!0}),t.prototype.track=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return(0,o.sH)(this,void 0,void 0,function(){var t,n,r,i,s,u,a,c=this;return(0,o.YH)(this,function(o){return t=el(e),r=(n=l.apply(void 0,e))[0],i=n[1],s=n[2],u=n[3],a=this.eventFactory.track(r,i,s,this.integrations,t),[2,this._dispatch(a,u).then(function(e){return c.emit("track",r,e.event.properties,e.event.options),e})]})})},t.prototype.page=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return(0,o.sH)(this,void 0,void 0,function(){var t,n,r,i,s,u,a,c,l=this;return(0,o.YH)(this,function(o){return t=el(e),r=(n=d.apply(void 0,e))[0],i=n[1],s=n[2],u=n[3],a=n[4],c=this.eventFactory.page(r,i,s,u,this.integrations,t),[2,this._dispatch(c,a).then(function(e){return l.emit("page",r,i,e.event.properties,e.event.options),e})]})})},t.prototype.identify=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return(0,o.sH)(this,void 0,void 0,function(){var t,n,r,i,s,u,a,c=this;return(0,o.YH)(this,function(o){return t=el(e),r=(n=f(this._user).apply(void 0,e))[0],i=n[1],s=n[2],u=n[3],this._user.identify(r,
1i),a=this.eventFactory.identify(this._user.id(),this._user.traits(),s,this.integrations,t),[2,this._dispatch(a,u).then(function(e){return c.emit("identify",e.event.userId,e.event.traits,e.event.options),e})]})})},t.prototype.group=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=el(t);if(0===t.length)return this._group;var i=f(this._group).apply(void 0,t),o=i[0],s=i[1],u=i[2],a=i[3];this._group.identify(o,s);var c=this._group.id(),l=this._group.traits(),d=this.eventFactory.group(c,l,u,this.integrations,r);return this._dispatch(d,a).then(function(t){return e.emit("group",t.event.groupId,t.event.traits,t.event.options),t})},t.prototype.alias=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return(0,o.sH)(this,void 0,void 0,function(){var t,n,r,i,s,u,a,c=this;return(0,o.YH)(this,function(o){return t=el(e),r=(n=p.apply(void 0,e))[0],i=n[1],s=n[2],u=n[3],a=this.eventFactory.alias(r,i,s,this.integrations,t),[2,this._dispatch(a,u).then(function(e){return c.emit("alias",r,i,e.event.options),e})]})})},t.prototype.screen=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return(0,o.sH)(this,void 0,void 0,function(){var t,n,r,i,s,u,a,c,l=this;return(0,o.YH)(this,function(o){return t=el(e),r=(n=d.apply(void 0,e))[0],i=n[1],s=n[2],u=n[3],a=n[4],c=this.eventFactory.screen(r,i,s,u,this.integrations,t),[2,this._dispatch(c,a).then(function(e){return l.emit("screen",r,i,e.event.properties,e.event.options),e})]})})},t.prototype.trackClick=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return(0,o.sH)(this,void 0,void 0,function(){var t;return(0,o.YH)(this,function(r){switch(r.label){case 0:return[4,n.e(248).then(n.bind(n,1318))];case 1:return[2,(t=r.sent().link).call.apply(t,(0,o.fX)([this],e,!1))]}})})},t.prototype.trackLink=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return(0,o.sH)(this,void 0,void 0,function(){var t;return(0,o.YH)(this,function(r){switch(r.label){case 0:return[4,n.e(248).then(n.bind(n,1318))];case 1:return[2,(t=r.sent().link).call.apply(t,(0,o.fX)([this],e,!1))]}})})},t.prototype.trackSubmit=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return(0,o.sH)(this,void 0,void 0,function(){var t;return(0,o.YH)(this,function(r){switch(r.label){case 0:return[4,n.e(248).then(n.bind(n,1318))];case 1:return[2,(t=r.sent().form).call.apply(t,(0,o.fX)([this],e,!1))]}})})},t.prototype.trackForm=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return(0,o.sH)(this,void 0,void 0,function(){var t;return(0,o.YH)(this,function(r){switch(r.label){case 0:return[4,n.e(248).then(n.bind(n,1318))];case 1:return[2,(t=r.sent().form).call.apply(t,(0,o.fX)([this],e,!1))]}})})},t.prototype.register=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return(0,o.sH)(this,void 0,void 0,function(){var t,n=this;return(0,o.YH)(this,function(r){switch(r.label){case 0:return t=v.o.system(),[4,Promise.all(e.map(function(e){return n.queue.register(t,e,n)}))];case 1:return r.sent(),[2,t]}})})},t.prototype.deregister=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return(0,o.sH)(this,void 0,void 0,function(){var t,n=this;return(0,o.YH)(this,function(r){switch(r.label){case 0:return t=v.o.system(),[4,Promise.all(e.map(function(e){var r=n.queue.plugins.find(function(t){return t.name===e});if(r)return n.queue.deregister(t,r,n);t.log("warn","plugin ".concat(e," not found"))}))];case 1:return r.sent(),[2,t]}})})},t.prototype.debug=function(e){return!1===e&&localStorage.getItem("debug")&&localStorage.removeItem("debug"),this._debug=e,this},t.prototype.reset=function(){this._user.reset(),this._group.reset(),this.emit("reset")},t.prototype.timeout=function(e){this.settings.timeout=e},t.prototype._dispatch=function(e,t){return(0,o.sH)(this,void 0,void 0,function(){var n;return(0,o.YH)(this,function(r){return((n=new v.o(e)).stats.increment("analytics_js.invoke",1,[e.type]),(0,h.a)()&&!this.options.retryQueue)?[2,n]:[2,function(e,t,n,r){return(0,o.sH)(this,void 0,void 0,function(){var i,s;return(0,o.YH)(this,function(o){switch(o.label){case 0:if(n.emit("dispatch_start",e),i=Date.now(),!t.isEmpty())return[3,2];return[4,t.dispatchSingle(e)];case 1:return s=o.sent(),[3,4];case 2:return[4,t.dispatch(e)];case 3:s=o.sent(),o.label=4;case 4:var u,a;if(!(null==r?void 0:r.callback))return[3,6];return[4,(0,g.w_)(s,r.callback,(u=i,Math.max((null!=(a=r.timeout)?a:300)-(Date.now()-u),0)))];case 5:s=o.sent(),o.label=6;case 6:return(null==r?void 0:r.debug)&&s.flush(),[2,s]}})})}(n,this.queue,this,{callback:t,debug:this._debug,timeout:this.settings.timeout})]})})},t.prototype.addSourceMiddleware=function(e){return(0,o.sH)(this,void 0,void 0,function(){var t=this;return(0,o.YH)(this,function(r){switch(r.label){case 0:return[4,this.queue.criticalTasks.run(function(){return(0,o.sH)(t,void 0,void 0,function(){var t,r,i;return(0,o.YH)(this,function(o){switch(o.label){case 0:return[4,Promise.resolve().then(n.bind(n,23879))];case 1:return t=o.sent().sourceMiddlewarePlugin,r={},this.queue.plugins.forEach(function(e){if("destination"===e.type)return r[e.name]=!0}),i=t(e,r),[4,this.register(i)];case 2:return o.sent(),[2]}})})})];case 1:return r.sent(),[2,this]}})})},t.prototype.addDestinationMiddleware=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];
1return this.queue.plugins.filter(H).forEach(function(n){("*"===e||n.name.toLowerCase()===e.toLowerCase())&&n.addMiddleware.apply(n,t)}),Promise.resolve(this)},t.prototype.setAnonymousId=function(e){return this._user.anonymousId(e)},t.prototype.queryString=function(e){return(0,o.sH)(this,void 0,void 0,function(){return(0,o.YH)(this,function(t){switch(t.label){case 0:if(!1===this.options.useQueryString)return[2,[]];return[4,n.e(7538).then(n.bind(n,62030))];case 1:return[2,(0,t.sent().queryString)(this,e)]}})})},t.prototype.use=function(e){return e(this),this},t.prototype.ready=function(e){return void 0===e&&(e=function(e){return e}),(0,o.sH)(this,void 0,void 0,function(){return(0,o.YH)(this,function(t){return[2,Promise.all(this.queue.plugins.map(function(e){return e.ready?e.ready():Promise.resolve()})).then(function(t){return e(t),t})]})})},t.prototype.noConflict=function(){return console.warn(eC),(0,ei.Ud)(null!=eO?eO:this),this},t.prototype.normalize=function(e){return console.warn(eC),this.eventFactory.normalize(e)},Object.defineProperty(t.prototype,"failedInitializations",{get:function(){return console.warn(eC),this.queue.failedInitializations},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"VERSION",{get:function(){return en.r},enumerable:!1,configurable:!0}),t.prototype.initialize=function(e,t){return(0,o.sH)(this,void 0,void 0,function(){return(0,o.YH)(this,function(e){return console.warn(eC),[2,Promise.resolve(this)]})})},t.prototype.pageview=function(e){return(0,o.sH)(this,void 0,void 0,function(){return(0,o.YH)(this,function(t){switch(t.label){case 0:return console.warn(eC),[4,this.page({path:e})];case 1:return t.sent(),[2,this]}})})},Object.defineProperty(t.prototype,"plugins",{get:function(){var e;return console.warn(eC),null!=(e=this._plugins)?e:{}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Integrations",{get:function(){return console.warn(eC),this.queue.plugins.filter(function(e){return"destination"===e.type}).reduce(function(e,t){var n="".concat(t.name.toLowerCase().replace(".","").split(" ").join("-"),"Integration"),r=window[n];if(!r)return e;var i=r.Integration;return i?e[t.name]=i:e[t.name]=r,e},{})},enumerable:!1,configurable:!0}),t.prototype.push=function(e){var t=e.shift();(!t||this[t])&&this[t].apply(this,e)},t}(y.v),eH=function(e){function t(){var t=e.call(this,{writeKey:""},{disableClientPersistence:!0})||this;return t.initialized=!0,t}return(0,o.C6)(t,e),t}(eA),eR=n(68746),ej=n(64071),eN=n(86162),eL=function(e){try{var t=new URLSearchParams;return Object.entries(e).forEach(function(e){var n=e[0],r=e[1];Array.isArray(r)?r.forEach(function(e){return t.append(n,e)}):t.append(n,r)}),t.toString()}catch(e){return""}},eM=new function(){var e=this;this.name="Page Enrichment",this.type="before",this.version="0.1.0",this.isLoaded=function(){return!0},this.load=function(t,n){return(0,o.sH)(e,void 0,void 0,function(){var e;return(0,o.YH)(this,function(t){switch(t.label){case 0:this.instance=n,t.label=1;case 1:return t.trys.push([1,3,,4]),e=this,[4,function(e){return(0,o.sH)(this,void 0,void 0,function(){var t;return(0,o.YH)(this,function(n){return(t=navigator.userAgentData)?e?[2,t.getHighEntropyValues(e).catch(function(){return t.toJSON()})]:[2,t.toJSON()]:[2,void 0]})})}(this.instance.options.highEntropyValuesClientHints)];case 2:return e.userAgentData=t.sent(),[3,4];case 3:return t.sent(),[3,4];case 4:return[2,Promise.resolve()]}})})},this.enrich=function(t){var n,i,s,u,a,c,l=t.event.context,d=l.page.search||"",f="object"==typeof d?eL(d):d;l.userAgent=navigator.userAgent,l.userAgentData=e.userAgentData;var p=navigator.userLanguage||navigator.language;void 0===l.locale&&void 0!==p&&(l.locale=p),null!=l.library||(l.library={name:"analytics.js",version:"".concat("web"===(0,eo.X)()?"next":"npm:next","-").concat(en.r)}),f&&!l.campaign&&((n=f).startsWith("?")&&(n=n.substring(1)),l.campaign=(n=n.replace(/\?/g,"&")).split("&").reduce(function(e,t){var n=t.split("="),r=n[0],i=n[1];if(r.includes("utm_")&&r.length>4){var o=r.slice(4);"campaign"===o&&(o="name"),e[o]=(0,eN.p)(void 0===i?"":i)}return e},{}));var h=function(){var e=J.get("_ga");if(e&&e.startsWith("amp"))return e}();h&&(l.amp={id:h}),u=(s=new Y(null!=(c=e.instance.options.disableClientPersistence)&&c?[]:[new B(function(){if(r)return r;var e=V(window.location.href);return r={expires:31536e6,secure:!1,path:"/"},e&&(r.domain=e),r}())])).get("s:context.referrer"),(a=null!=(i=function(e){var t={btid:"dataxu",urid:"millennial-media"};e.startsWith("?")&&(e=e.substring(1));for(var n=(e=e.replace(/\?/g,"&")).split("&"),r=0;r<n.length;r++){var i=n[r].split("="),o=i[0],s=i[1];if(t[o])return{id:s,type:t[o]}}}(f))?i:u)&&(l&&(l.referrer=(0,o.Cl)((0,o.Cl)({},l.referrer),a)),s.set("s:context.referrer",a));try{l.timezone=Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){}return t},this.track=this.enrich,this.identify=this.enrich,this.page=this.enrich,this.group=this.enrich,this.alias=this.enrich,this.screen=this.enrich},eD=n(86543),eq=n(23879),eU=n(59315),eF=function(){function e(e,t){this.version="1.0.0",this.alternativeNames=[],this.loadPromise=(0,ej.u)(),this.middleware=[],this.alias=this._createMethod("alias"),this.group=this._createMethod("group"),this.identify=this._createMethod("identify"),this.page=this._createMethod("page"),this.screen=this._createMethod("screen"),this.track=this._createMethod("track"),this.action=t,this.name=e,this.type=t.type,this.alternativeNames.push(t.name)}return e.prototype.addMiddleware=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];"destination"===this.type&&(e=this.middleware).push.apply(e,t)},e.prototype.transform=function(e){return(0,o.sH)(this,void 0,void 0,function(){var t;return(0,o.YH)(this,function(n){switch(n.label){case 0:return[4,(0,eq.applyDestinationMiddleware)(this.name,e.event,this.middleware)];case 1:return null===(t=n.sent())&&e.cancel(new N.d({retry:!1,reason:"dropped by destination middleware"})),[2,new v.o(t)]}})})},e.prototype._createMethod=function(e){var t=this;return function(n){return(0,o.sH)(t,void 0,void 0,function(){var t,r;return(0,o.YH)(this,function(i){switch(i.label){case 0:if(!this.action[e])return[2,n];if(t=n,"destination"!==this.type)return[3,2];return[4,this.transform(n)];case 1:t=i.sent(),i.label=2;case 2:return i.trys.push([2,5,,6]),[4,this.ready()];case 3:if(!i.sent())throw Error("Something prevented the destination from getting ready");return(0,eU.y)(n,{integrationName:this.action.name,methodName:e,type:"action"}),[4,this.action[e](t)];case 4:return i.sent(),[3,6];case 5:throw r=i.sent(),(0,eU.y)(n,{integrationName:this.action.name,methodName:e,type:"action",didError:!0}),r;case 6:return[2,n]}})})}},e.prototype.isLoaded=function(){return this.action.isLoaded()},e.prototype.ready=function(){return(0,o.sH)(this,void 0,void 0,function(){return(0,o.YH)(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.loadPromise.promise];case 1:return e.sent(),[2,!0];case 2:return e.sent(),[2,!1];case 3:return[2]}})})},e.prototype.load=function(e,t){return(0,o.sH)(this,void 0,void 0,function(){var n,r,i,s;return(0,o.YH)(this,function(o){switch(o.label){case 0:if(this.loadPromise.isSettled())return[2,this.loadPromise.promise];o.label=1;case 1:return o.trys.push([1,3,,4]),(0,eU.y)(e,{integrationName:this.action.name,methodName:"load",type:"action"}),n=this.action.load(e,t),i=(r=this.loadPromise).resolve,[4,n];case 2:return i.apply(r,[o.sent()]),[2,n];case 3:throw s=o.sent(),(0,eU.y)(e,{integrationName:this.action.name,methodName:"load",type:"action",didError:!0}),this.loadPromise.reject(s),s;case 4:return[2]}})})},e.prototype.unload=function(e,t){var n,r;return null==(r=(n=this.action).unload)?void 0:r.call(n,e,t)},e}(),eY=(0,er.m)(),ez=null!=(i=eY.__SEGMENT_INSPECTOR__)?i:eY.__SEGMENT_INSPECTOR__={},e$=function(e){var t;return null==(t=ez.attach)?void 0:t.call(ez,e)},eK=n(635),eJ=function(){var e,t,n=null!=(e=window.location.hash)?e:"",r=null!=(t=window.location.search)?t:"";return r.length?r:n.replace(/(?=#).*(?=\?)/,"")},eV=function(e){function t(){var t=this,r=(0,ej.u)(),i=r.promise,s=r.resolve;return(t=e.call(this,function(e){return i.then(function(t){return function(e,t,r){var i,s,c,l,d,f,p,g,y;return void 0===t&&(t={}),(0,o.sH)(this,void 0,void 0,function(){var m,b,w,_,S,E,I,k,C,x;return(0,o.YH)(this,function(O){switch(O.label){case 0:if(!0===t.disable)return[2,[new eH,v.o.system()]];if(t.globalAnalyticsKey&&(0,ei.rY)(t.globalAnalyticsKey),e.cdnURL&&(0,a.qQ)(e.cdnURL),t.initialPageview&&r.add(new ef("page",[])),m=eJ(),b=null!=(i=e.cdnURL)?i:(0,a.I2)(),null==(s=e.cdnSettings))return[3,1];return _=s,[3,3];case 1:var P,T;return[4,(P=e.writeKey,T=b,(0,ey.h)("".concat(T,"/v1/projects/").concat(P,"/settings")).then(function(e){return e.ok?e.json():e.text().then(function(e){throw Error(e)})}).catch(function(e){throw console.error(e.message),e}))];case 2:_=O.sent(),O.label=3;case 3:if(w=_,t.updateCDNSettings&&(w=t.updateCDNSettings(w)),"function"!=typeof t.disable)return[3,5];return[4,t.disable(w)];case 4:if(O.sent())return[2,[new eH,v.o.system()]];O.label=5;case 5:return S=null==(l=null==(c=w.integrations["Segment.io"])?void 0:c.retryQueue)||l,t=(0,o.Cl)({retryQueue:S},t),e$(E=new eA((0,o.Cl)((0,o.Cl)({},e),{cdnSettings:w,cdnURL:b}),t)),I=null!=(d=e.plugins)?d:[],k=null!=(f=e.classicIntegrations)?f:[],C=null==(p=t.integrations)?void 0:p["Segment.io"],eK.U.initRemoteMetrics((0,o.Cl)((0,o.Cl)({},w.metrics),{host:null!=(g=null==C?void 0:C.apiHost)?g:null==(y=w.metrics)?void 0:y.host,protocol:null==C?void 0:C.protocol})),[4,function(e,t,r,i,s,c,l){var d,f,p;return void 0===s&&(s=[]),(0,o.sH)(this,void 0,void 0,function(){var g,y,m,b,w,_,S,E,I,k,C,x,O,P,T=this;return(0,o.YH)(this,function(A){var H,N,L;switch(A.label){case 0:if(ea(r,l),eu(r,l),g=null==s?void 0:s.filter(function(e){return"object"==typeof e}),y=null==s?void 0:s.filter(function(e){return"function"==typeof e&&"string"==typeof e.pluginName}),"test"===u().NODE_ENV||!((null!=(L=null==(N=null==(H=t.middlewareSettings)?void 0:H.routingRules)?void 0:N.length)?L:0)>0))return[3,2];return[4,n.e(9010).then(n.bind(n,9902)).then(function(e){return e.tsubMiddleware(t.middlewareSettings.routingRules)})];case 1:return b=A.sent(),[3,3];case 2:b=void 0,A.label=3;case 3:if(m=b,("test"===u().NODE_ENV||!(Object.keys(t.integrations).length>1))&&!(c.length>0))return[3,5];return[4,n.e(5050).then(n.bind(n,16853)).then(function(n){return n.ajsDestinations(e,t,r.integrations,i,m,c)})];case 4:return _=A.sent(),[3,6];case 5:_=[],A.label=6;case 6:if(w=_,!t.legacyVideoPluginsEnabled)return[3,8];return[4,n.e(9694).then(n.bind(n,32411)).then(function(e){return e.loadLegacyVideoPlugins(r)})];case 7:A.sent(),A.label=8;case 8:if(!(null==(d=i.plan)?void 0:d.track))return[3,10];
1return[4,n.e(3104).then(n.bind(n,35031)).then(function(e){var n;return e.schemaFilter(null==(n=i.plan)?void 0:n.track,t)})];case 9:return E=A.sent(),[3,11];case 10:E=void 0,A.label=11;case 11:return S=E,I=(0,eR.J)(t,i),[4,(function(e,t,n,r,i,s){var u,c,l;return(0,o.sH)(this,void 0,void 0,function(){var d,f,p=this;return(0,o.YH)(this,function(h){switch(h.label){case 0:return d=[],f=null!=(c=null==(u=e.middlewareSettings)?void 0:u.routingRules)?c:[],[4,Promise.all((null!=(l=e.remotePlugins)?l:[]).map(function(e){return(0,o.sH)(p,void 0,void 0,function(){var u,c,l,p,h,v;return(0,o.YH)(this,function(g){switch(g.label){case 0:var y,m;if(y=t[e.creationName],m=t[e.name],!1===t.All&&!y&&!m||!1===y||!1===m||0)return[2];g.label=1;case 1:if(g.trys.push([1,6,,7]),c=null==s?void 0:s.find(function(t){return t.pluginName===e.name}))return[3,3];return[4,function(e,t){return(0,o.sH)(this,void 0,void 0,function(){var n,r,i,s,u,c;return(0,o.YH)(this,function(o){switch(o.label){case 0:if(o.trys.push([0,9,,10]),n=RegExp("https://cdn.segment.(com|build)"),r=(0,a.I2)(),!t)return[3,6];s=(i=e.url.split("/"))[i.length-2],u=e.url.replace(s,btoa(s).replace(/=/g,"")),o.label=1;case 1:return o.trys.push([1,3,,5]),[4,(0,eD.k)(u.replace(n,r))];case 2:case 4:return o.sent(),[3,5];case 3:return o.sent(),[4,(0,eD.k)(e.url.replace(n,r))];case 5:return[3,8];case 6:return[4,(0,eD.k)(e.url.replace(n,r))];case 7:o.sent(),o.label=8;case 8:if("function"==typeof window[e.libraryName])return[2,window[e.libraryName]];return[3,10];case 9:throw c=o.sent(),console.error("Failed to create PluginFactory",e),c;case 10:return[2]}})})}(e,null==r?void 0:r.obfuscate)];case 2:c=g.sent(),g.label=3;case 3:if(!(u=c))return[3,5];return l=n[e.name],[4,u((0,o.Cl)((0,o.Cl)({},e.settings),l))];case 4:!function(e){if(!Array.isArray(e))throw Error("Not a valid list of plugins");var t=["load","isLoaded","name","version","type"];e.forEach(function(e){t.forEach(function(t){var n;if(void 0===e[t])throw Error("Plugin: ".concat(null!=(n=e.name)?n:"unknown"," missing required function ").concat(t))})})}(h=Array.isArray(p=g.sent())?p:[p]),v=f.filter(function(t){return t.destinationName===e.creationName}),h.forEach(function(t){var n=new eF(e.creationName,t);v.length&&i&&n.addMiddleware(i),d.push(n)}),g.label=5;case 5:return[3,7];case 6:return console.warn("Failed to load Remote Plugin",g.sent()),[3,7];case 7:return[2]}})})}))];case 1:return h.sent(),[2,d.filter(Boolean)]}})})})(t,r.integrations,I,i,m,y).catch(function(){return[]})];case 12:if(k=A.sent(),C=(0,o.fX)((0,o.fX)([eM],w,!0),k,!0),S&&C.push(S),(null==(f=i.integrations)?void 0:f.All)===!1&&!i.integrations["Segment.io"]||i.integrations&&!1===i.integrations["Segment.io"])return[3,14];return O=(x=C).push,[4,function(e,t,n){window.addEventListener("pagehide",function(){c.push.apply(c,Array.from(l)),l.clear()});var r,i,s,u,a=null!=(i=null==t?void 0:t.apiKey)?i:"",c=e.options.disableClientPersistence?new j.M(e.queue.queue.maxAttempts,[]):new R.x(e.queue.queue.maxAttempts,"".concat(a,":dest-Segment.io")),l=new Set,d=null!=(s=null==t?void 0:t.apiHost)?s:eI.a,f=null!=(u=null==t?void 0:t.protocol)?u:"https",p="".concat(f,"://").concat(d),g=null==t?void 0:t.deliveryStrategy,y=g&&"strategy"in g&&"batching"===g.strategy?function(e,t){var n,r,i,s=[],u=!1,a=null!=(n=null==t?void 0:t.size)?n:10,c=null!=(r=null==t?void 0:t.timeout)?r:5e3,l=0;function d(n){if(0!==n.length){var r,i=null==(r=n[0])?void 0:r.writeKey,s=n.map(function(e){return e.sentAt,(0,o.Tt)(e,["sentAt"])});return(0,ey.h)("https://".concat(e,"/b"),{credentials:null==t?void 0:t.credentials,keepalive:(null==t?void 0:t.keepalive)||u,headers:ew(null==t?void 0:t.headers),method:"post",body:JSON.stringify({writeKey:i,batch:s,sentAt:new Date().toISOString()}),priority:null==t?void 0:t.priority}).then(function(e){var t;if(e.status>=500)throw Error("Bad response from server: ".concat(e.status));if(429===e.status){var n=null==(t=e.headers)?void 0:t.get("x-ratelimit-reset"),r="string"==typeof n?1e3*parseInt(n):c;throw new eb("Rate limit exceeded: ".concat(e.status),r)}})}}function f(e){var n;return void 0===e&&(e=1),(0,o.sH)(this,void 0,void 0,function(){var r;return(0,o.YH)(this,function(i){return s.length?(r=s,s=[],[2,null==(n=d(r))?void 0:n.catch(function(n){var i;v.o.system().log("error","Error sending batch",n),e<=(null!=(i=null==t?void 0:t.maxRetries)?i:10)&&("RateLimitError"===n.name&&(l=n.retryTimeout),s.push.apply(s,r),s.map(function(t){"_metadata"in t&&(t._metadata=(0,o.Cl)((0,o.Cl)({},t._metadata),{retryCount:e}))}),p(e+1))})]):[2]})})}function p(e){void 0===e&&(e=1),i||(i=setTimeout(function(){i=void 0,f(e).
1catch(console.error)},l||c),l=0)}return em(function(e){if((u=e)&&s.length){var t,n;Promise.all((t=[],n=0,s.forEach(function(e){e_(t[n])>=64&&n++,t[n]?t[n].push(e):t[n]=[e]}),t).map(d)).catch(console.error)}}),{dispatch:function(e,n){return(0,o.sH)(this,void 0,void 0,function(){return(0,o.YH)(this,function(e){return s.push(n),[2,s.length>=a||e_(s)>=450||(null==t?void 0:t.keepalive)&&e_(s)>=54||u?f():p()]})})}}}(d,g.config):(r=null==g?void 0:g.config,{dispatch:function(e,t){return(0,ey.h)(e,{credentials:null==r?void 0:r.credentials,keepalive:null==r?void 0:r.keepalive,headers:ew(null==r?void 0:r.headers),method:"post",body:JSON.stringify(t),priority:null==r?void 0:r.priority}).then(function(e){var t;if(e.status>=500)throw Error("Bad response from server: ".concat(e.status));if(429===e.status){var n=null==(t=e.headers)?void 0:t.get("x-ratelimit-reset"),r=n?1e3*parseInt(n):5e3;throw new eb("Rate limit exceeded: ".concat(e.status),r)}})}});function m(r){return(0,o.sH)(this,void 0,void 0,function(){var i,s;return(0,o.YH)(this,function(u){var a,d,f,v,g,m;return(0,h.a)()?(c.push(r),eE(!1,c,b,eE),[2,r]):(l.add(r),i=r.event.type.charAt(0),s=(0,eg.W)(r.event).json(),"track"===r.event.type&&delete s.traits,"alias"===r.event.type&&(a=s,m=e.user(),a.previousId=null!=(v=null!=(f=null!=(d=a.previousId)?d:a.from)?f:m.id())?v:m.anonymousId(),a.userId=null!=(g=a.userId)?g:a.to,delete a.from,delete a.to,s=a),c.getAttempts(r)>=c.maxAttempts)?(l.delete(r),[2,r]):[2,y.dispatch("".concat(p,"/").concat(i),function(e,t,n,r,i){var s,u=e.user();delete t.options,t.writeKey=null==n?void 0:n.apiKey,t.userId=t.userId||u.id(),t.anonymousId=t.anonymousId||u.anonymousId(),t.sentAt=new Date;var a=e.queue.failedInitializations||[];a.length>0&&(t._metadata={failedInitializations:a}),null!=i&&(i.attempts>1&&(t._metadata=(0,o.Cl)((0,o.Cl)({},t._metadata),{retryCount:i.attempts})),i.attempts++);var c=[],l=[];for(var d in r){var f=r[d];"Segment.io"===d&&c.push(d),"bundled"===f.bundlingStatus&&c.push(d),"unbundled"===f.bundlingStatus&&l.push(d)}for(var p=0,h=(null==n?void 0:n.unbundledIntegrations)||[];p<h.length;p++){var v=h[p];l.includes(v)||l.push(v)}var g=null!=(s=null==n?void 0:n.maybeBundledConfigIds)?s:{},y=[];return c.sort().forEach(function(e){var t;(null!=(t=g[e])?t:[]).forEach(function(e){y.push(e)})}),(null==n?void 0:n.addBundledMetadata)!==!1&&(t._metadata=(0,o.Cl)((0,o.Cl)({},t._metadata),{bundled:c.sort(),unbundled:l.sort(),bundledIds:y})),t}(e,s,t,n,r)).then(function(){return r}).catch(function(e){if(r.log("error","Error sending event",e),"RateLimitError"===e.name){var t=e.retryTimeout;c.pushWithBackoff(r,t)}else c.pushWithBackoff(r);return eE(!1,c,b,eE),r}).finally(function(){l.delete(r)})]})})}var b={metadata:{writeKey:a,apiHost:d,protocol:f},name:"Segment.io",type:"destination",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:m,identify:m,page:m,alias:m,group:m,screen:m};return c.todo&&eE(!1,c,b,eE),b}(r,I["Segment.io"],t.integrations)];case 13:O.apply(x,[A.sent()]),A.label=14;case 14:return[4,r.register.apply(r,(0,o.fX)((0,o.fX)([],C,!1),g,!1))];case 15:return P=A.sent(),[4,(0,o.sH)(void 0,void 0,void 0,function(){var e,t;return(0,o.YH)(this,function(n){switch(n.label){case 0:e=0,t=l.getAndRemove("register"),n.label=1;case 1:if(!(e<t.length))return[3,4];return[4,eh(r,t[e]).catch(console.error)];case 2:n.sent(),n.label=3;case 3:return e++,[3,1];case 4:return[2]}})})];case 16:if(A.sent(),!Object.entries(null!=(p=t.enabledMiddleware)?p:{}).some(function(e){return e[1]}))return[3,18];return[4,n.e(521).then(n.bind(n,39922)).then(function(e){var n=e.remoteMiddlewares;return(0,o.sH)(T,void 0,void 0,function(){return(0,o.YH)(this,function(e){switch(e.label){case 0:return[4,n(P,t,i.obfuscate)];case 1:return[2,Promise.all(e.sent().map(function(e){return r.addSourceMiddleware(e)}))]}})})})];case 17:A.sent(),A.label=18;case 18:return[4,(0,o.sH)(void 0,void 0,void 0,function(){var e,t;return(0,o.YH)(this,function(n){switch(n.label){case 0:e=0,t=l.getAndRemove("addSourceMiddleware"),n.label=1;case 1:if(!(e<t.length))return[3,4];return[4,eh(r,t[e]).catch(console.error)];case 2:n.sent(),n.label=3;case 3:return e++,[3,1];case 4:return[2]}})})];
1case 19:return A.sent(),[2,P]}})})}(e.writeKey,w,E,t,I,k,r)];case 6:return x=O.sent(),E.initialized=!0,E.emit("initialize",e,t),[4,function(e,t,n){return(0,o.sH)(this,void 0,void 0,function(){return(0,o.YH)(this,function(r){switch(r.label){case 0:var i,s;return[4,(i=e,s=t,(0,o.sH)(void 0,void 0,void 0,function(){return(0,o.YH)(this,function(e){switch(e.label){case 0:if(!s.includes("ajs_"))return[3,2];return[4,i.queryString(s).catch(console.error)];case 1:e.sent(),e.label=2;case 2:return[2]}})}))];case 1:return r.sent(),ec(e,n),[2]}})})}(E,m,r)];case 7:return O.sent(),[2,[E,x]]}})})}(t[0],t[1],e)})})||this)._resolveLoadStart=function(e,t){return s([e,t])},t}return(0,o.C6)(t,e),t.prototype.load=function(e,t){return void 0===t&&(t={}),this._resolveLoadStart(e,t),this},t.load=function(e,n){return void 0===n&&(n={}),new t().load(e,n)},t.standalone=function(e,n){return t.load({writeKey:e},n).then(function(e){return e[0]})},t}(ev)},65522:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Screen=void 0;var i=r(n(43770)),o=n(23561),s=n(29485);function u(e,t){o.Page.call(this,e,t)}t.Screen=u,i.default(u,o.Page),u.prototype.action=function(){return"screen"},u.prototype.type=u.prototype.action,u.prototype.event=function(e){return e?"Viewed "+e+" Screen":"Loaded a Screen"},u.prototype.track=function(e){var t=this.json();return t.event=this.event(e),t.timestamp=this.timestamp(),t.properties=this.properties(),new s.Track(t,this.opts)}},68746:(e,t,n)=>{"use strict";n.d(t,{J:()=>i});var r=n(71450);function i(e,t){var n,i=Object.entries(null!=(n=t.integrations)?n:{}).reduce(function(e,t){var n,i,o=t[0],s=t[1];return"object"==typeof s?(0,r.Cl)((0,r.Cl)({},e),((n={})[o]=s,n)):(0,r.Cl)((0,r.Cl)({},e),((i={})[o]={},i))},{});return Object.entries(e.integrations).reduce(function(e,t){var n,o=t[0],s=t[1];return(0,r.Cl)((0,r.Cl)({},e),((n={})[o]=(0,r.Cl)((0,r.Cl)({},s),i[o]),n))},{})}},68955:(e,t,n)=>{"use strict";n.d(t,{j:()=>f});var r=n(12115),i=n(20063),o=n(87358);function s(){return"undefined"!=typeof window}function u(){return"production"}function a(){return"development"===((s()?window.vam:u())||"production")}function c(e){return RegExp(`/${e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(?=[/?#]|$)`)}function l(e){return(0,r.useEffect)(()=>{var t;e.beforeSend&&(null==(t=window.va)||t.call(window,"beforeSend",e.beforeSend))},[e.beforeSend]),(0,r.useEffect)(()=>{!function(e={debug:!0}){var t;if(!s())return;!function(e="auto"){if("auto"===e){window.vam=u();return}window.vam=e}(e.mode),window.va||(window.va=function(...e){(window.vaq=window.vaq||[]).push(e)}),e.beforeSend&&(null==(t=window.va)||t.call(window,"beforeSend",e.beforeSend));let n=e.scriptSrc?e.scriptSrc:a()?"https://va.vercel-scripts.com/v1/script.debug.js":e.basePath?`${e.basePath}/insights/script.js`:"/_vercel/insights/script.js";if(document.head.querySelector(`script[src*="${n}"]`))return;let r=document.createElement("script");r.src=n,r.defer=!0,r.dataset.sdkn="@vercel/analytics"+(e.framework?`/${e.framework}`:""),r.dataset.sdkv="1.5.0",e.disableAutoTrack&&(r.dataset.disableAutoTrack="1"),e.endpoint?r.dataset.endpoint=e.endpoint:e.basePath&&(r.dataset.endpoint=`${e.basePath}/insights`),e.dsn&&(r.dataset.dsn=e.dsn),r.onerror=()=>{let e=a()?"Please check if any ad blockers are enabled and try again.":"Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.";console.log(`[Vercel Web Analytics] Failed to load script from ${n}. ${e}`)},a()&&!1===e.debug&&(r.dataset.debug="false"),document.head.appendChild(r)}({framework:e.framework||"react",basePath:e.basePath??function(){if(void 0!==o&&void 0!==o.env)return o.env.REACT_APP_VERCEL_OBSERVABILITY_BASEPATH}(),...void 0!==e.route&&{disableAutoTrack:!0},...e})},[]),(0,r.useEffect)(()=>{e.route&&e.path&&function({route:e,path:t}){var n;null==(n=window.va)||n.call(window,"pageview",{route:e,path:t})}({route:e.route,path:e.path})},[e.route,e.path]),null}function d(e){let{route:t,path:n}=(()=>{let e=(0,i.useParams)(),t=(0,i.useSearchParams)(),n=(0,i.usePathname)();return e?{route:function(e,t){if(!e||!t)return e;let n=e;try{let e=Object.entries(t);for(let[t,r]of e)if(!Array.isArray(r)){let e=c(r);e.test(n)&&(n=n.replace(e,`/[${t}]`))}for(let[t,r]of e)if(Array.isArray(r)){let e=c(r.join("/"));e.test(n)&&(n=n.replace(e,`/[...${t}]`))}return n}catch(t){return e}}(n,Object.keys(e).length?e:Object.fromEntries(t.entries())),path:n}:{route:null,path:n}})();return r.createElement(l,{path:n,route:t,...e,basePath:function(){if(void 0!==o&&void 0!==o.env)return o.env.NEXT_PUBLIC_VERCEL_OBSERVABILITY_BASEPATH}(),framework:"next"})}function f(e){return r.createElement(r.Suspense,{fallback:null},r.createElement(d,{...e}))}},71450:(e,t,n)=>{"use strict";n.d(t,{AQ:()=>p,C6:()=>i,Cl:()=>o,Ju:()=>c,N3:()=>f,Tt:()=>s,YH:()=>a,fX:()=>d,sH:()=>u,xN:()=>h,zs:()=>l});var r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]}
1)instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function s(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>t.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function u(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{a(r.next(e))}catch(e){o(e)}}function u(e){try{a(r.throw(e))}catch(e){o(e)}}function a(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(s,u)}a((r=r.apply(e,t||[])).next())})}function a(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=u(0),s.throw=u(1),s.return=u(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function u(u){return function(a){var c=[u,a];if(n)throw TypeError("Generator is already executing.");for(;s&&(s=0,c[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&c[0]?r.return:c[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,c[1])).done)return i;switch(r=0,i&&(c=[2&c[0],i.value]),c[0]){case 0:case 1:i=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,r=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===c[0]||2===c[0])){o=0;continue}if(3===c[0]&&(!i||c[1]>i[0]&&c[1]<i[3])){o.label=c[1];break}if(6===c[0]&&o.label<i[1]){o.label=i[1],i=c;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(c);break}i[2]&&o.ops.pop(),o.trys.pop();continue}c=t.call(e,o)}catch(e){c=[6,e],r=0}finally{n=i=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}function c(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function l(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function d(e,t,n){if(n||2==arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function f(e){return this instanceof f?(this.v=e,this):new f(e)}function p(e,t,n){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",function(e){return function(t){return Promise.resolve(t).then(e,c)}}),r[Symbol.asyncIterator]=function(){return this},r;function s(e,t){i[e]&&(r[e]=function(t){return new Promise(function(n,r){o.push([e,t,n,r])>1||u(e,t)})},t&&(r[e]=t(r[e])))}function u(e,t){try{var n;(n=i[e](t)).value instanceof f?Promise.resolve(n.value.v).then(a,c):l(o[0][2],n)}catch(e){l(o[0][3],e)}}function a(e){u("next",e)}function c(e){u("throw",e)}function l(e,t){e(t),o.shift(),o.length&&u(o[0][0],o[0][1])}}function h(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=c(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,i){var o,s,u;o=r,s=i,u=(t=e[n](t)).done,Promise.resolve(t.value).then(function(e){o({value:e,done:u})},s)})}}}Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError},72163:(e,t,n)=>{"use strict";n.d(t,{v:()=>r});var r=function(){function e(e){var t;this.callbacks={},this.warned=!1,this.maxListeners=null!=(t=null==e?void 0:e.maxListeners)?t:10}return e.prototype.warnIfPossibleMemoryLeak=function(e){!this.warned&&this.maxListeners&&this.callbacks[e].length>this.maxListeners&&(console.warn("Event Emitter: Possible memory leak detected; ".concat(String(e)," has exceeded ").concat(this.maxListeners," listeners.")),this.warned=!0)},e.prototype.on=function(e,t){return this.callbacks[e]?(this.callbacks[e].push(t),this.warnIfPossibleMemoryLeak(e)):this.callbacks[e]=[t],this},e.prototype.once=function(e,t){var n=this,r=function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];n.off(e,r),t.apply(n,i)};return this.on(e,r),this},e.prototype.off=function(e,t){var n,r=(null!=(n=this.callbacks[e])?n:[]).filter(function(e){return e!==t});return this.callbacks[e]=r,this},e.prototype.emit=function(e){for(var t,n=this,r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];
1return(null!=(t=this.callbacks[e])?t:[]).forEach(function(e){e.apply(n,r)}),this},e}()},74453:(e,t,n)=>{"use strict";function r(e){return"string"==typeof e}function i(e){return"number"==typeof e}function o(e){return"function"==typeof e}function s(e){return null!=e}function u(e){return"object"===Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}n.d(t,{Et:()=>i,Kg:()=>r,Qd:()=>u,Tn:()=>o,t2:()=>s})},79409:(e,t,n)=>{"use strict";n.d(t,{W:()=>i});var r=n(34650);function i(e,t){var n=new r.Facade(e,t);return"track"===e.type&&(n=new r.Track(e,t)),"identify"===e.type&&(n=new r.Identify(e,t)),"page"===e.type&&(n=new r.Page(e,t)),"alias"===e.type&&(n=new r.Alias(e,t)),"group"===e.type&&(n=new r.Group(e,t)),"screen"===e.type&&(n=new r.Screen(e,t)),Object.defineProperty(n,"obj",{value:e,writable:!0}),n}},86162:(e,t,n)=>{"use strict";function r(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}}n.d(t,{p:()=>r})},86543:(e,t,n)=>{"use strict";function r(e){return Array.prototype.slice.call(window.document.querySelectorAll("script")).find(function(t){return t.src===e})}function i(e,t){var n=r(e);if(void 0!==n){var i=null==n?void 0:n.getAttribute("status");if("loaded"===i)return Promise.resolve(n);if("loading"===i)return new Promise(function(e,t){n.addEventListener("load",function(){return e(n)}),n.addEventListener("error",function(e){return t(e)})})}return new Promise(function(n,r){var i,o=window.document.createElement("script");o.type="text/javascript",o.src=e,o.async=!0,o.setAttribute("status","loading");for(var s=0,u=Object.entries(null!=t?t:{});s<u.length;s++){var a=u[s],c=a[0],l=a[1];o.setAttribute(c,l)}o.onload=function(){o.onerror=o.onload=null,o.setAttribute("status","loaded"),n(o)},o.onerror=function(){o.onerror=o.onload=null,o.setAttribute("status","error"),r(Error("Failed to load ".concat(e)))};var d=window.document.querySelector("script");d?null==(i=d.parentElement)||i.insertBefore(o,d):window.document.head.appendChild(o)})}function o(e){var t=r(e);return void 0!==t&&t.remove(),Promise.resolve()}n.d(t,{d:()=>o,k:()=>i})},87442:(e,t,n)=>{"use strict";function r(){return"npm"}n.d(t,{X:()=>r})},89288:(e,t,n)=>{"use strict";n.d(t,{C:()=>o,D:()=>s});var r=n(71450),i=n(28769);function o(e,t){e.log("debug","plugin",{plugin:t.name});var n=new Date().getTime(),o=t[e.event.type];return void 0===o?Promise.resolve(e):(function(e){return(0,r.sH)(this,void 0,void 0,function(){return(0,r.YH)(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,e()];case 1:return[2,t.sent()];case 2:return[2,Promise.reject(t.sent())];case 3:return[2]}})})})(function(){return o.apply(t,[e])}).then(function(e){var r=new Date().getTime()-n;return e.stats.gauge("plugin_time",r,["plugin:".concat(t.name)]),e}).catch(function(n){if(n instanceof i.d&&"middleware_cancellation"===n.type)throw n;return n instanceof i.d?e.log("warn",n.type,{plugin:t.name,error:n}):(e.log("error","plugin Error",{plugin:t.name,error:n}),e.stats.increment("plugin_error",1,["plugin:".concat(t.name)])),n})}function s(e,t){return o(e,t).then(function(t){if(t instanceof i.j)return t;e.log("debug","Context canceled"),e.stats.increment("context_canceled"),e.cancel(t)})}},91905:(e,t,n)=>{"use strict";var r;n.d(t,{$:()=>r}),function(e){e[e.None=0]="None",e[e.Error=1]="Error",e[e.Warn=2]="Warn",e[e.Verbose=3]="Verbose",e[e.Debug=4]="Debug"}(r||(r={}))},95043:(e,t,n)=>{"use strict";var r=n(42928);e.exports=function e(t,n){var i,o,s,u;if(void 0===n&&(n=!0),t&&"object"==typeof t){return i=t,o=n,Object.keys(i).forEac
1h(function(t){i[t]=e(i[t],o)}),i}if(Array.isArray(t)){return s=t,u=n,s.forEach(function(t,n){s[n]=e(t,u)}),s}return r.is(t,n)?r.parse(t):t}},95690:(e,t,n)=>{"use strict";n.d(t,{OP:()=>c,bu:()=>u,fS:()=>o,mG:()=>r,mJ:()=>s,pL:()=>a,r:()=>i});var r="-",i="AMP",o="".concat(i,"_unsent"),s="https://api2.amplitude.com/2/httpapi",u="https://api.eu.amplitude.com/2/httpapi",a="https://api2.amplitude.com/batch",c="https://api.eu.amplitude.com/batch"},99202:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={Salesforce:!0};t.default=function(e){return!n[e]}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.