@amplitude/analytics-browser 2.49.0 → 2.49.2-sr-bfcache-pageshow-snapshot.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/lib/cjs/config.d.ts +1 -1
- package/lib/cjs/config.d.ts.map +1 -1
- package/lib/cjs/snippet-index-lite.d.ts +2 -0
- package/lib/cjs/snippet-index-lite.d.ts.map +1 -0
- package/lib/cjs/snippet-index-lite.js +55 -0
- package/lib/cjs/snippet-index-lite.js.map +1 -0
- package/lib/cjs/version.d.ts +1 -1
- package/lib/cjs/version.d.ts.map +1 -1
- package/lib/cjs/version.js +1 -1
- package/lib/cjs/version.js.map +1 -1
- package/lib/esm/config.d.ts +1 -1
- package/lib/esm/config.d.ts.map +1 -1
- package/lib/esm/snippet-index-lite.d.ts +2 -0
- package/lib/esm/snippet-index-lite.d.ts.map +1 -0
- package/lib/esm/snippet-index-lite.js +52 -0
- package/lib/esm/snippet-index-lite.js.map +1 -0
- package/lib/esm/version.d.ts +1 -1
- package/lib/esm/version.d.ts.map +1 -1
- package/lib/esm/version.js +1 -1
- package/lib/esm/version.js.map +1 -1
- package/lib/scripts/amplitude-bookmarklet-snippet-min.js +1 -1
- package/lib/scripts/amplitude-bookmarklet.html +1 -1
- package/lib/scripts/amplitude-gtm-min.js +1 -1
- package/lib/scripts/amplitude-gtm-min.js.gz +0 -0
- package/lib/scripts/amplitude-gtm-min.js.map +1 -1
- package/lib/scripts/amplitude-gtm-snippet-min.js +1 -1
- package/lib/scripts/amplitude-lite-min.js +2 -0
- package/lib/scripts/amplitude-lite-min.js.gz +0 -0
- package/lib/scripts/amplitude-lite-min.js.map +1 -0
- package/lib/scripts/amplitude-min.js +1 -1
- package/lib/scripts/amplitude-min.js.gz +0 -0
- package/lib/scripts/amplitude-min.js.map +1 -1
- package/lib/scripts/amplitude-min.umd.js +1 -1
- package/lib/scripts/amplitude-min.umd.js.gz +0 -0
- package/lib/scripts/amplitude-snippet-instructions.html +1 -1
- package/lib/scripts/amplitude-snippet-min.js +1 -1
- package/lib/scripts/config.d.ts +1 -1
- package/lib/scripts/config.d.ts.map +1 -1
- package/lib/scripts/snippet-index-lite.d.ts +2 -0
- package/lib/scripts/snippet-index-lite.d.ts.map +1 -0
- package/lib/scripts/version.d.ts +1 -1
- package/lib/scripts/version.d.ts.map +1 -1
- package/package.json +8 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(){"use strict";!function(e,t){var r=e.amplitudeGTM||{_q:[],_iq:{}};if(r.invoked)e.console&&console.error&&console.error("Amplitude snippet has been loaded.");else{var n=function(e,t){e.prototype[t]=function(){return this._q.push({name:t,args:Array.prototype.slice.call(arguments,0)}),this}},s=function(e,t,r){return function(n){e._q.push({name:t,args:Array.prototype.slice.call(r,0),resolve:n})}},
|
|
1
|
+
!function(){"use strict";!function(e,t){var r=e.amplitudeGTM||{_q:[],_iq:{}};if(r.invoked)e.console&&console.error&&console.error("Amplitude snippet has been loaded.");else{var n=function(e,t){e.prototype[t]=function(){return this._q.push({name:t,args:Array.prototype.slice.call(arguments,0)}),this}},s=function(e,t,r){return function(n){e._q.push({name:t,args:Array.prototype.slice.call(r,0),resolve:n})}},o=function(e,t,r){e[t]=function(){if(r)return{promise:new Promise(s(e,t,Array.prototype.slice.call(arguments)))};!function(e,t,r){e._q.push({name:t,args:Array.prototype.slice.call(r,0)})}(e,t,Array.prototype.slice.call(arguments))}},i=function(e){for(var t=0;t<m.length;t++)o(e,m[t],!1);for(var r=0;r<v.length;r++)o(e,v[r],!0)};r.invoked=!0;var a=t.createElement("script");a.type="text/javascript",a.integrity="sha384-TeX7LhaXdUo9w404KPBwSb0Gx8+hjtNqbsA/OhhiCbeMMb4XijS6CcSMyutxoIU8",a.crossOrigin="anonymous",a.async=!0,a.src="https://cdn.amplitude.com/libs/analytics-browser-gtm-2.49.2-sr-bfcache-pageshow-snapshot.0-min.js.gz",a.onload=function(){e.amplitudeGTM.runQueuedFunctions||console.log("[Amplitude] Error: could not load SDK")};var c=t.getElementsByTagName("script")[0];c.parentNode.insertBefore(a,c);for(var u=function(){return this._q=[],this},p=["add","append","clearAll","prepend","set","setOnce","unset","preInsert","postInsert","remove","getUserProperties"],l=0;l<p.length;l++)n(u,p[l]);r.Identify=u;for(var d=function(){return this._q=[],this},f=["getEventProperties","setProductId","setQuantity","setPrice","setRevenue","setRevenueType","setReceipt","setReceiptSig","setCurrency","setEventProperties"],h=0;h<f.length;h++)n(d,f[h]);r.Revenue=d;var m=["getDeviceId","setDeviceId","getSessionId","setSessionId","getUserId","setUserId","setOptOut","setTransport","reset","extendSession"],v=["init","add","remove","track","logEvent","identify","groupIdentify","setGroup","revenue","flush"];i(r),r.createInstance=function(e){return r._iq[e]={_q:[]},i(r._iq[e]),r._iq[e]},e.amplitudeGTM=r,e.amplitude||(e.amplitude=e.amplitudeGTM)}}(window,document)}();
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
!function(){"use strict";function e(e,t){return t.forEach(function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach(function(n){if("default"!==n&&!(n in e)){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}})}),Object.freeze(e)}var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},t(e,n)};function n(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}var i,r,o=function(){return o=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},o.apply(this,arguments)};function s(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n}function u(e,t,n,i){return new(n||(n=Promise))(function(r,o){function s(e){try{a(i.next(e))}catch(e){o(e)}}function u(e){try{a(i.throw(e))}catch(e){o(e)}}function a(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,u)}a((i=i.apply(e,t||[])).next())})}function a(e,t){var n,i,r,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=u(0),s.throw=u(1),s.return=u(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function u(u){return function(a){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,u[0]&&(o=0)),o;)try{if(n=1,i&&(r=2&u[0]?i.return:u[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,u[1])).done)return r;switch(i=0,r&&(u=[2&u[0],r.value]),u[0]){case 0:case 1:r=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,i=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(!(r=o.trys,(r=r.length>0&&r[r.length-1])||6!==u[0]&&2!==u[0])){o=0;continue}if(3===u[0]&&(!r||u[1]>r[0]&&u[1]<r[3])){o.label=u[1];break}if(6===u[0]&&o.label<r[1]){o.label=r[1],r=u;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(u);break}r[2]&&o.ops.pop(),o.trys.pop();continue}u=t.call(e,o)}catch(e){u=[6,e],i=0}finally{n=r=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,a])}}}function c(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function l(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,r,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)s.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return s}function d(e,t,n){if(n||2===arguments.length)for(var i,r=0,o=t.length;r<o;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError,function(e){e.SET="$set",e.SET_ONCE="$setOnce",e.ADD="$add",e.APPEND="$append",e.PREPEND="$prepend",e.REMOVE="$remove",e.PREINSERT="$preInsert",e.POSTINSERT="$postInsert",e.UNSET="$unset",e.CLEAR_ALL="$clearAll"}(i||(i={})),function(e){e.IDENTIFY="$identify",e.GROUP_IDENTIFY="$groupidentify",e.REVENUE="revenue_amount"}(r||(r={}));var p,f="AMP",h="".concat(f,"_unsent"),v="$default_instance",g="https://api2.amplitude.com/2/httpapi",y="https://api.eu.amplitude.com/2/httpapi",m="https://api2.amplitude.com/batch",b="https://api.eu.amplitude.com/batch",I=function(e){if(Object.keys(e).length>1e3)return!1;for(var t in e){var n=e[t];if(!S(t,n))return!1}return!0},S=function(e,t){var n,i;if("string"!=typeof e)return!1;if(Array.isArray(t)){var r=!0;try{for(var o=c(t),s=o.next();!s.done;s=o.next()){var u=s.value;if(Array.isArray(u))return!1;if("object"==typeof u)r=r&&I(u);else if(!["number","string"].includes(typeof u))return!1;if(!r)return!1}}catch(e){n={error:e}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}}else{if(null==t)return!1;if("object"==typeof t)return I(t);if(!["number","string","boolean"].includes(typeof t))return!1}return!0},E=function(){function e(){this._propertySet=new Set,this._properties={}}return e.prototype.getUserProperties=function(){return o({},this._properties)},e.prototype.set=function(e,t){return this._safeSet(p.SET,e,t),this},e.prototype.setOnce=function(e,t){return this._safeSet(p.SET_ONCE,e,t),this},e.prototype.append=function(e,t){return this._safeSet(p.APPEND,e,t),this},e.prototype.prepend=function(e,t){return this._safeSet(p.PREPEND,e,t),this},e.prototype.postInsert=function(e,t){return this._safeSet(p.POSTINSERT,e,t),this},e.prototype.preInsert=function(e,t){return this._safeSet(p.PREINSERT,e,t),this},e.prototype.remove=function(e,t){return this._safeSet(p.REMOVE,e,t),this},e.prototype.add=function(e,t){return this._safeSet(p.ADD,e,t),this},e.prototype.unset=function(e){return this._safeSet(p.UNSET,e,"-"),this},e.prototype.clearAll=function(){return this._properties={},this._properties[p.CLEAR_ALL]="-",this},e.prototype._safeSet=function(e,t,n){if(this._validate(e,t,n)){var i=this._properties[e];return void 0===i&&(i={},this._properties[e]=i),i[t]=n,this._propertySet.add(t),!0}return!1},e.prototype._validate=function(e,t,n){return void 0===this._properties[p.CLEAR_ALL]&&(!this._propertySet.has(t)&&(e===p.ADD?"number"==typeof n:e===p.UNSET||e===p.REMOVE||S(t,n)))},e}();!function(e){e.SET="$set",e.SET_ONCE="$setOnce",e.ADD="$add",e.APPEND="$append",e.PREPEND="$prepend",e.REMOVE="$remove",e.PREINSERT="$preInsert",e.POSTINSERT="$postInsert",e.UNSET="$unset",e.CLEAR_ALL="$clearAll"}(p||(p={}));var _,O=[p.CLEAR_ALL,p.UNSET,p.SET,p.SET_ONCE,p.ADD,p.APPEND,p.PREPEND,p.PREINSERT,p.POSTINSERT,p.REMOVE],w="Event skipped due to empty event type";!function(e){e.Unknown="unknown",e.Skipped="skipped",e.Success="success",e.RateLimit="rate_limit",e.PayloadTooLarge="payload_too_large",e.Invalid="invalid",e.Failed="failed",e.Timeout="Timeout",e.SystemError="SystemError"}(_||(_={}));var P=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=_.Unknown),{event:e,code:t,message:n}},k=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:"undefined"!=typeof global?global:void 0},R=d([],l(Array(256).keys()),!1).map(function(e){return e.toString(16).padStart(2,"0")}),T=function(e){var t,n=k();if(!(null===(t=null==n?void 0:n.crypto)||void 0===t?void 0:t.getRandomValues))return 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,T)}(e);var i=n.crypto.getRandomValues(new Uint8Array(16));return i[6]=15&i[6]|64,i[8]=63&i[8]|128,d([],l(i.entries()),!1).map(function(e){var t=l(e,2),n=t[0],i=t[1];return[4,6,8,10].includes(n)?"-".concat(R[i]):R[i]}).join("")},C={},D={get exports(){return C},set exports(e){C=e}},L=Object.prototype.hasOwnProperty;function U(e){return"[Throws: "+(e?e.message:"?")+"]"}function N(e){var t=[];return function e(n){if(null===n||"object"!=typeof n)return n;if(-1!==t.indexOf(n))return"[Circular]";if(t.push(n),"function"==typeof n.toJSON)try{var i=e(n.toJSON());return t.pop(),i}catch(e){return U(e)}if(Array.isArray(n)){var r=n.map(e);return t.pop(),r}var o=Object.keys(n).reduce(function(t,i){return t[i]=e(function(e,t){if(L.call(e,t))try{return e[t]}catch(e){return U(e)}return e[t]}(n,i)),t},{});return t.pop(),o}(e)}D.exports=function(e,t,n){return JSON.stringify(N(e),t,n)};var x,A=C.ensureProperties=N,j=C||e({__proto__:null,ensureProperties:A,get default(){return C}},[C]),q=function(){function e(e){this.client=e,this.queue=[],this.applying=!1,this.plugins=[],this.pluginStatus=new Map,this._optOutListeners=[]}return e.prototype.register=function(e,t){var n,i;return u(this,void 0,void 0,function(){var r;return a(this,function(o){switch(o.label){case 0:return void 0===e.name&&(e.name=T(),this.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."))),r=e.name,this.pluginStatus.has(r)?(this.loggerProvider.warn("Plugin with name ".concat(r," already exists, skipping registration")),[2]):(e.type=null!==(n=e.type)&&void 0!==n?n:"enrichment",this.pluginStatus.set(r,"locked"),[4,null===(i=e.setup)||void 0===i?void 0:i.call(e,t,this.client)]);case 1:return o.sent(),"locked"!==this.pluginStatus.get(r)?[2]:(this.plugins.push(e),this.pluginStatus.set(r,"installed"),[2])}})})},e.prototype.deregister=function(e,t){var n;return u(this,void 0,void 0,function(){var i,r;return a(this,function(o){switch(o.label){case 0:return this.pluginStatus.delete(e),i=this.plugins.findIndex(function(t){return t.name===e}),-1===i?(t.loggerProvider.warn("Plugin with name ".concat(e," does not exist, skipping deregistration")),[2]):(r=this.plugins[i],this.plugins.splice(i,1),[4,null===(n=r.teardown)||void 0===n?void 0:n.call(r)]);case 1:return o.sent(),[2]}})})},e.prototype.reset=function(e){this._clearOptOutListeners(),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.pluginStatus.clear(),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 u(this,void 0,void 0,function(){var t,n,i,r,s,u,d,p,f,h,v,g,y,m,b,I,S,E,_,O;return a(this,function(a){switch(a.label){case 0:if(!e)return[2];t=l(e,1),n=t[0],i=l(e,2),r=i[1],this.loggerProvider.log("Timeline.apply: Initial event",n),s=this.plugins.filter(function(e){return"before"===e.type}),a.label=1;case 1:a.trys.push([1,6,7,8]),u=c(s),d=u.next(),a.label=2;case 2:return d.done?[3,5]:(g=d.value).execute?[4,g.execute(o({},n))]:[3,4];case 3:if(null===(y=a.sent()))return this.loggerProvider.log("Timeline.apply: Event filtered out by before plugin '".concat(String(g.name),"', event: ").concat(j(n))),r({event:n,code:0,message:""}),[2];n=y,this.loggerProvider.log("Timeline.apply: Event after before plugin '".concat(String(g.name),"', event: ").concat(j(n))),a.label=4;case 4:return d=u.next(),[3,2];case 5:return[3,8];case 6:return p=a.sent(),S={error:p},[3,8];case 7:try{d&&!d.done&&(E=u.return)&&E.call(u)}finally{if(S)throw S.error}return[7];case 8:f=this.plugins.filter(function(e){return"enrichment"===e.type||void 0===e.type}),a.label=9;case 9:a.trys.push([9,14,15,16]),h=c(f),v=h.next(),a.label=10;case 10:return v.done?[3,13]:(g=v.value).execute?[4,g.execute(o({},n))]:[3,12];case 11:if(null===(y=a.sent()))return this.loggerProvider.log("Timeline.apply: Event filtered out by enrichment plugin '".concat(String(g.name),"', event: ").concat(j(n))),r({event:n,code:0,message:""}),[2];n=y,this.loggerProvider.log("Timeline.apply: Event after enrichment plugin '".concat(String(g.name),"', event: ").concat(j(n))),a.label=12;case 12:return v=h.next(),[3,10];case 13:return[3,16];case 14:return m=a.sent(),_={error:m},[3,16];case 15:try{v&&!v.done&&(O=h.return)&&O.call(h)}finally{if(_)throw _.error}return[7];case 16:return b=this.plugins.filter(function(e){return"destination"===e.type}),this.loggerProvider.log("Timeline.apply: Final event before destinations, event: ".concat(j(n))),I=b.map(function(e){var t=o({},n);return e.execute(t).catch(function(e){return P(t,0,String(e))})}),Promise.all(I).then(function(e){var t=l(e,1)[0]||P(n,100,"Event not tracked, no destination plugins on the instance");r(t)}),[2]}})})},e.prototype.flush=function(){return u(this,void 0,void 0,function(){var e,t,n,i=this;return a(this,function(r){switch(r.label){case 0:return e=this.queue,this.queue=[],[4,Promise.all(e.map(function(e){return i.apply(e)}))];case 1:return r.sent(),t=this.plugins.filter(function(e){return"destination"===e.type}),n=t.map(function(e){return e.flush&&e.flush()}),[4,Promise.all(n)];case 2:return r.sent(),[2]}})})},e.prototype.addOptOutListener=function(e){this._optOutListeners.push(e)},e.prototype._clearOptOutListeners=function(){this._optOutListeners=[]},e.prototype.onIdentityChanged=function(e){this.plugins.forEach(function(t){var n;null===(n=t.onIdentityChanged)||void 0===n||n.call(t,e)})},e.prototype.onSessionIdChanged=function(e){this.plugins.forEach(function(t){var n;null===(n=t.onSessionIdChanged)||void 0===n||n.call(t,e)})},e.prototype.onOptOutChanged=function(e){this.plugins.forEach(function(t){var n;null===(n=t.onOptOutChanged)||void 0===n||n.call(t,e)}),this._callOptOutListeners(e)},e.prototype._callOptOutListeners=function(e){return u(this,void 0,void 0,function(){var t,n,i,r,o,s,u;return a(this,function(a){switch(a.label){case 0:a.trys.push([0,7,8,9]),t=c(this._optOutListeners),n=t.next(),a.label=1;case 1:if(n.done)return[3,6];i=n.value,a.label=2;case 2:return a.trys.push([2,4,,5]),[4,i(e)];case 3:return a.sent(),[3,5];case 4:return r=a.sent(),this.loggerProvider.error("Error calling optOut listener",r),[3,5];case 5:return n=t.next(),[3,1];case 6:return[3,9];case 7:return o=a.sent(),s={error:o},[3,9];case 8:try{n&&!n.done&&(u=t.return)&&u.call(t)}finally{if(s)throw s.error}return[7];case 9:return[2]}})})},e.prototype.onReset=function(){this.plugins.forEach(function(e){var t;null===(t=e.onReset)||void 0===t||t.call(e)})},e}(),M=function(e,t){return o(o({},t),{event_type:r.IDENTIFY,user_properties:e.getUserProperties()})},F=function(e){return{promise:e||Promise.resolve()}},V=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 q(this),this.name=e}return e.prototype._init=function(e){return u(this,void 0,void 0,function(){var t=this;return a(this,function(n){switch(n.label){case 0:return this.config=e,this.timeline.reset(this),this.timeline.loggerProvider=this.config.loggerProvider,[4,this.runQueuedFunctions("q",function(){return t.isReady=!0})];case 1:return n.sent(),[2]}})})},e.prototype.runQueuedFunctions=function(e,t){return u(this,void 0,void 0,function(){var n,i,r,o,s,u,l,d;return a(this,function(a){switch(a.label){case 0:n=this[e],this[e]=[],a.label=1;case 1:a.trys.push([1,8,9,10]),i=c(n),r=i.next(),a.label=2;case 2:return r.done?[3,7]:(o=r.value,(s=o())&&"promise"in s?[4,s.promise]:[3,4]);case 3:return a.sent(),[3,6];case 4:return[4,s];case 5:a.sent(),a.label=6;case 6:return r=i.next(),[3,2];case 7:return[3,10];case 8:return u=a.sent(),l={error:u},[3,10];case 9:try{r&&!r.done&&(d=i.return)&&d.call(i)}finally{if(l)throw l.error}return[7];case 10:return this[e].length?[4,this.runQueuedFunctions(e,t)]:[3,12];case 11:return a.sent(),[3,13];case 12:null==t||t(),a.label=13;case 13:return[2]}})})},e.prototype.track=function(e,t,n){var i=function(e,t,n){return o(o(o({},"string"==typeof e?{event_type:e}:e),n),t&&{event_properties:t})}(e,t,n);return this.userProperties=this.getOperationAppliedUserProperties(i.user_properties),F(this.dispatch(i))},e.prototype.identify=function(e,t){var n=M(e,t);return this.userProperties=this.getOperationAppliedUserProperties(n.user_properties),F(this.dispatch(n))},e.prototype.groupIdentify=function(e,t,n,i){var s=function(e,t,n,i){var s;return o(o({},i),{event_type:r.GROUP_IDENTIFY,group_properties:n.getUserProperties(),groups:(s={},s[e]=t,s)})}(e,t,n,i);return F(this.dispatch(s))},e.prototype.setGroup=function(e,t,n){var i=function(e,t,n){var i,s=new E;return s.set(e,t),o(o({},n),{event_type:r.IDENTIFY,user_properties:s.getUserProperties(),groups:(i={},i[e]=t,i)})}(e,t,n);return this.userProperties=this.getOperationAppliedUserProperties(i.user_properties),F(this.dispatch(i))},e.prototype.revenue=function(e,t){var n=function(e,t){return o(o({},t),{event_type:r.REVENUE,event_properties:e.getEventProperties()})}(e,t);return F(this.dispatch(n))},e.prototype.add=function(e){return this.isReady?this._addPlugin(e):(this.q.push(this._addPlugin.bind(this,e)),F())},e.prototype._addPlugin=function(e){return F(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)),F())},e.prototype._removePlugin=function(e){return F(this.timeline.deregister(e,this.config))},e.prototype.dispatchWithCallback=function(e,t){if(!this.isReady)return t(P(e,0,"Client not initialized"));this.process(e).then(t)},e.prototype.dispatch=function(e){return u(this,void 0,void 0,function(){var t=this;return a(this,function(n){return this.isReady?[2,this.process(e)]:[2,new Promise(function(n){t.dispatchQ.push(t.dispatchWithCallback.bind(t,e,n))})]})})},e.prototype.getOperationAppliedUserProperties=function(e){var t,n=null!==(t=this.userProperties)&&void 0!==t?t:{},r=o({},n);if(void 0===e)return r;var s={};return Object.keys(e).forEach(function(t){Object.values(i).includes(t)||(s[t]=e[t])}),O.forEach(function(t){if(Object.keys(e).includes(t)){var n=e[t];switch(t){case i.CLEAR_ALL:Object.keys(r).forEach(function(e){delete r[e]});break;case i.UNSET:Object.keys(n).forEach(function(e){delete r[e]});break;case i.SET:Object.assign(r,n)}}}),Object.assign(r,s),r},e.prototype.process=function(e){return u(this,void 0,void 0,function(){var t,n,i,o;return a(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),this.config.optOut?[2,P(e,0,"Event skipped due to optOut config")]:"string"!=typeof(t=e.event_type)||0===t.trim().length?(this.config.loggerProvider.error(w),[2,P(e,0,w)]):(e.event_type===r.IDENTIFY&&this.timeline.onIdentityChanged({userProperties:this.userProperties}),[4,this.timeline.push(e)]);case 1:return 200===(o=s.sent()).code?this.config.loggerProvider.log(o.message):100===o.code?this.config.loggerProvider.warn(o.message):this.config.loggerProvider.error(o.message),[2,o];case 2:return n=s.sent(),i=String(n),this.config.loggerProvider.error(i),[2,o=P(e,0,i)];case 3:return[2]}})})},e.prototype.setOptOut=function(e){this.isReady?this._setOptOut(e):this.q.push(this._setOptOut.bind(this,Boolean(e)))},e.prototype._setOptOut=function(e){this.config.optOut!==e&&(this.config.optOut=Boolean(e),this.timeline.onOptOutChanged(e))},e.prototype.flush=function(){return F(this.timeline.flush())},e.prototype.plugin=function(e){var t=this.timeline.plugins.find(function(t){return t.name===e});if(void 0!==t)return t;this.config.loggerProvider.debug("Cannot find plugin with name ".concat(e))},e.prototype.plugins=function(e){return this.timeline.plugins.filter(function(t){return t instanceof e})},e}(),$=function(){function e(){this.productId="",this.quantity=1,this.price=0}return e.prototype.setProductId=function(e){return this.productId=e,this},e.prototype.setQuantity=function(e){return e>0&&(this.quantity=e),this},e.prototype.setPrice=function(e){return this.price=e,this},e.prototype.setRevenueType=function(e){return this.revenueType=e,this},e.prototype.setCurrency=function(e){return this.currency=e,this},e.prototype.setRevenue=function(e){return this.revenue=e,this},e.prototype.setReceipt=function(e){return this.receipt=e,this},e.prototype.setReceiptSig=function(e){return this.receiptSig=e,this},e.prototype.setEventProperties=function(e){try{var t=JSON.parse(JSON.stringify(e));I(t)&&(this.properties=t)}catch(e){}return this},e.prototype.getEventProperties=function(){var e=this.properties?o({},this.properties):{};return e[x.REVENUE_PRODUCT_ID]=this.productId,e[x.REVENUE_QUANTITY]=this.quantity,e[x.REVENUE_PRICE]=this.price,e[x.REVENUE_TYPE]=this.revenueType,e[x.REVENUE_CURRENCY]=this.currency,e[x.REVENUE]=this.revenue,e[x.RECEIPT]=this.receipt,e[x.RECEIPT_SIG]=this.receiptSig,e},e}();!function(e){e.REVENUE_PRODUCT_ID="$productId",e.REVENUE_QUANTITY="$quantity",e.REVENUE_PRICE="$price",e.REVENUE_TYPE="$revenueType",e.REVENUE_CURRENCY="$currency",e.REVENUE="$revenue",e.RECEIPT="$receipt",e.RECEIPT_SIG="$receiptSig"}(x||(x={}));var z;!function(e){e[e.None=0]="None",e[e.Error=1]="Error",e[e.Warn=2]="Warn",e[e.Verbose=3]="Verbose",e[e.Debug=4]="Debug"}(z||(z={}));var K="Amplitude Logger ",B=function(){function e(){this.logLevel=z.None}return e.prototype.disable=function(){this.logLevel=z.None},e.prototype.enable=function(e){void 0===e&&(e=z.Warn),this.logLevel=e},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<z.Verbose||console.log("".concat(K,"[Log]: ").concat(e.join(" ")))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<z.Warn||console.warn("".concat(K,"[Warn]: ").concat(e.join(" ")))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<z.Error||console.error("".concat(K,"[Error]: ").concat(e.join(" ")))},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<z.Debug||console.log("".concat(K,"[Debug]: ").concat(e.join(" ")))},e}(),W=function(e){return void 0===e||""===e?v:e},Q=function(){return{flushMaxRetries:12,flushQueueSize:200,flushIntervalMillis:1e4,instanceName:v,logLevel:z.Warn,loggerProvider:new B,offline:!1,optOut:!1,serverUrl:g,serverZone:"US",useBatch:!1}},J=function(){function e(e){var t,n,i,r;this._optOut=!1;var o=Q();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=W(e.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!==(i=e.optOut)&&void 0!==i?i:o.optOut,this.serverUrl=e.serverUrl,this.serverZone=e.serverZone||o.serverZone,this.storageProvider=e.storageProvider,this.transportProvider=e.transportProvider,this.useBatch=null!==(r=e.useBatch)&&void 0!==r?r:o.useBatch,this.loggerProvider.enable(this.logLevel);var s=G(e.serverUrl,e.serverZone,e.useBatch);this.serverZone=s.serverZone,this.serverUrl=s.serverUrl}return Object.defineProperty(e.prototype,"optOut",{get:function(){return this._optOut},set:function(e){this._optOut=e},enumerable:!1,configurable:!0}),e}(),Z=function(e,t){return"EU"===e?t?b:y:t?m:g},G=function(e,t,n){if(void 0===e&&(e=""),void 0===t&&(t=Q().serverZone),void 0===n&&(n=Q().useBatch),e)return{serverUrl:e,serverZone:void 0};var i=["US","EU"].includes(t)?t:Q().serverZone;return{serverZone:i,serverUrl:Z(i,n)}},Y=function(){function e(){this.sdk={metrics:{histogram:{}}}}return e.prototype.recordHistogram=function(e,t){this.sdk.metrics.histogram[e]=t},e}();function H(e){return e>=200&&e<300}var X=function(e){return void 0===e&&(e=0),((new Error).stack||"").split("\n").slice(2+e).map(function(e){return e.trim()})},ee=function(e){return function(){var t=o({},e.config);return{logger:t.loggerProvider,logLevel:t.logLevel}}},te=function(e,t){var n,i;t=(t=t.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"");try{for(var r=c(t.split(".")),o=r.next();!o.done;o=r.next()){var s=o.value;if(!(s in e))return;e=e[s]}}catch(e){n={error:e}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}return e},ne=function(e,t){return function(){var n,i,r={};try{for(var o=c(t),s=o.next();!s.done;s=o.next()){var u=s.value;r[u]=te(e,u)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return r}},ie=function(e,t,n,i,r){return void 0===r&&(r=null),function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];var u=n(),a=u.logger,c=u.logLevel;if(c&&c<z.Debug||!c||!a)return e.apply(r,o);var l={type:"invoke public method",name:t,args:o,stacktrace:X(1),time:{start:(new Date).toISOString()},states:{}};i&&l.states&&(l.states.before=i());var d=e.apply(r,o);return d&&d.promise?d.promise.then(function(){i&&l.states&&(l.states.after=i()),l.time&&(l.time.end=(new Date).toISOString()),a.debug(JSON.stringify(l,null,2))}):(i&&l.states&&(l.states.after=i()),l.time&&(l.time.end=(new Date).toISOString()),a.debug(JSON.stringify(l,null,2))),d}},re=new Set([g,y,m,b]);function oe(e){var t="";try{"body"in e&&(t=JSON.stringify(e.body,null,2))}catch(e){}return t}var se=function(){function e(e){this.name="amplitude",this.type="destination",this.retryTimeout=1e3,this.throttleTimeout=3e4,this.storageKey="",this.scheduleId=null,this.scheduledTimeout=0,this.flushId=null,this.queue=[],this.diagnosticsClient=null==e?void 0:e.diagnosticsClient}return e.prototype.setup=function(e){var t;return u(this,void 0,void 0,function(){var n,i=this;return a(this,function(r){switch(r.label){case 0:return this.config=e,this.storageKey="".concat(h,"_").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=r.sent())&&n.length>0&&Promise.all(n.map(function(e){return i.execute(e)})).catch(),[2,Promise.resolve(void 0)]}})})},e.prototype.execute=function(e){var t=this;return e.insert_id||(e.insert_id=T()),new Promise(function(n){var i={event:e,attempts:0,callback:function(e){return n(e)},timeout:0};t.queue.push(i),t.schedule(t.config.flushIntervalMillis),t.saveEvents()})},e.prototype.removeEventsExceedFlushMaxRetries=function(e){var t=this;return e.filter(function(e){return e.attempts+=1,e.attempts<t.config.flushMaxRetries||(t.fulfillRequest([e],500,"Event rejected due to exceeded retry count"),!1)})},e.prototype.scheduleEvents=function(e){var t=this;e.forEach(function(e){t.schedule(0===e.timeout?t.config.flushIntervalMillis:e.timeout)})},e.prototype.schedule=function(e){var t=this;if(!this.config.offline)return null===this.scheduleId||this.scheduleId&&e>this.scheduledTimeout?(this.scheduleId&&clearTimeout(this.scheduleId),this.scheduledTimeout=e,void(this.scheduleId=setTimeout(function(){t.queue=t.queue.map(function(e){return e.timeout=0,e}),t.flush(!0)},e))):void 0},e.prototype.resetSchedule=function(){this.scheduleId=null,this.scheduledTimeout=0},e.prototype.flush=function(e){return void 0===e&&(e=!1),u(this,void 0,void 0,function(){var t,n,i=this;return a(this,function(r){switch(r.label){case 0:return this.config.offline?(this.resetSchedule(),this.config.loggerProvider.debug("Skipping flush while offline."),[2]):this.flushId?(this.resetSchedule(),this.config.loggerProvider.debug("Skipping flush because previous flush has not resolved."),[2]):(this.flushId=this.scheduleId,this.resetSchedule(),t=[],n=[],this.queue.forEach(function(e){return 0===e.timeout?t.push(e):n.push(e)}),o=t,s=this.config.flushQueueSize,c=Math.max(s,1),[4,o.reduce(function(e,t,n){var i=Math.floor(n/c);return e[i]||(e[i]=[]),e[i].push(t),e},[]).reduce(function(t,n){return u(i,void 0,void 0,function(){return a(this,function(i){switch(i.label){case 0:return[4,t];case 1:return i.sent(),[4,this.send(n,e)];case 2:return[2,i.sent()]}})})},Promise.resolve())]);case 1:return r.sent(),this.flushId=null,this.scheduleEvents(this.queue),[2]}var o,s,c})})},e.prototype.send=function(e,t){var n;return void 0===t&&(t=!0),u(this,void 0,void 0,function(){var i,r,o,u,c,l;return a(this,function(a){switch(a.label){case 0:if(!this.config.apiKey)return[2,this.fulfillRequest(e,400,"Event rejected due to missing API key")];i={api_key:this.config.apiKey,events:e.map(function(e){var t=e.event;return t.extra,s(t,["extra"])}),options:{min_id_length:this.config.minIdLength},client_upload_time:(new Date).toISOString(),request_metadata:this.config.requestMetadata},this.config.requestMetadata=new Y,a.label=1;case 1:return a.trys.push([1,3,,4]),r=G(this.config.serverUrl,this.config.serverZone,this.config.useBatch).serverUrl,o=function(e,t){return void 0===t&&(t=!1),!!re.has(e)||t}(r,this.config.enableRequestBodyCompression),[4,this.config.transportProvider.send(r,i,o)];case 2:return null===(u=a.sent())?(this.fulfillRequest(e,0,"Unexpected error occurred"),[2]):t?(this.handleResponse(u,e),[3,4]):("body"in u?this.fulfillRequest(e,u.statusCode,"".concat(u.status,": ").concat(oe(u))):this.fulfillRequest(e,u.statusCode,u.status),[2]);case 3:return c=a.sent(),l=(d=c)instanceof Error?d.message:String(d),this.config.loggerProvider.error(l),null===(n=this.diagnosticsClient)||void 0===n||n.recordEvent("analytics.events.unsuccessful.from.catch.error",{events:e.map(function(e){return e.event.event_type}),message:l,stack_trace:X()}),this.handleResponse({status:_.Failed,statusCode:0},e),[3,4];case 4:return[2]}var d})})},e.prototype.handleResponse=function(e,t){var n;H(e.statusCode)||null===(n=this.diagnosticsClient)||void 0===n||n.recordEvent("analytics.events.unsuccessful",{events:t.map(function(e){return e.event.event_type}),code:e.statusCode,status:e.status,body:oe(e),stack_trace:X()});var i=e.status;switch(i){case _.Success:this.handleSuccessResponse(e,t);break;case _.Invalid:this.handleInvalidResponse(e,t);break;case _.PayloadTooLarge:this.handlePayloadTooLargeResponse(e,t);break;case _.RateLimit:this.handleRateLimitResponse(e,t);break;default:this.config.loggerProvider.warn("{code: 0, error: \"Status '".concat(i,"' 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);else{var i=d(d(d(d([],l(Object.values(e.body.eventsWithInvalidFields)),!1),l(Object.values(e.body.eventsWithMissingFields)),!1),l(Object.values(e.body.eventsWithInvalidIdLengths)),!1),l(e.body.silencedEvents),!1).flat(),r=new Set(i),o=t.filter(function(t,i){if(!r.has(i))return!0;n.fulfillRequest([t],e.statusCode,e.body.error)});o.length>0&&this.config.loggerProvider.warn(oe(e));var s=this.removeEventsExceedFlushMaxRetries(o);this.scheduleEvents(s)}},e.prototype.handlePayloadTooLargeResponse=function(e,t){if(1!==t.length){this.config.loggerProvider.warn(oe(e)),this.config.flushQueueSize/=2;var n=this.removeEventsExceedFlushMaxRetries(t);this.scheduleEvents(n)}else this.fulfillRequest(t,e.statusCode,e.body.error)},e.prototype.handleRateLimitResponse=function(e,t){var n=this,i=Object.keys(e.body.exceededDailyQuotaUsers),r=Object.keys(e.body.exceededDailyQuotaDevices),o=e.body.throttledEvents,s=new Set(i),u=new Set(r),a=new Set(o),c=t.filter(function(t,i){if(!(t.event.user_id&&s.has(t.event.user_id)||t.event.device_id&&u.has(t.event.device_id)))return a.has(i)&&(t.timeout=n.throttleTimeout),!0;n.fulfillRequest([t],e.statusCode,e.body.error)});c.length>0&&this.config.loggerProvider.warn(oe(e));var l=this.removeEventsExceedFlushMaxRetries(c);this.scheduleEvents(l)},e.prototype.handleOtherResponse=function(e){var t=this,n=e.map(function(e){return e.timeout=e.attempts*t.retryTimeout,e}),i=this.removeEventsExceedFlushMaxRetries(n);this.scheduleEvents(i)},e.prototype.fulfillRequest=function(e,t,n){var i,r,o;H(t)?null===(o=this.diagnosticsClient)||void 0===o||o.increment("analytics.events.sent",e.length):(null===(i=this.diagnosticsClient)||void 0===i||i.increment("analytics.events.dropped",e.length),null===(r=this.diagnosticsClient)||void 0===r||r.recordEvent("analytics.events.dropped",{events:e.map(function(e){return e.event.event_type}),code:t,message:n,stack_trace:X()})),this.removeEvents(e),e.forEach(function(e){return e.callback(P(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){var t=new Set(e);this.queue=this.queue.filter(function(e){return!t.has(e)}),this.saveEvents()},e}();class ue{getApplicationContext(){return{versionName:this.versionName,language:ae(),platform:"Web",os:void 0,deviceModel:void 0}}}const ae=()=>"undefined"!=typeof navigator&&(navigator.languages&&navigator.languages[0]||navigator.language)||"";class ce{constructor(){this.queue=[]}logEvent(e){this.receiver?this.receiver(e):this.queue.length<512&&this.queue.push(e)}setEventReceiver(e){this.receiver=e,this.queue.length>0&&(this.queue.forEach(t=>{e(t)}),this.queue=[])}}const le=(e,t)=>{const n=["string","number","boolean","undefined"],i=typeof e;if(i!==typeof t)return!1;for(const r of n)if(r===i)return e===t;if(null==e&&null==t)return!0;if(null==e||null==t)return!1;if(e.length!==t.length)return!1;const r=Array.isArray(e),o=Array.isArray(t);if(r!==o)return!1;if(!r||!o){const n=Object.keys(e).sort(),i=Object.keys(t).sort();if(!le(n,i))return!1;let r=!0;return Object.keys(e).forEach(n=>{le(e[n],t[n])||(r=!1)}),r}for(let n=0;n<e.length;n++)if(!le(e[n],t[n]))return!1;return!0};Object.entries||(Object.entries=function(e){const t=Object.keys(e);let n=t.length;const i=new Array(n);for(;n--;)i[n]=[t[n],e[t[n]]];return i});class de{constructor(){this.identity={userProperties:{}},this.listeners=new Set}editIdentity(){const e=this,t=Object.assign({},this.identity.userProperties),n=Object.assign(Object.assign({},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(e){return n.optOut=e,this},updateUserProperties:function(e){let t=n.userProperties||{};for(const[n,i]of Object.entries(e))switch(n){case"$set":for(const[e,n]of Object.entries(i))t[e]=n;break;case"$unset":for(const e of Object.keys(i))delete t[e];break;case"$clearAll":t={}}return n.userProperties=t,this},commit:function(){return e.setIdentity(n),this}}}getIdentity(){return Object.assign({},this.identity)}setIdentity(e){const t=Object.assign({},this.identity);this.identity=Object.assign({},e),le(t,this.identity)||this.listeners.forEach(t=>{t(e)})}addIdentityListener(e){this.listeners.add(e)}removeIdentityListener(e){this.listeners.delete(e)}}const pe="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:self;class fe{constructor(){this.identityStore=new de,this.eventBridge=new ce,this.applicationContextProvider=new ue}static getInstance(e){return pe.analyticsConnectorInstances||(pe.analyticsConnectorInstances={}),pe.analyticsConnectorInstances[e]||(pe.analyticsConnectorInstances[e]=new fe),pe.analyticsConnectorInstances[e]}}var he,ve=function(e){return fe.getInstance(W(e))},ge=function(){function e(){this.name="identity",this.type="before",this.identityStore=ve().identityStore}return e.prototype.execute=function(e){return u(this,void 0,void 0,function(){var t;return a(this,function(n){return(t=e.user_properties)&&this.identityStore.editIdentity().updateUserProperties(t).commit(),[2,e]})})},e.prototype.setup=function(e){return u(this,void 0,void 0,function(){return a(this,function(t){return e.instanceName&&(this.identityStore=ve(e.instanceName).identityStore),[2]})})},e}(),ye=function(e,t,n){return void 0===t&&(t=""),void 0===n&&(n=10),[f,t,e.substring(0,n)].filter(Boolean).join("_")},me=function(){var e,t,n,i;if("undefined"==typeof navigator)return"";var r=navigator.userLanguage;return null!==(i=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:r)&&void 0!==i?i:""},be=function(){var e,t=k();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),i=Ie(n[0]),r=Ie(n[1]);return r?(e[i]=r,e):e},{}):{}},Ie=function(e){void 0===e&&(e="");try{return decodeURIComponent(e)}catch(e){return""}},Se=function(){function e(){this.memoryStorage=new Map}return e.prototype.isEnabled=function(){return u(this,void 0,void 0,function(){return a(this,function(e){return[2,!0]})})},e.prototype.get=function(e){return u(this,void 0,void 0,function(){return a(this,function(t){return[2,this.memoryStorage.get(e)]})})},e.prototype.getRaw=function(e){return u(this,void 0,void 0,function(){var t;return a(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 u(this,void 0,void 0,function(){return a(this,function(n){return this.memoryStorage.set(e,t),[2]})})},e.prototype.remove=function(e){return u(this,void 0,void 0,function(){return a(this,function(t){return this.memoryStorage.delete(e),[2]})})},e.prototype.reset=function(){return u(this,void 0,void 0,function(){return a(this,function(e){return this.memoryStorage.clear(),[2]})})},e}(),Ee=function(){function e(e,t){void 0===t&&(t={}),this.options=o({},e),this.config=t}return e.prototype.isEnabled=function(){return u(this,void 0,void 0,function(){var t,n,i,r,s=this;return a(this,function(u){switch(u.label){case 0:return t="AMP_TEST",n=o({},this.options),i=new e(n),r=String(Date.now()),[4,i.transaction(t,function(e){var n,i;try{e.set(r);var o=e.get()===r;return!o&&s.config.diagnosticsClient&&(null===(n=s.config.diagnosticsClient)||void 0===n||n.recordEvent("cookies.isEnabled.failure",{reason:"Test Value mismatch",testKey:t,testValue:r,sync:!0})),o}catch(e){if(s.config.diagnosticsClient){var u=e instanceof Error?e.message:String(e);null===(i=s.config.diagnosticsClient)||void 0===i||i.recordEvent("cookies.isEnabled.failure",{reason:"Cookie getter/setter failed",testKey:t,testValue:r,error:u,sync:!0})}return!1}finally{e.set(null)}})];case 1:return[2,u.sent()]}})})},e.prototype.get=function(e){return u(this,void 0,void 0,function(){var t;return a(this,function(n){switch(n.label){case 0:return[4,this.getRaw(e)];case 1:return t=n.sent(),[2,this.decodeCookieValue(e,t)]}})})},e.prototype.decodeCookieValue=function(e,t){if(t)try{var n=_e(t);return void 0===n?void console.error("Amplitude Logger [Error]: Failed to decode cookie value for key: ".concat(e,", value: ").concat(t)):JSON.parse(n)}catch(n){return void console.error("Amplitude Logger [Error]: Failed to parse cookie value for key: ".concat(e,", value: ").concat(t))}},e.prototype.getSync=function(e){var t=this.getRawSync(e);return this.decodeCookieValue(e,t)},e.prototype.getRaw=function(e){var t,n;return u(this,void 0,void 0,function(){var i,r,o,s,u,l,d,p,f;return a(this,function(a){switch(a.label){case 0:i=k(),r=i,a.label=1;case 1:return a.trys.push([1,4,,5]),(o=null==r?void 0:r.cookieStore)?[4,o.getAll(e)]:[3,3];case 2:if(s=a.sent()){s.length>1&&(null===(t=this.config.diagnosticsClient)||void 0===t||t.recordEvent("cookies.duplicate",{cookies:s.map(function(e){return e.domain})}),null===(n=this.config.diagnosticsClient)||void 0===n||n.increment("cookies.duplicate.occurrence.cookieStore"));try{for(u=c(s),l=u.next();!l.done;l=u.next())if(d=l.value,Oe(d.domain,this.options.domain))return[2,d.value]}catch(e){p={error:e}}finally{try{l&&!l.done&&(f=u.return)&&f.call(u)}finally{if(p)throw p.error}}}a.label=3;case 3:return[3,5];case 4:return a.sent(),[3,5];case 5:return[2,this.getRawSync(e)]}})})},e.prototype.getRawSync=function(e){var t,n,i=this,r=k(),o=(null!==(n=null===(t=null==r?void 0:r.document)||void 0===t?void 0:t.cookie.split("; "))&&void 0!==n?n:[]).filter(function(t){return 0===t.indexOf(e+"=")}),s=void 0,u=this.config.duplicateResolverFn;if("function"==typeof u&&o.length>1&&(s=o.find(function(t){var n;try{var r=u(t.substring(e.length+1));return r||null===(n=i.config.diagnosticsClient)||void 0===n||n.increment("cookies.duplicate.occurrence.document.cookie"),r}catch(e){return!1}})),s||(s=o[0]),s)return s.substring(e.length+1)},e.prototype.set=function(e,t){return u(this,void 0,void 0,function(){return a(this,function(n){return this.setSync(e,t),[2]})})},e.prototype.setSync=function(e,t){var n;try{var i=k();if(!i||!i.document||"function"!=typeof i.btoa||"function"!=typeof i.encodeURIComponent)return;var r=null!==(n=this.options.expirationDays)&&void 0!==n?n:0,o=null!==t?r:-1,s=void 0;if(o){var u=new Date;u.setTime(u.getTime()+24*o*60*60*1e3),s=u}var a="".concat(e,"=").concat(i.btoa(i.encodeURIComponent(JSON.stringify(t))));s&&(a+="; expires=".concat(s.toUTCString())),a+="; path=/",this.options.domain&&(a+="; domain=".concat(this.options.domain)),this.options.secure&&(a+="; Secure"),this.options.sameSite&&(a+="; SameSite=".concat(this.options.sameSite)),i.document.cookie=a}catch(t){var c=t instanceof Error?t.message:String(t);console.error("Amplitude Logger [Error]: Failed to set cookie for key: ".concat(e,". Error: ").concat(c))}},e.prototype.remove=function(e){return u(this,void 0,void 0,function(){return a(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 u(this,void 0,void 0,function(){return a(this,function(e){return[2]})})},e.isDomainWritable=function(t){return u(this,void 0,void 0,function(){var n,i;return a(this,function(r){switch(r.label){case 0:if(e.cachedTlds[t])return[2,!0];n="AMP_TLDTEST",i=new e({domain:"."+t}),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,i.transaction(n,function(n){if(e.cachedTlds[t])return!0;try{n.set(1);var i=!!n.get();return i&&(e.cachedTlds[t]=!0),i}finally{n.set(null)}})];case 2:return[2,!!r.sent()];case 3:return r.sent(),[2,!1];case 4:return[2]}})})},e.prototype.transaction=function(e,t){return u(this,void 0,void 0,function(){var n,i,r=this;return a(this,function(o){switch(o.label){case 0:if(n=function(){var e,t=k();return null===(e=null==t?void 0:t.navigator)||void 0===e?void 0:e.locks}(),i=function(){return t({get:function(){return r.getSync(e)},set:function(t){return r.setSync(e,t)}})},!n)return[2,i()];o.label=1;case 1:return o.trys.push([1,3,,4]),[4,n.request("com.amplitude:cookie-lock:".concat(e),i)];case 2:return[2,o.sent()];case 3:return o.sent(),[2,i()];case 4:return[2]}})})},e.cachedTlds={},e}(),_e=function(e){var t;return null!==(t=function(e){try{return decodeURIComponent(atob(e))}catch(e){return}}(e))&&void 0!==t?t:function(e){try{return decodeURIComponent(atob(decodeURIComponent(e)))}catch(e){return}}(e)},Oe=function(e,t){if(""===e&&""===t)return!0;if(!e||!t)return!1;var n=e.startsWith(".")?e.substring(1):e,i=t.startsWith(".")?t.substring(1):t;return n.toLowerCase()===i.toLowerCase()},we=function(){function e(e){this.storage=e}return e.prototype.isEnabled=function(){return u(this,void 0,void 0,function(){var t,n,i;return a(this,function(r){switch(r.label){case 0:if(!this.storage)return[2,!1];t=String(Date.now()),n=new e(this.storage),i="AMP_TEST",r.label=1;case 1:return r.trys.push([1,4,5,7]),[4,n.set(i,t)];case 2:return r.sent(),[4,n.get(i)];case 3:return[2,r.sent()===t];case 4:return r.sent(),[2,!1];case 5:return[4,n.remove(i)];case 6:return r.sent(),[7];case 7:return[2]}})})},e.prototype.get=function(e){return u(this,void 0,void 0,function(){var t;return a(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.getRaw(e)];case 1:return(t=n.sent())?[2,JSON.parse(t)]:[2,void 0];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 u(this,void 0,void 0,function(){return a(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 u(this,void 0,void 0,function(){return a(this,function(i){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 u(this,void 0,void 0,function(){return a(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 u(this,void 0,void 0,function(){return a(this,function(t){try{null===(e=this.storage)||void 0===e||e.clear()}catch(e){}return[2]})})},e}(),Pe="__AMPLITUDE_SCRIPT_URL__",ke=function(e){var t=k();if(t){var n=function(){var e=k();if(!e)return[];var t=e[Pe];return Array.isArray(t)?t:"string"==typeof t?[t]:[]}();n.includes(e)||(n.push(e),t[Pe]=n)}},Re=function(e){var t,n;try{var i=new URL(e,null===(n=null===(t=k())||void 0===t?void 0:t.location)||void 0===n?void 0:n.origin);return i.origin+i.pathname}catch(e){return}},Te=function(){function e(){}return e.prototype.send=function(e,t,n){return Promise.resolve(null)},e.prototype.buildResponse=function(e){var t,n,i,r,o,s,u,a,c,l,d,p,f,h,v,g,y,m,b,I,S,E;if("object"!=typeof e)return null;var O=e.code||0,w=this.buildStatus(O);switch(w){case _.Success:return{status:w,statusCode:O,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!==(i=e.server_upload_time)&&void 0!==i?i:0}};case _.Invalid:return{status:w,statusCode:O,body:{error:null!==(r=e.error)&&void 0!==r?r:"",missingField:null!==(o=e.missing_field)&&void 0!==o?o:"",eventsWithInvalidFields:null!==(s=e.events_with_invalid_fields)&&void 0!==s?s:{},eventsWithMissingFields:null!==(u=e.events_with_missing_fields)&&void 0!==u?u:{},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!==(d=e.silenced_devices)&&void 0!==d?d:[],silencedEvents:null!==(p=e.silenced_events)&&void 0!==p?p:[],throttledDevices:null!==(f=e.throttled_devices)&&void 0!==f?f:{},throttledEvents:null!==(h=e.throttled_events)&&void 0!==h?h:[]}};case _.PayloadTooLarge:return{status:w,statusCode:O,body:{error:null!==(v=e.error)&&void 0!==v?v:""}};case _.RateLimit:return{status:w,statusCode:O,body:{error:null!==(g=e.error)&&void 0!==g?g:"",epsThreshold:null!==(y=e.eps_threshold)&&void 0!==y?y:0,throttledDevices:null!==(m=e.throttled_devices)&&void 0!==m?m:{},throttledUsers:null!==(b=e.throttled_users)&&void 0!==b?b:{},exceededDailyQuotaDevices:null!==(I=e.exceeded_daily_quota_devices)&&void 0!==I?I:{},exceededDailyQuotaUsers:null!==(S=e.exceeded_daily_quota_users)&&void 0!==S?S:{},throttledEvents:null!==(E=e.throttled_events)&&void 0!==E?E:[]}};case _.Timeout:default:return{status:w,statusCode:O}}},e.prototype.buildStatus=function(e){return H(e)?_.Success:429===e?_.RateLimit:413===e?_.PayloadTooLarge:408===e?_.Timeout:e>=400&&e<500?_.Invalid:e>=500?_.Failed:_.Unknown},e}();function Ce(){return"undefined"!=typeof CompressionStream}function De(e){return u(this,void 0,void 0,function(){var t,n;return a(this,function(i){switch(i.label){case 0:if(void 0===(t=CompressionStream))return[2,void 0];i.label=1;case 1:return i.trys.push([1,3,,4]),n=new Blob([e]).stream().pipeThrough(new t("gzip")),[4,new Response(n).arrayBuffer()];case 2:return[2,i.sent()];case 3:return i.sent(),[2,void 0];case 4:return[2]}})})}!function(e){e.US="US",e.EU="EU",e.STAGING="STAGING"}(he||(he={}));var Le=function(e,t){return"boolean"==typeof e?e:!1!==(null==e?void 0:e[t])&&(r=k(),"string"!=typeof(null===(i=null===(n=null==r?void 0:r.chrome)||void 0===n?void 0:n.runtime)||void 0===i?void 0:i.id)||!!(null==e?void 0:e[t]));var n,i,r},Ue=function(e){return t=e.defaultTracking,Le(t,"attribution")&&e.defaultTracking&&"object"==typeof e.defaultTracking&&e.defaultTracking.attribution&&"object"==typeof e.defaultTracking.attribution?o({},e.defaultTracking.attribution):{};var t},Ne=function(e,t){xe(e,t)},xe=function(e,t){for(var n=0;n<t.length;n++){var i=t[n],r=i.name,o=i.args,s=i.resolve,u=e&&e[r];if("function"==typeof u){var a=u.apply(e,o);"function"==typeof s&&s(null==a?void 0:a.promise)}}return e},Ae=function(e){return e&&void 0!==e._q},je="2.49.2-sr-bfcache-pageshow-snapshot.0",qe=function(){function e(){this.name="@amplitude/plugin-context-browser",this.type="before",this.library="".concat("amplitude-ts-sdk-script","/").concat(je),"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 u(this,void 0,void 0,function(){var i,r,s;return a(this,function(u){return i=(new Date).getTime(),r=null!==(t=this.config.lastEventId)&&void 0!==t?t:-1,s=null!==(n=e.event_id)&&void 0!==n?n:r+1,this.config.lastEventId=s,e.time||(this.config.lastEventTime=i),[2,o(o(o(o(o(o(o(o({user_id:this.config.userId,device_id:this.config.deviceId,session_id:this.config.sessionId,time:i},this.config.appVersion&&{app_version:this.config.appVersion}),this.config.trackingOptions.platform&&{platform:"Web"}),this.config.trackingOptions.language&&{language:me()}),this.config.trackingOptions.ipAddress&&{ip:"$remote"}),{insert_id:T(),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:s,library:this.library,user_agent:this.userAgent})]})})},e}(),Me=1e3,Fe=function(e){function t(t){var n,i,r,o=this;try{r=null===(n=k())||void 0===n?void 0:n.localStorage}catch(e){null===(i=null==t?void 0:t.loggerProvider)||void 0===i||i.debug("Failed to access localStorage. error=".concat(JSON.stringify(e))),r=void 0}return(o=e.call(this,r)||this).loggerProvider=null==t?void 0:t.loggerProvider,o}return n(t,e),t.prototype.set=function(t,n){var i;return u(this,void 0,void 0,function(){var r;return a(this,function(o){switch(o.label){case 0:return Array.isArray(n)&&n.length>Me?(r=n.length-Me,[4,e.prototype.set.call(this,t,n.slice(0,Me))]):[3,2];case 1:return o.sent(),null===(i=this.loggerProvider)||void 0===i||i.error("Failed to save ".concat(r," events because the queue length exceeded ").concat(Me,".")),[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}(we),Ve=function(e){function t(){var t;return e.call(this,null===(t=k())||void 0===t?void 0:t.sessionStorage)||this}return n(t,e),t}(we),$e=function(e){function t(t){void 0===t&&(t={});var n=e.call(this)||this;return n.state={done:4},n.customHeaders=t,n}return n(t,e),t.prototype.send=function(e,t,n){return void 0===n&&(n=!1),u(this,void 0,void 0,function(){var i=this;return a(this,function(r){return[2,new Promise(function(r,s){"undefined"==typeof XMLHttpRequest&&s(new Error("XHRTransport is not supported."));var d=new XMLHttpRequest;d.open("POST",e,!0),d.onreadystatechange=function(){if(d.readyState===i.state.done){var e=d.responseText;try{r(i.buildResponse(JSON.parse(e)))}catch(e){r(i.buildResponse({code:d.status}))}}};var p={"Content-Type":"application/json",Accept:"*/*"},f=JSON.stringify(t),h=n&&f.length>=2048&&Ce(),v=function(e){var t,n;p=o(o({},i.customHeaders),p);try{for(var r=c(Object.entries(p)),s=r.next();!s.done;s=r.next()){var u=l(s.value,2),a=u[0],f=u[1];d.setRequestHeader(a,f)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}d.send(e)};u(i,void 0,void 0,function(){var e;return a(this,function(t){switch(t.label){case 0:return h?[4,De(f)]:[3,2];case 1:return(e=t.sent())?(p["Content-Encoding"]="gzip",v(e)):v(f),[3,3];case 2:v(f),t.label=3;case 3:return[2]}})}).catch(s)})]})})},t}(Te),ze=function(e){function t(t,n,i){void 0===t&&(t={});var r=e.call(this)||this;return r.customHeaders=t,r.enableKeepalive=!1!==n,r.referrerPolicy=i,r}return n(t,e),t.prototype.send=function(e,t,n){return void 0===n&&(n=!1),u(this,void 0,void 0,function(){var i,r,s,u,c,l,d,p,f;return a(this,function(a){switch(a.label){case 0:if("undefined"==typeof fetch)throw new Error("FetchTransport is not supported");return i=JSON.stringify(t),r=n&&i.length>=2048&&Ce(),s=i,u={"Content-Type":"application/json",Accept:"*/*"},r?[4,De(i)]:[3,2];case 1:(c=a.sent())&&(u["Content-Encoding"]="gzip",s=c),a.label=2;case 2:return u=o(o({},this.customHeaders),u),l="string"==typeof s?s.length:s.byteLength,d={headers:u,body:s,method:"POST",keepalive:this.enableKeepalive&&l<=16384},this.referrerPolicy&&(d.referrerPolicy=this.referrerPolicy),[4,fetch(e,d)];case 3:return[4,(p=a.sent()).text()];case 4:f=a.sent();try{return[2,this.buildResponse(JSON.parse(f))]}catch(e){return[2,this.buildResponse({code:p.status})]}return[2]}})})},t}(Te),Ke=function(e){function t(){return e.call(this)||this}return n(t,e),t.prototype.send=function(e,t,n){return u(this,void 0,void 0,function(){var n=this;return a(this,function(i){return[2,new Promise(function(i,r){var o=k();if(!(null==o?void 0:o.navigator.sendBeacon))throw new Error("SendBeaconTransport is not supported");try{var s=JSON.stringify(t);return i(o.navigator.sendBeacon(e,s)?n.buildResponse({code:200,events_ingested:t.events.length,payload_size_bytes:s.length,server_upload_time:Date.now()}):n.buildResponse({code:500}))}catch(e){r(e)}})]})})},t}(Te),Be=function(e,t,n){return void 0===n&&(n=!0),u(void 0,void 0,void 0,function(){var i,r,o,s,u,c,d,p,h;return a(this,function(a){switch(a.label){case 0:return i=function(e){return"".concat(f.toLowerCase(),"_").concat(e.substring(0,6))}(e),[4,t.getRaw(i)];case 1:return(r=a.sent())?n?[4,t.remove(i)]:[3,3]:[2,{optOut:!1}];case 2:a.sent(),a.label=3;case 3:return o=l(r.split("."),6),s=o[0],u=o[1],c=o[2],d=o[3],p=o[4],h=o[5],[2,{deviceId:s,userId:Qe(u),sessionId:We(d),lastEventId:We(h),lastEventTime:We(p),optOut:Boolean(c)}]}})})},We=function(e){var t=parseInt(e,32);if(!isNaN(t))return t},Qe=function(e){if(atob&&escape&&e)try{return decodeURIComponent(escape(atob(e)))}catch(e){return}},Je="session_start",Ze="session_end",Ge="cookie",Ye=Object.freeze({__proto__:null,get IdentifyOperation(){return i},get SpecialEventType(){return r},get RevenueProperty(){return x},get LogLevel(){return z},get ServerZone(){return he},OfflineDisabled:null,DEFAULT_CSS_SELECTOR_ALLOWLIST:["a","button","input","select","textarea","label","video","audio",'[contenteditable="true" i]',"[data-amp-default-track]",".amp-default-track"],DEFAULT_DATA_ATTRIBUTE_PREFIX:"data-amp-track-",DEFAULT_ACTION_CLICK_ALLOWLIST:["div","span","h1","h2","h3","h4","h5","h6"],EXCLUDE_INTERNAL_REFERRERS_CONDITIONS:{always:"always",ifEmptyCampaign:"ifEmptyCampaign"}}),He=["ac.in","ac.jp","ac.kr","ac.th","ac.uk","ac.za","appspot.com","asn.au","azurewebsites.net","cloudfront.net","myshopify.com","blogspot.com","co.ca","co.in","co.jp","co.kr","co.nz","co.th","co.uk","co.za","com.ar","com.au","com.br","com.cn","com.hk","com.in","com.jp","com.kr","com.mx","com.pl","com.sg","com.tr","com.tw","ed.jp","edu.au","edu.br","edu.cn","edu.hk","edu.sg","edu.th","edu.tr","edu.tw","firebaseapp.com","fly.dev","gc.ca","geek.nz","github.io","gitlab.io","go.jp","go.kr","go.th","gob.ar","gob.mx","gov.au","gov.br","gov.cn","gov.hk","gov.in","gov.pl","gov.sg","gov.tr","gov.tw","gov.uk","gov.za","govt.nz","gr.jp","herokuapp.com","id.au","idv.hk","iwi.nz","lg.jp","ltd.uk","maori.nz","me.uk","mil.kr","ne.jp","ne.kr","net.au","net.br","net.cn","net.hk","net.in","net.nz","net.pl","net.sg","net.tr","net.tw","net.za","onrender.com","or.jp","or.kr","or.th","org.ar","org.au","org.br","org.cn","org.hk","org.in","org.mx","org.nz","org.pl","org.sg","org.tw","org.uk","org.za","pages.dev","pe.kr","plc.uk","re.kr","res.in","sch.uk","vercel.app","netlify.app","workers.dev"],Xe=function(e){function t(t,n,i,r,o,s,u,a,c,l,d,p,f,h,v,g,y,m,b,I,S,E,_,O,w,P,R,T,C,D,L,U,N,x,A,j,q,M,F,V,$,K,W,Q){void 0===i&&(i=new Se),void 0===r&&(r={domain:"",expiration:365,sameSite:"Lax",secure:!1,upgrade:!0}),void 0===a&&(a=1e3),void 0===c&&(c=5),void 0===l&&(l=30),void 0===d&&(d=Ge),void 0===g&&(g=new B),void 0===y&&(y=z.Warn),void 0===b&&(b=!1),void 0===I&&(I=!1),void 0===_&&(_=""),void 0===O&&(O="US"),void 0===R&&(R=18e5),void 0===T&&(T=new Fe({loggerProvider:g})),void 0===C&&(C={ipAddress:!0,language:!0,platform:!0}),void 0===D&&(D="fetch"),void 0===L&&(L=!1),void 0===U&&(U=!0),void 0===M&&(M=!0),void 0===F&&(F=0),void 0===W&&(W=!1);var J,Z=this;(Z=e.call(this,{apiKey:t,instanceName:f,storageProvider:T,transportProvider:nt(D)})||this).apiKey=t,Z.appVersion=n,Z.cookieOptions=r,Z.defaultTracking=o,Z.autocapture=s,Z.flushIntervalMillis=a,Z.flushMaxRetries=c,Z.flushQueueSize=l,Z.identityStorage=d,Z.ingestionMetadata=p,Z.loggerProvider=g,Z.logLevel=y,Z.minIdLength=m,Z.offline=b,Z.partnerId=S,Z.plan=E,Z.serverUrl=_,Z.serverZone=O,Z.sessionTimeout=R,Z.storageProvider=T,Z.trackingOptions=C,Z.transport=D,Z.useBatch=L,Z.fetchRemoteConfig=U,Z.networkTrackingOptions=j,Z.identify=q,Z.enableDiagnostics=M,Z.diagnosticsSampleRate=F,Z.diagnosticsClient=V,Z.remoteConfig=$,Z.topLevelDomain=K,Z.enableRequestBodyCompression=W,Z.customEnrichment=Q,Z.version=je,Z._optOut=!1,Z._cookieStorage=i,Z.deviceId=u,Z.lastEventId=h,Z.lastEventTime=v,Z.optOut=I,Z.deferredSessionId=P,Z.sessionId=w,Z.pageCounter=x,Z.userId=N,Z.debugLogsEnabled=A,Z.loggerProvider.enable(A?z.Debug:Z.logLevel),Z.networkTrackingOptions=j,Z.identify=q,Z.enableDiagnostics=M,Z.diagnosticsSampleRate=F,Z.diagnosticsClient=V;var G=null!==(J=null==$?void 0:$.fetchRemoteConfig)&&void 0!==J?J:U;return Z.remoteConfig=Z.remoteConfig||{},Z.remoteConfig.fetchRemoteConfig=G,Z.fetchRemoteConfig=G,Z.topLevelDomain=K||function(e){var t,n,i=e||(null===(n=null===(t=k())||void 0===t?void 0:t.location)||void 0===n?void 0:n.hostname);if(!i)return"";var r=i.split("."),o=r[r.length-1],s=r[r.length-2];return He.find(function(e){return i.endsWith(".".concat(e))})&&(o=r[r.length-2]+"."+r[r.length-1],s=r[r.length-3]),s?"".concat(s,".").concat(o):o}(),Z}return n(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,void 0!==e&&void 0!==this._deferredSessionId&&(this._deferredSessionId=void 0),this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"deferredSessionId",{get:function(){return this._deferredSessionId},set:function(e){this._deferredSessionId!==e&&e!==this.sessionId&&(this._deferredSessionId=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,deferredSessionId:this._deferredSessionId,optOut:this._optOut,lastEventTime:this._lastEventTime,lastEventId:this._lastEventId,pageCounter:this._pageCounter,debugLogsEnabled:this._debugLogsEnabled,cookieDomain:void 0};this.cookieStorage instanceof Ee&&(e.cookieDomain=this.cookieStorage.options.domain),this.cookieStorage.set(ye(this.apiKey),e)},t}(J),et=function(e,t,n,i,r){return void 0===t&&(t={}),u(void 0,void 0,void 0,function(){var s,u,c,l,d,p,f,h,v,g,y,m,b,I,S,E,_,O,w,P,k,R,C,D,L,U,N,x,A,j,q,M,F,V,$,z,K,B,W,Q,J,Z,G,Y,H,X,ee,te,ne,ie,re;return a(this,function(a){switch(a.label){case 0:return s=t.identityStorage||Ge,u="",s!==Ge||(null===(R=t.cookieOptions)||void 0===R?void 0:R.domain)||""===(null===(C=t.cookieOptions)||void 0===C?void 0:C.domain)?[3,2]:[4,it(void 0,i)];case 1:u=a.sent(),a.label=2;case 2:return c=o({domain:null!==(L=null===(D=t.cookieOptions)||void 0===D?void 0:D.domain)&&void 0!==L?L:u,expiration:365,sameSite:"Lax",secure:!1,upgrade:!0},t.cookieOptions),l={duplicateResolverFn:function(e){var t=_e(e);if(!t)return!1;var n=JSON.parse(t);return Oe(n.cookieDomain,c.domain)},diagnosticsClient:i},d=tt(t.identityStorage,c,l),[4,Be(e,d,null===(N=null===(U=t.cookieOptions)||void 0===U?void 0:U.upgrade)||void 0===N||N)];case 3:return p=a.sent(),[4,d.get(ye(e))];case 4:return f=a.sent(),h=be(),v=h.ampTimestamp?Number(h.ampTimestamp):void 0,g=!v||Date.now()<v,y=null!==(M=null!==(q=null!==(j=null!==(x=t.deviceId)&&void 0!==x?x:g?null!==(A=h.ampDeviceId)&&void 0!==A?A:h.deviceId:void 0)&&void 0!==j?j:null==f?void 0:f.deviceId)&&void 0!==q?q:p.deviceId)&&void 0!==M?M:T(),m=null!==(F=null==f?void 0:f.lastEventId)&&void 0!==F?F:p.lastEventId,b=null!==(V=null==f?void 0:f.lastEventTime)&&void 0!==V?V:p.lastEventTime,I=null!==(z=null!==($=t.optOut)&&void 0!==$?$:null==f?void 0:f.optOut)&&void 0!==z?z:p.optOut,S=null!==(K=null==f?void 0:f.sessionId)&&void 0!==K?K:p.sessionId,E=null==f?void 0:f.deferredSessionId,_=null!==(W=null!==(B=t.userId)&&void 0!==B?B:null==f?void 0:f.userId)&&void 0!==W?W:p.userId,n.previousSessionDeviceId=null!==(Q=null==f?void 0:f.deviceId)&&void 0!==Q?Q:p.deviceId,n.previousSessionUserId=null!==(J=null==f?void 0:f.userId)&&void 0!==J?J:p.userId,O={ipAddress:null===(G=null===(Z=t.trackingOptions)||void 0===Z?void 0:Z.ipAddress)||void 0===G||G,language:null===(H=null===(Y=t.trackingOptions)||void 0===Y?void 0:Y.language)||void 0===H||H,platform:null===(ee=null===(X=t.trackingOptions)||void 0===X?void 0:X.platform)||void 0===ee||ee},w=null==f?void 0:f.pageCounter,P=null==f?void 0:f.debugLogsEnabled,void 0!==t.autocapture&&(t.defaultTracking=t.autocapture),[4,(k=new Xe(e,t.appVersion,d,c,t.defaultTracking,t.autocapture,y,t.flushIntervalMillis,t.flushMaxRetries,t.flushQueueSize,s,t.ingestionMetadata,t.instanceName,m,b,null!==(te=null==r?void 0:r.loggerProvider)&&void 0!==te?te:t.loggerProvider,t.logLevel,t.minIdLength,t.offline,I,t.partnerId,t.plan,t.serverUrl,null!==(ne=null==r?void 0:r.serverZone)&&void 0!==ne?ne:t.serverZone,S,E,t.sessionTimeout,t.storageProvider,O,t.transport,t.useBatch,t.fetchRemoteConfig,_,w,P,t.networkTrackingOptions,t.identify,null!==(ie=null==r?void 0:r.enableDiagnostics)&&void 0!==ie?ie:t.enableDiagnostics,null!==(re=null==r?void 0:r.diagnosticsSampleRate)&&void 0!==re?re:n._diagnosticsSampleRate,i,t.remoteConfig,u,t.enableRequestBodyCompression,t.customEnrichment)).storageProvider.isEnabled()];case 5:return a.sent()||(k.loggerProvider.warn("Storage provider ".concat(k.storageProvider.constructor.name," is not enabled. Falling back to MemoryStorage.")),k.storageProvider=new Se),[2,k]}})})},tt=function(e,t,n){switch(void 0===e&&(e=Ge),void 0===t&&(t={}),e){case"localStorage":return new Fe;case"sessionStorage":return new Ve;case"none":return new Se;default:return new Ee(o(o({},t),{expirationDays:t.expiration}),n)}},nt=function(e){var t="object"==typeof e?e.type:e,n="object"==typeof e?e.headers:void 0,i="object"==typeof e?e.enableKeepalive:void 0,r="object"==typeof e?e.referrerPolicy:void 0;return"xhr"===t?new $e(n):"beacon"===t?new Ke:new ze(n,i,r)},it=function(e,t){return u(void 0,void 0,void 0,function(){var n,i,r,o,s,u,c;return a(this,function(a){switch(a.label){case 0:return[4,new Ee(void 0,{diagnosticsClient:t}).isEnabled()];case 1:if(!a.sent()||!e&&("undefined"==typeof location||!location.hostname))return[2,""];if(n=null!=e?e:location.hostname,1===(i=n.split(".")).length)return[2,""];for(r=[],o=1,He.find(function(e){return n.endsWith(".".concat(e))})&&(o=2),s=i.length-o-1;s>=0;--s)r.push(i.slice(s).join("."));s=0,a.label=2;case 2:if(!(s<r.length))return[3,7];u=r[s],a.label=3;case 3:return a.trys.push([3,5,,6]),[4,Ee.isDomainWritable(u)];case 4:return a.sent()?[2,"."+u]:[3,6];case 5:return c=a.sent(),t&&t.recordEvent("cookies.tld.failure",{reason:"Unexpected exception checking domain is writable: ".concat(u),error:c instanceof Error?c.message:String(c)}),[3,6];case 6:return s++,[3,2];case 7:return t&&t.recordEvent("cookies.tld.failure",{reason:"Could not determine TLD for host ".concat(n)}),[2,""]}})})},rt=!1,ot=function(){var e=k(),t=[],n=function(n,i){(null==e?void 0:e.addEventListener)&&(null==e||e.addEventListener(n,i),t.push({type:n,handler:i}))};return{name:"@amplitude/plugin-network-checker-browser",type:"before",setup:function(e,t){return u(void 0,void 0,void 0,function(){return a(this,function(i){return"undefined"==typeof navigator?(e.loggerProvider.debug("Network connectivity checker plugin is disabled because navigator is not available."),e.offline=!1,[2]):(e.offline=!navigator.onLine,n("online",function(){!1!==e.offline&&(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 u(void 0,void 0,void 0,function(){return a(this,function(n){return t.forEach(function(t){var n=t.type,i=t.handler;null==e||e.removeEventListener(n,i)}),t=[],[2]})})}}},st=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.diagnosticsSampleRate=0,t.enableDiagnostics=!0,t._diagnosticsSampleRate=0,t}return n(t,e),t.prototype.init=function(e,t,n){var i,r;return void 0===e&&(e=""),arguments.length>2?(i=t,r=n):"string"==typeof t?(i=t,r=void 0):(i=null==t?void 0:t.userId,r=t),F(this._init(o(o({},r),{userId:i,apiKey:e})))},t.prototype._init=function(t){var n,i,r,c,l,d,p,f;return u(this,void 0,void 0,function(){var h,v,g,y,m,b,I,S,E,_,O,w,P,k,R,T,C=this;return a(this,function(D){switch(D.label){case 0:return this.initializing?[2]:(this.initializing=!0,h=function(e){var t,n;return void 0===e&&(e={}),!0===(null===(t=e.remoteConfig)||void 0===t?void 0:t.fetchRemoteConfig)||!1!==(null===(n=e.remoteConfig)||void 0===n?void 0:n.fetchRemoteConfig)&&!1!==e.fetchRemoteConfig}(t),v=null!==(n=t.loggerProvider)&&void 0!==n?n:new B,t.loggerProvider||v.enable(null!==(i=t.logLevel)&&void 0!==i?i:z.Warn),g=null!==(r=t.serverZone)&&void 0!==r?r:"US",m=this._diagnosticsSampleRate,b=null===(c=t.enableDiagnostics)||void 0===c||c,this.diagnosticsSampleRate=m,this.enableDiagnostics=b,I=this.autocaptureAdapter(),h&&I?[4,I.getRemoteConfigClient(t,v,g)]:[3,2]);case 1:y=D.sent(),m=this.diagnosticsSampleRate,b=this.enableDiagnostics,D.label=2;case 2:return[4,null==I?void 0:I.getDiagnosticsClient(t,v,g,b,m)];case 3:return S=null!==(l=D.sent())&&void 0!==l?l:void 0,[4,et(t.apiKey,t,this,S,{loggerProvider:v,serverZone:g,enableDiagnostics:b,diagnosticsSampleRate:m})];case 4:return E=D.sent(),h&&y&&I?[4,I.fetchRemoteConfig(y,E)]:[3,6];case 5:D.sent(),D.label=6;case 6:return[4,e.prototype._init.call(this,E)];case 7:return D.sent(),this.logBrowserOptions(E),this.config.remoteConfigClient=y,_=Ue(this.config),this.attributionTrackingOptions=_,[4,null==I?void 0:I.addAttributionTrackingPlugin()];case 8:return D.sent(),O=be(),w=O.ampTimestamp?Number(O.ampTimestamp):void 0,P=!w||Date.now()<w,k=P&&!Number.isNaN(Number(O.ampSessionId))?Number(O.ampSessionId):void 0,-1!==(R=this.config.deferredSessionId)||this.config.optOut||(R=Date.now()),this.setSessionId(null!==(f=null!==(p=null!==(d=t.sessionId)&&void 0!==d?d:k)&&void 0!==p?p:R)&&void 0!==f?f:this.config.sessionId),this.config.optOut&&this.timeline.addOptOutListener(function(e){return u(C,void 0,void 0,function(){return a(this,function(t){return!e&&this.config.deferredSessionId&&(-1===this.config.deferredSessionId?this.setSessionId(void 0):this.setSessionId(this.config.deferredSessionId)),[2]})})}),(T=ve(this.config.instanceName)).identityStore.setIdentity({userId:this.config.userId,deviceId:this.config.deviceId}),null===this.config.offline?[3,10]:[4,this.add(ot()).promise];case 9:D.sent(),D.label=10;case 10:return[4,this.add(new se({diagnosticsClient:S})).promise];case 11:return D.sent(),[4,this.add(new qe).promise];case 12:return D.sent(),[4,this.add(new ge).promise];case 13:return D.sent(),I&&(L=this.config,rt||void 0!==L.defaultTracking||(L.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."),rt=!0)),[4,null==I?void 0:I.addPlugins()];case 14:return D.sent(),this.initializing=!1,[4,this.runQueuedFunctions("dispatchQ")];case 15:return D.sent(),T.eventBridge.setEventReceiver(function(e){var t=e.eventProperties||{},n=t.time,i=s(t,["time"]),r=o(o({},"number"==typeof n&&{time:n}),e.groups&&{groups:e.groups});C.track(e.eventType,i,Object.keys(r).length?r:void 0)}),[2]}var L})})},t.prototype.getUserId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.userId},t.prototype.setUserId=function(e){this.config?(this.config.loggerProvider.debug("function setUserId: ",e),e===this.config.userId&&void 0!==e||(this.config.userId=e,this.timeline.onIdentityChanged({userId:e}),function(e,t){ve(t).identityStore.editIdentity().setUserId(e).commit()}(e,this.config.instanceName))):this.q.push(this.setUserId.bind(this,e))},t.prototype.getDeviceId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.deviceId},t.prototype.setDeviceId=function(e){this.config?(this.config.loggerProvider.debug("function setDeviceId: ",e),e!==this.config.deviceId&&(this.config.deviceId=e,this.timeline.onIdentityChanged({deviceId:e}),function(e,t){ve(t).identityStore.editIdentity().setDeviceId(e).commit()}(e,this.config.instanceName))):this.q.push(this.setDeviceId.bind(this,e))},t.prototype.reset=function(){this.setDeviceId(T()),this.setUserId(void 0),this.timeline.onReset()},t.prototype.getIdentity=function(){var e,t;return{deviceId:null===(e=this.config)||void 0===e?void 0:e.deviceId,userId:null===(t=this.config)||void 0===t?void 0:t.userId,userProperties:this.userProperties}},t.prototype.setIdentity=function(e){var t,n,i;if("userId"in e&&this.setUserId(e.userId),"deviceId"in e&&e.deviceId&&this.setDeviceId(e.deviceId),"userProperties"in e){this.userProperties=e.userProperties;var r=new E,o=null!==(i=e.userProperties)&&void 0!==i?i:{};try{for(var s=c(Object.entries(o)),u=s.next();!u.done;u=s.next()){var a=l(u.value,2),d=a[0],p=a[1];r.set(d,p)}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}this.identify(r)}},t.prototype.getOptOut=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.optOut},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,i=[];if(!this.config)return this.q.push(this.setSessionId.bind(this,e)),F(Promise.resolve());if(this.config.optOut)return this.config.deferredSessionId=null!=e?e:-1,F(Promise.resolve());if(void 0===e&&(e=Date.now()),e===this.config.sessionId)return F(Promise.resolve());this.config.loggerProvider.debug("function setSessionId: ",e);var r=this.getSessionId();r!==e&&this.timeline.onSessionIdChanged(e);var o=this.config.lastEventTime,s=null!==(t=this.config.lastEventId)&&void 0!==t?t:-1;this.config.sessionId=e,this.config.lastEventTime=void 0,this.config.pageCounter=0;var u,a=this.autocaptureAdapter(),c=!a,l=!c&&(u=this.config.defaultTracking,Le(u,"sessions"));l&&r&&o&&i.push(this.track(Ze,void 0,{device_id:this.previousSessionDeviceId,event_id:++s,session_id:r,time:o+1,user_id:this.previousSessionUserId}).promise),(c||l)&&(this.config.lastEventTime=this.config.sessionId);var d=null!==(n=null==a?void 0:a.trackCampaignEventIfNeeded(++s,i))&&void 0!==n&&n;return this.config.identify&&i.push(this.track(M(this.config.identify)).promise),l&&i.push(this.track(Je,void 0,{event_id:d?++s:s,session_id:this.config.sessionId,time:this.config.lastEventTime}).promise),this.previousSessionDeviceId=this.config.deviceId,this.previousSessionUserId=this.config.userId,F(Promise.all(i))},t.prototype.extendSession=function(){this.config?this.config.lastEventTime=Date.now():this.q.push(this.extendSession.bind(this))},t.prototype.setTransport=function(e){this.config?this.config.transportProvider=nt(e):this.q.push(this.setTransport.bind(this,e))},t.prototype.identify=function(t,n){if(Ae(t)){var i=t._q;t._q=[],t=xe(new E,i)}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,i,r){if(Ae(i)){var o=i._q;i._q=[],i=xe(new E,o)}return e.prototype.groupIdentify.call(this,t,n,i,r)},t.prototype.revenue=function(t,n){if(Ae(t)){var i=t._q;t._q=[],t=xe(new $,i)}return e.prototype.revenue.call(this,t,n)},t.prototype.process=function(t){var n;return u(this,void 0,void 0,function(){var i,r,o;return a(this,function(s){var u,a;return i=Date.now(),u=this.config.sessionTimeout,void 0===(a=this.config.lastEventTime)&&(a=Date.now()),r=Date.now()-a>u,o=this.webAttribution&&this.webAttribution.shouldSetSessionIdOnNewCampaign(),t.event_type===Je||t.event_type===Ze||t.session_id&&t.session_id!==this.getSessionId()||(r||o?(this.setSessionId(i),o&&this.config.loggerProvider.log("Created a new session for new campaign.")):r||null===(n=this.autocaptureAdapter())||void 0===n||n.trackCampaignEventIfNeeded()),[2,e.prototype.process.call(this,t)]})})},t.prototype.logBrowserOptions=function(e){try{var t=o(o({},e),{apiKey:e.apiKey.substring(0,10)+"********"});this.config.loggerProvider.debug("Initialized Amplitude with BrowserConfig:",j(t))}catch(e){this.config.loggerProvider.error("Error logging browser config",e)}},t.prototype._setDiagnosticsSampleRate=function(e){e>1||e<0||this.config||(this._diagnosticsSampleRate=e)},t.prototype.autocaptureAdapter=function(){return null},t}(V),ut=function(){var e=new st;return{init:ie(e.init.bind(e),"init",ee(e),ne(e,["config"])),add:ie(e.add.bind(e),"add",ee(e),ne(e,["config.apiKey","timeline.plugins"])),remove:ie(e.remove.bind(e),"remove",ee(e),ne(e,["config.apiKey","timeline.plugins"])),track:ie(e.track.bind(e),"track",ee(e),ne(e,["config.apiKey","timeline.queue.length"])),logEvent:ie(e.logEvent.bind(e),"logEvent",ee(e),ne(e,["config.apiKey","timeline.queue.length"])),identify:ie(e.identify.bind(e),"identify",ee(e),ne(e,["config.apiKey","timeline.queue.length"])),groupIdentify:ie(e.groupIdentify.bind(e),"groupIdentify",ee(e),ne(e,["config.apiKey","timeline.queue.length"])),setGroup:ie(e.setGroup.bind(e),"setGroup",ee(e),ne(e,["config.apiKey","timeline.queue.length"])),revenue:ie(e.revenue.bind(e),"revenue",ee(e),ne(e,["config.apiKey","timeline.queue.length"])),flush:ie(e.flush.bind(e),"flush",ee(e),ne(e,["config.apiKey","timeline.queue.length"])),getUserId:ie(e.getUserId.bind(e),"getUserId",ee(e),ne(e,["config","config.userId"])),setUserId:ie(e.setUserId.bind(e),"setUserId",ee(e),ne(e,["config","config.userId"])),getDeviceId:ie(e.getDeviceId.bind(e),"getDeviceId",ee(e),ne(e,["config","config.deviceId"])),setDeviceId:ie(e.setDeviceId.bind(e),"setDeviceId",ee(e),ne(e,["config","config.deviceId"])),reset:ie(e.reset.bind(e),"reset",ee(e),ne(e,["config","config.userId","config.deviceId"])),getSessionId:ie(e.getSessionId.bind(e),"getSessionId",ee(e),ne(e,["config"])),setSessionId:ie(e.setSessionId.bind(e),"setSessionId",ee(e),ne(e,["config"])),extendSession:ie(e.extendSession.bind(e),"extendSession",ee(e),ne(e,["config"])),setOptOut:ie(e.setOptOut.bind(e),"setOptOut",ee(e),ne(e,["config"])),setTransport:ie(e.setTransport.bind(e),"setTransport",ee(e),ne(e,["config"])),getIdentity:ie(e.getIdentity.bind(e),"getIdentity",ee(e),ne(e,["config"])),setIdentity:ie(e.setIdentity.bind(e),"setIdentity",ee(e),ne(e,["config","config.userId","config.deviceId"])),getOptOut:ie(e.getOptOut.bind(e),"getOptOut",ee(e),ne(e,["config"])),_setDiagnosticsSampleRate:ie(e._setDiagnosticsSampleRate.bind(e),"_setDiagnosticsSampleRate",ee(e),ne(e,["config"]))}},at=ut(),ct=at.add,lt=at.extendSession,dt=at.flush,pt=at.getDeviceId,ft=at.getIdentity,ht=at.getOptOut,vt=at.getSessionId,gt=at.getUserId,yt=at.groupIdentify,mt=at.identify,bt=at.init,It=at.logEvent,St=at.remove,Et=at.reset,_t=at.revenue,Ot=at.setDeviceId,wt=at.setGroup,Pt=at.setIdentity,kt=at.setOptOut,Rt=at.setSessionId,Tt=at.setTransport,Ct=at.setUserId,Dt=at.track,Lt=at._setDiagnosticsSampleRate,Ut=Object.freeze({__proto__:null,add:ct,extendSession:lt,flush:dt,getDeviceId:pt,getIdentity:ft,getOptOut:ht,getSessionId:vt,getUserId:gt,groupIdentify:yt,identify:mt,init:bt,logEvent:It,remove:St,reset:Et,revenue:_t,setDeviceId:Ot,setGroup:wt,setIdentity:Pt,setOptOut:kt,setSessionId:Rt,setTransport:Tt,setUserId:Ct,track:Dt,_setDiagnosticsSampleRate:Lt,createInstance:ut,AmplitudeBrowser:st,runQueuedFunctions:Ne,Revenue:$,Identify:E,Types:Ye});!function(e){if(e.scriptUrl){var t=Re(e.scriptUrl);t&&ke(t)}}({scriptUrl:function(){if("undefined"==typeof document)return;var e=document.currentScript;if(null==e?void 0:e.src)return e.src;return}()}),function(){var e=k();if(e){var t=function(e){var t=ut(),n=k();return n&&n.amplitude&&n.amplitude._iq&&e&&(n.amplitude._iq[e]=t),t};if(e.amplitude=Object.assign(e.amplitude||{},Ut,{createInstance:t}),e.amplitude.invoked){var n=e.amplitude._q;e.amplitude._q=[],Ne(Ut,n);for(var i=Object.keys(e.amplitude._iq)||[],r=0;r<i.length;r++){var o=i[r],s=Object.assign(e.amplitude._iq[o],t(o)),u=s._q;s._q=[],Ne(s,u)}}}else console.error("[Amplitude] Error: GlobalScope is not defined")}()}();
|
|
2
|
+
//# sourceMappingURL=amplitude-lite-min.js.map
|
|
Binary file
|