1import{c as Tt}from"./index.03b766a6.js";function Ze(){return typeof window=="object"&&(window==null?void 0:window.document)!==void 0}var Zt=function(){var r;if(Ze()){var e=window,t=Array;if(e.Prototype!==void 0&&((r=t.prototype)===null||r===void 0?void 0:r.toJSON)!==void 0)return delete t.prototype.toJSON,!0}return!1},At={exports:{}};(function(r){(function(e){function t(l,w){var f=(l&65535)+(w&65535),P=(l>>16)+(w>>16)+(f>>16);return P<<16|f&65535}function n(l,w){return l<<w|l>>>32-w}function i(l,w,f,P,L,V){return t(n(t(t(w,l),t(P,V)),L),f)}function o(l,w,f,P,L,V,$){return i(w&f|~w&P,l,w,L,V,$)}function s(l,w,f,P,L,V,$){return i(w&P|f&~P,l,w,L,V,$)}function a(l,w,f,P,L,V,$){return i(w^f^P,l,w,L,V,$)}function h(l,w,f,P,L,V,$){return i(f^(w|~P),l,w,L,V,$)}function I(l,w){l[w>>5]|=128<<w%32,l[(w+64>>>9<<4)+14]=w;var f,P,L,V,$,y=1732584193,g=-271733879,m=-1732584194,_=271733878;for(f=0;f<l.length;f+=16)P=y,L=g,V=m,$=_,y=o(y,g,m,_,l[f],7,-680876936),_=o(_,y,g,m,l[f+1],12,-389564586),m=o(m,_,y,g,l[f+2],17,606105819),g=o(g,m,_,y,l[f+3],22,-1044525330),y=o(y,g,m,_,l[f+4],7,-176418897),_=o(_,y,g,m,l[f+5],12,1200080426),m=o(m,_,y,g,l[f+6],17,-1473231341),g=o(g,m,_,y,l[f+7],22,-45705983),y=o(y,g,m,_,l[f+8],7,1770035416),_=o(_,y,g,m,l[f+9],12,-1958414417),m=o(m,_,y,g,l[f+10],17,-42063),g=o(g,m,_,y,l[f+11],22,-1990404162),y=o(y,g,m,_,l[f+12],7,1804603682),_=o(_,y,g,m,l[f+13],12,-40341101),m=o(m,_,y,g,l[f+14],17,-1502002290),g=o(g,m,_,y,l[f+15],22,1236535329),y=s(y,g,m,_,l[f+1],5,-165796510),_=s(_,y,g,m,l[f+6],9,-1069501632),m=s(m,_,y,g,l[f+11],14,643717713),g=s(g,m,_,y,l[f],20,-373897302),y=s(y,g,m,_,l[f+5],5,-701558691),_=s(_,y,g,m,l[f+10],9,38016083),m=s(m,_,y,g,l[f+15],14,-660478335),g=s(g,m,_,y,l[f+4],20,-405537848),y=s(y,g,m,_,l[f+9],5,568446438),_=s(_,y,g,m,l[f+14],9,-1019803690),m=s(m,_,y,g,l[f+3],14,-187363961),g=s(g,m,_,y,l[f+8],20,1163531501),y=s(y,g,m,_,l[f+13],5,-1444681467),_=s(_,y,g,m,l[f+2],9,-51403784),m=s(m,_,y,g,l[f+7],14,1735328473),g=s(g,m,_,y,l[f+12],20,-1926607734),y=a(y,g,m,_,l[f+5],4,-378558),_=a(_,y,g,m,l[f+8],11,-2022574463),m=a(m,_,y,g,l[f+11],16,1839030562),g=a(g,m,_,y,l[f+14],23,-35309556),y=a(y,g,m,_,l[f+1],4,-1530992060),_=a(_,y,g,m,l[f+4],11,1272893353),m=a(m,_,y,g,l[f+7],16,-155497632),g=a(g,m,_,y,l[f+10],23,-1094730640),y=a(y,g,m,_,l[f+13],4,681279174),_=a(_,y,g,m,l[f],11,-358537222),m=a(m,_,y,g,l[f+3],16,-722521979),g=a(g,m,_,y,l[f+6],23,76029189),y=a(y,g,m,_,l[f+9],4,-640364487),_=a(_,y,g,m,l[f+12],11,-421815835),m=a(m,_,y,g,l[f+15],16,530742520),g=a(g,m,_,y,l[f+2],23,-995338651),y=h(y,g,m,_,l[f],6,-198630844),_=h(_,y,g,m,l[f+7],10,1126891415),m=h(m,_,y,g,l[f+14],15,-1416354905),g=h(g,m,_,y,l[f+5],21,-57434055),y=h(y,g,m,_,l[f+12],6,1700485571),_=h(_,y,g,m,l[f+3],10,-1894986606),m=h(m,_,y,g,l[f+10],15,-1051523),g=h(g,m,_,y,l[f+1],21,-2054922799),y=h(y,g,m,_,l[f+8],6,1873313359),_=h(_,y,g,m,l[f+15],10,-30611744),m=h(m,_,y,g,l[f+6],15,-1560198380),g=h(g,m,_,y,l[f+13],21,1309151649),y=h(y,g,m,_,l[f+4],6,-145523070),_=h(_,y,g,m,l[f+11],10,-1120210379),m=h(m,_,y,g,l[f+2],15,718787259),g=h(g,m,_,y,l[f+9],21,-343485551),y=t(y,P),g=t(g,L),m=t(m,V),_=t(_,$);return[y,g,m,_]}function O(l){var w,f="",P=l.length*32;for(w=0;w<P;w+=8)f+=String.fromCharCode(l[w>>5]>>>w%32&255);return f}function T(l){var w,f=[];for(f[(l.length>>2)-1]=void 0,w=0;w<f.length;w+=1)f[w]=0;var P=l.length*8;for(w=0;w<P;w+=8)f[w>>5]|=(l.charCodeAt(w/8)&255)<<w%32;return f}function p(l){return O(I(T(l),l.length*8))}function v(l,w){var f,P=T(l),L=[],V=[],$;for(L[15]=V[15]=void 0,P.length>16&&(P=I(P,l.length*8)),f=0;f<16;f+=1)L[f]=P[f]^909522486,V[f]=P[f]^1549556828;return $=I(L.concat(T(w)),512+w.length*8),O(I(V.concat($),512+128))}function u(l){var w="0123456789abcdef",f="",P,L;for(L=0;L<l.length;L+=1)P=l.charCodeAt(L),f+=w.charAt(P>>>4&15)+w.charAt(P&15);return f}function d(l){return unescape(encodeURIComponent(l))}function b(l){return p(d(l))}function q(l){return u(b(l))}function W(l,w){return v(d(l),d(w))}function A(l,w){return u(W(l,w))}function R(l,w,f){return w?f?W(w,l):A(w,l):f?b(l):q(l)}r.exports?r.exports=R:e.md5=R})(Tt)})(At);var er=At.exports;const Rt="%[a-f0-9]{2}",gt=new RegExp("("+Rt+")|([^%]+?)","gi"),mt=new RegExp("("+Rt+")+","gi");function Be(r,e){try{return[decodeURIComponent(r.join(""))]}catch{}if(r.length===1)return r;e=e||1;const t=r.slice(0,e),n=r.slice(e);return Array.prototype.concat.call([],Be(t),Be(n))}function tr(r){try{return decodeURIComponent(r)}catch{let e=r.match(gt)||[];for(let t=1;t<e.length;t++)r=Be(e,t).join(""),e=r.match(gt)||[];return r}}function rr(r){const e={"%FE%FF":"\uFFFD\uFFFD","%FF%FE":"\uFFFD\uFFFD"};let t=mt.exec(r);for(;t;){try{e[t[0]]=decodeURIComponent(t[0])}catch{const i=tr(t[0]);i!==t[0]&&(e[t[0]]=i)}t=mt.exec(r)}e["%C2"]="\uFFFD";const n=Object.keys(e);for(const i of n)r=r.replace(new RegExp(i,"g"),e[i]);return r}function nr(r){if(typeof r!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof r+"`");try{return decodeURIComponent(r)}catch{return rr(r)}}function Ct(r,e){if(!(typeof r=="string"&&typeof e=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(r===""||e==="")return[];const t=r.indexOf(e);return t===-1?[]:[r.slice(0,t),r.slice(t+e.length)]}function ir(r,e){const t={};if(Array.isArray(e))for(const n of e){const i=Object.getOwnPropertyDescriptor(r,n);i!=null&&i.enumerable&&Object.defineProperty(t,n,i)}else for(const n of Reflect.ownKeys(r)){const i=Object.getOwnPropertyDescriptor(r,n);if(i.enumerable){const o=r[n];e(n,o,r)&&Object.defineProperty(t,n,i)}}return t}const or=r=>r==null,sr=r=>encodeURIComponent(r).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),We=Symbol("encodeFragmentIdentifier");function ar(r){switch(r.arrayFormat){case"index":return e=>
1(t,n)=>{const i=t.length;return n===void 0||r.skipNull&&n===null||r.skipEmptyString&&n===""?t:n===null?[...t,[K(e,r),"[",i,"]"].join("")]:[...t,[K(e,r),"[",K(i,r),"]=",K(n,r)].join("")]};case"bracket":return e=>(t,n)=>n===void 0||r.skipNull&&n===null||r.skipEmptyString&&n===""?t:n===null?[...t,[K(e,r),"[]"].join("")]:[...t,[K(e,r),"[]=",K(n,r)].join("")];case"colon-list-separator":return e=>(t,n)=>n===void 0||r.skipNull&&n===null||r.skipEmptyString&&n===""?t:n===null?[...t,[K(e,r),":list="].join("")]:[...t,[K(e,r),":list=",K(n,r)].join("")];case"comma":case"separator":case"bracket-separator":{const e=r.arrayFormat==="bracket-separator"?"[]=":"=";return t=>(n,i)=>i===void 0||r.skipNull&&i===null||r.skipEmptyString&&i===""?n:(i=i===null?"":i,n.length===0?[[K(t,r),e,K(i,r)].join("")]:[[n,K(i,r)].join(r.arrayFormatSeparator)])}default:return e=>(t,n)=>n===void 0||r.skipNull&&n===null||r.skipEmptyString&&n===""?t:n===null?[...t,K(e,r)]:[...t,[K(e,r),"=",K(n,r)].join("")]}}function ur(r){let e;switch(r.arrayFormat){case"index":return(t,n,i)=>{if(e=/\[(\d*)]$/.exec(t),t=t.replace(/\[\d*]$/,""),!e){i[t]=n;return}i[t]===void 0&&(i[t]={}),i[t][e[1]]=n};case"bracket":return(t,n,i)=>{if(e=/(\[])$/.exec(t),t=t.replace(/\[]$/,""),!e){i[t]=n;return}if(i[t]===void 0){i[t]=[n];return}i[t]=[...i[t],n]};case"colon-list-separator":return(t,n,i)=>{if(e=/(:list)$/.exec(t),t=t.replace(/:list$/,""),!e){i[t]=n;return}if(i[t]===void 0){i[t]=[n];return}i[t]=[...i[t],n]};case"comma":case"separator":return(t,n,i)=>{const o=typeof n=="string"&&n.includes(r.arrayFormatSeparator),s=typeof n=="string"&&!o&&ie(n,r).includes(r.arrayFormatSeparator);n=s?ie(n,r):n;const a=o||s?n.split(r.arrayFormatSeparator).map(h=>ie(h,r)):n===null?n:ie(n,r);i[t]=a};case"bracket-separator":return(t,n,i)=>{const o=/(\[])$/.test(t);if(t=t.replace(/\[]$/,""),!o){i[t]=n&&ie(n,r);return}const s=n===null?[]:n.split(r.arrayFormatSeparator).map(a=>ie(a,r));if(i[t]===void 0){i[t]=s;return}i[t]=[...i[t],...s]};default:return(t,n,i)=>{if(i[t]===void 0){i[t]=n;return}i[t]=[...[i[t]].flat(),n]}}}function Pt(r){if(typeof r!="string"||r.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function K(r,e){return e.encode?e.strict?sr(r):encodeURIComponent(r):r}function ie(r,e){return e.decode?nr(r):r}function Ut(r){return Array.isArray(r)?r.sort():typeof r=="object"?Ut(Object.keys(r)).sort((e,t)=>Number(e)-Number(t)).map(e=>r[e]):r}function Dt(r){const e=r.indexOf("#");return e!==-1&&(r=r.slice(0,e)),r}function lr(r){let e="";const t=r.indexOf("#");return t!==-1&&(e=r.slice(t)),e}function yt(r,e){return e.parseNumbers&&!Number.isNaN(Number(r))&&typeof r=="string"&&r.trim()!==""?r=Number(r):e.parseBooleans&&r!==null&&(r.toLowerCase()==="true"||r.toLowerCase()==="false")&&(r=r.toLowerCase()==="true"),r}function et(r){r=Dt(r);const e=r.indexOf("?");return e===-1?"":r.slice(e+1)}function tt(r,e){e={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,...e},Pt(e.arrayFormatSeparator);const t=ur(e),n=Object.create(null);if(typeof r!="string"||(r=r.trim().replace(/^[?#&]/,""),!r))return n;for(const i of r.split("&")){if(i==="")continue;const o=e.decode?i.replace(/\+/g," "):i;let[s,a]=Ct(o,"=");s===void 0&&(s=o),a=a===void 0?null:["comma","separator","bracket-separator"].includes(e.arrayFormat)?a:ie(a,e),t(ie(s,e),a,n)}for(const[i,o]of Object.entries(n))if(typeof o=="object"&&o!==null)for(const[s,a]of Object.entries(o))o[s]=yt(a,e);else n[i]=yt(o,e);return e.sort===!1?n:(e.sort===!0?Object.keys(n).sort():Object.keys(n).sort(e.sort)).reduce((i,o)=>{const s=n[o];return Boolean(s)&&typeof s=="object"&&!Array.isArray(s)?i[o]=Ut(s):i[o]=s,i},Object.create(null))}function kt(r,e){if(!r)return"";e={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...e},Pt(e.arrayFormatSeparator);const t=s=>e.skipNull&&or(r[s])||e.skipEmptyString&&r[s]==="",n=ar(e),i={};for(const[s,a]of Object.entries(r))t(s)||(i[s]=a);const o=Object.keys(i);return e.sort!==!1&&o.sort(e.sort),o.map(s=>{const a=r[s];return a===void 0?"":a===null?K(s,e):Array.isArray(a)?a.length===0&&e.arrayFormat==="bracket-separator"?K(s,e)+"[]":a.reduce(n(s),[]).join("&"):K(s,e)+"="+K(a,e)}).filter(s=>s.length>0).join("&")}function Mt(r,e){var i,o;e={decode:!0,...e};let[t,n]=Ct(r,"#");return t===void 0&&(t=r),{url:(o=(i=t==null?void 0:t.split("?"))==null?void 0:i[0])!=null?o:"",query:tt(et(r),e),...e&&e.parseFragmentIdentifier&&n?{fragmentIdentifier:ie(n,e)}:{}}}function xt(r,e){e={encode:!0,strict:!0,[We]:!0,...e};const t=Dt(r.url).split("?")[0]||"",n=et(r.url),i={...tt(n,{sort:!1}),...r.query};let o=kt(i,e);o&&(o=`?${o}`);let s=lr(r.url);if(r.fragmentIdentifier){const a=new URL(t);a.hash=r.fragmentIdentifier,s=e[We]?a.hash:`#${r.fragmentIdentifier}`}return`${t}${o}${s}`}function Lt(r,e,t){t={parseFragmentIdentifier:!0,[We]:!1,...t};const{url:n,query:i,fragmentIdentifier:o}=Mt(r,t);return xt({url:n,query:ir(i,e),fragmentIdentifier:o},t)}function cr(r,e,t){const n=Array.isArray(e)?i=>!e.includes(i):(i,o)=>!e(i,o);return Lt(r,n,t)}var Ve=Object.freeze(Object.defineProperty({__proto__:null,extract:et,parse:tt,stringify:kt,parseUrl:Mt,stringifyUrl:xt,pick:Lt,exclude:cr},Symbol.toStringTag,{value:"Module"})),Ke={exports:{}};(function(r,e){(function(t,n){var i="0.7.33",o="",s="?",a="function",h="undefined",I="object",O="string",T="major",p="model",v="name",u="type",d="vendor",b="version",q="architecture",W="console",A="mobile",R="tablet",l="smarttv",w="wearable",f="embedded",P=350,L="Amazon",V="Apple",$="ASUS",y="BlackBerry",g="Browser",m="Chrome",_="Edge",be="Firefox",Ie="Google",at="Huawei",De="LG",ke="Microsoft",ut="Motorola",Se="Opera",Me="Samsung",lt="Sharp",we="Sony",xe="Xiaomi",Le="Zebra",ct="Facebook",$t=function(U,M){var D={};for(var B in U)M[B]&&M[B].length%2===0?D[B]=M[B].concat(U[B]):D[B]=U[B];return D},Oe=function(U){for(var M={},D=0;D<U.length;D++)M[U[D].toUpperCase()]=U[D];return M},ft=function(U,M){return typeof U===O?ve(M).indexOf(ve(U))!==-1:!1},ve=function(U){return U.toLowerCase()},Jt=function(U){return typeof U===O?U.replace(/[^\d\.]/g,o).split(".")[0]:n},Fe=function(U,M){if(typeof U===O)return U=U.replace(/^\s\s*/,o),typeof M===h?U:U.substring(0,P)},ge=function(U,M){for(var D=0,B,k,Te,F,me,re;D<M.length&&!me;){var ht=M[D],vt=M[D+1];for(B=k=0;B<ht.length&&!me;)if(me=ht[B++].exec(U),me)for(Te=0;Te<vt.length;Te++)re=me[++k],F=vt[Te],typeof F===I&&F.length>0?F.length===2?typeof F[1]==a?this[F[0]]=F[1].call(this,re):this[F[0]]=F[1]:F.length===3?typeof F[1]===a&&!(F[1].exec&&F[1].test)?this[F[0]]=re?F[1].call(this,re,F[2]):n:this[F[0]]=re?re.replace(F[1],F[2]):n:F.length===4&&(this[F[0]]=re?F[3].call(this,re.replace(F[1],F[2])):n):this[F]=re||n;D+=2}},qe=function(U,M){for(var D in M)if(typeof M[D]===I&&M[D].length>0){for(var B=0;B<M[D].length;B++)if(ft(M[D][B],U))return D===s?n:D}else if(ft(M[D],U))return D===s?n:D;return U},Qt={"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},dt={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},pt={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[b,[v,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[b,[v,"E
1dge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[v,b],[/opios[\/ ]+([\w\.]+)/i],[b,[v,Se+" Mini"]],[/\bopr\/([\w\.]+)/i],[b,[v,Se]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[v,b],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[b,[v,"UC"+g]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[b,[v,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[b,[v,"WeChat"]],[/konqueror\/([\w\.]+)/i],[b,[v,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[b,[v,"IE"]],[/yabrowser\/([\w\.]+)/i],[b,[v,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[v,/(.+)/,"$1 Secure "+g],b],[/\bfocus\/([\w\.]+)/i],[b,[v,be+" Focus"]],[/\bopt\/([\w\.]+)/i],[b,[v,Se+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[b,[v,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[b,[v,"Dolphin"]],[/coast\/([\w\.]+)/i],[b,[v,Se+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[b,[v,"MIUI "+g]],[/fxios\/([-\w\.]+)/i],[b,[v,be]],[/\bqihu|(qi?ho?o?|360)browser/i],[[v,"360 "+g]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[v,/(.+)/,"$1 "+g],b],[/(comodo_dragon)\/([\w\.]+)/i],[[v,/_/g," "],b],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[v,b],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[v],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[v,ct],b],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[v,b],[/\bgsa\/([\w\.]+) .*safari\//i],[b,[v,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[b,[v,m+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[v,m+" WebView"],b],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[b,[v,"Android "+g]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[v,b],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[b,[v,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[b,v],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[v,[b,qe,Qt]],[/(webkit|khtml)\/([\w\.]+)/i],[v,b],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[v,"Netscape"],b],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[b,[v,be+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[v,b],[/(cobalt)\/([\w\.]+)/i],[v,[b,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[q,"amd64"]],[/(ia32(?=;))/i],[[q,ve]],[/((?:i[346]|x)86)[;\)]/i],[[q,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[q,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[q,"armhf"]],[/windows (ce|mobile); ppc;/i],[[q,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[q,/ower/,o,ve]],[/(sun4\w)[;\)]/i],[[q,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[q,ve]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[p,[d,Me],[u,R]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[p,[d,Me],[u,A]],[/((ipod|iphone)\d+,\d+)/i],[p,[d,V],[u,A]],[/(ipad\d+,\d+)/i],[p,[d,V],[u,R]],[/\((ip(?:hone|od)[\w ]*);/i],[p,[d,V],[u,A]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[p,[d,V],[u,R]],[/(macintosh);/i],[p,[d,V]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[p,[d,at],[u,R]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[p,[d,at],[u,A]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[p,/_/g," "],[d,xe],[u,A]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[p,/_/g," "],[d,xe],[u,R]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[p,[d,"OPPO"],[u,A]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[p,[d,"Vivo"],[u,A]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[p,[d,"Realme"],[u,A]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[p,[d,ut],[u,A]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[p,[d,ut],[u,R]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[p,[d,De],[u,R]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[p,[d,De],[u,A]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[p,[d,"Lenovo"],[u,R]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[p,/_/g," "],[d,"Nokia"],[u,A]],[/(pixel c)\b/i],[p,[d,Ie],[u,R]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[p,[d,Ie],[u,A]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[p,[d,we],[u,A]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[p,"Xperia Tablet"],[d,we],[u,R]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[p,[d,"OnePlus"],[u,A]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[p,[d,L],[u,R]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[p,/(.+)/g,"Fire Phone $1"],[d,L],[u,A]],[/(playbook);[-\w\),; ]+(rim)/i],[p,d,[u,R]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[p,[d,y],[u,A]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[p,[d,$],[u,R]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[p,[d,$],[u,A]],[/(nexus 9)/i],[p,[d,"HTC"],[u,R]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony(?!-bra))[-_ ]?([-\w]*)/i],[d,[p,/_/g," "],[u,A]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[p,[d,"Acer"],[u,R]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[p,[d,"Meizu"],[u,A]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[p,[d,lt],[u,A]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asu
vendor: 8,485 bytes, line 1
1s)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[d,p,[u,A]],[/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[d,p,[u,R]],[/(surface duo)/i],[p,[d,ke],[u,R]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[p,[d,"Fairphone"],[u,A]],[/(u304aa)/i],[p,[d,"AT&T"],[u,A]],[/\bsie-(\w*)/i],[p,[d,"Siemens"],[u,A]],[/\b(rct\w+) b/i],[p,[d,"RCA"],[u,R]],[/\b(venue[\d ]{2,7}) b/i],[p,[d,"Dell"],[u,R]],[/\b(q(?:mv|ta)\w+) b/i],[p,[d,"Verizon"],[u,R]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[p,[d,"Barnes & Noble"],[u,R]],[/\b(tm\d{3}\w+) b/i],[p,[d,"NuVision"],[u,R]],[/\b(k88) b/i],[p,[d,"ZTE"],[u,R]],[/\b(nx\d{3}j) b/i],[p,[d,"ZTE"],[u,A]],[/\b(gen\d{3}) b.+49h/i],[p,[d,"Swiss"],[u,A]],[/\b(zur\d{3}) b/i],[p,[d,"Swiss"],[u,R]],[/\b((zeki)?tb.*\b) b/i],[p,[d,"Zeki"],[u,R]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[d,"Dragon Touch"],p,[u,R]],[/\b(ns-?\w{0,9}) b/i],[p,[d,"Insignia"],[u,R]],[/\b((nxa|next)-?\w{0,9}) b/i],[p,[d,"NextBook"],[u,R]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[d,"Voice"],p,[u,A]],[/\b(lvtel\-)?(v1[12]) b/i],[[d,"LvTel"],p,[u,A]],[/\b(ph-1) /i],[p,[d,"Essential"],[u,A]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[p,[d,"Envizen"],[u,R]],[/\b(trio[-\w\. ]+) b/i],[p,[d,"MachSpeed"],[u,R]],[/\btu_(1491) b/i],[p,[d,"Rotor"],[u,R]],[/(shield[\w ]+) b/i],[p,[d,"Nvidia"],[u,R]],[/(sprint) (\w+)/i],[d,p,[u,A]],[/(kin\.[onetw]{3})/i],[[p,/\./g," "],[d,ke],[u,A]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[p,[d,Le],[u,R]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[p,[d,Le],[u,A]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[d,p,[u,W]],[/droid.+; (shield) bui/i],[p,[d,"Nvidia"],[u,W]],[/(playstation [345portablevi]+)/i],[p,[d,we],[u,W]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[p,[d,ke],[u,W]],[/smart-tv.+(samsung)/i],[d,[u,l]],[/hbbtv.+maple;(\d+)/i],[[p,/^/,"SmartTV"],[d,Me],[u,l]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[d,De],[u,l]],[/(apple) ?tv/i],[d,[p,V+" TV"],[u,l]],[/crkey/i],[[p,m+"cast"],[d,Ie],[u,l]],[/droid.+aft(\w)( bui|\))/i],[p,[d,L],[u,l]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[p,[d,lt],[u,l]],[/(bravia[\w ]+)( bui|\))/i],[p,[d,we],[u,l]],[/(mitv-\w{5}) bui/i],[p,[d,xe],[u,l]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[d,Fe],[p,Fe],[u,l]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[u,l]],[/((pebble))app/i],[d,p,[u,w]],[/droid.+; (glass) \d/i],[p,[d,Ie],[u,w]],[/droid.+; (wt63?0{2,3})\)/i],[p,[d,Le],[u,w]],[/(quest( 2)?)/i],[p,[d,ct],[u,w]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[d,[u,f]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[p,[u,A]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[p,[u,R]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[u,R]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[u,A]],[/(android[-\w\. ]{0,9});.+buil/i],[p,[d,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[b,[v,_+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[b,[v,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i],[v,b],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[b,v]],os:[[/microsoft (windows) (vista|xp)/i],[v,b],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[v,[b,qe,dt]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[v,"Windows"],[b,qe,dt]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[b,/_/g,"."],[v,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[v,"Mac OS"],[b,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[b,v],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[v,b],[/\(bb(10);/i],[b,[v,y]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[b,[v,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[b,[v,be+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[b,[v,"webOS"]],[/crkey\/([\d\.]+)/i],[b,[v,m+"cast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[v,"Chromium OS"],b],[/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[v,b],[/(sunos) ?([\w\.\d]*)/i],[[v,"Solaris"],b],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[v,b]]},Z=function(U,M){if(typeof U===I&&(M=U,U=n),!(this instanceof Z))return new Z(U,M).getResult();var D=U||(typeof t!==h&&t.navigator&&t.navigator.userAgent?t.navigator.userAgent:o),B=M?$t(pt,M):pt;return this.getBrowser=function(){var k={};return k[v]=n,k[b]=n,ge.call(k,D,B.browser),k.major=Jt(k.version),k},this.getCPU=function(){var k={};return k[q]=n,ge.call(k,D,B.cpu),k},this.getDevice=function(){var k={};return k[d]=n,k[p]=n,k[u]=n,ge.call(k,D,B.device),k},this.getEngine=function(){var k={};return k[v]=n,k[b]=n,ge.call(k,D,B.engine),k},this.getOS=function(){var k={};return k[v]=n,k[b]=n,ge.call(k,D,B.os),k},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return D},this.setUA=function(k){return D=typeof k===O&&k.length>P?Fe(k,P):k,this},this.setUA(D),this};Z.VERSION=i,Z.BROWSER=Oe([v,b,T]),Z.CPU=Oe([q]),Z.DEVICE=Oe([p,d,u,W,A,l,R,w,f]),Z.ENGINE=Z.OS=Oe([v,b]),r.exports&&(e=r.exports=Z),e.UAParser=Z;var de=typeof t!==h&&(t.jQuery||t.Zepto);if(de&&!de.ua){var Ne=new Z;de.ua=Ne.getResult(),de.ua.get=function(){return Ne.getUA()},de.ua.set=function(U){Ne.setUA(U);var M=Ne.getResult();for(var D in M)de.ua[D]=M[D]}}})(typeof window=="object"?window:Tt)})(Ke,Ke.exports);var fr=Ke.exports,dr=function(){function r(){}return r.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:pr(),platform:"Web",os:void 0,deviceModel:void 0}},r}(),pr=function(){return typeof navigator!="undefined"&&(navigator.languages&&navigator.languages[0]||navigator.language)||""},hr=function(){function r(){this.queue=[]}return r.prototype.logEvent=function(e){this.receiver?this.receiver(e):this.queue.length<512&&this.queue.push(e)},r.prototype.setEventReceiver=function(e){this.receiver=e,this.queue.length>0&&(this.queue.forEach(function(t){e(t)}),this.queue=[])},r}(),ae=function(){return ae=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},ae.apply(this,arguments)};function Ae(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function _t(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(s)throw s.error}}return o}var Re=function(r,e){var t,n,i=["string","number","boolean","undefined"],o=typeof r,s=typeof e;if(o!==s)return!1;try{for(var a=Ae(i),h=a.next();!h.done;h=a.next()){var I=h.value;if(I===o)return r===e}}catch(b){t={error:b}}finally{try{h&&!h.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}if(r==null&&e==null)return!0;
1if(r==null||e==null||r.length!==e.length)return!1;var O=Array.isArray(r),T=Array.isArray(e);if(O!==T)return!1;if(O&&T){for(var p=0;p<r.length;p++)if(!Re(r[p],e[p]))return!1}else{var v=Object.keys(r).sort(),u=Object.keys(e).sort();if(!Re(v,u))return!1;var d=!0;return Object.keys(r).forEach(function(b){Re(r[b],e[b])||(d=!1)}),d}return!0},vr="$set",gr="$unset",mr="$clearAll";Object.entries||(Object.entries=function(r){for(var e=Object.keys(r),t=e.length,n=new Array(t);t--;)n[t]=[e[t],r[e[t]]];return n});var yr=function(){function r(){this.identity={userProperties:{}},this.listeners=new Set}return r.prototype.editIdentity=function(){var e=this,t=ae({},this.identity.userProperties),n=ae(ae({},this.identity),{userProperties:t});return{setUserId:function(i){return n.userId=i,this},setDeviceId:function(i){return n.deviceId=i,this},setUserProperties:function(i){return n.userProperties=i,this},setOptOut:function(i){return n.optOut=i,this},updateUserProperties:function(i){var o,s,a,h,I,O,T=n.userProperties||{};try{for(var p=Ae(Object.entries(i)),v=p.next();!v.done;v=p.next()){var u=_t(v.value,2),d=u[0],b=u[1];switch(d){case vr:try{for(var q=(a=void 0,Ae(Object.entries(b))),W=q.next();!W.done;W=q.next()){var A=_t(W.value,2),R=A[0],l=A[1];T[R]=l}}catch(P){a={error:P}}finally{try{W&&!W.done&&(h=q.return)&&h.call(q)}finally{if(a)throw a.error}}break;case gr:try{for(var w=(I=void 0,Ae(Object.keys(b))),f=w.next();!f.done;f=w.next()){var R=f.value;delete T[R]}}catch(P){I={error:P}}finally{try{f&&!f.done&&(O=w.return)&&O.call(w)}finally{if(I)throw I.error}}break;case mr:T={};break}}}catch(P){o={error:P}}finally{try{v&&!v.done&&(s=p.return)&&s.call(p)}finally{if(o)throw o.error}}return n.userProperties=T,this},commit:function(){return e.setIdentity(n),this}}},r.prototype.getIdentity=function(){return ae({},this.identity)},r.prototype.setIdentity=function(e){var t=ae({},this.identity);this.identity=ae({},e),Re(t,this.identity)||this.listeners.forEach(function(n){n(e)})},r.prototype.addIdentityListener=function(e){this.listeners.add(e)},r.prototype.removeIdentityListener=function(e){this.listeners.delete(e)},r}(),ye=typeof globalThis!="undefined"?globalThis:typeof global!="undefined"?global:self,_r=function(){function r(){this.identityStore=new yr,this.eventBridge=new hr,this.applicationContextProvider=new dr}return r.getInstance=function(e){return ye.analyticsConnectorInstances||(ye.analyticsConnectorInstances={}),ye.analyticsConnectorInstances[e]||(ye.analyticsConnectorInstances[e]=new r),ye.analyticsConnectorInstances[e]},r}();function Et(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function Y(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Et(Object(t),!0).forEach(function(n){he(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Et(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function ze(r){return ze=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ze(r)}function rt(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function bt(r,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,qt(n.key),n)}}function nt(r,e,t){return e&&bt(r.prototype,e),t&&bt(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r}function he(r,e,t){return e=qt(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Er(r){return br(r)||Ir(r)||Ft(r)||Sr()}function br(r){if(Array.isArray(r))return He(r)}function Ir(r){if(typeof Symbol!="undefined"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function Ft(r,e){if(!!r){if(typeof r=="string")return He(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Array.from(r);
1if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return He(r,e)}}function He(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}function Sr(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 2In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wr(r,e){var t=typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=Ft(r))||e&&r&&typeof r.length=="number"){t&&(r=t);var n=0,i=function(){};return{s:i,n:function(){return n>=r.length?{done:!0}:{done:!1,value:r[n++]}},e:function(h){throw h},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. 3In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,s=!1,a;return{s:function(){t=t.call(r)},n:function(){var h=t.next();return o=h.done,h},e:function(h){s=!0,a=h},f:function(){try{!o&&t.return!=null&&t.return()}finally{if(s)throw a}}}}function Or(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function qt(r){var e=Or(r,"string");return typeof e=="symbol"?e:String(e)}var E={DEFAULT_INSTANCE:"$default_instance",API_VERSION:2,MAX_STRING_LENGTH:4096,MAX_PROPERTY_KEYS:1e3,IDENTIFY_EVENT:"$identify",GROUP_IDENTIFY_EVENT:"$groupidentify",EVENT_LOG_URL:"api.amplitude.com",EVENT_LOG_EU_URL:"api.eu.amplitude.com",DYNAMIC_CONFIG_URL:"regionconfig.amplitude.com",DYNAMIC_CONFIG_EU_URL:"regionconfig.eu.amplitude.com",LAST_EVENT_ID:"amplitude_lastEventId",LAST_EVENT_TIME:"amplitude_lastEventTime",LAST_IDENTIFY_ID:"amplitude_lastIdentifyId",LAST_SEQUENCE_NUMBER:"amplitude_lastSequenceNumber",SESSION_ID:"amplitude_sessionId",DEVICE_ID:"amplitude_deviceId",OPT_OUT:"amplitude_optOut",USER_ID:"amplitude_userId",DEVICE_ID_INDEX:0,USER_ID_INDEX:1,OPT_OUT_INDEX:2,SESSION_ID_INDEX:3,LAST_EVENT_TIME_INDEX:4,EVENT_ID_INDEX:5,IDENTIFY_ID_INDEX:6,SEQUENCE_NUMBER_INDEX:7,COOKIE_TEST_PREFIX:"amp_cookie_test",COOKIE_PREFIX:"amp",STORAGE_DEFAULT:"",STORAGE_COOKIES:"cookies",STORAGE_NONE:"none",STORAGE_LOCAL:"localStorage",STORAGE_SESSION:"sessionStorage",REVENUE_EVENT:"revenue_amount",REVENUE_PRODUCT_ID:"$productId",REVENUE_QUANTITY:"$quantity",REVENUE_PRICE:"$price",REVENUE_REVENUE_TYPE:"$revenueType",AMP_DEVICE_ID_PARAM:"amp_device_id",AMP_REFERRER_PARAM:"amp_referrer",REFERRER:"referrer",REFERRING_DOMAIN:"referring_domain",UTM_SOURCE:"utm_source",UTM_MEDIUM:"utm_medium",UTM_CAMPAIGN:"utm_campaign",UTM_TERM:"utm_term",UTM_CONTENT:"utm_content",ATTRIBUTION_EVENT:"[Amplitude] Attribution Captured",TRANSPORT_HTTP:"http",TRANSPORT_BEACON:"beacon"},It={encode: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(i&63|128)):(t+=String.fromCharCode(i>>12|224),t+=String.fromCharCode(i>>6&63|128),t+=String.fromCharCode(i&63|128))}return t},decode:function(e){for(var t="",n=0,i=0,o=0,s=0;n<e.length;)i=e.charCodeAt(n),i<128?(t+=String.fromCharCode(i),n++):i>191&&i<224?(o=e.charCodeAt(n+1),t+=String.fromCharCode((i&31)<<6|o&63),n+=2):(o=e.charCodeAt(n+1),s=e.charCodeAt(n+2),t+=String.fromCharCode((i&15)<<12|(o&63)<<6|s&63),n+=3);return t}},C=function(){if(typeof globalThis!="undefined")return globalThis;if(typeof window!="undefined")return window;if(typeof self!="undefined")return self;if(typeof global!="undefined")return global}(),Q={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(e){try{if(C.btoa&&C.atob)return C.btoa(unescape(encodeURIComponent(e)))}catch{}return Q._encode(e)},_encode:function(e){var t="",n,i,o,s,a,h,I,O=0;for(e=It.encode(e);O<e.length;)n=e.charCodeAt(O++),i=e.charCodeAt(O++),o=e.charCodeAt(O++),s=n>>2,a=(n&3)<<4|i>>4,h=(i&15)<<2|o>>6,I=o&63,isNaN(i)?h=I=64:isNaN(o)&&(I=64),t=t+Q._keyStr.charAt(s)+Q._keyStr.charAt(a)+Q._keyStr.charAt(h)+Q._keyStr.charAt(I);return t},decode:function(e){try{if(C.btoa&&C.atob)return decodeURIComponent(escape(C.atob(e)))}catch{}return Q._decode(e)},_decode:function(e){var t="",n,i,o,s,a,h,I,O=0;for(e=e.replace(/[^A-Za-z0-9+/=]/g,"");O<e.length;)s=Q._keyStr.indexOf(e.charAt(O++)),a=Q._keyStr.indexOf(e.charAt(O++)),h=Q._keyStr.indexOf(e.charAt(O++)),I=Q._keyStr.indexOf(e.charAt(O++)),n=s<<2|a>>4,i=(a&15)<<4|h>>2,o=(h&3)<<6|I,t=t+String.fromCharCode(n),h!==64&&(t=t+String.fromCharCode(i)),I!==64&&(t=t+String.fromCharCode(o));return t=It.decode(t),t}},Nr=Object.prototype.toString;function N(r){switch(Nr.call(r)){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 r===null?"null":r===void 0?"undefined":r!==r?"nan":r&&r.nodeType===1?"element":typeof Buffer!="undefined"&&typeof Buffer.isBuffer=="function"&&Buffer.isBuffer(r)?"buffer":(r=r.valueOf?r.valueOf():Object.prototype.valueOf.apply(r),ze(r))}var ce={DISABLE:0,ERROR:1,WARN:2,INFO:3},_e=ce.WARN,Tr=function(e){Object.prototype.hasOwnProperty.call(ce,e)&&(_e=ce[e])},Ar=function(){return _e},X={error:function(e){_e>=ce.ERROR&&Ge(e)},warn:function(e){_e>=ce.WARN&&Ge(e)},info:function(e){_e>=ce.INFO&&Ge(e)}},Ge=function(e){try{console.log("[Amplitude] "+e)}catch{}},Rr=function(e){return!e||e.length===0},Cr=function(){try{if(C.sessionStorage)return!0}catch{}return!1},Pr=function r(e){if(N(e)==="array")for(var t=0;t<e.length;t++)e[t]=r(e[t]);else if(N(e)==="object")for(var n in e)n in e&&(e[n]=r(e[n]));else e=Ur(e);return e},Ur=function(e){return N(e)==="string"&&e.length>E.MAX_STRING_LENGTH?e.substring(0,E.MAX_STRING_LENGTH):e},Pe=function(e,t,n){return N(e)!==n?(X.error("Invalid "+t+" input type. Expected "+n+" but received "+N(e)),!1):!0},Dr=function(e){return Pe(e,"deviceId","string")?e.indexOf(".")>=0?(X.error(`Device IDs may not contain '.' characters. Value will be ignored: "`.concat(e,'"')),!1):!0:!1},kr=function(e){return Pe(e,"transport","string")?e!==E.TRANSPORT_HTTP&&e!==E.TRANSPORT_BEACON?(X.error("transport value must be one of '".concat(E.TRANSPORT_BEACON,"' or '").concat(E.TRANSPORT_HTTP,"'")),!1):e!==E.TRANSPORT_HTTP&&typeof navigator!="undefined"&&!navigator.sendBeacon?(X.error("browser does not support sendBeacon, so transport must be HTTP"),!1):!0:!1},Xe=function(e){var t=N(e);if(t!=="object")return X.error("Error: invalid properties format. Expecting Javascript object, received "+t+", ignoring"),{};if(Object.keys(e).length>E.MAX_PROPERTY_KEYS)return X.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,s=N(o);s!=="string"&&(o=String(o),X.warn("WARNING: Non-string property key, received type "+s+', coercing to string "'+o+'"'));var a=xr(o,e[i]);a!==null&&(n[o]=a)}return n},Mr=["nan","function","arguments","regexp","element"],xr=function r(e,t){var n=N(t);if(Mr.indexOf(n)!==-1)X.warn('WARNING: Property key "'+e+'" with invali
3d value type '+n+", ignoring"),t=null;else if(n==="undefined")t=null;else if(n==="error")t=String(t),X.warn('WARNING: Property key "'+e+'" with value type error, coercing to '+t);else if(n==="array"){for(var i=[],o=0;o<t.length;o++){var s=t[o],a=N(s);if(a==="array"){X.warn("WARNING: Cannot have "+a+" nested in an array property value, skipping");continue}else a==="object"?i.push(Xe(s)):i.push(r(e,s))}t=i}else n==="object"&&(t=Xe(t));return t},Lr=function(e){var t=N(e);if(t!=="object")return X.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,s=N(o);s!=="string"&&(o=String(o),X.warn("WARNING: Non-string groupType, received type "+s+', coercing to string "'+o+'"'));var a=Fr(o,e[i]);a!==null&&(n[o]=a)}return n},Fr=function(e,t){var n=N(t);if(n==="string")return t;if(n==="date"||n==="number"||n==="boolean")return t=String(t),X.warn("WARNING: Non-string groupName, received type "+n+', coercing to string "'+t+'"'),t;if(n==="array"){for(var i=[],o=0;o<t.length;o++){var s=t[o],a=N(s);if(a==="array"||a==="object"){X.warn("WARNING: Skipping nested "+a+" in array groupName");continue}else a==="string"?i.push(s):(a==="date"||a==="number"||a==="boolean")&&(s=String(s),X.warn("WARNING: Non-string groupName, received type "+a+', coercing to string "'+s+'"'),i.push(s))}return i}X.warn("WARNING: Non-string groupName, received type "+n+". Please use strings or array of strings for groupName")},qr=function(e,t){e=e.replace(/[[]/,"\\[").replace(/[\]]/,"\\]");var n=new RegExp("[\\?&]"+e+"=([^&#]*)"),i=n.exec(t);return i===null?void 0:decodeURIComponent(i[1].replace(/\+/g," "))},Vr=function(){return typeof WorkerGlobalScope!="undefined"},Gr=function(e){return Pe(e,"sessionId","number")&&new Date(e).getTime()>0?!0:(X.error("sessionId value must in milliseconds since epoch (Unix Timestamp)"),!1)},jr=function(){return C.location},Br=function(e){var t=C.location?C.location.hostname:"";if(e){if(typeof document!="undefined"){var n=document.createElement("a");return n.href=e,n.hostname||t}if(typeof URL=="function"){var i=new URL(e);return i.hostname||t}}return t},c={setLogLevel:Tr,getLogLevel:Ar,logLevels:ce,log:X,isEmptyString:Rr,isWebWorkerEnvironment:Vr,getQueryParam:qr,sessionStorageEnabled:Cr,truncate:Pr,validateGroups:Lr,validateInput:Pe,validateProperties:Xe,validateDeviceId:Dr,validateTransport:kr,validateSessionId:Gr,getLocation:jr,getHost:Br},Vt=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(o.indexOf(e)===0){n=o.substring(e.length,o.length);break}}return n}catch{return null}},Wr=function(e){try{var t=document.cookie.split(";").map(function(a){return a.trimStart()}),n=[],i=wr(t),o;try{for(i.s();!(o=i.n()).done;){for(var s=o.value;s.charAt(0)===" ";)s=s.substring(1);s.indexOf(e)===0&&n.push(s.substring(e.length))}}catch(a){i.e(a)}finally{i.f()}return n}catch{return[]}},Ye=function(e,t,n){var i=t!==null?n.expirationDays:-1;if(i){var o=new Date;o.setTime(o.getTime()+i*24*60*60*1e3),i=o}var s=e+"="+t;i&&(s+="; expires="+i.toUTCString()),s+="; path=/",n.domain&&(s+="; domain="+n.domain),n.secure&&(s+="; Secure"),n.sameSite&&(s+="; SameSite="+n.sameSite),document.cookie=s},$e=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",t=e.split(".")[E.LAST_EVENT_TIME_INDEX],n;return t&&(n=parseInt(t,32)),n||(c.log.warn("unable to parse malformed cookie: ".concat(e)),0)},Kr=function(e){return Er(e).sort(function(t,n){var i=$e(t),o=$e(n);return o-i})},zr=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=E.COOKIE_TEST_PREFIX;if(typeof document=="undefined")return!1;var n=!1;try{var i=String(Date.now());Ye(t,i,e),c.log.info("Testing if cookies available"),n=Vt(t+"=")===i}catch(o){c.log.warn('Error thrown when checking for cookies. Reason: "'.concat(o,'"'))}finally{c.log.info("Cleaning up cookies availability test"),Ye(t,null,e)}return n},z={set:Ye,get:Vt,getAll:Wr,getLastEventTime:$e,sortByEventTime:Kr,areCookiesEnabled:zr},Hr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",it=function(){for(var e="",t=0;t<22;++t)e+=Hr.charAt(Math.floor(Math.random()*64));return e},Gt=function(e){var t=c.getHost(e),n=t.split("."),i=[],o="_tldtest_"+it();if(c.isWebWorkerEnvironment())return"";for(var s=n.length-2;s>=0;--s)i.push(n.slice(s).join("."));for(var a=0;a<i.length;++a){var h=i[a],I={domain:"."+h};if(z.set(o,1,I),z.get(o))return z.set(o,null,I),h}return""},J={expirationDays:void 0,domain:void 0},Xr=function(){J={expirationDays:void 0,domain:void 0}},Yr=function(e){if(arguments.length===0)return J;e=e||{},J.expirationDays=e.expirationDays,J.secure=e.secure,J.sameSite=e.sameSite;var t=c.isEmptyString(e.domain)?"."+Gt(c.getLocation().href):e.domain,n=Math.random();J.domain=t,Bt("amplitude_test",n);var i=jt("amplitude_test");return(!i||i!==n)&&(t=null),Wt("amplitude_test"),J.domain=t,J},Ee=function(e){var t="";return J.domain&&(t=J.domain.charAt(0)==="."?J.domain.substring(1):J.domain),e+t},jt=function(e){var t=Ee(e)+"=",n=z.get(t);try{if(n)return JSON.parse(Q.decode(n))}catch{return null}return null},Bt=function(e,t){try{return z.set(Ee(e),Q.encode(JSON.stringify(t)),J),!0}catch{return!1}},$r=function(e,t){try{return z.set(Ee(e),t,J),!0}catch{return!1}},Jr=function(e){var t=Ee(e)+"=";return z.get(t)},Wt=function(e){try{return z.set(Ee(e),null,J),!0}catch{return!1}},Qr={reset:Xr,options:Yr,get:jt,set:Bt,remove:Wt,setRaw:$r,getRaw:Jr},Zr=function(){function r(){rt(this,r),this.map=new Map,this.length=0}return nt(r,[{key:"key",value:function(t){var n=Array.from(this.map.
3keys()),i=n[t];return this.map.get(i)}},{key:"getItem",value:function(t){return this.map.get(t)}},{key:"setItem",value:function(t,n){this.map.has(t)||(this.length+=1),this.map.set(t,n)}},{key:"removeItem",value:function(t){this.map.has(t)&&(this.length-=1,this.map.delete(t))}},{key:"clear",value:function(){this.map.clear(),this.length=0}}]),r}(),se;{var en=function(){var e=new Date,t;try{return C.localStorage.setItem(e,e),t=C.localStorage.getItem(e)===String(e),C.localStorage.removeItem(e),t}catch{}return!1};if(en())se=C.localStorage;else if(typeof C!="undefined"&&C.globalStorage)try{se=C.globalStorage[C.location.hostname]}catch{}else if(typeof document!="undefined"){var G=document.createElement("div"),ne="localStorage";G.style.display="none",document.getElementsByTagName("head")[0].appendChild(G),G.addBehavior&&(G.addBehavior("#default#userdata"),se={length:0,setItem:function(e,t){G.load(ne),G.getAttribute(e)||this.length++,G.setAttribute(e,t),G.save(ne)},getItem:function(e){return G.load(ne),G.getAttribute(e)},removeItem:function(e){G.load(ne),G.getAttribute(e)&&this.length--,G.removeAttribute(e),G.save(ne)},clear:function(){G.load(ne);for(var e=0,t;t=G.XMLDocument.documentElement.attributes[e++];)G.removeAttribute(t.name);G.save(ne),this.length=0},key:function(e){return G.load(ne),G.XMLDocument.documentElement.attributes[e]}},G.load(ne),se.length=G.XMLDocument.documentElement.attributes.length)}else c.isWebWorkerEnvironment()&&(se=new Zr);se||(se={length:0,setItem:function(e,t){},getItem:function(e){},removeItem:function(e){},clear:function(){},key:function(e){}})}var ee=se,Kt=function(){this.storage=null};Kt.prototype.getStorage=function(r){if(this.storage!==null)return this.storage;if(!r&&z.areCookiesEnabled())this.storage=Qr;else{var e="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(n){return arguments.length===0?this._options:(n=n||{},this._options.expirationDays=n.expirationDays||this._options.expirationDays,this._options.domain=n.domain||this._options.domain||C&&C.location&&C.location.hostname,this._options.secure=n.secure||!1)},get:function(n){try{return JSON.parse(ee.getItem(e+n))}catch{}return null},set:function(n,i){try{return ee.setItem(e+n,JSON.stringify(i)),!0}catch{}return!1},remove:function(n){try{ee.removeItem(e+n)}catch{return!1}}}}return this.storage};var pe,tn=(pe={},he(pe,E.STORAGE_COOKIES,!0),he(pe,E.STORAGE_NONE,!0),he(pe,E.STORAGE_LOCAL,!0),he(pe,E.STORAGE_SESSION,!0),pe),rn=function(){function r(e){var t=e.storageKey,n=e.disableCookies,i=e.domain,o=e.secure,s=e.sameSite,a=e.expirationDays,h=e.storage;rt(this,r),this.storageKey=t,this.domain=i,this.secure=o,this.sameSite=s,this.expirationDays=a,this.cookieDomain="";var I=c.getLocation()?c.getLocation().href:void 0,O=n?"":Gt(I);if(this.cookieDomain=i||(O?"."+O:null),tn[h])this.storage=h;else{var T=n||!z.areCookiesEnabled({domain:this.cookieDomain,secure:this.secure,sameSite:this.sameSite,expirationDays:this.expirationDays});T?this.storage=E.STORAGE_LOCAL:this.storage=E.STORAGE_COOKIES}}return nt(r,[{key:"getCookieStorageKey",value:function(){if(!this.domain)return this.storageKey;var t=this.domain.charAt(0)==="."?this.domain.substring(1):this.domain;return"".concat(this.storageKey).concat(t?"_".concat(t):"")}},{key:"save",value:function(t){var n=t.deviceId,i=t.userId,o=t.optOut,s=t.sessionId,a=t.lastEventTime,h=t.eventId,I=t.identifyId,O=t.sequenceNumber;if(this.storage!==E.STORAGE_NONE){var T=[n,Q.encode(i||""),o?"1":"",s?s.toString(32):"0",a?a.toString(32):"0",h?h.toString(32):"0",I?I.toString(32):"0",O?O.toString(32):"0"].join(".");switch(this.storage){case E.STORAGE_SESSION:C.sessionStorage&&C.sessionStorage.setItem(this.storageKey,T);break;case E.STORAGE_LOCAL:ee.setItem(this.storageKey,T);break;case E.STORAGE_COOKIES:this.saveCookie(T);break}}}},{key:"saveCookie",value:function(t){z.set(this.getCookieStorageKey(),t,{domain:this.cookieDomain,secure:this.secure,sameSite:this.sameSite,expirationDays:this.expirationDays})}},{key:"load",value:function(){var t=this,n;if(this.storage===E.STORAGE_COOKIES){var i=this.getCookieStorageKey()+"=",o=z.getAll(i);if(o.length===0||o.length===1)n=o[0];
3else{var s=z.sortByEventTime(o)[0];o.forEach(function(){return z.set(t.getCookieStorageKey(),null,{})}),this.saveCookie(s),n=z.get(i)}}if(n||(n=ee.getItem(this.storageKey)),!n)try{n=C.sessionStorage&&C.sessionStorage.getItem(this.storageKey)}catch(I){c.log.info('window.sessionStorage unavailable. Reason: "'.concat(I,'"'))}if(!n)return null;var a=n.split("."),h=null;if(a[E.USER_ID_INDEX])try{h=Q.decode(a[E.USER_ID_INDEX])}catch{h=null}return{deviceId:a[E.DEVICE_ID_INDEX],userId:h,optOut:a[E.OPT_OUT_INDEX]==="1",sessionId:parseInt(a[E.SESSION_ID_INDEX],32),lastEventTime:parseInt(a[E.LAST_EVENT_TIME_INDEX],32),eventId:parseInt(a[E.EVENT_ID_INDEX],32),identifyId:parseInt(a[E.IDENTIFY_ID_INDEX],32),sequenceNumber:parseInt(a[E.SEQUENCE_NUMBER_INDEX],32)}}},{key:"clear",value:function(){var t;if(this.storage===E.STORAGE_COOKIES&&(t=z.get(this.getCookieStorageKey()+"="),z.set(this.getCookieStorageKey(),null,{domain:this.cookieDomain,secure:this.secure,sameSite:this.sameSite,expirationDays:0})),t||(t=ee.getItem(this.storageKey),ee.clear()),!t)try{t=C.sessionStorage&&C.sessionStorage.getItem(this.storageKey),C.sessionStorage.clear()}catch(n){c.log.info('window.sessionStorage unavailable. Reason: "'.concat(n,'"'))}return!!t}}]),r}(),nn=function(e,t){var n=e?"?"+e.split(".").slice(-1)[0].replace(/\|/g,"&"):"",i=function(v,u,d,b){return c.getQueryParam(v,u)||c.getQueryParam(d,b)},o=i(E.UTM_SOURCE,t,"utmcsr",n),s=i(E.UTM_MEDIUM,t,"utmcmd",n),a=i(E.UTM_CAMPAIGN,t,"utmccn",n),h=i(E.UTM_TERM,t,"utmctr",n),I=i(E.UTM_CONTENT,t,"utmcct",n),O={},T=function(v,u){c.isEmptyString(u)||(O[v]=u)};return T(E.UTM_SOURCE,o),T(E.UTM_MEDIUM,s),T(E.UTM_CAMPAIGN,a),T(E.UTM_TERM,h),T(E.UTM_CONTENT,I),O},on="$add",sn="$append",Je="$clearAll",an="$prepend",un="$set",ln="$setOnce",cn="$unset",fn="$preInsert",dn="$postInsert",pn="$remove",j=function(){this.userPropertiesOperations={},this.properties=[]};j.prototype.add=function(r,e){return N(e)==="number"||N(e)==="string"?this._addOperation(on,r,e):c.log.error("Unsupported type for value: "+N(e)+", expecting number or string"),this};j.prototype.append=function(r,e){return this._addOperation(sn,r,e),this};j.prototype.clearAll=function(){return Object.keys(this.userPropertiesOperations).length>0?(Object.prototype.hasOwnProperty.call(this.userPropertiesOperations,Je)||c.log.error("Need to send $clearAll on its own Identify object without any other operations, skipping $clearAll"),this):(this.userPropertiesOperations[Je]="-",this)};j.prototype.prepend=function(r,e){return this._addOperation(an,r,e),this};j.prototype.set=function(r,e){return this._addOperation(un,r,e),this};j.prototype.setOnce=function(r,e){return this._addOperation(ln,r,e),this};j.prototype.unset=function(r){return this._addOperation(cn,r,"-"),this};j.prototype.preInsert=function(r,e){return this._addOperation(fn,r,e),this};j.prototype.postInsert=function(r,e){return this._addOperation(dn,r,e),this};j.prototype.remove=function(r,e){return this._addOperation(pn,r,e),this};j.prototype._addOperation=function(r,e,t){if(Object.prototype.hasOwnProperty.call(this.userPropertiesOperations,Je)){c.log.error("This identify already contains a $clearAll operation, skipping operation "+r);return}if(this.properties.indexOf(e)!==-1){c.log.error('User property "'+e+'" already used in this identify, skipping operation '+r);return}Object.prototype.hasOwnProperty.call(this.userPropertiesOperations,r)||(this.userPropertiesOperations[r]={}),this.userPropertiesOperations[r][e]=t,this.properties.push(e)};var zt=function(e,t,n){this.url=e,this.data=t||{},this.headers=n},hn="Cross-Origin-Resource-Policy";function vn(r,e){for(var t in e)t===hn&&!e[t]||r.setRequestHeader(t,e[t])}zt.prototype.send=function(r){var e=!!C.XDomainRequest;if(e){var t=new C.XDomainRequest;t.open("POST",this.url,!0),t.onload=function(){r(200,t.responseText)},t.onerror=function(){t.responseText==="Request Entity Too Large"?r(413,t.responseText):r(500,t.responseText)},t.ontimeout=function(){},t.onprogress=function(){},t.send(Ve.stringify(this.data))}else if(typeof XMLHttpRequest!="undefined"){var n=new XMLHttpRequest;n.open("POST",this.url,!0),n.onreadystatechange=function(){n.readyState===4&&r(n.status,n.responseText)},vn(n,this.headers),n.send(Ve.stringify(this.data))}else{var i=void 0;fetch(this.url,{method:"POST",headers:this.headers,body:Ve.stringify(this.data)}).then(function(o){return i=o.status,o.text()}).then(function(o){r(i,o)})}};var te=function(){this._price=null,this._productId=null,this._quantity=1,this._revenueType=null,this._properties=null};
3te.prototype.setProductId=function(e){return N(e)!=="string"?c.log.error("Unsupported type for productId: "+N(e)+", expecting string"):c.isEmptyString(e)?c.log.error("Invalid empty productId"):this._productId=e,this};te.prototype.setQuantity=function(e){return N(e)!=="number"?c.log.error("Unsupported type for quantity: "+N(e)+", expecting number"):this._quantity=parseInt(e),this};te.prototype.setPrice=function(e){return N(e)!=="number"?c.log.error("Unsupported type for price: "+N(e)+", expecting number"):this._price=e,this};te.prototype.setRevenueType=function(e){return N(e)!=="string"?c.log.error("Unsupported type for revenueType: "+N(e)+", expecting string"):this._revenueType=e,this};te.prototype.setEventProperties=function(e){return N(e)!=="object"?c.log.error("Unsupported type for eventProperties: "+N(e)+", expecting object"):this._properties=c.validateProperties(e),this};te.prototype._isValidRevenue=function(){return N(this._price)!=="number"?(c.log.error("Invalid revenue, need to set price field"),!1):!0};te.prototype._toJSONObject=function(){var e=N(this._properties)==="object"?this._properties:{};return this._productId!==null&&(e[E.REVENUE_PRODUCT_ID]=this._productId),this._quantity!==null&&(e[E.REVENUE_QUANTITY]=this._quantity),this._price!==null&&(e[E.REVENUE_PRICE]=this._price),this._revenueType!==null&&(e[E.REVENUE_REVENUE_TYPE]=this._revenueType),e};var gn=function r(e){return e?(e^Math.random()*16>>e/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,r)},mn=function(){return typeof navigator!="undefined"&&(navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||""},yn={getLanguage:mn},fe={US:"US",EU:"EU"},Ht=function(e){var t=E.EVENT_LOG_URL;switch(e){case fe.EU:t=E.EVENT_LOG_EU_URL;break;case fe.US:t=E.EVENT_LOG_URL;break}return t},_n=function(e){var t=E.DYNAMIC_CONFIG_URL;switch(e){case fe.EU:t=E.DYNAMIC_CONFIG_EU_URL;break;case fe.US:t=E.DYNAMIC_CONFIG_URL;break}return t},Xt="8.21.9",ue={apiEndpoint:E.EVENT_LOG_URL,batchEvents:!1,cookieExpiration:365,cookieName:"amplitude_id",sameSiteCookie:"Lax",cookieForceUpgrade:!1,deferInitialization:!1,disableCookies:!1,deviceIdFromUrlParam:!1,domain:"",eventUploadPeriodMillis:30*1e3,eventUploadThreshold:30,forceHttps:!0,includeFbclid:!1,includeGclid:!1,includeReferrer:!1,includeUtm:!1,ingestionMetadata:{sourceName:"",sourceVersion:""},language:yn.getLanguage(),library:{name:"amplitude-js",version:Xt},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:30*60*1e3,storage:E.STORAGE_DEFAULT,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:E.TRANSPORT_HTTP,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:fe.US,useDynamicConfig:!1,serverZoneBasedApi:!1,sessionId:null,partnerId:""},En=function(){function r(){return rt(this,r),r.instance||(this.ingestionEndpoint=E.EVENT_LOG_URL,r.instance=this),r.instance}return nt(r,[{key:"refresh",value:function(t,n,i){var o="https";!n&&C.location.protocol!=="https:"&&(o="http");var s=o+"://"+_n(t),a=this,h=!!C.XDomainRequest;if(h){var I=new C.XDomainRequest;I.open("GET",s,!0),I.onload=function(){var T=JSON.parse(I.responseText);a.ingestionEndpoint=T.ingestionEndpoint,i&&i()},I.onerror=function(){},I.ontimeout=function(){},I.onprogress=function(){},I.send()}else{var O=new XMLHttpRequest;O.open("GET",s,!0),O.onreadystatechange=function(){if(O.readyState===4&&O.status===200){var T=JSON.parse(O.responseText);a.ingestionEndpoint=T.ingestionEndpoint,i&&i()}},O.send()}}}]),r}(),St=new En,S=function(e){!Ze()&&!c.isWebWorkerEnvironment()&&c.log.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=c.isEmptyString(e)?E.DEFAULT_INSTANCE:e.toLowerCase(),this._unsentEvents=[],this._unsentIdentifys=[],this.options=Y(Y({},ue),{},{headers:Y({},ue.headers),ingestionMetadata:Y({},ue.ingestionMetadata),library:Y({},ue.library),plan:Y({},ue.plan),trackingOptions:Y({},ue.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=typeof navigator!="undefined"&&navigator&&navigator.userAgent||null,this._ua=new fr(this._userAgent).getResult()};S.prototype.Identify=j;S.prototype.Revenue=te;S.prototype.init=function(e,t,n,i){var o=this;
3if(N(e)!=="string"||c.isEmptyString(e)){c.log.error("Invalid apiKey. Please re-initialize with a valid apiKey");return}try{this._connector=_r.getInstance(this._instanceName),bn(this.options,n),(Ze()||c.isWebWorkerEnvironment())&&C.Prototype!==void 0&&Array.prototype.toJSON&&(Zt(),c.log.warn("Prototype.js injected Array.prototype.toJSON. Deleting Array.prototype.toJSON to prevent double-stringify")),this.options.cookieName!==ue.cookieName&&c.log.warn("The cookieName option is deprecated. We will be ignoring it for newer cookies"),this.options.serverZoneBasedApi&&(this.options.apiEndpoint=Ht(this.options.serverZone)),this._refreshDynamicConfig(),this.options.apiKey=e,this._storageSuffix="_"+e+(this._instanceName===E.DEFAULT_INSTANCE?"":"_"+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=E.COOKIE_PREFIX+"_"+this._storageSuffixV5,this.cookieStorage=new Kt().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 rn({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 h=a||s;if(this.options.deferInitialization&&!h){this._deferInitialization(e,t,n,i);return}this.options.domain=this.cookieStorage.options().domain,N(this.options.logLevel)==="string"&&c.setLogLevel(this.options.logLevel);var I=On(this);this._apiPropertiesTrackingOptions=Object.keys(I).length>0?{tracking_options:I}:{},this.options.cookieForceUpgrade&&s&&(a||In(this),this.cookieStorage.remove(this._oldCookiename)),ot(this),this._pendingReadStorage=!0;var O=function(d){n&&n.deviceId&&!c.validateDeviceId(n.deviceId)&&(c.log.error('Invalid device ID rejected. Randomly generated UUID will be used instead of "'.concat(n.deviceId,'"')),delete n.deviceId),o.options.deviceId=o._getInitialDeviceId(n&&n.deviceId,d),o.options.userId=N(t)==="string"&&!c.isEmptyString(t)&&t||N(t)==="number"&&t.toString()||o.options.userId||null;var b=new Date().getTime(),q=!o._sessionId||!o._lastEventTime||b-o._lastEventTime>o.options.sessionTimeout||o.options.sessionId;q&&(o.options.unsetParamsReferrerOnNewSession&&o._unsetUTMParams(),o._newSession=!0,o._sessionId=o.options.sessionId||b,o.options.sessionId=void 0,o.options.saveParamsReferrerOncePerSession&&o._trackParamsAndReferrer()),o.options.saveParamsReferrerOncePerSession||o._trackParamsAndReferrer(),o.options.saveEvents&&(wt(o._unsentEvents),wt(o._unsentIdentifys)),o._lastEventTime=b,oe(o),o._pendingReadStorage=!1,o._sendEventsIfReady();for(var W=0;W<o._onInitCallbacks.length;W++)o._onInitCallbacks[W](o);o._onInitCallbacks=[],o._isInitialized=!0,q&&o._runNewSessionStartCallbacks()};this.options.saveEvents&&(this._unsentEvents=this._loadSavedUnsentEvents(this.options.unsentKey).map(function(u){return{event:u}}).concat(this._unsentEvents),this._unsentIdentifys=this._loadSavedUnsentEvents(this.options.unsentIdentifyKey).map(function(u){return{event:u}}).concat(this._unsentIdentifys)),n&&n.onNewSessionStart&&this.onNewSessionStart(this.options.onNewSessionStart),O(),this.runQueuedFunctions(),N(i)==="function"&&i(this);var T=this.options.onExitPage;if(N(T)==="function"&&C.addEventListener&&!this.pageHandlersAdded){this.pageHandlersAdded=!0;var p=function(){var d=o.options.transport;o.setTransport(E.TRANSPORT_BEACON),T(),o.setTransport(d)};C.addEventListener("pagehide",function(){p()},!1)}this._connector.eventBridge.setEventReceiver(function(u){o._logEvent(u.eventType,u.eventProperties,u.userProperties)});var v=this._connector.identityStore.editIdentity();this.options.deviceId&&v.setDeviceId(this.options.deviceId),this.options.userId&&v.setUserId(this.options.userId),v.commit()}catch(u){c.log.error(u),n&&N(n.onError)==="function"&&n.onError(u)}};S.prototype._runNewSessionStartCallbacks=function(){for(var r=0;r<this._onNewSessionStartCallbacks.length;r++)this._onNewSessionStartCallbacks[r](this)};S.prototype.deleteLowerLevelDomainCookies=function(){var r=c.getHost(),e=this.options.domain&&this.options.domain[0]==="."?this.options.domain.slice(1):this.options.domain;if(!(!e||!c.isWebWorkerEnvironment())&&r!==e&&new RegExp(e+"$").test(r)){for(var t=r.split("."),n=e.split("."),i=t.length;i>n.length;--i){var o=t.slice(t.length-i).join(".");z.set(this._cookieName,null,{domain:"."+o})}z.set(this._cookieName,null,{})}};S.prototype._getInitialDeviceId=function(r,e){if(r)return r;if(this.options.deviceIdFromUrlParam){var t=this._getDeviceIdFromUrlParam(this._getUrlParams());if(t)return t}return this.options.deviceId?this.options.deviceId:e||it()};var wt=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=c.validateProperties(n),e[t].event.event_properties=c.validateProperties(i),e[t].event.groups=c.validateGroups(o)}};S.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=Y(Y(Y(Y({},e),t),n),i);Object.keys(o).length>0&&this.logEvent(E.ATTRIBUTION_EVENT,o)}};var bn=function r(e,t){if(N(t)==="object"){var n=new Set(["headers"]),i=new Set(["eventUploadPeriodMillis"]),o=function(h){if(!!Object.prototype.hasOwnProperty.call(e,h)){var I=t[h],O=N(e[h]);if(!(h==="transport"&&!c.validateTransport(I))){if(h==="sessionId"&&I!==null){e[h]=c.validateSessionId(I)?I:null;return}else if(!c.validateInput(I,h+" option",O))return;O==="boolean"?e[h]=!!I:O==="string"&&!c.isEmptyString(I)||O==="number"&&(I>0||I===0&&i.has(h))||O==="function"?e[h]=I:O==="object"&&r(e[h],I)}}};for(var s in t)n.has(s)?e[s]=Y(Y({},e[s]),t[s]):Object.prototype.hasOwnProperty.call(t,s)&&o(s)}};S.prototype.runQueuedFunctions=function(){var r=this._q;this._q=[];for(var e=0;e<r.length;e++){var t=this[r[e][0]];N(t)==="function"&&t.apply(this,r[e].slice(1))}};S.prototype._apiKeySet=function(e){return c.isEmptyString(this.options.apiKey)?(c.log.error("Invalid apiKey. Please set a valid apiKey with init() before calling "+e),!1):!0};S.prototype._loadSavedUnsentEvents=function(e){var t=this._getFromStorage(ee,e),n=this._parseSavedUnsentEventsString(t,e);return this._setInStorage(ee,e,JSON.stringify(n)),n};S.prototype._parseSavedUnsentEventsString=function(e,t){if(c.isEmptyString(e))return[];if(N(e)==="string")try{var n=JSON.parse(e);if(N(n)==="array")return n}catch{}return c.log.error("Unable to load "+t+" events. Restart with a new empty queue."),[]};S.prototype.isNewSession=function(){return this._newSession};S.prototype.onInit=function(e){this._isInitialized?e(this):this._onInitCallbacks.push(e)};S.prototype.onNewSessionStart=function(e){this._onNewSessionStartCallbacks.push(e)};S.prototype.getSessionId=function(){return this._sessionId};S.prototype.nextEventId=function(){return this._eventId++,this._eventId};S.prototype.nextIdentifyId=function(){return this._identifyId++,this._identifyId};S.prototype.nextSequenceNumber=function(){return this._sequenceNumber++,this._sequenceNumber};S.prototype._unsentCount=function(){return this._unsentEvents.length+this._unsentIdentifys.length};S.prototype._sendEventsIfReady=function(){return this._unsentCount()===0?!1:this.options.batchEvents?this._unsentCount()>=this.options.eventUploadThreshold?(this.sendEvents(),!0):this.options.transport===E.TRANSPORT_BEACON?(this.sendEvents(),!0):(this._updateScheduled||(this._updateScheduled=!0,setTimeout(function(){this._updateScheduled=!1,this.sendEvents()}.bind(this),this.options.eventUploadPeriodMillis)),!1):(this.sendEvents(),!0)};S.prototype.clearStorage=function(){return this._metadataStorage.clear()};S.prototype._getFromStorage=function(e,t){return e.getItem(t+this._storageSuffix
3)};S.prototype._setInStorage=function(e,t,n){e.setItem(t+this._storageSuffix,n)};var ot=function(e){if(!e._useOldCookie){var t=e._metadataStorage.load();N(t)==="object"&&Qe(e,t);return}var n=e.cookieStorage.get(e._oldCookiename);if(N(n)==="object"){Qe(e,n);return}},In=function(e){var t=e.cookieStorage.get(e._oldCookiename);N(t)==="object"&&(Qe(e,t),oe(e))},Qe=function(e,t){t.deviceId&&(e.options.deviceId=t.deviceId),t.userId&&(e.options.userId=t.userId),t.optOut!==null&&t.optOut!==void 0&&t.optOut!==!1&&(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))},oe=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)};S.prototype._initUtmData=function(e,t){e=e||this._getUrlParams(),t=t||this.cookieStorage.get("__utmz");var n=nn(t,e);return Ue(this,n),n};S.prototype._unsetUTMParams=function(){var e=new j;e.unset(E.REFERRER),e.unset(E.REFERRING_DOMAIN),e.unset(E.UTM_SOURCE),e.unset(E.UTM_MEDIUM),e.unset(E.UTM_CAMPAIGN),e.unset(E.UTM_TERM),e.unset(E.UTM_CONTENT),this.identify(e)};var Ue=function(e,t){if(!(N(t)!=="object"||Object.keys(t).length===0)){var n=new j;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)}};S.prototype._getReferrer=function(){var e=this._getReferrerFromUrlParam(this._getUrlParams());return e||(typeof document!="undefined"?document.referrer:"")};S.prototype._getUrlParams=function(){return C.location.search};S.prototype._saveGclid=function(e){var t=c.getQueryParam("gclid",e);if(!c.isEmptyString(t)){var n={gclid:t};return Ue(this,n),n}};S.prototype._saveFbclid=function(e){var t=c.getQueryParam("fbclid",e);if(!c.isEmptyString(t)){var n={fbclid:t};return Ue(this,n),n}};S.prototype._getDeviceIdFromUrlParam=function(e){return c.getQueryParam(E.AMP_DEVICE_ID_PARAM,e)};S.prototype._getReferrerFromUrlParam=function(e){return c.getQueryParam(E.AMP_REFERRER_PARAM,e)};S.prototype._getReferringDomain=function(e){if(c.isEmptyString(e))return null;var t=e.split("/");return t.length>=3?t[2]:null};S.prototype._saveReferrer=function(e){if(!c.isEmptyString(e)){var t={referrer:e,referring_domain:this._getReferringDomain(e)};return Ue(this,t),t}};S.prototype.saveEvents=function(){try{var e=JSON.stringify(this._unsentEvents.map(function(n){var i=n.event;return i}));this._setInStorage(ee,this.options.unsentKey,e)}catch{}try{var t=JSON.stringify(this._unsentIdentifys.map(function(n){return n.event}));this._setInStorage(ee,this.options.unsentIdentifyKey,t)}catch{}};S.prototype.setDomain=function(e){if(this._shouldDeferCall())return this._q.push(["setDomain"].concat(Array.prototype.slice.call(arguments,0)));if(!!c.validateInput(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,ot(this),oe(this)}catch(t){c.log.error(t)}};S.prototype.setUserId=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!!c.validateInput(t,"startNewSession","boolean")){if(this._shouldDeferCall())return this._q.push(["setUserId"].concat(Array.prototype.slice.call(arguments,0)));try{this.options.userId=e!=null&&""+e||null,t&&(this.options.unsetParamsReferrerOnNewSession&&this._unsetUTMParams(),this._newSession=!0,this._sessionId=new Date().getTime(),this._runNewSessionStartCallbacks(),this.options.saveParamsReferrerOncePerSession&&this._trackParamsAndReferrer()),oe(this),this._connector&&this._connector.identityStore.editIdentity().setUserId(this.options.userId).commit()}catch(n){c.log.error(n)}}};S.prototype.setGroup=function(r,e){if(this._shouldDeferCall())return this._q.push(["setGroup"].concat(Array.prototype.slice.call(arguments,0)));if(!(!this._apiKeySet("setGroup()")||!c.validateInput(r,"groupType","string")||c.isEmptyString(r))){var t={};t[r]=e;var n=new j().set(r,e);this._logEvent(E.IDENTIFY_EVENT,null,null,n.userPropertiesOperations,t,null,null,null)}};S.prototype.setOptOut=function(e){if(this._shouldDeferCall())return this._q.push(["setOptOut"].concat(Array.prototype.slice.call(arguments,0)));if(!!c.validateInput(e,"enable","boolean"))try{this.options.optOut=e,oe(this)}catch(t){c.log.error(t)}};S.prototype.setSessionId=function(e){if(!!c.validateInput(e,"sessionId","number"))try{this._sessionId=e,oe(this)}catch(t){c.log.error(t)}};S.prototype.resetSessionId=function(){this.setSessionId(new Date().getTime())};
3S.prototype.regenerateDeviceId=function(){if(this._shouldDeferCall())return this._q.push(["regenerateDeviceId"].concat(Array.prototype.slice.call(arguments,0)));this.setDeviceId(it())};S.prototype.setDeviceId=function(e){if(this._shouldDeferCall())return this._q.push(["setDeviceId"].concat(Array.prototype.slice.call(arguments,0)));if(!!c.validateDeviceId(e))try{c.isEmptyString(e)||(this.options.deviceId=""+e,oe(this),this._connector&&this._connector.identityStore.editIdentity().setDeviceId(this.options.deviceId).commit())}catch(t){c.log.error(t)}};S.prototype.setTransport=function(e){if(this._shouldDeferCall())return this._q.push(["setTransport"].concat(Array.prototype.slice.call(arguments,0)));!c.validateTransport(e)||(this.options.transport=e)};S.prototype.setUserProperties=function(e){if(this._shouldDeferCall())return this._q.push(["setUserProperties"].concat(Array.prototype.slice.call(arguments,0)));if(!(!this._apiKeySet("setUserProperties()")||!c.validateInput(e,"userProperties","object"))){var t=c.truncate(c.validateProperties(e));if(Object.keys(t).length!==0){var n=new j;for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&n.set(i,t[i]);this.identify(n)}}};S.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 j;e.clearAll(),this.identify(e)}};var st=function(e,t){for(var n=0;n<t._q.length;n++){var i=e[t._q[n][0]];N(i)==="function"&&i.apply(e,t._q[n].slice(1))}return e};S.prototype.identify=function(r,e,t,n){if(this._shouldDeferCall())return this._q.push(["identify"].concat(Array.prototype.slice.call(arguments,0)));if(!this._apiKeySet("identify()")){H(e,t,0,"No request sent",{reason:"API key is not set"});return}if(N(r)==="object"&&Object.prototype.hasOwnProperty.call(r,"_q")&&(r=st(new j,r)),r instanceof j){if(Object.keys(r.userPropertiesOperations).length>0)return this._logEvent(E.IDENTIFY_EVENT,null,null,r.userPropertiesOperations,null,null,null,e,t,n);H(e,t,0,"No request sent",{reason:"No user property operations"})}else c.log.error("Invalid identify input type. Expected Identify object but saw "+N(r)),H(e,t,0,"No request sent",{reason:"Invalid identify input type"})};S.prototype.groupIdentify=function(r,e,t,n,i,o){if(this._shouldDeferCall())return this._q.push(["groupIdentify"].concat(Array.prototype.slice.call(arguments,0)));if(!this._apiKeySet("groupIdentify()")){H(n,i,0,"No request sent",{reason:"API key is not set"});return}if(!c.validateInput(r,"group_type","string")||c.isEmptyString(r)){H(n,i,0,"No request sent",{reason:"Invalid group type"});return}if(e==null){H(n,i,0,"No request sent",{reason:"Invalid group name"});return}if(N(t)==="object"&&Object.prototype.hasOwnProperty.call(t,"_q")&&(t=st(new j,t)),t instanceof j){if(Object.keys(t.userPropertiesOperations).length>0)return this._logEvent(E.GROUP_IDENTIFY_EVENT,null,null,null,he({},r,e),t.userPropertiesOperations,null,n,i,o);H(n,i,0,"No request sent",{reason:"No group property operations"})}else c.log.error("Invalid identify input type. Expected Identify object but saw "+N(t)),H(n,i,0,"No request sent",{reason:"Invalid identify input type"})};S.prototype.setVersionName=function(e){if(this._shouldDeferCall())return this._q.push(["setVersionName"].concat(Array.prototype.slice.call(arguments,0)));!c.validateInput(e,"versionName","string")||(this.options.versionName=e)};S.prototype._logEvent=function(e,t,n,i,o,s,a,h,I,O){if(ot(this),!e){H(h,I,0,"No request sent",{reason:"Missing eventType"});return}if(this.options.optOut){H(h,I,0,"No request sent",{reason:"optOut is set to true"});return}try{var T;e===E.IDENTIFY_EVENT||e===E.GROUP_IDENTIFY_EVENT?T=this.nextIdentifyId():T=this.nextEventId();var p=this.nextSequenceNumber(),v=N(a)==="number"?a:new Date().getTime();O?this._sessionId=-1:(!this._sessionId||!this._lastEventTime||v-this._lastEventTime>this.options.sessionTimeout)&&(this._sessionId=v,this._runNewSessionStartCallbacks()),this._lastEventTime=v,oe(this);var u=this._ua.browser.name,d=this._ua.browser.major,b=this._ua.device.model||this._ua.os.name,q=this._ua.device.vendor;i=i||{};var W=Y({},this._apiPropertiesTrackingOptions);n=Y(Y({},n||{}),W),t=t||{},o=o||{},s=s||{};var A={device_id:this.options.deviceId,user_id:this.options.userId,timestamp:v,event_id:T,session_id:this._sessionId||-1,event_type:e,version_name:this.options.versionName||null,platform:le(this,"platform")?this.options.platform:null,os_name:le(this,"os_name")&&u||null,os_version:le(this,"os_version")&&d||null,device_model:le(this,"device_model")&&b||null,device_manufacturer:le(this,"device_manufacturer")&&q||null,language:le(this,"language")?this.options.language:null,api_properties:n,event_properties:c.truncate(c.validateProperties(t)),user_properties:c.truncate(c.validateProperties(i)),uuid:gn(),library:this.options.library,sequence_number:p,groups:c.truncate(c.validateGroups(o)),group_properties:c.truncate(c.validateProperties(s)),user_agent:this._userAgent,partner_id:this.options.partnerId||null};return Sn(this)&&(A.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}),wn(this)&&(A.ingestion_metadata={source_name:this.options.ingestionMetadata.sourceName||void 0,source_version:this.options.ingestionMetadata.sourceVersion||void 0}),e===E.IDENTIFY_EVENT||e===E.GROUP_IDENTIFY_EVENT?(this._unsentIdentifys.push({event:A,callback:h,errorCallback:I}),this._limitEventsQueued(this._unsentIdentifys)):(this._unsentEvents.push({event:A,callback:h,errorCallback:I}),this._limitEventsQueued(this._unsentEvents)),this.options.saveEvents&&this.saveEvents(),this._sendEventsIfReady(),e===E.IDENTIFY_EVENT&&this._connector&&this._connector.identityStore.editIdentity().updateUserProperties(c.truncate(c.validateProperties(i))).commit(),T}catch(R){c.log.error(R)}};var Sn=function(e){return e.options.plan&&(e.options.plan.source||e.options.plan.branch||e.options.plan.version||e.options.plan.versionId)},wn=function(e){return e.options.ingestionMetadata&&(e.options.ingestionMetadata.sourceName||e.options.ingestionMetadata.sourceVersion)},le=function(e,t){return!!e.options.trackingOptions[t]},On=function(e){for(var t=["city","country","dma","ip_address","region"],n={},i=0;i<t.length;i++){var o=t[i];le(e,o)||(n[o]=!1)}return n};S.prototype._limitEventsQueued=function(e){if(e.length>this.options.savedMaxCount){var t=e.splice(0,e.length-this.options.savedMaxCount);t.forEach(function(n){H(n.callback,n.errorCallback,0,"No request sent",{reason:"Event dropped because options.savedMaxCount exceeded. User may be offline or have a content blocker"})})}};S.prototype.logEvent=function(e,t,n,i){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;return this._shouldDeferCall()?this._q.push(["logEvent"].concat(Array.prototype.slice.call(arguments,0))):this.logEventWithTimestamp(e,t,null,n,i,o)};S.prototype.logEventWithTimestamp=function(e,t,n,i,o){var s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1;return this._shouldDeferCall()?this._q.push(["logEventWithTimestamp"].concat(Array.prototype.slice.call(arguments,0))):this._apiKeySet("logEvent()")?c.validateInput(e,"eventType","string")?c.isEmptyString(e)?(H(i,o,0,"No request sent",{reason:"Missing eventType"}),-1):(c.validateInput(s,"outOfSession","boolean")||H(i,o,0,"No request sent",{reason:"Invalid outOfSession value"}),this._logEvent(e,t,null,null,null,null,n,i,o,s)):(H(i,o,0,"No request sent",{reason:"Invalid type for eventType"}),-1):(H(i,o,0,"No request sent",{reason:"API key not set"}),-1)};S.prototype.logEventWithGroups=function(r,e,t,n,i){var o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1;return this._shouldDeferCall()?this._q.push(["logEventWithGroups"].concat(Array.prototype.slice.call(arguments,0))):this._apiKeySet("logEventWithGroups()")?c.validateInput(r,"eventType","string")?(c.validateInput(o,"outOfSession","boolean")||H(event.callback,event.errorCallback,0,"No request sent",{reason:"Invalid outOfSession value"}),this._logEvent(r,e,null,null,t,null,null,n,i,o)):(H(event.callback,event.errorCallback,0,"No request sent",{reason:"Invalid type for eventType"}),-1):(H(event.callback,event.errorCallback,0,"No request sent",{reason:"API key not set"}),-1)};var Ot=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},H=function(e,t,n,i,o){N(e)==="function"&&e(n,i,o),N(t)==="function"&&t(n,i,o)};S.prototype.logRevenueV2=function(e){if(this._shouldDeferCall())return this._q.push(["logRevenueV2"].concat(Array.prototype.slice.call(arguments,0)));if(!!this._apiKeySet("logRevenueV2()"))if(N(e)==="object"&&Object.prototype.hasOwnProperty.call(e,"_q")&&(e=st(new te,e)),e instanceof te){if(e&&e._isValidRevenue())return this.logEvent(E.REVENUE_EVENT,e._toJSONObject())}else c.log.error("Invalid revenue input type. Expected Revenue object but saw "+N(e))};S.prototype.logRevenue=function(e,t,n){return this._shouldDeferCall()?this._q.push(["logRevenue"].concat(Array.prototype.slice.call(arguments,0))):!this._apiKeySet("logRevenue()")||!Ot(e)||t!==void 0&&!Ot(t)?-1:this._logEvent(E.REVENUE_EVENT,{},{productId:n,special:"revenue_amount",quantity:t||1,price:e}
3,null,null,null,null,null)};S.prototype._logErrorsOnEvents=function(e,t,n,i){for(var o=["_unsentEvents","_unsentIdentifys"],s=0;s<o.length;s++)for(var a=o[s],h=a==="_unsentEvents"?e:t,I=0;I<this[a].length;I++){var O=this[a][I];O.event.event_id<=h&&O.errorCallback&&O.errorCallback(n,i)}};S.prototype.removeEvents=function(e,t,n,i){Nt(this,"_unsentEvents",e,n,i),Nt(this,"_unsentIdentifys",t,n,i)};var Nt=function(e,t,n,i,o){if(!(n<0)){for(var s=[],a=0;a<e[t].length;a++){var h=e[t][a];h.event.event_id>n?s.push(h):h.callback&&h.callback(i,o)}e[t]=s}};S.prototype.sendEvents=function(){if(!this._apiKeySet("sendEvents()")){this.removeEvents(1/0,1/0,0,"No request sent",{reason:"API key not set"});return}if(this.options.optOut){this.removeEvents(1/0,1/0,0,"No request sent",{reason:"Opt out is set to true"});return}if(this._unsentCount()!==0){if(this.options.transport!==E.TRANSPORT_BEACON){if(this._sending)return;this._sending=!0}var e=this.options.forceHttps||C.location.protocol==="https:"?"https":"http",t=e+"://"+this.options.apiEndpoint,n=Math.min(this._unsentCount(),this.options.uploadBatchSize),i=this._mergeEventsAndIdentifys(n),o=i.maxEventId,s=i.maxIdentifyId,a=JSON.stringify(i.eventsToSend.map(function(u){var d=u.event;return d})),h=new Date().getTime(),I={client:this.options.apiKey,e:a,v:E.API_VERSION,upload_time:h,checksum:er(E.API_VERSION+this.options.apiKey+a+h)};if(this.options.transport===E.TRANSPORT_BEACON&&typeof navigator!="undefined"){var O=navigator.sendBeacon(t,new URLSearchParams(I));O?(this.removeEvents(o,s,200,"success"),this.options.saveEvents&&this.saveEvents()):this._logErrorsOnEvents(o,s,0,"");return}var T=this;try{new zt(t,I,this.options.headers).send(function(u,d){T._sending=!1;try{u===200?(T.removeEvents(o,s,u,d),T.options.saveEvents&&T.saveEvents(),T._sendEventsIfReady()):(T._logErrorsOnEvents(o,s,u,d),u===413&&(T.options.uploadBatchSize===1&&T.removeEvents(o,s,u,d),T.options.uploadBatchSize=Math.ceil(n/2),T.sendEvents()))}catch{}})}catch(u){var p=0,v="Request failed to send";c.log.error(v),T._logErrorsOnEvents(o,s,p,v),T.removeEvents(o,s,p,v,{reason:u.message})}}};S.prototype._mergeEventsAndIdentifys=function(e){for(var t=[],n=0,i=-1,o=0,s=-1;t.length<e;){var a=void 0,h=o>=this._unsentIdentifys.length,I=n>=this._unsentEvents.length;if(I&&h){c.log.error("Merging Events and Identifys, less events and identifys than expected");break}else h?(a=this._unsentEvents[n++],i=a.event.event_id):I?(a=this._unsentIdentifys[o++],s=a.event.event_id):!("sequence_number"in this._unsentEvents[n].event)||this._unsentEvents[n].event.sequence_number<this._unsentIdentifys[o].event.sequence_number?(a=this._unsentEvents[n++],i=a.event.event_id):(a=this._unsentIdentifys[o++],s=a.event.event_id);t.push(a)}return{eventsToSend:t,maxEventId:i,maxIdentifyId:s}};S.prototype.setGlobalUserProperties=function(e){this.setUserProperties(e)};S.prototype.__VERSION__=function(){return this.options.library.version};S.prototype.setLibrary=function(e,t){e!==null&&typeof e!="undefined"&&(this.options.library.name=e),t!==null&&typeof t!="undefined"&&(this.options.library.version=t)};S.prototype._shouldDeferCall=function(){return this._pendingReadStorage||this._initializationDeferred};S.prototype._deferInitialization=function(){this._initializationDeferred=!0,this._q.push(["init"].concat(Array.prototype.slice.call(arguments,0)))};S.prototype.enableTracking=function(){this._initializationDeferred=!1,oe(this),this.runQueuedFunctions()};S.prototype._refreshDynamicConfig=function(){this.options.useDynamicConfig&&St.refresh(this.options.serverZone,this.options.forceHttps,function(){this.options.apiEndpoint=St.ingestionEndpoint}.bind(this))};S.prototype.getDeviceId=function(){return this.options.deviceId};S.prototype.getUserId=function(){return this.options.userId};S.prototype.setMinTimeBetweenSessionsMillis=function(e){if(!!c.validateInput(e,"timeInMillis","number")){if(this._shouldDeferCall())return this._q.push(["setMinTimeBetweenSessionsMillis"].concat(Array.prototype.slice.call(arguments,0)));try{this.options.sessionTimeout=e}catch(t){c.log.error(t)}}};S.prototype.setEventUploadThreshold=function(e){if(!!c.validateInput(e,"eventUploadThreshold","number")){if(this._shouldDeferCall())return this._q.push(["setEventUploadThreshold"].concat(Array.prototype.slice.call(arguments,0)));try{this.options.eventUploadThreshold=e}catch(t){c.log.error(t)}}};S.prototype.setUseDynamicConfig=function(e){if(!!c.validateInput(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(t){c.log.error(t)}}};S.prototype.setServerZone=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(!(e!==fe.EU&&e!==fe.US||!c.validateInput(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=Ht(this.options.serverZone))}catch(n){c.log.error(n)}}};S.prototype.setServerUrl=function(e){if(!!c.validateInput(e,"serverUrl","string")){if(this._shouldDeferCall())return this._q.push(["setServerUrl"].concat(Array.prototype.slice.call(arguments,0)));try{this.options.apiEndpoint=e}catch(t){c.log.error(t)}}};var x=function(){this.options=Y({},ue),this._q=[],this._instances={}};x.prototype.Identify=j;x.prototype.Revenue=te;x.prototype.getInstance=function(e){e=c.isEmptyString(e)?E.DEFAULT_INSTANCE:e.toLowerCase();var t=this._instances[e];return t===void 0&&(t=new S(e),this._instances[e]=t),t};x.prototype.init=function(e,t,n,i){this.getInstance().init(e,t,n,function(o){this.options=o.options,N(i)==="function"&&i(o)}.bind(this))},x.prototype.isNewSession=function(){return this.getInstance().isNewSession()},x.prototype.getSessionId=function(){return this.getInstance().getSessionId()},x.prototype.nextEventId=function(){return this.getInstance().nextEventId()},x.prototype.nextIdentifyId=function(){return this.getInstance().nextIdentifyId()},x.prototype.nextSequenceNumber=function(){return this.getInstance().nextSequenceNumber()},x.prototype.saveEvents=function(){this.getInstance().saveEvents()},x.prototype.setDomain=function(e){this.getInstance().setDomain(e)},x.prototype.setUserId=function(e){this.getInstance().setUserId(e)},x.prototype.setGroup=function(r,e){this.getInstance().setGroup(r,e)},x.prototype.setOptOut=function(e){this.getInstance().setOptOut(e)},x.prototype.regenerateDeviceId=function(){this.getInstance().regenerateDeviceId()},x.prototype.setDeviceId=function(e){this.getInstance().setDeviceId(e)},x.prototype.setUserProperties=function(e){this.getInstance().setUserProperties(e)},x.prototype.clearUserProperties=function(){this.getInstance().clearUserProperties()},x.prototype.identify=function(r,e){this.getInstance().identify(r,e)},x.prototype.setVersionName=function(e){this.getInstance().setVersionName(e)},x.prototype.logEvent=function(e,t,n){return this.getInstance().logEvent(e,t,n)},x.prototype.logEventWithGroups=function(r,e,t,n){return this.getInstance().logEventWithGroups(r,e,t,n)},x.prototype.logRevenueV2=function(e){return this.getInstance().logRevenueV2(e)},x.prototype.logRevenue=function(e,t,n){return this.getInstance().logRevenue(e,t,n)},x.prototype.removeEvents=function(e,t){this.getInstance().removeEvents(e,t)},x.prototype.sendEvents=function(e){this.getInstance().sendEvents(e)},x.prototype.setGlobalUserProperties=function(e){this.getInstance().setUserProperties(e)};x.prototype.__VERSION__=Xt;var Ce=typeof C!="undefined"&&C.amplitude||{},Yt=new x;Yt._q=Ce._q||[];for(var je in Ce._iq)Object.prototype.hasOwnProperty.call(Ce._iq,je)&&(Yt.getInstance(je)._q=Ce._iq[je]._q||[]);export{Yt as default};
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.