PageSourceSearch

https://www.calendar.com/static-pages/3bf748c2-62402dceda8ba48fbc79.js

js calendar.com collected 2026-09-24 09:02:17 UTC 55,167 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkcalendar_static=self.webpackChunkcalendar_static||[]).push([[6026],{6230:function(e,t,n){n.d(t,{A:function(){return Mt}});var i=n(7227),o=n(8922),r=n.n(o),s=n(7257),a=n(6480),u=n.n(a),c=n(8697);function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){y(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,I(i.key),i)}}function v(e,t,n){return t&&f(e.prototype,t),n&&f(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function y(e,t,n){return(t=I(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g(e){return function(e){if(Array.isArray(e))return _(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||m(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,t){if(e){if("string"==typeof e)return _(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_(e,t):void 0}}function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function I(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var b="$default_instance",S=2,E=4096,k=1e3,O="$identify",w="$groupidentify",C="api.amplitude.com",N="api.eu.amplitude.com",P="regionconfig.amplitude.com",A="regionconfig.eu.amplitude.com",D=0,x=1,q=2,T=3,R=4,U=5,j=6,K=7,M="amp_cookie_test",G="amp",L="",W="cookies",B="none",F="localStorage",$="sessionStorage",V="revenue_amount",J="$productId",z="$quantity",Z="$price",H="$revenueType",X="amp_device_id",Q="amp_referrer",Y="referrer",ee="referring_domain",te="utm_source",ne="utm_medium",ie="utm_campaign",oe="utm_term",re="utm_content",se="[Amplitude] Attribution Captured",ae="http",ue="beacon",ce=function(e){for(var t="",n=0;n<e.length;n++){var i=e.charCodeAt(n);i<128?t+=String.fromCharCode(i):i>127&&i<2048?(t+=String.fromCharCode(i>>6|192),t+=String.fromCharCode(63&i|128)):(t+=String.fromCharCode(i>>12|224),t+=String.fromCharCode(i>>6&63|128),t+=String.fromCharCode(63&i|128))}return t},pe=function(e){for(var t="",n=0,i=0,o=0,r=0;n<e.length;)(i=e.charCodeAt(n))<128?(t+=String.fromCharCode(i),n++):i>191&&i<224?(o=e.charCodeAt(n+1),t+=String.fromCharCode((31&i)<<6|63&o),n+=2):(o=e.charCodeAt(n+1),r=e.charCodeAt(n+2),t+=String.fromCharCode((15&i)<<12|(63&o)<<6|63&r),n+=3);return t},le="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof self?self:void 0!==n.g?n.g:void 0,he={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(e){try{if(le.btoa&&le.atob)return le.btoa(unescape(encodeURIComponent(e)))}catch(t){}return he._encode(e)},_encode:function(e){var t,n,i,o,r,s,a,u="",c=0;for(e=ce(e);c<e.length;)o=(t=e.charCodeAt(c++))>>2,r=(3&t)<<4|(n=e.charCodeAt(c++))>>4,s=(15&n)<<2|(i=e.charCodeAt(c++))>>6,a=63&i,isNaN(n)?s=a=64:isNaN(i)&&(a=64),u=u+he._keyStr.charAt(o)+he._keyStr.charAt(r)+he._keyStr.charAt(s)+he._keyStr.charAt(a);return u},decode:function(e){try{if(le.btoa&&le.atob)return decodeURIComponent(escape(le.atob(e)))}catch(t){}return he._decode(e)},_decode:function(e){var t,n,i,o,r,s,a="",u=0;for(e=e.replace(/[^A-Za-z0-9+/=]/g,"");u<e.length;)t=he._keyStr.indexOf(e.charAt(u++))<<2|(o=he._keyStr.indexOf(e.charAt(u++)))>>4,n=(15&o)<<4|(r=he._keyStr.indexOf(e.charAt(u++)))>>2,i=(3&r)<<6|(s=he._keyStr.indexOf(e.charAt(u++))),a+=String.fromCharCode(t),64!==r&&(a+=String.fromCharCode(n)),64!==s&&(a+=String.fromCharCode(i));return a=pe(a)}},de=Object.prototype.toString;function fe(e){switch(de.call(e)){case"[object Date]":return"date";case"[object RegExp]":return"regexp";case"[object Arguments]":return"arguments";case"[object Array]":return"array";case"[object Error]":return"error"}return null===e?"null":void 0===e?"undefined":e!=e?"nan":e&&1===e.nodeType?"element":"undefined"!=typeof Buffer&&"function"==typeof Buffer.isBuffer&&Buffer.isBuffer(e)?"buffer":h(e=e.valueOf?e.valueOf():Object.prototype.valueOf.apply(e))}var ve,ye={DISABLE:0,ERROR:1,WARN:2,INFO:3},ge=ye.WARN,me={error:function(e){ge>=ye.ERROR&&_e(e)},warn:function(e){ge>=ye.WARN&&_e(e)},info:function(e){ge>=ye.INFO&&_e(e)}},_e=function(e){try{console.log("[Amplitude] "+e)}catch(t){}},Ie=function(e){return"string"===fe(e)&&e.length>E?e.substring(0,E):e},be=function(e,t,n){return fe(e)===n||(me.error("Invalid "+t+" input type. Expected "+n+" but received "+fe(e)),!1)},Se=function(e){var t=fe(e);if("object"!==t)return me.error("Error: invalid properties format. Expecting Javascript object, received "+t+", ignoring"),{};if(Object.keys(e).length>k)return me.error("Error: too many properties (more than 1000), ignoring"),{};var n={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=i,r=fe(o);"string"!==r&&(o=String(o),me.warn("WARNING: Non-string property key, received type "+r+', coercing to string "'+o+'"'));var s=ke(o,e[i]);null!==s&&(n[o]=s)}return n},Ee=["nan","function","arguments","regexp","element"],ke=function e(t,n){var i=fe(n);if(-1!==Ee.indexOf(i))me.warn('WARNING: Property key "'+t+'" with invali
1d value type '+i+", ignoring"),n=null;else if("undefined"===i)n=null;else if("error"===i)n=String(n),me.warn('WARNING: Property key "'+t+'" with value type error, coercing to '+n);else if("array"===i){for(var o=[],r=0;r<n.length;r++){var s=n[r],a=fe(s);"array"!==a?"object"===a?o.push(Se(s)):o.push(e(t,s)):me.warn("WARNING: Cannot have "+a+" nested in an array property value, skipping")}n=o}else"object"===i&&(n=Se(n));return n},Oe=function(e,t){var n=fe(t);if("string"===n)return t;if("date"===n||"number"===n||"boolean"===n)return t=String(t),me.warn("WARNING: Non-string groupName, received type "+n+', coercing to string "'+t+'"'),t;if("array"===n){for(var i=[],o=0;o<t.length;o++){var r=t[o],s=fe(r);"array"!==s&&"object"!==s?"string"===s?i.push(r):"date"!==s&&"number"!==s&&"boolean"!==s||(r=String(r),me.warn("WARNING: Non-string groupName, received type "+s+', coercing to string "'+r+'"'),i.push(r)):me.warn("WARNING: Skipping nested "+s+" in array groupName")}return i}me.warn("WARNING: Non-string groupName, received type "+n+". Please use strings or array of strings for groupName")},we=function(e){Object.prototype.hasOwnProperty.call(ye,e)&&(ge=ye[e])},Ce=me,Ne=function(e){return!e||0===e.length},Pe=function(){return"undefined"!=typeof WorkerGlobalScope},Ae=function(e,t){e=e.replace(/[[]/,"\\[").replace(/[\]]/,"\\]");var n=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(t);return null===n?void 0:decodeURIComponent(n[1].replace(/\+/g," "))},De=function e(t){if("array"===fe(t))for(var n=0;n<t.length;n++)t[n]=e(t[n]);else if("object"===fe(t))for(var i in t)i in t&&(t[i]=e(t[i]));else t=Ie(t);return t},xe=function(e){var t=fe(e);if("object"!==t)return me.error("Error: invalid groups format. Expecting Javascript object, received "+t+", ignoring"),{};var n={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=i,r=fe(o);"string"!==r&&(o=String(o),me.warn("WARNING: Non-string groupType, received type "+r+', coercing to string "'+o+'"'));var s=Oe(o,e[i]);null!==s&&(n[o]=s)}return n},qe=be,Te=Se,Re=function(e){return!!be(e,"deviceId","string")&&(!(e.indexOf(".")>=0)||(me.error("Device IDs may not contain '.' characters. Value will be ignored: \"".concat(e,'"')),!1))},Ue=function(e){return!!be(e,"transport","string")&&(e!==ae&&e!==ue?(me.error("transport value must be one of '".concat(ue,"' or '").concat(ae,"'")),!1):!(e!==ae&&"undefined"!=typeof navigator&&!navigator.sendBeacon)||(me.error("browser does not support sendBeacon, so transport must be HTTP"),!1))},je=function(e){return!!(be(e,"sessionId","number")&&new Date(e).getTime()>0)||(me.error("sessionId value must in milliseconds since epoch (Unix Timestamp)"),!1)},Ke=function(){return le.location},Me=function(e){var t=le.location?le.location.hostname:"";if(e){if("undefined"!=typeof document){var n=document.createElement("a");return n.href=e,n.hostname||t}if("function"==typeof URL)return new URL(e).hostname||t}return t},Ge=function(e){try{for(var t=document.cookie.split(";"),n=null,i=0;i<t.length;i++){for(var o=t[i];" "===o.charAt(0);)o=o.substring(1,o.length);if(0===o.indexOf(e)){n=o.substring(e.length,o.length);break}}return n}catch(r){return null}},Le=function(e,t,n){var i=null!==t?n.expirationDays:-1;if(i){var o=new Date;o.setTime(o.getTime()+24*i*60*60*1e3),i=o}var r=e+"="+t;i&&(r+="; expires="+i.toUTCString()),r+="; path=/",n.domain&&(r+="; domain="+n.domain),n.secure&&(r+="; Secure"),n.sameSite&&(r+="; SameSite="+n.sameSite),document.cookie=r},We=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=t.split(".")[R];return n&&(e=parseInt(n,32)),e||(Ce.warn("unable to parse malformed cookie: ".concat(t)),0)},Be=Le,Fe=Ge,$e=function(e){try{var t,n=document.cookie.split(";").map((function(e){return e.trimStart()})),i=[],o=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=m(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,s=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){a=!0,r=e}
1,f:function(){try{s||null==n.return||n.return()}finally{if(a)throw r}}}}(n);try{for(o.s();!(t=o.n()).done;){for(var r=t.value;" "===r.charAt(0);)r=r.substring(1);0===r.indexOf(e)&&i.push(r.substring(e.length))}}catch(s){o.e(s)}finally{o.f()}return i}catch(a){return[]}},Ve=function(e){return g(e).sort((function(e,t){var n=We(e);return We(t)-n}))},Je=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=M;if("undefined"==typeof document)return!1;var n=!1;try{var i=String(Date.now());Le(t,i,e),Ce.info("Testing if cookies available"),n=Ge(t+"=")===i}catch(o){Ce.warn('Error thrown when checking for cookies. Reason: "'.concat(o,'"'))}finally{Ce.info("Cleaning up cookies availability test"),Le(t,null,e)}return n},ze=function(){for(var e="",t=0;t<22;++t)e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".charAt(Math.floor(64*Math.random()));return e},Ze=function(e){var t=Me(e).split("."),n=[],i="_tldtest_"+ze();if(Pe())return"";for(var o=t.length-2;o>=0;--o)n.push(t.slice(o).join("."));for(var r=0;r<n.length;++r){var s=n[r],a={domain:"."+s};if(Be(i,1,a),Fe(i))return Be(i,null,a),s}return""},He={expirationDays:void 0,domain:void 0},Xe=function(e){var t="";return He.domain&&(t="."===He.domain.charAt(0)?He.domain.substring(1):He.domain),e+t},Qe=function(e){var t=Xe(e)+"=",n=Fe(t);try{if(n)return JSON.parse(he.decode(n))}catch(i){return null}return null},Ye=function(e,t){try{return Be(Xe(e),he.encode(JSON.stringify(t)),He),!0}catch(n){return!1}},et=function(e){try{return Be(Xe(e),null,He),!0}catch(t){return!1}},tt={reset:function(){He={expirationDays:void 0,domain:void 0}},options:function(e){if(0===arguments.length)return He;e=e||{},He.expirationDays=e.expirationDays,He.secure=e.secure,He.sameSite=e.sameSite;var t=Ne(e.domain)?"."+Ze(Ke().href):e.domain,n=Math.random();He.domain=t,Ye("amplitude_test",n);var i=Qe("amplitude_test");return i&&i===n||(t=null),et("amplitude_test"),He.domain=t,He},get:Qe,set:Ye,remove:et,setRaw:function(e,t){try{return Be(Xe(e),t,He),!0}catch(n){return!1}},getRaw:function(e){var t=Xe(e)+"=";return Fe(t)}},nt=function(){function e(){d(this,e),this.map=new Map,this.length=0}return v(e,[{key:"key",value:function(e){var t=Array.from(this.map.keys())[e];return this.map.get(t)}},{key:"getItem",value:function(e){return this.map.get(e)}},{key:"setItem",value:function(e,t){this.map.has(e)||(this.length+=1),this.map.set(e,t)}},{key:"removeItem",value:function(e){this.map.has(e)&&(this.length-=1,this.map.delete(e))}},{key:"clear",value:function(){this.map.clear(),this.length=0}}]),e}();if(function(){var e,t=new Date;try{return le.localStorage.setItem(t,t),e=le.localStorage.getItem(t)===String(t),le.localStorage.removeItem(t),e}catch(n){}return!1}())ve=le.localStorage;else if(void 0!==le&&le.globalStorage)try{ve=le.globalStorage[le.location.hostname]}catch(Lt){}else if("undefined"!=typeof document){var it=document.createElement("div"),ot="localStorage";it.style.display="none",document.getElementsByTagName("head")[0].appendChild(it),it.addBehavior&&(it.addBehavior("#default#userdata"),ve={length:0,setItem:function(e,t){it.load(ot),it.getAttribute(e)||this.length++,it.setAttribute(e,t),it.save(ot)},getItem:function(e){return it.load(ot),it.getAttribute(e)},removeItem:function(e){it.load(ot),it.getAttribute(e)&&this.length--,it.removeAttribute(e),it.save(ot)},clear:function(){it.load(ot);for(var e,t=0;e=it.XMLDocument.documentElement.attributes[t++];)it.removeAttribute(e.name);it.save(ot),this.length=0},key:function(e){return it.load(ot),it.XMLDocument.documentElement.attributes[e]}},it.load(ot),ve.length=it.XMLDocument.documentElement.attributes.length)}else Pe()&&(ve=new nt);ve||(ve={length:0,setItem:function(e,t){},getItem:function(e){},removeItem:function(e){},clear:function(){},key:function(e){}});var rt,st=ve,at=function(){this.storage=null};at.prototype.getStorage=function(e){if(null!==this.storage)return this.storage;if(!e&&Je())this.storage=tt;else{var t="amp_cookiestore_";this.storage={_options:{expirationDays:void 0,domain:void 0,secure:!1},reset:function(){this._options={expirationDays:void 0,domain:void 0,secure:!1}},options:function(e){return 0===arguments.length?this._options:(e=e||{},this._options.expirationDays=e.expirationDays||this._options.expirationDays,this._options.domain=e.domain||this._options.domain||le&&le.location&&le.location.hostname,this._options.secure=e.secure||!1)},get:function(e){try{return JSON.parse(st.getItem(t+e))}catch(Lt){}return null},set:function(e,n){try{return st.setItem(t+e,JSON.stringify(n)),!0}catch(Lt){}return!1},remove:function(e){try{st.removeItem(t+e)}catch(Lt){return!1}}}}return this.storage};var ut=(y(rt={},W,!0),y(rt,B,!0),y(rt,F,!0),y(rt,$,!0),rt),ct=function(){function e(t){var n=t.storageKey,i=t.disableCookies,o=t.domain,r=t.secure,s=t.sameSite,a=t.expirationDays,u=t.storage;d(this,e),this.storageKey=n,this.domain=o,this.secure=r,this.sameSite=s,this.expirationDays=a,this.cookieDomain="";var c=Ke()?Ke().href:void 0,p=i?"":Ze(c);if(this.cookieDomain=o||(p?"."+p:null),ut[u])this.storage=u;else{var l=i||!Je({domain:this.cookieDomain,secure:this.secure,sameSite:this.sameSite,expirationDays:this.expirationDays});this.storage=l?F:W}}return v(e,[{key:"getCookieStorageKey",value:function(){if(!this.domain)return this.storageKey;var e="."===this.domain.charAt(0)?this.domain.substring(1):this.domain;return"".concat(this.storageKey).concat(e?"_".concat(e):"")}},{key:"save",value:function(e){var t=e.deviceId,n=e.userId,i=e.optOut,o=e.sessionId,r=e.lastEventTime,s=e.eventId,a=e.identifyId,u=e.sequenceNumber;if(this.storage!==B){var c=[t,he.encode(n||""),i?"1":"",o?o.toString(32):"0",r?r.toString(32):"0",s?s.toString(32):"0",a?a.toString(32):"0",u?u.toString(32):"0"].join(".");switch(this.storage){case $:le.sessionStorage&&le.sessionStorage.setItem(this.storageKey,c);break;case F:st.setItem(this.storageKey,c);break;case W:this.saveCookie(c)}}}},{key:"saveCookie",value:function(e){Be(this.getCookieStorageKey(),e,{domain:this.cookieDomain,secure:this.secure,sameSite:this.sameSite,expirationDays:this.expirationDays})}},{key:"load",value:function(){var e,t=this;if(this.storage===W){var n=this.getCookieStorageKey()+"=",i=$e(n);if(0===i.length||1===i.length)e=i[0];else{var o=Ve(i)[0];
1i.forEach((function(){return Be(t.getCookieStorageKey(),null,{})})),this.saveCookie(o),e=Fe(n)}}if(e||(e=st.getItem(this.storageKey)),!e)try{e=le.sessionStorage&&le.sessionStorage.getItem(this.storageKey)}catch(Lt){Ce.info('window.sessionStorage unavailable. Reason: "'.concat(Lt,'"'))}if(!e)return null;var r=e.split("."),s=null;if(r[x])try{s=he.decode(r[x])}catch(Lt){s=null}return{deviceId:r[D],userId:s,optOut:"1"===r[q],sessionId:parseInt(r[T],32),lastEventTime:parseInt(r[R],32),eventId:parseInt(r[U],32),identifyId:parseInt(r[j],32),sequenceNumber:parseInt(r[K],32)}}},{key:"clear",value:function(){var e;if(this.storage===W&&(e=Fe(this.getCookieStorageKey()+"="),Be(this.getCookieStorageKey(),null,{domain:this.cookieDomain,secure:this.secure,sameSite:this.sameSite,expirationDays:0})),e||(e=st.getItem(this.storageKey),st.clear()),!e)try{e=le.sessionStorage&&le.sessionStorage.getItem(this.storageKey),le.sessionStorage.clear()}catch(Lt){Ce.info('window.sessionStorage unavailable. Reason: "'.concat(Lt,'"'))}return!!e}}]),e}(),pt="$clearAll",lt=function(){this.userPropertiesOperations={},this.properties=[]};lt.prototype.add=function(e,t){return"number"===fe(t)||"string"===fe(t)?this._addOperation("$add",e,t):Ce.error("Unsupported type for value: "+fe(t)+", expecting number or string"),this},lt.prototype.append=function(e,t){return this._addOperation("$append",e,t),this},lt.prototype.clearAll=function(){return Object.keys(this.userPropertiesOperations).length>0?(Object.prototype.hasOwnProperty.call(this.userPropertiesOperations,pt)||Ce.error("Need to send $clearAll on its own Identify object without any other operations, skipping $clearAll"),this):(this.userPropertiesOperations[pt]="-",this)},lt.prototype.prepend=function(e,t){return this._addOperation("$prepend",e,t),this},lt.prototype.set=function(e,t){return this._addOperation("$set",e,t),this},lt.prototype.setOnce=function(e,t){return this._addOperation("$setOnce",e,t),this},lt.prototype.unset=function(e){return this._addOperation("$unset",e,"-"),this},lt.prototype.preInsert=function(e,t){return this._addOperation("$preInsert",e,t),this},lt.prototype.postInsert=function(e,t){return this._addOperation("$postInsert",e,t),this},lt.prototype.remove=function(e,t){return this._addOperation("$remove",e,t),this},lt.prototype._addOperation=function(e,t,n){Object.prototype.hasOwnProperty.call(this.userPropertiesOperations,pt)?Ce.error("This identify already contains a $clearAll operation, skipping operation "+e):-1===this.properties.indexOf(t)?(Object.prototype.hasOwnProperty.call(this.userPropertiesOperations,e)||(this.userPropertiesOperations[e]={}),this.userPropertiesOperations[e][t]=n,this.properties.push(t)):Ce.error('User property "'+t+'" already used in this identify, skipping operation '+e)};var ht=function(e,t,n){this.url=e,this.data=t||{},this.headers=n};ht.prototype.send=function(e){if(!!le.XDomainRequest){var t=new le.XDomainRequest;t.open("POST",this.url,!0),t.onload=function(){e(200,t.responseText)},t.onerror=function(){"Request Entity Too Large"===t.responseText?e(413,t.responseText):e(500,t.responseText)},t.ontimeout=function(){},t.onprogress=function(){},t.send(s.A.stringify(this.data))}else if("undefined"!=typeof XMLHttpRequest){var n=new XMLHttpRequest;n.open("POST",this.url,!0),n.onreadystatechange=function(){4===n.readyState&&e(n.status,n.responseText)},function(e,t){for(var n in t)("Cross-Origin-Resource-Policy"!==n||t[n])&&e.setRequestHeader(n,t[n])}(n,this.headers),n.send(s.A.stringify(this.data))}else{var i=void 0;fetch(this.url,{method:"POST",headers:this.headers,body:s.A.stringify(this.data)}).then((function(e){return i=e.status,e.text()})).then((function(t){e(i,t)}))}};var dt=function(){this._price=null,this._productId=null,this._quantity=1,this._revenueType=null,this._properties=null};dt.prototype.setProductId=function(e){return"string"!==fe(e)?Ce.error("Unsupported type for productId: "+fe(e)+", expecting string"):Ne(e)?Ce.error("Invalid empty productId"):this._productId=e,this},dt.prototype.setQuantity=function(e){return"number"!==fe(e)?Ce.error("Unsupported type for quantity: "+fe(e)+", expecting number"):this._quantity=parseInt(e),this},dt.prototype.setPrice=function(e){return"number"!==fe(e)?Ce.error("Unsupported type for price: "+fe(e)+", expecting number"):this._price=e,this},dt.prototype.setRevenueType=function(e){return"string"!==fe(e)?Ce.error("Unsupported type for revenueType: "+fe(e)+", expecting string"):this._revenueType=e,this},dt.prototype.setEventProperties=function(e){return"object"!==fe(e)?Ce.error("Unsupported type for eventProperties: "+fe(e)+", expecting object"):this._properties=Te(e),this},dt.prototype._isValidRevenue=function(){return"number"===fe(this._price)||(Ce.error("Invalid revenue, need to set price field"),!1)},dt.prototype._toJSONObject=function(){var e="object"===fe(this._properties)?this._properties:{};return null!==this._productId&&(e[J]=this._productId),null!==this._quantity&&(e[z]=this._quantity),null!==this._price&&(e[Z]=this._price),null!==this._revenueType&&(e[H]=this._revenueType),e};var ft=function e(t){return t?(t^16*Math.random()>>t/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,e)},vt="US",yt="EU",gt=function(e){var t=C;switch(e){case yt:t=N;break;case vt:t=C}return t},mt="8.21.9",_t={apiEndpoint:C,batchEvents:!1,cookieExpiration:365,cookieName:"amplitude_id",sameSiteCookie
1:"Lax",cookieForceUpgrade:!1,deferInitialization:!1,disableCookies:!1,deviceIdFromUrlParam:!1,domain:"",eventUploadPeriodMillis:3e4,eventUploadThreshold:30,forceHttps:!0,includeFbclid:!1,includeGclid:!1,includeReferrer:!1,includeUtm:!1,ingestionMetadata:{sourceName:"",sourceVersion:""},language:function(){return"undefined"!=typeof navigator&&(navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||""}(),library:{name:"amplitude-js",version:mt},logLevel:"WARN",logAttributionCapturedEvent:!1,optOut:!1,onError:function(){},onExitPage:function(){},onNewSessionStart:function(){},plan:{branch:"",source:"",version:"",versionId:""},platform:"Web",savedMaxCount:1e3,saveEvents:!0,saveParamsReferrerOncePerSession:!0,secureCookie:!1,sessionTimeout:18e5,storage:L,trackingOptions:{city:!0,country:!0,carrier:!0,device_manufacturer:!0,device_model:!0,dma:!0,ip_address:!0,language:!0,os_name:!0,os_version:!0,platform:!0,region:!0,version_name:!0},transport:ae,unsetParamsReferrerOnNewSession:!1,unsentKey:"amplitude_unsent",unsentIdentifyKey:"amplitude_unsent_identify",uploadBatchSize:100,headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8","Cross-Origin-Resource-Policy":"cross-origin"},serverZone:vt,useDynamicConfig:!1,serverZoneBasedApi:!1,sessionId:null,partnerId:""},It=new(function(){function e(){return d(this,e),e.instance||(this.ingestionEndpoint=C,e.instance=this),e.instance}return v(e,[{key:"refresh",value:function(e,t,n){var i="https";t||"https:"===le.location.protocol||(i="http");var o=i+"://"+function(e){var t=P;switch(e){case yt:t=A;break;case vt:t=P}return t}(e),r=this;if(!!le.XDomainRequest){var s=new le.XDomainRequest;s.open("GET",o,!0),s.onload=function(){var e=JSON.parse(s.responseText);r.ingestionEndpoint=e.ingestionEndpoint,n&&n()},s.onerror=function(){},s.ontimeout=function(){},s.onprogress=function(){},s.send()}else{var a=new XMLHttpRequest;a.open("GET",o,!0),a.onreadystatechange=function(){if(4===a.readyState&&200===a.status){var e=JSON.parse(a.responseText);r.ingestionEndpoint=e.ingestionEndpoint,n&&n()}},a.send()}}}]),e}()),bt=function(e){(0,i.OL)()||Pe()||Ce.warn("amplitude-js will not work in a non-browser environment. If you are planning to add Amplitude to a node environment, please use @amplitude/node"),this._instanceName=Ne(e)?b:e.toLowerCase(),this._unsentEvents=[],this._unsentIdentifys=[],this.options=l(l({},_t),{},{headers:l({},_t.headers),ingestionMetadata:l({},_t.ingestionMetadata),library:l({},_t.library),plan:l({},_t.plan),trackingOptions:l({},_t.trackingOptions)}),this._q=[],this._sending=!1,this._updateScheduled=!1,this._onInitCallbacks=[],this._onNewSessionStartCallbacks=[],this._eventId=0,this._identifyId=0,this._lastEventTime=null,this._newSession=!1,this._sequenceNumber=0,this._sessionId=null,this._isInitialized=!1,this._connector=null,this._userAgent="undefined"!=typeof navigator&&navigator&&navigator.userAgent||null,this._ua=new(u())(this._userAgent).getResult()};bt.prototype.Identify=lt,bt.prototype.Revenue=dt,bt.prototype.init=function(e,t,n,o){var r=this;if("string"!==fe(e)||Ne(e))Ce.error("Invalid apiKey. Please re-initialize with a valid apiKey");else try{this._connector=c.i.getInstance(this._instanceName),Et(this.options,n),((0,i.OL)()||Pe())&&void 0!==le.Prototype&&Array.prototype.toJSON&&((0,i.LD)(),Ce.warn("Prototype.js injected Array.prototype.toJSON. Deleting Array.prototype.toJSON to prevent double-stringify")),this.options.cookieName!==_t.cookieName&&Ce.warn("The cookieName option is deprecated. We will be ignoring it for newer cookies"),this.options.serverZoneBasedApi&&(this.options.apiEndpoint=gt(this.options.serverZone)),this._refreshDynamicConfig(),this.options.apiKey=e,this._storageSuffix="_"+e+(this._instanceName===b?"":"_"+this._instanceName),this._storageSuffixV5=e.slice(0,6),this._oldCookiename=this.options.cookieName+this._storageSuffix,this._unsentKey=this.options.unsentKey+this._storageSuffix,this._unsentIdentifyKey=this.options.unsentIdentifyKey+this._storageSuffix,this._cookieName=G+"_"+this._storageSuffixV5,this.cookieStorage=(new at).getStorage(this.options.disableCookies),this.cookieStorage.options({expirationDays:this.options.cookieExpiration,domain:this.options.domain,secure:this.options.secureCookie,sameSite:this.options.sameSiteCookie}),this._metadataStorage=new ct({storageKey:this._cookieName,disableCookies:this.options.disableCookies,expirationDays:this.options.cookieExpiration,domain:this.options.domain,secure:this.options.secureCookie,sameSite:this.options.sameSiteCookie,storage:this.options.storage});var s=!!this.cookieStorage.get(this._oldCookiename),a=!!this._metadataStorage.load();this._useOldCookie=!a&&s&&!this.options.cookieForceUpgrade;var u=a||s;if(this.options.deferInitialization&&!u)return void this._deferInitialization(e,t,n,o);this.options.domain=this.cookieStorage.options().domain,"string"===fe(this.options.logLevel)&&we(this.options.logLevel);var p=qt(this);this._apiPropertiesTrackingOptions=Object.keys(p).length>0?{tracking_options:p}:{},this.options.cookieForceUpgrade&&s&&(a||Ot(this),this.cookieStorage.remove(this._oldCookiename)),kt(this),this._pendingReadStorage=!0;this.options.saveEvents&&(this._unsentEvents=this._loadSavedUnsentEvents(this.options.unsentKey).map((function(e){return{event:e}})).concat(this._unsentEvents),this._unsentIdentifys=this._loadSavedUnsentEvents(this.options.unsentIdentifyKey).map((function(e){return{event:e}})).concat(this._unsentIdentifys)),n&&n.onNewSessionStart&&this.onNewSessionStart(this.options.onNewSessionStart),function(e){n&&n.deviceId&&!Re(n.deviceId)&&(Ce.error('Invalid device ID rejected. Randomly generated UUID will be used instead of "'.concat(n.deviceId,'"')),delete n.deviceId),r.options.deviceId=r._getInitialDeviceId(n&&n.deviceId,e),r.options.userId="string"===fe(t)&&!Ne(t)&&t||"number"===fe(t)&&t.toString()||r.options.userId||null;var i=(new Date).getTime(),o=!r._sessionId||!r._lastEventTime||i-r._lastEventTime>r.options.sessionTimeout||r.options.sessionId;o&&(r.options.unsetParamsReferrerOnNewSession&&r._unsetUTMParams(),r._newSession=!0,r._sessionId=r.options.sessionId||i,r.options.sessionId=void 0,r.options.saveParamsReferrerOncePerSession&&r._trackParamsAndReferrer()),r.options.saveParamsReferrerOncePerSession||r._trackParamsAndReferrer(),r.options.saveEvents&&(St(r._unsentEvents),St(r._unsentIdentifys)),r._lastEventTime=i,Ct(r),r._pendingReadStorage=!1,r._sendEventsIfReady();for(var s=0;s<r._onInitCallbacks.length;s++)r._onInitCallbacks[s](r);r._onInitCallbacks=[],r._isInitialized=!0,o&&r._runNewSessionStartCallbacks()}(),this.runQueuedFunctions(),"function"===fe(o)&&o(this);var l=this.options.onExitPage;if("function"===fe(l)&&le.addEventListener&&!this.pageHandlersAdded){this.pageHandlersAdded=!0;le.addEventListener("pagehide",(function(){var e;e=r.options.transport,r.setTransport(ue),l(),r.setTransport(e)}),!1)}this._connector.eventBridge.setEventReceiver((function(e){r._logEvent(e.eventType,e.eventProperties,e.userProperties)}));var h=this._connector.identityStore.editIdentity();this.options.deviceId&&h.setDeviceId(this.options.deviceId),this.options.userId&&h.setUserId(this.options.userId),h.commit()}catch(d){Ce.error(d),n&&"function"===fe(n.onError)&&n.onError(d)}},bt.prototype._runNewSessionStartCallbacks=function(){for(var e=0;e<this._onNewSessionStartCallbacks.length;e++)this._onNewSessionStartCallbacks[e](this)},bt.prototype.deleteLowerLevelDomainCookies=function(){var e=Me(),t=this.options.domain&&"."===this.options.domain[0]?this.options.domain.slice(1):this.options.domain;if(t&&Pe()&&e!==t&&new RegExp(t+"$").test(e)){for(var n=e.split("."),i=t.split("."),o=n.length;o>i.length;--o){var r=n.slice(n.length-o).join(".");Be(this._cookieName,null,{domain:"."+r})}Be(this._cookieName,null,{})}},bt.prototype._getInitialDeviceId=function(e,t){if(e)return e;if(this.options.deviceIdFromUrlParam){var n=this._getDeviceIdFromUrlParam(this._getUrlParams());if(n)return n}return this.options.deviceId?this.options.deviceId:t||ze()};var St=function(e){for(var t=0;t<e.length;t++){var n=e[t].event.user_properties,i=e[t].event.event_properties,o=e[t].event.groups;e[t].event.user_properties=Te(n),e[t].event.event_properties=Te(i),e[t].event.groups=xe(o)}};bt.prototype._trackParamsAndReferrer=function(){var e,t,n,i;if(this.options.includeUtm&&(e=this._initUtmData()),this.options.includeReferrer&&(t=this._saveReferrer(this._getReferrer())),this.options.includeGclid&&(n=this._saveGclid(this._getUrlParams())),this.options.includeFbclid&&(i=this._saveFbclid(this._getUrlParams())),this.options.logAttributionCapturedEvent){var o=l(l(l(l({},e),t),n),i);Object.keys(o).length>0&&this.logEvent(se,o)}};var Et=function e(t,n){if("object"===fe(n)){var i=new Set(["headers"]),o=new Set(["eventUploadPeriodMillis"]),r=function(i){if(Object.prototype.hasOwnProperty.call(t,i)){var r=n[i],s=fe(t[i]);("transport"!==i||Ue(r))&&("sessionId"!==i||null===r?qe(r,i+" option",s)&&
1("boolean"===s?t[i]=!!r:"string"===s&&!Ne(r)||"number"===s&&(r>0||0===r&&o.has(i))||"function"===s?t[i]=r:"object"===s&&e(t[i],r)):t[i]=je(r)?r:null)}};for(var s in n)i.has(s)?t[s]=l(l({},t[s]),n[s]):Object.prototype.hasOwnProperty.call(n,s)&&r(s)}};bt.prototype.runQueuedFunctions=function(){var e=this._q;this._q=[];for(var t=0;t<e.length;t++){var n=this[e[t][0]];"function"===fe(n)&&n.apply(this,e[t].slice(1))}},bt.prototype._apiKeySet=function(e){return!Ne(this.options.apiKey)||(Ce.error("Invalid apiKey. Please set a valid apiKey with init() before calling "+e),!1)},bt.prototype._loadSavedUnsentEvents=function(e){var t=this._getFromStorage(st,e),n=this._parseSavedUnsentEventsString(t,e);return this._setInStorage(st,e,JSON.stringify(n)),n},bt.prototype._parseSavedUnsentEventsString=function(e,t){if(Ne(e))return[];if("string"===fe(e))try{var n=JSON.parse(e);if("array"===fe(n))return n}catch(Lt){}return Ce.error("Unable to load "+t+" events. Restart with a new empty queue."),[]},bt.prototype.isNewSession=function(){return this._newSession},bt.prototype.onInit=function(e){this._isInitialized?e(this):this._onInitCallbacks.push(e)},bt.prototype.onNewSessionStart=function(e){this._onNewSessionStartCallbacks.push(e)},bt.prototype.getSessionId=function(){return this._sessionId},bt.prototype.nextEventId=function(){return this._eventId++,this._eventId},bt.prototype.nextIdentifyId=function(){return this._identifyId++,this._identifyId},bt.prototype.nextSequenceNumber=function(){return this._sequenceNumber++,this._sequenceNumber},bt.prototype._unsentCount=function(){return this._unsentEvents.length+this._unsentIdentifys.length},bt.prototype._sendEventsIfReady=function(){return 0!==this._unsentCount()&&(this.options.batchEvents?this._unsentCount()>=this.options.eventUploadThreshold||this.options.transport===ue?(this.sendEvents(),!0):(this._updateScheduled||(this._updateScheduled=!0,setTimeout(function(){this._updateScheduled=!1,this.sendEvents()}.bind(this),this.options.eventUploadPeriodMillis)),!1):(this.sendEvents(),!0))},bt.prototype.clearStorage=function(){return this._metadataStorage.clear()},bt.prototype._getFromStorage=function(e,t){return e.getItem(t+this._storageSuffix
1)},bt.prototype._setInStorage=function(e,t,n){e.setItem(t+this._storageSuffix,n)};var kt=function(e){if(e._useOldCookie){var t=e.cookieStorage.get(e._oldCookiename);"object"!==fe(t)||wt(e,t)}else{var n=e._metadataStorage.load();"object"===fe(n)&&wt(e,n)}},Ot=function(e){var t=e.cookieStorage.get(e._oldCookiename);"object"===fe(t)&&(wt(e,t),Ct(e))},wt=function(e,t){t.deviceId&&(e.options.deviceId=t.deviceId),t.userId&&(e.options.userId=t.userId),null!==t.optOut&&void 0!==t.optOut&&!1!==t.optOut&&(e.options.optOut=t.optOut),t.sessionId&&(e._sessionId=parseInt(t.sessionId,10)),t.lastEventTime&&(e._lastEventTime=parseInt(t.lastEventTime,10)),t.eventId&&(e._eventId=parseInt(t.eventId,10)),t.identifyId&&(e._identifyId=parseInt(t.identifyId,10)),t.sequenceNumber&&(e._sequenceNumber=parseInt(t.sequenceNumber,10))},Ct=function(e){var t={deviceId:e.options.deviceId,userId:e.options.userId,optOut:e.options.optOut,sessionId:e._sessionId,lastEventTime:e._lastEventTime,eventId:e._eventId,identifyId:e._identifyId,sequenceNumber:e._sequenceNumber};e._useOldCookie?e.cookieStorage.set(e.options.cookieName+e._storageSuffix,t):e._metadataStorage.save(t)};bt.prototype._initUtmData=function(e,t){e=e||this._getUrlParams(),t=t||this.cookieStorage.get("__utmz");var n,i,o,r,s,a,u,c,p,l,h,d=(i=e,o=(n=t)?"?"+n.split(".").slice(-1)[0].replace(/\|/g,"&"):"",r=function(e,t,n,i){return Ae(e,t)||Ae(n,i)},s=r(te,i,"utmcsr",o),a=r(ne,i,"utmcmd",o),u=r(ie,i,"utmccn",o),c=r(oe,i,"utmctr",o),p=r(re,i,"utmcct",o),l={},(h=function(e,t){Ne(t)||(l[e]=t)})(te,s),h(ne,a),h(ie,u),h(oe,c),h(re,p),l);return Nt(this,d),d},bt.prototype._unsetUTMParams=function(){var e=new lt;e.unset(Y),e.unset(ee),e.unset(te),e.unset(ne),e.unset(ie),e.unset(oe),e.unset(re),this.identify(e)};var Nt=function(e,t){if("object"===fe(t)&&0!==Object.keys(t).length){var n=new lt;for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n.setOnce("initial_"+i,t[i]),n.set(i,t[i]));e.identify(n)}};bt.prototype._getReferrer=function(){var e=this._getReferrerFromUrlParam(this._getUrlParams());return e||("undefined"!=typeof document?document.referrer:"")},bt.prototype._getUrlParams=function(){return le.location.search},bt.prototype._saveGclid=function(e){var t=Ae("gclid",e);if(!Ne(t)){var n={gclid:t};return Nt(this,n),n}},bt.prototype._saveFbclid=function(e){var t=Ae("fbclid",e);if(!Ne(t)){var n={fbclid:t};return Nt(this,n),n}},bt.prototype._getDeviceIdFromUrlParam=function(e){return Ae(X,e)},bt.prototype._getReferrerFromUrlParam=function(e){return Ae(Q,e)},bt.prototype._getReferringDomain=function(e){if(Ne(e))return null;var t=e.split("/");return t.length>=3?t[2]:null},bt.prototype._saveReferrer=function(e){if(!Ne(e)){var t={referrer:e,referring_domain:this._getReferringDomain(e)};return Nt(this,t),t}},bt.prototype.saveEvents=function(){try{var e=JSON.stringify(this._unsentEvents.map((function(e){return e.event})));this._setInStorage(st,this.options.unsentKey,e)}catch(Lt){}try{var t=JSON.stringify(this._unsentIdentifys.map((function(e){return e.event})));this._setInStorage(st,this.options.unsentIdentifyKey,t)}catch(Lt){}},bt.prototype.setDomain=function(e){if(this._shouldDeferCall())return this._q.push(["setDomain"].concat(Array.prototype.slice.call(arguments,0)));if(qe(e,"domain","string"))try{this.cookieStorage.options({expirationDays:this.options.cookieExpiration,secure:this.options.secureCookie,domain:e,sameSite:this.options.sameSiteCookie}),this.options.domain=this.cookieStorage.options().domain,kt(this),Ct(this)}catch(Lt){Ce.error(Lt)}},bt.prototype.setUserId=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(qe(t,"startNewSession","boolean")){if(this._shouldDeferCall())return this._q.push(["setUserId"].concat(Array.prototype.slice.call(arguments,0)));try{this.options.userId=null!=e&&""+e||null,t&&(this.options.unsetParamsReferrerOnNewSession&&this._unsetUTMParams(),this._newSession=!0,this._sessionId=(new Date).getTime(),this._runNewSessionStartCallbacks(),this.options.saveParamsReferrerOncePerSession&&this._trackParamsAndReferrer()),Ct(this),this._connector&&this._connector.identityStore.editIdentity().setUserId(this.options.userId).commit()}catch(Lt){Ce.error(Lt)}}},bt.prototype.setGroup=function(e,t){if(this._shouldDeferCall())return this._q.push(["setGroup"].concat(Array.prototype.slice.call(arguments,0)));if(this._apiKeySet("setGroup()")&&qe(e,"groupType","string")&&!Ne(e)){var n={};n[e]=t;var i=(new lt).set(e,t);this._logEvent(O,null,null,i.userPropertiesOperations,n,null,null,null)}},bt.prototype.setOptOut=function(e){if(this._shouldDeferCall())return this._q.push(["setOptOut"].concat(Array.prototype.slice.call(arguments,0)));if(qe(e,"enable","boolean"))try{this.options.optOut=e,Ct(this)}catch(Lt){Ce.error(Lt)}},bt.prototype.setSessionId=function(e){if(qe(e,"sessionId","number"))try{this._sessionId=e,Ct(this)}catch(Lt){Ce.error(Lt)}},bt.prototype.resetSessionId=function(){this.setSessionId((new Date).getTime())},bt.prototype.regenerateDeviceId=function(){if(this._shouldDeferCall())return this._q.push(["regenerateDeviceId"].concat(Array.prototype.slice.call(arguments,0)));this.setDeviceId(ze())},bt.prototype.setDeviceId=function(e){if(this._shouldDeferCall())return this._q.push(["setDeviceId"].concat(Array.prototype.slice.call(arguments,0)));if(Re(e))try{Ne(e)||(this.options.deviceId=""+e,Ct(this),this._connector&&this._connector.identityStore.editIdentity().setDeviceId(this.options.deviceId).commit())}catch(Lt){Ce.error(Lt)}},bt.prototype.setTransport=function(e){if(this._shouldDeferCall())return this._q.push(["setTransport"].concat(Array.prototype.slice.call(arguments,0)));Ue(e)&&(this.options.transport=e)},bt.prototype.setUserProperties=function(e){if(this._shouldDeferCall())return this._q.push(["setUserProperties"].concat(Array.prototype.slice.call(arguments,0)));if(this._apiKeySet("setUserProperties()")&&qe(e,"userProperties","object")){var t=De(Te(e));if(0!==Object.keys(t).length){var n=new lt;for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&n.set(i,t[i]);this.identify(n)}}},bt.prototype.clearUserProperties=function(){if(this._shouldDeferCall())return this._q.push(["clearUserProperties"].concat(Array.prototype.slice.call(arguments,0)));if(this._apiKeySet("clearUserProperties()")){var e=new lt;e.clearAll(),this.identify(e)}};var Pt=function(e,t){for(var n=0;n<t._q.length;n++){var i=e[t._q[n][0]];"function"===fe(i)&&i.apply(e,t._q[n].slice(1))}return e};bt.prototype.identify=function(e,t,n,i){if(this._shouldDeferCall())return this._q.push(["identify"].
1concat(Array.prototype.slice.call(arguments,0)));if(this._apiKeySet("identify()"))if("object"===fe(e)&&Object.prototype.hasOwnProperty.call(e,"_q")&&(e=Pt(new lt,e)),e instanceof lt){if(Object.keys(e.userPropertiesOperations).length>0)return this._logEvent(O,null,null,e.userPropertiesOperations,null,null,null,t,n,i);Rt(t,n,0,"No request sent",{reason:"No user property operations"})}else Ce.error("Invalid identify input type. Expected Identify object but saw "+fe(e)),Rt(t,n,0,"No request sent",{reason:"Invalid identify input type"});else Rt(t,n,0,"No request sent",{reason:"API key is not set"})},bt.prototype.groupIdentify=function(e,t,n,i,o,r){if(this._shouldDeferCall())return this._q.push(["groupIdentify"].concat(Array.prototype.slice.call(arguments,0)));if(this._apiKeySet("groupIdentify()"))if(qe(e,"group_type","string")&&!Ne(e))if(null!=t)if("object"===fe(n)&&Object.prototype.hasOwnProperty.call(n,"_q")&&(n=Pt(new lt,n)),n instanceof lt){if(Object.keys(n.userPropertiesOperations).length>0)return this._logEvent(w,null,null,null,y({},e,t),n.userPropertiesOperations,null,i,o,r);Rt(i,o,0,"No request sent",{reason:"No group property operations"})}else Ce.error("Invalid identify input type. Expected Identify object but saw "+fe(n)),Rt(i,o,0,"No request sent",{reason:"Invalid identify input type"});else Rt(i,o,0,"No request sent",{reason:"Invalid group name"});else Rt(i,o,0,"No request sent",{reason:"Invalid group type"});else Rt(i,o,0,"No request sent",{reason:"API key is not set"})},bt.prototype.setVersionName=function(e){if(this._shouldDeferCall())return this._q.push(["setVersionName"].concat(Array.prototype.slice.call(arguments,0)));qe(e,"versionName","string")&&(this.options.versionName=e)},bt.prototype._logEvent=function(e,t,n,i,o,r,s,a,u,c){if(kt(this),e)if(this.options.optOut)Rt(a,u,0,"No request sent",{reason:"optOut is set to true"});else try{var p;p=e===O||e===w?this.nextIdentifyId():this.nextEventId();var h=this.nextSequenceNumber(),d="number"===fe(s)?s:(new Date).getTime();c?this._sessionId=-1:(!this._sessionId||!this._lastEventTime||d-this._lastEventTime>this.options.sessionTimeout)&&(this._sessionId=d,this._runNewSessionStartCallbacks()),this._lastEventTime=d,Ct(this);var f=this._ua.browser.name,v=this._ua.browser.major,y=this._ua.device.model||this._ua.os.name,g=this._ua.device.vendor;i=i||{};var m=l({},this._apiPropertiesTrackingOptions);n=l(l({},n||{}),m),t=t||{},o=o||{},r=r||{};var _={device_id:this.options.deviceId,user_id:this.options.userId,timestamp:d,event_id:p,session_id:this._sessionId||-1,event_type:e,version_name:this.options.versionName||null,platform:xt(this,"platform")?this.options.platform:null,os_name:xt(this,"os_name")&&f||null,os_version:xt(this,"os_version")&&v||null,device_model:xt(this,"device_model")&&y||null,device_manufacturer:xt(this,"device_manufacturer")&&g||null,language:xt(this,"language")?this.options.language:null,api_properties:n,event_properties:De(Te(t)),user_properties:De(Te(i)),uuid:ft(),library:this.options.library,sequence_number:h,groups:De(xe(o)),group_properties:De(Te(r)),user_agent:this._userAgent,partner_id:this.options.partnerId||null};return At(this)&&(_.plan={branch:this.options.plan.branch||void 0,source:this.options.plan.source||void 0,version:this.options.plan.version||void 0,versionId:this.options.plan.versionId||void 0}),Dt(this)&&(_.ingestion_metadata={source_name:this.options.ingestionMetadata.sourceName||void 0,source_version:this.options.ingestionMetadata.sourceVersion||void 0}),e===O||e===w?(this._unsentIdentifys.push({event:_,callback:a,errorCallback:u}),this._limitEventsQueued(this._unsentIdentifys)):(this._unsentEvents.push({event:_,callback:a,errorCallback:u}),this._limitEventsQueued(this._unsentEvents)),this.options.saveEvents&&this.saveEvents(),this._sendEventsIfReady(),e===O&&this._connector&&this._connector.identityStore.editIdentity().updateUserProperties(De(Te(i))).commit(),p}catch(Lt){Ce.error(Lt)}else Rt(a,u,0,"No request sent",{reason:"Missing eventType"})};var At=function(e){return e.options.plan&&(e.options.plan.source||e.options.plan.branch||e.options.plan.version||e.options.plan.versionId)},Dt=function(e){return e.options.ingestionMetadata&&(e.options.ingestionMetadata.sourceName||e.options.ingestionMetadata.sourceVersion)},xt=function(e,t){return!!e.options.trackingOptions[t]},qt=function(e){for(var t=["city","country","dma","ip_address","region"],n={},i=0;i<t.length;i++){var o=t[i];xt(e,o)||(n[o]=!1)}return n};bt.prototype._limitEventsQueued=function(e){e.length>this.options.savedMaxCount&&e.splice(0,e.length-this.options.savedMaxCount).forEach((function(e){Rt(e.callback,e.errorCallback,0,"No request sent",{reason:"Event dropped because options.savedMaxCount exceeded. User may be offline or have a content blocker"})}))},bt.prototype.logEvent=function(e,t,n,i){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return this._shouldDeferCall()?this._q.push(["logEvent"].concat(Array.prototype.slice.call(arguments,0))):this.logEventWithTimestamp(e,t,null,n,i,o)},bt.prototype.logEventWithTimestamp=function(e,t,n,i,o){var r=arguments.length>5&&void 0!==arguments[5]&&arguments[5];return this._shouldDeferCall()?this._q.push(["logEventWithTimestamp"].concat(Array.prototype.slice.call(arguments,0))):this._apiKeySet("logEvent()")?qe(e,"eventType","string")?Ne(e)?(Rt(i,o,0,"No request sent",{reason:"Missing eventType"}),-1):(qe(r,"outOfSession","boolean")||Rt(i,o,0,"No request sent",{reason:"Invalid outOfSession value"}),this._logEvent(e,t,null,null,null,null,n,i,o,r)):(Rt(i,o,0,"No request sent",{reason:"Invalid type for eventType"}),-1):(Rt(i,o,0,"No request sent",{reason:"API key not set"}),-1)},bt.prototype.logEventWithGroups=function(e,t,n,i,o){var r=arguments.length>5&&void 0!==arguments[5]&&arguments[5];return this._shouldDeferCall()?this._q.push(["logEventWithGroups"].concat(Array.prototype.slice.call(arguments,0))):this._apiKeySet("logEventWithGroups()")?qe(e,"eventType","string")?(qe(r,"outOfSession","boolean")||Rt(event.callback,event.errorCallback,0,"No request sent",{reason:"Invalid outOfSession value"}),this._logEvent(e,t,null,null,n,null,null,i,o,r)):(Rt(event.callback,event.errorCallback,0,"No request sent",{reason:"Invalid type for eventType"}),-1):(Rt(event.callback,event.errorCallback,0,"No request sent",{reason:"API key not set"}),-1)};var Tt=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},Rt=function(e,t,n,i,o){"function"===fe(e)&&e(n,i,o),"function"===fe(t)&&t(n,i,o)};bt.prototype.logRevenueV2=function(e){if(this._shouldDeferCall())return this._q.push(["logRevenueV2"].concat(Array.prototype.slice.call(arguments,0)));if(this._apiKeySet("logRevenueV2()"))if("object"===fe(e)&&Object.prototype.hasOwnProperty.call(e,"_q")&&(e=Pt(new dt,e)),e instanceof dt){if(e&&e._isValidRevenue())return this.logEvent(V,e._toJSONObject())}else Ce.error("Invalid revenue input type. Expected Revenue object but saw "+fe(e))},bt.prototype.logRevenue=function(e,t,n){return this._shouldDeferCall()?this._q.push(["logRevenue"].concat(Array.prototype.slice.call(arguments,0))):this._apiKeySet("logRevenue()")&&Tt(e)&&(void 0===t||Tt(t))?this._logEvent(V,{},{productId:n,special:"revenue_amount",quantity:t||1,price:e}
1,null,null,null,null,null):-1},bt.prototype._logErrorsOnEvents=function(e,t,n,i){for(var o=["_unsentEvents","_unsentIdentifys"],r=0;r<o.length;r++)for(var s=o[r],a="_unsentEvents"===s?e:t,u=0;u<this[s].length;u++){var c=this[s][u];c.event.event_id<=a&&c.errorCallback&&c.errorCallback(n,i)}},bt.prototype.removeEvents=function(e,t,n,i){Ut(this,"_unsentEvents",e,n,i),Ut(this,"_unsentIdentifys",t,n,i)};var Ut=function(e,t,n,i,o){if(!(n<0)){for(var r=[],s=0;s<e[t].length;s++){var a=e[t][s];a.event.event_id>n?r.push(a):a.callback&&a.callback(i,o)}e[t]=r}};bt.prototype.sendEvents=function(){if(this._apiKeySet("sendEvents()")){if(this.options.optOut)this.removeEvents(1/0,1/0,0,"No request sent",{reason:"Opt out is set to true"});else if(0!==this._unsentCount()){if(this.options.transport!==ue){if(this._sending)return;this._sending=!0}var e=(this.options.forceHttps||"https:"===le.location.protocol?"https":"http")+"://"+this.options.apiEndpoint,t=Math.min(this._unsentCount(),this.options.uploadBatchSize),n=this._mergeEventsAndIdentifys(t),i=n.maxEventId,o=n.maxIdentifyId,s=JSON.stringify(n.eventsToSend.map((function(e){return e.event}))),a=(new Date).getTime(),u={client:this.options.apiKey,e:s,v:S,upload_time:a,checksum:r()(S+this.options.apiKey+s+a)};if(this.options.transport!==ue||"undefined"==typeof navigator){var c=this;try{new ht(e,u,this.options.headers).send((function(e,n){c._sending=!1;try{200===e?(c.removeEvents(i,o,e,n),c.options.saveEvents&&c.saveEvents(),c._sendEventsIfReady()):(c._logErrorsOnEvents(i,o,e,n),413===e&&(1===c.options.uploadBatchSize&&c.removeEvents(i,o,e,n),c.options.uploadBatchSize=Math.ceil(t/2),c.sendEvents()))}catch(Lt){}}))}catch(Lt){var p="Request failed to send";Ce.error(p),c._logErrorsOnEvents(i,o,0,p),c.removeEvents(i,o,0,p,{reason:Lt.message})}}else{navigator.sendBeacon(e,new URLSearchParams(u))?(this.removeEvents(i,o,200,"success"),this.options.saveEvents&&this.saveEvents()):this._logErrorsOnEvents(i,o,0,"")}}}else this.removeEvents(1/0,1/0,0,"No request sent",{reason:"API key not set"})},bt.prototype._mergeEventsAndIdentifys=function(e){for(var t=[],n=0,i=-1,o=0,r=-1;t.length<e;){var s=void 0,a=o>=this._unsentIdentifys.length,u=n>=this._unsentEvents.length;if(u&&a){Ce.error("Merging Events and Identifys, less events and identifys than expected");break}a?i=(s=this._unsentEvents[n++]).event.event_id:u?r=(s=this._unsentIdentifys[o++]).event.event_id:!("sequence_number"in this._unsentEvents[n].event)||this._unsentEvents[n].event.sequence_number<this._unsentIdentifys[o].event.sequence_number?i=(s=this._unsentEvents[n++]).event.event_id:r=(s=this._unsentIdentifys[o++]).event.event_id,t.push(s)}return{eventsToSend:t,maxEventId:i,maxIdentifyId:r}},bt.prototype.setGlobalUserProperties=function(e){this.setUserProperties(e)},bt.prototype.__VERSION__=function(){return this.options.library.version},bt.prototype.setLibrary=function(e,t){null!=e&&(this.options.library.name=e),null!=t&&(this.options.library.version=t)},bt.prototype._shouldDeferCall=function(){return this._pendingReadStorage||this._initializationDeferred},bt.prototype._deferInitialization=function(){this._initializationDeferred=!0,this._q.push(["init"].concat(Array.prototype.slice.call(arguments,0)))},bt.prototype.enableTracking=function(){this._initializationDeferred=!1,Ct(this),this.runQueuedFunctions()},bt.prototype._refreshDynamicConfig=function(){this.options.useDynamicConfig&&It.refresh(this.options.serverZone,this.options.forceHttps,function(){this.options.apiEndpoint=It.ingestionEndpoint}.bind(this))},bt.prototype.getDeviceId=function(){return this.options.deviceId},bt.prototype.getUserId=function(){return this.options.userId},bt.prototype.setMinTimeBetweenSessionsMillis=function(e){if(qe(e,"timeInMillis","number")){if(this._shouldDeferCall())return this._q.push(["setMinTimeBetweenSessionsMillis"].concat(Array.prototype.slice.call(arguments,0)));try{this.options.sessionTimeout=e}catch(Lt){Ce.error(Lt)}}},bt.prototype.setEventUploadThreshold=function(e){if(qe(e,"eventUploadThreshold","number")){if(this._shouldDeferCall())return this._q.push(["setEventUploadThreshold"].concat(Array.prototype.slice.call(arguments,0)));try{this.options.eventUploadThreshold=e}catch(Lt){Ce.error(Lt)}}},bt.prototype.setUseDynamicConfig=function(e){if(qe(e,"useDynamicConfig","boolean")){if(this._shouldDeferCall())return this._q.push(["setUseDynamicConfig"].concat(Array.prototype.slice.call(arguments,0)));try{this.options.useDynamicConfig=e,this._refreshDynamicConfig()}catch(Lt){Ce.error(Lt)}}},bt.prototype.setServerZone=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if((e===yt||e===vt)&&qe(t,"serverZoneBasedApi","boolean")){if(this._shouldDeferCall())return this._q.push(["setServerZone"].concat(Array.prototype.slice.call(arguments,0)));try{this.options.serverZone=e,this.options.serverZoneBasedApi=t,t&&(this.options.apiEndpoint=gt(this.options.serverZone))}catch(Lt){Ce.error(Lt)}}},bt.prototype.setServerUrl=function(e){if(qe(e,"serverUrl","string")){if(this._shouldDeferCall())return this._q.push(["setServerUrl"].concat(Array.prototype.slice.call(arguments,0)));try{this.options.apiEndpoint=e}catch(Lt){Ce.error(Lt)}}};var jt=function(){this.options=l({},_t),this._q=[],this._instances={}};jt.prototype.Identify=lt,jt.prototype.Revenue=dt,jt.prototype.getInstance=function(e){e=Ne(e)?b
1:e.toLowerCase();var t=this._instances[e];return void 0===t&&(t=new bt(e),this._instances[e]=t),t},jt.prototype.init=function(e,t,n,i){this.getInstance().init(e,t,n,function(e){this.options=e.options,"function"===fe(i)&&i(e)}.bind(this))},jt.prototype.isNewSession=function(){return this.getInstance().isNewSession()},jt.prototype.getSessionId=function(){return this.getInstance().getSessionId()},jt.prototype.nextEventId=function(){return this.getInstance().nextEventId()},jt.prototype.nextIdentifyId=function(){return this.getInstance().nextIdentifyId()},jt.prototype.nextSequenceNumber=function(){return this.getInstance().nextSequenceNumber()},jt.prototype.saveEvents=function(){this.getInstance().saveEvents()},jt.prototype.setDomain=function(e){this.getInstance().setDomain(e)},jt.prototype.setUserId=function(e){this.getInstance().setUserId(e)},jt.prototype.setGroup=function(e,t){this.getInstance().setGroup(e,t)},jt.prototype.setOptOut=function(e){this.getInstance().setOptOut(e)},jt.prototype.regenerateDeviceId=function(){this.getInstance().regenerateDeviceId()},jt.prototype.setDeviceId=function(e){this.getInstance().setDeviceId(e)},jt.prototype.setUserProperties=function(e){this.getInstance().setUserProperties(e)},jt.prototype.clearUserProperties=function(){this.getInstance().clearUserProperties()},jt.prototype.identify=function(e,t){this.getInstance().identify(e,t)},jt.prototype.setVersionName=function(e){this.getInstance().setVersionName(e)},jt.prototype.logEvent=function(e,t,n){return this.getInstance().logEvent(e,t,n)},jt.prototype.logEventWithGroups=function(e,t,n,i){return this.getInstance().logEventWithGroups(e,t,n,i)},jt.prototype.logRevenueV2=function(e){return this.getInstance().logRevenueV2(e)},jt.prototype.logRevenue=function(e,t,n){return this.getInstance().logRevenue(e,t,n)},jt.prototype.removeEvents=function(e,t){this.getInstance().removeEvents(e,t)},jt.prototype.sendEvents=function(e){this.getInstance().sendEvents(e)},jt.prototype.setGlobalUserProperties=function(e){this.getInstance().setUserProperties(e)},jt.prototype.__VERSION__=mt;var Kt=void 0!==le&&le.amplitude||{},Mt=new jt;for(var Gt in Mt._q=Kt._q||[],Kt._iq)Object.prototype.hasOwnProperty.call(Kt._iq,Gt)&&(Mt.getInstance(Gt)._q=Kt._iq[Gt]._q||[])}}]);

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