1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,38352,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=function({html:e,height:t=null,width:n=null,children:o,dataNtpc:s=""}){return(0,i.useEffect)(()=>{s&&performance.mark("mark_feature_usage",{detail:{feature:`next-third-parties-${s}`}})},[s]),(0,r.jsxs)(r.Fragment,{children:[o,e?(0,r.jsx)("div",{style:{height:null!=t?`${t}px`:"auto",width:null!=n?`${n}px`:"auto"},"data-ntpc":s,dangerouslySetInnerHTML:{__html:e}}):null]})};let r=e.r(40636),i=e.r(98622)},38026,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={cancelIdleCallback:function(){return s},requestIdleCallback:function(){return o}};for(var i in r)Object.defineProperty(n,i,{enumerable:!0,get:r[i]});let o="u">typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(e){let t=Date.now();return self.setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)},s="u">typeof self&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(e){return clearTimeout(e)};("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},42471,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={ESCAPE_REGEX:function(){return s},htmlEscapeAttributeString:function(){return l},htmlEscapeJsonString:function(){return c}};for(var i in r)Object.defineProperty(n,i,{enumerable:!0,get:r[i]});let o={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},s=/[&><\u2028\u2029]/g,u={"&":"&",'"':""","'":"'","<":"<",">":">"},a=/[&"'<>]/g;function c(e){return e.replace(s,e=>o[e])}function l(e){return e.replace(a,e=>u[e])}},37042,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={default:function(){return w},handleClientScriptLoad:function(){return y},initScriptLoader:function(){return m}};for(var i in r)Object.defineProperty(n,i,{enumerable:!0,get:r[i]});let o=e.r(81258),s=e.r(44066),u=e.r(40636),a=o._(e.r(97158)),c=s._(e.r(98622)),l=e.r(31946),f=e.r(97463),d=e.r(38026),p=e.r(42471),h=new Map,v=new Set,g=e=>{let{src:t,id:n,onLoad:r=()=>{},onReady:i=null,dangerouslySetInnerHTML:o,children:s="",strategy:u="afterInteractive",onError:c,stylesheets:l}=e,d=n||t;if(d&&v.has(d))return;if(h.has(t)){v.add(d),h.get(t).then(r,c);return}let p=()=>{i&&i(),v.add(d)},g=document.createElement("script"),y=new Promise((e,t)=>{g.addEventListener("load",function(t){e(),r&&r.call(this,t),p()}),g.addEventListener("error",function(e){t(e)})}).catch(function(e){c&&c(e)});o?(g.innerHTML=o.__html||"",p()):s?(g.textContent="string"==typeof s?s:Array.isArray(s)?s.join(""):"",p()):t&&(g.src=t,h.set(t,y)),(0,f.setAttributesFromProps)(g,e),"worker"===u&&g.setAttribute("type","text/partytown"),g.setAttribute("data-nscript",u),l&&(e=>{if(a.default.preinit)return e.forEach(e=>{a.default.preinit(e,{as:"style"})});if("u">typeof window){let t=document.head;e.forEach(e=>{let n=document.createElement("link");n.type="text/css",n.rel="stylesheet",n.href=e,t.appendChild(n)})}})(l),document.body.appendChild(g)};function y(e){let{strategy:t="afterInteractive"}=e;"lazyOnload"===t?window.addEventListener("load",()=>{(0,d.requestIdleCallback)(()=>g(e))}):g(e)}function m(e){e.forEach(y),[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')].forEach(e=>{let t=e.id||e.getAttribute("src");v.add(t)})}function b(e){let{id:t,src:n="",onLoad:r=()=>{},onReady:i=null,strategy:o="afterInteractive",onError:s,stylesheets:f,...h}=e,{updateScripts:y,scripts:m,getIsSsr:b,appDir:w,nonce:_}=(0,c.useContext)(l.HeadManagerContext);_=h.nonce||_;let S=(0,c.useRef)(!1);(0,c.useEffect)(()=>{let e=t||n;S.current||(i&&e&&v.has(e)&&i(),S.current=!0)},[i,t,n]);let E=(0,c.useRef)(!1);if((0,c.useEffect)(()=>
1{if(!E.current){if("afterInteractive"===o)g(e);else"lazyOnload"===o&&("complete"===document.readyState?(0,d.requestIdleCallback)(()=>g(e)):window.addEventListener("load",()=>{(0,d.requestIdleCallback)(()=>g(e))}));E.current=!0}},[e,o]),("beforeInteractive"===o||"worker"===o)&&(y?(m[o]=(m[o]||[]).concat([{id:t,src:n,onLoad:r,onReady:i,onError:s,...h,nonce:_}]),y(m)):b&&b()?v.add(t||n):b&&!b()&&g({...e,nonce:_})),w){if(f&&f.forEach(e=>{a.default.preinit(e,{as:"style"})}),"beforeInteractive"===o)if(!n)return h.dangerouslySetInnerHTML&&(h.children=h.dangerouslySetInnerHTML.__html,delete h.dangerouslySetInnerHTML),(0,u.jsx)("script",{nonce:_,dangerouslySetInnerHTML:{__html:`(self.__next_s=self.__next_s||[]).push(${(0,p.htmlEscapeJsonString)(JSON.stringify([0,{...h,id:t}]))})`}});else return a.default.preload(n,h.integrity?{as:"script",integrity:h.integrity,nonce:_,crossOrigin:h.crossOrigin}:{as:"script",nonce:_,crossOrigin:h.crossOrigin}),(0,u.jsx)("script",{nonce:_,dangerouslySetInnerHTML:{__html:`(self.__next_s=self.__next_s||[]).push(${(0,p.htmlEscapeJsonString)(JSON.stringify([n,{...h,id:t}]))})`}});"afterInteractive"===o&&n&&a.default.preload(n,h.integrity?{as:"script",integrity:h.integrity,nonce:_,crossOrigin:h.crossOrigin}:{as:"script",nonce:_,crossOrigin:h.crossOrigin})}return null}Object.defineProperty(b,"__nextScript",{value:!0});let w=b;("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},74174,(e,t,n)=>{t.exports=e.r(37042)},59706,(e,t,n)=>{"use strict";var r=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.sendGTMEvent=void 0,n.GoogleTagManager=function(e){let{gtmId:t,gtmScriptUrl:n,dataLayerName:r="dataLayer",auth:a,preview:c,dataLayer:l,nonce:f}=e;u=r;let d=new URL(n||"https://www.googletagmanager.com/gtm.js");return t&&d.searchParams.set("id",t),"dataLayer"!==r&&d.searchParams.set("l",r),a&&d.searchParams.set("gtm_auth",a),c&&(d.searchParams.set("gtm_preview",c),d.searchParams.set("gtm_cookies_win","x")),(0,o.useEffect)(()=>{performance.mark("mark_feature_usage",{detail:{feature:"next-third-parties-gtm"}})},[]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.default,{id:"_next-gtm-init",dangerouslySetInnerHTML:{__html:` 2 (function(w,l){ 3 w[l]=w[l]||[]; 4 w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'}); 5 ${l?`w[l].push(${JSON.stringify(l)})`:""} 6 })(window,'${r}');`},nonce:f}),(0,i.jsx)(s.default,{id:"_next-gtm","data-ntpc":"GTM",src:d.href,nonce:f})]})};let i=e.r(40636),o=e.r(98622),s=r(e.r(74174)),u="dataLayer";n.sendGTMEvent=(e,t)=>{let n=t||u;window[n]=window[n]||[],window[n].push(e)}},4993,(e,t,n)=>{"use strict";let r;var i=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.GoogleAnalytics=function(e){let{gaId:t,debugMode:n,dataLayerName:i="dataLayer",nonce:a}=e;return void 0===r&&(r=i),(0,s.useEffect)(()=>{performance.mark("mark_feature_usage",{detail:{feature:"next-third-parties-ga"}})},[]),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(u.default,{id:"_next-ga-init",dangerouslySetInnerHTML:{__html:` 7 window['${i}'] = window['${i}'] || []; 8 function gtag(){window['${i}'].push(arguments);} 9 gtag('js', new Date()); 10 11 gtag('config', '${t}' ${n?",{ 'debug_mode': true }":""});`},nonce:a}),(0,o.jsx)(u.default,{id:"_next-ga",src:`https://www.googletagmanager.com/gtag/js?id=${t}`,nonce:a})]})},n.sendGAEvent=function(){void 0===r?console.warn("@next/third-parties: GA has not been initialized"):window[r]?window[r].push(arguments):console.warn(`@next/third-parties: GA dataLayer ${r} does not exist`)};let o=e.r(40636),s=e.r(98622),u=i(e.r(74174))},46246,e=>{"use strict";var t=e.i(97158);e.s(["default",0,function(){return(0,t.prefetchDNS)("//careers.toyokumo.co.jp"),(0,t.prefetchDNS)("//anpi.toyokumo.app"),(0,t.prefetchDNS)("//kintoneapp.com"),(0,t.prefetchDNS)("//toyokumo.app"),null}])},60431,e=>{"use strict";e.i(21858);var t,n,r,i,o,s,u,a,c,l,f,d,p,h,v,g,y=e.i(94753),m=e.i(14073),b=function(e,t){return(b=Object.setPrototypeOf||({__proto__:[]}
11)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 w(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}b(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var _=function(){return(_=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 E(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 I(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 T(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 k(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 P(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"==typeof SuppressedError&&SuppressedError,(t=a||(a={}))[t.None=0]="None",t[t.Error=1]="Error",t[t.Warn=2]="Warn",t[t.Verbose=3]="Verbose",t[t.Debug=4]="Debug";var O=function(e){return function(){var t=_({},e.config);return{logger:t.loggerProvider,logLevel:t.logLevel}}},x=function(e,t){var n,r;t=(t=t.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"");try{for(var i=T(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},A=function(e,t){return function(){var n,r,i={};try{for(var o=T(t),s=o.next();!s.done;s=o.next()){var u=s.value;i[u]=x(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}},C=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(),c=u.logger,l=u.logLevel;if(l&&l<a.Debug||!l||!c)return e.apply(i,o);var f={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&&f.states&&(f.states.before=r());var d=e.apply(i,o);return d&&d.promise?d.promise.then(function(){r&&f.states&&(f.states.after=r()),f.time&&(f.time.end=new Date().toISOString()),c.debug(JSON.stringify(f,null,2))}):(r&&f.states&&(f.states.after=r()),f.time&&(f.time.end=new Date().toISOString()),c.debug(JSON.stringify(f,null,2))),d}};(n=c||(c={})).Unknown="unknown",n.Skipped="skipped",n.Success="success",n.RateLimit="rate_limit",n.PayloadTooLarge="payload_too_large",n.Invalid="invalid",n.Failed="failed",n.Timeout="Timeout",n.SystemError="SystemError";var L=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=c.Unknown),{event:e,code:t,message:n}},N=function(e){return e?(e^16*Math.random()>>e/4).toString(16):(String(1e7)+String(-1e3)+String(-4e3)+String(-8e3)+String(-1e11)).replace(/[018]/g,N
11)},R=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 E(this,void 0,void 0,function(){return I(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=N(),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 E(this,void 0,void 0,function(){var r,i;return I(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 E(this,void 0,void 0,function(){var t,n,r,i,o,s,u,a,c,l,f,d,p,h;return I(this,function(v){switch(v.label){case 0:if(!e)return[2];t=k(e,1)[0],n=k(e,2)[1],r=this.plugins.filter(function(e){return"before"===e.type}),v.label=1;case 1:v.trys.push([1,6,7,8]),o=(i=T(r)).next(),v.label=2;case 2:if(o.done)return[3,5];if(!(s=o.value).execute)return[3,4];return[4,s.execute(_({},t))];case 3:if(null===(u=v.sent()))return n({event:t,code:0,message:""}),[2];t=u,v.label=4;case 4:return o=i.next(),[3,2];case 5:return[3,8];case 6:return f={error:v.sent()},[3,8];case 7:try{o&&!o.done&&(d=i.return)&&d.call(i)}finally{if(f)throw f.error}return[7];case 8:a=this.plugins.filter(function(e){return"enrichment"===e.type||void 0===e.type}),v.label=9;case 9:v.trys.push([9,14,15,16]),l=(c=T(a)).next(),v.label=10;case 10:if(l.done)return[3,13];if(!(s=l.value).execute)return[3,12];return[4,s.execute(_({},t))];case 11:if(null===(u=v.sent()))return n({event:t,code:0,message:""}),[2];t=u,v.label=12;case 12:return l=c.next(),[3,10];case 13:return[3,16];case 14:return p={error:v.sent()},[3,16];case 15:try{l&&!l.done&&(h=c.return)&&h.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=_({},t);return e.execute(n).catch(function(e){return L(n,0,String(e))})})).then(function(e){var r=k(e,1)[0]||L(t,100,"Event not tracked, no destination plugins on the instance");n(r)}),[2]}})})},e.prototype.flush=function(){return E(this,void 0,void 0,function(){var e,t=this;return I(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}();(r=l||(l={})).SET="$set",r.SET_ONCE="$setOnce",r.ADD="$add",r.APPEND="$append",r.PREPEND="$prepend",r.REMOVE="$remove",r.PREINSERT="$preInsert",r.POSTINSERT="$postInsert",r.UNSET="$unset",r.CLEAR_ALL="$clearAll",(i=f||(f={})).REVENUE_PRODUCT_ID="$productId",i.REVENUE_QUANTITY="$quantity",i.REVENUE_PRICE="$price",i.REVENUE_TYPE="$revenueType",i.REVENUE="$revenue",(o=d||(d={})).IDENTIFY="$identify",o.GROUP_IDENTIFY="$groupidentify",o.REVENUE="revenue_amount";var j="".concat("AMP","_unsent"),U="https://api2.amplitude.com/2/httpapi",D=function(e){if(Object.keys(e).length>1e3)return!1;for(var t in e){var n=e[t];if(!M(t,n))return!1}return!0},M=function(e,t){var n,r;if("string"!=typeof e)return!1;if(Array.isArray(t)){var i=!0;try{for(var o=T(t),s=o.next();!s.done;s=o.next()){var u=s.value;if(Array.isArray(u))return!1;if("object"==typeof u)i=i&&D(u);else if(!["number","string"].includes(typeof u))return!1;if(!i)return!1}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}else if(null==t)return!1;else if("object"==typeof t)return D(t);else if(!["number","string","boolean"].includes(typeof t))return!1;return!0},q=function(){function e(){this._propertySet=new Set,this._properties={}}return e.prototype.getUserProperties=function(){return _({},this._properties)},e.prototype.set=function(e,t){return this._safeSet(l.SET,e,t),this},e.prototype.setOnce=function(e,t){return this._safeSet(l.SET_ONCE,e,t),this},e.prototype.append=function(e,t){return this._safeSet(l.APPEND,e,t),this},e.prototype.prepend=function(e,t){return this._safeSet(l.PREPEND,e,t),this},e.prototype.postInsert=function(e,t){return this._safeSet(l.POSTINSERT,e,t),this},e.prototype.preInsert=function(e,t){return this._safeSet(l.PREINSERT,e,t),this},e.prototype.remove=function(e,t){return this._safeSet(l.REMOVE,e,t),this},e.prototype.add=function(e,t){return this._safeSet(l.ADD,e,t),this},e.prototype.unset=function(e){return this._safeSet(l.UNSET,e,"-"),this},e.prototype.clearAll=function(){return this._properties={},this._properties[l.CLEAR_ALL]="-",this}
11,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[l.CLEAR_ALL]||this._propertySet.has(t))&&(e===l.ADD?"number"==typeof n:e===l.UNSET||e===l.REMOVE||M(t,n))},e}(),F=function(e,t){return _(_({},t),{event_type:d.IDENTIFY,user_properties:e.getUserProperties()})},V=function(e,t,n,r){var i;return _(_({},r),{event_type:d.GROUP_IDENTIFY,group_properties:n.getUserProperties(),groups:((i={})[e]=t,i)})},K=function(e,t,n){var r,i=new q;return i.set(e,t),_(_({},n),{event_type:d.IDENTIFY,user_properties:i.getUserProperties(),groups:((r={})[e]=t,r)})},$=function(e){return{promise:e||Promise.resolve()}},z=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 R(this),this.name=e}return e.prototype._init=function(e){return E(this,void 0,void 0,function(){return I(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 E(this,void 0,void 0,function(){var t,n,r,i,o,s;return I(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=T(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=_(_(_({},"string"==typeof e?{event_type:e}:e),n),t&&{event_properties:t});return $(this.dispatch(r))},e.prototype.identify=function(e,t){var n=F(e,t);return $(this.dispatch(n))},e.prototype.groupIdentify=function(e,t,n,r){var i=V(e,t,n,r);return $(this.dispatch(i))},e.prototype.setGroup=function(e,t,n){var r=K(e,t,n);return $(this.dispatch(r))},e.prototype.revenue=function(e,t){var n=_(_({},t),{event_type:d.REVENUE,event_properties:e.getEventProperties()});return $(this.dispatch(n))},e.prototype.add=function(e){return this.isReady?this._addPlugin(e):(this.q.push(this._addPlugin.bind(this,e)),$())},e.prototype._addPlugin=function(e){return $(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)),$())},e.prototype._removePlugin=function(e){return $(this.timeline.deregister(e,this.config))},e.prototype.dispatchWithCallback=function(e,t){if(!this.isReady)return t(L(e,0,"Client not initialized"));this.process(e).then(t)},e.prototype.dispatch=function(e){return E(this,void 0,void 0,function(){var t=this;return I(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.process=function(e){return E(this,void 0,void 0,function(){var t,n;return I(this,function(r){switch(r.label){case 0:if(r.trys.push([0,2,,3]),this.config.optOut)return[2,L(e,0,"Event skipped due to optOut config")];return[4,this.timeline.push(e)];case 1:return 200===(t=r.sent()).code?this.config.loggerProvider.log(t.message):100===t.code?this.config.loggerProvider.warn(t.message):this.config.loggerProvider.error(t.message),[2,t];case 2:return n=String(r.sent()),this.config.loggerProvider.error(n),[2,t=L(e,0,n)];case 3:return[2]}})})},e.prototype.setOptOut=function(e){this.isReady?this._setOptOut(e):this.q.push(this._setOptOut.bind(this,!!e))},e.prototype._setOptOut=function(e){this.config.optOut=!!e},e.prototype.flush=function(){return $(this.timeline.flush())},e}(),H=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},[])},J="Amplitude Logger ",B=function(){function e(){this.logLevel=a.None}return e.prototype.disable=function(){this.logLevel=a.None},e.prototype.enable=function(e){void 0===e&&(e=a.Warn),this.logLevel=e},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<a.Verbose||console.log("".concat(J,"[Log]: ").concat(e.join(" ")))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<a.Warn||console.warn("".concat(J,"[Warn]: ").concat(e.join(" ")))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<a.Error||console.error("".concat(J,"[Error]: ").concat(e.join(" ")))},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<a.Debug||console.log("".concat(J,"[Debug]: ").concat(e.join(" ")))},e}(),Y=function(){return{flushMaxRetries:12,flushQueueSize:200,flushIntervalMillis:1e4,instanceName:"$default_instance",logLevel:a.Warn,loggerProvider:new B,offline:!1,optOut:!1,serverUrl:U,serverZone:"US",useBatch:!1}},W=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=G(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}
11,enumerable:!1,configurable:!0}),e}(),G=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?"https://api.eu.amplitude.com/batch":"https://api.eu.amplitude.com/2/httpapi":r?"https://api2.amplitude.com/batch":U)}},Q=function(){function e(){this.sdk={metrics:{histogram:{}}}}return e.prototype.recordHistogram=function(e,t){this.sdk.metrics.histogram[e]=t},e}();function Z(e){var t="";try{"body"in e&&(t=JSON.stringify(e.body,null,2))}catch(e){}return t}var X=function(){function e(){this.name="amplitude",this.type="destination",this.retryTimeout=1e3,this.throttleTimeout=3e4,this.storageKey="",this.scheduled=null,this.queue=[]}return e.prototype.setup=function(e){var t;return E(this,void 0,void 0,function(){var n,r=this;return I(this,function(i){switch(i.label){case 0:return this.config=e,this.storageKey="".concat(j,"_").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=N()),new Promise(function(n){t.addToQueue({event:e,attempts:0,callback:function(e){return n(e)},timeout:0})})},e.prototype.getTryableList=function(e){var t=this;return e.filter(function(e){return e.attempts<t.config.flushMaxRetries?(e.attempts+=1,!0):(t.fulfillRequest([e],500,"Event rejected due to exceeded retry count"),!1)})},e.prototype.scheduleTryable=function(e,t){var n=this;void 0===t&&(t=!1),e.forEach(function(e){(t&&(n.queue=n.queue.concat(e)),0===e.timeout)?n.schedule(n.config.flushIntervalMillis):setTimeout(function(){e.timeout=0,n.schedule(0)},e.timeout)})},e.prototype.addToQueue=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this.getTryableList(e);this.scheduleTryable(n,!0),this.saveEvents()},e.prototype.schedule=function(e){var t=this;this.scheduled||this.config.offline||(this.scheduled=setTimeout(function(){t.flush(!0).then(function(){t.queue.length>0&&t.schedule(e)})},e))},e.prototype.flush=function(e){return void 0===e&&(e=!1),E(this,void 0,void 0,function(){var t,n,r=this;return I(this,function(i){switch(i.label){case 0:if(this.config.offline)return this.config.loggerProvider.debug("Skipping flush while offline."),[2];return t=[],n=[],this.queue.forEach(function(e){return 0===e.timeout?t.push(e):n.push(e)}),this.scheduled&&(clearTimeout(this.scheduled),this.scheduled=null),[4,H(t,this.config.flushQueueSize).reduce(function(t,n){return E(r,void 0,void 0,function(){return I(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.scheduleTryable(n),[2]}})})},e.prototype.send=function(e,t){return void 0===t&&(t=!0),E(this,void 0,void 0,function(){var n,r,i,o;return I(this,function(s){switch(s.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,S(t,["extra"])}),options:{min_id_length:this.config.minIdLength},client_upload_time:new Date().toISOString(),request_metadata:this.config.requestMetadata},this.config.requestMetadata=new Q,s.label=1;case 1:return s.trys.push([1,3,,4]),r=G(this.config.serverUrl,this.config.serverZone,this.config.useBatch).serverUrl,[4,this.config.transportProvider.send(r,n)];case 2:if(null===(i=s.sent()))return this.fulfillRequest(e,0,"Unexpected error occurred"),[2];if(!t)return"body"in i?this.fulfillRequest(e,i.statusCode,"".concat(i.status,": ").concat(Z(i))):this.fulfillRequest(e,i.statusCode,i.status),[2];return this.handleResponse(i,e),[3,4];case 3:var u;return o=(u=s.sent())instanceof Error?u.message:String(u),this.config.loggerProvider.error(o),this.handleResponse({status:c.Failed,statusCode:0},e),[3,4];case 4:return[2]}})})},e.prototype.handleResponse=function(e,t){var n=e.status;switch(n){case c.Success:this.handleSuccessResponse(e,t);break;case c.Invalid:this.handleInvalidResponse(e,t);break;case c.PayloadTooLarge:this.handlePayloadTooLargeResponse(e,t);break;case c.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(P(P(P(P([],k(Object.values(e.body.eventsWithInvalidFields)),!1),
11k(Object.values(e.body.eventsWithMissingFields)),!1),k(Object.values(e.body.eventsWithInvalidIdLengths)),!1),k(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(Z(e));var o=this.getTryableList(i);this.scheduleTryable(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(Z(e)),this.config.flushQueueSize/=2;var n=this.getTryableList(t);this.scheduleTryable(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(Z(e));var l=this.getTryableList(c);this.scheduleTryable(l)},e.prototype.handleOtherResponse=function(e){var t=this,n=e.map(function(e){return e.timeout=e.attempts*t.retryTimeout,e}),r=this.getTryableList(n);this.scheduleTryable(r)},e.prototype.fulfillRequest=function(e,t,n){this.removeEvents(e),e.forEach(function(e){return e.callback(L(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}(),ee=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.setRevenue=function(e){return this.revenue=e,this},e.prototype.setEventProperties=function(e){return D(e)&&(this.properties=e),this},e.prototype.getEventProperties=function(){var e=this.properties?_({},this.properties):{};return e[f.REVENUE_PRODUCT_ID]=this.productId,e[f.REVENUE_QUANTITY]=this.quantity,e[f.REVENUE_PRICE]=this.price,e[f.REVENUE_TYPE]=this.revenueType,e[f.REVENUE]=this.revenue,e},e}(),et=function(){function e(){}return e.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:en(),platform:"Web",os:void 0,deviceModel:void 0}},e}(),en=function(){return"u">typeof navigator&&(navigator.languages&&navigator.languages[0]||navigator.language)||""},er=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}(),ei=function(){return(ei=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 eo(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 es(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 eu=function(e,t){var n,r,i=typeof e;if(i!==typeof t)return!1;try{for(var o=eo(["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;
11if(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(!eu(e[c],t[c]))return!1}else{if(!eu(Object.keys(e).sort(),Object.keys(t).sort()))return!1;var l=!0;return Object.keys(e).forEach(function(n){eu(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 ea=function(){function e(){this.identity={userProperties:{}},this.listeners=new Set}return e.prototype.editIdentity=function(){var e=this,t=ei({},this.identity.userProperties),n=ei(ei({},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=eo(Object.entries(e)),l=c.next();!l.done;l=c.next()){var f=es(l.value,2),d=f[0],p=f[1];switch(d){case"$set":try{for(var h=(i=void 0,eo(Object.entries(p))),v=h.next();!v.done;v=h.next()){var g=es(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,eo(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 ei({},this.identity)},e.prototype.setIdentity=function(e){var t=ei({},this.identity);this.identity=ei({},e),eu(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}(),ec="u">typeof globalThis?globalThis:e.g,el=function(){function e(){this.identityStore=new ea,this.eventBridge=new er,this.applicationContextProvider=new et}return e.getInstance=function(t){return ec.analyticsConnectorInstances||(ec.analyticsConnectorInstances={}),ec.analyticsConnectorInstances[t]||(ec.analyticsConnectorInstances[t]=new e),ec.analyticsConnectorInstances[t]},e}(),ef=function(e){return void 0===e&&(e="$default_instance"),el.getInstance(e)},ed=function(e,t){ef(t).identityStore.editIdentity().setUserId(e).commit()},ep=function(e,t){ef(t).identityStore.editIdentity().setDeviceId(e).commit()},eh=function(e,t){return"boolean"==typeof e?e:(null==e?void 0:e[t])!==!1},ev=function(e){return eh(e,"attribution")},eg=function(e){return eh(e,"pageViews")},ey=function(e){return eh(e,"sessions")},em=function(e){return"boolean"==typeof e?e:"object"==typeof e&&(!0===e.elementInteractions||"object"==typeof e.elementInteractions)},eb=function(e){if(em(e.autocapture)&&"object"==typeof e.autocapture&&"object"==typeof e.autocapture.elementInteractions)return e.autocapture.elementInteractions},ew=function(e){var t,n=function(){return!1},r=void 0,i=e.pageCounter;return eg(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}},e_=function(){function e(){this.name="identity",this.type="before",this.identityStore=ef().identityStore}return e.prototype.execute=function(e){return E(this,void 0,void 0,function(){var t;return I(this,function(n){return(t=e.user_properties)&&this.identityStore.editIdentity().updateUserProperties(t).commit(),[2,e]})})},e.prototype.setup=function(e){return E(this,void 0,void 0,function(){return I(this,function(t){return e.instanceName&&(this.identityStore=ef(e.instanceName).identityStore),[2]})})},e}(),eS=function(e,t){return void 0===t&&(t=Date.now()),Date.now()-t>e},eE="dclid",eI="fbclid",eT="gbraid",ek="gclid",eP="ko_click_id",eO="li_fat_id",ex="msclkid",eA="rtd_cid",eC="ttclid",eL="twclid",eN="wbraid",eR={utm_campaign:void 0,utm_c
11ontent: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},ej=function(e){var t=e.split(".");return t.length<=2?e:t.slice(t.length-2,t.length).join(".")},eU=function(e,t,n,r,i){void 0===i&&(i=!0),e.referrer;var o=e.referring_domain,s=S(e,["referrer","referring_domain"]),u=t||{},a=(u.referrer,u.referring_domain),c=S(u,["referrer","referring_domain"]);if(eD(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),f=ej(o||"")!==ej(a||""),d=!t||l||f;return d?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."),d},eD=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})},eM=function(e){var t=e;return t?(t.startsWith(".")&&(t=t.substring(1)),[new RegExp("".concat(t.replace(".","\\."),"$"))]):[]},eq=function(){var t="ampIntegrationContext";return"u">typeof globalThis&&void 0!==globalThis[t]?globalThis[t]:"u">typeof globalThis?globalThis:"u">typeof window?window:"u">typeof self?self:e.g},eF=function(){var e,t=eq();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=eV(n[0]),i=eV(n[1]);return i&&(e[r]=i),e},{}):{}},eV=function(e){void 0===e&&(e="");try{return decodeURIComponent(e)}catch(e){return""}},eK=function(){function e(){}return e.prototype.parse=function(){return E(this,void 0,void 0,function(){return I(this,function(e){return[2,_(_(_(_({},eR),this.getUtmParam()),this.getReferrer()),this.getClickIds())]})})},e.prototype.getUtmParam=function(){var e=eF();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=eF();return(e={})[eE]=t[eE],e[eI]=t[eI],e[eT]=t[eT],e[ek]=t[ek],e[eP]=t[eP],e[eO]=t[eO],e[ex]=t[ex],e[eA]=t[eA],e[eC]=t[eC],e[eL]=t[eL],e[eN]=t[eN],e},e}(),e$=function(){function e(e,t){var n,r,i;this.shouldTrackNewCampaign=!1,this.options=_({initialEmptyValue:"EMPTY",resetSessionOnNewCampaign:!1,excludeReferrers:eM(null==(n=t.cookieOptions)?void 0:n.domain)},e),this.storage=t.cookieStorage,this.storageKey=(r=t.apiKey,void 0===i&&(i=10),["AMP","MKTG",r.substring(0,i)].filter(Boolean).join("_")),this.currentCampaign=eR,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 E(this,void 0,void 0,function(){var e,t;return I(this,function(n){switch(n.label){case 0:return[4,this.fetchCampaign()];case 1:if(t=k.apply(void 0,[n.sent(),2]),this.currentCampaign=t[0],this.previousCampaign=t[1],e=!this.lastEventTime||eS(this.sessionTimeout,this.lastEventTime),!eU(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 E(this,void 0,void 0,function(){return I(this,function(e){switch(e.label){case 0:return[4,Promise.all([new eK().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,F(Object.entries(_(_({},eR),t)).reduce(function(e,t){var r,i=k(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)));return e&&(r.event_id=e),r},e.prototype.shouldSetSessionIdOnNewCampaign=function(){return this.shouldTrackNewCampaign&&!!this.options.resetSessionOnNewCampaign},e}(),ez=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},eH=function(e){return e&&void 0!==e._q},eJ=function(){if("u"<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:""},eB=function(){function e(){this.name="@amplitude/plugin-context-browser",this.type="before",this.library="".concat("amplitude-ts","/").concat("2.11.11"),"u">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 E(this,void 0,void 0,function(){var r,i,o;return I(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,_(_(_(_(_(_(_(_({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:eJ()}),this.config.trackingOptions.ipAddress&&{ip:"$remote"}),{insert_id:N(),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}(),eY=function(){function e(){this.memoryStorage=new Map}return e.prototype.isEnabled=function(){return E(this,void 0,void 0,function(){return I(this,function(e){return[2,!0]})})},e.prototype.get=function(e){return E(this,void 0,void 0,function(){return I(this,function(t){return[2,this.memoryStorage.get(e)]})})},e.prototype.getRaw=function(e){return E(this,void 0,void 0,function(){var t;return I(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 E(this,void 0,void 0,function(){return I(this,function(n){return this.memoryStorage.set(e,t),[2]})})},e.prototype.remove=function(e){return E(this,void 0,void 0,function(){return I(this,function(t){return this.memoryStorage.delete(e),[2]})})},e.prototype.reset=function(){return E(this,void 0,void 0,function(){return I(this,function(e){return this.memoryStorage.clear(),[2]})})},e}(),eW=function(){function e(e){this.options=_({},e)}return e.prototype.isEnabled=function(){return E(this,void 0,void 0,function(){var t,n;return I(this,function(r){switch(r.label){case 0:if(!eq())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 E(this,void 0,void 0,function(){var n,r;return I(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=eG(n))?t:eQ(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 E(this,void 0,void 0,function(){var r,i;return I(this,function(o){return(i=(null!=(n=null==(t=null==(r=eq())?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 E(this,void 0,void 0,function(){var r,i,o,s,u,a,c;return I(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=eq())&&(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 E(this,void 0,void 0,function(){return I(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 E(this,void 0,void 0,function(){return I(this,function(e){return[2]})})},e}(),eG=function(e){try{return decodeURIComponent(atob(e))}catch(e){return}},eQ=function(e){try{return decodeURIComponent(atob(decodeURIComponent(e)))}catch(e){return}},eZ=function(e,t,n){return void 0===t&&(t=""),void 0===n&&(n=10),["AMP",t,e.substring(0,n)].filter(
11Boolean).join("_")},eX=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,r,i,o,s,u,a,l,f,d,p,h,v,g,y,m,b,w,_,S,E,I=e.code||0,T=this.buildStatus(I);switch(T){case c.Success:return{status:T,statusCode:I,body:{eventsIngested:null!=(t=e.events_ingested)?t:0,payloadSizeBytes:null!=(n=e.payload_size_bytes)?n:0,serverUploadTime:null!=(r=e.server_upload_time)?r:0}};case c.Invalid:return{status:T,statusCode:I,body:{error:null!=(i=e.error)?i:"",missingField:null!=(o=e.missing_field)?o:"",eventsWithInvalidFields:null!=(s=e.events_with_invalid_fields)?s:{},eventsWithMissingFields:null!=(u=e.events_with_missing_fields)?u:{},eventsWithInvalidIdLengths:null!=(a=e.events_with_invalid_id_lengths)?a:{},epsThreshold:null!=(l=e.eps_threshold)?l:0,exceededDailyQuotaDevices:null!=(f=e.exceeded_daily_quota_devices)?f:{},silencedDevices:null!=(d=e.silenced_devices)?d:[],silencedEvents:null!=(p=e.silenced_events)?p:[],throttledDevices:null!=(h=e.throttled_devices)?h:{},throttledEvents:null!=(v=e.throttled_events)?v:[]}};case c.PayloadTooLarge:return{status:T,statusCode:I,body:{error:null!=(g=e.error)?g:""}};case c.RateLimit:return{status:T,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 c.Timeout:default:return{status:T,statusCode:I}}},e.prototype.buildStatus=function(e){return e>=200&&e<300?c.Success:429===e?c.RateLimit:413===e?c.PayloadTooLarge:408===e?c.Timeout:e>=400&&e<500?c.Invalid:e>=500?c.Failed:c.Unknown},e}(),e0=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return w(t,e),t.prototype.send=function(e,t){return E(this,void 0,void 0,function(){var n,r;return I(this,function(i){switch(i.label){case 0:if("u"<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}(eX),e1=function(){function e(e){this.storage=e}return e.prototype.isEnabled=function(){return E(this,void 0,void 0,function(){var t,n,r;return I(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 E(this,void 0,void 0,function(){var t;return I(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 E(this,void 0,void 0,function(){return I(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 E(this,void 0,void 0,function(){return I(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 E(this,void 0,void 0,function(){return I(this,function(n){try{null==(t=this.storage)||t.removeItem(e)}catch(e){}return[2]})})},e.prototype.reset=function(){var e;return E(this,void 0,void 0,function(){return I(this,function(t){try{null==(e=this.storage)||e.clear()}catch(e){}return[2]})})},e}(),e2=function(e){function t(t){var n,r=this;return(r=e.call(this,null==(n=eq())?void 0:n.localStorage)||this).loggerProvider=null==t?void 0:t.loggerProvider,r}return w(t,e),t.prototype.set=function(t,n){var r;return E(this,void 0,void 0,function(){var i;return I(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}(e1),e4=function(e){function t(){var t;return e.call(this,null==(t=eq())?void 0:t.sessionStorage)||this}return w(t,e),t}(e1),e3=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={done:4},t}return w(t,e),t.prototype.send=function(e,t){return E(this,void 0,void 0,function(){var n=this;return I(this,function(r){return[2,new Promise(function(r,i){"u"<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}(eX),e6=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return w(t,e),t.prototype.send=function(e,t){return E(this,void 0,void 0,function(){var n=this;return I(this,function(r){return[2,new Promise(function(r,i){var o=eq();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}(eX),e5=function(e){var t=parseInt(e,32);if(!isNaN(t))return t},e7=function(e){if(atob&&escape&&e)try{return decodeURIComponent(escape(atob(e)))}catch(e){return}},e9="[Amplitude]",e8="".concat(e9," Form Started"),te="".concat(e9," Form Submitted"),tt="".concat(e9," File Downloaded"),tn="session_start",tr="session_end",ti="".concat(e9," File Extension"),to="".concat(e9," File Name"),ts="".concat(e9," Link ID"),tu="".concat(e9," Link Text"),ta="".concat(e9," Link URL"),tc="".concat(e9," Form ID"),tl="".concat(e9," Form Name"),tf="".concat(e9," Form Destination"),td="cookie",tp=function(e){function t(t,n,r,i,o,s,u,c,l,f,d,p,h,v,g,y,m,b,w,_,S,E,I,T,k,P,O,x,A,C,L,N,R,j){void 0===r&&(r=new eY),void 0===i&&(i={domain:"",expiration:365,sameSite:"Lax",secure:!1,upgrade:!0}),void 0===c&&(c=1e3),void 0===l&&(l=5),void 0===f&&(f=30),void 0===d&&(d=td),void 0===y&&(y=new B),void 0===m&&(m=a.Warn),void 0===w&&(w=!1),void 0===_&&(_=!1),void 0===I&&(I=""),void 0===T&&(T="US"),void 0===P&&(P=18e5),void 0===O&&(O=new e2({loggerProvider:y})),void 0===x&&(x={ipAddress:!0,language:!0,platform:!0}),void 0===A&&(A="fetch"),void 0===C&&(C=!1),void 0===L&&(L=!1);var U=e.call(this,{apiKey:t,storageProvider:O,transportProvider:tv(A)})||this;return U.apiKey=t,U.appVersion=n,U.cookieOptions=i,U.defaultTracking=o,U.autocapture=s,U.flushIntervalMillis=c,U.flushMaxRetries=l,U.flushQueueSize=f,U.identityStorage=d,U.ingestionMetadata=p,U.instanceName=h,U.loggerProvider=y,U.logLevel=m,U.minIdLength=b,U.offline=w,U.partnerId=S,U.plan=E,U.serverUrl=I,U.serverZone=T,U.sessionTimeout=P,U.storageProvider=O,U.trackingOptions=x,U.transport=A,U.useBatch=C,U.fetchRemoteConfig=L,U._optOut=!1,U._cookieStorage=r,U.deviceId=u,U.lastEventId=v,
11U.lastEventTime=g,U.optOut=_,U.sessionId=k,U.pageCounter=R,U.userId=N,U.debugLogsEnabled=j,U.loggerProvider.enable(j?a.Debug:U.logLevel),U}return w(t,e),Object.defineProperty(t.prototype,"cookieStorage",{get:function(){return this._cookieStorage},set:function(e){this._cookieStorage!==e&&(this._cookieStorage=e,this.updateStorage())},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(eZ(this.apiKey),e)},t}(W),th=function(e,t){switch(void 0===e&&(e=td),void 0===t&&(t={}),e){case"localStorage":return new e2;case"sessionStorage":return new e4;case"none":return new eY;default:return new eW(_(_({},t),{expirationDays:t.expiration}))}},tv=function(e){return"xhr"===e?new e3:"beacon"===e?new e6:new e0},tg=function(e){var t={};for(var n in e){var r=e[n];r&&(t[n]=r)}return t},ty=function(e){void 0===e&&(e={});var t,n,r,i=eq(),o=void 0,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==o||o.error("Malformed URI sequence: ",e)}return t},f=function(){return E(void 0,void 0,void 0,function(){var e,t,n;return I(this,function(r){switch(r.label){case 0:return e=l("u">typeof location&&location.href||""),n={event_type:c},t=[{}],[4,tm()];case 1:return[2,(n.event_properties=_.apply(void 0,[_.apply(void 0,t.concat([r.sent()])),{"[Amplitude] Page Domain":"u">typeof location&&location.hostname||"","[Amplitude] Page Location":e,"[Amplitude] Page Path":"u">typeof location&&l(location.pathname)||"","[Amplitude] Page Title":"u">typeof document&&document.title||"","[Amplitude] Page URL":e.split("?")[0]}]),n)]}})})},d=function(){return void 0===s||"function"==typeof s&&s()},p="u">typeof location?location.href:null,h=function(){return E(void 0,void 0,void 0,function(){var e,n,r,i;return I(this,function(s){switch(s.label){case 0:if(n=tw(u,e=location.href,p||"")&&d(),p=e,!n)return[3,4];if(null==o||o.log("Tracking page view event"),null!=t)return[3,1];return[3,3];case 1:return i=(r=t).track,[4,f()];case 2:i.apply(r,[s.sent()]),s.label=3;case 3:s.label=4;case 4:return[2]}})})},v=function(){h()};return{name:"@amplitude/plugin-page-view-tracking-browser",type:"enrichment",setup:function(e,s){return E(void 0,void 0,void 0,function(){var u,a;return I(this,function(c){switch(c.label){case 0:if(t=s,r=e,(o=e.loggerProvider).log("Installing @amplitude/plugin-page-view-tracking-browser"),i&&(i.addEventListener("popstate",v),n=i.history.pushState,i.history.pushState=new Proxy(i.history.pushState,{apply:function(e,t,n){var r=k(n,3),i=r[0],o=r[1],s=r[2];e.apply(t,[i,o,s]),h()}})),!d())return[3,2];return o.log("Tracking page view event"),a=(u=t).track,[4,f()];case 1:a.apply(u,[c.sent()]),c.label=2;case 2:return[2]}})})},execute:function(e){return E(void 0,void 0,void 0,function(){var t;return I(this,function(n){switch(n.label){case 0:if(!("attribution"===s&&tb(e)))return[3,2];
11return null==o||o.log("Enriching campaign event to page view event with campaign parameters"),[4,f()];case 1:e.event_type=(t=n.sent()).event_type,e.event_properties=_(_({},e.event_properties),t.event_properties),n.label=2;case 2:return r&&e.event_type===c&&(r.pageCounter=r.pageCounter?r.pageCounter+1:1,e.event_properties=_(_({},e.event_properties),{"[Amplitude] Page Counter":r.pageCounter})),[2,e]}})})},teardown:function(){return E(void 0,void 0,void 0,function(){return I(this,function(e){return i&&(i.removeEventListener("popstate",v),n&&(i.history.pushState=n)),[2]})})}}},tm=function(){return E(void 0,void 0,void 0,function(){var e;return I(this,function(t){switch(t.label){case 0:return e=tg,[4,new eK().parse()];case 1:return[2,e.apply(void 0,[t.sent()])]}})})},tb=function(e){if("$identify"===e.event_type&&e.user_properties){var t=e.user_properties,n=t[l.SET]||{},r=t[l.UNSET]||{},i=P(P([],k(Object.keys(n)),!1),k(Object.keys(r)),!1);return Object.keys(eR).every(function(e){return i.includes(e)})}return!1},tw=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},t_=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 E(void 0,void 0,void 0,function(){var i;return I(this,function(o){return null==(i=eq())||i.addEventListener("load",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("u">typeof document){var i=function(e){var t=!1;n(e,"change",function(){var n;t||r.track(e8,((n={})[tc]=tS(e.id),n[tl]=tS(e.name),n[tf]=e.action,n)),t=!0}),n(e,"submit",function(){var n,i;t||r.track(e8,((n={})[tc]=tS(e.id),n[tl]=tS(e.name),n[tf]=e.action,n)),r.track(te,((i={})[tc]=tS(e.id),i[tl]=tS(e.name),i[tf]=e.action,i)),t=!1})};Array.from(document.getElementsByTagName("form")).forEach(i),"u">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})}}),[2]})})},execute:function(e){return E(void 0,void 0,void 0,function(){return I(this,function(t){return[2,e]})})},teardown:function(){return E(void 0,void 0,void 0,function(){return I(this,function(t){return null==e||e.disconnect(),r(),[2]})})}}},tS=function(e){if("string"==typeof e)return e},tE=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 E(void 0,void 0,void 0,function(){var i;return I(this,function(o){return null==(i=eq())||i.addEventListener("load",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("u">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(tt,((n={})[ti]=s,n[to]=t.pathname,n[ts]=e.id,n[tu]=e.text,n[ta]=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)(\?.+)?$/;Array.from(document.getElementsByTagName("a")).forEach(i),"u">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})}}),[2]})})},execute:function(e){return E(void 0,void 0,void 0,function(){return I(this,function(t){return[2,e]})})},teardown:function(){return E(void 0,void 0,void 0,function(){return I(this,function(t){return null==e||e.disconnect(),r(),[2]})})}}},tI=!1,tT=function(e){tI||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."),tI=!0)},tk=function(){var e=eq(),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 E(void 0,void 0,void 0,function(){return I(this,function(r){return"u"<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 E(void 0,void 0,void 0,function(){return I(this,function(e){return r(),[2]})})}}};(s=p||(p={})).US="US",s.EU="EU";
11var tP="Remote config fetch rejected due to timeout after 5 seconds",tO="Unexpected error occurred",tx=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 E(r,void 0,void 0,function(){var r,i,o;return I(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 E(r,void 0,void 0,function(){var t,n,r;return I(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 E(r,void 0,void 0,function(){var n,r,i,o,s,u,a,l,f,d,p;return I(this,function(h){switch(h.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:tP})];t!==this.lastFetchedSessionId&&(this.lastFetchedSessionId=t,this.attempts=0);h.label=1;case 1:h.trys.push([1,3,,4]),n=new URLSearchParams({api_key:this.localConfig.apiKey});try{for(i=(r=T(this.configKeys)).next();!i.done;i=r.next())o=i.value,n.append("config_keys",o)}catch(e){f={error:e}}finally{try{i&&!i.done&&(d=r.return)&&d.call(r)}finally{if(f)throw f.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,_(_({},s),{signal:e}))];case 2:if(null===(a=h.sent()))return[2,this.completeRequest({err:tO})];switch(new eX().buildStatus(a.status)){case c.Success:return this.attempts=0,[2,this.parseAndStoreConfig(a)];case c.Failed:return[2,this.retryFetch(e,t)];default:return[2,this.completeRequest({err:"Network error occurred, remote config fetch failed"})]}case 3:if(l=h.sent(),e.aborted)return[2,this.completeRequest({err:tP})];return[2,this.completeRequest({err:null!=(p=l.message)?p:tO})];case 4:return[2]}})})},this.retryFetch=function(e,t){return E(r,void 0,void 0,function(){var n=this;return I(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 E(r,void 0,void 0,function(){var t;return I(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===p.STAGING?"https://sr-client-cfg.stag2.amplitude.com/config":this.localConfig.serverZone===p.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}(),tA=function(e){var t=e.localConfig,n=e.configKeys;return E(void 0,void 0,void 0,function(){return I(this,function(e){return[2,new tx({localConfig:t,configKeys:n})]})})},tC=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 E(this,void 0,void 0,function(){var e;return I(this,function(t){switch(t.label){case 0:return e=this,[4,tA({localConfig:this.config,configKeys:["analyticsSDK"]})];case 1:return e.remoteConfigFetch=t.sent(),[2]}})})},e.prototype.generateJoinedConfig=function(){var e,t,n;return E(this,void 0,void 0,function(){var r,i,o;return I(this,function(s){switch(s.label){case 0:if(s.trys.push([0,3,,4]),!(i=this.remoteConfigFetch))return[3,2];return[4,this.remoteConfigFetch.getRemoteConfig("analyticsSDK","browserSDK",this.config.sessionId)];case 1:i=s.sent(),s.label=2;case 2:return r=i,this.config.loggerProvider.debug("Remote configuration:",JSON.stringify(r,null,2)),r&&"autocapture"in r&&("boolean"==typeof r.autocapture&&(this.config.autocapture=r.autocapture),"object"==typeof r.autocapture&&(void 0===this.config.autocapture&&(this.config.autocapture=r.autocapture),"boolean"==typeof this.config.autocapture&&(this.config.autocapture=_({attribution:this.config.autocapture,fileDownloads:this.config.autocapture,formInteractions:this.config.autocapture,pageViews:this.config.autocapture,sessions:this.config.autocapture,elementInteractions:this.config.autocapture},r.autocapture)),"object"==typeof this.config.autocapture&&(this.config.autocapture=_(_({},this.config.autocapture),r.autocapture))),this.config.defaultTracking=this.config.autocapture),this.config.loggerProvider.debug("Joined configuration: ",JSON.stringify(this.config,null,2)),null!=(n=this.config).requestMetadata||(n.requestMetadata=new Q),(null==(e=this.remoteConfigFetch)?void 0:e.metrics.fetchTimeAPISuccess)&&this.config.requestMetadata.recordHistogram("remote_config_fetch_time_API_success",this.remoteConfigFetch.metrics.fetchTimeAPISuccess),(null==(t=this.remoteConfigFetch)?void 0:t.metrics.fetchTimeAPIFail)&&this.config.requestMetadata.recordHistogram("remote_config_fetch_time_API_fail",this.remoteConfigFetch.metrics.fetchTimeAPIFail),[3,4];case 3:return o=s.sent(),this.config.loggerProvider.error("Failed to fetch remote configuration because of error: ",o),[3,4];case 4:return[2,this.config]}})})},e}(),tL=["a","button","input","select","textarea","label","video","audio",'[contenteditable="true" i]',"[data-amp-default-track]",".amp-default-track"],tN=["div","span","h1","h2","h3","h4","h5","h6"],tR="[Amplitude] Element Clicked",tj="[Amplitude] Element Tag",tU="[Amplitude] Element Text",tD="[Amplitude] Element Selector",tM="[Amplitude] Page URL",tq="https://app.amplitude.com",tF={US:tq,EU:"https://app.eu.amplitude.com",STAGING:"https://apps.stag2.amplitude.com"},tV="amp-visual-tagging-selector-highlight",tK=function(e,t){return(tK=Object.
11setPrototypeOf||({__proto__:[]})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 t$(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}tK(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function tz(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 tH(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 tJ(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 tB(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 tY(e){return this instanceof tY?(this.v=e,this):new tY(e)}"function"==typeof SuppressedError&&SuppressedError;var tW=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function tG(e){return"function"==typeof e}function tQ(e){return tG(null==e?void 0:e.then)}function tZ(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 tX=tZ(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 t0(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var t1=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=tH(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;if(tG(a))try{a()}catch(e){i=e instanceof tX?e.errors:[e]}var c=this._finalizers;if(c){this._finalizers=null;try{for(var l=tH(c),f=l.next();!f.done;f=l.next()){var d=f.value;try{t4(d)}catch(e){i=null!=i?i:[],e instanceof tX?i=tB(tB([],tJ(i)),tJ(e.errors)):i.push(e)}}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}}if(i)throw new tX(i)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)t4(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)&&t0(t,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&t0(n,e),e instanceof t&&e._removeParent(this)},(e=new t).closed=!0,t.EMPTY=e,t}();function t2(e){return e instanceof t1||e&&"closed"in e&&tG(e.remove)&&tG(e.add)&&tG(e.unsubscribe)}function t4(e){tG(e)?e():e.unsubscribe()}t1.EMPTY;var t3=void 0,t6={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=t6.delegate;return(null==i?void 0:i.setTimeout)?i.setTimeout.apply(i,tB([e,t],tJ(n))):setTimeout.apply(void 0,tB([e,t],tJ(n)))},clearTimeout:function(e){var t=t6.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function t5(e){t6.setTimeout(function(){!1;throw e})}function t7(){}var t9=t8("C",void 0,void 0);function t8(e,t,n){return{kind:e,value:t,error:n}}var ne=null,nt=function(e){function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,t2(t)&&t.add(n)):n.destination=na,n}return t$(t,e),t.create=function(e,t,n){return new no(e,t,n)},t.prototype.next=function(e){this.isStopped?nu(t8("N",e,void 0),this):this._next(e)},t.prototype.error=function(e){this.isStopped?nu(t8("E",void 0,e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?nu(t9,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}(t1),nn=Function.prototype.bind;function nr(e,t){return nn.call(e,t)}var ni=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){ns(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){ns(e)}else ns(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){ns(e)}},e}(),no=function(e){function t(t,n,r){var i,o,s=e.call(this)||this;return tG(t)||!t?i={next:null!=t?t:void 0,error:null!=n?n:void 0,complete:null!=r?r:void 0}:i=t,s.destination=new ni(i),s}return t$(t,e),t}(nt);function ns(e){1;t5(e)}function nu(e,t){}var na={closed:!0,next:t7,error:function(e){throw e},complete:t7},nc="function"==typeof Symbol&&Symbol.observable||"@@observable";function nl(e){return e}var nf=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 nt||e&&tG(e.next)&&tG(e.error)&&tG(e.complete)&&t2(e)}(e)?new no(e,t,n):e;return!function(e){var t,n,r,i;1;e()}(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=nd(t))(function(t,r){var i=new no({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[nc]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return(0===e.length?nl: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=nd(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}();
11function nd(e){var t;return null!=(t=null!=e?e:t3)?t:Promise}function np(e){return Symbol.asyncIterator&&tG(null==e?void 0:e[Symbol.asyncIterator])}function nh(e){return TypeError("You provided "+(null!==e&&"object"==typeof e?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}var nv="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";function ng(e){return tG(null==e?void 0:e[nv])}function ny(e){return function(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 tY?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])}}(this,arguments,function(){var t,n,r;return tz(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,tY(t.read())];case 3:if(r=(n=i.sent()).value,!n.done)return[3,5];return[4,tY(void 0)];case 4:return[2,i.sent()];case 5:return[4,tY(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 nm(e){return tG(null==e?void 0:e.getReader)}function nb(e){if(e instanceof nf)return e;if(null!=e){var t,n,r,i;if(tG(e[nc])){return t=e,new nf(function(e){var n=t[nc]();if(tG(n.subscribe))return n.subscribe(e);throw TypeError("Provided object does not correctly implement Symbol.observable")})}if(tW(e)){return n=e,new nf(function(e){for(var t=0;t<n.length&&!e.closed;t++)e.next(n[t]);e.complete()})}if(tQ(e)){return r=e,new nf(function(e){r.then(function(t){e.closed||(e.next(t),e.complete())},function(t){return e.error(t)}).then(null,t5)})}if(np(e))return nw(e);if(ng(e)){return i=e,new nf(function(e){var t,n;try{for(var r=tH(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(nm(e))return nw(ny(e))}throw nh(e)}function nw(e){return new nf(function(t){(function(e,t){var n,r,i,o,s,u,a,c;return s=this,u=void 0,a=void 0,c=function(){var s;return tz(this,function(u){switch(u.label){case 0:u.trys.push([0,5,6,11]),n=function(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=tH(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)})}}}(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]}})},new(a||(a=Promise))(function(e,t){function n(e){try{i(c.next(e))}catch(e){t(e)}}function r(e){try{i(c.throw(e))}catch(e){t(e)}}function i(t){var i;t.done?e(t.value):((i=t.value)instanceof a?i:new a(function(e){e(i)})).then(n,r)}i((c=c.apply(s,u||[])).next())})})(e,t).catch(function(e){return t.error(e)})})}function n_(e){return function(t){if(tG(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 nS(e,t,n,r,i){return new nE(e,t,n,r,i)}var nE=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 t$(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}(nt);function nI(e,t){return n_(function(n,r){var i=0;n.subscribe(nS(r,function(n){r.next(e.call(t,n,i++))}))})}function nT(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 nk(e,t,n){return(void 0===n&&(n=1/0),tG(t))?nk(function(n,r){return nI(function(e,i){return t(n,e,r,i)})(nb(e(n,r)))},n):("number"==typeof t&&(n=t),n_(function(t,r){var i,o,s,u,a,c,l,f;return i=n,o=[],s=0,u=0,a=!1,c=function(){!a||o.length||s||r.complete()},l=function(e){return s<i?f(e):o.push(e)},f=function(t){s++;var n=!1;nb(e(t,u++)).subscribe(nS(r,function(e){r.next(e)},function(){n=!0},void 0,function(){if(n)try{for(s--;o.length&&s<i;)!function(){var e=o.shift();f(e)}();c()}catch(e){r.error(e)}}))},t.subscribe(nS(r,l,function(){a=!0,c()})),function(){}}))}var nP=Array.isArray,nO=["addListener","removeListener"],nx=["addEventListener","removeEventListener"],nA=["on","off"];function nC(e,t,n,r){if(tG(n)&&(r=n,n=void 0),r){return nC(e,t,n).pipe((i=r,nI(function(e){return nP(e)?i.apply(void 0,tB([],tJ(e))):i(e)})))}var i,o,s,u,a=tJ(tG((o=e).addEventListener)&&tG(o.removeEventListener)?nx.map(function(r){return function(i){return e[r](t,i,n)}}):tG((s=e).addListener)&&tG(s.removeListener)?nO.map(nL(e,t)):tG((u=e).on)&&tG(u.off)?nA.map(nL(e,t)):[],2),c=a[0],l=a[1];if(!c&&tW(e))return nk(function(e){return nC(e,t,n)})(nb(e));if(!c)throw TypeError("Invalid event target");return new nf(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 nL(e,t){return function(n){return function(r){return e[n](t,r)}}}function nN(e,t,n){for(var r=null,i=[],o=e,s=0;o&&"break"!==function(){var e,u,a,c,l=nV((e=o.getAttribute("id"))&&h.idName(e)?{name:"#"+CSS.escape(e),penalty:0}:null)||nV.apply(void 0,P([],k(Array.from(o.attributes).filter(function(e){return h.attr(e.name,e.value)}).map(function(e){return{name:"[".concat(CSS.escape(e.name),'="').concat(CSS.escape(e.value),'"]'),penalty:.5}})),!1))||nV.apply(void 0,P([],k(Array.from(o.classList).filter(h.className).map(function(e){return{name:"."+CSS.escape(e),penalty:1}})),!1))||nV((u=o.tagName.toLowerCase(),h.tagName(u)?{name:u,penalty:2}:null))||[nM()],f=function(e){var t=e.parentNode;if(!t)return null;var n=t.firstChild;if(!n)return null;for(var r=0;n&&(n.nodeType===Node.ELEMENT_NODE&&r++,n!==e);)n=n.nextSibling;return r}(o);if("all"==t)f&&(l=l.concat(l.filter(nF).map(function(e){return nq(e,f)})));else if("two"==t)l=l.slice(0,1),f&&(l=l.concat(l.filter(nF).map(function(e){return nq(e,f)})));else if("one"==t){var d=k(l=l.slice(0,1),1)[0];f&&nF(d)&&(l=[nq(d,f)])}else"none"==t&&(l=[nM()],f&&(l=[nq(l[0],f)]));try{for(var p=(a=void 0,T(l)),v=p.next();!v.done;v=p.next()){var d=v.value;d.level=s}}catch(e){a={error:e}}finally{try{v&&!v.done&&(c=p.return)&&c.call(p)}finally{if(a)throw a.error}}if(i.push(l),i.length>=h.seedMinLength&&(r=nR(i,n)))return"break";o=o.parentElement,s++}(););return(r||(r=nR(i,n)),!r&&n)?n():r}function nR(e,t){if(e.reduce(function(e,t){return e*t.length},1)>h.threshold)return t?t():null;var n,r,i=n$(function e(t,n){var r,i,o,s,u;return void 0===n&&(n=[]),I(this,function(a){switch(a.label){case 0:if(!(t.length>0))return[3,9];a.label=1;case 1:a.trys.push([1,6,7,8]),i=(r=T(t[0])).next(),a.label=2;case 2:if(i.done)return[3,5];return o=i.value,[5,T(e(t.slice(1,t.length),n.concat(o)))];case 3:a.sent(),a.label=4;case 4:return i=r.next(),[3,2];case 5:return[3,8];case 6:return s={error:a.sent()},[3,8];case 7:try{i&&!i.done&&(u=r.return)&&u.call(r)}finally{if(s)throw s.error}
11return[7];case 8:return[3,11];case 9:return[4,n];case 10:a.sent(),a.label=11;case 11:return[2]}})}(e));try{for(var o=T(i),s=o.next();!s.done;s=o.next()){var u=s.value;if(nD(u))return u}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return null}function nj(e){for(var t=e[0],n=t.name,r=1;r<e.length;r++){var i=e[r].level||0;n=t.level===i-1?"".concat(e[r].name," > ").concat(n):"".concat(e[r].name," ").concat(n),t=e[r]}return n}function nU(e){return e.map(function(e){return e.penalty}).reduce(function(e,t){return e+t},0)}function nD(e){var t=nj(e);switch(v.querySelectorAll(t).length){case 0:throw Error("Can't select any node with this selector: ".concat(t));case 1:return!0;default:return!1}}function nM(){return{name:"*",penalty:3}}function nq(e,t){return{name:e.name+":nth-child(".concat(t,")"),penalty:e.penalty+1}}function nF(e){return"html"!==e.name&&!e.name.startsWith("#")}function nV(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e.filter(nK);return n.length>0?n:null}function nK(e){return null!=e}function n$(e){return P([],k(e),!1).sort(function(e,t){return nU(e)-nU(t)})}var nz=["input","select","textarea"],nH=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(!nG(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 f=null==(s=null==window?void 0:window.getComputedStyle)?void 0:s.call(window,r);if(f&&"pointer"===f.getPropertyValue("cursor")&&"click"===n)return!0;return"click"===n}}},nJ=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})|((?: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},nB=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!nz.includes(i)&&!o},nY=function(e){var t="";return nB(e)&&e.childNodes&&e.childNodes.length&&e.childNodes.forEach(function(e){var n="";e&&3===e.nodeType?e.textContent&&(n=e.textContent):n=nY(e),t+=n.split(/(\s+)/).filter(nJ).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}),t},nW=function(e,t){var n,r,i="";try{return i=function(e,t){if(e.nodeType!==Node.ELEMENT_NODE)throw Error("Can't generate CSS selector for non-element node type.");if("html"===e.tagName.toLowerCase())return"html";var n,r,i={root:document.body,idName:function(e){return!0},className:function(e){return!0},tagName:function(e){return!0},attr:function(e,t){return!1},seedMinLength:1,optimizedMinLength:2,threshold:1e3,maxNumberOfTries:1e4};n=(h=_(_({},i),t)).root,r=i,v=n.nodeType===Node.DOCUMENT_NODE?n:n===r.root?n.ownerDocument:n;var o=nN(e,"all",function(){return nN(e,"two",function(){return nN(e,"one",function(){return nN(e,"none")})})});if(o){var s=n$(function e(t,n,r){var i,o,s;return void 0===r&&(r={counter:0,visited:new Map}),I(this,function(u){switch(u.label){case 0:if(!(t.length>2&&t.length>h.optimizedMinLength))return[3,5];i=1,u.label=1;case 1:var a,c;if(!(i<t.length-1))return[3,5];if(r.counter>h.maxNumberOfTries||(r.counter+=1,(o=P([],k(t),!1)).splice(i,1),s=nj(o),r.visited.has(s)))return[2];if(!(nD(o)&&(a=o,c=n,v.querySelector(nj(a))===c)))return[3,4];return[4,o];case 2:return u.sent(),r.visited.set(s,!0),[5,T(e(o,n,r))];case 3:u.sent(),u.label=4;case 4:return i++,[3,1];case 5:return[2]}})}(o,e));return s.length>0&&(o=s[0]),nj(o)}throw Error("Selector was not found.")}(e,{className:function(e){return e!==tV},maxNumberOfTries:1e3})}catch(e){t&&t.warn("Failed to get selector with finder, use fallback strategy instead: ".concat(e.toString()))}var o=null==(r=null==(n=null==e?void 0:e.tagName)?void 0:n.toLowerCase)?void 0:r.call(n);o&&(i=o);var s=e.getAttribute("id"),u=e.getAttribute("class");if(s)i="#".concat(s);else if(u){var a=u.split(" ").filter(function(e){return e!==tV}).join(".");a&&(i="".concat(i,".").concat(a))}return i},nG=function(e,t){return!t||!t.length||t.some(function(t){return"string"==typeof t?e===t:e.match(t)})},nQ=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},{})},nZ=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 nJ(r)?r:""}return nZ(n)},nX=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:nX(null==e?void 0:e.parentElement,t):null},n0=function(e,t){if(!e)return{};var n,r,i,o=null==(i=null==(r=null==e?void 0:e.tagName)?void 0:r.toLowerCase)?void 0:i.call(r),s=nW(e,t);return nQ(((n={})[tj]=o,n[tU]=nY(e),n[tD]=s,n[tM]=window.location.href.split("?")[0],n))},n1=function(e){return null!==e.event.target&&!!e.closestTrackedAncestor},n2=function(){function e(e){var t=(void 0===e?{}:e).origin,n=this;this.endpoint=tq,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?tq: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===tq&&(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,f=null==e?void 0:e.data,d=null==f?void 0:f.action;if(d)if("id"in f)null==(c=null==(i=t.logger)?void 0:i.debug)||c.call(i,"Received Response to previous request: ",JSON.stringify(e)),t.handleResponse(f);else if("ping"===d)t.notify({action:"pong"});else if("initialize-visual-tagging-selector"===d){var p,h=null==f?void 0:f.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:n0,isElementSelectable:function(e){return!o||o((null==h?void 0:h.actionType)||"click",e)},onTrack:t.onTrack,onSelect:t.onSelect,visualHighlightClass:tV,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"===d&&(null==(l=null==a?void 0:a.close)||l.call(a))}}),this.notify({action:"page-loaded"})},e}(),n4=["id","class","style","value","onclick","onchange","oninput","onblur","onsubmit","onfocus","onkeydown","onkeyup","onkeypress","data-reactid","data-react-checksum","data-reactroot"],n3=["type"],n6=["svg","path","g"],n5=["password","hidden"],n7=function(e){return e?function(e){for(var t=0,n=0;n<e.length;n++){var r=e[n];if(null===r)t+=4;else{var i=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=k(e,1)[0];return null!=t}).map(function(t){var n=k(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}}(r);t+=i?Array.from(i).length:4}if(t>1024)return e.slice(0,n)}return e}((function(e){var t=[];if(!e)return t;
11t.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 f=e.getAttribute("id");f&&(a.id=String(f));var d=Array.from(e.classList);d.length&&(a.classes=d);var p={},h=Array.from(e.attributes).filter(function(e){return!n4.includes(e.name)}),v=!nB(e);if(!n5.includes(String(e.getAttribute("type")))&&!n6.includes(u))try{for(var g=T(h),y=g.next();!y.done;y=g.next()){var m=y.value;(!v||n3.includes(m.name))&&(p[m.name]=String(m.value).substring(0,128))}}catch(e){t={error:e}}finally{try{y&&!y.done&&(n=g.return)&&n.call(g)}finally{if(t)throw t.error}}return Object.keys(p).length&&(a.attrs=p),a}(e)})):[]};function n9(e,t){return n_(function(n,r){var i=0;n.subscribe(nS(r,function(n){return e.call(t,n,i++)&&r.next(n)}))})}var n8=function(e){function t(t,n){return e.call(this)||this}return t$(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(t1),re={setInterval:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=re.delegate;return(null==i?void 0:i.setInterval)?i.setInterval.apply(i,tB([e,t],tJ(n))):setInterval.apply(void 0,tB([e,t],tJ(n)))},clearInterval:function(e){var t=re.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},rt=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 t$(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),re.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&&re.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,t0(r,this),null!=t&&(this.id=this.recycleAsyncId(n,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(n8),rn={now:function(){return(rn.delegate||Date).now()},delegate:void 0},rr=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=rn.now,e}(),ri=new(function(e){function t(t,n){void 0===n&&(n=rr.now);var r=e.call(this,t,n)||this;return r.actions=[],r._active=!1,r}return t$(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}(rr))(rt);function ro(e){return void 0===e&&(e=1/0),nk(nl,e)}var rs=new nf(function(e){return e.complete()});function ru(e){return e&&tG(e.schedule)}function ra(e){return e[e.length-1]}function rc(e){return ru(ra(e))?e.pop():void 0}function rl(e,t){return void 0===t&&(t=0),n_(function(n,r){n.subscribe(nS(r,function(n){return nT(r,e,function(){return r.next(n)},t)},function(){return nT(r,e,function(){return r.complete()},t)},function(n){return nT(r,e,function(){return r.error(n)},t)}))})}function rf(e,t){return void 0===t&&(t=0),n_(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}function rd(e,t){if(!e)throw Error("Iterable cannot be null");return new nf(function(n){nT(n,t,function(){var r=e[Symbol.asyncIterator]();nT(n,t,function(){r.next().then(function(e){e.done?n.complete():n.next(e.value)})},0,!0)})})}function rp(e,t){return t?function(e,t){if(null!=e){if(tG(e[nc]))return nb(e).pipe(rf(t),rl(t));if(tW(e))return new nf(function(n){var r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})});if(tQ(e))return nb(e).pipe(rf(t),rl(t));if(np(e))return rd(e,t);if(ng(e))return new nf(function(n){var r;return nT(n,t,function(){r=e[nv](),nT(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 tG(null==r?void 0:r.return)&&r.return()}});if(nm(e))return rd(ny(e),t)}throw nh(e)}(e,t):nb(e)}function rh(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=rc(t),i=(e=1/0,"number"==typeof ra(t)?t.pop():e);return t.length?1===t.length?nb(t[0]):ro(i)(rp(t,r)):rs}function rv(e){return e<=0?function(){return rs}:n_(function(t,n){var r=0;t.subscribe(nS(n,function(t){++r<=e&&(n.next(t),e<=r&&n.complete())}))})}function rg(e){return e instanceof Date&&!isNaN(e)}var ry=tZ(function(e){return function(t){void 0===t&&(t=null),e(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=t}});function rm(e){throw new ry(e)}(u=g||(g={})).ClickObservable="clickObservable",u.ChangeObservable="changeObservable",u.NavigateObservable="navigateObservable",u.MutationObservable="mutationObservable";var rb=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 n2}:s;e.cssSelectorAllowlist=null!=(t=e.cssSelectorAllowlist)?t:tL,e.actionClickAllowlist=null!=(n=e.actionClickAllowlist)?n:tN,e.debounceTime=null!=(r=e.debounceTime)?r:0;var a="@amplitude/plugin-autocapture-browser",c=[],l=void 0,f=function(){var e,t,n=nC(document,"click",{capture:!0}).pipe(nI(function(e){return p(e,"click")})),r=nC(document,"change",{capture:!0}).pipe(nI(function(e){return p(e,"change")}));window.navigation&&(t=nC(window.navigation,"navigate").pipe(nI(function(e){return p(e,"navigate")})));var i=new nf(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(nI(function(e){return p(e,"mutation")}));return(e={})[g.ClickObservable]=n,e[g.ChangeObservable]=r,e[g.NavigateObservable]=t,e[g.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},{}),f=nZ(t),d=nW(t,l),p=((n={})["[Amplitude] Element ID"]=t.getAttribute("id")||"",n["[Amplitude] Element Class"]=t.getAttribute("class"),n["[Amplitude] Element Hierarchy"]=n
117(t),n[tj]=s,n[tU]=nY(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[tD]=d,n["[Amplitude] Element Parent Label"]=f,n[tM]=window.location.href.split("?")[0],n["[Amplitude] Page Title"]="u">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&&(p["[Amplitude] Element Href"]=t.href),nQ(p)},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=nX(r.event.target,e.cssSelectorAllowlist);i&&(r.closestTrackedAncestor=i,r.targetElementProperties=d(r.type,i))}return r};return{name:a,type:"enrichment",setup:function(t,n){return E(void 0,void 0,void 0,function(){var r,i,o,s,p,h,v,g,y,m;return I(this,function(b){var w,S,E,I,O,x,A,C,L,N,R,j,U,D,M,q,F,V,K,$,z,H,J,B,Y,W,G,Q,Z,X,ee,et,en,er;return(l=t.loggerProvider,"u"<typeof document)?[2]:(r=nH(e,e.cssSelectorAllowlist),i=nH(e,e.actionClickAllowlist),S=(w={allObservables:o=f(),options:e,amplitude:n,shouldTrackEvent:r}).amplitude,E=w.allObservables,I=w.options,O=w.shouldTrackEvent,L=rh((x=E.clickObservable).pipe(n_(function(e,t){var n,r=!1;e.subscribe(nS(t,function(e){var i=n;n=e,r&&t.next([i,e]),r=!0}))}),n9(function(e){var t=k(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})),x.pipe((A=I.debounceTime,void 0===C&&(C=ri),n_(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+A,r=C.now();if(r<e){n=this.schedule(void 0,e-r),t.add(n);return}o()}e.subscribe(nS(t,function(e){r=e,i=C.now(),n||(n=C.schedule(s,A),t.add(n))},function(){o(),t.complete()},void 0,function(){r=n=null}))})),nI(function(){return"timeout"}))),s=x.pipe((void 0===N&&(N=ri),R=0,j=N,void 0===R&&(R=0),void 0===U&&(U=ri),D=-1,null!=j&&(ru(j)?U=j:D=j),M=new nf(function(e){var t=rg(R)?R-U.now():R;t<0&&(t=0);var n=0;return U.schedule(function(){e.closed||(e.next(n++),0<=D?this.schedule(void 0,D):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 ro(1)(rp(e,rc(e)))}(n.pipe(rv(1),n_(function(e,t){e.subscribe(nS(t,t7))})),r.pipe(e(t)))}:nk(function(e,n){return nb(t(e,n)).pipe(rv(1),nI(function(){return e}))})}(function(){return M})),n9(n1),n9(function(e){return O("click",e.closestTrackedAncestor)}),n_(function(e,t){var n=[];return e.subscribe(nS(t,function(e){return n.push(e)},function(){t.next(n),t.complete()})),nb(L).subscribe(nS(t,function(){var e=n;n=[],t.next(e)},t7)),function(){n=null}})).subscribe(function(e){var t,n,r=(e.length,tR);try{for(var i=T(e),o=i.next();!o.done;o=i.next()){var s=o.value;null==S||S.track(r,s.targetElementProperties,{time:s.timestamp})}}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),F=(q={allObservables:o,getEventProperties:d,amplitude:n,shouldTrackEvent:r}).amplitude,V=q.allObservables,K=q.getEventProperties,$=q.shouldTrackEvent,p=V.changeObservable.pipe(n9(n1),n9(function(e){return $("change",e.closestTrackedAncestor)})).subscribe(function(e){null==F||F.track("[Amplitude] Element Changed",K("change",e.closestTrackedAncestor))}),c.push(p),H=(z={allObservables:o,options:e,getEventProperties:d,amplitude:n,shouldTrackEvent:r,shouldTrackActionClick:i}).amplitude,J=z.allObservables,B=z.options,Y=z.getEventProperties,W=z.shouldTrackEvent,G=z.shouldTrackActionClick,Q=J.clickObservable,Z=J.mutationObservable,X=J.navigateObservable,ee=Q.pipe(n9(function(e){return!W("click",e.closestTrackedAncestor)}),nI(function(e){var t=nX(e.event.target,B.actionClickAllowlist);return e.closestTrackedAncestor=t,null!==e.closestTrackedAncestor&&(e.targetElementProperties=Y(e.type,e.closestTrackedAncestor)),e}),n9(n1),n9(function(e){return G("click",e.closestTrackedAncestor)})),et=[Z],X&&et.push(X),en=rh.apply(void 0,P([],k(et),!1)),h=ee.pipe((er=function(e){return en.pipe(rv(1),function(e){var t=rg(e)?{first:e}:"number"==typeof e?{each:e}:e,n=t.first,r=t.each,i=t.with,o=void 0===i?rm:i,s=t.scheduler,u=void 0===s?ri:s,a=t.meta,c=void 0===a?null:a;if(null==n&&null==r)throw TypeError("No timeout provided.");return n_(function(e,t){var i,s,a=null,l=0,f=function(e){s=nT(t,u,function(){try{i.unsubscribe(),nb(o({meta:c,lastValue:a,seen:l})).subscribe(t)}catch(e){t.error(e)}},e)};i=e.subscribe(nS(t,function(e){null==s||s.unsubscribe(),l++,t.next(a=e),r>0&&f(r)},void 0,void 0,function(){(null==s?void 0:s.closed)||null==s||s.unsubscribe(),a=null})),l||f(null!=n?"number"==typeof n?n:n-u.now():r)})}({first:500,with:function(){return rs}}),nI(function(){return e}))},n_(function(e,t){var n=null,r=0,i=!1,o=function(){return i&&!n&&t.complete()};e.subscribe(nS(t,function(e){null==n||n.unsubscribe(),nb(er(e,r++)).subscribe(n=nS(t,function(e){return t.next(e)},function(){n=null,o()}))},function(){i=!0,o()}))}))).subscribe(function(e){null==H||H.track(tR,Y("click",e.closestTrackedAncestor),{time:e.timestamp})}),c.push(h),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
11=u.messenger)||m.setup(_(_({logger:null==t?void 0:t.loggerProvider},(null==t?void 0:t.serverZone)&&{endpoint:tF[t.serverZone]}),{isElementSelectable:nH(e,P(P([],k(v),!1),k(g),!1)),cssSelectorAllowlist:v,actionClickAllowlist:g}))),[2])})})},execute:function(e){return E(void 0,void 0,void 0,function(){return I(this,function(t){return[2,e]})})},teardown:function(){return E(void 0,void 0,void 0,function(){var e,t,n,r;return I(this,function(i){try{for(t=(e=T(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]})})}}},rw=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return w(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),$(this._init(_(_({},i),{userId:r,apiKey:e})))},t.prototype._init=function(t){var n,r,i;return E(this,void 0,void 0,function(){var o,s,u,a,c,l=this;return I(this,function(f){var d,p,h,v,g;switch(f.label){case 0:if(this.initializing)return[2];return this.initializing=!0,[4,(d=t.apiKey,p=t,h=this,void 0===p&&(p={}),E(void 0,void 0,void 0,function(){var e,t,n,r,i,o,s,u,a,c,l,f,v,g,y,m,b,w,S,T,P,O,x,A,C,L,R,j,U,D,M,q,F,V,K,$,z,H,J,B,Y,W,G;return I(this,function(Q){switch(Q.label){case 0:if(e=p.identityStorage||td,S={},e===td)return[3,1];return n="",[3,5];case 1:if(null==(P=null==(T=p.cookieOptions)?void 0:T.domain))return[3,2];return r=P,[3,4];case 2:return[4,E(void 0,void 0,void 0,function(){var e,t,n,r,i,o;return I(this,function(s){switch(s.label){case 0:return[4,new eW().isEnabled()];case 1:if(!s.sent()||"u"<typeof location||!location.hostname)return[2,""];for(e=(0,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 eW({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=Q.sent(),Q.label=4;case 4:n=r,Q.label=5;case 5:var Z,X;return t=_.apply(void 0,[(S.domain=n,S.expiration=365,S.sameSite="Lax",S.secure=!1,S.upgrade=!0,S),p.cookieOptions]),[4,(Z=i=th(p.identityStorage,t),void 0===(X=null==(x=null==(O=p.cookieOptions)?void 0:O.upgrade)||x)&&(X=!0),E(void 0,void 0,void 0,function(){var e,t,n,r,i,o,s,u,a;return I(this,function(c){switch(c.label){case 0:return e="".concat("amp","_").concat(d.substring(0,6)),[4,Z.getRaw(e)];case 1:if(!(t=c.sent()))return[2,{optOut:!1}];if(!X)return[3,3];return[4,Z.remove(e)];case 2:c.sent(),c.label=3;case 3:return r=(n=k(t.split("."),6))[0],i=n[1],o=n[2],s=n[3],u=n[4],a=n[5],[2,{deviceId:r,userId:e7(i),sessionId:e5(s),lastEventId:e5(a),lastEventTime:e5(u),optOut:!!o}]}})}))];case 6:return o=Q.sent(),[4,i.get(eZ(d))];case 7:return s=Q.sent(),u=eF(),a=null!=(j=null!=(R=null!=(L=null!=(C=null!=(A=p.deviceId)?A:u.ampDeviceId)?C:u.deviceId)?L:null==s?void 0:s.deviceId)?R:o.deviceId)?j:N(),c=null!=(U=null==s?void 0:s.lastEventId)?U:o.lastEventId,l=null!=(D=null==s?void 0:s.lastEventTime)?D:o.lastEventTime,f=null!=(q=null!=(M=p.optOut)?M:null==s?void 0:s.optOut)?q:o.optOut,v=null!=(F=null==s?void 0:s.sessionId)?F:o.sessionId,g=null!=(K=null!=(V=p.userId)?V:null==s?void 0:s.userId)?K:o.userId,h.previousSessionDeviceId=null!=($=null==s?void 0:s.deviceId)?$:o.deviceId,h.previousSessionUserId=null!=(z=null==s?void 0:s.userId)?z:o.userId,y={ipAddress:null==(J=null==(H=p.trackingOptions)?void 0:H.ipAddress)||J,language:null==(Y=null==(B=p.trackingOptions)?void 0:B.language)||Y,platform:null==(G=null==(W=p.trackingOptions)?void 0:W.platform)||G},m=null==s?void 0:s.pageCounter,b=null==s?void 0:s.debugLogsEnabled,void 0!==p.autocapture&&(p.defaultTracking=p.autocapture),[4,(w=new tp(d,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,f,p.partnerId,p.plan,p.serverUrl,p.serverZone,v,p.sessionTimeout,p.storageProvider,y,p.transport,p.useBatch,p.fetchRemoteConfig,g,m,b)).storageProvider.isEnabled()];case 8:return Q.sent()||(w.loggerProvider.warn("Storage provider ".concat(w.storageProvider.constructor.name," is not enabled. Falling back to MemoryStorage.")),w.storageProvider=new eY),[2,w]}})}))];case 1:if(o=f.sent(),!t.fetchRemoteConfig)return[3,4];return[4,(v=o,E(void 0,void 0,void 0,function(){var e;return I(this,function(t){switch(t.label){case 0:return[4,(e=new tC(v)).initialize()];case 1:return t.sent(),[2,e]}})}))];case 2:return[4,f.sent().generateJoinedConfig()];case 3:o=f.sent(),f.label=4;case 4:return[4,e.prototype._init.call(this,o)];case 5:if(f.sent(),this.logBrowserOptions(o),!ev(this.config.defaultTracking))return[3,7];return s=ev((g=this.config).defaultTracking)&&g.defaultTracking&&"object"==typeof g.defaultTracking&&g.defaultTracking.attribution&&"object"==typeof g.defaultTracking.attribution?_({},g.defaultTracking.attribution):{},this.webAttribution=new e$(s,this.config),[4,this.webAttribution.init()];case 6:f.sent(),f.label=7;case 7:if(a=Number.isNaN(Number((u=eF()).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=ef(t.instanceName)).identityStore.setIdentity({userId:this.config.userId,deviceId:this.config.deviceId}),null===this.config.offline)return[3,9];return[4,this.add(tk()).promise];case 8:f.sent(),f.label=9;case 9:return[4,this.add(new X).promise];case 10:return f.sent(),[4,this.add(new eB).promise];case 11:return f.sent(),[4,this.add(new e_).promise];case 12:if(f.sent(),tT(this.config),!eh(this.config.defaultTracking,"fileDownloads"))return[3,14];return this.config.loggerProvider.debug("Adding file download tracking plugin"),[4,this.add(tE()).promise];case 13:f.sent(),f.label=14;case 14:if(!eh(this.config.defaultTracking,"formInteractions"))return[3,16
11];return this.config.loggerProvider.debug("Adding form interaction plugin"),[4,this.add(t_()).promise];case 15:f.sent(),f.label=16;case 16:if(!eg(this.config.defaultTracking))return[3,18];return this.config.loggerProvider.debug("Adding page view tracking plugin"),[4,this.add(ty(ew(this.config))).promise];case 17:f.sent(),f.label=18;case 18:if(!em(this.config.autocapture))return[3,20];return this.config.loggerProvider.debug("Adding user interactions plugin (autocapture plugin)"),[4,this.add(rb(eb(this.config))).promise];case 19:f.sent(),f.label=20;case 20:return this.initializing=!1,[4,this.runQueuedFunctions("dispatchQ")];case 21:return f.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){this.config?(this.config.loggerProvider.debug("function setUserId: ",e),(e!==this.config.userId||void 0===e)&&(this.config.userId=e,ed(e,this.config.instanceName))):this.q.push(this.setUserId.bind(this,e))},t.prototype.getDeviceId=function(){var e;return null==(e=this.config)?void 0:e.deviceId},t.prototype.setDeviceId=function(e){this.config?(this.config.loggerProvider.debug("function setDeviceId: ",e),this.config.deviceId=e,ep(e,this.config.instanceName)):this.q.push(this.setDeviceId.bind(this,e))},t.prototype.reset=function(){this.setDeviceId(N()),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)),$(Promise.resolve());if(e===this.config.sessionId)return $(Promise.resolve());this.config.loggerProvider.debug("function setSessionId: ",e);var r=this.getSessionId(),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,ey(this.config.defaultTracking)&&(r&&i&&n.push(this.track(tr,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 ey(this.config.defaultTracking)&&n.push(this.track(tn,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,$(Promise.all(n))},t.prototype.extendSession=function(){this.config?this.config.lastEventTime=Date.now():this.q.push(this.extendSession.bind(this))},t.prototype.setTransport=function(e){this.config?this.config.transportProvider=tv(e):this.q.push(this.setTransport.bind(this,e))},t.prototype.identify=function(t,n){if(eH(t)){var r=t._q;t._q=[],t=ez(new q,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(eH(r)){var o=r._q;r._q=[],r=ez(new q,o)}return e.prototype.groupIdentify.call(this,t,n,r,i)},t.prototype.revenue=function(t,n){if(eH(t)){var r=t._q;t._q=[],t=ez(new ee,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 E(this,void 0,void 0,function(){var n,r,i;return I(this,function(o){return n=Date.now(),r=eS(this.config.sessionTimeout,this.config.lastEventTime),i=this.webAttribution&&this.webAttribution.shouldSetSessionIdOnNewCampaign(),t.event_type!==tn&&t.event_type!==tr&&(!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=_(_({},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}(z),r_=function(){var e=new rw;return{init:C(e.init.bind(e),"init",O(e),A(e,["config"])),add:C(e.add.bind(e),"add",O(e),A(e,["config.apiKey","timeline.plugins"])),remove:C(e.remove.bind(e),"remove",O(e),A(e,["config.apiKey","timeline.plugins"])),track:C(e.track.bind(e),"track",O(e),A(e,["config.apiKey","timeline.queue.length"])),logEvent:C(e.logEvent.bind(e),"logEvent",O(e),A(e,["config.apiKey","timeline.queue.length"])),identify:C(e.identify.bind(e),"identify",O(e),A(e,["config.apiKey","timeline.queue.length"])),groupIdentify:C(e.groupIdentify.bind(e),"groupIdentify",O(e),A(e,["config.apiKey","timeline.queue.length"])),setGroup:C(e.setGroup.bind(e),"setGroup",O(e),A(e,["config.apiKey","timeline.queue.length"])),revenue:C(e.revenue.bind(e),"revenue",O(e),A(e,["config.apiKey","timeline.queue.length"])),flush:C(e.flush.bind(e),"flush",O(e),A(e,["config.apiKey","timeline.queue.length"])),getUserId:C(e.getUserId.bind(e),"getUserId",O(e),A(e,["config","config.userId"])),setUserId:C(e.setUserId.bind(e),"setUserId",O(e),A(e,["config","config.userId"])),getDeviceId:C(e.getDeviceId.bind(e),"getDeviceId",O(e),A(e,["config","config.deviceId"])),setDeviceId:C(e.setDeviceId.bind(e),"setDeviceId",O(e),A(e,["config","config.deviceId"])),reset:C(e.reset.bind(e),"reset",O(e),A(e,["config","config.userId","config.deviceId"])),getSessionId:C(e.getSessionId.bind(e),"getSessionId",O(e),A(e,["config"])),setSessionId:C(e.setSessionId.bind(e),"setSessionId",O(e),A(e,["config"])),extendSession:C(e.extendSession.bind(e),"extendSession",O(e),A(e,["config"])),setOptOut:C(e.setOptOut.bind(e),"setOptOut",O(e),A(e,["config"])),setTransport:C(e.setTransport.bind(e),"setTransport",O(e),A(e,["config"]))}};r_();var rS=e.i(65249),rE=e.i(98622);e.i(47736);var rI=e.i(86295),rI=rI;e.s(["default",0,function(){let e,t,n;return e=(0,rS.usePathname)(),t=(0,rE.useMemo)(()=>{let e=r_();e.init(y.NEXT_PUBLIC_KAPP_AMPLITUDE_API_KEY,void 0,{instanceName:"kintone飿ºè£½å",cookieOptions:{secure:!0},defaultTracking:{attribution:!0,pageViews:!1,formInteractions:!1,fileDownloads:!0,sessions:!1}});let t=r_();t.init(y.NEXT_PUBLIC_SCHEDULER_AMPLITUDE_API_KEY,void 0,{instanceName:"ãã¨ã¯ã¢ã¹ã±ã¸ã¥ã¼ã©ã¼",cookieOptions:{secure:!0},defaultTracking:{attribution:!0,pageViews:!1,formInteractions:!1,fileDownloads:!0,sessions:!1}});let n=r_();return n.init(y.NEXT_PUBLIC_ANPI_AMPLITUDE_API_KEY,void 0,{instanceName:"å®å¦ç¢ºèª",cookieOptions:{secure:!0},defaultTracking:{attribution:!0,pageViews:!1,formInteractions:!1,fileDownloads:!0,sessions:!1}}
11),{kAppInstance:e,schedulerInstance:t,anpiInstance:n}},[]),n=(0,rE.useCallback)((n,r,i)=>{if(null==e||null==t)return;let{kAppInstance:o,schedulerInstance:s,anpiInstance:u}=t,a=new URL(e,y.NEXT_PUBLIC_SITE_ORIGIN),c={URL:a.toString(),ãã¼ã¸ãã¹:a.pathname,ãã¼ã¸ã¿ã¤ãã«:document.title,ãµã¼ãã¹å:"ä¼ç¤¾HP",ã¤ãã³ãçºçæ¥æ:(0,rI.default)().tz().format("YYYY/M/D")},l=(()=>{switch(n){case"scheduler":return s;case"anpi":return u;default:return o}})();null!=l&&l.track(r,{...c,...i})},[e,t]),(0,rE.useEffect)(()=>{let e=e=>{if(!m.ALLOW_LIST.includes(e.origin))return;let t=e.data;"object"==typeof t&&null!==t&&"type"in t&&"amplitude-event-submit"===t.type&&"eventName"in t&&"string"==typeof t.eventName&&"eventOrigin"in t&&("anpi"===t.eventOrigin||"kintoneapp"===t.eventOrigin||"scheduler"===t.eventOrigin)&&n(t.eventOrigin,t.eventName,t.eventProperties)};return window.addEventListener("message",e),()=>{window.removeEventListener("message",e)}},[n]),null}],60431)}]);
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.