"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[131],{63702:function(e,t,n){n.r(t),n.d(t,{Identify:function(){return G},Revenue:function(){return M},Types:function(){return b},add:function(){return rc},createInstance:function(){return ro},extendSession:function(){return rl},flush:function(){return rd},getDeviceId:function(){return rf},getSessionId:function(){return rh},getUserId:function(){return rp},groupIdentify:function(){return rv},identify:function(){return rg},init:function(){return rm},logEvent:function(){return ry},remove:function(){return rb},reset:function(){return rw},revenue:function(){return r_},runQueuedFunctions:function(){return eD},setDeviceId:function(){return rE},setGroup:function(){return rI},setOptOut:function(){return rS},setSessionId:function(){return rT},setTransport:function(){return rk},setUserId:function(){return rP},track:function(){return rC}});var r,i,o,u,s,a,c,l,d,f,h,p,v,g,m,y,b={};n.r(b),n.d(b,{DEFAULT_CSS_SELECTOR_ALLOWLIST:function(){return rs},DEFAULT_DATA_ATTRIBUTE_PREFIX:function(){return ra},IdentifyOperation:function(){return f},LogLevel:function(){return l},OfflineDisabled:function(){return eU},RevenueProperty:function(){return h},ServerZone:function(){return v},SpecialEventType:function(){return p},Status:function(){return d}});var w=n(11735);(r=l||(l={}))[r.None=0]="None",r[r.Error=1]="Error",r[r.Warn=2]="Warn",r[r.Verbose=3]="Verbose",r[r.Debug=4]="Debug";var _=function(e){return function(){var t=(0,w.pi)({},e.config);return{logger:t.loggerProvider,logLevel:t.logLevel}}},E=function(e,t){var n,r;t=(t=t.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"");try{for(var i=(0,w.XA)(t.split(".")),o=i.next();!o.done;o=i.next()){var u=o.value;if(!(u in e))return;e=e[u]}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return e},I=function(e,t){return function(){var n,r,i={};try{for(var o=(0,w.XA)(t),u=o.next();!u.done;u=o.next()){var s=u.value;i[s]=E(e,s)}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i}},S=function(e,t,n,r,i){return void 0===i&&(i=null),function(){for(var o=[],u=0;u<arguments.length;u++)o[u]=arguments[u];var s=n(),a=s.logger,c=s.logLevel;if(c&&c<l.Debug||!c||!a)return e.apply(i,o);var d={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&&d.states&&(d.states.before=r());var f=e.apply(i,o);return f&&f.promise?f.promise.then(function(){r&&d.states&&(d.states.after=r()),d.time&&(d.time.end=new Date().toISOString()),a.debug(JSON.stringify(d,null,2))}):(r&&d.states&&(d.states.after=r()),d.time&&(d.time.end=new Date().toISOString()),a.debug(JSON.stringify(d,null,2))),f}},T=function(e){return{promise:e||Promise.resolve()}};(i=d||(d={})).Unknown="unknown",i.Skipped="skipped",i.Success="success",i.RateLimit="rate_limit",i.PayloadTooLarge="payload_too_large",i.Invalid="invalid",i.Failed="failed",i.Timeout="Timeout",i.SystemError="SystemError";var k="".concat("AMP","_unsent"),P="https://api2.amplitude.com/2/httpapi",C=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},[])},A=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=d.Unknown),{event:e,code:t,message:n}},O="Amplitude Logger ",R=function(){function e(){this.logLevel=l.None}return e.prototype.disable=function(){this.logLevel=l.None},e.prototype.enable=function(e){void 0===e&&(e=l.Warn),this.logLevel=e},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<l.Verbose||console.log("".concat(O,"[Log]: ").concat(e.join(" ")))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<l.Warn||console.warn("".concat(O,"[Warn]: ").concat(e.join(" ")))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<l.Error||console.error("".concat(O,"[Error]: ").concat(e.join(" ")))},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<l.Debug||console.log("".concat(O,"[Debug]: ").concat(e.join(" ")))},e}(),x=function(){return{flushMaxRetries:12,flushQueueSize:200,flushIntervalMillis:1e4,instanceName:"$default_instance",logLevel:l.Warn,loggerProvider:new R,offline:!1,optOut:!1,serverUrl:P,serverZone:"US",useBatch:!1}},N=function(){function e(e){this._optOut=!1;var t,n,r,i,o=x();this.apiKey=e.apiKey,this.flushIntervalMillis=null!==(t=e.flushIntervalMillis)&&void 0!==t?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)&&void 0!==n?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)&&void 0!==r?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)&&void 0!==i?i:o.useBatch,this.loggerProvider.enable(this.logLevel);var u=L(e.serverUrl,e.serverZone,e.useBatch);this.serverZone=u.serverZone,this.serverUrl=u.serverUrl}return Object.defineProperty(e.prototype,"optOut",{get:function(){return this._optOut},set:function(e){this._optOut=e},enumerable:!1,configurable:!0}),e}(),L=function(e,t,n){if(void 0===e&&(e=""),void 0===t&&(t=x().serverZone),void 0===n&&(n=x().useBatch),e)return{serverUrl:e,serverZone:void 0};var r,i=["US","EU"].includes(t)?t:x().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":P)}},U=function(){function e(){this.sdk={metrics:{histogram:{}}}}return e.prototype.recordHistogram=function(e,t){this.sdk.metrics.histogram[e]=t},e}(),D=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,D)};function q(e){var t="";try{"body"in e&&(t=JSON.stringify(e.body,null,2))}catch(e){}return t}var J=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(0,w.mG)(this,void 0,void 0,function(){var n,r=this;return(0,w.Jh)(this,function(i){switch(i.label){case 0:return this.config=e,this.storageKey="".concat(k,"_").concat(this.config.apiKey.substring(0,10)),[4,null===(t=this.config.storageProvider)||void 0===t?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=D()),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){if(t&&(n.queue=n.queue.concat(e)),0===e.timeout){n.schedule(n.config.flushIntervalMillis);return}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),(0,w.mG)(this,void 0,void 0,function(){var t,n,r=this;return(0,w.Jh)(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,Promise.all(C(t,this.config.flushQueueSize).map(function(t){return r.send(t,e)}))];case 1:return i.sent(),this.scheduleTryable(n),[2]}})})},e.prototype.send=function(e,t){return void 0===t&&(t=!0),(0,w.mG)(this,void 0,void 0,function(){var n,r,i,o;return(0,w.Jh)(this,function(u){switch(u.label){case 0:if(!this.config.apiKey)return[2,this.fulfillRequest(e,400,"Event rejected due to missing API key")];n={api_key:this.config.apiKey,events:e.map(function(e){var t=e.event;return t.extra,(0,w._T)(t,["extra"])}),options:{min_id_length:this.config.minIdLength},client_upload_time:new Date().toISOString(),request_metadata:this.config.requestMetadata},this.config.requestMetadata=new U,u.label=1;case 1:return u.trys.push([1,3,,4]),r=L(this.config.serverUrl,this.config.serverZone,this.config.useBatch).serverUrl,[4,this.config.transportProvider.send(r,n)];case 2:if(null===(i=u.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(q(i))):this.fulfillRequest(e,i.statusCode,i.status),[2];return this.handleResponse(i,e),[3,4];case 3:var s;return o=(s=u.sent())instanceof Error?s.message:String(s),this.config.loggerProvider.error(o),this.handleResponse({status:d.Failed,statusCode:0},e),[3,4];case 4:return[2]}})})},e.prototype.handleResponse=function(e,t){var n=e.status;switch(n){case d.Success:this.handleSuccessResponse(e,t);break;case d.Invalid:this.handleInvalidResponse(e,t);break;case d.PayloadTooLarge:this.handlePayloadTooLargeResponse(e,t);break;case d.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")){this.fulfillRequest(t,e.statusCode,e.body.error);return}var r=new Set((0,w.ev)((0,w.ev)((0,w.ev)((0,w.ev)([],(0,w.CR)(Object.values(e.body.eventsWithInvalidFields)),!1),(0,w.CR)(Object.values(e.body.eventsWithMissingFields)),!1),(0,w.CR)(Object.values(e.body.eventsWithInvalidIdLengths)),!1),(0,w.CR)(e.body.silencedEvents),!1).flat()),i=t.filter(function(t,i){if(r.has(i)){n.fulfillRequest([t],e.statusCode,e.body.error);return}return!0});i.length>0&&this.config.loggerProvider.warn(q(e));var o=this.getTryableList(i);this.scheduleTryable(o)},e.prototype.handlePayloadTooLargeResponse=function(e,t){if(1===t.length){this.fulfillRequest(t,e.statusCode,e.body.error);return}this.config.loggerProvider.warn(q(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,u=new Set(r),s=new Set(i),a=new Set(o),c=t.filter(function(t,r){if(t.event.user_id&&u.has(t.event.user_id)||t.event.device_id&&s.has(t.event.device_id)){n.fulfillRequest([t],e.statusCode,e.body.error);return}return a.has(r)&&(t.timeout=n.throttleTimeout),!0});c.length>0&&this.config.loggerProvider.warn(q(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(A(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}();(o=f||(f={})).SET="$set",o.SET_ONCE="$setOnce",o.ADD="$add",o.APPEND="$append",o.PREPEND="$prepend",o.REMOVE="$remove",o.PREINSERT="$preInsert",o.POSTINSERT="$postInsert",o.UNSET="$unset",o.CLEAR_ALL="$clearAll",(u=h||(h={})).REVENUE_PRODUCT_ID="$productId",u.REVENUE_QUANTITY="$quantity",u.REVENUE_PRICE="$price",u.REVENUE_TYPE="$revenueType",u.REVENUE="$revenue",(s=p||(p={})).IDENTIFY="$identify",s.GROUP_IDENTIFY="$groupidentify",s.REVENUE="revenue_amount";var Z=function(e){if(Object.keys(e).length>1e3)return!1;for(var t in e){var n=e[t];if(!j(t,n))return!1}return!0},j=function(e,t){var n,r;if("string"!=typeof e)return!1;if(Array.isArray(t)){var i=!0;try{for(var o=(0,w.XA)(t),u=o.next();!u.done;u=o.next()){var s=u.value;if(Array.isArray(s))return!1;if("object"==typeof s)i=i&&Z(s);else if(!["number","string"].includes(typeof s))return!1;if(!i)return!1}}catch(e){n={error:e}}finally{try{u&&!u.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 Z(t);else if(!["number","string","boolean"].includes(typeof t))return!1;return!0},G=function(){function e(){this._propertySet=new Set,this._properties={}}return e.prototype.getUserProperties=function(){return(0,w.pi)({},this._properties)},e.prototype.set=function(e,t){return this._safeSet(f.SET,e,t),this},e.prototype.setOnce=function(e,t){return this._safeSet(f.SET_ONCE,e,t),this},e.prototype.append=function(e,t){return this._safeSet(f.APPEND,e,t),this},e.prototype.prepend=function(e,t){return this._safeSet(f.PREPEND,e,t),this},e.prototype.postInsert=function(e,t){return this._safeSet(f.POSTINSERT,e,t),this},e.prototype.preInsert=function(e,t){return this._safeSet(f.PREINSERT,e,t),this},e.prototype.remove=function(e,t){return this._safeSet(f.REMOVE,e,t),this},e.prototype.add=function(e,t){return this._safeSet(f.ADD,e,t),this},e.prototype.unset=function(e){return this._safeSet(f.UNSET,e,"-"),this},e.prototype.clearAll=function(){return this._properties={},this._properties[f.CLEAR_ALL]="-",this},e.prototype._safeSet=function(e,t,n){if(this._validate(e,t,n)){var r=this._properties[e];return void 0===r&&(r={},this._properties[e]=r),r[t]=n,this._propertySet.add(t),!0}return!1},e.prototype._validate=function(e,t,n){return!(void 0!==this._properties[f.CLEAR_ALL]||this._propertySet.has(t))&&(e===f.ADD?"number"==typeof n:e===f.UNSET||e===f.REMOVE||j(t,n))},e}(),M=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 Z(e)&&(this.properties=e),this},e.prototype.getEventProperties=function(){var e=this.properties?(0,w.pi)({},this.properties):{};return e[h.REVENUE_PRODUCT_ID]=this.productId,e[h.REVENUE_QUANTITY]=this.quantity,e[h.REVENUE_PRICE]=this.price,e[h.REVENUE_TYPE]=this.revenueType,e[h.REVENUE]=this.revenue,e},e}(),F=function(){function e(e){this.client=e,this.queue=[],this.applying=!1,this.plugins=[]}return e.prototype.register=function(e,t){var n,r;return(0,w.mG)(this,void 0,void 0,function(){return(0,w.Jh)(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=D(),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)&&void 0!==n?n:"enrichment",[4,null===(r=e.setup)||void 0===r?void 0:r.call(e,t,this.client)];case 1:return i.sent(),this.plugins.push(e),[2]}})})},e.prototype.deregister=function(e){var t;return(0,w.mG)(this,void 0,void 0,function(){var n,r;return(0,w.Jh)(this,function(i){switch(i.label){case 0:return n=this.plugins.findIndex(function(t){return t.name===e}),r=this.plugins[n],this.plugins.splice(n,1),[4,null===(t=r.teardown)||void 0===t?void 0:t.call(r)];case 1:return i.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?void 0:t.call(e)}),this.plugins=[],this.client=e},e.prototype.push=function(e){var t=this;return new Promise(function(n){t.queue.push([e,n]),t.scheduleApply(0)})},e.prototype.scheduleApply=function(e){var t=this;this.applying||(this.applying=!0,setTimeout(function(){t.apply(t.queue.shift()).then(function(){t.applying=!1,t.queue.length>0&&t.scheduleApply(0)})},e))},e.prototype.apply=function(e){return(0,w.mG)(this,void 0,void 0,function(){var t,n,r,i,o,u,s,a,c,l,d,f,h,p;return(0,w.Jh)(this,function(v){switch(v.label){case 0:if(!e)return[2];t=(0,w.CR)(e,1)[0],n=(0,w.CR)(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=(0,w.XA)(r)).next(),v.label=2;case 2:if(o.done)return[3,5];if(!(u=o.value).execute)return[3,4];return[4,u.execute((0,w.pi)({},t))];case 3:if(null===(s=v.sent()))return n({event:t,code:0,message:""}),[2];t=s,v.label=4;case 4:return o=i.next(),[3,2];case 5:return[3,8];case 6:return d={error:v.sent()},[3,8];case 7:try{o&&!o.done&&(f=i.return)&&f.call(i)}finally{if(d)throw d.error}return[7];case 8:a=this.plugins.filter(function(e){return"enrichment"===e.type||void 0===e.type}),v.label=9;case 9:v.trys.push([9,14,15,16]),l=(c=(0,w.XA)(a)).next(),v.label=10;case 10:if(l.done)return[3,13];if(!(u=l.value).execute)return[3,12];return[4,u.execute((0,w.pi)({},t))];case 11:if(null===(s=v.sent()))return n({event:t,code:0,message:""}),[2];t=s,v.label=12;case 12:return l=c.next(),[3,10];case 13:return[3,16];case 14:return h={error:v.sent()},[3,16];case 15:try{l&&!l.done&&(p=c.return)&&p.call(c)}finally{if(h)throw h.error}return[7];case 16:return Promise.all(this.plugins.filter(function(e){return"destination"===e.type}).map(function(e){var n=(0,w.pi)({},t);return e.execute(n).catch(function(e){return A(n,0,String(e))})})).then(function(e){var r=(0,w.CR)(e,1)[0]||A(t,100,"Event not tracked, no destination plugins on the instance");n(r)}),[2]}})})},e.prototype.flush=function(){return(0,w.mG)(this,void 0,void 0,function(){var e,t=this;return(0,w.Jh)(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}(),V=function(e,t){return(0,w.pi)((0,w.pi)({},t),{event_type:p.IDENTIFY,user_properties:e.getUserProperties()})},K=function(e,t,n,r){var i;return(0,w.pi)((0,w.pi)({},r),{event_type:p.GROUP_IDENTIFY,group_properties:n.getUserProperties(),groups:((i={})[e]=t,i)})},z=function(e,t,n){var r,i=new G;return i.set(e,t),(0,w.pi)((0,w.pi)({},n),{event_type:p.IDENTIFY,user_properties:i.getUserProperties(),groups:((r={})[e]=t,r)})},$=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 F(this),this.name=e}return e.prototype._init=function(e){return(0,w.mG)(this,void 0,void 0,function(){return(0,w.Jh)(this,function(t){switch(t.label){case 0:return this.config=e,this.timeline.reset(this),[4,this.runQueuedFunctions("q")];case 1:return t.sent(),this.isReady=!0,[2]}})})},e.prototype.runQueuedFunctions=function(e){return(0,w.mG)(this,void 0,void 0,function(){var t,n,r,i,o,u;return(0,w.Jh)(this,function(s){switch(s.label){case 0:t=this[e],this[e]=[],s.label=1;case 1:s.trys.push([1,8,9,10]),r=(n=(0,w.XA)(t)).next(),s.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 s.sent(),[3,6];case 4:return[4,i];case 5:s.sent(),s.label=6;case 6:return r=n.next(),[3,2];case 7:return[3,10];case 8:return o={error:s.sent()},[3,10];case 9:try{r&&!r.done&&(u=n.return)&&u.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:s.sent(),s.label=12;case 12:return[2]}})})},e.prototype.track=function(e,t,n){var r=(0,w.pi)((0,w.pi)((0,w.pi)({},"string"==typeof e?{event_type:e}:e),n),t&&{event_properties:t});return T(this.dispatch(r))},e.prototype.identify=function(e,t){var n=V(e,t);return T(this.dispatch(n))},e.prototype.groupIdentify=function(e,t,n,r){var i=K(e,t,n,r);return T(this.dispatch(i))},e.prototype.setGroup=function(e,t,n){var r=z(e,t,n);return T(this.dispatch(r))},e.prototype.revenue=function(e,t){var n=(0,w.pi)((0,w.pi)({},t),{event_type:p.REVENUE,event_properties:e.getEventProperties()});return T(this.dispatch(n))},e.prototype.add=function(e){return this.isReady?this._addPlugin(e):(this.q.push(this._addPlugin.bind(this,e)),T())},e.prototype._addPlugin=function(e){return T(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)),T())},e.prototype._removePlugin=function(e){return T(this.timeline.deregister(e))},e.prototype.dispatchWithCallback=function(e,t){if(!this.isReady)return t(A(e,0,"Client not initialized"));this.process(e).then(t)},e.prototype.dispatch=function(e){return(0,w.mG)(this,void 0,void 0,function(){var t=this;return(0,w.Jh)(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(0,w.mG)(this,void 0,void 0,function(){var t,n;return(0,w.Jh)(this,function(r){switch(r.label){case 0:if(r.trys.push([0,2,,3]),this.config.optOut)return[2,A(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=A(e,0,n)];case 3:return[2]}})})},e.prototype.setOptOut=function(e){if(!this.isReady){this.q.push(this._setOptOut.bind(this,!!e));return}this._setOptOut(e)},e.prototype._setOptOut=function(e){this.config.optOut=!!e},e.prototype.flush=function(){return T(this.timeline.flush())},e}(),B=function(e,t){return"boolean"==typeof e?e:(null==e?void 0:e[t])!==!1},Q=function(e){return B(e,"attribution")},W=function(e){return B(e,"pageViews")},H=function(e){return B(e,"sessions")},X=function(e){return"boolean"==typeof e?e:"object"==typeof e&&(!0===e.elementInteractions||"object"==typeof e.elementInteractions)},Y=function(e){if(X(e.autocapture)&&"object"==typeof e.autocapture&&"object"==typeof e.autocapture.elementInteractions)return e.autocapture.elementInteractions},ee=function(e){var t,n=function(){return!1},r=void 0,i=e.pageCounter;return W(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}},et="dclid",en="fbclid",er="gbraid",ei="gclid",eo="ko_click_id",eu="li_fat_id",es="msclkid",ea="rtd_cid",ec="ttclid",el="twclid",ed="wbraid",ef={utm_campaign:void 0,utm_content:void 0,utm_id:void 0,utm_medium:void 0,utm_source:void 0,utm_term:void 0,referrer:void 0,referring_domain:void 0,dclid:void 0,gbraid:void 0,gclid:void 0,fbclid:void 0,ko_click_id:void 0,li_fat_id:void 0,msclkid:void 0,rtd_cid:void 0,ttclid:void 0,twclid:void 0,wbraid:void 0},eh=function(e){var t=e.split(".");return t.length<=2?e:t.slice(t.length-2,t.length).join(".")},ep=function(e,t,n,r){void 0===r&&(r=!0),e.referrer;var i=e.referring_domain,o=(0,w._T)(e,["referrer","referring_domain"]),u=t||{},s=(u.referrer,u.referring_domain),a=(0,w._T)(u,["referrer","referring_domain"]);if(ev(n.excludeReferrers,e.referring_domain)||!r&&Object.values(e).every(function(e){return!e})&&t)return!1;var c=JSON.stringify(o)!==JSON.stringify(a),l=eh(i||"")!==eh(s||"");return!t||c||l},ev=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})},eg=function(e){var t=e;return t?(t.startsWith(".")&&(t=t.substring(1)),[new RegExp("".concat(t.replace(".","\\."),"$"))]):[]},em=function(){var e="ampIntegrationContext";return"undefined"!=typeof globalThis&&void 0!==globalThis[e]?globalThis[e]:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof self?self:void 0!==n.g?n.g:void 0},ey=function(){var e,t=em();return(null===(e=null==t?void 0:t.location)||void 0===e?void 0:e.search)?t.location.search.substring(1).split("&").filter(Boolean).reduce(function(e,t){var n=t.split("=",2),r=eb(n[0]),i=eb(n[1]);return i&&(e[r]=i),e},{}):{}},eb=function(e){void 0===e&&(e="");try{return decodeURIComponent(e)}catch(e){return""}},ew=function(){function e(){}return e.prototype.parse=function(){return(0,w.mG)(this,void 0,void 0,function(){return(0,w.Jh)(this,function(e){return[2,(0,w.pi)((0,w.pi)((0,w.pi)((0,w.pi)({},ef),this.getUtmParam()),this.getReferrer()),this.getClickIds())]})})},e.prototype.getUtmParam=function(){var e=ey();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?void 0:e.split("/")[2])&&void 0!==t?t:void 0}catch(e){}return n},e.prototype.getClickIds=function(){var e,t=ey();return(e={})[et]=t[et],e[en]=t[en],e[er]=t[er],e[ei]=t[ei],e[eo]=t[eo],e[eu]=t[eu],e[es]=t[es],e[ea]=t[ea],e[ec]=t[ec],e[el]=t[el],e[ed]=t[ed],e},e}(),e_=function(e,t){return void 0===t&&(t=Date.now()),Date.now()-t>e},eE=function(){function e(e,t){var n,r,i;this.shouldTrackNewCampaign=!1,this.options=(0,w.pi)({initialEmptyValue:"EMPTY",resetSessionOnNewCampaign:!1,excludeReferrers:eg(null===(n=t.cookieOptions)||void 0===n?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=ef,this.sessionTimeout=t.sessionTimeout,this.lastEventTime=t.lastEventTime,t.loggerProvider.log("Installing web attribution tracking.")}return e.prototype.init=function(){return(0,w.mG)(this,void 0,void 0,function(){var e,t;return(0,w.Jh)(this,function(n){switch(n.label){case 0:return[4,this.fetchCampaign()];case 1:if(t=w.CR.apply(void 0,[n.sent(),2]),this.currentCampaign=t[0],this.previousCampaign=t[1],e=!this.lastEventTime||e_(this.sessionTimeout,this.lastEventTime),!ep(this.currentCampaign,this.previousCampaign,this.options,e))return[3,3];return this.shouldTrackNewCampaign=!0,[4,this.storage.set(this.storageKey,this.currentCampaign)];case 2:n.sent(),n.label=3;case 3:return[2]}})})},e.prototype.fetchCampaign=function(){return(0,w.mG)(this,void 0,void 0,function(){return(0,w.Jh)(this,function(e){switch(e.label){case 0:return[4,Promise.all([new ew().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,V(Object.entries((0,w.pi)((0,w.pi)({},ef),t)).reduce(function(e,t){var r,i=(0,w.CR)(t,2),o=i[0],u=i[1];return(e.setOnce("initial_".concat(o),null!==(r=null!=u?u:n.initialEmptyValue)&&void 0!==r?r:"EMPTY"),u)?e.set(o,u):e.unset(o)},new G)));return e&&(r.event_id=e),r},e.prototype.shouldSetSessionIdOnNewCampaign=function(){return this.shouldTrackNewCampaign&&!!this.options.resetSessionOnNewCampaign},e}(),eI=function(){function e(){}return e.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:eS(),platform:"Web",os:void 0,deviceModel:void 0}},e}(),eS=function(){return"undefined"!=typeof navigator&&(navigator.languages&&navigator.languages[0]||navigator.language)||""},eT=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}(),ek=function(){return(ek=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)},eP=function(e,t){var n=typeof e;if(n!==typeof t)return!1;for(var r=0,i=["string","number","boolean","undefined"];r<i.length;r++)if(i[r]===n)return e===t;if(null==e&&null==t)return!0;if(null==e||null==t||e.length!==t.length)return!1;var o=Array.isArray(e),u=Array.isArray(t);if(o!==u)return!1;if(o&&u){for(var s=0;s<e.length;s++)if(!eP(e[s],t[s]))return!1}else{if(!eP(Object.keys(e).sort(),Object.keys(t).sort()))return!1;var a=!0;return Object.keys(e).forEach(function(n){eP(e[n],t[n])||(a=!1)}),a}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 eC=function(){function e(){this.identity={userProperties:{}},this.listeners=new Set}return e.prototype.editIdentity=function(){var e=this,t=ek({},this.identity.userProperties),n=ek(ek({},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){for(var t=n.userProperties||{},r=0,i=Object.entries(e);r<i.length;r++){var o=i[r],u=o[0],s=o[1];switch(u){case"$set":for(var a=0,c=Object.entries(s);a<c.length;a++){var l=c[a],d=l[0],f=l[1];t[d]=f}break;case"$unset":for(var h=0,p=Object.keys(s);h<p.length;h++){var d=p[h];delete t[d]}break;case"$clearAll":t={}}}return n.userProperties=t,this},commit:function(){return e.setIdentity(n),this}}},e.prototype.getIdentity=function(){return ek({},this.identity)},e.prototype.setIdentity=function(e){var t=ek({},this.identity);this.identity=ek({},e),eP(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}(),eA="undefined"!=typeof globalThis?globalThis:void 0!==n.g?n.g:self,eO=function(){function e(){this.identityStore=new eC,this.eventBridge=new eT,this.applicationContextProvider=new eI}return e.getInstance=function(t){return eA.analyticsConnectorInstances||(eA.analyticsConnectorInstances={}),eA.analyticsConnectorInstances[t]||(eA.analyticsConnectorInstances[t]=new e),eA.analyticsConnectorInstances[t]},e}(),eR=function(e){return void 0===e&&(e="$default_instance"),eO.getInstance(e)},ex=function(e,t){eR(t).identityStore.editIdentity().setUserId(e).commit()},eN=function(e,t){eR(t).identityStore.editIdentity().setDeviceId(e).commit()},eL=function(){function e(){this.name="identity",this.type="before",this.identityStore=eR().identityStore}return e.prototype.execute=function(e){return(0,w.mG)(this,void 0,void 0,function(){var t;return(0,w.Jh)(this,function(n){return(t=e.user_properties)&&this.identityStore.editIdentity().updateUserProperties(t).commit(),[2,e]})})},e.prototype.setup=function(e){return(0,w.mG)(this,void 0,void 0,function(){return(0,w.Jh)(this,function(t){return e.instanceName&&(this.identityStore=eR(e.instanceName).identityStore),[2]})})},e}(),eU=null,eD=function(e,t){eq(e,t)},eq=function(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.name,o=r.args,u=r.resolve,s=e&&e[i];if("function"==typeof s){var a=s.apply(e,o);"function"==typeof u&&u(null==a?void 0:a.promise)}}return e},eJ=function(e){return e&&void 0!==e._q},eZ=function(){if("undefined"==typeof navigator)return"";var e,t,n,r,i=navigator.userLanguage;return null!==(r=null!==(n=null!==(t=null===(e=navigator.languages)||void 0===e?void 0:e[0])&&void 0!==t?t:navigator.language)&&void 0!==n?n:i)&&void 0!==r?r:""},ej=function(){function e(){this.name="@amplitude/plugin-context-browser",this.type="before",this.library="amplitude-ts/".concat("2.11.2"),"undefined"!=typeof navigator&&(this.userAgent=navigator.userAgent)}return e.prototype.setup=function(e){return this.config=e,Promise.resolve(void 0)},e.prototype.execute=function(e){var t,n;return(0,w.mG)(this,void 0,void 0,function(){var r,i,o;return(0,w.Jh)(this,function(u){return r=new Date().getTime(),i=null!==(t=this.config.lastEventId)&&void 0!==t?t:-1,o=null!==(n=e.event_id)&&void 0!==n?n:i+1,this.config.lastEventId=o,e.time||(this.config.lastEventTime=r),[2,(0,w.pi)((0,w.pi)((0,w.pi)((0,w.pi)((0,w.pi)((0,w.pi)((0,w.pi)((0,w.pi)({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:eZ()}),this.config.trackingOptions.ipAddress&&{ip:"$remote"}),{insert_id:D(),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}(),eG=function(){function e(){this.memoryStorage=new Map}return e.prototype.isEnabled=function(){return(0,w.mG)(this,void 0,void 0,function(){return(0,w.Jh)(this,function(e){return[2,!0]})})},e.prototype.get=function(e){return(0,w.mG)(this,void 0,void 0,function(){return(0,w.Jh)(this,function(t){return[2,this.memoryStorage.get(e)]})})},e.prototype.getRaw=function(e){return(0,w.mG)(this,void 0,void 0,function(){var t;return(0,w.Jh)(this,function(n){switch(n.label){case 0:return[4,this.get(e)];case 1:return[2,(t=n.sent())?JSON.stringify(t):void 0]}})})},e.prototype.set=function(e,t){return(0,w.mG)(this,void 0,void 0,function(){return(0,w.Jh)(this,function(n){return this.memoryStorage.set(e,t),[2]})})},e.prototype.remove=function(e){return(0,w.mG)(this,void 0,void 0,function(){return(0,w.Jh)(this,function(t){return this.memoryStorage.delete(e),[2]})})},e.prototype.reset=function(){return(0,w.mG)(this,void 0,void 0,function(){return(0,w.Jh)(this,function(e){return this.memoryStorage.clear(),[2]})})},e}(),eM=function(e,t,n){return void 0===t&&(t=""),void 0===n&&(n=10),["AMP",t,e.substring(0,n)].filter(Boolean).join("_")},eF=function(){function e(e){this.options=(0,w.pi)({},e)}return e.prototype.isEnabled=function(){return(0,w.mG)(this,void 0,void 0,function(){var t,n;return(0,w.Jh)(this,function(r){switch(r.label){case 0:if(!em())return[2,!1];e.testValue=String(Date.now()),t=new e(this.options),n="AMP_TEST",r.label=1;case 1:return r.trys.push([1,4,5,7]),[4,t.set(n,e.testValue)];case 2:return r.sent(),[4,t.get(n)];case 3:return[2,r.sent()===e.testValue];case 4:return r.sent(),[2,!1];case 5:return[4,t.remove(n)];case 6:return r.sent(),[7];case 7:return[2]}})})},e.prototype.get=function(e){var t;return(0,w.mG)(this,void 0,void 0,function(){var n,r;return(0,w.Jh)(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=eV(n))&&void 0!==t?t:eK(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]}return[2]}})})},e.prototype.getRaw=function(e){var t,n;return(0,w.mG)(this,void 0,void 0,function(){var r,i;return(0,w.Jh)(this,function(o){return(i=(null!==(n=null===(t=null==(r=em())?void 0:r.document)||void 0===t?void 0:t.cookie.split("; "))&&void 0!==n?n:[]).find(function(t){return 0===t.indexOf(e+"=")}))?[2,i.substring(e.length+1)]:[2,void 0]})})},e.prototype.set=function(e,t){var n;return(0,w.mG)(this,void 0,void 0,function(){var r,i,o,u,s,a,c;return(0,w.Jh)(this,function(l){try{r=null!==(n=this.options.expirationDays)&&void 0!==n?n:0,i=null!==t?r:-1,o=void 0,i&&((u=new Date).setTime(u.getTime()+864e5*i),o=u),s="".concat(e,"=").concat(btoa(encodeURIComponent(JSON.stringify(t)))),o&&(s+="; expires=".concat(o.toUTCString())),s+="; path=/",this.options.domain&&(s+="; domain=".concat(this.options.domain)),this.options.secure&&(s+="; Secure"),this.options.sameSite&&(s+="; SameSite=".concat(this.options.sameSite)),(a=em())&&(a.document.cookie=s)}catch(t){c=t instanceof Error?t.message:String(t),console.error("Amplitude Logger [Error]: Failed to set cookie for key: ".concat(e,". Error: ").concat(c))}return[2]})})},e.prototype.remove=function(e){return(0,w.mG)(this,void 0,void 0,function(){return(0,w.Jh)(this,function(t){switch(t.label){case 0:return[4,this.set(e,null)];case 1:return t.sent(),[2]}})})},e.prototype.reset=function(){return(0,w.mG)(this,void 0,void 0,function(){return(0,w.Jh)(this,function(e){return[2]})})},e}(),eV=function(e){try{return decodeURIComponent(atob(e))}catch(e){return}},eK=function(e){try{return decodeURIComponent(atob(decodeURIComponent(e)))}catch(e){return}},ez=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,u,s,a,c,l,f,h,p,v,g,m,y,b,w,_,E,I,S=e.code||0,T=this.buildStatus(S);switch(T){case d.Success:return{status:T,statusCode:S,body:{eventsIngested:null!==(t=e.events_ingested)&&void 0!==t?t:0,payloadSizeBytes:null!==(n=e.payload_size_bytes)&&void 0!==n?n:0,serverUploadTime:null!==(r=e.server_upload_time)&&void 0!==r?r:0}};case d.Invalid:return{status:T,statusCode:S,body:{error:null!==(i=e.error)&&void 0!==i?i:"",missingField:null!==(o=e.missing_field)&&void 0!==o?o:"",eventsWithInvalidFields:null!==(u=e.events_with_invalid_fields)&&void 0!==u?u:{},eventsWithMissingFields:null!==(s=e.events_with_missing_fields)&&void 0!==s?s:{},eventsWithInvalidIdLengths:null!==(a=e.events_with_invalid_id_lengths)&&void 0!==a?a:{},epsThreshold:null!==(c=e.eps_threshold)&&void 0!==c?c:0,exceededDailyQuotaDevices:null!==(l=e.exceeded_daily_quota_devices)&&void 0!==l?l:{},silencedDevices:null!==(f=e.silenced_devices)&&void 0!==f?f:[],silencedEvents:null!==(h=e.silenced_events)&&void 0!==h?h:[],throttledDevices:null!==(p=e.throttled_devices)&&void 0!==p?p:{},throttledEvents:null!==(v=e.throttled_events)&&void 0!==v?v:[]}};case d.PayloadTooLarge:return{status:T,statusCode:S,body:{error:null!==(g=e.error)&&void 0!==g?g:""}};case d.RateLimit:return{status:T,statusCode:S,body:{error:null!==(m=e.error)&&void 0!==m?m:"",epsThreshold:null!==(y=e.eps_threshold)&&void 0!==y?y:0,throttledDevices:null!==(b=e.throttled_devices)&&void 0!==b?b:{},throttledUsers:null!==(w=e.throttled_users)&&void 0!==w?w:{},exceededDailyQuotaDevices:null!==(_=e.exceeded_daily_quota_devices)&&void 0!==_?_:{},exceededDailyQuotaUsers:null!==(E=e.exceeded_daily_quota_users)&&void 0!==E?E:{},throttledEvents:null!==(I=e.throttled_events)&&void 0!==I?I:[]}};case d.Timeout:default:return{status:T,statusCode:S}}},e.prototype.buildStatus=function(e){return e>=200&&e<300?d.Success:429===e?d.RateLimit:413===e?d.PayloadTooLarge:408===e?d.Timeout:e>=400&&e<500?d.Invalid:e>=500?d.Failed:d.Unknown},e}(),e$=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,w.ZT)(t,e),t.prototype.send=function(e,t){return(0,w.mG)(this,void 0,void 0,function(){var n,r;return(0,w.Jh)(this,function(i){switch(i.label){case 0:if("undefined"==typeof fetch)throw Error("FetchTransport is not supported");return[4,fetch(e,{headers:{"Content-Type":"application/json",Accept:"*/*"},body:JSON.stringify(t),method:"POST"})];case 1:return[4,(n=i.sent()).text()];case 2:r=i.sent();try{return[2,this.buildResponse(JSON.parse(r))]}catch(e){return[2,this.buildResponse({code:n.status})]}return[2]}})})},t}(ez),eB=function(){function e(e){this.storage=e}return e.prototype.isEnabled=function(){return(0,w.mG)(this,void 0,void 0,function(){var t,n,r;return(0,w.Jh)(this,function(i){switch(i.label){case 0:if(!this.storage)return[2,!1];t=String(Date.now()),n=new e(this.storage),r="AMP_TEST",i.label=1;case 1:return i.trys.push([1,4,5,7]),[4,n.set(r,t)];case 2:return i.sent(),[4,n.get(r)];case 3:return[2,i.sent()===t];case 4:return i.sent(),[2,!1];case 5:return[4,n.remove(r)];case 6:return i.sent(),[7];case 7:return[2]}})})},e.prototype.get=function(e){return(0,w.mG)(this,void 0,void 0,function(){var t;return(0,w.Jh)(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.getRaw(e)];case 1:if(!(t=n.sent()))return[2,void 0];return[2,JSON.parse(t)];case 2:return n.sent(),console.error("[Amplitude] Error: Could not get value from storage"),[2,void 0];case 3:return[2]}})})},e.prototype.getRaw=function(e){var t;return(0,w.mG)(this,void 0,void 0,function(){return(0,w.Jh)(this,function(n){return[2,(null===(t=this.storage)||void 0===t?void 0:t.getItem(e))||void 0]})})},e.prototype.set=function(e,t){var n;return(0,w.mG)(this,void 0,void 0,function(){return(0,w.Jh)(this,function(r){try{null===(n=this.storage)||void 0===n||n.setItem(e,JSON.stringify(t))}catch(e){}return[2]})})},e.prototype.remove=function(e){var t;return(0,w.mG)(this,void 0,void 0,function(){return(0,w.Jh)(this,function(n){try{null===(t=this.storage)||void 0===t||t.removeItem(e)}catch(e){}return[2]})})},e.prototype.reset=function(){var e;return(0,w.mG)(this,void 0,void 0,function(){return(0,w.Jh)(this,function(t){try{null===(e=this.storage)||void 0===e||e.clear()}catch(e){}return[2]})})},e}(),eQ=function(e){function t(t){var n,r=this;return(r=e.call(this,null===(n=em())||void 0===n?void 0:n.localStorage)||this).loggerProvider=null==t?void 0:t.loggerProvider,r}return(0,w.ZT)(t,e),t.prototype.set=function(t,n){var r;return(0,w.mG)(this,void 0,void 0,function(){var i;return(0,w.Jh)(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)||void 0===r||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}(eB),eW=function(e){function t(){var t;return e.call(this,null===(t=em())||void 0===t?void 0:t.sessionStorage)||this}return(0,w.ZT)(t,e),t}(eB),eH=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={done:4},t}return(0,w.ZT)(t,e),t.prototype.send=function(e,t){return(0,w.mG)(this,void 0,void 0,function(){var n=this;return(0,w.Jh)(this,function(r){return[2,new Promise(function(r,i){"undefined"==typeof XMLHttpRequest&&i(Error("XHRTransport is not supported."));var o=new XMLHttpRequest;o.open("POST",e,!0),o.onreadystatechange=function(){if(o.readyState===n.state.done){var e=o.responseText;try{r(n.buildResponse(JSON.parse(e)))}catch(e){r(n.buildResponse({code:o.status}))}}},o.setRequestHeader("Content-Type","application/json"),o.setRequestHeader("Accept","*/*"),o.send(JSON.stringify(t))})]})})},t}(ez),eX=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,w.ZT)(t,e),t.prototype.send=function(e,t){return(0,w.mG)(this,void 0,void 0,function(){var n=this;return(0,w.Jh)(this,function(r){return[2,new Promise(function(r,i){var o=em();if(!(null==o?void 0:o.navigator.sendBeacon))throw Error("SendBeaconTransport is not supported");try{var u=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:u.length,server_upload_time:Date.now()}));return r(n.buildResponse({code:500}))}catch(e){i(e)}})]})})},t}(ez),eY=function(e){var t=parseInt(e,32);if(!isNaN(t))return t},e0=function(e){if(atob&&escape&&e)try{return decodeURIComponent(escape(atob(e)))}catch(e){return}},e1="[Amplitude]",e2="".concat(e1," Form Started"),e4="".concat(e1," Form Submitted"),e3="".concat(e1," File Downloaded"),e5="session_start",e7="session_end",e9="".concat(e1," File Extension"),e6="".concat(e1," File Name"),e8="".concat(e1," Link ID"),te="".concat(e1," Link Text"),tt="".concat(e1," Link URL"),tn="".concat(e1," Form ID"),tr="".concat(e1," Form Name"),ti="".concat(e1," Form Destination"),to="cookie",tu=function(e){function t(t,n,r,i,o,u,s,a,c,d,f,h,p,v,g,m,y,b,w,_,E,I,S,T,k,P,C,A,O,x,N,L,U,D){void 0===r&&(r=new eG),void 0===i&&(i={domain:"",expiration:365,sameSite:"Lax",secure:!1,upgrade:!0}),void 0===a&&(a=1e3),void 0===c&&(c=5),void 0===d&&(d=30),void 0===f&&(f=to),void 0===m&&(m=new R),void 0===y&&(y=l.Warn),void 0===w&&(w=!1),void 0===_&&(_=!1),void 0===S&&(S=""),void 0===T&&(T="US"),void 0===P&&(P=18e5),void 0===C&&(C=new eQ({loggerProvider:m})),void 0===A&&(A={ipAddress:!0,language:!0,platform:!0}),void 0===O&&(O="fetch"),void 0===x&&(x=!1),void 0===N&&(N=!1);var q=e.call(this,{apiKey:t,storageProvider:C,transportProvider:ta(O)})||this;return q.apiKey=t,q.appVersion=n,q.cookieOptions=i,q.defaultTracking=o,q.autocapture=u,q.flushIntervalMillis=a,q.flushMaxRetries=c,q.flushQueueSize=d,q.identityStorage=f,q.ingestionMetadata=h,q.instanceName=p,q.loggerProvider=m,q.logLevel=y,q.minIdLength=b,q.offline=w,q.partnerId=E,q.plan=I,q.serverUrl=S,q.serverZone=T,q.sessionTimeout=P,q.storageProvider=C,q.trackingOptions=A,q.transport=O,q.useBatch=x,q.fetchRemoteConfig=N,q._optOut=!1,q._cookieStorage=r,q.deviceId=s,q.lastEventId=v,q.lastEventTime=g,q.optOut=_,q.sessionId=k,q.pageCounter=U,q.userId=L,q.debugLogsEnabled=D,q.loggerProvider.enable(D?l.Debug:q.logLevel),q}return(0,w.ZT)(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(eM(this.apiKey),e)},t}(N),ts=function(e,t){switch(void 0===e&&(e=to),void 0===t&&(t={}),e){case"localStorage":return new eQ;case"sessionStorage":return new eW;case"none":return new eG;default:return new eF((0,w.pi)((0,w.pi)({},t),{expirationDays:t.expiration}))}},ta=function(e){return"xhr"===e?new eH:"beacon"===e?new eX:new e$},tc=function(e){var t={};for(var n in e){var r=e[n];r&&(t[n]=r)}return t},tl=function(e){void 0===e&&(e={});var t,n,r,i=em(),o=void 0,u=e.trackOn,s=e.trackHistoryChanges,a=e.eventType,c=void 0===a?"[Amplitude] Page Viewed":a,l=function(){return(0,w.mG)(void 0,void 0,void 0,function(){var e,t;return(0,w.Jh)(this,function(n){switch(n.label){case 0:return t={event_type:c},e=[{}],[4,td()];case 1:return[2,(t.event_properties=w.pi.apply(void 0,[w.pi.apply(void 0,e.concat([n.sent()])),{"[Amplitude] Page Domain":"undefined"!=typeof location&&location.hostname||"","[Amplitude] Page Location":"undefined"!=typeof location&&location.href||"","[Amplitude] Page Path":"undefined"!=typeof location&&location.pathname||"","[Amplitude] Page Title":"undefined"!=typeof document&&document.title||"","[Amplitude] Page URL":"undefined"!=typeof location&&location.href.split("?")[0]||""}]),t)]}})})},d=function(){return void 0===u||"function"==typeof u&&u()},f="undefined"!=typeof location?location.href:null,h=function(){return(0,w.mG)(void 0,void 0,void 0,function(){var e,n,r,i;return(0,w.Jh)(this,function(u){switch(u.label){case 0:if(n=th(s,e=location.href,f||"")&&d(),f=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,l()];case 2:i.apply(r,[u.sent()]),u.label=3;case 3:u.label=4;case 4:return[2]}})})},p=function(){h()};return{name:"@amplitude/plugin-page-view-tracking-browser",type:"enrichment",setup:function(e,u){return(0,w.mG)(void 0,void 0,void 0,function(){var s,a;return(0,w.Jh)(this,function(c){switch(c.label){case 0:if(t=u,r=e,(o=e.loggerProvider).log("Installing @amplitude/plugin-page-view-tracking-browser"),i&&(i.addEventListener("popstate",p),n=i.history.pushState,i.history.pushState=new Proxy(i.history.pushState,{apply:function(e,t,n){var r=(0,w.CR)(n,3),i=r[0],o=r[1],u=r[2];e.apply(t,[i,o,u]),h()}})),!d())return[3,2];return o.log("Tracking page view event"),a=(s=t).track,[4,l()];case 1:a.apply(s,[c.sent()]),c.label=2;case 2:return[2]}})})},execute:function(e){return(0,w.mG)(void 0,void 0,void 0,function(){var t;return(0,w.Jh)(this,function(n){switch(n.label){case 0:if(!("attribution"===u&&tf(e)))return[3,2];return null==o||o.log("Enriching campaign event to page view event with campaign parameters"),[4,l()];case 1:t=n.sent(),e.event_type=t.event_type,e.event_properties=(0,w.pi)((0,w.pi)({},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=(0,w.pi)((0,w.pi)({},e.event_properties),{"[Amplitude] Page Counter":r.pageCounter})),[2,e]}})})},teardown:function(){return(0,w.mG)(void 0,void 0,void 0,function(){return(0,w.Jh)(this,function(e){return i&&(i.removeEventListener("popstate",p),n&&(i.history.pushState=n)),[2]})})}}},td=function(){return(0,w.mG)(void 0,void 0,void 0,function(){var e;return(0,w.Jh)(this,function(t){switch(t.label){case 0:return e=tc,[4,new ew().parse()];case 1:return[2,e.apply(void 0,[t.sent()])]}})})},tf=function(e){if("$identify"===e.event_type&&e.user_properties){var t=e.user_properties,n=t[f.SET]||{},r=t[f.UNSET]||{},i=(0,w.ev)((0,w.ev)([],(0,w.CR)(Object.keys(n)),!1),(0,w.CR)(Object.keys(r)),!1);return Object.keys(ef).every(function(e){return i.includes(e)})}return!1},th=function(e,t,n){return"pathOnly"===e?t.split("?")[0]!==n.split("?")[0]:t!==n},tp=function(){var e,t=[],n=function(e,n,r){e.addEventListener(n,r),t.push({element:e,type:n,handler:r})},r=function(){t.forEach(function(e){var t=e.element,n=e.type,r=e.handler;null==t||t.removeEventListener(n,r)}),t=[]};return{name:"@amplitude/plugin-form-interaction-tracking-browser",type:"enrichment",setup:function(t,r){return(0,w.mG)(void 0,void 0,void 0,function(){var i;return(0,w.Jh)(this,function(o){return null===(i=em())||void 0===i||i.addEventListener("load",function(){if(!r){t.loggerProvider.warn("Form interaction tracking requires a later version of @amplitude/analytics-browser. Form interaction events are not tracked.");return}if("undefined"!=typeof document){var i=function(e){var t=!1;n(e,"change",function(){var n;t||r.track(e2,((n={})[tn]=tv(e.id),n[tr]=tv(e.name),n[ti]=e.action,n)),t=!0}),n(e,"submit",function(){var n,i;t||r.track(e2,((n={})[tn]=tv(e.id),n[tr]=tv(e.name),n[ti]=e.action,n)),r.track(e4,((i={})[tn]=tv(e.id),i[tr]=tv(e.name),i[ti]=e.action,i)),t=!1})};Array.from(document.getElementsByTagName("form")).forEach(i),"undefined"!=typeof MutationObserver&&(e=new MutationObserver(function(e){e.forEach(function(e){e.addedNodes.forEach(function(e){"FORM"===e.nodeName&&i(e),"querySelectorAll"in e&&"function"==typeof e.querySelectorAll&&Array.from(e.querySelectorAll("form")).map(i)})})})).observe(document.body,{subtree:!0,childList:!0})}}),[2]})})},execute:function(e){return(0,w.mG)(void 0,void 0,void 0,function(){return(0,w.Jh)(this,function(t){return[2,e]})})},teardown:function(){return(0,w.mG)(void 0,void 0,void 0,function(){return(0,w.Jh)(this,function(t){return null==e||e.disconnect(),r(),[2]})})}}},tv=function(e){if("string"==typeof e)return e},tg=function(){var e,t=[],n=function(e,n,r){e.addEventListener(n,r),t.push({element:e,type:n,handler:r})},r=function(){t.forEach(function(e){var t=e.element,n=e.type,r=e.handler;null==t||t.removeEventListener(n,r)}),t=[]};return{name:"@amplitude/plugin-file-download-tracking-browser",type:"enrichment",setup:function(t,r){return(0,w.mG)(void 0,void 0,void 0,function(){var i;return(0,w.Jh)(this,function(o){return null===(i=em())||void 0===i||i.addEventListener("load",function(){if(!r){t.loggerProvider.warn("File download tracking requires a later version of @amplitude/analytics-browser. File download events are not tracked.");return}if("undefined"!=typeof document){var i=function(e){try{t=new URL(e.href,window.location.href)}catch(e){return}var t,i=o.exec(t.href),u=null==i?void 0:i[1];u&&n(e,"click",function(){var n;u&&r.track(e3,((n={})[e9]=u,n[e6]=t.pathname,n[e8]=e.id,n[te]=e.text,n[tt]=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),"undefined"!=typeof MutationObserver&&(e=new MutationObserver(function(e){e.forEach(function(e){e.addedNodes.forEach(function(e){"A"===e.nodeName&&i(e),"querySelectorAll"in e&&"function"==typeof e.querySelectorAll&&Array.from(e.querySelectorAll("a")).map(i)})})})).observe(document.body,{subtree:!0,childList:!0})}}),[2]})})},execute:function(e){return(0,w.mG)(void 0,void 0,void 0,function(){return(0,w.Jh)(this,function(t){return[2,e]})})},teardown:function(){return(0,w.mG)(void 0,void 0,void 0,function(){return(0,w.Jh)(this,function(t){return null==e||e.disconnect(),r(),[2]})})}}},tm=!1,ty=function(e){tm||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."),tm=!0)},tb=function(){var e=em(),t=[],n=function(n,r){e&&(e.addEventListener(n,r),t.push({type:n,handler:r}))},r=function(){t.forEach(function(t){var n=t.type,r=t.handler;e&&e.removeEventListener(n,r)}),t=[]};return{name:"@amplitude/plugin-network-checker-browser",type:"before",setup:function(e,t){return(0,w.mG)(void 0,void 0,void 0,function(){return(0,w.Jh)(this,function(r){return e.offline=!navigator.onLine,n("online",function(){e.loggerProvider.debug("Network connectivity changed to online."),e.offline=!1,setTimeout(function(){t.flush()},e.flushIntervalMillis)}),n("offline",function(){e.loggerProvider.debug("Network connectivity changed to offline."),e.offline=!0}),[2]})})},teardown:function(){return(0,w.mG)(void 0,void 0,void 0,function(){return(0,w.Jh)(this,function(e){return r(),[2]})})}}};(a=v||(v={})).US="US",a.EU="EU";var tw="Remote config fetch rejected due to timeout after 5 seconds",t_=function(){function e(e){var t=e.localConfig,n=e.configKeys,r=this;this.retryTimeout=1e3,this.attempts=0,this.sessionTargetingMatch=!1,this.metrics={},this.getRemoteConfig=function(e,t,n){return(0,w.mG)(r,void 0,void 0,function(){var r,i,o;return(0,w.Jh)(this,function(u){switch(u.label){case 0:return r=Date.now(),[4,this.fetchWithTimeout(n)];case 1:if((i=u.sent())&&(o=i.configs&&i.configs[e]))return this.metrics.fetchTimeAPISuccess=Date.now()-r,[2,o[t]];return this.metrics.fetchTimeAPIFail=Date.now()-r,[2,void 0]}})})},this.fetchWithTimeout=function(e){return(0,w.mG)(r,void 0,void 0,function(){var t,n,r;return(0,w.Jh)(this,function(i){switch(i.label){case 0:return t=new AbortController,n=setTimeout(function(){return t.abort()},5e3),[4,this.fetchRemoteConfig(t.signal,e)];case 1:return r=i.sent(),clearTimeout(n),[2,r]}})})},this.fetchRemoteConfig=function(e,t){return(0,w.mG)(r,void 0,void 0,function(){var n,r,i,o,u,s,a,c,l,f;return(0,w.Jh)(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:tw})];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=(0,w.XA)(this.configKeys)).next();!i.done;i=r.next())o=i.value,n.append("config_keys",o)}catch(e){l={error:e}}finally{try{i&&!i.done&&(f=r.return)&&f.call(r)}finally{if(l)throw l.error}}return t&&n.set("session_id",String(t)),u={headers:{Accept:"*/*"},method:"GET"},s="".concat(this.getServerUrl(),"?").concat(n.toString()),this.attempts+=1,[4,fetch(s,(0,w.pi)((0,w.pi)({},u),{signal:e}))];case 2:if(null===(a=h.sent()))return[2,this.completeRequest({err:"Unexpected error occurred"})];switch(new ez().buildStatus(a.status)){case d.Success:return this.attempts=0,[2,this.parseAndStoreConfig(a)];case d.Failed:return[2,this.retryFetch(e,t)];default:return[2,this.completeRequest({err:"Network error occurred, remote config fetch failed"})]}return[3,4];case 3:if(c=h.sent(),e.aborted)return[2,this.completeRequest({err:tw})];return[2,this.completeRequest({err:c.message})];case 4:return[2]}})})},this.retryFetch=function(e,t){return(0,w.mG)(r,void 0,void 0,function(){var n=this;return(0,w.Jh)(this,function(r){switch(r.label){case 0:return[4,new Promise(function(e){return setTimeout(e,n.attempts*n.retryTimeout)})];case 1:return r.sent(),[2,this.fetchRemoteConfig(e,t)]}})})},this.parseAndStoreConfig=function(e){return(0,w.mG)(r,void 0,void 0,function(){var t;return(0,w.Jh)(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===v.STAGING?"https://sr-client-cfg.stag2.amplitude.com/config":this.localConfig.serverZone===v.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}(),tE=function(e){var t=e.localConfig,n=e.configKeys;return(0,w.mG)(void 0,void 0,void 0,function(){return(0,w.Jh)(this,function(e){return[2,new t_({localConfig:t,configKeys:n})]})})},tI=function(){function e(e){this.config=e,this.config.loggerProvider.debug("Local configuration before merging with remote config",JSON.stringify(this.config,null,2))}return e.prototype.initialize=function(){return(0,w.mG)(this,void 0,void 0,function(){var e;return(0,w.Jh)(this,function(t){switch(t.label){case 0:return e=this,[4,tE({localConfig:this.config,configKeys:["analyticsSDK"]})];case 1:return e.remoteConfigFetch=t.sent(),[2]}})})},e.prototype.generateJoinedConfig=function(){var e,t,n,r;return(0,w.mG)(this,void 0,void 0,function(){var i,o,u;return(0,w.Jh)(this,function(s){switch(s.label){case 0:if(s.trys.push([0,3,,4]),!(o=this.remoteConfigFetch))return[3,2];return[4,this.remoteConfigFetch.getRemoteConfig("analyticsSDK","browserSDK",this.config.sessionId)];case 1:o=s.sent(),s.label=2;case 2:return i=o,this.config.loggerProvider.debug("Remote configuration:",JSON.stringify(i,null,2)),i&&"autocapture"in i&&("boolean"==typeof i.autocapture&&(this.config.autocapture=i.autocapture),"object"==typeof i.autocapture&&(void 0===this.config.autocapture&&(this.config.autocapture=i.autocapture),"boolean"==typeof this.config.autocapture&&(this.config.autocapture=(0,w.pi)({attribution:this.config.autocapture,fileDownloads:this.config.autocapture,formInteractions:this.config.autocapture,pageViews:this.config.autocapture,sessions:this.config.autocapture,elementInteractions:this.config.autocapture},i.autocapture)),"object"==typeof this.config.autocapture&&(this.config.autocapture=(0,w.pi)((0,w.pi)({},this.config.autocapture),i.autocapture))),this.config.defaultTracking=this.config.autocapture),this.config.loggerProvider.debug("Joined configuration: ",JSON.stringify(this.config,null,2)),null!==(e=(r=this.config).requestMetadata)&&void 0!==e||(r.requestMetadata=new U),(null===(t=this.remoteConfigFetch)||void 0===t?void 0:t.metrics.fetchTimeAPISuccess)&&this.config.requestMetadata.recordHistogram("remote_config_fetch_time_API_success",this.remoteConfigFetch.metrics.fetchTimeAPISuccess),(null===(n=this.remoteConfigFetch)||void 0===n?void 0:n.metrics.fetchTimeAPIFail)&&this.config.requestMetadata.recordHistogram("remote_config_fetch_time_API_fail",this.remoteConfigFetch.metrics.fetchTimeAPIFail),[3,4];case 3:return u=s.sent(),this.config.loggerProvider.error("Failed to fetch remote configuration because of error: ",u),[3,4];case 4:return[2,this.config]}})})},e}(),tS="[Amplitude] Element Clicked",tT="[Amplitude] Element Tag",tk="[Amplitude] Element Text",tP="[Amplitude] Element Selector",tC="[Amplitude] Page URL",tA="https://app.amplitude.com",tO={US:tA,EU:"https://app.eu.amplitude.com",STAGING:"https://apps.stag2.amplitude.com"},tR="amp-visual-tagging-selector-highlight",tx=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function tN(e){return"function"==typeof e}function tL(e){return tN(null==e?void 0:e.then)}function tU(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 tD=tU(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 tq(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var tJ=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 u=(0,w.XA)(o),s=u.next();!s.done;s=u.next())s.value.remove(this)}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=u.return)&&t.call(u)}finally{if(e)throw e.error}}else o.remove(this)}var a=this.initialTeardown;if(tN(a))try{a()}catch(e){i=e instanceof tD?e.errors:[e]}var c=this._finalizers;if(c){this._finalizers=null;try{for(var l=(0,w.XA)(c),d=l.next();!d.done;d=l.next()){var f=d.value;try{tj(f)}catch(e){i=null!=i?i:[],e instanceof tD?i=(0,w.ev)((0,w.ev)([],(0,w.CR)(i)),(0,w.CR)(e.errors)):i.push(e)}}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}}if(i)throw new tD(i)}},t.prototype.add=function(e){var n;if(e&&e!==this){if(this.closed)tj(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!==(n=this._finalizers)&&void 0!==n?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)&&tq(t,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&tq(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=((e=new t).closed=!0,e),t}();function tZ(e){return e instanceof tJ||e&&"closed"in e&&tN(e.remove)&&tN(e.add)&&tN(e.unsubscribe)}function tj(e){tN(e)?e():e.unsubscribe()}tJ.EMPTY;var tG={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},tM={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=tM.delegate;return(null==i?void 0:i.setTimeout)?i.setTimeout.apply(i,(0,w.ev)([e,t],(0,w.CR)(n))):setTimeout.apply(void 0,(0,w.ev)([e,t],(0,w.CR)(n)))},clearTimeout:function(e){var t=tM.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function tF(e){tM.setTimeout(function(){var t=tG.onUnhandledError;if(t)t(e);else throw e})}function tV(){}var tK=tz("C",void 0,void 0);function tz(e,t,n){return{kind:e,value:t,error:n}}var t$=null,tB=function(e){function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,tZ(t)&&t.add(n)):n.destination=t1,n}return(0,w.ZT)(t,e),t.create=function(e,t,n){return new tX(e,t,n)},t.prototype.next=function(e){this.isStopped?t0(tz("N",e,void 0),this):this._next(e)},t.prototype.error=function(e){this.isStopped?t0(tz("E",void 0,e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?t0(tK,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}(tJ),tQ=Function.prototype.bind;function tW(e,t){return tQ.call(e,t)}var tH=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){tY(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){tY(e)}else tY(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){tY(e)}},e}(),tX=function(e){function t(t,n,r){var i,o,u=e.call(this)||this;return tN(t)||!t?i={next:null!=t?t:void 0,error:null!=n?n:void 0,complete:null!=r?r:void 0}:u&&tG.useDeprecatedNextContext?((o=Object.create(t)).unsubscribe=function(){return u.unsubscribe()},i={next:t.next&&tW(t.next,o),error:t.error&&tW(t.error,o),complete:t.complete&&tW(t.complete,o)}):i=t,u.destination=new tH(i),u}return(0,w.ZT)(t,e),t}(tB);function tY(e){tG.useDeprecatedSynchronousErrorHandling?tG.useDeprecatedSynchronousErrorHandling&&t$&&(t$.errorThrown=!0,t$.error=e):tF(e)}function t0(e,t){var n=tG.onStoppedNotification;n&&tM.setTimeout(function(){return n(e,t)})}var t1={closed:!0,next:tV,error:function(e){throw e},complete:tV},t2="function"==typeof Symbol&&Symbol.observable||"@@observable";function t4(e){return e}var t3=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,i=this,o=(r=e)&&r instanceof tB||r&&tN(r.next)&&tN(r.error)&&tN(r.complete)&&tZ(r)?e:new tX(e,t,n);return function(e){if(tG.useDeprecatedSynchronousErrorHandling){var t=!t$;if(t&&(t$={errorThrown:!1,error:null}),e(),t){var n=t$,r=n.errorThrown,i=n.error;if(t$=null,r)throw i}}else e()}(function(){var e=i.operator,t=i.source;o.add(e?e.call(o,t):t?i._subscribe(o):i._trySubscribe(o))}),o},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=t5(t))(function(t,r){var i=new tX({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?void 0:t.subscribe(e)},e.prototype[t2]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return(0===e.length?t4: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=t5(e))(function(e,n){var r;t.subscribe(function(e){return r=e},function(e){return n(e)},function(){return e(r)})})},e.create=function(t){return new e(t)},e}();function t5(e){var t;return null!==(t=null!=e?e:tG.Promise)&&void 0!==t?t:Promise}function t7(e){return Symbol.asyncIterator&&tN(null==e?void 0:e[Symbol.asyncIterator])}function t9(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 t6="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";function t8(e){return tN(null==e?void 0:e[t6])}function ne(e){return(0,w.FC)(this,arguments,function(){var t,n,r;return(0,w.Jh)(this,function(i){switch(i.label){case 0:t=e.getReader(),i.label=1;case 1:i.trys.push([1,,9,10]),i.label=2;case 2:return[4,(0,w.qq)(t.read())];case 3:if(r=(n=i.sent()).value,!n.done)return[3,5];return[4,(0,w.qq)(void 0)];case 4:return[2,i.sent()];case 5:return[4,(0,w.qq)(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 nt(e){return tN(null==e?void 0:e.getReader)}function nn(e){if(e instanceof t3)return e;if(null!=e){if(tN(e[t2]))return new t3(function(t){var n=e[t2]();if(tN(n.subscribe))return n.subscribe(t);throw TypeError("Provided object does not correctly implement Symbol.observable")});if(tx(e))return new t3(function(t){for(var n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()});if(tL(e))return new t3(function(t){e.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,tF)});if(t7(e))return nr(e);if(t8(e))return new t3(function(t){var n,r;try{for(var i=(0,w.XA)(e),o=i.next();!o.done;o=i.next()){var u=o.value;if(t.next(u),t.closed)return}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}t.complete()});if(nt(e))return nr(ne(e))}throw t9(e)}function nr(e){return new t3(function(t){(function(e,t){var n,r,i,o;return(0,w.mG)(this,void 0,void 0,function(){var u;return(0,w.Jh)(this,function(s){switch(s.label){case 0:s.trys.push([0,5,6,11]),n=(0,w.KL)(e),s.label=1;case 1:return[4,n.next()];case 2:if((r=s.sent()).done)return[3,4];if(u=r.value,t.next(u),t.closed)return[2];s.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return i={error:s.sent()},[3,11];case 6:if(s.trys.push([6,,9,10]),!(r&&!r.done&&(o=n.return)))return[3,8];return[4,o.call(n)];case 7:s.sent(),s.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})})(e,t).catch(function(e){return t.error(e)})})}function ni(e){return function(t){if(tN(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 no(e,t,n,r,i){return new nu(e,t,n,r,i)}var nu=function(e){function t(t,n,r,i,o,u){var s=e.call(this,t)||this;return s.onFinalize=o,s.shouldUnsubscribe=u,s._next=n?function(e){try{n(e)}catch(e){t.error(e)}}:e.prototype._next,s._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,s._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,s}return(0,w.ZT)(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)||void 0===t||t.call(this)}},t}(tB);function ns(e,t){return ni(function(n,r){var i=0;n.subscribe(no(r,function(n){r.next(e.call(t,n,i++))}))})}function na(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 nc(e,t,n){return(void 0===n&&(n=1/0),tN(t))?nc(function(n,r){return ns(function(e,i){return t(n,e,r,i)})(nn(e(n,r)))},n):("number"==typeof t&&(n=t),ni(function(t,r){var i,o,u,s,a,c,l,d,f;return i=n,u=[],s=0,a=0,c=!1,l=function(){!c||u.length||s||r.complete()},d=function(e){return s<i?f(e):u.push(e)},f=function(t){s++;var n=!1;nn(e(t,a++)).subscribe(no(r,function(e){o?d(e):r.next(e)},function(){n=!0},void 0,function(){if(n)try{for(s--;u.length&&s<i;)!function(){var e=u.shift();f(e)}();l()}catch(e){r.error(e)}}))},t.subscribe(no(r,d,function(){c=!0,l()})),function(){}}))}var nl=Array.isArray,nd=["addListener","removeListener"],nf=["addEventListener","removeEventListener"],nh=["on","off"];function np(e,t,n,r){if(tN(n)&&(r=n,n=void 0),r)return np(e,t,n).pipe((i=r,ns(function(e){return nl(e)?i.apply(void 0,(0,w.ev)([],(0,w.CR)(e))):i(e)})));var i,o=(0,w.CR)(tN(e.addEventListener)&&tN(e.removeEventListener)?nf.map(function(r){return function(i){return e[r](t,i,n)}}):tN(e.addListener)&&tN(e.removeListener)?nd.map(nv(e,t)):tN(e.on)&&tN(e.off)?nh.map(nv(e,t)):[],2),u=o[0],s=o[1];if(!u&&tx(e))return nc(function(e){return np(e,t,n)})(nn(e));if(!u)throw TypeError("Invalid event target");return new t3(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 u(t),function(){return s(t)}})}function nv(e,t){return function(n){return function(r){return e[n](t,r)}}}function ng(e,t,n){for(var r=null,i=[],o=e,u=0;o&&"break"!==function(){var e,s,a,c,l=nS((e=o.getAttribute("id"))&&g.idName(e)?{name:"#"+CSS.escape(e),penalty:0}:null)||nS.apply(void 0,(0,w.ev)([],(0,w.CR)(Array.from(o.attributes).filter(function(e){return g.attr(e.name,e.value)}).map(function(e){return{name:"[".concat(CSS.escape(e.name),'="').concat(CSS.escape(e.value),'"]'),penalty:.5}})),!1))||nS.apply(void 0,(0,w.ev)([],(0,w.CR)(Array.from(o.classList).filter(g.className).map(function(e){return{name:"."+CSS.escape(e),penalty:1}})),!1))||nS((s=o.tagName.toLowerCase(),g.tagName(s)?{name:s,penalty:2}:null))||[n_()],d=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)d&&(l=l.concat(l.filter(nI).map(function(e){return nE(e,d)})));else if("two"==t)l=l.slice(0,1),d&&(l=l.concat(l.filter(nI).map(function(e){return nE(e,d)})));else if("one"==t){var f=(0,w.CR)(l=l.slice(0,1),1)[0];d&&nI(f)&&(l=[nE(f,d)])}else"none"==t&&(l=[n_()],d&&(l=[nE(l[0],d)]));try{for(var h=(a=void 0,(0,w.XA)(l)),p=h.next();!p.done;p=h.next()){var f=p.value;f.level=u}}catch(e){a={error:e}}finally{try{p&&!p.done&&(c=h.return)&&c.call(h)}finally{if(a)throw a.error}}if(i.push(l),i.length>=g.seedMinLength&&(r=nm(i,n)))return"break";o=o.parentElement,u++}(););return(r||(r=nm(i,n)),!r&&n)?n():r}function nm(e,t){if(e.reduce(function(e,t){return e*t.length},1)>g.threshold)return t?t():null;var n,r,i=nk(function e(t,n){var r,i,o,u,s;return void 0===n&&(n=[]),(0,w.Jh)(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=(0,w.XA)(t[0])).next(),a.label=2;case 2:if(i.done)return[3,5];return o=i.value,[5,(0,w.XA)(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 u={error:a.sent()},[3,8];case 7:try{i&&!i.done&&(s=r.return)&&s.call(r)}finally{if(u)throw u.error}return[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=(0,w.XA)(i),u=o.next();!u.done;u=o.next()){var s=u.value;if(nw(s))return s}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return null}function ny(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 nb(e){return e.map(function(e){return e.penalty}).reduce(function(e,t){return e+t},0)}function nw(e){var t=ny(e);switch(m.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 n_(){return{name:"*",penalty:3}}function nE(e,t){return{name:e.name+":nth-child(".concat(t,")"),penalty:e.penalty+1}}function nI(e){return"html"!==e.name&&!e.name.startsWith("#")}function nS(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e.filter(nT);return n.length>0?n:null}function nT(e){return null!=e}function nk(e){return(0,w.ev)([],(0,w.CR)(e),!1).sort(function(e,t){return nb(e)-nb(t)})}var nP=["input","select","textarea"],nC=function(e,t){return function(n,r){var i,o,u,s=e.pageUrlAllowlist,a=e.shouldTrackEventResolver,c=null===(o=null===(i=null==r?void 0:r.tagName)||void 0===i?void 0:i.toLowerCase)||void 0===o?void 0:o.call(i);if(!c)return!1;if(a)return a(n,r);if(!nN(window.location.href,s))return!1;var l=(null==r?void 0:r.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?void 0:t.call(r,e))}))return!1;switch(c){case"input":case"select":case"textarea":return"change"===n||"click"===n;default:var d=null===(u=null==window?void 0:window.getComputedStyle)||void 0===u?void 0:u.call(window,r);if(d&&"pointer"===d.getPropertyValue("cursor")&&"click"===n)return!0;return"click"===n}}},nA=function(e){return!(null==e||"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)))},nO=function(e){var t,n,r,i=null===(n=null===(t=null==e?void 0:e.tagName)||void 0===t?void 0:t.toLowerCase)||void 0===n?void 0:n.call(t),o=e instanceof HTMLElement&&(null===(r=e.getAttribute("contenteditable"))||void 0===r?void 0:r.toLowerCase())==="true";return!nP.includes(i)&&!o},nR=function(e){var t="";return nO(e)&&e.childNodes&&e.childNodes.length&&e.childNodes.forEach(function(e){var n="";e&&3===e.nodeType?e.textContent&&(n=e.textContent):n=nR(e),t+=n.split(/(\s+)/).filter(nA).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}),t},nx=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={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};m=(n=(g=(0,w.pi)((0,w.pi)({},r),t)).root).nodeType===Node.DOCUMENT_NODE?n:n===r.root?n.ownerDocument:n;var i=ng(e,"all",function(){return ng(e,"two",function(){return ng(e,"one",function(){return ng(e,"none")})})});if(i){var o=nk(function e(t,n,r){var i,o,u;return void 0===r&&(r={counter:0,visited:new Map}),(0,w.Jh)(this,function(s){switch(s.label){case 0:if(!(t.length>2&&t.length>g.optimizedMinLength))return[3,5];i=1,s.label=1;case 1:var a;if(!(i<t.length-1))return[3,5];if(r.counter>g.maxNumberOfTries||(r.counter+=1,(o=(0,w.ev)([],(0,w.CR)(t),!1)).splice(i,1),u=ny(o),r.visited.has(u)))return[2];if(!(nw(o)&&(a=o,m.querySelector(ny(a))===n)))return[3,4];return[4,o];case 2:return s.sent(),r.visited.set(u,!0),[5,(0,w.XA)(e(o,n,r))];case 3:s.sent(),s.label=4;case 4:return i++,[3,1];case 5:return[2]}})}(i,e));return o.length>0&&(i=o[0]),ny(i)}throw Error("Selector was not found.")}(e,{className:function(e){return e!==tR},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?void 0:n.toLowerCase)||void 0===r?void 0:r.call(n);if(o&&(i=o),e.id)i="#".concat(e.id);else if(e.className){var u=e.className.split(" ").filter(function(e){return e!==tR}).join(".");u&&(i="".concat(i,".").concat(u))}return i},nN=function(e,t){return!t||!t.length||t.some(function(t){return"string"==typeof t?e===t:e.match(t)})},nL=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},{})},nU=function(e){var t=e.parentElement;if(!t)return"";var n=t.querySelector(":scope>span,h1,h2,h3,h4,h5,h6");if(n){var r=n.textContent||"";return nA(r)?r:""}return nU(t)},nD=function(e,t){return e?t.some(function(t){var n;return null===(n=null==e?void 0:e.matches)||void 0===n?void 0:n.call(e,t)})?e:nD(null==e?void 0:e.parentElement,t):null},nq=function(e,t){if(!e)return{};var n,r,i,o=null===(i=null===(r=null==e?void 0:e.tagName)||void 0===r?void 0:r.toLowerCase)||void 0===i?void 0:i.call(r),u=nx(e,t);return nL(((n={})[tT]=o,n[tk]=nR(e),n[tP]=u,n[tC]=window.location.href.split("?")[0],n))},nJ=function(e){return null!==e.event.target&&!!e.closestTrackedAncestor},nZ=function(){function e(e){var t=(void 0===e?{}:e).origin,n=this;this.endpoint=tA,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?tA:t}return e.prototype.notify=function(e){var t,n,r,i;null===(n=null===(t=this.logger)||void 0===t?void 0:t.debug)||void 0===n||n.call(t,"Message sent: ",JSON.stringify(e)),null===(i=null===(r=window.opener)||void 0===r?void 0:r.postMessage)||void 0===i||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,u){r.requestCallbacks[i]={resolve:t,reject:u},r.notify(o),(null==n?void 0:n.timeout)>0&&setTimeout(function(){u(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)||void 0===t||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,u=n.cssSelectorAllowlist,s=n.actionClickAllowlist;this.logger=r,i&&this.endpoint===tA&&(this.endpoint=i);var a=null;window.addEventListener("message",function(e){if(null===(r=null===(n=t.logger)||void 0===n?void 0:n.debug)||void 0===r||r.call(n,"Message received: ",JSON.stringify(e)),t.endpoint===e.origin){var n,r,i,c,l,d=null==e?void 0:e.data,f=null==d?void 0:d.action;if(f){if("id"in d)null===(c=null===(i=t.logger)||void 0===i?void 0:i.debug)||void 0===c||c.call(i,"Received Response to previous request: ",JSON.stringify(e)),t.handleResponse(d);else if("ping"===f)t.notify({action:"pong"});else if("initialize-visual-tagging-selector"===f){var h,p=null==d?void 0:d.data;(h="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=h,r.addEventListener("load",function(){e({status:!0})},{once:!0}),r.addEventListener("error",function(){t({status:!1,message:"Failed to load the script ".concat(h)})}),null===(n=document.head)||void 0===n||n.appendChild(r)}catch(e){t(e)}})).then(function(){var e;a=null===(e=null==window?void 0:window.amplitudeVisualTaggingSelector)||void 0===e?void 0:e.call(window,{getEventTagProps:nq,isElementSelectable:function(e){return!o||o((null==p?void 0:p.actionType)||"click",e)},onTrack:t.onTrack,onSelect:t.onSelect,visualHighlightClass:tR,messenger:t,cssSelectorAllowlist:u,actionClickAllowlist:s}),t.notify({action:"selector-loaded"})}).catch(function(){var e;null===(e=t.logger)||void 0===e||e.warn("Failed to initialize visual tagging selector")})}else"close-visual-tagging-selector"===f&&(null===(l=null==a?void 0:a.close)||void 0===l||l.call(a))}}}),this.notify({action:"page-loaded"})},e}(),nj=["id","class","style","value","onclick","onchange","oninput","onblur","onsubmit","onfocus","onkeydown","onkeyup","onkeypress","data-reactid","data-react-checksum","data-reactroot"],nG=["type"],nM=["svg","path","g"],nF=["password","hidden"];function nV(e,t){return ni(function(n,r){var i=0;n.subscribe(no(r,function(n){return e.call(t,n,i++)&&r.next(n)}))})}var nK=function(e){function t(t,n){return e.call(this)||this}return(0,w.ZT)(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(tJ),nz={setInterval:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=nz.delegate;return(null==i?void 0:i.setInterval)?i.setInterval.apply(i,(0,w.ev)([e,t],(0,w.CR)(n))):setInterval.apply(void 0,(0,w.ev)([e,t],(0,w.CR)(n)))},clearInterval:function(e){var t=nz.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},n$=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r.pending=!1,r}return(0,w.ZT)(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)&&void 0!==n?n:this.requestAsyncId(i,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return void 0===n&&(n=0),nz.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&&nz.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,tq(r,this),null!=t&&(this.id=this.recycleAsyncId(n,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(nK),nB={now:function(){return(nB.delegate||Date).now()},delegate:void 0},nQ=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=nB.now,e}(),nW=new(function(e){function t(t,n){void 0===n&&(n=nQ.now);var r=e.call(this,t,n)||this;return r.actions=[],r._active=!1,r}return(0,w.ZT)(t,e),t.prototype.flush=function(e){var t,n=this.actions;if(this._active){n.push(e);return}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}(nQ))(n$);function nH(e){return void 0===e&&(e=1/0),nc(t4,e)}var nX=new t3(function(e){return e.complete()});function nY(e){return e&&tN(e.schedule)}function n0(e){return e[e.length-1]}function n1(e){return nY(n0(e))?e.pop():void 0}function n2(e,t){return void 0===t&&(t=0),ni(function(n,r){n.subscribe(no(r,function(n){return na(r,e,function(){return r.next(n)},t)},function(){return na(r,e,function(){return r.complete()},t)},function(n){return na(r,e,function(){return r.error(n)},t)}))})}function n4(e,t){return void 0===t&&(t=0),ni(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}function n3(e,t){if(!e)throw Error("Iterable cannot be null");return new t3(function(n){na(n,t,function(){var r=e[Symbol.asyncIterator]();na(n,t,function(){r.next().then(function(e){e.done?n.complete():n.next(e.value)})},0,!0)})})}function n5(e,t){return t?function(e,t){if(null!=e){if(tN(e[t2]))return nn(e).pipe(n4(t),n2(t));if(tx(e))return new t3(function(n){var r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})});if(tL(e))return nn(e).pipe(n4(t),n2(t));if(t7(e))return n3(e,t);if(t8(e))return new t3(function(n){var r;return na(n,t,function(){r=e[t6](),na(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 tN(null==r?void 0:r.return)&&r.return()}});if(nt(e))return n3(ne(e),t)}throw t9(e)}(e,t):nn(e)}function n7(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=n1(t),i=(e=1/0,"number"==typeof n0(t)?t.pop():e);return t.length?1===t.length?nn(t[0]):nH(i)(n5(t,r)):nX}function n9(e){return e<=0?function(){return nX}:ni(function(t,n){var r=0;t.subscribe(no(n,function(t){++r<=e&&(n.next(t),e<=r&&n.complete())}))})}function n6(e){return e instanceof Date&&!isNaN(e)}var n8=tU(function(e){return function(t){void 0===t&&(t=null),e(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=t}});function re(e){throw new n8(e)}var rt=["a","button","input","select","textarea","label","video","audio",'[contenteditable="true" i]',"[data-amp-default-track]",".amp-default-track"],rn=["div","span","h1","h2","h3","h4","h5","h6"];(c=y||(y={})).ClickObservable="clickObservable",c.ChangeObservable="changeObservable",c.NavigateObservable="navigateObservable",c.MutationObservable="mutationObservable";var rr=function(e){void 0===e&&(e={});var t,n,r,i=e.dataAttributePrefix,o=void 0===i?"data-amp-track-":i,u=e.visualTaggingOptions,s=void 0===u?{enabled:!0,messenger:new nZ}:u;e.cssSelectorAllowlist=null!==(t=e.cssSelectorAllowlist)&&void 0!==t?t:rt,e.actionClickAllowlist=null!==(n=e.actionClickAllowlist)&&void 0!==n?n:rn,e.debounceTime=null!==(r=e.debounceTime)&&void 0!==r?r:0;var a="@amplitude/plugin-autocapture-browser",c=[],l=void 0,d=function(){var e,t,n=np(document,"click",{capture:!0}).pipe(ns(function(e){return h(e,"click")})),r=np(document,"change",{capture:!0}).pipe(ns(function(e){return h(e,"change")}));window.navigation&&(t=np(window.navigation,"navigate").pipe(ns(function(e){return h(e,"navigate")})));var i=new t3(function(e){var t=new MutationObserver(function(t){e.next(t)});return t.observe(document.body,{childList:!0,attributes:!0,characterData:!0,subtree:!0}),function(){return t.disconnect()}}).pipe(ns(function(e){return h(e,"mutation")}));return(e={})[y.ClickObservable]=n,e[y.ChangeObservable]=r,e[y.NavigateObservable]=t,e[y.MutationObservable]=i,e},f=function(e,t){var n,r,i,u,s=null===(u=null===(i=null==t?void 0:t.tagName)||void 0===i?void 0:i.toLowerCase)||void 0===u?void 0:u.call(i),a="function"==typeof t.getBoundingClientRect?t.getBoundingClientRect():{left:null,top:null},c=t.getAttribute("aria-label"),d=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=nU(t),h=nx(t,l),p=((r={})["[Amplitude] Element ID"]=t.id,r["[Amplitude] Element Class"]=t.className,r["[Amplitude] Element Hierarchy"]=(n=t)?function(e,t){for(var n=0,r=0;r<e.length;r++){var i=e[r];if(null===i)n+=4;else{var o=function e(t,n){void 0===n&&(n=!1);try{if(null==t){if(n)return"None";return null}if("string"==typeof t){if(n){if((t=t.replace(/\\/g,"\\\\").replace(/\n/g,"\\n").replace(/\t/g,"\\t").replace(/\r/g,"\\r")).includes('"'))return"'".concat(t,"'");if(t.includes("'"))return'"'.concat(t.replace(/'/g,"\\'"),'"');return"'".concat(t,"'")}return t}if("boolean"==typeof t)return t?"True":"False";if(Array.isArray(t)){var r=t.map(function(t){return e(t,!0)});return"[".concat(r.join(", "),"]")}else if("object"==typeof t){var i=Object.entries(t).filter(function(e){var t=(0,w.CR)(e,1)[0];return null!=t}).map(function(t){var n=(0,w.CR)(t,2),r=n[0],i=n[1];return"".concat(String(e(r,!0)),": ").concat(String(e(i,!0)))}),o="{".concat(i.join(", "),"}");return o.includes("\\'")&&(o=o.replace(/'/g,"'").replace(/'/g,"\\'")),o}return t.toString()}catch(e){return null}}(i);n+=o?Array.from(o).length:4}if(n>1024)return e.slice(0,r)}return e}((function(e){var t=[];if(!e)return t;t.push(e);for(var n=e.parentElement;n&&"HTML"!==n.tagName;)t.push(n),n=n.parentElement;return t})(n).map(function(e){return function(e){if(null===e)return null;var t,n,r,i,o,u,s=e.tagName.toLowerCase(),a={tag:s},c=Array.from(null!==(i=null===(r=e.parentElement)||void 0===r?void 0:r.children)&&void 0!==i?i:[]);c.length&&(a.index=c.indexOf(e),a.indexOfType=c.filter(function(t){return t.tagName===e.tagName}).indexOf(e));var l=null===(u=null===(o=e.previousElementSibling)||void 0===o?void 0:o.tagName)||void 0===u?void 0:u.toLowerCase();l&&(a.prevSib=l);var d=e.id;d&&(a.id=d);var f=Array.from(e.classList);f.length&&(a.classes=f);var h={},p=Array.from(e.attributes).filter(function(e){return!nj.includes(e.name)}),v=!nO(e);if(!nF.includes(e.type)&&!nM.includes(s))try{for(var g=(0,w.XA)(p),m=g.next();!m.done;m=g.next()){var y=m.value;(!v||nG.includes(y.name))&&(h[y.name]=String(y.value).substring(0,128))}}catch(e){t={error:e}}finally{try{m&&!m.done&&(n=g.return)&&n.call(g)}finally{if(t)throw t.error}}return Object.keys(h).length&&(a.attrs=h),a}(e)}),0):[],r[tT]=s,r[tk]=nR(t),r["[Amplitude] Element Position Left"]=null==a.left?null:Math.round(a.left),r["[Amplitude] Element Position Top"]=null==a.top?null:Math.round(a.top),r["[Amplitude] Element Aria Label"]=c,r["[Amplitude] Element Attributes"]=d,r[tP]=h,r["[Amplitude] Element Parent Label"]=f,r[tC]=window.location.href.split("?")[0],r["[Amplitude] Page Title"]="undefined"!=typeof document&&document.title||"",r["[Amplitude] Viewport Height"]=window.innerHeight,r["[Amplitude] Viewport Width"]=window.innerWidth,r);return"a"===s&&"click"===e&&t instanceof HTMLAnchorElement&&(p["[Amplitude] Element Href"]=t.href),nL(p)},h=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=nD(r.event.target,e.cssSelectorAllowlist);i&&(r.closestTrackedAncestor=i,r.targetElementProperties=f(r.type,i))}return r};return{name:a,type:"enrichment",setup:function(t,n){return(0,w.mG)(void 0,void 0,void 0,function(){var r,i,o,u,h,p,v,g,m,y,b;return(0,w.Jh)(this,function(_){var E,I,S,T,k,P,C,A,O,R,x,N,L,U,D,q,J,Z,j,G,M,F,V,K,z,$,B,Q,W,H,X,Y,ee,et;return n?(l=t.loggerProvider,"undefined"==typeof document||(r=nC(e,e.cssSelectorAllowlist),i=nC(e,e.actionClickAllowlist),I=(E={allObservables:o=d(),options:e,amplitude:n,shouldTrackEvent:r}).amplitude,S=E.allObservables,T=E.options,k=E.shouldTrackEvent,O=n7((P=S.clickObservable).pipe(ni(function(e,t){var n,r=!1;e.subscribe(no(t,function(e){var i=n;n=e,r&&t.next([i,e]),r=!0}))}),nV(function(e){var t=(0,w.CR)(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})),P.pipe((C=T.debounceTime,void 0===A&&(A=nW),ni(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 u(){var e=i+C,r=A.now();if(r<e){n=this.schedule(void 0,e-r),t.add(n);return}o()}e.subscribe(no(t,function(e){r=e,i=A.now(),n||(n=A.schedule(u,C),t.add(n))},function(){o(),t.complete()},void 0,function(){r=n=null}))})),ns(function(){return"timeout"}))),u=P.pipe((void 0===R&&(R=nW),x=0,N=R,void 0===x&&(x=0),void 0===L&&(L=nW),U=-1,null!=N&&(nY(N)?L=N:U=N),D=new t3(function(e){var t=n6(x)?+x-L.now():x;t<0&&(t=0);var n=0;return L.schedule(function(){e.closed||(e.next(n++),0<=U?this.schedule(void 0,U):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 nH(1)(n5(e,n1(e)))}(n.pipe(n9(1),ni(function(e,t){e.subscribe(no(t,tV))})),r.pipe(e(t)))}:nc(function(e,n){return nn(t(e,n)).pipe(n9(1),ns(function(){return e}))})}(function(){return D})),nV(nJ),nV(function(e){return k("click",e.closestTrackedAncestor)}),ni(function(e,t){var n=[];return e.subscribe(no(t,function(e){return n.push(e)},function(){t.next(n),t.complete()})),nn(O).subscribe(no(t,function(){var e=n;n=[],t.next(e)},tV)),function(){n=null}})).subscribe(function(e){var t,n,r=(e.length,tS);try{for(var i=(0,w.XA)(e),o=i.next();!o.done;o=i.next()){var u=o.value;null==I||I.track(r,u.targetElementProperties,{time:u.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(u),J=(q={allObservables:o,getEventProperties:f,amplitude:n,shouldTrackEvent:r}).amplitude,Z=q.allObservables,j=q.getEventProperties,G=q.shouldTrackEvent,h=Z.changeObservable.pipe(nV(nJ),nV(function(e){return G("change",e.closestTrackedAncestor)})).subscribe(function(e){null==J||J.track("[Amplitude] Element Changed",j("change",e.closestTrackedAncestor))}),c.push(h),F=(M={allObservables:o,options:e,getEventProperties:f,amplitude:n,shouldTrackEvent:r,shouldTrackActionClick:i}).amplitude,V=M.allObservables,K=M.options,z=M.getEventProperties,$=M.shouldTrackEvent,B=M.shouldTrackActionClick,Q=V.clickObservable,W=V.mutationObservable,H=V.navigateObservable,X=Q.pipe(nV(function(e){return!$("click",e.closestTrackedAncestor)}),ns(function(e){var t=nD(e.event.target,K.actionClickAllowlist);return e.closestTrackedAncestor=t,null!==e.closestTrackedAncestor&&(e.targetElementProperties=z(e.type,e.closestTrackedAncestor)),e}),nV(nJ),nV(function(e){return B("click",e.closestTrackedAncestor)})),Y=[W],H&&Y.push(H),ee=n7.apply(void 0,(0,w.ev)([],(0,w.CR)(Y),!1)),p=X.pipe((et=function(e){return ee.pipe(n9(1),function(e,t){var n=n6(e)?{first:e}:"number"==typeof e?{each:e}:e,r=n.first,i=n.each,o=n.with,u=void 0===o?re:o,s=n.scheduler,a=void 0===s?nW:s,c=n.meta,l=void 0===c?null:c;if(null==r&&null==i)throw TypeError("No timeout provided.");return ni(function(e,t){var n,o,s=null,c=0,d=function(e){o=na(t,a,function(){try{n.unsubscribe(),nn(u({meta:l,lastValue:s,seen:c})).subscribe(t)}catch(e){t.error(e)}},e)};n=e.subscribe(no(t,function(e){null==o||o.unsubscribe(),c++,t.next(s=e),i>0&&d(i)},void 0,void 0,function(){(null==o?void 0:o.closed)||null==o||o.unsubscribe(),s=null})),c||d(null!=r?"number"==typeof r?r:+r-a.now():i)})}({first:500,with:function(){return nX}}),ns(function(){return e}))},ni(function(e,t){var n=null,r=0,i=!1,o=function(){return i&&!n&&t.complete()};e.subscribe(no(t,function(e){null==n||n.unsubscribe(),nn(et(e,r++)).subscribe(n=no(t,function(e){return t.next(e)},function(){n=null,o()}))},function(){i=!0,o()}))}))).subscribe(function(e){null==F||F.track(tS,z("click",e.closestTrackedAncestor),{time:e.timestamp})}),c.push(p),null===(y=null==t?void 0:t.loggerProvider)||void 0===y||y.log("".concat(a," has been successfully added.")),window.opener&&s.enabled&&(v=e.cssSelectorAllowlist,g=e.actionClickAllowlist,null===(b=s.messenger)||void 0===b||b.setup((0,w.pi)((0,w.pi)({logger:null==t?void 0:t.loggerProvider},(null==t?void 0:t.serverZone)&&{endpoint:tO[t.serverZone]}),{isElementSelectable:nC(e,(0,w.ev)((0,w.ev)([],(0,w.CR)(v),!1),(0,w.CR)(g),!1)),cssSelectorAllowlist:v,actionClickAllowlist:g}))))):null===(m=null==t?void 0:t.loggerProvider)||void 0===m||m.warn("".concat(a," plugin requires a later version of @amplitude/analytics-browser. Events are not tracked.")),[2]})})},execute:function(e){return(0,w.mG)(void 0,void 0,void 0,function(){return(0,w.Jh)(this,function(t){return[2,e]})})},teardown:function(){return(0,w.mG)(void 0,void 0,void 0,function(){var e,t,n,r;return(0,w.Jh)(this,function(i){try{for(t=(e=(0,w.XA)(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]})})}}},ri=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,w.ZT)(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),T(this._init((0,w.pi)((0,w.pi)({},i),{userId:r,apiKey:e})))},t.prototype._init=function(t){var n,r,i;return(0,w.mG)(this,void 0,void 0,function(){var o,u,s,a,c,l=this;return(0,w.Jh)(this,function(d){var f,h,p,v,g;switch(d.label){case 0:if(this.initializing)return[2];return this.initializing=!0,[4,(f=t.apiKey,h=t,p=this,void 0===h&&(h={}),(0,w.mG)(void 0,void 0,void 0,function(){var e,t,n,r,i,o,u,s,a,c,l,d,v,g,m,y,b,_,E,I,S,T,k,P,C,A,O,R,x,N,L,U,q,J,Z,j,G,M,F,V,K,z,$;return(0,w.Jh)(this,function(B){var Q,W,H;switch(B.label){case 0:if(e=h.identityStorage||to,E={},!(e!==to))return[3,1];return n="",[3,5];case 1:if(!(null!==(S=null===(I=h.cookieOptions)||void 0===I?void 0:I.domain)&&void 0!==S))return[3,2];return r=S,[3,4];case 2:return[4,(0,w.mG)(void 0,void 0,void 0,function(){var e,t,n,r,i,o;return(0,w.Jh)(this,function(u){switch(u.label){case 0:return[4,new eF().isEnabled()];case 1:if(!u.sent()||"undefined"==typeof location||!location.hostname)return[2,""];for(e=(null!=Q?Q:location.hostname).split("."),t=[],n="AMP_TLDTEST",r=e.length-2;r>=0;--r)t.push(e.slice(r).join("."));r=0,u.label=2;case 2:if(!(r<t.length))return[3,7];return[4,(o=new eF({domain:"."+(i=t[r])})).set(n,1)];case 3:return u.sent(),[4,o.get(n)];case 4:if(!u.sent())return[3,6];return[4,o.remove(n)];case 5:return u.sent(),[2,"."+i];case 6:return r++,[3,2];case 7:return[2,""]}})})];case 3:r=B.sent(),B.label=4;case 4:n=r,B.label=5;case 5:return t=w.pi.apply(void 0,[(E.domain=n,E.expiration=365,E.sameSite="Lax",E.secure=!1,E.upgrade=!0,E),h.cookieOptions]),[4,(W=i=ts(h.identityStorage,t),void 0===(H=null===(k=null===(T=h.cookieOptions)||void 0===T?void 0:T.upgrade)||void 0===k||k)&&(H=!0),(0,w.mG)(void 0,void 0,void 0,function(){var e,t,n,r,i,o,u,s,a;return(0,w.Jh)(this,function(c){switch(c.label){case 0:return e="".concat("amp","_").concat(f.substring(0,6)),[4,W.getRaw(e)];case 1:if(!(t=c.sent()))return[2,{optOut:!1}];if(!H)return[3,3];return[4,W.remove(e)];case 2:c.sent(),c.label=3;case 3:return r=(n=(0,w.CR)(t.split("."),6))[0],i=n[1],o=n[2],u=n[3],s=n[4],a=n[5],[2,{deviceId:r,userId:e0(i),sessionId:eY(u),lastEventId:eY(a),lastEventTime:eY(s),optOut:!!o}]}})}))];case 6:return o=B.sent(),[4,i.get(eM(f))];case 7:return u=B.sent(),s=ey(),a=null!==(R=null!==(O=null!==(A=null!==(C=null!==(P=h.deviceId)&&void 0!==P?P:s.ampDeviceId)&&void 0!==C?C:s.deviceId)&&void 0!==A?A:null==u?void 0:u.deviceId)&&void 0!==O?O:o.deviceId)&&void 0!==R?R:D(),c=null!==(x=null==u?void 0:u.lastEventId)&&void 0!==x?x:o.lastEventId,l=null!==(N=null==u?void 0:u.lastEventTime)&&void 0!==N?N:o.lastEventTime,d=null!==(U=null!==(L=h.optOut)&&void 0!==L?L:null==u?void 0:u.optOut)&&void 0!==U?U:o.optOut,v=null!==(q=null==u?void 0:u.sessionId)&&void 0!==q?q:o.sessionId,g=null!==(Z=null!==(J=h.userId)&&void 0!==J?J:null==u?void 0:u.userId)&&void 0!==Z?Z:o.userId,p.previousSessionDeviceId=null!==(j=null==u?void 0:u.deviceId)&&void 0!==j?j:o.deviceId,p.previousSessionUserId=null!==(G=null==u?void 0:u.userId)&&void 0!==G?G:o.userId,m={ipAddress:null===(F=null===(M=h.trackingOptions)||void 0===M?void 0:M.ipAddress)||void 0===F||F,language:null===(K=null===(V=h.trackingOptions)||void 0===V?void 0:V.language)||void 0===K||K,platform:null===($=null===(z=h.trackingOptions)||void 0===z?void 0:z.platform)||void 0===$||$},y=null==u?void 0:u.pageCounter,b=null==u?void 0:u.debugLogsEnabled,void 0!==h.autocapture&&(h.defaultTracking=h.autocapture),[4,(_=new tu(f,h.appVersion,i,t,h.defaultTracking,h.autocapture,a,h.flushIntervalMillis,h.flushMaxRetries,h.flushQueueSize,e,h.ingestionMetadata,h.instanceName,c,l,h.loggerProvider,h.logLevel,h.minIdLength,h.offline,d,h.partnerId,h.plan,h.serverUrl,h.serverZone,v,h.sessionTimeout,h.storageProvider,m,h.transport,h.useBatch,h.fetchRemoteConfig,g,y,b)).storageProvider.isEnabled()];case 8:return B.sent()||(_.loggerProvider.warn("Storage provider ".concat(_.storageProvider.constructor.name," is not enabled. Falling back to MemoryStorage.")),_.storageProvider=new eG),[2,_]}})}))];case 1:if(o=d.sent(),!t.fetchRemoteConfig)return[3,4];return[4,(v=o,(0,w.mG)(void 0,void 0,void 0,function(){var e;return(0,w.Jh)(this,function(t){switch(t.label){case 0:return[4,(e=new tI(v)).initialize()];case 1:return t.sent(),[2,e]}})}))];case 2:return[4,d.sent().generateJoinedConfig()];case 3:o=d.sent(),d.label=4;case 4:return[4,e.prototype._init.call(this,o)];case 5:if(d.sent(),this.logBrowserOptions(o),!Q(this.config.defaultTracking))return[3,7];return u=Q((g=this.config).defaultTracking)&&g.defaultTracking&&"object"==typeof g.defaultTracking&&g.defaultTracking.attribution&&"object"==typeof g.defaultTracking.attribution?(0,w.pi)({},g.defaultTracking.attribution):{},this.webAttribution=new eE(u,this.config),[4,this.webAttribution.init()];case 6:d.sent(),d.label=7;case 7:if(a=Number.isNaN(Number((s=ey()).ampSessionId))?void 0:Number(s.ampSessionId),this.setSessionId(null!==(i=null!==(r=null!==(n=t.sessionId)&&void 0!==n?n:a)&&void 0!==r?r:this.config.sessionId)&&void 0!==i?i:Date.now()),(c=eR(t.instanceName)).identityStore.setIdentity({userId:this.config.userId,deviceId:this.config.deviceId}),!(this.config.offline!==eU))return[3,9];return[4,this.add(tb()).promise];case 8:d.sent(),d.label=9;case 9:return[4,this.add(new J).promise];case 10:return d.sent(),[4,this.add(new ej).promise];case 11:return d.sent(),[4,this.add(new eL).promise];case 12:if(d.sent(),ty(this.config),!B(this.config.defaultTracking,"fileDownloads"))return[3,14];return this.config.loggerProvider.debug("Adding file download tracking plugin"),[4,this.add(tg()).promise];case 13:d.sent(),d.label=14;case 14:if(!B(this.config.defaultTracking,"formInteractions"))return[3,16];return this.config.loggerProvider.debug("Adding form interaction plugin"),[4,this.add(tp()).promise];case 15:d.sent(),d.label=16;case 16:if(!W(this.config.defaultTracking))return[3,18];return this.config.loggerProvider.debug("Adding page view tracking plugin"),[4,this.add(tl(ee(this.config))).promise];case 17:d.sent(),d.label=18;case 18:if(!X(this.config.autocapture))return[3,20];return this.config.loggerProvider.debug("Adding user interactions plugin (autocapture plugin)"),[4,this.add(rr(Y(this.config))).promise];case 19:d.sent(),d.label=20;case 20:return this.initializing=!1,[4,this.runQueuedFunctions("dispatchQ")];case 21:return d.sent(),c.eventBridge.setEventReceiver(function(e){l.track(e.eventType,e.eventProperties)}),[2]}})})},t.prototype.getUserId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.userId},t.prototype.setUserId=function(e){if(!this.config){this.q.push(this.setUserId.bind(this,e));return}this.config.loggerProvider.debug("function setUserId: ",e),(e!==this.config.userId||void 0===e)&&(this.config.userId=e,ex(e,this.config.instanceName))},t.prototype.getDeviceId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.deviceId},t.prototype.setDeviceId=function(e){if(!this.config){this.q.push(this.setDeviceId.bind(this,e));return}this.config.loggerProvider.debug("function setDeviceId: ",e),this.config.deviceId=e,eN(e,this.config.instanceName)},t.prototype.reset=function(){this.setDeviceId(D()),this.setUserId(void 0)},t.prototype.getSessionId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.sessionId},t.prototype.setSessionId=function(e){var t,n=[];if(!this.config)return this.q.push(this.setSessionId.bind(this,e)),T(Promise.resolve());if(e===this.config.sessionId)return T(Promise.resolve());this.config.loggerProvider.debug("function setSessionId: ",e);var r=this.getSessionId(),i=this.config.lastEventTime,o=null!==(t=this.config.lastEventId)&&void 0!==t?t:-1;this.config.sessionId=e,this.config.lastEventTime=void 0,this.config.pageCounter=0,H(this.config.defaultTracking)&&(r&&i&&n.push(this.track(e7,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 u=this.trackCampaignEventIfNeeded(++o,n);return H(this.config.defaultTracking)&&n.push(this.track(e5,void 0,{event_id:u?++o:o,session_id:this.config.sessionId,time:this.config.lastEventTime}).promise),this.previousSessionDeviceId=this.config.deviceId,this.previousSessionUserId=this.config.userId,T(Promise.all(n))},t.prototype.extendSession=function(){if(!this.config){this.q.push(this.extendSession.bind(this));return}this.config.lastEventTime=Date.now()},t.prototype.setTransport=function(e){if(!this.config){this.q.push(this.setTransport.bind(this,e));return}this.config.transportProvider=ta(e)},t.prototype.identify=function(t,n){if(eJ(t)){var r=t._q;t._q=[],t=eq(new G,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(eJ(r)){var o=r._q;r._q=[],r=eq(new G,o)}return e.prototype.groupIdentify.call(this,t,n,r,i)},t.prototype.revenue=function(t,n){if(eJ(t)){var r=t._q;t._q=[],t=eq(new M,r)}return e.prototype.revenue.call(this,t,n)},t.prototype.trackCampaignEventIfNeeded=function(e,t){if(!this.webAttribution||!this.webAttribution.shouldTrackNewCampaign)return!1;var n=this.webAttribution.generateCampaignEvent(e);return t?t.push(this.track(n).promise):this.track(n),this.config.loggerProvider.log("Tracking attribution."),!0},t.prototype.process=function(t){return(0,w.mG)(this,void 0,void 0,function(){var n,r,i;return(0,w.Jh)(this,function(o){return n=Date.now(),r=e_(this.config.sessionTimeout,this.config.lastEventTime),i=this.webAttribution&&this.webAttribution.shouldSetSessionIdOnNewCampaign(),t.event_type===e5||t.event_type===e7||t.session_id&&t.session_id!==this.getSessionId()||(r||i?(this.setSessionId(n),i&&this.config.loggerProvider.log("Created a new session for new campaign.")):r||this.trackCampaignEventIfNeeded()),[2,e.prototype.process.call(this,t)]})})},t.prototype.logBrowserOptions=function(e){try{var t=(0,w.pi)((0,w.pi)({},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}($),ro=function(){var e=new ri;return{init:S(e.init.bind(e),"init",_(e),I(e,["config"])),add:S(e.add.bind(e),"add",_(e),I(e,["config.apiKey","timeline.plugins"])),remove:S(e.remove.bind(e),"remove",_(e),I(e,["config.apiKey","timeline.plugins"])),track:S(e.track.bind(e),"track",_(e),I(e,["config.apiKey","timeline.queue.length"])),logEvent:S(e.logEvent.bind(e),"logEvent",_(e),I(e,["config.apiKey","timeline.queue.length"])),identify:S(e.identify.bind(e),"identify",_(e),I(e,["config.apiKey","timeline.queue.length"])),groupIdentify:S(e.groupIdentify.bind(e),"groupIdentify",_(e),I(e,["config.apiKey","timeline.queue.length"])),setGroup:S(e.setGroup.bind(e),"setGroup",_(e),I(e,["config.apiKey","timeline.queue.length"])),revenue:S(e.revenue.bind(e),"revenue",_(e),I(e,["config.apiKey","timeline.queue.length"])),flush:S(e.flush.bind(e),"flush",_(e),I(e,["config.apiKey","timeline.queue.length"])),getUserId:S(e.getUserId.bind(e),"getUserId",_(e),I(e,["config","config.userId"])),setUserId:S(e.setUserId.bind(e),"setUserId",_(e),I(e,["config","config.userId"])),getDeviceId:S(e.getDeviceId.bind(e),"getDeviceId",_(e),I(e,["config","config.deviceId"])),setDeviceId:S(e.setDeviceId.bind(e),"setDeviceId",_(e),I(e,["config","config.deviceId"])),reset:S(e.reset.bind(e),"reset",_(e),I(e,["config","config.userId","config.deviceId"])),getSessionId:S(e.getSessionId.bind(e),"getSessionId",_(e),I(e,["config"])),setSessionId:S(e.setSessionId.bind(e),"setSessionId",_(e),I(e,["config"])),extendSession:S(e.extendSession.bind(e),"extendSession",_(e),I(e,["config"])),setOptOut:S(e.setOptOut.bind(e),"setOptOut",_(e),I(e,["config"])),setTransport:S(e.setTransport.bind(e),"setTransport",_(e),I(e,["config"]))}},ru=ro(),rs=["a","button","input","select","textarea","label","[data-amp-default-track]",".amp-default-track"],ra="data-amp-track-",rc=ru.add,rl=ru.extendSession,rd=ru.flush,rf=ru.getDeviceId,rh=ru.getSessionId,rp=ru.getUserId,rv=ru.groupIdentify,rg=ru.identify,rm=ru.init,ry=ru.logEvent,rb=ru.remove,rw=ru.reset,r_=ru.revenue,rE=ru.setDeviceId,rI=ru.setGroup,rS=ru.setOptOut,rT=ru.setSessionId,rk=ru.setTransport,rP=ru.setUserId,rC=ru.track},78186:function(e,t){t.Z=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}},67912:function(e,t,n){n.d(t,{Z:function(){return a}});var r,i,o=function(e,t,n){for(var r=-1,i=Object(e),o=n(e),u=o.length;u--;){var s=o[++r];if(!1===t(i[s],s,i))break}return e},u=n(39922),s=n(70642),a=(r=function(e,t){return e&&o(e,t,u.Z)},function(e,t){if(null==e)return e;if(!(0,s.Z)(e))return r(e,t);for(var n=e.length,o=-1,u=Object(e);(i?o--:++o<n)&&!1!==t(u[o],o,u););return e})},52439:function(e,t,n){var r=n(83490),i=n(79928);t.Z=function(e,t){t=(0,r.Z)(t,e);for(var n=0,o=t.length;null!=e&&n<o;)e=e[(0,i.Z)(t[n++])];return n&&n==o?e:void 0}},10932:function(e,t,n){n.d(t,{Z:function(){return T}});var r=n(39385),i=n(45577),o=function(e,t,n,o){var u=n.length,s=u,a=!o;if(null==e)return!s;for(e=Object(e);u--;){var c=n[u];if(a&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++u<s;){var l=(c=n[u])[0],d=e[l],f=c[1];if(a&&c[2]){if(void 0===d&&!(l in e))return!1}else{var h=new r.Z;if(o)var p=o(d,f,l,e,t,h);if(!(void 0===p?(0,i.Z)(f,d,3,o,h):p))return!1}}return!0},u=n(48676),s=function(e){return e==e&&!(0,u.Z)(e)},a=n(39922),c=function(e){for(var t=(0,a.Z)(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,s(i)]}return t},l=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}},d=function(e){var t=c(e);return 1==t.length&&t[0][2]?l(t[0][0],t[0][1]):function(n){return n===e||o(n,e,t)}},f=n(91697),h=function(e,t){return null!=e&&t in Object(e)},p=n(83490),v=n(82494),g=n(58771),m=n(27594),y=n(8547),b=n(79928),w=function(e,t,n){t=(0,p.Z)(t,e);for(var r=-1,i=t.length,o=!1;++r<i;){var u=(0,b.Z)(t[r]);if(!(o=null!=e&&n(e,u)))break;e=e[u]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&(0,y.Z)(i)&&(0,m.Z)(u,i)&&((0,g.Z)(e)||(0,v.Z)(e))},_=n(28506),E=function(e){return e},I=n(52439),S=function(e){var t;return(0,_.Z)(e)?(t=(0,b.Z)(e),function(e){return null==e?void 0:e[t]}):function(t){return(0,I.Z)(t,e)}},T=function(e){if("function"==typeof e)return e;if(null==e)return E;if("object"==typeof e){var t,n;return(0,g.Z)(e)?(t=e[0],n=e[1],(0,_.Z)(t)&&s(n)?l((0,b.Z)(t),n):function(e){var r=(0,f.Z)(e,t);return void 0===r&&r===n?null!=e&&w(e,t,h):(0,i.Z)(n,r,3)}):d(e)}return S(e)}},83490:function(e,t,n){n.d(t,{Z:function(){return b}});var r,i,o=n(58771),u=n(28506),s=n(85277);function a(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var u=e.apply(this,r);return n.cache=o.set(i,u)||o,u};return n.cache=new(a.Cache||s.Z),n}a.Cache=s.Z;var c=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,l=/\\(\\)?/g,d=(i=(r=a(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(c,function(e,n,r,i){t.push(r?i.replace(l,"$1"):n||e)}),t},function(e){return 500===i.size&&i.clear(),e})).cache,r),f=n(7569),h=n(78186),p=n(46992),v=1/0,g=f.Z?f.Z.prototype:void 0,m=g?g.toString:void 0,y=function e(t){if("string"==typeof t)return t;if((0,o.Z)(t))return(0,h.Z)(t,e)+"";if((0,p.Z)(t))return m?m.call(t):"";var n=t+"";return"0"==n&&1/t==-v?"-0":n},b=function(e,t){return(0,o.Z)(e)?e:(0,u.Z)(e,t)?[e]:d(null==e?"":y(e))}},28506:function(e,t,n){var r=n(58771),i=n(46992),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u=/^\w*$/;t.Z=function(e,t){if((0,r.Z)(e))return!1;var n=typeof e;return!!("number"==n||"symbol"==n||"boolean"==n||null==e||(0,i.Z)(e))||u.test(e)||!o.test(e)||null!=t&&e in Object(t)}},79928:function(e,t,n){var r=n(46992),i=1/0;t.Z=function(e){if("string"==typeof e||(0,r.Z)(e))return e;var t=e+"";return"0"==t&&1/e==-i?"-0":t}},29902:function(e,t,n){n.d(t,{Z:function(){return d}});var r=n(37120),i=n(7569),o=n(82494),u=n(58771),s=i.Z?i.Z.isConcatSpreadable:void 0,a=function(e){return(0,u.Z)(e)||(0,o.Z)(e)||!!(s&&e&&e[s])},c=function e(t,n,i,o,u){var s=-1,c=t.length;for(i||(i=a),u||(u=[]);++s<c;){var l=t[s];n>0&&i(l)?n>1?e(l,n-1,i,o,u):(0,r.Z)(u,l):o||(u[u.length]=l)}return u},l=n(76265),d=function(e,t){return c((0,l.Z)(e,t),1)}},91697:function(e,t,n){var r=n(52439);t.Z=function(e,t,n){var i=null==e?void 0:(0,r.Z)(e,t);return void 0===i?n:i}},46992:function(e,t,n){var r=n(38637),i=n(97736);t.Z=function(e){return"symbol"==typeof e||(0,i.Z)(e)&&"[object Symbol]"==(0,r.Z)(e)}},76265:function(e,t,n){n.d(t,{Z:function(){return c}});var r=n(78186),i=n(10932),o=n(67912),u=n(70642),s=function(e,t){var n=-1,r=(0,u.Z)(e)?Array(e.length):[];return(0,o.Z)(e,function(e,i,o){r[++n]=t(e,i,o)}),r},a=n(58771),c=function(e,t){return((0,a.Z)(e)?r.Z:s)(e,(0,i.Z)(t,3))}},29886:function(e,t,n){n.d(t,{Z:function(){return a}});var r=function(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n},i=n(67912),o=n(10932),u=function(e,t,n,r,i){return i(e,function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)}),n},s=n(58771),a=function(e,t,n){var a=(0,s.Z)(e)?r:u,c=arguments.length<3;return a(e,(0,o.Z)(t,4),n,c,i.Z)}}}]);