/*! VERSION | 10.78.9 */(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[8871],{58315:function(e,t,n){var i;!function(r,o){"use strict";var s="function",a="undefined",u="object",c="string",l="model",p="name",d="type",h="vendor",f="version",v="architecture",g="console",y="mobile",m="tablet",_="smarttv",b="wearable",E="embedded",I="Amazon",w="Apple",S="ASUS",O="BlackBerry",N="Browser",T="Chrome",k="Firefox",A="Google",R="Huawei",C="Microsoft",P="Motorola",U="Opera",x="Samsung",D="Sharp",j="Sony",q="Xiaomi",M="Zebra",L="Facebook",F=function(e,t){var n={};for(var i in e)t[i]&&t[i].length%2==0?n[i]=t[i].concat(e[i]):n[i]=e[i];return n},G=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},V=function(e,t){return typeof e===c&&-1!==K(t).indexOf(K(e))},K=function(e){return e.toLowerCase()},B=function(e,t){if(typeof e===c)return e=e.replace(/^\s\s*/,""),typeof t===a?e:e.substring(0,350)},W=function(e,t){for(var n,i,r,a,c,l,p=0;p<t.length&&!c;){var d=t[p],h=t[p+1];for(n=i=0;n<d.length&&!c;)if(c=d[n++].exec(e))for(r=0;r<h.length;r++)l=c[++i],typeof(a=h[r])===u&&a.length>0?2===a.length?typeof a[1]==s?this[a[0]]=a[1].call(this,l):this[a[0]]=a[1]:3===a.length?typeof a[1]!==s||a[1].exec&&a[1].test?this[a[0]]=l?l.replace(a[1],a[2]):o:this[a[0]]=l?a[1].call(this,l,a[2]):o:4===a.length&&(this[a[0]]=l?a[3].call(this,l.replace(a[1],a[2])):o):this[a]=l||o;p+=2}},$=function(e,t){for(var n in t)if(typeof t[n]===u&&t[n].length>0){for(var i=0;i<t[n].length;i++)if(V(t[n][i],e))return"?"===n?o:n}else if(V(t[n],e))return"?"===n?o:n;return e},z={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"},X={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[f,[p,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[f,[p,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[p,f],[/opios[\/ ]+([\w\.]+)/i],[f,[p,U+" Mini"]],[/\bopr\/([\w\.]+)/i],[f,[p,U]],[/(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],[p,f],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[f,[p,"UC"+N]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[f,[p,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[f,[p,"WeChat"]],[/konqueror\/([\w\.]+)/i],[f,[p,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[f,[p,"IE"]],[/yabrowser\/([\w\.]+)/i],[f,[p,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[p,/(.+)/,"$1 Secure "+N],f],[/\bfocus\/([\w\.]+)/i],[f,[p,k+" Focus"]],[/\bopt\/([\w\.]+)/i],[f,[p,U+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[f,[p,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[f,[p,"Dolphin"]],[/coast\/([\w\.]+)/i],[f,[p,U+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[f,[p,"MIUI "+N]],[/fxios\/([-\w\.]+)/i],[f,[p,k]],[/\bqihu|(qi?ho?o?|360)browser/i],[[p,"360 "+N]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[p,/(.+)/,"$1 "+N],f],[/(comodo_dragon)\/([\w\.]+)/i],[[p,/_/g," "],f],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[p,f],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[p],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[p,L],f],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[p,f],[/\bgsa\/([\w\.]+) .*safari\//i],[f,[p,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[f,[p,T+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[p,T+" WebView"],f],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[f,[p,"Android "+N]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[p,f],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[f,[p,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[f,p],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[p,[f,$,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[p,f],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[p,"Netscape"],f],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[f,[p,k+" 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],[p,f],[/(cobalt)\/([\w\.]+)/i],[p,[f,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[v,"amd64"]],[/(ia32(?=;))/i],[[v,K]],[/((?:i[346]|x)86)[;\)]/i],[[v,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[v,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[v,"armhf"]],[/windows (ce|mobile); ppc;/i],[[v,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[v,/ower/,"",K]],[/(sun4\w)[;\)]/i],[[v,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[v,K]]],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],[l,[h,x],[d,m]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[l,[h,x],[d,y]],[/((ipod|iphone)\d+,\d+)/i],[l,[h,w],[d,y]],[/(ipad\d+,\d+)/i],[l,[h,w],[d,m]],[/\((ip(?:hone|od)[\w ]*);/i],[l,[h,w],[d,y]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[l,[h,w],[d,m]],[/(macintosh);/i],[l,[h,w]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[l,[h,R],[d,m]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[l,[h,R],[d,y]],[/\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],[[l,/_/g," "],[h,q],[d,y]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[l,/_/g," "],[h,q],[d,m]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[l,[h,"OPPO"],[d,y]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[l,[h,"Vivo"],[d,y]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[l,[h,"Realme"],[d,y]],[/\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],[l,[h,P],[d,y]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[l,[h,P],[d,m]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[l,[h,"LG"],[d,m]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[l,[h,"LG"],[d,y]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[l,[h,"Lenovo"],[d,m]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[l,/_/g," "],[h,"Nokia"],[d,y]],[/(pixel c)\b/i],[l,[h,A],[d,m]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[l,[h,A],[d,y]],[/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],[l,[h,j],[d,y]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[l,"Xperia Tablet"],[h,j],[d,m]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[l,[h,"OnePlus"],[d,y]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[l,[h,I],[d,m]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[l,/(.+)/g,"Fire Phone $1"],[h,I],[d,y]],[/(playbook);[-\w\),; ]+(rim)/i],[l,h,[d,m]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[l,[h,O],[d,y]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[l,[h,S],[d,m]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[l,[h,S],[d,y]],[/(nexus 9)/i],[l,[h,"HTC"],[d,m]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony(?!-bra))[-_ ]?([-\w]*)/i],[h,[l,/_/g," "],[d,y]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[l,[h,"Acer"],[d,m]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[l,[h,"Meizu"],[d,y]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[l,[h,D],[d,y]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[h,l,[d,y]],[/(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],[h,l,[d,m]],[/(surface duo)/i],[l,[h,C],[d,m]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[l,[h,"Fairphone"],[d,y]],[/(u304aa)/i],[l,[h,"AT&T"],[d,y]],[/\bsie-(\w*)/i],[l,[h,"Siemens"],[d,y]],[/\b(rct\w+) b/i],[l,[h,"RCA"],[d,m]],[/\b(venue[\d ]{2,7}) b/i],[l,[h,"Dell"],[d,m]],[/\b(q(?:mv|ta)\w+) b/i],[l,[h,"Verizon"],[d,m]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[l,[h,"Barnes & Noble"],[d,m]],[/\b(tm\d{3}\w+) b/i],[l,[h,"NuVision"],[d,m]],[/\b(k88) b/i],[l,[h,"ZTE"],[d,m]],[/\b(nx\d{3}j) b/i],[l,[h,"ZTE"],[d,y]],[/\b(gen\d{3}) b.+49h/i],[l,[h,"Swiss"],[d,y]],[/\b(zur\d{3}) b/i],[l,[h,"Swiss"],[d,m]],[/\b((zeki)?tb.*\b) b/i],[l,[h,"Zeki"],[d,m]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[h,"Dragon Touch"],l,[d,m]],[/\b(ns-?\w{0,9}) b/i],[l,[h,"Insignia"],[d,m]],[/\b((nxa|next)-?\w{0,9}) b/i],[l,[h,"NextBook"],[d,m]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[h,"Voice"],l,[d,y]],[/\b(lvtel\-)?(v1[12]) b/i],[[h,"LvTel"],l,[d,y]],[/\b(ph-1) /i],[l,[h,"Essential"],[d,y]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[l,[h,"Envizen"],[d,m]],[/\b(trio[-\w\. ]+) b/i],[l,[h,"MachSpeed"],[d,m]],[/\btu_(1491) b/i],[l,[h,"Rotor"],[d,m]],[/(shield[\w ]+) b/i],[l,[h,"Nvidia"],[d,m]],[/(sprint) (\w+)/i],[h,l,[d,y]],[/(kin\.[onetw]{3})/i],[[l,/\./g," "],[h,C],[d,y]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[l,[h,M],[d,m]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[l,[h,M],[d,y]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[h,l,[d,g]],[/droid.+; (shield) bui/i],[l,[h,"Nvidia"],[d,g]],[/(playstation [345portablevi]+)/i],[l,[h,j],[d,g]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[l,[h,C],[d,g]],[/smart-tv.+(samsung)/i],[h,[d,_]],[/hbbtv.+maple;(\d+)/i],[[l,/^/,"SmartTV"],[h,x],[d,_]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[h,"LG"],[d,_]],[/(apple) ?tv/i],[h,[l,w+" TV"],[d,_]],[/crkey/i],[[l,T+"cast"],[h,A],[d,_]],[/droid.+aft(\w)( bui|\))/i],[l,[h,I],[d,_]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[l,[h,D],[d,_]],[/(bravia[\w ]+)( bui|\))/i],[l,[h,j],[d,_]],[/(mitv-\w{5}) bui/i],[l,[h,q],[d,_]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[h,B],[l,B],[d,_]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[d,_]],[/((pebble))app/i],[h,l,[d,b]],[/droid.+; (glass) \d/i],[l,[h,A],[d,b]],[/droid.+; (wt63?0{2,3})\)/i],[l,[h,M],[d,b]],[/(quest( 2)?)/i],[l,[h,L],[d,b]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[h,[d,E]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[l,[d,y]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[l,[d,m]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[d,m]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[d,y]],[/(android[-\w\. ]{0,9});.+buil/i],[l,[h,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[f,[p,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[f,[p,"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],[p,f],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[f,p]],os:[[/microsoft (windows) (vista|xp)/i],[p,f],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[p,[f,$,z]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[p,"Windows"],[f,$,z]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[f,/_/g,"."],[p,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[p,"Mac OS"],[f,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[f,p],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[p,f],[/\(bb(10);/i],[f,[p,O]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[f,[p,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[f,[p,k+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[f,[p,"webOS"]],[/crkey\/([\d\.]+)/i],[f,[p,T+"cast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[p,"Chromium OS"],f],[/(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],[p,f],[/(sunos) ?([\w\.\d]*)/i],[[p,"Solaris"],f],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[p,f]]},H=function(e,t){if(typeof e===u&&(t=e,e=o),!(this instanceof H))return new H(e,t).getResult();var n=e||(typeof r!==a&&r.navigator&&r.navigator.userAgent?r.navigator.userAgent:""),i=t?F(X,t):X;return this.getBrowser=function(){var e,t={};return t[p]=o,t[f]=o,W.call(t,n,i.browser),t.major=typeof(e=t.version)===c?e.replace(/[^\d\.]/g,"").split(".")[0]:o,t},this.getCPU=function(){var e={};return e[v]=o,W.call(e,n,i.cpu),e},this.getDevice=function(){var e={};return e[h]=o,e[l]=o,e[d]=o,W.call(e,n,i.device),e},this.getEngine=function(){var e={};return e[p]=o,e[f]=o,W.call(e,n,i.engine),e},this.getOS=function(){var e={};return e[p]=o,e[f]=o,W.call(e,n,i.os),e},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 n},this.setUA=function(e){return n=typeof e===c&&e.length>350?B(e,350):e,this},this.setUA(n),this};H.VERSION="0.7.33",H.BROWSER=G([p,f,"major"]),H.CPU=G([v]),H.DEVICE=G([l,h,d,g,y,_,m,b,E]),H.ENGINE=H.OS=G([p,f]),typeof t!==a?(e.exports&&(t=e.exports=H),t.UAParser=H):n.amdO?o!==(i=(function(){return H}).call(t,n,t,e))&&(e.exports=i):typeof r!==a&&(r.UAParser=H);var Y=typeof r!==a&&(r.jQuery||r.Zepto);if(Y&&!Y.ua){var J=new H;Y.ua=J.getResult(),Y.ua.get=function(){return J.getUA()},Y.ua.set=function(e){J.setUA(e);var t=J.getResult();for(var n in t)Y.ua[n]=t[n]}}}("object"==typeof window?window:this)},4327:function(e,t,n){var i;!function(r){"use strict";function o(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function s(e,t,n,i,r,s){var a;return o((a=o(o(t,e),o(i,s)))<<r|a>>>32-r,n)}function a(e,t,n,i,r,o,a){return s(t&n|~t&i,e,t,r,o,a)}function u(e,t,n,i,r,o,a){return s(t&i|n&~i,e,t,r,o,a)}function c(e,t,n,i,r,o,a){return s(t^n^i,e,t,r,o,a)}function l(e,t,n,i,r,o,a){return s(n^(t|~i),e,t,r,o,a)}function p(e,t){e[t>>5]|=128<<t%32,e[(t+64>>>9<<4)+14]=t;var n,i,r,s,p,d=1732584193,h=-271733879,f=-1732584194,v=271733878;for(n=0;n<e.length;n+=16)i=d,r=h,s=f,p=v,d=a(d,h,f,v,e[n],7,-680876936),v=a(v,d,h,f,e[n+1],12,-389564586),f=a(f,v,d,h,e[n+2],17,606105819),h=a(h,f,v,d,e[n+3],22,-1044525330),d=a(d,h,f,v,e[n+4],7,-176418897),v=a(v,d,h,f,e[n+5],12,1200080426),f=a(f,v,d,h,e[n+6],17,-1473231341),h=a(h,f,v,d,e[n+7],22,-45705983),d=a(d,h,f,v,e[n+8],7,1770035416),v=a(v,d,h,f,e[n+9],12,-1958414417),f=a(f,v,d,h,e[n+10],17,-42063),h=a(h,f,v,d,e[n+11],22,-1990404162),d=a(d,h,f,v,e[n+12],7,1804603682),v=a(v,d,h,f,e[n+13],12,-40341101),f=a(f,v,d,h,e[n+14],17,-1502002290),h=a(h,f,v,d,e[n+15],22,1236535329),d=u(d,h,f,v,e[n+1],5,-165796510),v=u(v,d,h,f,e[n+6],9,-1069501632),f=u(f,v,d,h,e[n+11],14,643717713),h=u(h,f,v,d,e[n],20,-373897302),d=u(d,h,f,v,e[n+5],5,-701558691),v=u(v,d,h,f,e[n+10],9,38016083),f=u(f,v,d,h,e[n+15],14,-660478335),h=u(h,f,v,d,e[n+4],20,-405537848),d=u(d,h,f,v,e[n+9],5,568446438),v=u(v,d,h,f,e[n+14],9,-1019803690),f=u(f,v,d,h,e[n+3],14,-187363961),h=u(h,f,v,d,e[n+8],20,1163531501),d=u(d,h,f,v,e[n+13],5,-1444681467),v=u(v,d,h,f,e[n+2],9,-51403784),f=u(f,v,d,h,e[n+7],14,1735328473),h=u(h,f,v,d,e[n+12],20,-1926607734),d=c(d,h,f,v,e[n+5],4,-378558),v=c(v,d,h,f,e[n+8],11,-2022574463),f=c(f,v,d,h,e[n+11],16,1839030562),h=c(h,f,v,d,e[n+14],23,-35309556),d=c(d,h,f,v,e[n+1],4,-1530992060),v=c(v,d,h,f,e[n+4],11,1272893353),f=c(f,v,d,h,e[n+7],16,-155497632),h=c(h,f,v,d,e[n+10],23,-1094730640),d=c(d,h,f,v,e[n+13],4,681279174),v=c(v,d,h,f,e[n],11,-358537222),f=c(f,v,d,h,e[n+3],16,-722521979),h=c(h,f,v,d,e[n+6],23,76029189),d=c(d,h,f,v,e[n+9],4,-640364487),v=c(v,d,h,f,e[n+12],11,-421815835),f=c(f,v,d,h,e[n+15],16,530742520),h=c(h,f,v,d,e[n+2],23,-995338651),d=l(d,h,f,v,e[n],6,-198630844),v=l(v,d,h,f,e[n+7],10,1126891415),f=l(f,v,d,h,e[n+14],15,-1416354905),h=l(h,f,v,d,e[n+5],21,-57434055),d=l(d,h,f,v,e[n+12],6,1700485571),v=l(v,d,h,f,e[n+3],10,-1894986606),f=l(f,v,d,h,e[n+10],15,-1051523),h=l(h,f,v,d,e[n+1],21,-2054922799),d=l(d,h,f,v,e[n+8],6,1873313359),v=l(v,d,h,f,e[n+15],10,-30611744),f=l(f,v,d,h,e[n+6],15,-1560198380),h=l(h,f,v,d,e[n+13],21,1309151649),d=l(d,h,f,v,e[n+4],6,-145523070),v=l(v,d,h,f,e[n+11],10,-1120210379),f=l(f,v,d,h,e[n+2],15,718787259),h=l(h,f,v,d,e[n+9],21,-343485551),d=o(d,i),h=o(h,r),f=o(f,s),v=o(v,p);return[d,h,f,v]}function d(e){var t,n="",i=32*e.length;for(t=0;t<i;t+=8)n+=String.fromCharCode(e[t>>5]>>>t%32&255);return n}function h(e){var t,n=[];for(t=0,n[(e.length>>2)-1]=void 0;t<n.length;t+=1)n[t]=0;var i=8*e.length;for(t=0;t<i;t+=8)n[t>>5]|=(255&e.charCodeAt(t/8))<<t%32;return n}function f(e){var t,n,i="0123456789abcdef",r="";for(n=0;n<e.length;n+=1)r+=i.charAt((t=e.charCodeAt(n))>>>4&15)+i.charAt(15&t);return r}function v(e){return unescape(encodeURIComponent(e))}function g(e){var t;return d(p(h(t=v(e)),8*t.length))}function y(e,t){return function(e,t){var n,i,r=h(e),o=[],s=[];for(o[15]=s[15]=void 0,r.length>16&&(r=p(r,8*e.length)),n=0;n<16;n+=1)o[n]=909522486^r[n],s[n]=1549556828^r[n];return i=p(o.concat(h(t)),512+8*t.length),d(p(s.concat(i),640))}(v(e),v(t))}function m(e,t,n){return t?n?y(t,e):f(y(t,e)):n?g(e):f(g(e))}void 0!==(i=(function(){return m}).call(t,n,t,e))&&(e.exports=i)}(0)},18871:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>e4});var i,r,o={};function s(){return"object"==typeof window&&(null==window?void 0:window.document)!==void 0}n.r(o),n.d(o,{exclude:()=>k,extract:()=>I,parse:()=>w,parseUrl:()=>O,pick:()=>T,stringify:()=>S,stringifyUrl:()=>N});var a=function(){var e;if(s()){var t=window,n=Array;if(void 0!==t.Prototype&&(null===(e=n.prototype)||void 0===e?void 0:e.toJSON)!==void 0)return delete n.prototype.toJSON,!0}return!1},u=n(4327),c=n.n(u);let l="%[a-f0-9]{2}",p=RegExp("("+l+")|([^%]+?)","gi"),d=RegExp("("+l+")+","gi");function h(e,t){if(!("string"==typeof e&&"string"==typeof t))throw TypeError("Expected the arguments to be of type `string`");if(""===e||""===t)return[];let n=e.indexOf(t);return -1===n?[]:[e.slice(0,n),e.slice(n+t.length)]}let f=e=>null==e,v=e=>encodeURIComponent(e).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),g=Symbol("encodeFragmentIdentifier");function y(e){if("string"!=typeof e||1!==e.length)throw TypeError("arrayFormatSeparator must be single character string")}function m(e,t){return t.encode?t.strict?v(e):encodeURIComponent(e):e}function _(e,t){return t.decode?function(e){if("string"!=typeof e)throw TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return decodeURIComponent(e)}catch{return function(e){let t={"%FE%FF":"��","%FF%FE":"��"},n=d.exec(e);for(;n;){try{t[n[0]]=decodeURIComponent(n[0])}catch{let e=function(e){try{return decodeURIComponent(e)}catch{let t=e.match(p)||[];for(let n=1;n<t.length;n++)t=(e=(function e(t,n){try{return[decodeURIComponent(t.join(""))]}catch{}if(1===t.length)return t;n=n||1;let i=t.slice(0,n),r=t.slice(n);return Array.prototype.concat.call([],e(i),e(r))})(t,n).join("")).match(p)||[];return e}}(n[0]);e!==n[0]&&(t[n[0]]=e)}n=d.exec(e)}t["%C2"]="�";let i=Object.keys(t);for(let n of i)e=e.replace(RegExp(n,"g"),t[n]);return e}(e)}}(e):e}function b(e){let t=e.indexOf("#");return -1!==t&&(e=e.slice(0,t)),e}function E(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):t.parseBooleans&&null!==e&&("true"===e.toLowerCase()||"false"===e.toLowerCase())&&(e="true"===e.toLowerCase()),e}function I(e){e=b(e);let t=e.indexOf("?");return -1===t?"":e.slice(t+1)}function w(e,t){y((t={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,...t}).arrayFormatSeparator);let n=function(e){let t;switch(e.arrayFormat){case"index":return(e,n,i)=>{if(t=/\[(\d*)]$/.exec(e),e=e.replace(/\[\d*]$/,""),!t){i[e]=n;return}void 0===i[e]&&(i[e]={}),i[e][t[1]]=n};case"bracket":return(e,n,i)=>{if(t=/(\[])$/.exec(e),e=e.replace(/\[]$/,""),!t){i[e]=n;return}if(void 0===i[e]){i[e]=[n];return}i[e]=[...i[e],n]};case"colon-list-separator":return(e,n,i)=>{if(t=/(:list)$/.exec(e),e=e.replace(/:list$/,""),!t){i[e]=n;return}if(void 0===i[e]){i[e]=[n];return}i[e]=[...i[e],n]};case"comma":case"separator":return(t,n,i)=>{let r="string"==typeof n&&n.includes(e.arrayFormatSeparator),o="string"==typeof n&&!r&&_(n,e).includes(e.arrayFormatSeparator);n=o?_(n,e):n;let s=r||o?n.split(e.arrayFormatSeparator).map(t=>_(t,e)):null===n?n:_(n,e);i[t]=s};case"bracket-separator":return(t,n,i)=>{let r=/(\[])$/.test(t);if(t=t.replace(/\[]$/,""),!r){i[t]=n?_(n,e):n;return}let o=null===n?[]:n.split(e.arrayFormatSeparator).map(t=>_(t,e));if(void 0===i[t]){i[t]=o;return}i[t]=[...i[t],...o]};default:return(e,t,n)=>{if(void 0===n[e]){n[e]=t;return}n[e]=[...[n[e]].flat(),t]}}}(t),i=Object.create(null);if("string"!=typeof e||!(e=e.trim().replace(/^[?#&]/,"")))return i;for(let r of e.split("&")){if(""===r)continue;let e=t.decode?r.replace(/\+/g," "):r,[o,s]=h(e,"=");void 0===o&&(o=e),s=void 0===s?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?s:_(s,t),n(_(o,t),s,i)}for(let[e,n]of Object.entries(i))if("object"==typeof n&&null!==n)for(let[e,i]of Object.entries(n))n[e]=E(i,t);else i[e]=E(n,t);return!1===t.sort?i:(!0===t.sort?Object.keys(i).sort():Object.keys(i).sort(t.sort)).reduce((e,t)=>{let n=i[t];return n&&"object"==typeof n&&!Array.isArray(n)?e[t]=function e(t){return Array.isArray(t)?t.sort():"object"==typeof t?e(Object.keys(t)).sort((e,t)=>Number(e)-Number(t)).map(e=>t[e]):t}(n):e[t]=n,e},Object.create(null))}function S(e,t){if(!e)return"";y((t={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...t}).arrayFormatSeparator);let n=n=>t.skipNull&&f(e[n])||t.skipEmptyString&&""===e[n],i=function(e){switch(e.arrayFormat){case"index":return t=>(n,i)=>{let r=n.length;return void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?n:null===i?[...n,[m(t,e),"[",r,"]"].join("")]:[...n,[m(t,e),"[",m(r,e),"]=",m(i,e)].join("")]};case"bracket":return t=>(n,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?n:null===i?[...n,[m(t,e),"[]"].join("")]:[...n,[m(t,e),"[]=",m(i,e)].join("")];case"colon-list-separator":return t=>(n,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?n:null===i?[...n,[m(t,e),":list="].join("")]:[...n,[m(t,e),":list=",m(i,e)].join("")];case"comma":case"separator":case"bracket-separator":{let t="bracket-separator"===e.arrayFormat?"[]=":"=";return n=>(i,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?i:(r=null===r?"":r,0===i.length)?[[m(n,e),t,m(r,e)].join("")]:[[i,m(r,e)].join(e.arrayFormatSeparator)]}default:return t=>(n,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?n:null===i?[...n,m(t,e)]:[...n,[m(t,e),"=",m(i,e)].join("")]}}(t),r={};for(let[t,i]of Object.entries(e))n(t)||(r[t]=i);let o=Object.keys(r);return!1!==t.sort&&o.sort(t.sort),o.map(n=>{let r=e[n];return void 0===r?"":null===r?m(n,t):Array.isArray(r)?0===r.length&&"bracket-separator"===t.arrayFormat?m(n,t)+"[]":r.reduce(i(n),[]).join("&"):m(n,t)+"="+m(r,t)}).filter(e=>e.length>0).join("&")}function O(e,t){var n,i,r;t={decode:!0,...t};let[o,s]=h(e,"#");return void 0===o&&(o=e),{url:null!==(r=null===(i=o)||void 0===i?void 0:null===(n=i.split("?"))||void 0===n?void 0:n[0])&&void 0!==r?r:"",query:w(I(e),t),...t&&t.parseFragmentIdentifier&&s?{fragmentIdentifier:_(s,t)}:{}}}function N(e,t){t={encode:!0,strict:!0,[g]:!0,...t};let n=b(e.url).split("?")[0]||"",i=I(e.url),r={...w(i,{sort:!1}),...e.query},o=S(r,t);o&&(o=`?${o}`);let s=function(e){let t="",n=e.indexOf("#");return -1!==n&&(t=e.slice(n)),t}(e.url);if(e.fragmentIdentifier){let i=new URL(n);i.hash=e.fragmentIdentifier,s=t[g]?i.hash:`#${e.fragmentIdentifier}`}return`${n}${o}${s}`}function T(e,t,n){n={parseFragmentIdentifier:!0,[g]:!1,...n};let{url:i,query:r,fragmentIdentifier:o}=O(e,n);return N({url:i,query:function(e,t){let n={};if(Array.isArray(t))for(let i of t){let t=Object.getOwnPropertyDescriptor(e,i);(null==t?void 0:t.enumerable)&&Object.defineProperty(n,i,t)}else for(let i of Reflect.ownKeys(e)){let r=Object.getOwnPropertyDescriptor(e,i);if(r.enumerable){let o=e[i];t(i,o,e)&&Object.defineProperty(n,i,r)}}return n}(r,t),fragmentIdentifier:o},n)}function k(e,t,n){let i=Array.isArray(t)?e=>!t.includes(e):(e,n)=>!t(e,n);return T(e,i,n)}var A=n(58315),R=n.n(A),C=function(){function e(){}return e.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:P(),platform:"Web",os:void 0,deviceModel:void 0}},e}(),P=function(){return"undefined"!=typeof navigator&&(navigator.languages&&navigator.languages[0]||navigator.language)||""},U=function(){function e(){this.queue=[]}return e.prototype.logEvent=function(e){this.receiver?this.receiver(e):this.queue.length<512&&this.queue.push(e)},e.prototype.setEventReceiver=function(e){this.receiver=e,this.queue.length>0&&(this.queue.forEach(function(t){e(t)}),this.queue=[])},e}(),x=function(){return(x=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},D=function(e,t){var n=typeof e;if(n!==typeof t)return!1;for(var i=0,r=["string","number","boolean","undefined"];i<r.length;i++)if(r[i]===n)return e===t;if(null==e&&null==t)return!0;if(null==e||null==t||e.length!==t.length)return!1;var o=Array.isArray(e),s=Array.isArray(t);if(o!==s)return!1;if(o&&s){for(var a=0;a<e.length;a++)if(!D(e[a],t[a]))return!1}else{if(!D(Object.keys(e).sort(),Object.keys(t).sort()))return!1;var u=!0;return Object.keys(e).forEach(function(n){D(e[n],t[n])||(u=!1)}),u}return!0};Object.entries||(Object.entries=function(e){for(var t=Object.keys(e),n=t.length,i=Array(n);n--;)i[n]=[t[n],e[t[n]]];return i});var j=function(){function e(){this.identity={userProperties:{}},this.listeners=new Set}return e.prototype.editIdentity=function(){var e=this,t=x({},this.identity.userProperties),n=x(x({},this.identity),{userProperties:t});return{setUserId:function(e){return n.userId=e,this},setDeviceId:function(e){return n.deviceId=e,this},setUserProperties:function(e){return n.userProperties=e,this},setOptOut:function(e){return n.optOut=e,this},updateUserProperties:function(e){for(var t=n.userProperties||{},i=0,r=Object.entries(e);i<r.length;i++){var o=r[i],s=o[0],a=o[1];switch(s){case"$set":for(var u=0,c=Object.entries(a);u<c.length;u++){var l=c[u],p=l[0],d=l[1];t[p]=d}break;case"$unset":for(var h=0,f=Object.keys(a);h<f.length;h++){var p=f[h];delete t[p]}break;case"$clearAll":t={}}}return n.userProperties=t,this},commit:function(){return e.setIdentity(n),this}}},e.prototype.getIdentity=function(){return x({},this.identity)},e.prototype.setIdentity=function(e){var t=x({},this.identity);this.identity=x({},e),D(t,this.identity)||this.listeners.forEach(function(t){t(e)})},e.prototype.addIdentityListener=function(e){this.listeners.add(e)},e.prototype.removeIdentityListener=function(e){this.listeners.delete(e)},e}(),q="undefined"!=typeof globalThis?globalThis:void 0!==n.g?n.g:self,M=function(){function e(){this.identityStore=new j,this.eventBridge=new U,this.applicationContextProvider=new C}return e.getInstance=function(t){return q.analyticsConnectorInstances||(q.analyticsConnectorInstances={}),q.analyticsConnectorInstances[t]||(q.analyticsConnectorInstances[t]=new e),q.analyticsConnectorInstances[t]},e}();function L(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 F(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?L(Object(n),!0).forEach(function(t){W(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):L(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function G(e){return(G="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})(e)}function V(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function K(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,X(i.key),i)}}function B(e,t,n){return t&&K(e.prototype,t),n&&K(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function W(e,t,n){return(t=X(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $(e,t){if(e){if("string"==typeof e)return z(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return z(e,t)}}function z(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function X(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 TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var H={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",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"},Y="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof self?self:void 0!==n.g?n.g:void 0,J={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(e){try{if(Y.btoa&&Y.atob)return Y.btoa(unescape(encodeURIComponent(e)))}catch(e){}return J._encode(e)},_encode:function(e){var t,n,i,r,o,s,a,u="",c=0;for(e=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)+String.fromCharCode(63&i|128):t+=String.fromCharCode(i>>12|224)+String.fromCharCode(i>>6&63|128)+String.fromCharCode(63&i|128)}return t}(e);c<e.length;)t=e.charCodeAt(c++),n=e.charCodeAt(c++),i=e.charCodeAt(c++),r=t>>2,o=(3&t)<<4|n>>4,s=(15&n)<<2|i>>6,a=63&i,isNaN(n)?s=a=64:isNaN(i)&&(a=64),u=u+J._keyStr.charAt(r)+J._keyStr.charAt(o)+J._keyStr.charAt(s)+J._keyStr.charAt(a);return u},decode:function(e){try{if(Y.btoa&&Y.atob)return decodeURIComponent(escape(Y.atob(e)))}catch(e){}return J._decode(e)},_decode:function(e){var t,n,i,r,o,s,a,u="",c=0;for(e=e.replace(/[^A-Za-z0-9+/=]/g,"");c<e.length;)r=J._keyStr.indexOf(e.charAt(c++)),o=J._keyStr.indexOf(e.charAt(c++)),s=J._keyStr.indexOf(e.charAt(c++)),a=J._keyStr.indexOf(e.charAt(c++)),t=r<<2|o>>4,n=(15&o)<<4|s>>2,i=(3&s)<<6|a,u+=String.fromCharCode(t),64!==s&&(u+=String.fromCharCode(n)),64!==a&&(u+=String.fromCharCode(i));return function(e){for(var t="",n=0,i=0,r=0;n<e.length;)(i=e.charCodeAt(n))<128?(t+=String.fromCharCode(i),n++):i>191&&i<224?(t+=String.fromCharCode((31&i)<<6|63&e.charCodeAt(n+1)),n+=2):(t+=String.fromCharCode((15&i)<<12|(63&e.charCodeAt(n+1))<<6|63&e.charCodeAt(n+2)),n+=3);return t}(u)}},Q=Object.prototype.toString;function Z(e){switch(Q.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":(e=e.valueOf?e.valueOf():Object.prototype.valueOf.apply(e),G(e))}var ee={DISABLE:0,ERROR:1,WARN:2,INFO:3},et=ee.WARN,en={error:function(e){et>=ee.ERROR&&ei(e)},warn:function(e){et>=ee.WARN&&ei(e)},info:function(e){et>=ee.INFO&&ei(e)}},ei=function(e){try{console.log("[Amplitude] "+e)}catch(e){}},er=function(e,t,n){return Z(e)===n||(en.error("Invalid "+t+" input type. Expected "+n+" but received "+Z(e)),!1)},eo=function(e){var t=Z(e);if("object"!==t)return en.error("Error: invalid properties format. Expecting Javascript object, received "+t+", ignoring"),{};if(Object.keys(e).length>H.MAX_PROPERTY_KEYS)return en.error("Error: too many properties (more than 1000), ignoring"),{};var n={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var r=i,o=Z(r);"string"!==o&&(r=String(r),en.warn("WARNING: Non-string property key, received type "+o+', coercing to string "'+r+'"'));var s=ea(r,e[i]);null!==s&&(n[r]=s)}return n},es=["nan","function","arguments","regexp","element"],ea=function e(t,n){var i=Z(n);if(-1!==es.indexOf(i))en.warn('WARNING: Property key "'+t+'" with invalid value type '+i+", ignoring"),n=null;else if("undefined"===i)n=null;else if("error"===i)n=String(n),en.warn('WARNING: Property key "'+t+'" with value type error, coercing to '+n);else if("array"===i){for(var r=[],o=0;o<n.length;o++){var s=n[o],a=Z(s);if("array"===a){en.warn("WARNING: Cannot have "+a+" nested in an array property value, skipping");continue}"object"===a?r.push(eo(s)):r.push(e(t,s))}n=r}else"object"===i&&(n=eo(n));return n},eu=function(e,t){var n=Z(t);if("string"===n)return t;if("date"===n||"number"===n||"boolean"===n)return t=String(t),en.warn("WARNING: Non-string groupName, received type "+n+', coercing to string "'+t+'"'),t;if("array"===n){for(var i=[],r=0;r<t.length;r++){var o=t[r],s=Z(o);if("array"===s||"object"===s){en.warn("WARNING: Skipping nested "+s+" in array groupName");continue}"string"===s?i.push(o):("date"===s||"number"===s||"boolean"===s)&&(o=String(o),en.warn("WARNING: Non-string groupName, received type "+s+', coercing to string "'+o+'"'),i.push(o))}return i}en.warn("WARNING: Non-string groupName, received type "+n+". Please use strings or array of strings for groupName")},ec={setLogLevel:function(e){Object.prototype.hasOwnProperty.call(ee,e)&&(et=ee[e])},getLogLevel:function(){return et},logLevels:ee,log:en,isEmptyString:function(e){return!e||0===e.length},isWebWorkerEnvironment:function(){return"undefined"!=typeof WorkerGlobalScope},getQueryParam:function(e,t){var n=RegExp("[\\?&]"+(e=e.replace(/[[]/,"\\[").replace(/[\]]/,"\\]"))+"=([^&#]*)").exec(t);return null===n?void 0:decodeURIComponent(n[1].replace(/\+/g," "))},sessionStorageEnabled:function(){try{if(Y.sessionStorage)return!0}catch(e){}return!1},truncate:function e(t){if("array"===Z(t))for(var n,i=0;i<t.length;i++)t[i]=e(t[i]);else if("object"===Z(t))for(var r in t)r in t&&(t[r]=e(t[r]));else t="string"===Z(n=t)&&n.length>H.MAX_STRING_LENGTH?n.substring(0,H.MAX_STRING_LENGTH):n;return t},validateGroups:function(e){var t=Z(e);if("object"!==t)return en.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 r=i,o=Z(r);"string"!==o&&(r=String(r),en.warn("WARNING: Non-string groupType, received type "+o+', coercing to string "'+r+'"'));var s=eu(r,e[i]);null!==s&&(n[r]=s)}return n},validateInput:er,validateProperties:eo,validateDeviceId:function(e){return!!er(e,"deviceId","string")&&(!(e.indexOf(".")>=0)||(en.error("Device IDs may not contain '.' characters. Value will be ignored: \"".concat(e,'"')),!1))},validateTransport:function(e){return!!er(e,"transport","string")&&(e!==H.TRANSPORT_HTTP&&e!==H.TRANSPORT_BEACON?(en.error("transport value must be one of '".concat(H.TRANSPORT_BEACON,"' or '").concat(H.TRANSPORT_HTTP,"'")),!1):e===H.TRANSPORT_HTTP||"undefined"==typeof navigator||!!navigator.sendBeacon||(en.error("browser does not support sendBeacon, so transport must be HTTP"),!1))},validateSessionId:function(e){return!!(er(e,"sessionId","number")&&new Date(e).getTime()>0)||(en.error("sessionId value must in milliseconds since epoch (Unix Timestamp)"),!1)},getLocation:function(){return Y.location},getHost:function(e){var t=Y.location?Y.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}},el=function(e){try{for(var t=document.cookie.split(";"),n=null,i=0;i<t.length;i++){for(var r=t[i];" "===r.charAt(0);)r=r.substring(1,r.length);if(0===r.indexOf(e)){n=r.substring(e.length,r.length);break}}return n}catch(e){return null}},ep=function(e,t,n){var i=null!==t?n.expirationDays:-1;if(i){var r=new Date;r.setTime(r.getTime()+864e5*i),i=r}var o=e+"="+t;i&&(o+="; expires="+i.toUTCString()),o+="; path=/",n.domain&&(o+="; domain="+n.domain),n.secure&&(o+="; Secure"),n.sameSite&&(o+="; SameSite="+n.sameSite),document.cookie=o},ed=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=t.split(".")[H.LAST_EVENT_TIME_INDEX];return(n&&(e=parseInt(n,32)),e)?e:(ec.log.warn("unable to parse malformed cookie: ".concat(t)),0)},eh={set:ep,get:el,getAll:function(e){try{var t,n=document.cookie.split(";").map(function(e){return e.trimStart()}),i=[],r=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=$(e))){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,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,o=e},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}(n);try{for(r.s();!(t=r.n()).done;){for(var o=t.value;" "===o.charAt(0);)o=o.substring(1);0===o.indexOf(e)&&i.push(o.substring(e.length))}}catch(e){r.e(e)}finally{r.f()}return i}catch(e){return[]}},getLastEventTime:ed,sortByEventTime:function(e){return((function(e){if(Array.isArray(e))return z(e)})(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||$(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).sort(function(e,t){var n=ed(e);return ed(t)-n})},areCookiesEnabled:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=H.COOKIE_TEST_PREFIX;if("undefined"==typeof document)return!1;var n=!1;try{var i=String(Date.now());ep(t,i,e),ec.log.info("Testing if cookies available"),n=el(t+"=")===i}catch(e){ec.log.warn('Error thrown when checking for cookies. Reason: "'.concat(e,'"'))}finally{ec.log.info("Cleaning up cookies availability test"),ep(t,null,e)}return n}},ef=function(){for(var e="",t=0;t<22;++t)e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".charAt(Math.floor(64*Math.random()));return e},ev=function(e){var t=ec.getHost(e).split("."),n=[],i="_tldtest_"+ef();if(ec.isWebWorkerEnvironment())return"";for(var r=t.length-2;r>=0;--r)n.push(t.slice(r).join("."));for(var o=0;o<n.length;++o){var s=n[o],a={domain:"."+s};if(eh.set(i,1,a),eh.get(i))return eh.set(i,null,a),s}return""},eg={expirationDays:void 0,domain:void 0},ey=function(e){var t="";return eg.domain&&(t="."===eg.domain.charAt(0)?eg.domain.substring(1):eg.domain),e+t},em=function(e){var t=ey(e)+"=",n=eh.get(t);try{if(n)return JSON.parse(J.decode(n))}catch(e){}return null},e_=function(e,t){try{return eh.set(ey(e),J.encode(JSON.stringify(t)),eg),!0}catch(e){return!1}},eb=function(e){try{return eh.set(ey(e),null,eg),!0}catch(e){return!1}},eE={reset:function(){eg={expirationDays:void 0,domain:void 0}},options:function(e){if(0==arguments.length)return eg;e=e||{},eg.expirationDays=e.expirationDays,eg.secure=e.secure,eg.sameSite=e.sameSite;var t=ec.isEmptyString(e.domain)?"."+ev(ec.getLocation().href):e.domain,n=Math.random();eg.domain=t,e_("amplitude_test",n);var i=em("amplitude_test");return i&&i===n||(t=null),eb("amplitude_test"),eg.domain=t,eg},get:em,set:e_,remove:eb,setRaw:function(e,t){try{return eh.set(ey(e),t,eg),!0}catch(e){return!1}},getRaw:function(e){var t=ey(e)+"=";return eh.get(t)}},eI=function(){function e(){V(this,e),this.map=new Map,this.length=0}return B(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 Y.localStorage.setItem(t,t),e=Y.localStorage.getItem(t)===String(t),Y.localStorage.removeItem(t),e}catch(e){}return!1}())i=Y.localStorage;else if(void 0!==Y&&Y.globalStorage)try{i=Y.globalStorage[Y.location.hostname]}catch(e){}else if("undefined"!=typeof document){var ew=document.createElement("div"),eS="localStorage";ew.style.display="none",document.getElementsByTagName("head")[0].appendChild(ew),ew.addBehavior&&(ew.addBehavior("#default#userdata"),i={length:0,setItem:function(e,t){ew.load(eS),!ew.getAttribute(e)&&this.length++,ew.setAttribute(e,t),ew.save(eS)},getItem:function(e){return ew.load(eS),ew.getAttribute(e)},removeItem:function(e){ew.load(eS),ew.getAttribute(e)&&this.length--,ew.removeAttribute(e),ew.save(eS)},clear:function(){ew.load(eS);for(var e,t=0;e=ew.XMLDocument.documentElement.attributes[t++];)ew.removeAttribute(e.name);ew.save(eS),this.length=0},key:function(e){return ew.load(eS),ew.XMLDocument.documentElement.attributes[e]}},ew.load(eS),i.length=ew.XMLDocument.documentElement.attributes.length)}else ec.isWebWorkerEnvironment()&&(i=new eI);i||(i={length:0,setItem:function(e,t){},getItem:function(e){},removeItem:function(e){},clear:function(){},key:function(e){}});var eO=i,eN=function(){this.storage=null};eN.prototype.getStorage=function(e){if(null!==this.storage)return this.storage;if(!e&&eh.areCookiesEnabled())this.storage=eE;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||Y&&Y.location&&Y.location.hostname,this._options.secure=e.secure||!1)},get:function(e){try{return JSON.parse(eO.getItem(t+e))}catch(e){}return null},set:function(e,n){try{return eO.setItem(t+e,JSON.stringify(n)),!0}catch(e){}return!1},remove:function(e){try{eO.removeItem(t+e)}catch(e){return!1}}}}return this.storage};var eT=(W(r={},H.STORAGE_COOKIES,!0),W(r,H.STORAGE_NONE,!0),W(r,H.STORAGE_LOCAL,!0),W(r,H.STORAGE_SESSION,!0),r),ek=function(){function e(t){var n=t.storageKey,i=t.disableCookies,r=t.domain,o=t.secure,s=t.sameSite,a=t.expirationDays,u=t.storage;V(this,e),this.storageKey=n,this.domain=r,this.secure=o,this.sameSite=s,this.expirationDays=a,this.cookieDomain="";var c=ec.getLocation()?ec.getLocation().href:void 0,l=i?"":ev(c);this.cookieDomain=r||(l?"."+l:null),eT[u]?this.storage=u:i||!eh.areCookiesEnabled({domain:this.cookieDomain,secure:this.secure,sameSite:this.sameSite,expirationDays:this.expirationDays})?this.storage=H.STORAGE_LOCAL:this.storage=H.STORAGE_COOKIES}return B(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,r=e.sessionId,o=e.lastEventTime,s=e.eventId,a=e.identifyId,u=e.sequenceNumber;if(this.storage!==H.STORAGE_NONE){var c=[t,J.encode(n||""),i?"1":"",r?r.toString(32):"0",o?o.toString(32):"0",s?s.toString(32):"0",a?a.toString(32):"0",u?u.toString(32):"0"].join(".");switch(this.storage){case H.STORAGE_SESSION:Y.sessionStorage&&Y.sessionStorage.setItem(this.storageKey,c);break;case H.STORAGE_LOCAL:eO.setItem(this.storageKey,c);break;case H.STORAGE_COOKIES:this.saveCookie(c)}}}},{key:"saveCookie",value:function(e){eh.set(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===H.STORAGE_COOKIES){var n=this.getCookieStorageKey()+"=",i=eh.getAll(n);if(0===i.length||1===i.length)e=i[0];else{var r=eh.sortByEventTime(i)[0];i.forEach(function(){return eh.set(t.getCookieStorageKey(),null,{})}),this.saveCookie(r),e=eh.get(n)}}if(e||(e=eO.getItem(this.storageKey)),!e)try{e=Y.sessionStorage&&Y.sessionStorage.getItem(this.storageKey)}catch(e){ec.log.info('window.sessionStorage unavailable. Reason: "'.concat(e,'"'))}if(!e)return null;var o=e.split("."),s=null;if(o[H.USER_ID_INDEX])try{s=J.decode(o[H.USER_ID_INDEX])}catch(e){s=null}return{deviceId:o[H.DEVICE_ID_INDEX],userId:s,optOut:"1"===o[H.OPT_OUT_INDEX],sessionId:parseInt(o[H.SESSION_ID_INDEX],32),lastEventTime:parseInt(o[H.LAST_EVENT_TIME_INDEX],32),eventId:parseInt(o[H.EVENT_ID_INDEX],32),identifyId:parseInt(o[H.IDENTIFY_ID_INDEX],32),sequenceNumber:parseInt(o[H.SEQUENCE_NUMBER_INDEX],32)}}},{key:"clear",value:function(){var e;if(this.storage===H.STORAGE_COOKIES&&(e=eh.get(this.getCookieStorageKey()+"="),eh.set(this.getCookieStorageKey(),null,{domain:this.cookieDomain,secure:this.secure,sameSite:this.sameSite,expirationDays:0})),e||(e=eO.getItem(this.storageKey),eO.clear()),!e)try{e=Y.sessionStorage&&Y.sessionStorage.getItem(this.storageKey),Y.sessionStorage.clear()}catch(e){ec.log.info('window.sessionStorage unavailable. Reason: "'.concat(e,'"'))}return!!e}}]),e}(),eA=function(e,t){var n=e?"?"+e.split(".").slice(-1)[0].replace(/\|/g,"&"):"",i=function(e,t,n,i){return ec.getQueryParam(e,t)||ec.getQueryParam(n,i)},r=i(H.UTM_SOURCE,t,"utmcsr",n),o=i(H.UTM_MEDIUM,t,"utmcmd",n),s=i(H.UTM_CAMPAIGN,t,"utmccn",n),a=i(H.UTM_TERM,t,"utmctr",n),u=i(H.UTM_CONTENT,t,"utmcct",n),c={},l=function(e,t){ec.isEmptyString(t)||(c[e]=t)};return l(H.UTM_SOURCE,r),l(H.UTM_MEDIUM,o),l(H.UTM_CAMPAIGN,s),l(H.UTM_TERM,a),l(H.UTM_CONTENT,u),c},eR="$clearAll",eC=function(){this.userPropertiesOperations={},this.properties=[]};eC.prototype.add=function(e,t){return"number"===Z(t)||"string"===Z(t)?this._addOperation("$add",e,t):ec.log.error("Unsupported type for value: "+Z(t)+", expecting number or string"),this},eC.prototype.append=function(e,t){return this._addOperation("$append",e,t),this},eC.prototype.clearAll=function(){return Object.keys(this.userPropertiesOperations).length>0?Object.prototype.hasOwnProperty.call(this.userPropertiesOperations,eR)||ec.log.error("Need to send $clearAll on its own Identify object without any other operations, skipping $clearAll"):this.userPropertiesOperations[eR]="-",this},eC.prototype.prepend=function(e,t){return this._addOperation("$prepend",e,t),this},eC.prototype.set=function(e,t){return this._addOperation("$set",e,t),this},eC.prototype.setOnce=function(e,t){return this._addOperation("$setOnce",e,t),this},eC.prototype.unset=function(e){return this._addOperation("$unset",e,"-"),this},eC.prototype.preInsert=function(e,t){return this._addOperation("$preInsert",e,t),this},eC.prototype.postInsert=function(e,t){return this._addOperation("$postInsert",e,t),this},eC.prototype.remove=function(e,t){return this._addOperation("$remove",e,t),this},eC.prototype._addOperation=function(e,t,n){if(Object.prototype.hasOwnProperty.call(this.userPropertiesOperations,eR)){ec.log.error("This identify already contains a $clearAll operation, skipping operation "+e);return}if(-1!==this.properties.indexOf(t)){ec.log.error('User property "'+t+'" already used in this identify, skipping operation '+e);return}Object.prototype.hasOwnProperty.call(this.userPropertiesOperations,e)||(this.userPropertiesOperations[e]={}),this.userPropertiesOperations[e][t]=n,this.properties.push(t)};var eP=function(e,t,n){this.url=e,this.data=t||{},this.headers=n};eP.prototype.send=function(e){if(Y.XDomainRequest){var t=new Y.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(o.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(o.stringify(this.data))}else{var i=void 0;fetch(this.url,{method:"POST",headers:this.headers,body:o.stringify(this.data)}).then(function(e){return i=e.status,e.text()}).then(function(t){e(i,t)})}};var eU=function(){this._price=null,this._productId=null,this._quantity=1,this._revenueType=null,this._properties=null};eU.prototype.setProductId=function(e){return"string"!==Z(e)?ec.log.error("Unsupported type for productId: "+Z(e)+", expecting string"):ec.isEmptyString(e)?ec.log.error("Invalid empty productId"):this._productId=e,this},eU.prototype.setQuantity=function(e){return"number"!==Z(e)?ec.log.error("Unsupported type for quantity: "+Z(e)+", expecting number"):this._quantity=parseInt(e),this},eU.prototype.setPrice=function(e){return"number"!==Z(e)?ec.log.error("Unsupported type for price: "+Z(e)+", expecting number"):this._price=e,this},eU.prototype.setRevenueType=function(e){return"string"!==Z(e)?ec.log.error("Unsupported type for revenueType: "+Z(e)+", expecting string"):this._revenueType=e,this},eU.prototype.setEventProperties=function(e){return"object"!==Z(e)?ec.log.error("Unsupported type for eventProperties: "+Z(e)+", expecting object"):this._properties=ec.validateProperties(e),this},eU.prototype._isValidRevenue=function(){return"number"===Z(this._price)||(ec.log.error("Invalid revenue, need to set price field"),!1)},eU.prototype._toJSONObject=function(){var e="object"===Z(this._properties)?this._properties:{};return null!==this._productId&&(e[H.REVENUE_PRODUCT_ID]=this._productId),null!==this._quantity&&(e[H.REVENUE_QUANTITY]=this._quantity),null!==this._price&&(e[H.REVENUE_PRICE]=this._price),null!==this._revenueType&&(e[H.REVENUE_REVENUE_TYPE]=this._revenueType),e};var ex={US:"US",EU:"EU"},eD=function(e){var t=H.EVENT_LOG_URL;switch(e){case ex.EU:t=H.EVENT_LOG_EU_URL;break;case ex.US:t=H.EVENT_LOG_URL}return t},ej=function(e){var t=H.DYNAMIC_CONFIG_URL;switch(e){case ex.EU:t=H.DYNAMIC_CONFIG_EU_URL;break;case ex.US:t=H.DYNAMIC_CONFIG_URL}return t},eq="8.21.9",eM={apiEndpoint:H.EVENT_LOG_URL,batchEvents:!1,cookieExpiration:365,cookieName:"amplitude_id",sameSiteCookie:"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:({getLanguage:function(){return"undefined"!=typeof navigator&&(navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||""}}).getLanguage(),library:{name:"amplitude-js",version:eq},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:H.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:H.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:ex.US,useDynamicConfig:!1,serverZoneBasedApi:!1,sessionId:null,partnerId:""},eL=new(function(){function e(){return V(this,e),e.instance||(this.ingestionEndpoint=H.EVENT_LOG_URL,e.instance=this),e.instance}return B(e,[{key:"refresh",value:function(e,t,n){var i="https";t||"https:"===Y.location.protocol||(i="http");var r=i+"://"+ej(e),o=this;if(Y.XDomainRequest){var s=new Y.XDomainRequest;s.open("GET",r,!0),s.onload=function(){var e=JSON.parse(s.responseText);o.ingestionEndpoint=e.ingestionEndpoint,n&&n()},s.onerror=function(){},s.ontimeout=function(){},s.onprogress=function(){},s.send()}else{var a=new XMLHttpRequest;a.open("GET",r,!0),a.onreadystatechange=function(){if(4===a.readyState&&200===a.status){var e=JSON.parse(a.responseText);o.ingestionEndpoint=e.ingestionEndpoint,n&&n()}},a.send()}}}]),e}()),eF=function(e){s()||ec.isWebWorkerEnvironment()||ec.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=ec.isEmptyString(e)?H.DEFAULT_INSTANCE:e.toLowerCase(),this._unsentEvents=[],this._unsentIdentifys=[],this.options=F(F({},eM),{},{headers:F({},eM.headers),ingestionMetadata:F({},eM.ingestionMetadata),library:F({},eM.library),plan:F({},eM.plan),trackingOptions:F({},eM.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(R())(this._userAgent).getResult()};eF.prototype.Identify=eC,eF.prototype.Revenue=eU,eF.prototype.init=function(e,t,n,i){var r=this;if("string"!==Z(e)||ec.isEmptyString(e)){ec.log.error("Invalid apiKey. Please re-initialize with a valid apiKey");return}try{this._connector=M.getInstance(this._instanceName),eV(this.options,n),(s()||ec.isWebWorkerEnvironment())&&void 0!==Y.Prototype&&Array.prototype.toJSON&&(a(),ec.log.warn("Prototype.js injected Array.prototype.toJSON. Deleting Array.prototype.toJSON to prevent double-stringify")),this.options.cookieName!==eM.cookieName&&ec.log.warn("The cookieName option is deprecated. We will be ignoring it for newer cookies"),this.options.serverZoneBasedApi&&(this.options.apiEndpoint=eD(this.options.serverZone)),this._refreshDynamicConfig(),this.options.apiKey=e,this._storageSuffix="_"+e+(this._instanceName===H.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=H.COOKIE_PREFIX+"_"+this._storageSuffixV5,this.cookieStorage=new eN().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 ek({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 o=!!this.cookieStorage.get(this._oldCookiename),u=!!this._metadataStorage.load();if(this._useOldCookie=!u&&o&&!this.options.cookieForceUpgrade,this.options.deferInitialization&&!(u||o)){this._deferInitialization(e,t,n,i);return}this.options.domain=this.cookieStorage.options().domain,"string"===Z(this.options.logLevel)&&ec.setLogLevel(this.options.logLevel);var c=eQ(this);this._apiPropertiesTrackingOptions=Object.keys(c).length>0?{tracking_options:c}:{},this.options.cookieForceUpgrade&&o&&(u||eB(this),this.cookieStorage.remove(this._oldCookiename)),eK(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(){n&&n.deviceId&&!ec.validateDeviceId(n.deviceId)&&(ec.log.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,void 0),r.options.userId="string"===Z(t)&&!ec.isEmptyString(t)&&t||"number"===Z(t)&&t.toString()||r.options.userId||null;var e=new Date().getTime(),i=!r._sessionId||!r._lastEventTime||e-r._lastEventTime>r.options.sessionTimeout||r.options.sessionId;i&&(r.options.unsetParamsReferrerOnNewSession&&r._unsetUTMParams(),r._newSession=!0,r._sessionId=r.options.sessionId||e,r.options.sessionId=void 0,r.options.saveParamsReferrerOncePerSession&&r._trackParamsAndReferrer()),r.options.saveParamsReferrerOncePerSession||r._trackParamsAndReferrer(),r.options.saveEvents&&(eG(r._unsentEvents),eG(r._unsentIdentifys)),r._lastEventTime=e,e$(r),r._pendingReadStorage=!1,r._sendEventsIfReady();for(var o=0;o<r._onInitCallbacks.length;o++)r._onInitCallbacks[o](r);r._onInitCallbacks=[],r._isInitialized=!0,i&&r._runNewSessionStartCallbacks()}(),this.runQueuedFunctions(),"function"===Z(i)&&i(this);var l=this.options.onExitPage;if("function"===Z(l)&&Y.addEventListener&&!this.pageHandlersAdded){this.pageHandlersAdded=!0;var p=function(){var e=r.options.transport;r.setTransport(H.TRANSPORT_BEACON),l(),r.setTransport(e)};Y.addEventListener("pagehide",function(){p()},!1)}this._connector.eventBridge.setEventReceiver(function(e){r._logEvent(e.eventType,e.eventProperties,e.userProperties)});var d=this._connector.identityStore.editIdentity();this.options.deviceId&&d.setDeviceId(this.options.deviceId),this.options.userId&&d.setUserId(this.options.userId),d.commit()}catch(e){ec.log.error(e),n&&"function"===Z(n.onError)&&n.onError(e)}},eF.prototype._runNewSessionStartCallbacks=function(){for(var e=0;e<this._onNewSessionStartCallbacks.length;e++)this._onNewSessionStartCallbacks[e](this)},eF.prototype.deleteLowerLevelDomainCookies=function(){var e=ec.getHost(),t=this.options.domain&&"."===this.options.domain[0]?this.options.domain.slice(1):this.options.domain;if(t&&ec.isWebWorkerEnvironment()&&e!==t&&RegExp(t+"$").test(e)){for(var n=e.split("."),i=t.split("."),r=n.length;r>i.length;--r){var o=n.slice(n.length-r).join(".");eh.set(this._cookieName,null,{domain:"."+o})}eh.set(this._cookieName,null,{})}},eF.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||ef()};var eG=function(e){for(var t=0;t<e.length;t++){var n=e[t].event.user_properties,i=e[t].event.event_properties,r=e[t].event.groups;e[t].event.user_properties=ec.validateProperties(n),e[t].event.event_properties=ec.validateProperties(i),e[t].event.groups=ec.validateGroups(r)}};eF.prototype._trackParamsAndReferrer=function(){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 e,t,n,i,r=F(F(F(F({},e),t),n),i);Object.keys(r).length>0&&this.logEvent(H.ATTRIBUTION_EVENT,r)}};var eV=function e(t,n){if("object"===Z(n)){var i=new Set(["headers"]),r=new Set(["eventUploadPeriodMillis"]);for(var o in n)i.has(o)?t[o]=F(F({},t[o]),n[o]):Object.prototype.hasOwnProperty.call(n,o)&&function(i){if(Object.prototype.hasOwnProperty.call(t,i)){var o=n[i],s=Z(t[i]);if("transport"!==i||ec.validateTransport(o)){if("sessionId"===i&&null!==o){t[i]=ec.validateSessionId(o)?o:null;return}ec.validateInput(o,i+" option",s)&&("boolean"===s?t[i]=!!o:"string"===s&&!ec.isEmptyString(o)||"number"===s&&(o>0||0===o&&r.has(i))||"function"===s?t[i]=o:"object"===s&&e(t[i],o))}}}(o)}};eF.prototype.runQueuedFunctions=function(){var e=this._q;this._q=[];for(var t=0;t<e.length;t++){var n=this[e[t][0]];"function"===Z(n)&&n.apply(this,e[t].slice(1))}},eF.prototype._apiKeySet=function(e){return!ec.isEmptyString(this.options.apiKey)||(ec.log.error("Invalid apiKey. Please set a valid apiKey with init() before calling "+e),!1)},eF.prototype._loadSavedUnsentEvents=function(e){var t=this._getFromStorage(eO,e),n=this._parseSavedUnsentEventsString(t,e);return this._setInStorage(eO,e,JSON.stringify(n)),n},eF.prototype._parseSavedUnsentEventsString=function(e,t){if(ec.isEmptyString(e))return[];if("string"===Z(e))try{var n=JSON.parse(e);if("array"===Z(n))return n}catch(e){}return ec.log.error("Unable to load "+t+" events. Restart with a new empty queue."),[]},eF.prototype.isNewSession=function(){return this._newSession},eF.prototype.onInit=function(e){this._isInitialized?e(this):this._onInitCallbacks.push(e)},eF.prototype.onNewSessionStart=function(e){this._onNewSessionStartCallbacks.push(e)},eF.prototype.getSessionId=function(){return this._sessionId},eF.prototype.nextEventId=function(){return this._eventId++,this._eventId},eF.prototype.nextIdentifyId=function(){return this._identifyId++,this._identifyId},eF.prototype.nextSequenceNumber=function(){return this._sequenceNumber++,this._sequenceNumber},eF.prototype._unsentCount=function(){return this._unsentEvents.length+this._unsentIdentifys.length},eF.prototype._sendEventsIfReady=function(){return 0!==this._unsentCount()&&(!this.options.batchEvents||this._unsentCount()>=this.options.eventUploadThreshold||this.options.transport===H.TRANSPORT_BEACON?(this.sendEvents(),!0):(this._updateScheduled||(this._updateScheduled=!0,setTimeout((function(){this._updateScheduled=!1,this.sendEvents()}).bind(this),this.options.eventUploadPeriodMillis)),!1))},eF.prototype.clearStorage=function(){return this._metadataStorage.clear()},eF.prototype._getFromStorage=function(e,t){return e.getItem(t+this._storageSuffix)},eF.prototype._setInStorage=function(e,t,n){e.setItem(t+this._storageSuffix,n)};var eK=function(e){if(!e._useOldCookie){var t=e._metadataStorage.load();"object"===Z(t)&&eW(e,t);return}var n=e.cookieStorage.get(e._oldCookiename);if("object"===Z(n)){eW(e,n);return}},eB=function(e){var t=e.cookieStorage.get(e._oldCookiename);"object"===Z(t)&&(eW(e,t),e$(e))},eW=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))},e$=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)};eF.prototype._initUtmData=function(e,t){e=e||this._getUrlParams();var n=eA(t=t||this.cookieStorage.get("__utmz"),e);return ez(this,n),n},eF.prototype._unsetUTMParams=function(){var e=new eC;e.unset(H.REFERRER),e.unset(H.REFERRING_DOMAIN),e.unset(H.UTM_SOURCE),e.unset(H.UTM_MEDIUM),e.unset(H.UTM_CAMPAIGN),e.unset(H.UTM_TERM),e.unset(H.UTM_CONTENT),this.identify(e)};var ez=function(e,t){if("object"===Z(t)&&0!==Object.keys(t).length){var n=new eC;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)}};eF.prototype._getReferrer=function(){return this._getReferrerFromUrlParam(this._getUrlParams())||("undefined"!=typeof document?document.referrer:"")},eF.prototype._getUrlParams=function(){return Y.location.search},eF.prototype._saveGclid=function(e){var t=ec.getQueryParam("gclid",e);if(!ec.isEmptyString(t)){var n={gclid:t};return ez(this,n),n}},eF.prototype._saveFbclid=function(e){var t=ec.getQueryParam("fbclid",e);if(!ec.isEmptyString(t)){var n={fbclid:t};return ez(this,n),n}},eF.prototype._getDeviceIdFromUrlParam=function(e){return ec.getQueryParam(H.AMP_DEVICE_ID_PARAM,e)},eF.prototype._getReferrerFromUrlParam=function(e){return ec.getQueryParam(H.AMP_REFERRER_PARAM,e)},eF.prototype._getReferringDomain=function(e){if(ec.isEmptyString(e))return null;var t=e.split("/");return t.length>=3?t[2]:null},eF.prototype._saveReferrer=function(e){if(!ec.isEmptyString(e)){var t={referrer:e,referring_domain:this._getReferringDomain(e)};return ez(this,t),t}},eF.prototype.saveEvents=function(){try{var e=JSON.stringify(this._unsentEvents.map(function(e){return e.event}));this._setInStorage(eO,this.options.unsentKey,e)}catch(e){}try{var t=JSON.stringify(this._unsentIdentifys.map(function(e){return e.event}));this._setInStorage(eO,this.options.unsentIdentifyKey,t)}catch(e){}},eF.prototype.setDomain=function(e){if(this._shouldDeferCall())return this._q.push(["setDomain"].concat(Array.prototype.slice.call(arguments,0)));if(ec.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,eK(this),e$(this)}catch(e){ec.log.error(e)}},eF.prototype.setUserId=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(ec.validateInput(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()),e$(this),this._connector&&this._connector.identityStore.editIdentity().setUserId(this.options.userId).commit()}catch(e){ec.log.error(e)}}},eF.prototype.setGroup=function(e,t){if(this._shouldDeferCall())return this._q.push(["setGroup"].concat(Array.prototype.slice.call(arguments,0)));if(!(!this._apiKeySet("setGroup()")||!ec.validateInput(e,"groupType","string")||ec.isEmptyString(e))){var n={};n[e]=t;var i=new eC().set(e,t);this._logEvent(H.IDENTIFY_EVENT,null,null,i.userPropertiesOperations,n,null,null,null)}},eF.prototype.setOptOut=function(e){if(this._shouldDeferCall())return this._q.push(["setOptOut"].concat(Array.prototype.slice.call(arguments,0)));if(ec.validateInput(e,"enable","boolean"))try{this.options.optOut=e,e$(this)}catch(e){ec.log.error(e)}},eF.prototype.setSessionId=function(e){if(ec.validateInput(e,"sessionId","number"))try{this._sessionId=e,e$(this)}catch(e){ec.log.error(e)}},eF.prototype.resetSessionId=function(){this.setSessionId(new Date().getTime())},eF.prototype.regenerateDeviceId=function(){if(this._shouldDeferCall())return this._q.push(["regenerateDeviceId"].concat(Array.prototype.slice.call(arguments,0)));this.setDeviceId(ef())},eF.prototype.setDeviceId=function(e){if(this._shouldDeferCall())return this._q.push(["setDeviceId"].concat(Array.prototype.slice.call(arguments,0)));if(ec.validateDeviceId(e))try{!ec.isEmptyString(e)&&(this.options.deviceId=""+e,e$(this),this._connector&&this._connector.identityStore.editIdentity().setDeviceId(this.options.deviceId).commit())}catch(e){ec.log.error(e)}},eF.prototype.setTransport=function(e){if(this._shouldDeferCall())return this._q.push(["setTransport"].concat(Array.prototype.slice.call(arguments,0)));ec.validateTransport(e)&&(this.options.transport=e)},eF.prototype.setUserProperties=function(e){if(this._shouldDeferCall())return this._q.push(["setUserProperties"].concat(Array.prototype.slice.call(arguments,0)));if(this._apiKeySet("setUserProperties()")&&ec.validateInput(e,"userProperties","object")){var t=ec.truncate(ec.validateProperties(e));if(0!==Object.keys(t).length){var n=new eC;for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&n.set(i,t[i]);this.identify(n)}}},eF.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 eC;e.clearAll(),this.identify(e)}};var eX=function(e,t){for(var n=0;n<t._q.length;n++){var i=e[t._q[n][0]];"function"===Z(i)&&i.apply(e,t._q[n].slice(1))}return e};eF.prototype.identify=function(e,t,n,i){if(this._shouldDeferCall())return this._q.push(["identify"].concat(Array.prototype.slice.call(arguments,0)));if(!this._apiKeySet("identify()")){e0(t,n,0,"No request sent",{reason:"API key is not set"});return}if("object"===Z(e)&&Object.prototype.hasOwnProperty.call(e,"_q")&&(e=eX(new eC,e)),e instanceof eC){if(Object.keys(e.userPropertiesOperations).length>0)return this._logEvent(H.IDENTIFY_EVENT,null,null,e.userPropertiesOperations,null,null,null,t,n,i);e0(t,n,0,"No request sent",{reason:"No user property operations"})}else ec.log.error("Invalid identify input type. Expected Identify object but saw "+Z(e)),e0(t,n,0,"No request sent",{reason:"Invalid identify input type"})},eF.prototype.groupIdentify=function(e,t,n,i,r,o){if(this._shouldDeferCall())return this._q.push(["groupIdentify"].concat(Array.prototype.slice.call(arguments,0)));if(!this._apiKeySet("groupIdentify()")){e0(i,r,0,"No request sent",{reason:"API key is not set"});return}if(!ec.validateInput(e,"group_type","string")||ec.isEmptyString(e)){e0(i,r,0,"No request sent",{reason:"Invalid group type"});return}if(null==t){e0(i,r,0,"No request sent",{reason:"Invalid group name"});return}if("object"===Z(n)&&Object.prototype.hasOwnProperty.call(n,"_q")&&(n=eX(new eC,n)),n instanceof eC){if(Object.keys(n.userPropertiesOperations).length>0)return this._logEvent(H.GROUP_IDENTIFY_EVENT,null,null,null,W({},e,t),n.userPropertiesOperations,null,i,r,o);e0(i,r,0,"No request sent",{reason:"No group property operations"})}else ec.log.error("Invalid identify input type. Expected Identify object but saw "+Z(n)),e0(i,r,0,"No request sent",{reason:"Invalid identify input type"})},eF.prototype.setVersionName=function(e){if(this._shouldDeferCall())return this._q.push(["setVersionName"].concat(Array.prototype.slice.call(arguments,0)));ec.validateInput(e,"versionName","string")&&(this.options.versionName=e)},eF.prototype._logEvent=function(e,t,n,i,r,o,s,a,u,c){if(eK(this),!e){e0(a,u,0,"No request sent",{reason:"Missing eventType"});return}if(this.options.optOut){e0(a,u,0,"No request sent",{reason:"optOut is set to true"});return}try{l=e===H.IDENTIFY_EVENT||e===H.GROUP_IDENTIFY_EVENT?this.nextIdentifyId():this.nextEventId();var l,p=this.nextSequenceNumber(),d="number"===Z(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,e$(this);var h=this._ua.browser.name,f=this._ua.browser.major,v=this._ua.device.model||this._ua.os.name,g=this._ua.device.vendor;i=i||{};var y=F({},this._apiPropertiesTrackingOptions);n=F(F({},n||{}),y),t=t||{},r=r||{},o=o||{};var m={device_id:this.options.deviceId,user_id:this.options.userId,timestamp:d,event_id:l,session_id:this._sessionId||-1,event_type:e,version_name:this.options.versionName||null,platform:eJ(this,"platform")?this.options.platform:null,os_name:eJ(this,"os_name")&&h||null,os_version:eJ(this,"os_version")&&f||null,device_model:eJ(this,"device_model")&&v||null,device_manufacturer:eJ(this,"device_manufacturer")&&g||null,language:eJ(this,"language")?this.options.language:null,api_properties:n,event_properties:ec.truncate(ec.validateProperties(t)),user_properties:ec.truncate(ec.validateProperties(i)),uuid:function e(t){return t?(t^16*Math.random()>>t/4).toString(16):"10000000-1000-4000-8000-100000000000".replace(/[018]/g,e)}(),library:this.options.library,sequence_number:p,groups:ec.truncate(ec.validateGroups(r)),group_properties:ec.truncate(ec.validateProperties(o)),user_agent:this._userAgent,partner_id:this.options.partnerId||null};return eH(this)&&(m.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}),eY(this)&&(m.ingestion_metadata={source_name:this.options.ingestionMetadata.sourceName||void 0,source_version:this.options.ingestionMetadata.sourceVersion||void 0}),e===H.IDENTIFY_EVENT||e===H.GROUP_IDENTIFY_EVENT?(this._unsentIdentifys.push({event:m,callback:a,errorCallback:u}),this._limitEventsQueued(this._unsentIdentifys)):(this._unsentEvents.push({event:m,callback:a,errorCallback:u}),this._limitEventsQueued(this._unsentEvents)),this.options.saveEvents&&this.saveEvents(),this._sendEventsIfReady(),e===H.IDENTIFY_EVENT&&this._connector&&this._connector.identityStore.editIdentity().updateUserProperties(ec.truncate(ec.validateProperties(i))).commit(),l}catch(e){ec.log.error(e)}};var eH=function(e){return e.options.plan&&(e.options.plan.source||e.options.plan.branch||e.options.plan.version||e.options.plan.versionId)},eY=function(e){return e.options.ingestionMetadata&&(e.options.ingestionMetadata.sourceName||e.options.ingestionMetadata.sourceVersion)},eJ=function(e,t){return!!e.options.trackingOptions[t]},eQ=function(e){for(var t=["city","country","dma","ip_address","region"],n={},i=0;i<t.length;i++){var r=t[i];eJ(e,r)||(n[r]=!1)}return n};eF.prototype._limitEventsQueued=function(e){e.length>this.options.savedMaxCount&&e.splice(0,e.length-this.options.savedMaxCount).forEach(function(e){e0(e.callback,e.errorCallback,0,"No request sent",{reason:"Event dropped because options.savedMaxCount exceeded. User may be offline or have a content blocker"})})},eF.prototype.logEvent=function(e,t,n,i){var r=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,r)},eF.prototype.logEventWithTimestamp=function(e,t,n,i,r){var o=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()")?ec.validateInput(e,"eventType","string")?ec.isEmptyString(e)?(e0(i,r,0,"No request sent",{reason:"Missing eventType"}),-1):(ec.validateInput(o,"outOfSession","boolean")||e0(i,r,0,"No request sent",{reason:"Invalid outOfSession value"}),this._logEvent(e,t,null,null,null,null,n,i,r,o)):(e0(i,r,0,"No request sent",{reason:"Invalid type for eventType"}),-1):(e0(i,r,0,"No request sent",{reason:"API key not set"}),-1)},eF.prototype.logEventWithGroups=function(e,t,n,i,r){var o=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()")?ec.validateInput(e,"eventType","string")?(ec.validateInput(o,"outOfSession","boolean")||e0(event.callback,event.errorCallback,0,"No request sent",{reason:"Invalid outOfSession value"}),this._logEvent(e,t,null,null,n,null,null,i,r,o)):(e0(event.callback,event.errorCallback,0,"No request sent",{reason:"Invalid type for eventType"}),-1):(e0(event.callback,event.errorCallback,0,"No request sent",{reason:"API key not set"}),-1)};var eZ=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},e0=function(e,t,n,i,r){"function"===Z(e)&&e(n,i,r),"function"===Z(t)&&t(n,i,r)};eF.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"===Z(e)&&Object.prototype.hasOwnProperty.call(e,"_q")&&(e=eX(new eU,e)),e instanceof eU){if(e&&e._isValidRevenue())return this.logEvent(H.REVENUE_EVENT,e._toJSONObject())}else ec.log.error("Invalid revenue input type. Expected Revenue object but saw "+Z(e))}},eF.prototype.logRevenue=function(e,t,n){return this._shouldDeferCall()?this._q.push(["logRevenue"].concat(Array.prototype.slice.call(arguments,0))):this._apiKeySet("logRevenue()")&&eZ(e)&&(void 0===t||eZ(t))?this._logEvent(H.REVENUE_EVENT,{},{productId:n,special:"revenue_amount",quantity:t||1,price:e},null,null,null,null,null):-1},eF.prototype._logErrorsOnEvents=function(e,t,n,i){for(var r=["_unsentEvents","_unsentIdentifys"],o=0;o<r.length;o++)for(var s=r[o],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)}},eF.prototype.removeEvents=function(e,t,n,i){e1(this,"_unsentEvents",e,n,i),e1(this,"_unsentIdentifys",t,n,i)};var e1=function(e,t,n,i,r){if(!(n<0)){for(var o=[],s=0;s<e[t].length;s++){var a=e[t][s];a.event.event_id>n?o.push(a):a.callback&&a.callback(i,r)}e[t]=o}};eF.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(0!==this._unsentCount()){if(this.options.transport!==H.TRANSPORT_BEACON){if(this._sending)return;this._sending=!0}var e=(this.options.forceHttps?"https":"https:"===Y.location.protocol?"https":"http")+"://"+this.options.apiEndpoint,t=Math.min(this._unsentCount(),this.options.uploadBatchSize),n=this._mergeEventsAndIdentifys(t),i=n.maxEventId,r=n.maxIdentifyId,o=JSON.stringify(n.eventsToSend.map(function(e){return e.event})),s=new Date().getTime(),a={client:this.options.apiKey,e:o,v:H.API_VERSION,upload_time:s,checksum:c()(H.API_VERSION+this.options.apiKey+o+s)};if(this.options.transport===H.TRANSPORT_BEACON&&"undefined"!=typeof navigator){navigator.sendBeacon(e,new URLSearchParams(a))?(this.removeEvents(i,r,200,"success"),this.options.saveEvents&&this.saveEvents()):this._logErrorsOnEvents(i,r,0,"");return}var u=this;try{new eP(e,a,this.options.headers).send(function(e,n){u._sending=!1;try{200===e?(u.removeEvents(i,r,e,n),u.options.saveEvents&&u.saveEvents(),u._sendEventsIfReady()):(u._logErrorsOnEvents(i,r,e,n),413===e&&(1===u.options.uploadBatchSize&&u.removeEvents(i,r,e,n),u.options.uploadBatchSize=Math.ceil(t/2),u.sendEvents()))}catch(e){}})}catch(e){var l="Request failed to send";ec.log.error(l),u._logErrorsOnEvents(i,r,0,l),u.removeEvents(i,r,0,l,{reason:e.message})}}},eF.prototype._mergeEventsAndIdentifys=function(e){for(var t=[],n=0,i=-1,r=0,o=-1;t.length<e;){var s=void 0,a=r>=this._unsentIdentifys.length,u=n>=this._unsentEvents.length;if(u&&a){ec.log.error("Merging Events and Identifys, less events and identifys than expected");break}a?i=(s=this._unsentEvents[n++]).event.event_id:u?o=(s=this._unsentIdentifys[r++]).event.event_id:"sequence_number"in this._unsentEvents[n].event&&!(this._unsentEvents[n].event.sequence_number<this._unsentIdentifys[r].event.sequence_number)?o=(s=this._unsentIdentifys[r++]).event.event_id:i=(s=this._unsentEvents[n++]).event.event_id,t.push(s)}return{eventsToSend:t,maxEventId:i,maxIdentifyId:o}},eF.prototype.setGlobalUserProperties=function(e){this.setUserProperties(e)},eF.prototype.__VERSION__=function(){return this.options.library.version},eF.prototype.setLibrary=function(e,t){null!=e&&(this.options.library.name=e),null!=t&&(this.options.library.version=t)},eF.prototype._shouldDeferCall=function(){return this._pendingReadStorage||this._initializationDeferred},eF.prototype._deferInitialization=function(){this._initializationDeferred=!0,this._q.push(["init"].concat(Array.prototype.slice.call(arguments,0)))},eF.prototype.enableTracking=function(){this._initializationDeferred=!1,e$(this),this.runQueuedFunctions()},eF.prototype._refreshDynamicConfig=function(){this.options.useDynamicConfig&&eL.refresh(this.options.serverZone,this.options.forceHttps,(function(){this.options.apiEndpoint=eL.ingestionEndpoint}).bind(this))},eF.prototype.getDeviceId=function(){return this.options.deviceId},eF.prototype.getUserId=function(){return this.options.userId},eF.prototype.setMinTimeBetweenSessionsMillis=function(e){if(ec.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(e){ec.log.error(e)}}},eF.prototype.setEventUploadThreshold=function(e){if(ec.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(e){ec.log.error(e)}}},eF.prototype.setUseDynamicConfig=function(e){if(ec.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(e){ec.log.error(e)}}},eF.prototype.setServerZone=function(e){var t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];if((e===ex.EU||e===ex.US)&&ec.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=eD(this.options.serverZone))}catch(e){ec.log.error(e)}}},eF.prototype.setServerUrl=function(e){if(ec.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(e){ec.log.error(e)}}};var e2=function(){this.options=F({},eM),this._q=[],this._instances={}};e2.prototype.Identify=eC,e2.prototype.Revenue=eU,e2.prototype.getInstance=function(e){e=ec.isEmptyString(e)?H.DEFAULT_INSTANCE:e.toLowerCase();var t=this._instances[e];return void 0===t&&(t=new eF(e),this._instances[e]=t),t},e2.prototype.init=function(e,t,n,i){this.getInstance().init(e,t,n,(function(e){this.options=e.options,"function"===Z(i)&&i(e)}).bind(this))},e2.prototype.isNewSession=function(){return this.getInstance().isNewSession()},e2.prototype.getSessionId=function(){return this.getInstance().getSessionId()},e2.prototype.nextEventId=function(){return this.getInstance().nextEventId()},e2.prototype.nextIdentifyId=function(){return this.getInstance().nextIdentifyId()},e2.prototype.nextSequenceNumber=function(){return this.getInstance().nextSequenceNumber()},e2.prototype.saveEvents=function(){this.getInstance().saveEvents()},e2.prototype.setDomain=function(e){this.getInstance().setDomain(e)},e2.prototype.setUserId=function(e){this.getInstance().setUserId(e)},e2.prototype.setGroup=function(e,t){this.getInstance().setGroup(e,t)},e2.prototype.setOptOut=function(e){this.getInstance().setOptOut(e)},e2.prototype.regenerateDeviceId=function(){this.getInstance().regenerateDeviceId()},e2.prototype.setDeviceId=function(e){this.getInstance().setDeviceId(e)},e2.prototype.setUserProperties=function(e){this.getInstance().setUserProperties(e)},e2.prototype.clearUserProperties=function(){this.getInstance().clearUserProperties()},e2.prototype.identify=function(e,t){this.getInstance().identify(e,t)},e2.prototype.setVersionName=function(e){this.getInstance().setVersionName(e)},e2.prototype.logEvent=function(e,t,n){return this.getInstance().logEvent(e,t,n)},e2.prototype.logEventWithGroups=function(e,t,n,i){return this.getInstance().logEventWithGroups(e,t,n,i)},e2.prototype.logRevenueV2=function(e){return this.getInstance().logRevenueV2(e)},e2.prototype.logRevenue=function(e,t,n){return this.getInstance().logRevenue(e,t,n)},e2.prototype.removeEvents=function(e,t){this.getInstance().removeEvents(e,t)},e2.prototype.sendEvents=function(e){this.getInstance().sendEvents(e)},e2.prototype.setGlobalUserProperties=function(e){this.getInstance().setUserProperties(e)},e2.prototype.__VERSION__=eq;var e3=void 0!==Y&&Y.amplitude||{},e4=new e2;for(var e5 in e4._q=e3._q||[],e3._iq)Object.prototype.hasOwnProperty.call(e3._iq,e5)&&(e4.getInstance(e5)._q=e3._iq[e5]._q||[])}}]);