"use strict";(()=>{var fc=Object.create;var mr=Object.defineProperty;var pc=Object.getOwnPropertyDescriptor;var mc=Object.getOwnPropertyNames;var yc=Object.getPrototypeOf,hc=Object.prototype.hasOwnProperty;var d=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var gc=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of mc(t))!hc.call(e,i)&&i!==n&&mr(e,i,{get:()=>t[i],enumerable:!(r=pc(t,i))||r.enumerable});return e};var Z=(e,t,n)=>(n=e!=null?fc(yc(e)):{},gc(t||!e||!e.__esModule?mr(n,"default",{value:e,enumerable:!0}):n,e));var w=d((Jf,yr)=>{var vc=yr.exports=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=vc)});var k=d((Xf,hr)=>{var Ac=hr.exports={version:"2.6.12"};typeof __e=="number"&&(__e=Ac)});var ee=d((Zf,gr)=>{gr.exports=function(e){return typeof e=="object"?e!==null:typeof e=="function"}});var B=d((ep,vr)=>{var Ec=ee();vr.exports=function(e){if(!Ec(e))throw TypeError(e+" is not an object!");return e}});var Ye=d((tp,Ar)=>{Ar.exports=function(e){try{return!!e()}catch{return!0}}});var te=d((np,Er)=>{Er.exports=!Ye()(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})});var ze=d((rp,br)=>{var Tr=ee(),qt=w().document,Tc=Tr(qt)&&Tr(qt.createElement);br.exports=function(e){return Tc?qt.createElement(e):{}}});var _r=d((ip,Ir)=>{Ir.exports=!te()&&!Ye()(function(){return Object.defineProperty(ze()("div"),"a",{get:function(){return 7}}).a!=7})});var Sr=d((sp,xr)=>{var Je=ee();xr.exports=function(e,t){if(!Je(e))return e;var n,r;if(t&&typeof(n=e.toString)=="function"&&!Je(r=n.call(e))||typeof(n=e.valueOf)=="function"&&!Je(r=n.call(e))||!t&&typeof(n=e.toString)=="function"&&!Je(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}});var Ce=d(Lr=>{var Cr=B(),bc=_r(),Ic=Sr(),_c=Object.defineProperty;Lr.f=te()?Object.defineProperty:function(t,n,r){if(Cr(t),n=Ic(n,!0),Cr(r),bc)try{return _c(t,n,r)}catch{}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(t[n]=r.value),t}});var jt=d((ap,wr)=>{wr.exports=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}});var ne=d((cp,Or)=>{var xc=Ce(),Sc=jt();Or.exports=te()?function(e,t,n){return xc.f(e,t,Sc(1,n))}:function(e,t,n){return e[t]=n,e}});var Le=d((lp,Rr)=>{var Cc={}.hasOwnProperty;Rr.exports=function(e,t){return Cc.call(e,t)}});var Xe=d((up,Dr)=>{var Lc=0,wc=Math.random();Dr.exports=function(e){return"Symbol(".concat(e===void 0?"":e,")_",(++Lc+wc).toString(36))}});var Ze=d((dp,Mr)=>{Mr.exports=!1});var et=d((fp,jr)=>{var Oc=k(),Pr=w(),kr="__core-js_shared__",qr=Pr[kr]||(Pr[kr]={});(jr.exports=function(e,t){return qr[e]||(qr[e]=t!==void 0?t:{})})("versions",[]).push({version:Oc.version,mode:Ze()?"pure":"global",copyright:"\xA9 2020 Denis Pushkarev (zloirock.ru)"})});var Nr=d((pp,Hr)=>{Hr.exports=et()("native-function-to-string",Function.toString)});var ue=d((mp,Fr)=>{var Rc=w(),tt=ne(),Ur=Le(),Ht=Xe()("src"),Nt=Nr(),Vr="toString",Dc=(""+Nt).split(Vr);k().inspectSource=function(e){return Nt.call(e)};(Fr.exports=function(e,t,n,r){var i=typeof n=="function";i&&(Ur(n,"name")||tt(n,"name",t)),e[t]!==n&&(i&&(Ur(n,Ht)||tt(n,Ht,e[t]?""+e[t]:Dc.join(String(t)))),e===Rc?e[t]=n:r?e[t]?e[t]=n:tt(e,t,n):(delete e[t],tt(e,t,n)))})(Function.prototype,Vr,function(){return typeof this=="function"&&this[Ht]||Nt.call(this)})});var we=d((yp,Br)=>{Br.exports=function(e){if(typeof e!="function")throw TypeError(e+" is not a function!");return e}});var Oe=d((hp,Wr)=>{var Mc=we();Wr.exports=function(e,t,n){if(Mc(e),t===void 0)return e;switch(n){case 1:return function(r){return e.call(t,r)};case 2:return function(r,i){return e.call(t,r,i)};case 3:return function(r,i,s){return e.call(t,r,i,s)}}return function(){return e.apply(t,arguments)}}});var W=d((gp,Gr)=>{var de=w(),nt=k(),Pc=ne(),kc=ue(),Qr=Oe(),Ut="prototype",L=function(e,t,n){var r=e&L.F,i=e&L.G,s=e&L.S,c=e&L.P,a=e&L.B,u=i?de:s?de[t]||(de[t]={}):(de[t]||{})[Ut],l=i?nt:nt[t]||(nt[t]={}),p=l[Ut]||(l[Ut]={}),f,y,v,D;i&&(n=t);for(f in n)y=!r&&u&&u[f]!==void 0,v=(y?u:n)[f],D=a&&y?Qr(v,de):c&&typeof v=="function"?Qr(Function.call,v):v,u&&kc(u,f,v,e&L.U),l[f]!=v&&Pc(l,f,D),c&&p[f]!=v&&(p[f]=v)};de.core=nt;L.F=1;L.G=2;L.S=4;L.P=8;L.B=16;L.W=32;L.U=64;L.R=128;Gr.exports=L});var fe=d((vp,$r)=>{var qc={}.toString;$r.exports=function(e){return qc.call(e).slice(8,-1)}});var Vt=d((Ap,Kr)=>{var jc=fe();Kr.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return jc(e)=="String"?e.split(""):Object(e)}});var Re=d((Ep,Yr)=>{Yr.exports=function(e){if(e==null)throw TypeError("Can't call method on  "+e);return e}});var rt=d((Tp,zr)=>{var Hc=Vt(),Nc=Re();zr.exports=function(e){return Hc(Nc(e))}});var it=d((bp,Jr)=>{var Uc=Math.ceil,Vc=Math.floor;Jr.exports=function(e){return isNaN(e=+e)?0:(e>0?Vc:Uc)(e)}});var Ft=d((Ip,Xr)=>{var Fc=it(),Bc=Math.min;Xr.exports=function(e){return e>0?Bc(Fc(e),9007199254740991):0}});var ei=d((_p,Zr)=>{var Wc=it(),Qc=Math.max,Gc=Math.min;Zr.exports=function(e,t){return e=Wc(e),e<0?Qc(e+t,0):Gc(e,t)}});var Bt=d((xp,ti)=>{var $c=rt(),Kc=Ft(),Yc=ei();ti.exports=function(e){return function(t,n,r){var i=$c(t),s=Kc(i.length),c=Yc(r,s),a;if(e&&n!=n){for(;s>c;)if(a=i[c++],a!=a)return!0}else for(;s>c;c++)if((e||c in i)&&i[c]===n)return e||c||0;return!e&&-1}}});var C=d((Sp,ri)=>{var Wt=et()("wks"),zc=Xe(),Qt=w().Symbol,ni=typeof Qt=="function",Jc=ri.exports=function(e){return Wt[e]||(Wt[e]=ni&&Qt[e]||(ni?Qt:zc)("Symbol."+e))};Jc.store=Wt});var Kt=d((Cp,ii)=>{var Gt=C()("unscopables"),$t=Array.prototype;$t[Gt]==null&&ne()($t,Gt,{});ii.exports=function(e){$t[Gt][e]=!0}});var oi=d(()=>{"use strict";var si=W(),Xc=Bt()(!0);si(si.P,"Array",{includes:function(t){return Xc(this,t,arguments.length>1?arguments[1]:void 0)}});Kt()("includes")});var ci=d((Op,ai)=>{oi();ai.exports=k().Array.includes});var st=d((Rp,ui)=>{var li=et()("keys"),Zc=Xe();ui.exports=function(e){return li[e]||(li[e]=Zc(e))}});var pi=d((Dp,fi)=>{var di=Le(),el=rt(),tl=Bt()(!1),nl=st()("IE_PROTO");fi.exports=function(e,t){var n=el(e),r=0,i=[],s;for(s in n)s!=nl&&di(n,s)&&i.push(s);for(;t.length>r;)di(n,s=t[r++])&&(~tl(i,s)||i.push(s));return i}});var Yt=d((Mp,mi)=>{mi.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")});var ot=d((Pp,yi)=>{var rl=pi(),il=Yt();yi.exports=Object.keys||function(t){return rl(t,il)}});var gi=d(hi=>{hi.f=Object.getOwnPropertySymbols});var Ai=d(vi=>{vi.f={}.propertyIsEnumerable});var zt=d((jp,Ei)=>{var sl=Re();Ei.exports=function(e){return Object(sl(e))}});var Ii=d((Hp,bi)=>{"use strict";var ol=te(),Ti=ot(),al=gi(),cl=Ai(),ll=zt(),ul=Vt(),at=Object.assign;bi.exports=!at||Ye()(function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(i){t[i]=i}),at({},e)[n]!=7||Object.keys(at({},t)).join("")!=r})?function(t,n){for(var r=ll(t),i=arguments.length,s=1,c=al.f,a=cl.f;i>s;)for(var u=ul(arguments[s++]),l=c?Ti(u).concat(c(u)):Ti(u),p=l.length,f=0,y;p>f;)y=l[f++],(!ol||a.call(u,y))&&(r[y]=u[y]);return r}:at});var _i=d(()=>{var Jt=W();Jt(Jt.S+Jt.F,"Object",{assign:Ii()})});var Si=d((Vp,xi)=>{_i();xi.exports=k().Object.assign});var ct=d((Fp,Ci)=>{var Xt=fe(),dl=C()("toStringTag"),fl=Xt(function(){return arguments}())=="Arguments",pl=function(e,t){try{return e[t]}catch{}};Ci.exports=function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=pl(t=Object(e),dl))=="string"?n:fl?Xt(t):(r=Xt(t))=="Object"&&typeof t.callee=="function"?"Arguments":r}});var wi=d(()=>{"use strict";var ml=ct(),Li={};Li[C()("toStringTag")]="z";Li+""!="[object z]"&&ue()(Object.prototype,"toString",function(){return"[object "+ml(this)+"]"},!0)});var Ri=d((Qp,Oi)=>{var yl=it(),hl=Re();Oi.exports=function(e){return function(t,n){var r=String(hl(t)),i=yl(n),s=r.length,c,a;return i<0||i>=s?e?"":void 0:(c=r.charCodeAt(i),c<55296||c>56319||i+1===s||(a=r.charCodeAt(i+1))<56320||a>57343?e?r.charAt(i):c:e?r.slice(i,i+2):(c-55296<<10)+(a-56320)+65536)}}});var pe=d((Gp,Di)=>{Di.exports={}});var Pi=d(($p,Mi)=>{var gl=Ce(),vl=B(),Al=ot();Mi.exports=te()?Object.defineProperties:function(t,n){vl(t);for(var r=Al(n),i=r.length,s=0,c;i>s;)gl.f(t,c=r[s++],n[c]);return t}});var Zt=d((Kp,qi)=>{var ki=w().document;qi.exports=ki&&ki.documentElement});var Ni=d((Yp,Hi)=>{var El=B(),Tl=Pi(),ji=Yt(),bl=st()("IE_PROTO"),en=function(){},tn="prototype",lt=function(){var e=ze()("iframe"),t=ji.length,n="<",r=">",i;for(e.style.display="none",Zt().appendChild(e),e.src="javascript:",i=e.contentWindow.document,i.open(),i.write(n+"script"+r+"document.F=Object"+n+"/script"+r),i.close(),lt=i.F;t--;)delete lt[tn][ji[t]];return lt()};Hi.exports=Object.create||function(t,n){var r;return t!==null?(en[tn]=El(t),r=new en,en[tn]=null,r[bl]=t):r=lt(),n===void 0?r:Tl(r,n)}});var ut=d((zp,Vi)=>{var Il=Ce().f,_l=Le(),Ui=C()("toStringTag");Vi.exports=function(e,t,n){e&&!_l(e=n?e:e.prototype,Ui)&&Il(e,Ui,{configurable:!0,value:t})}});var Wi=d((Jp,Bi)=>{"use strict";var xl=Ni(),Sl=jt(),Cl=ut(),Fi={};ne()(Fi,C()("iterator"),function(){return this});Bi.exports=function(e,t,n){e.prototype=xl(Fi,{next:Sl(1,n)}),Cl(e,t+" Iterator")}});var $i=d((Xp,Gi)=>{var Ll=Le(),wl=zt(),Qi=st()("IE_PROTO"),Ol=Object.prototype;Gi.exports=Object.getPrototypeOf||function(e){return e=wl(e),Ll(e,Qi)?e[Qi]:typeof e.constructor=="function"&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?Ol:null}});var sn=d((Zp,Zi)=>{"use strict";var Ki=Ze(),nn=W(),Rl=ue(),Yi=ne(),zi=pe(),Dl=Wi(),Ml=ut(),Pl=$i(),De=C()("iterator"),rn=!([].keys&&"next"in[].keys()),kl="@@iterator",Ji="keys",dt="values",Xi=function(){return this};Zi.exports=function(e,t,n,r,i,s,c){Dl(n,t,r);var a=function(T){if(!rn&&T in f)return f[T];switch(T){case Ji:return function(){return new n(this,T)};case dt:return function(){return new n(this,T)}}return function(){return new n(this,T)}},u=t+" Iterator",l=i==dt,p=!1,f=e.prototype,y=f[De]||f[kl]||i&&f[i],v=y||a(i),D=i?l?a("entries"):v:void 0,X=t=="Array"&&f.entries||y,h,m,b;if(X&&(b=Pl(X.call(new e)),b!==Object.prototype&&b.next&&(Ml(b,u,!0),!Ki&&typeof b[De]!="function"&&Yi(b,De,Xi))),l&&y&&y.name!==dt&&(p=!0,v=function(){return y.call(this)}),(!Ki||c)&&(rn||p||!f[De])&&Yi(f,De,v),zi[t]=v,zi[u]=Xi,i)if(h={values:l?v:a(dt),keys:s?v:a(Ji),entries:D},c)for(m in h)m in f||Rl(f,m,h[m]);else nn(nn.P+nn.F*(rn||p),t,h);return h}});var es=d(()=>{"use strict";var ql=Ri()(!0);sn()(String,"String",function(e){this._t=String(e),this._i=0},function(){var e=this._t,t=this._i,n;return t>=e.length?{value:void 0,done:!0}:(n=ql(e,t),this._i+=n.length,{value:n,done:!1})})});var ns=d((nm,ts)=>{ts.exports=function(e,t){return{value:t,done:!!e}}});var ss=d((rm,is)=>{"use strict";var on=Kt(),ft=ns(),rs=pe(),jl=rt();is.exports=sn()(Array,"Array",function(e,t){this._t=jl(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,ft(1)):t=="keys"?ft(0,n):t=="values"?ft(0,e[n]):ft(0,[n,e[n]])},"values");rs.Arguments=rs.Array;on("keys");on("values");on("entries")});var ys=d(()=>{var os=ss(),Hl=ot(),Nl=ue(),Ul=w(),as=ne(),ps=pe(),ms=C(),cs=ms("iterator"),ls=ms("toStringTag"),us=ps.Array,ds={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1};for(an=Hl(ds),pt=0;pt<an.length;pt++)if(Me=an[pt],fs=ds[Me],cn=Ul[Me],Q=cn&&cn.prototype,Q&&(Q[cs]||as(Q,cs,us),Q[ls]||as(Q,ls,Me),ps[Me]=us,fs))for(Pe in os)Q[Pe]||Nl(Q,Pe,os[Pe],!0);var Me,fs,cn,Q,Pe,an,pt});var gs=d((om,hs)=>{hs.exports=function(e,t,n,r){if(!(e instanceof t)||r!==void 0&&r in e)throw TypeError(n+": incorrect invocation!");return e}});var Es=d((am,As)=>{var vs=B();As.exports=function(e,t,n,r){try{return r?t(vs(n)[0],n[1]):t(n)}catch(s){var i=e.return;throw i!==void 0&&vs(i.call(e)),s}}});var bs=d((cm,Ts)=>{var Vl=pe(),Fl=C()("iterator"),Bl=Array.prototype;Ts.exports=function(e){return e!==void 0&&(Vl.Array===e||Bl[Fl]===e)}});var _s=d((lm,Is)=>{var Wl=ct(),Ql=C()("iterator"),Gl=pe();Is.exports=k().getIteratorMethod=function(e){if(e!=null)return e[Ql]||e["@@iterator"]||Gl[Wl(e)]}});var Ss=d((mt,xs)=>{var $l=Oe(),Kl=Es(),Yl=bs(),zl=B(),Jl=Ft(),Xl=_s(),ln={},un={},mt=xs.exports=function(e,t,n,r,i){var s=i?function(){return e}:Xl(e),c=$l(n,r,t?2:1),a=0,u,l,p,f;if(typeof s!="function")throw TypeError(e+" is not iterable!");if(Yl(s)){for(u=Jl(e.length);u>a;a++)if(f=t?c(zl(l=e[a])[0],l[1]):c(e[a]),f===ln||f===un)return f}else for(p=s.call(e);!(l=p.next()).done;)if(f=Kl(p,c,l.value,t),f===ln||f===un)return f};mt.BREAK=ln;mt.RETURN=un});var dn=d((um,Ls)=>{var Cs=B(),Zl=we(),eu=C()("species");Ls.exports=function(e,t){var n=Cs(e).constructor,r;return n===void 0||(r=Cs(n)[eu])==null?t:Zl(r)}});var Os=d((dm,ws)=>{ws.exports=function(e,t,n){var r=n===void 0;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}});var vn=d((fm,js)=>{var yt=Oe(),tu=Os(),Rs=Zt(),Ds=ze(),V=w(),Ms=V.process,hn=V.setImmediate,gn=V.clearImmediate,Ps=V.MessageChannel,fn=V.Dispatch,pn=0,qe={},ks="onreadystatechange",re,mn,yn,ke=function(){var e=+this;if(qe.hasOwnProperty(e)){var t=qe[e];delete qe[e],t()}},qs=function(e){ke.call(e.data)};(!hn||!gn)&&(hn=function(t){for(var n=[],r=1;arguments.length>r;)n.push(arguments[r++]);return qe[++pn]=function(){tu(typeof t=="function"?t:Function(t),n)},re(pn),pn},gn=function(t){delete qe[t]},fe()(Ms)=="process"?re=function(e){Ms.nextTick(yt(ke,e,1))}:fn&&fn.now?re=function(e){fn.now(yt(ke,e,1))}:Ps?(mn=new Ps,yn=mn.port2,mn.port1.onmessage=qs,re=yt(yn.postMessage,yn,1)):V.addEventListener&&typeof postMessage=="function"&&!V.importScripts?(re=function(e){V.postMessage(e+"","*")},V.addEventListener("message",qs,!1)):ks in Ds("script")?re=function(e){Rs.appendChild(Ds("script"))[ks]=function(){Rs.removeChild(this),ke.call(e)}}:re=function(e){setTimeout(yt(ke,e,1),0)});js.exports={set:hn,clear:gn}});var Vs=d((pm,Us)=>{var ie=w(),nu=vn().set,Hs=ie.MutationObserver||ie.WebKitMutationObserver,En=ie.process,An=ie.Promise,Ns=fe()(En)=="process";Us.exports=function(){var e,t,n,r=function(){var a,u;for(Ns&&(a=En.domain)&&a.exit();e;){u=e.fn,e=e.next;try{u()}catch(l){throw e?n():t=void 0,l}}t=void 0,a&&a.enter()};if(Ns)n=function(){En.nextTick(r)};else if(Hs&&!(ie.navigator&&ie.navigator.standalone)){var i=!0,s=document.createTextNode("");new Hs(r).observe(s,{characterData:!0}),n=function(){s.data=i=!i}}else if(An&&An.resolve){var c=An.resolve(void 0);n=function(){c.then(r)}}else n=function(){nu.call(ie,r)};return function(a){var u={fn:a,next:void 0};t&&(t.next=u),e||(e=u,n()),t=u}}});var ht=d((mm,Bs)=>{"use strict";var Fs=we();function ru(e){var t,n;this.promise=new e(function(r,i){if(t!==void 0||n!==void 0)throw TypeError("Bad Promise constructor");t=r,n=i}),this.resolve=Fs(t),this.reject=Fs(n)}Bs.exports.f=function(e){return new ru(e)}});var Tn=d((ym,Ws)=>{Ws.exports=function(e){try{return{e:!1,v:e()}}catch(t){return{e:!0,v:t}}}});var $s=d((hm,Gs)=>{var iu=w(),Qs=iu.navigator;Gs.exports=Qs&&Qs.userAgent||""});var bn=d((gm,Ks)=>{var su=B(),ou=ee(),au=ht();Ks.exports=function(e,t){if(su(e),ou(t)&&t.constructor===e)return t;var n=au.f(e),r=n.resolve;return r(t),n.promise}});var zs=d((vm,Ys)=>{var cu=ue();Ys.exports=function(e,t,n){for(var r in t)cu(e,r,t[r],n);return e}});var Zs=d((Am,Xs)=>{"use strict";var lu=w(),uu=Ce(),du=te(),Js=C()("species");Xs.exports=function(e){var t=lu[e];du&&t&&!t[Js]&&uu.f(t,Js,{configurable:!0,get:function(){return this}})}});var no=d((Em,to)=>{var _n=C()("iterator"),eo=!1;try{In=[7][_n](),In.return=function(){eo=!0},Array.from(In,function(){throw 2})}catch{}var In;to.exports=function(e,t){if(!t&&!eo)return!1;var n=!1;try{var r=[7],i=r[_n]();i.next=function(){return{done:n=!0}},r[_n]=function(){return i},e(r)}catch{}return n}});var yo=d(()=>{"use strict";var ro=Ze(),G=w(),me=Oe(),fu=ct(),M=W(),pu=ee(),mu=we(),yu=gs(),io=Ss(),hu=dn(),co=vn().set,lo=Vs()(),uo=ht(),xn=Tn(),gu=$s(),vu=bn(),$="Promise",fo=G.TypeError,he=G.process,so=he&&he.versions,Au=so&&so.v8||"",j=G[$],je=fu(he)=="process",vt=function(){},gt,po,oo,Cn,He=po=uo.f,Ne=!!function(){try{var e=j.resolve(1),t=(e.constructor={})[C()("species")]=function(n){n(vt,vt)};return(je||typeof PromiseRejectionEvent=="function")&&e.then(vt)instanceof t&&Au.indexOf("6.6")!==0&&gu.indexOf("Chrome/66")===-1}catch{}}(),mo=function(e){var t;return pu(e)&&typeof(t=e.then)=="function"?t:!1},Ln=function(e,t){if(!e._n){e._n=!0;var n=e._c;lo(function(){for(var r=e._v,i=e._s==1,s=0,c=function(a){var u=i?a.ok:a.fail,l=a.resolve,p=a.reject,f=a.domain,y,v,D;try{u?(i||(e._h==2&&Tu(e),e._h=1),u===!0?y=r:(f&&f.enter(),y=u(r),f&&(f.exit(),D=!0)),y===a.promise?p(fo("Promise-chain cycle")):(v=mo(y))?v.call(y,l,p):l(y)):p(r)}catch(X){f&&!D&&f.exit(),p(X)}};n.length>s;)c(n[s++]);e._c=[],e._n=!1,t&&!e._h&&Eu(e)})}},Eu=function(e){co.call(G,function(){var t=e._v,n=ao(e),r,i,s;if(n&&(r=xn(function(){je?he.emit("unhandledRejection",t,e):(i=G.onunhandledrejection)?i({promise:e,reason:t}):(s=G.console)&&s.error&&s.error("Unhandled promise rejection",t)}),e._h=je||ao(e)?2:1),e._a=void 0,n&&r.e)throw r.v})},ao=function(e){return e._h!==1&&(e._a||e._c).length===0},Tu=function(e){co.call(G,function(){var t;je?he.emit("rejectionHandled",e):(t=G.onrejectionhandled)&&t({promise:e,reason:e._v})})},ye=function(e){var t=this;t._d||(t._d=!0,t=t._w||t,t._v=e,t._s=2,t._a||(t._a=t._c.slice()),Ln(t,!0))},Sn=function(e){var t=this,n;if(!t._d){t._d=!0,t=t._w||t;try{if(t===e)throw fo("Promise can't be resolved itself");(n=mo(e))?lo(function(){var r={_w:t,_d:!1};try{n.call(e,me(Sn,r,1),me(ye,r,1))}catch(i){ye.call(r,i)}}):(t._v=e,t._s=1,Ln(t,!1))}catch(r){ye.call({_w:t,_d:!1},r)}}};Ne||(j=function(t){yu(this,j,$,"_h"),mu(t),gt.call(this);try{t(me(Sn,this,1),me(ye,this,1))}catch(n){ye.call(this,n)}},gt=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},gt.prototype=zs()(j.prototype,{then:function(t,n){var r=He(hu(this,j));return r.ok=typeof t=="function"?t:!0,r.fail=typeof n=="function"&&n,r.domain=je?he.domain:void 0,this._c.push(r),this._a&&this._a.push(r),this._s&&Ln(this,!1),r.promise},catch:function(e){return this.then(void 0,e)}}),oo=function(){var e=new gt;this.promise=e,this.resolve=me(Sn,e,1),this.reject=me(ye,e,1)},uo.f=He=function(e){return e===j||e===Cn?new oo(e):po(e)});M(M.G+M.W+M.F*!Ne,{Promise:j});ut()(j,$);Zs()($);Cn=k()[$];M(M.S+M.F*!Ne,$,{reject:function(t){var n=He(this),r=n.reject;return r(t),n.promise}});M(M.S+M.F*(ro||!Ne),$,{resolve:function(t){return vu(ro&&this===Cn?j:this,t)}});M(M.S+M.F*!(Ne&&no()(function(e){j.all(e).catch(vt)})),$,{all:function(t){var n=this,r=He(n),i=r.resolve,s=r.reject,c=xn(function(){var a=[],u=0,l=1;io(t,!1,function(p){var f=u++,y=!1;a.push(void 0),l++,n.resolve(p).then(function(v){y||(y=!0,a[f]=v,--l||i(a))},s)}),--l||i(a)});return c.e&&s(c.v),r.promise},race:function(t){var n=this,r=He(n),i=r.reject,s=xn(function(){io(t,!1,function(c){n.resolve(c).then(r.resolve,i)})});return s.e&&i(s.v),r.promise}})});var go=d(()=>{"use strict";var wn=W(),bu=k(),Iu=w(),_u=dn(),ho=bn();wn(wn.P+wn.R,"Promise",{finally:function(e){var t=_u(this,bu.Promise||Iu.Promise),n=typeof e=="function";return this.then(n?function(r){return ho(t,e()).then(function(){return r})}:e,n?function(r){return ho(t,e()).then(function(){throw r})}:e)}})});var Ao=d(()=>{"use strict";var vo=W(),xu=ht(),Su=Tn();vo(vo.S,"Promise",{try:function(e){var t=xu.f(this),n=Su(e);return(n.e?t.reject:t.resolve)(n.v),t.promise}})});var To=d((Cm,Eo)=>{wi();es();ys();yo();go();Ao();Eo.exports=k().Promise});var Io=d((Lm,bo)=>{var Cu=ee(),Lu=fe(),wu=C()("match");bo.exports=function(e){var t;return Cu(e)&&((t=e[wu])!==void 0?!!t:Lu(e)=="RegExp")}});var xo=d((wm,_o)=>{var Ou=Io(),Ru=Re();_o.exports=function(e,t,n){if(Ou(t))throw TypeError("String#"+n+" doesn't accept regex!");return String(Ru(e))}});var Co=d((Om,So)=>{var Du=C()("match");So.exports=function(e){var t=/./;try{"/./"[e](t)}catch{try{return t[Du]=!1,!"/./"[e](t)}catch{}}return!0}});var wo=d(()=>{"use strict";var On=W(),Mu=xo(),Lo="includes";On(On.P+On.F*Co()(Lo),"String",{includes:function(t){return!!~Mu(this,t,Lo).indexOf(t,arguments.length>1?arguments[1]:void 0)}})});var Ro=d((Mm,Oo)=>{wo();Oo.exports=k().String.includes});var _t=d((Qm,$o)=>{$o.exports=Go;function Go(e,t){if(!e)throw new Error(t||"Assertion failed")}Go.equal=function(t,n,r){if(t!=n)throw new Error(r||"Assertion failed: "+t+" != "+n)}});var Ko=d((Gm,qn)=>{typeof Object.create=="function"?qn.exports=function(t,n){n&&(t.super_=n,t.prototype=Object.create(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:qn.exports=function(t,n){if(n){t.super_=n;var r=function(){};r.prototype=n.prototype,t.prototype=new r,t.prototype.constructor=t}}});var xt=d(A=>{"use strict";var ju=_t(),Hu=Ko();A.inherits=Hu;function Nu(e,t){return(e.charCodeAt(t)&64512)!==55296||t<0||t+1>=e.length?!1:(e.charCodeAt(t+1)&64512)===56320}function Uu(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if(typeof e=="string")if(t){if(t==="hex")for(e=e.replace(/[^a-z0-9]+/ig,""),e.length%2!==0&&(e="0"+e),i=0;i<e.length;i+=2)n.push(parseInt(e[i]+e[i+1],16))}else for(var r=0,i=0;i<e.length;i++){var s=e.charCodeAt(i);s<128?n[r++]=s:s<2048?(n[r++]=s>>6|192,n[r++]=s&63|128):Nu(e,i)?(s=65536+((s&1023)<<10)+(e.charCodeAt(++i)&1023),n[r++]=s>>18|240,n[r++]=s>>12&63|128,n[r++]=s>>6&63|128,n[r++]=s&63|128):(n[r++]=s>>12|224,n[r++]=s>>6&63|128,n[r++]=s&63|128)}else for(i=0;i<e.length;i++)n[i]=e[i]|0;return n}A.toArray=Uu;function Vu(e){for(var t="",n=0;n<e.length;n++)t+=zo(e[n].toString(16));return t}A.toHex=Vu;function Yo(e){var t=e>>>24|e>>>8&65280|e<<8&16711680|(e&255)<<24;return t>>>0}A.htonl=Yo;function Fu(e,t){for(var n="",r=0;r<e.length;r++){var i=e[r];t==="little"&&(i=Yo(i)),n+=Jo(i.toString(16))}return n}A.toHex32=Fu;function zo(e){return e.length===1?"0"+e:e}A.zero2=zo;function Jo(e){return e.length===7?"0"+e:e.length===6?"00"+e:e.length===5?"000"+e:e.length===4?"0000"+e:e.length===3?"00000"+e:e.length===2?"000000"+e:e.length===1?"0000000"+e:e}A.zero8=Jo;function Bu(e,t,n,r){var i=n-t;ju(i%4===0);for(var s=new Array(i/4),c=0,a=t;c<s.length;c++,a+=4){var u;r==="big"?u=e[a]<<24|e[a+1]<<16|e[a+2]<<8|e[a+3]:u=e[a+3]<<24|e[a+2]<<16|e[a+1]<<8|e[a],s[c]=u>>>0}return s}A.join32=Bu;function Wu(e,t){for(var n=new Array(e.length*4),r=0,i=0;r<e.length;r++,i+=4){var s=e[r];t==="big"?(n[i]=s>>>24,n[i+1]=s>>>16&255,n[i+2]=s>>>8&255,n[i+3]=s&255):(n[i+3]=s>>>24,n[i+2]=s>>>16&255,n[i+1]=s>>>8&255,n[i]=s&255)}return n}A.split32=Wu;function Qu(e,t){return e>>>t|e<<32-t}A.rotr32=Qu;function Gu(e,t){return e<<t|e>>>32-t}A.rotl32=Gu;function $u(e,t){return e+t>>>0}A.sum32=$u;function Ku(e,t,n){return e+t+n>>>0}A.sum32_3=Ku;function Yu(e,t,n,r){return e+t+n+r>>>0}A.sum32_4=Yu;function zu(e,t,n,r,i){return e+t+n+r+i>>>0}A.sum32_5=zu;function Ju(e,t,n,r){var i=e[t],s=e[t+1],c=r+s>>>0,a=(c<r?1:0)+n+i;e[t]=a>>>0,e[t+1]=c}A.sum64=Ju;function Xu(e,t,n,r){var i=t+r>>>0,s=(i<t?1:0)+e+n;return s>>>0}A.sum64_hi=Xu;function Zu(e,t,n,r){var i=t+r;return i>>>0}A.sum64_lo=Zu;function ed(e,t,n,r,i,s,c,a){var u=0,l=t;l=l+r>>>0,u+=l<t?1:0,l=l+s>>>0,u+=l<s?1:0,l=l+a>>>0,u+=l<a?1:0;var p=e+n+i+c+u;return p>>>0}A.sum64_4_hi=ed;function td(e,t,n,r,i,s,c,a){var u=t+r+s+a;return u>>>0}A.sum64_4_lo=td;function nd(e,t,n,r,i,s,c,a,u,l){var p=0,f=t;f=f+r>>>0,p+=f<t?1:0,f=f+s>>>0,p+=f<s?1:0,f=f+a>>>0,p+=f<a?1:0,f=f+l>>>0,p+=f<l?1:0;var y=e+n+i+c+u+p;return y>>>0}A.sum64_5_hi=nd;function rd(e,t,n,r,i,s,c,a,u,l){var p=t+r+s+a+l;return p>>>0}A.sum64_5_lo=rd;function id(e,t,n){var r=t<<32-n|e>>>n;return r>>>0}A.rotr64_hi=id;function sd(e,t,n){var r=e<<32-n|t>>>n;return r>>>0}A.rotr64_lo=sd;function od(e,t,n){return e>>>n}A.shr64_hi=od;function ad(e,t,n){var r=e<<32-n|t>>>n;return r>>>0}A.shr64_lo=ad});var ea=d(Zo=>{"use strict";var Xo=xt(),cd=_t();function St(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}Zo.BlockHash=St;St.prototype.update=function(t,n){if(t=Xo.toArray(t,n),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){t=this.pending;var r=t.length%this._delta8;this.pending=t.slice(t.length-r,t.length),this.pending.length===0&&(this.pending=null),t=Xo.join32(t,0,t.length-r,this.endian);for(var i=0;i<t.length;i+=this._delta32)this._update(t,i,i+this._delta32)}return this};St.prototype.digest=function(t){return this.update(this._pad()),cd(this.pending===null),this._digest(t)};St.prototype._pad=function(){var t=this.pendingTotal,n=this._delta8,r=n-(t+this.padLength)%n,i=new Array(r+this.padLength);i[0]=128;for(var s=1;s<r;s++)i[s]=0;if(t<<=3,this.endian==="big"){for(var c=8;c<this.padLength;c++)i[s++]=0;i[s++]=0,i[s++]=0,i[s++]=0,i[s++]=0,i[s++]=t>>>24&255,i[s++]=t>>>16&255,i[s++]=t>>>8&255,i[s++]=t&255}else for(i[s++]=t&255,i[s++]=t>>>8&255,i[s++]=t>>>16&255,i[s++]=t>>>24&255,i[s++]=0,i[s++]=0,i[s++]=0,i[s++]=0,c=8;c<this.padLength;c++)i[s++]=0;return i}});var ia=d(F=>{"use strict";var ld=xt(),H=ld.rotr32;function ud(e,t,n,r){if(e===0)return ta(t,n,r);if(e===1||e===3)return ra(t,n,r);if(e===2)return na(t,n,r)}F.ft_1=ud;function ta(e,t,n){return e&t^~e&n}F.ch32=ta;function na(e,t,n){return e&t^e&n^t&n}F.maj32=na;function ra(e,t,n){return e^t^n}F.p32=ra;function dd(e){return H(e,2)^H(e,13)^H(e,22)}F.s0_256=dd;function fd(e){return H(e,6)^H(e,11)^H(e,25)}F.s1_256=fd;function pd(e){return H(e,7)^H(e,18)^e>>>3}F.g0_256=pd;function md(e){return H(e,17)^H(e,19)^e>>>10}F.g1_256=md});var aa=d((zm,oa)=>{"use strict";var ge=xt(),yd=ea(),ve=ia(),hd=_t(),q=ge.sum32,gd=ge.sum32_4,vd=ge.sum32_5,Ad=ve.ch32,Ed=ve.maj32,Td=ve.s0_256,bd=ve.s1_256,Id=ve.g0_256,_d=ve.g1_256,sa=yd.BlockHash,xd=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function N(){if(!(this instanceof N))return new N;sa.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=xd,this.W=new Array(64)}ge.inherits(N,sa);oa.exports=N;N.blockSize=512;N.outSize=256;N.hmacStrength=192;N.padLength=64;N.prototype._update=function(t,n){for(var r=this.W,i=0;i<16;i++)r[i]=t[n+i];for(;i<r.length;i++)r[i]=gd(_d(r[i-2]),r[i-7],Id(r[i-15]),r[i-16]);var s=this.h[0],c=this.h[1],a=this.h[2],u=this.h[3],l=this.h[4],p=this.h[5],f=this.h[6],y=this.h[7];for(hd(this.k.length===r.length),i=0;i<r.length;i++){var v=vd(y,bd(l),Ad(l,p,f),this.k[i],r[i]),D=q(Td(s),Ed(s,c,a));y=f,f=p,p=l,l=q(u,v),u=a,a=c,c=s,s=q(v,D)}this.h[0]=q(this.h[0],s),this.h[1]=q(this.h[1],c),this.h[2]=q(this.h[2],a),this.h[3]=q(this.h[3],u),this.h[4]=q(this.h[4],l),this.h[5]=q(this.h[5],p),this.h[6]=q(this.h[6],f),this.h[7]=q(this.h[7],y)};N.prototype._digest=function(t){return t==="hex"?ge.toHex32(this.h,"big"):ge.split32(this.h,"big")}});var ca=d(Nn=>{"use strict";Object.defineProperty(Nn,"__esModule",{value:!0});var Cd=function(){function e(){var t=this;this.locked=new Map,this.addToLocked=function(n,r){var i=t.locked.get(n);i===void 0?r===void 0?t.locked.set(n,[]):t.locked.set(n,[r]):r!==void 0&&(i.unshift(r),t.locked.set(n,i))},this.isLocked=function(n){return t.locked.has(n)},this.lock=function(n){return new Promise(function(r,i){t.isLocked(n)?t.addToLocked(n,r):(t.addToLocked(n),r())})},this.unlock=function(n){var r=t.locked.get(n);if(r===void 0||r.length===0){t.locked.delete(n);return}var i=r.pop();t.locked.set(n,r),i!==void 0&&setTimeout(i,0)}}return e.getInstance=function(){return e.instance===void 0&&(e.instance=new e),e.instance},e}();function Ld(){return Cd.getInstance()}Nn.default=Ld});var Bn=d(oe=>{"use strict";var Ae=oe&&oe.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,s){function c(l){try{u(r.next(l))}catch(p){s(p)}}function a(l){try{u(r.throw(l))}catch(p){s(p)}}function u(l){l.done?i(l.value):new n(function(p){p(l.value)}).then(c,a)}u((r=r.apply(e,t||[])).next())})},Ee=oe&&oe.__generator||function(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,i,s,c;return c={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function a(l){return function(p){return u([l,p])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(s=l[0]&2?i.return:l[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,l[1])).done)return s;switch(i=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){n.label=l[1];break}if(l[0]===6&&n.label<s[1]){n.label=s[1],s=l;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(l);break}s[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(p){l=[6,p],i=0}finally{r=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}};Object.defineProperty(oe,"__esModule",{value:!0});var Te=ca(),Un="browser-tabs-lock-key";function Vn(e){return new Promise(function(t){return setTimeout(t,e)})}function Fn(e){for(var t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz",n="",r=0;r<e;r++){var i=Math.floor(Math.random()*t.length);n+=t[i]}return n}function wd(){return Date.now().toString()+Fn(15)}var Od=function(){function e(){this.acquiredIatSet=new Set,this.id=wd(),this.acquireLock=this.acquireLock.bind(this),this.releaseLock=this.releaseLock.bind(this),this.releaseLock__private__=this.releaseLock__private__.bind(this),this.waitForSomethingToChange=this.waitForSomethingToChange.bind(this),this.refreshLockWhileAcquired=this.refreshLockWhileAcquired.bind(this),e.waiters===void 0&&(e.waiters=[])}return e.prototype.acquireLock=function(t,n){return n===void 0&&(n=5e3),Ae(this,void 0,void 0,function(){var r,i,s,c,a,u,l;return Ee(this,function(p){switch(p.label){case 0:r=Date.now()+Fn(4),i=Date.now()+n,s=Un+"-"+t,c=window.localStorage,p.label=1;case 1:return Date.now()<i?[4,Vn(30)]:[3,8];case 2:return p.sent(),a=c.getItem(s),a!==null?[3,5]:(u=this.id+"-"+t+"-"+r,[4,Vn(Math.floor(Math.random()*25))]);case 3:return p.sent(),c.setItem(s,JSON.stringify({id:this.id,iat:r,timeoutKey:u,timeAcquired:Date.now(),timeRefreshed:Date.now()})),[4,Vn(30)];case 4:return p.sent(),l=c.getItem(s),l!==null&&(l=JSON.parse(l),l.id===this.id&&l.iat===r)?(this.acquiredIatSet.add(r),this.refreshLockWhileAcquired(s,r),[2,!0]):[3,7];case 5:return e.lockCorrector(),[4,this.waitForSomethingToChange(i)];case 6:p.sent(),p.label=7;case 7:return r=Date.now()+Fn(4),[3,1];case 8:return[2,!1]}})})},e.prototype.refreshLockWhileAcquired=function(t,n){return Ae(this,void 0,void 0,function(){var r=this;return Ee(this,function(i){return setTimeout(function(){return Ae(r,void 0,void 0,function(){var s,c;return Ee(this,function(a){switch(a.label){case 0:return[4,Te.default().lock(n)];case 1:if(a.sent(),!this.acquiredIatSet.has(n))return Te.default().unlock(n),[2];if(s=window.localStorage,c=s.getItem(t),c!==null)c=JSON.parse(c),c.timeRefreshed=Date.now(),s.setItem(t,JSON.stringify(c)),Te.default().unlock(n);else return Te.default().unlock(n),[2];return this.refreshLockWhileAcquired(t,n),[2]}})})},1e3),[2]})})},e.prototype.waitForSomethingToChange=function(t){return Ae(this,void 0,void 0,function(){return Ee(this,function(n){switch(n.label){case 0:return[4,new Promise(function(r){var i=!1,s=Date.now(),c=50,a=!1;function u(){if(a||(window.removeEventListener("storage",u),e.removeFromWaiting(u),clearTimeout(l),a=!0),!i){i=!0;var p=c-(Date.now()-s);p>0?setTimeout(r,p):r()}}window.addEventListener("storage",u),e.addToWaiting(u);var l=setTimeout(u,Math.max(0,t-Date.now()))})];case 1:return n.sent(),[2]}})})},e.addToWaiting=function(t){this.removeFromWaiting(t),e.waiters!==void 0&&e.waiters.push(t)},e.removeFromWaiting=function(t){e.waiters!==void 0&&(e.waiters=e.waiters.filter(function(n){return n!==t}))},e.notifyWaiters=function(){if(e.waiters!==void 0){var t=e.waiters.slice();t.forEach(function(n){return n()})}},e.prototype.releaseLock=function(t){return Ae(this,void 0,void 0,function(){return Ee(this,function(n){switch(n.label){case 0:return[4,this.releaseLock__private__(t)];case 1:return[2,n.sent()]}})})},e.prototype.releaseLock__private__=function(t){return Ae(this,void 0,void 0,function(){var n,r,i;return Ee(this,function(s){switch(s.label){case 0:return n=window.localStorage,r=Un+"-"+t,i=n.getItem(r),i===null?[2]:(i=JSON.parse(i),i.id!==this.id?[3,2]:[4,Te.default().lock(i.iat)]);case 1:s.sent(),this.acquiredIatSet.delete(i.iat),n.removeItem(r),Te.default().unlock(i.iat),e.notifyWaiters(),s.label=2;case 2:return[2]}})})},e.lockCorrector=function(){for(var t=Date.now()-5e3,n=window.localStorage,r=Object.keys(n),i=!1,s=0;s<r.length;s++){var c=r[s];if(c.includes(Un)){var a=n.getItem(c);a!==null&&(a=JSON.parse(a),(a.timeRefreshed===void 0&&a.timeAcquired<t||a.timeRefreshed!==void 0&&a.timeRefreshed<t)&&(n.removeItem(c),i=!0))}}i&&e.notifyWaiters()},e.waiters=void 0,e}();oe.default=Od});var gv=Z(ci()),vv=Z(Si()),Av=Z(To()),Ev=Z(Ro());var At,Pu=new Uint8Array(16);function Rn(){if(!At&&(At=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!At))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return At(Pu)}var x=[];for(let e=0;e<256;++e)x.push((e+256).toString(16).slice(1));function Do(e,t=0){return(x[e[t+0]]+x[e[t+1]]+x[e[t+2]]+x[e[t+3]]+"-"+x[e[t+4]]+x[e[t+5]]+"-"+x[e[t+6]]+x[e[t+7]]+"-"+x[e[t+8]]+x[e[t+9]]+"-"+x[e[t+10]]+x[e[t+11]]+x[e[t+12]]+x[e[t+13]]+x[e[t+14]]+x[e[t+15]]).toLowerCase()}var ku=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Dn={randomUUID:ku};function qu(e,t,n){if(Dn.randomUUID&&!t&&!e)return Dn.randomUUID();e=e||{};let r=e.random||(e.rng||Rn)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return Do(r)}var Ue=qu;var o;(a=>{let e;(h=>(h.Blog="Blog",h.Custom="Custom",h.CustomEvent="CustomEvent",h.Document="Document",h.Form="Form",h.ObjectEntry="ObjectEntry",h.Page="Page",h.WebContent="WebContent"))(e=a.ApplicationId||(a.ApplicationId={}));let t;(g=>(g.AssetClicked="assetClicked",g.AssetDepthReached="assetDepthReached",g.AssetDownloaded="assetDownloaded",g.AssetSubmitted="assetSubmitted",g.AssetViewed="assetViewed",g.BlogClicked="blogClicked",g.BlogDepthReached="blogDepthReached",g.BlogImpressionMade="blogImpressionMade",g.BlogViewed="blogViewed",g.DocumentDownloaded="documentDownloaded",g.DocumentImpressionMade="documentImpressionMade",g.DocumentPreviewed="documentPreviewed",g.FieldBlurred="fieldBlurred",g.FieldFocused="fieldFocused",g.FormSubmitted="formSubmitted",g.FormViewed="formViewed",g.ObjectEntryDownloaded="objectEntryDownloaded",g.ObjectEntryImpressionMade="objectEntryImpressionMade",g.ObjectEntryViewed="objectEntryViewed",g.PageDepthReached="pageDepthReached",g.PageLoaded="pageLoaded",g.PageRead="pageRead",g.PageUnloaded="pageUnloaded",g.PageViewed="pageViewed",g.TabBlurred="tabBlurred",g.TabFocused="tabFocused",g.WebContentClicked="webContentClicked",g.WebContentImpressionMade="webContentImpressionMade",g.WebContentViewed="webContentViewed"))(t=a.EventId||(a.EventId={}));let n;(f=>(f.View="view",f.Impression="impression",f.Download="download"))(n=a.ElementAction||(a.ElementAction={}));let r;(h=>(h.Blog="blog",h.BlogsEntry="com.liferay.blogs.model.BlogsEntry",h.Custom="custom",h.Document="document",h.FileEntry="com.liferay.portal.kernel.repository.model.FileEntry",h.JournalArticle="com.liferay.journal.model.JournalArticle",h.ObjectEntry="object-entry",h.WebContent="web-content"))(r=a.ElementType||(a.ElementType={}));let i;(S=>(S.AnalyticsAssetMimeType="analyticsAssetMimeType",S.AnalyticsAssetAction="analyticsAssetAction",S.AnalyticsAssetCategories="analyticsAssetCategories",S.AnalyticsAssetCategory="analyticsAssetCategory",S.AnalyticsAssetId="analyticsAssetId",S.AnalyticsAssetSubtype="analyticsAssetSubtype",S.AnalyticsAssetTags="analyticsAssetTags",S.AnalyticsAssetTitle="analyticsAssetTitle",S.AnalyticsAssetType="analyticsAssetType",S.AnalyticsAssetVersion="analyticsAssetVersion",S.AnalyticsAssetVocabularies="analyticsAssetVocabularies",S.AnalyticsCmpProjects="analyticsCmpProjects",S.AnalyticsExternalReferenceCode="analyticsExternalReferenceCode",S.AnalyticsObjectDefinitionName="analyticsObjectDefinitionName",S.AnalyticsObjectType="analyticsObjectType",S.AnalyticsWebContentResourcePk="analyticsWebContentResourcePk"))(i=a.DataSetList||(a.DataSetList={}));let s;(h=>(h.ChannelId="ac_client_channel_id",h.Contexts="ac_client_context",h.DemandbaseAccount="ac_client_demandbase_account",h.DisableTracking="ac_client_disable_tracking",h.Identity="ac_client_identity",h.PrevEmailAddressHash="ac_client_previous_email_address_hash",h.StorageVersion="ac_client_storage_version",h.UserId="ac_client_user_id"))(s=a.Keys||(a.Keys={}));let c;(y=>(y.AccountMessage="ac_message_queue_account",y.Events="ac_client_batch",y.IdentityMessage="ac_message_queue_identity",y.Messages="ac_message_queue"))(c=a.Queues||(a.Queues={}))})(o||(o={}));var Mo="1.5.0",Et="analyticsBatchSegmentExternalReferenceCodes";var Po="Thu, 01 Jan 1970 00:00:00 GMT";var Tt="OSB-Asah-Project-ID";var Ve="loadEventStartSPA",K="navigationStartSPA",ko="pageLoadTimeSPA",bt="viewDurationSPA",Mn="p_p_id",qo="com_liferay_portlet_configuration_web_portlet_PortletConfigurationPortlet",jo="p_l_mode",Ho="com_liferay_layout_content_page_editor_web_internal_portlet_ContentPageEditorPortlet",Pn="view";var No=new Set(["ja","ko","zh"]),It=75,kn=.75,Uo=265,Vo=108e5,Fo=2048,Bo=25,Wo=255,Qo=1024;var jn=Z(aa());function Hn(e){return typeof e!="object"||e===null?e:Array.isArray(e)?e.map(Hn).sort():Object.keys(e).sort().reduce((t,n)=>(t[n]=Hn(e[n]),t),{})}function Sd(e){if(typeof e=="object"){let t=JSON.stringify(Hn(e));return(0,jn.default)().update(t).digest("hex")}return(0,jn.default)().update(e).digest("hex")}var se=Sd;var la=Z(Bn()),Wn=()=>{let e=window.Liferay,t=e?.Util?.LocalStorage,n=e?.Util?.Cookie?.get?.("CONSENT_TYPE_PERFORMANCE");return t&&n==="true"},_=e=>{let t=window.Liferay,n;try{let r;Wn()?r=t?.Util?.LocalStorage?.getItem(e,t?.Util?.LocalStorage?.TYPES?.PERFORMANCE):r=localStorage.getItem(e),n=JSON.parse(r)}catch{return}return n},I=(e,t)=>{let n=window.Liferay;try{Wn()?n?.Util?.LocalStorage?.setItem(e,JSON.stringify(t),n?.Util?.LocalStorage?.TYPES?.PERFORMANCE):localStorage.setItem(e,JSON.stringify(t))}catch{return}},Ct=e=>{let t=window.Liferay;try{Wn()?t?.Util?.LocalStorage?.removeItem(e,t?.Util?.LocalStorage?.TYPES?.PERFORMANCE):localStorage.removeItem(e)}catch{return}},Rd=e=>Number(JSON.stringify(e).length*2/1024),ua=(e,t)=>{let n=_(e);if(!n?.length)return Promise.resolve();let r=new la.default;return r.acquireLock(e).then(i=>{if(i)return Rd(n)>t&&I(e,n.slice(1)),r.releaseLock(e)})};var Lt=class{constructor(t){this.analyticsInstance=t}waitForReadiness(t=5e3){try{let n=window.Demandbase?.IpApi?.CompanyProfile;if(n)return Promise.resolve(n)}catch{return Promise.resolve(null)}return new Promise(n=>{let r={},i=!1,s=c=>{i||(i=!0,r.pollId&&clearInterval(r.pollId),r.timeoutId&&clearTimeout(r.timeoutId),n(c))};try{window.Demandbase?.Utilities?.Callbacks?.registerCallback?.(()=>{try{s(window.Demandbase?.IpApi?.CompanyProfile??null)}catch{s(null)}})}catch{}r.pollId=setInterval(()=>{try{let c=window.Demandbase?.IpApi?.CompanyProfile;c&&s(c)}catch{s(null)}},500),r.timeoutId=setTimeout(()=>s(null),t)})}sendAccountMessage(t){this.waitForReadiness().then(n=>{if(this.analyticsInstance._disposed)return;if(!n){Ct(o.Keys.DemandbaseAccount),this.analyticsInstance[o.Queues.AccountMessage].reset();return}let{emailAddressHashed:r}=this.analyticsInstance.config.identity,i=se({emailAddressHashed:r,userId:t,webSite:n.web_site}),s=_(o.Keys.DemandbaseAccount);i!==s&&(I(o.Keys.DemandbaseAccount,i),this.analyticsInstance[o.Queues.AccountMessage].addItem({...n,emailAddressHashed:r,id:i,userId:t}))})}};function da(e=new Date){return new Date(e.getTime()-e.getTimezoneOffset()*60*1e3)}function fa(e=new Date){let t=e.getTimezoneOffset()/60,n=t>0?"-":"+",r=Math.abs(t%1),i=`${n}${("00"+Math.abs(~~t)).slice(-2)}`;return r?`${i}:${60*r}`:`${i}:00`}function Fe(e,t){return(document.querySelector(e)||{})[t]||""}function Pd(e){return Object.assign(e.context,{canonicalUrl:Fe("link[rel=canonical]","href"),contentLanguageId:Fe("html","lang"),description:Fe('meta[name="description"]',"content"),keywords:Fe('meta[name="keywords"]',"content"),languageId:navigator.language,referrer:document.referrer,timezoneOffset:fa(),title:Fe("title","textContent"),url:location.href,userAgent:navigator.userAgent}),e}var pa=Pd;var kd=[/^og:.*/,/^music:/,/^video:/,/^article:/,/^book:/,/^profile:/,/^fb:/];function qd(e){let t=!1;if(e&&e.getAttribute){let n=e.getAttribute("property");n&&(t=kd.some(r=>n.match(r)))}return t}function jd(e){let r=[].slice.call(document.querySelectorAll("meta")).filter(qd).reduce((i,s)=>Object.assign(i,{[s.getAttribute("property")]:s.getAttribute("content")}),{});return Object.assign(e.context,r),e}var ma=jd;function Hd(e){let t=window.devicePixelRatio||1,n=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,r=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;return Object.assign(e.context,{devicePixelRatio:t,screenHeight:n,screenWidth:r}),e}var ya=Hd;var Qn=[pa,ma,ya];function U(e,t=""){return typeof e=="object"?e.map(n=>`[data-analytics-asset-type="${n}"]${t}`).join(", "):`[data-analytics-asset-type="${e}"]${t}`}function ae(e,t){return ce(e,U(t))}function ce(e,t){if(e.closest)return e.closest(t);if(!document.documentElement.contains(e))return null;do{if(e.matches(t))return e;e=e.parentElement||e.parentNode}while(e!==null&&e.nodeType===1);return null}function be({innerText:e}){let t=e.split(/\s+/).filter(Boolean);return e!==""?t.length:0}function E(e,t){let n=[o.DataSetList.AnalyticsAssetId,o.DataSetList.AnalyticsAssetTitle,o.DataSetList.AnalyticsAssetType];return!!(e&&(t||n).every(i=>i in e.dataset))}function ha(e){return e.dataset?.analyticsAssetAction===o.ElementAction.Download}function Y(e){return e.dataset?.analyticsAssetAction===o.ElementAction.Impression}function z(e){return!e.dataset?.analyticsAssetAction||e.dataset?.analyticsAssetAction===o.ElementAction.View}Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector);function J(e,t){return function n(){let r=arguments;Nd(n),n.id=setTimeout(()=>{e.apply(null,r)},t)}}function Nd(e){clearTimeout(e.id)}function O(e){return()=>e.forEach(t=>t())}var wt=e=>(document.readyState==="interactive"||document.readyState==="complete"?e():document.addEventListener("DOMContentLoaded",e),()=>document.removeEventListener("DOMContentLoaded",e));var Ie=({analytics:e,applicationId:t,eventType:n,getPayload:r,isTrackable:i,type:s})=>{let c=a=>{let u=a.target,l=ae(u,s);if(!i(l)||u.control)return;let p=u.tagName.toLowerCase(),f=l?r(l):{};Object.assign(f,{tagName:p}),p==="a"?Object.assign(f,{href:u.href,text:u.innerText}):p==="img"&&Object.assign(f,{src:u.src}),e.send(n,t,f)};return document.addEventListener("click",c),()=>document.removeEventListener("click",c)};function ga(e,t,n,r){let i=new Date,s=i.toISOString(),c=da(i).toISOString();return{applicationId:t,contextHash:r,eventDate:s,eventId:e,eventLocalDate:c,properties:n}}var va=(e,t)=>{let n=e.flatMap(({value:r})=>r.events);return t.filter(({contextHash:r,eventDate:i,eventId:s})=>!n.some(({contextHash:c,eventDate:a,eventId:u})=>r===c&&s===u&&i===a))};function Ud(){return window.pageYOffset||document.documentElement.scrollTop}function Vd(){let e=[document.body.clientHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight];return Math.max.apply(null,e)}function Fd(e){let t=Vd(),n=Ud(),r={bottom:0,height:t,top:n};if(e){let i=e.getBoundingClientRect(),{bottom:s,height:c,top:a}=i;r={bottom:s,height:c,top:a}}return r}function Aa(e){if(typeof e.checkVisibility=="function")return e.checkVisibility({checkOpacity:!0,checkVisibilityCSS:!0,opacityProperty:!0,visibilityProperty:!0});let{height:t,width:n}=e.getBoundingClientRect();if(!t||!n||getComputedStyle(e).visibility==="hidden")return!1;let r=e;for(;r;){if(parseFloat(getComputedStyle(r).opacity)===0)return!1;r=r.parentElement}return!0}var P=class{constructor(t=4){this.steps=t,this.stepsReached=[]}dispose(){this.steps=null,this.stepsReached=null}getDepthValue(t){let{bottom:n,height:r,top:i}=Fd(t),s=window.innerHeight,c=(s-i)/r;return i<=0&&n>=0?c=s/(r+i):t||(c=(i+s)/r),c}getDepth(t){let n=this.getDepthValue(t),r=Math.round(n*100);return Math.min(Math.max(r,0),100)}onDepthReached(t,n){let r=this.getDepth(n),i=Math.floor(100/this.steps),s=Math.floor(r/i);this.stepsReached?.every(c=>c<s)&&(this.stepsReached.push(s),s>0&&t(s*i))}};var Ea="data-analytics-asset-viewed",Ta=["animationend","click","transitionend"];function R({isTrackable:e,onVisible:t,selector:n}){if(typeof IntersectionObserver!="function"||typeof MutationObserver!="function")return()=>{};let r=new Map,i=new Set,s=m=>m.getAttribute(Ea)==="true",c=new IntersectionObserver(m=>{m.forEach(b=>{let T=b.target;b.isIntersecting?(i.add(T),y(T)):i.delete(T)})}),a=m=>{let{target:b}=m,T=m.type!=="click"&&b instanceof Node;r.forEach((kt,pr)=>{(!T||b.contains(pr))&&y(pr)})},u=()=>Ta.forEach(m=>document.addEventListener(m,a,!0)),l=()=>Ta.forEach(m=>document.removeEventListener(m,a,!0)),p=m=>{c.unobserve(m),i.delete(m);let b=r.get(m);b&&(b.disconnect(),r.delete(m)),r.size===0&&l()},f=m=>{if(r.has(m))return;let b=new MutationObserver(()=>y(m));b.observe(m,{attributeFilter:["class","style"],attributes:!0}),r.set(m,b),u()};function y(m){if(!(!i.has(m)||s(m)||!e(m))){if(!Aa(m)){f(m);return}m.setAttribute(Ea,"true"),p(m),t(m)}}let v=m=>{s(m)||c.observe(m)},D=(m,b)=>{m.querySelectorAll(n).forEach(T=>b(T))},X=new MutationObserver(m=>{m.forEach(b=>{b.addedNodes.forEach(T=>{T instanceof Element&&(T.matches(n)&&v(T),D(T,v))}),b.removedNodes.forEach(T=>{T instanceof Element&&(T.matches(n)&&p(T),D(T,p))})})}),h=wt(()=>{D(document,v),X.observe(document.documentElement,{childList:!0,subtree:!0})});return()=>{h(),X.disconnect(),c.disconnect(),r.forEach(m=>m.disconnect()),r.clear(),i.clear(),l()}}function Gn({dataset:e}){let t={entryId:e.analyticsAssetId.trim()};return e.analyticsAssetCategories&&Object.assign(t,{assetCategories:e.analyticsAssetCategories.trim()}),e.analyticsAssetMimeType&&Object.assign(t,{mimeType:e.analyticsAssetMimeType.trim()}),e.analyticsAssetSubtype&&Object.assign(t,{subtype:e.analyticsAssetSubtype.trim()}),e.analyticsAssetTags&&Object.assign(t,{assetTags:e.analyticsAssetTags.trim()}),e.analyticsAssetTitle&&Object.assign(t,{title:e.analyticsAssetTitle.trim()}),e.analyticsAssetType&&Object.assign(t,{type:e.analyticsAssetType.trim()}),e.analyticsAssetVocabularies&&Object.assign(t,{assetVocabularies:e.analyticsAssetVocabularies.trim()}),e.analyticsExternalReferenceCode&&Object.assign(t,{externalReferenceCode:e.analyticsExternalReferenceCode.trim()}),t}function Bd(e,t){let n=new Date().toISOString(),r=new P,i=J(()=>{t.forEach(s=>{r.onDepthReached(c=>{let a=Gn(s);Object.assign(a,{depth:c,sessionId:n}),e.send(o.EventId.BlogDepthReached,o.ApplicationId.Blog,a)},s)})},1500);return document.addEventListener("scroll",i),()=>{document.removeEventListener("scroll",i)}}function ba(e,{eventId:t,isTrackable:n}){let r=[],i=U([o.ElementType.Blog,o.ElementType.BlogsEntry]),s=R({isTrackable:n,onVisible:a=>{let u=Gn(a);Object.assign(u,{numberOfWords:be(a)}),r.push(a),e.send(t,o.ApplicationId.Blog,u)},selector:i}),c=Bd(e,r);return()=>{c(),s()}}function Wd(e){return Ie({analytics:e,applicationId:o.ApplicationId.Blog,eventType:o.EventId.BlogClicked,getPayload:Gn,isTrackable:E,type:o.ElementType.Blog})}function Qd(e){return ba(e,{eventId:o.EventId.BlogImpressionMade,isTrackable:t=>E(t)&&Y(t)})}function Gd(e){return ba(e,{eventId:o.EventId.BlogViewed,isTrackable:t=>E(t)&&z(t)})}function $d(e){return O([Wd(e),Qd(e),Gd(e)])}var Ia=$d;function Be({dataset:e}){let t={assetId:e.analyticsAssetId.trim()};return e.analyticsAssetCategory&&Object.assign(t,{category:e.analyticsAssetCategory.trim()}),e.analyticsAssetCategories&&Object.assign(t,{assetCategories:e.analyticsAssetCategories.trim()}),e.analyticsAssetMimeType&&Object.assign(t,{mimeType:e.analyticsAssetMimeType.trim()}),e.analyticsAssetTags&&Object.assign(t,{assetTags:e.analyticsAssetTags.trim()}),e.analyticsAssetTitle&&Object.assign(t,{title:e.analyticsAssetTitle.trim()}),e.analyticsAssetVocabularies&&Object.assign(t,{assetVocabularies:e.analyticsAssetVocabularies.trim()}),t}function Kd(e){let t=n=>{let r=n.target,i=ce(r,'[data-analytics-asset-action="download"]'),s=ae(r,o.ElementType.Custom);i&&E(s,[o.DataSetList.AnalyticsAssetId,o.DataSetList.AnalyticsAssetType])&&e.send(o.EventId.AssetDownloaded,o.ApplicationId.Custom,Be(s))};return document.addEventListener("click",t),()=>document.removeEventListener("click",t)}function Yd(e,t){let n=new Date().toISOString(),r=new P,i=J(()=>{t.forEach(s=>{r.onDepthReached(c=>{let a=Be(s);Object.assign(a,{depth:c,sessionId:n}),e.send(o.EventId.AssetDepthReached,o.ApplicationId.Custom,a)},s)})},1500);return document.addEventListener("scroll",i),()=>{document.removeEventListener("scroll",i)}}function zd(e){let t=n=>{let r=n.target,i=ae(r,o.ElementType.Custom),s=E(i,[o.DataSetList.AnalyticsAssetId,o.DataSetList.AnalyticsAssetType]);!s||s&&(r.tagName!=="FORM"||n.defaultPrevented)||e.send(o.EventId.AssetSubmitted,o.ApplicationId.Custom,Be(i))};return document.addEventListener("submit",t),()=>document.removeEventListener("submit",t)}function Jd(e){let t=[],n=R({isTrackable:i=>E(i,[o.DataSetList.AnalyticsAssetId,o.DataSetList.AnalyticsAssetType]),onVisible:i=>{let s=!!i.getElementsByTagName("form").length,c=Be(i);Object.assign(c,{formEnabled:s}),t.push(i),e.send(o.EventId.AssetViewed,o.ApplicationId.Custom,c)},selector:'[data-analytics-asset-type="custom"]'}),r=Yd(e,t);return()=>{r(),n()}}function Xd(e){return Ie({analytics:e,applicationId:o.ApplicationId.Custom,eventType:o.EventId.AssetClicked,getPayload:Be,isTrackable:t=>E(t,[o.DataSetList.AnalyticsAssetId,o.DataSetList.AnalyticsAssetType]),type:o.ElementType.Custom})}function Zd(e){return O([Xd(e),Kd(e),zd(e),Jd(e)])}var _a=Zd;function xa({dataset:e}){let t={fileEntryId:e.analyticsAssetId.trim()};return e.analyticsAssetCategories&&Object.assign(t,{assetCategories:e.analyticsAssetCategories.trim()}),e.analyticsAssetMimeType&&Object.assign(t,{mimeType:e.analyticsAssetMimeType.trim()}),e.analyticsAssetTags&&Object.assign(t,{assetTags:e.analyticsAssetTags.trim()}),e.analyticsAssetTitle&&Object.assign(t,{title:e.analyticsAssetTitle.trim()}),e.analyticsAssetVersion&&Object.assign(t,{fileEntryVersion:e.analyticsAssetVersion.trim()}),e.analyticsAssetVocabularies&&Object.assign(t,{assetVocabularies:e.analyticsAssetVocabularies.trim()}),e.analyticsExternalReferenceCode&&Object.assign(t,{externalReferenceCode:e.analyticsExternalReferenceCode.trim()}),t}function ef(e){let t=n=>{let r=n.target,i=ce(r,'[data-analytics-asset-action="download"]'),s=ae(r,o.ElementType.Document);i&&E(s)&&e.send(o.EventId.DocumentDownloaded,o.ApplicationId.Document,xa(s))};return document.addEventListener("click",t),()=>document.removeEventListener("click",t)}function tf(e){return R({isTrackable:E,onVisible:t=>{e.send(o.EventId.DocumentPreviewed,o.ApplicationId.Document,xa(t))},selector:'[data-analytics-asset-action="preview"]'})}function nf(e){return O([ef(e),tf(e)])}var Sa=nf;function Ca({dataset:e}){let t={fileEntryId:e.analyticsAssetId.trim()};return e.analyticsAssetCategories&&Object.assign(t,{assetCategories:e.analyticsAssetCategories.trim()}),e.analyticsAssetMimeType&&Object.assign(t,{mimeType:e.analyticsAssetMimeType.trim()}),e.analyticsAssetSubtype&&Object.assign(t,{subtype:e.analyticsAssetSubtype.trim()}),e.analyticsAssetTags&&Object.assign(t,{assetTags:e.analyticsAssetTags.trim()}),e.analyticsAssetTitle&&Object.assign(t,{title:e.analyticsAssetTitle.trim()}),e.analyticsAssetType&&Object.assign(t,{type:e.analyticsAssetType.trim()}),e.analyticsAssetVersion&&Object.assign(t,{fileEntryVersion:e.analyticsAssetVersion.trim()}),e.analyticsAssetVocabularies&&Object.assign(t,{assetVocabularies:e.analyticsAssetVocabularies.trim()}),e.analyticsExternalReferenceCode&&Object.assign(t,{externalReferenceCode:e.analyticsExternalReferenceCode.trim()}),t}function rf(e){let t=n=>{let r=ce(n.target,U(o.ElementType.FileEntry,'[data-analytics-asset-action="download"]'));r&&E(r)&&e.send(o.EventId.DocumentDownloaded,o.ApplicationId.Document,Ca(r))};return document.addEventListener("click",t),()=>document.removeEventListener("click",t)}function La(e,{eventId:t,isTrackable:n}){let r=U(o.ElementType.FileEntry);return R({isTrackable:n,onVisible:i=>{e.send(t,o.ApplicationId.Document,Ca(i))},selector:r})}function sf(e){return La(e,{eventId:o.EventId.DocumentImpressionMade,isTrackable:t=>E(t)&&(Y(t)||ha(t))})}function of(e){return La(e,{eventId:o.EventId.DocumentPreviewed,isTrackable:t=>E(t)&&z(t)})}function af(e){return O([rf(e),sf(e),of(e)])}var wa=af;function Oa(){if(window.URLSearchParams)return new window.URLSearchParams(location.search);let e=new Map;return(location.search.startsWith("?")?location.search.slice(1):location.search).split("&").forEach(r=>{if(!r)return;let[i,s]=r.includes("=")?r.split("=").map(decodeURIComponent):[r,""];e.set(i,s)}),{get:r=>e.get(r)}}function We(e,t,n){window.performance.measure(e,t,n);let r=window.performance.getEntriesByName(e).pop();return r&&typeof r.duration=="number"?~~r.duration:0}function _e(e){window.performance.clearMarks(e),window.performance.mark(e)}function cf(e){let t=window.Liferay;function n(){e.send(o.EventId.PageUnloaded,o.ApplicationId.Page,{externalReferenceCode:e._getContext().layoutExternalReferenceCode,viewDuration:We(bt,K)})}function r(){e.send(o.EventId.PageLoaded,o.ApplicationId.Page,{externalReferenceCode:e._getContext().layoutExternalReferenceCode,pageLoadTime:We(ko,Ve,K)})}function i(a){return a.get(Mn)===qo}function s(a){return a.get(Mn)===Ho}function c(a){return(a.get(jo)||Pn)===Pn}if(t){let a=Oa();if(i(a)||s(a)||!c(a))return e._disposeInternal();if(t.SPA){let u=window.performance.getEntriesByName(Ve);if(_e(K),!u.length){let l=_e.bind(null,Ve);_e(Ve),t?.on?.("beforeNavigate",l)}document.readyState==="complete"&&r(),t?.once?.("beforeNavigate",n)}}}var Ra=cf;function Da(e){return e.dataset.analyticsAssetId||e.id||e.getAttribute("name")||e.action}function Ma({form:e,name:t}){return{fieldName:t,...$n(e)}}function $n(e){let t={formId:Da(e).trim()};return e.dataset.analyticsAssetCategories&&Object.assign(t,{assetCategories:e.dataset.analyticsAssetCategories.trim()}),e.dataset.analyticsAssetMimeType&&Object.assign(t,{mimeType:e.dataset.analyticsAssetMimeType.trim()}),e.dataset.analyticsAssetTags&&Object.assign(t,{assetTags:e.dataset.analyticsAssetTags.trim()}),e.dataset.analyticsAssetTitle&&Object.assign(t,{title:e.dataset.analyticsAssetTitle.trim()}),e.dataset.analyticsAssetVocabularies&&Object.assign(t,{assetVocabularies:e.dataset.analyticsAssetVocabularies.trim()}),e.dataset.analyticsExternalReferenceCode&&Object.assign(t,{externalReferenceCode:e.dataset.analyticsExternalReferenceCode.trim()}),t}function Qe(e){return E(e)&&!!Da(e)}function lf(e){let t=n=>{let r=n.target,{form:i}=r;if(!i||!Qe(i))return;let s=Ma(r),c=`${s.formId}${s.fieldName}blurred`;performance.mark(c);let a=`${s.formId}${s.fieldName}focused`;performance.measure("focusDuration",a,c);let u=performance.getEntriesByName("focusDuration").pop(),l=u&&typeof u.duration=="number"?~~u.duration:0;Object.assign(s,{focusDuration:l}),e.send(o.EventId.FieldBlurred,o.ApplicationId.Form,s),performance.clearMarks("focusDuration")};return document.addEventListener("blur",t,!0),()=>document.removeEventListener("blur",t,!0)}function uf(e){let t=n=>{let r=n.target,{form:i}=r;if(!i||!Qe(i))return;let s=Ma(r),c=`${s.formId}${s.fieldName}focused`;performance.mark(c),e.send(o.EventId.FieldFocused,o.ApplicationId.Form,s)};return document.addEventListener("focus",t,!0),()=>document.removeEventListener("focus",t,!0)}function df(e){let t=n=>{let r=n.target;!Qe(r)||Qe(r)&&n.defaultPrevented||e.send(o.EventId.FormSubmitted,o.ApplicationId.Form,$n(r))};return document.addEventListener("submit",t,!0),()=>document.removeEventListener("submit",t,!0)}function ff(e){return R({isTrackable:Qe,onVisible:t=>{e.send(o.EventId.FormViewed,o.ApplicationId.Form,$n(t))},selector:"form"})}function pf(e){return O([lf(e),uf(e),df(e),ff(e)])}var Pa=pf;var Kn=[o.DataSetList.AnalyticsAssetAction,o.DataSetList.AnalyticsAssetType,o.DataSetList.AnalyticsExternalReferenceCode,o.DataSetList.AnalyticsObjectDefinitionName];function ka({dataset:e}){let t={externalReferenceCode:e.analyticsExternalReferenceCode.trim(),objectDefinitionName:e.analyticsObjectDefinitionName.trim()};return e.analyticsAssetCategories&&Object.assign(t,{assetCategories:e.analyticsAssetCategories.trim()}),e.analyticsAssetMimeType&&Object.assign(t,{mimeType:e.analyticsAssetMimeType.trim()}),e.analyticsAssetTags&&Object.assign(t,{assetTags:e.analyticsAssetTags.trim()}),e.analyticsAssetTitle&&Object.assign(t,{title:e.analyticsAssetTitle.trim()}),e.analyticsAssetVocabularies&&Object.assign(t,{assetVocabularies:e.analyticsAssetVocabularies.trim()}),e.analyticsCmpProjects&&Object.assign(t,{cmpProjects:e.analyticsCmpProjects.trim()}),e.analyticsObjectType&&Object.assign(t,{objectType:e.analyticsObjectType.trim()}),t}function mf(e){let t=n=>{let r=n.target;E(r,Kn)&&r.dataset.analyticsAssetAction==="download"&&e.send(o.EventId.ObjectEntryDownloaded,o.ApplicationId.ObjectEntry,ka(r))};return document.addEventListener("click",t),()=>document.removeEventListener("click",t)}function qa(e,{eventId:t,isTrackable:n}){let r=U(o.ElementType.ObjectEntry);return R({isTrackable:n,onVisible:i=>{e.send(t,o.ApplicationId.ObjectEntry,ka(i))},selector:r})}function yf(e){return qa(e,{eventId:o.EventId.ObjectEntryImpressionMade,isTrackable:t=>E(t,Kn)&&Y(t)})}function hf(e){return qa(e,{eventId:o.EventId.ObjectEntryViewed,isTrackable:t=>E(t,Kn)&&z(t)})}function gf(e){return O([mf(e),yf(e),hf(e)])}var ja=gf;function Ha(){let{clientHeight:e,scrollHeight:t}=document.documentElement;return e*100/t<=It}var Ot=class{constructor(){this.timeReached=!1,this.depthReached=!Ha()}dispose(){this.timeReached=!1,this.depthReached=!Ha(),this.timeoutId&&clearTimeout(this.timeoutId)}setExpectedViewDuration(t,n){n&&!this.timeoutId&&(this.timeoutId=setTimeout(()=>this.onTimeReached(t),~~n))}onDepthReached(t){this.depthReached||(this.depthReached=!0,this.checkIsRead(t))}onTimeReached(t){this.timeReached=!0,this.checkIsRead(t)}checkIsRead(t){this.timeReached&&this.depthReached&&t()}};var Na=6e4;function Af(){let e=document.getElementById("main-content"),t=document.querySelector("meta[name='data-analytics-readable-content']");return t&&t.getAttribute("content")==="true"&&e?e.innerText:""}function Ef(){return document.documentElement.lang}function Tf(e){return e.replace(/\s+/gm,"").length/500*Na*kn}function bf(e){return be({innerText:e})/Uo*Na*kn}function If(e){let t=Ef();return No.has(t)?Tf(e):bf(e)}function _f(e){let t=new Ot,n=new P,r=wt(()=>{let s=Af();t.setExpectedViewDuration(()=>e.send(o.EventId.PageRead,o.ApplicationId.Page,{externalReferenceCode:e._getContext().layoutExternalReferenceCode}),If(s))}),i=J(()=>{n.onDepthReached(s=>{s>=It&&t.onDepthReached(()=>{e.send(o.EventId.PageRead,o.ApplicationId.Page,{externalReferenceCode:e._getContext().layoutExternalReferenceCode})})})},1500);return document.addEventListener("scroll",i),()=>{r(),document.removeEventListener("scroll",i),t.dispose(),n=new P}}var Ua=_f;function xf(e){let t=new P,n=J(()=>{t.onDepthReached(i=>{e.send(o.EventId.PageDepthReached,o.ApplicationId.Page,{depth:i,externalReferenceCode:e._getContext().layoutExternalReferenceCode})})},1500);document.addEventListener("scroll",n);let r=()=>{t.dispose(),t=new P};return window.addEventListener("load",r),()=>{document.removeEventListener("scroll",n),window.removeEventListener("load",r)}}var Va=xf;function Sf(e){let t=window.performance.timing,n=t.loadEventStart-t.navigationStart,r={externalReferenceCode:e._getContext().layoutExternalReferenceCode,pageLoadTime:n};e.send(o.EventId.PageLoaded,o.ApplicationId.Page,r)}function Cf(e){let n=window.performance.getEntriesByName(K).length?K:"navigationStart",r=We(bt,n),i={externalReferenceCode:e._getContext().layoutExternalReferenceCode,viewDuration:r};e.send(o.EventId.PageUnloaded,o.ApplicationId.Page,i)}function Fa(e){e.persisted&&_e(K)}function Lf(e){let t=Sf.bind(null,e);window.addEventListener("load",t);let n=Cf.bind(null,e);return window.addEventListener("pagehide",n),window.addEventListener("pageshow",Fa),()=>{window.removeEventListener("load",t),window.removeEventListener("pagehide",n),window.removeEventListener("pageshow",Fa)}}var Ba=Lf;var Yn=!0;function Ga(){let e,t,n=document;return typeof n.hidden<"u"?(e="hidden",t="visibilitychange"):typeof n.msHidden<"u"?(e="msHidden",t="msvisibilitychange"):typeof n.webkitHidden<"u"&&(e="webkitHidden",t="webkitvisibilitychange"),{hidden:e,visibilityChange:t}}function wf(e){let{hidden:t}=Ga();Yn&&(document[t]?e.send(o.EventId.TabBlurred,o.ApplicationId.Page):e.send(o.EventId.TabFocused,o.ApplicationId.Page))}function Of(e){let{visibilityChange:t}=Ga();if(t){let n=wf.bind(null,e);return window.addEventListener("beforeunload",Wa),window.addEventListener("pageshow",Qa),document.addEventListener(t,n),()=>{window.removeEventListener("beforeunload",Wa),window.removeEventListener("pageshow",Qa),document.removeEventListener(t,n)}}}function Wa(){Yn=!1}function Qa(e){e.persisted&&(Yn=!0)}var $a=Of;function Ka({dataset:e}){let t={articleId:e.analyticsAssetId.trim()};return e.analyticsAssetCategories&&Object.assign(t,{assetCategories:e.analyticsAssetCategories.trim()}),e.analyticsAssetMimeType&&Object.assign(t,{mimeType:e.analyticsAssetMimeType.trim()}),e.analyticsAssetSubtype&&Object.assign(t,{subtype:e.analyticsAssetSubtype.trim()}),e.analyticsAssetTags&&Object.assign(t,{assetTags:e.analyticsAssetTags.trim()}),e.analyticsAssetTitle&&Object.assign(t,{title:e.analyticsAssetTitle.trim()}),e.analyticsAssetType&&Object.assign(t,{type:e.analyticsAssetType.trim()}),e.analyticsAssetVocabularies&&Object.assign(t,{assetVocabularies:e.analyticsAssetVocabularies.trim()}),e.analyticsWebContentResourcePk&&Object.assign(t,{webContentResourcePk:e.analyticsWebContentResourcePk.trim()}),e.analyticsExternalReferenceCode&&Object.assign(t,{externalReferenceCode:e.analyticsExternalReferenceCode.trim()}),t}function Rf(e){return Ie({analytics:e,applicationId:o.ApplicationId.WebContent,eventType:o.EventId.WebContentClicked,getPayload:Ka,isTrackable:E,type:[o.ElementType.WebContent,o.ElementType.JournalArticle]})}function Ya(e,{eventId:t,isTrackable:n}){let r=U([o.ElementType.WebContent,o.ElementType.JournalArticle]);return R({isTrackable:n,onVisible:i=>{let s=Ka(i);Object.assign(s,{numberOfWords:be(i)}),e.send(t,o.ApplicationId.WebContent,s)},selector:r})}function Df(e){return Ya(e,{eventId:o.EventId.WebContentImpressionMade,isTrackable:t=>E(t)&&Y(t)})}function Mf(e){return Ya(e,{eventId:o.EventId.WebContentViewed,isTrackable:t=>E(t)&&z(t)})}function Pf(e){return O([Rf(e),Df(e),Mf(e)])}var za=Pf;var Ja=[Ra,Ia,_a,Sa,wa,Pa,ja,Ua,Va,Ba,$a,za];function zn(e){return e<=1?1:zn(e-1)+zn(e-2)}function Jn(e,t){return zn(Math.min(e,t))*1e3}var Xn=class{constructor(t){this.processInterval=null;this._flushing=null;this.attemptNumber=1,this.initialFlushInterval=t.flushInterval||2e3,this.processing=!1,this.queues=[],this.flushInterval=this.initialFlushInterval,this._startsFlushLoop()}addQueue(t,n={}){this.queues.push(Object.assign(n,{instance:t,name:t.name})),this.queues.sort(this._prioritize)}removeQueue(t){this.queues=this.queues.filter(({name:n})=>t!==n)}_prioritize({priority:t=1},{priority:n=1}){return n-t}_onFlushFail(){this.flushInterval=Jn(++this.attemptNumber,7),this._startsFlushLoop()}_onFlushSuccess(){this.attemptNumber=1,this.flushInterval!==this.initialFlushInterval&&(this.flushInterval=this.initialFlushInterval,this._startsFlushLoop())}flush(){return this.processing&&this._flushing?this._flushing:(this._flushing=this.queues.reduce((t,{instance:n})=>t.then(()=>!n.hasItems()||!n.shouldFlush()?Promise.resolve():n.acquireLock().then(r=>{if(!r)return Promise.resolve();this.processing=!0;let i=()=>n.releaseLock().then(()=>{this.processing=!1});return Promise.allSettled(n.onFlush()).then(s=>(this._onFlushSuccess(),n.onFlushSuccess(s),i(),Promise.resolve()))})).catch(()=>(this._onFlushFail(),n.onFlushFail(),Promise.reject())),Promise.resolve()).catch(()=>{}),this._flushing)}_startsFlushLoop(){this.processInterval&&clearInterval(this.processInterval),this.processInterval=setInterval(()=>this.flush(),this.flushInterval)}dispose(){this.processInterval&&clearInterval(this.processInterval),this.flushInterval=this.initialFlushInterval,this.queues=[]}};var Xa=Xn;var er=class{constructor({endpointUrl:t,projectId:n,timeout:r}){this.projectId=n,this.timeout=r||5e3,this.url=t}_getRequestParameters(){let t={"Content-Type":"application/json"};return this.projectId&&Object.assign(t,{[Tt]:this.projectId}),{cache:"default",credentials:"same-origin",headers:t,method:"POST",mode:"cors"}}_validateResponse(t){let n=t;return t.ok||(n=new Promise((r,i)=>i(t))),n}sendWithTimeout(t){return Promise.race([this.send(t),this._timeout()])}send(t){let n=this._getRequestParameters();return Object.assign(n,{body:JSON.stringify(t)}),fetch(this.url,n).then(this._validateResponse)}_timeout(){return new Promise((t,n)=>setTimeout(n,this.timeout))}};var Za=er;var ec=Z(Bn());var tr=class{constructor({analyticsInstance:t,name:n}){this.maxSize=512,this.name=n,this.lock=new ec.default,this.analyticsInstance=t,_(this.name)||I(this.name,[]),this.addItem=this.addItem.bind(this)}addItem(t){this._enqueue(t),ua(this.name,this.maxSize)}_dequeue(t){let n=this.getItems();I(this.name,n.filter(({id:r,item:i})=>i?i.id!==t:t!==r))}_enqueue(t){let n=this.getItems();n.push(t),I(this.name,n)}getItems(){return _(this.name)||[]}hasItems(){return!!this.getItems().length}acquireLock(){return this.lock.acquireLock(this.name)}releaseLock(){return this.lock.releaseLock(this.name)}reset(){I(this.name,[])}shouldFlush(){return this.analyticsInstance._isTrackingDisabled()?(this.analyticsInstance._disposeInternal(),!1):!0}onFlush(){throw Error("onFlush should be implemented on the new class")}onFlushFail(){}onFlushSuccess(){}};var Rt=tr;var nr=class extends Rt{constructor({analyticsInstance:t,flushTo:n,name:r}){super({analyticsInstance:t,name:r}),this.clientAdapter=new Za({endpointUrl:n,projectId:t.config.projectId})}onFlush(){return this.getItems().map(n=>this.clientAdapter.sendWithTimeout(n).then(()=>{this._dequeue(n.id)}).catch(r=>{let{status:i}=r||{};return(i===400||i===403)&&this._dequeue(n.id),Promise.reject(r)}))}};var xe=nr;var rr=class extends xe{constructor({analyticsInstance:t,name:n=o.Queues.AccountMessage}){super({analyticsInstance:t,flushTo:t.config.demandbaseAccountEndpoint,name:n})}};var tc=rr;var ir=class extends xe{constructor({analyticsInstance:t,name:n=o.Queues.Messages}){super({analyticsInstance:t,flushTo:t.config.endpointUrl,name:n})}};var nc=ir;function rc(e){let t=[];return e.forEach((n,r)=>t.push([r,n])),t}var Dt=(e=o.Keys.Contexts)=>{let t=_(e),n=new Map;return t&&t.forEach(([r,i])=>n.set(r,i)),n},$e=(e,t=o.Keys.Contexts)=>{I(t,rc(e))};var sr=class extends Rt{constructor({analyticsInstance:t,flushTo:n,name:r}){super({analyticsInstance:t,name:r}),this.analyticsInstance=t,this.flushTo=n}onFlush(){let t=this.getItems(),n=Dt(),r=this._groupEventsByContextHash(t),i=this.analyticsInstance._getUserId(),s=[];return n.forEach((c,a)=>{let u=r[a];u&&s.push(this.analyticsInstance[this.flushTo].addItem(this._createMessage({context:c,events:u,userId:i})))}),s}onFlushSuccess(t){let n=this.getItems(),r=t?.filter(s=>s&&s.value&&s.value.events),i=va(r,n);I(this.name,i),this.analyticsInstance.resetContext(),this.reset()}_createMessage({context:t,events:n,userId:r}){let{channelId:i,...s}=t,{dataSourceId:c,identity:{emailAddressHashed:a}}=this.analyticsInstance.config;return{channelId:i,context:{...s},dataSourceId:c,emailAddressHashed:a,events:n,id:Ue(),userId:r}}_groupEventsByContextHash(t){return t.reduce((n,r)=>(n[r.contextHash]?n[r.contextHash].push(r):n[r.contextHash]=[r],n),{})}};var ic=sr;var or=class extends ic{constructor({analyticsInstance:t,name:n=o.Queues.Events}){super({analyticsInstance:t,flushTo:o.Queues.Messages,name:n})}};var sc=or;var ar=class extends xe{constructor({analyticsInstance:t,name:n=o.Queues.IdentityMessage}){super({analyticsInstance:t,flushTo:t.config.identityEndpoint,name:n})}};var oc=ar;var Mt=class{constructor(t){this.instance=t}getBatchSegmentExternalReferenceCodes(){let t=this._getIndividualId(),n=_(Et);if(n&&n[t]){let r=new Date,i=n[t];if(r.getTime()-i.createDate<Vo)return Promise.resolve(i.segmentExternalReferenceCodes)}return this._fetchSegmentExternalReferenceCodes(t,"batch-segment-external-reference-codes").then(r=>{try{let i=new Date,s=_(Et)||{};return I(Et,{...s,[t]:{createDate:i.getTime(),segmentExternalReferenceCodes:r}}),r}catch{return r}})}getRealTimeSegmentExternalReferenceCodes(){return this._fetchSegmentExternalReferenceCodes(this._getIndividualId(),"real-time-segment-external-reference-codes")}_getIndividualId(){let{config:t}=this.instance;return t.identity?.emailAddressHashed||this.instance._getUserId()}_fetchSegmentExternalReferenceCodes(t,n){let{config:r}=this.instance,i={"Content-Type":"application/json"};return r.projectId&&Object.assign(i,{[Tt]:r.projectId}),fetch(`${r.faroBackendUrl}/api/1.0/segment-memberships/${t}/${n}`,{cache:"default",credentials:"same-origin",headers:i,method:"GET",mode:"cors"}).then(s=>s.json())}};var ac=()=>window.Liferay?.ThemeDisplay?.getPathContext?.()||"/",cr=e=>{let t=window.Liferay;if(t?.Util?.Cookie)return t.Util.Cookie.get?.(e,t.Util.Cookie.TYPES?.PERSONALIZATION)||"";let n=document.cookie.split("; ").find(r=>r.startsWith(`${e}=`));return n?n.slice(e.length+1):""},lr=(e,t,n="")=>{let r=window.Liferay,i=new Date;if(i.setDate(i.getDate()+365),r?.Util?.Cookie){let c={expires:i,secure:!0};n&&(c.domain=n),r.Util.Cookie.set?.(e,t,r.Util.Cookie.TYPES?.PERSONALIZATION,c);return}let s=[`${e}=${t}`];n&&s.push(`domain=${n}`),s.push(`expires=${i.toUTCString()}`,`path=${ac()}`,"Secure"),document.cookie=s.join("; ")},cc=e=>{new Set([ac(),"/"]).forEach(n=>{document.cookie=`${e}=; expires=${Po}; path=${n}`})};var ur=1,Nf=[[1,()=>{let e=_(o.Keys.Contexts);e&&!Array.isArray(e[0])&&$e(new Map)}]];function Uf(){let e=_(o.Keys.StorageVersion);return e?parseFloat(e):0}function Vf(e=ur){return I(o.Keys.StorageVersion,e.toString())}function lc(){let e=Uf();return e===ur||(Nf.forEach(([t,n])=>{t>e&&n()}),Vf(ur)),!0}var Ff=[o.ApplicationId.Blog,o.ApplicationId.Custom,o.ApplicationId.Document,o.ApplicationId.Form,o.ApplicationId.Page,o.ApplicationId.WebContent],Pt=e=>t=>e.map(n=>{if(typeof n=="function")return n(t)}).filter(Boolean),Bf=e=>{let t="";return["string","number","boolean"].includes(typeof e)||(t="Attribute must be a String, Number, or Boolean."),t},uc=e=>t=>{let n="";return String(t).length||(n=`${e} is required.`),n},Wf=e=>t=>{let n="";return typeof t!="string"&&(n=`${e} must be a string.`),n},dr=(e=Wo)=>t=>{let n="";return String(t).length>e&&(n=`${t} exceeds maximum length of ${e}`),n},Qf=(e=Bo)=>({eventId:t,eventProps:n={}})=>{let r="";return Object.keys(n).length>e&&(r=`The Event ${t} attributes list exceeds maximum length of ${e}`),r},Gf=e=>e.forEach(t=>console.error(new Error(t))),dc=({applicationId:e,eventId:t,eventProps:n})=>{let r=Pt([Wf("eventId"),uc("eventId"),dr()]),i=Pt([Qf()]),s=Pt([uc("eventPropKey"),dr()]),c=[];Ff.includes(e)||(c=[Bf,dr(Qo)]);let a=Pt(c),u=[];if(u=u.concat(r(t)),n){u=u.concat(i({eventId:t,eventProps:n}));for(let l in n)u=u.concat(s(l),a(n[l]))}return u.length?(Gf(u),!1):!0};var Se=window||global,Yf=/^[\d.]+$/,Ke=class Ke{constructor(t,n){this._disposed=!1;this._pluginDisposers=[];this._sharedUserIdSynced=!1;this.config={channelId:"",dataSourceId:"",demandbaseAccountEndpoint:"",endpointUrl:"",faroBackendUrl:"",flushInterval:0,identity:{emailAddressHashed:""},identityEndpoint:"",projectId:"",userId:""};this.middlewares=[];this.version="";if(this._isTrackingDisabled())return this;this._disposed=!1;let r=(t.endpointUrl||"").replace(/\/$/,""),i=(t.faroBackendUrl||"").replace(/\/$/,"");return this.config=Object.assign(t,{cookieDomain:this._resolveCookieDomain(t.cookieDomain),demandbaseAccountEndpoint:`${r}/demandbase-account`,endpointUrl:r,faroBackendUrl:i,flushInterval:t.flushInterval||2e3,identityEndpoint:`${r}/identity`}),this.version=Mo,n.forEach(s=>this.registerMiddleware(s)),this._queueFlushService=new Xa(this.config),this._initializeEventQueue(),this._initializeEventMessageQueue(),this._initializeIdentityMessageQueue(),this._initializeAccountMessageQueue(),this.demandbase=new Lt(this),this.segment=new Mt(this),lc(),this._pluginDisposers=Ja.map(s=>s(this)),this._ensureIntegrity(),this}static create(t,n=[]){let r=new Ke(t,n),i=window.Liferay;Se.Analytics=r,Se.Analytics.create=Ke.create,Se.Analytics.dispose=Ke.dispose;let s="",c="";return i&&i.ThemeDisplay&&i.ThemeDisplay.getUserEmailAddress&&i.ThemeDisplay.getUserEmailAddress().length&&i.ThemeDisplay.getUserName&&i.ThemeDisplay.getUserName().length&&(s=i.ThemeDisplay.getUserEmailAddress(),c=i.ThemeDisplay.getUserName()),r.setIdentity({email:s,name:c}),r}static dispose(){let t=Se.Analytics;t&&!t._isTrackingDisabled()&&t._disposeInternal()}flush(){return this._queueFlushService?this._queueFlushService.flush():Promise.resolve()}getEvents(){return this[o.Queues.Events].getItems()}getBatchSegmentExternalReferenceCodes(){return this.segment.getBatchSegmentExternalReferenceCodes()}getRealTimeSegmentExternalReferenceCodes(){return this.segment.getRealTimeSegmentExternalReferenceCodes()}registerPlugin(t){typeof t=="function"&&t(this)}registerMiddleware(t){this._isTrackingDisabled()||typeof t=="function"&&Qn.push(t)}reset(){this._isTrackingDisabled()||(this[o.Queues.Events].reset(),this.resetContext())}resetContext(){let t=this._getContext(),n=new Map;n.set(se(t),t),$e(n)}track(t,n,r={}){let{assetType:i,...s}=n||{},c={applicationId:o.ApplicationId.CustomEvent,...r},a=i||c.applicationId;if(this._isTrackingDisabled()||this._disposed||!dc({applicationId:a,eventId:t,eventProps:s}))return;let u=this._getCurrentContextHash();this[o.Queues.Events].addItem(ga(t,a,s,u))}send(t,n,r){n&&this.track(t,r,{applicationId:n})}setIdentity(t){if(this._isTrackingDisabled())return;let n={emailAddressHashed:t.email?se(t.email.toLowerCase()):"",fields:this._getNormalizedFields(t.fields)};this.config.identity=n;let r=this._getUserId();return this._sendIdentity(n,r),this.demandbase.sendAccountMessage(r),Promise.resolve(r)}_syncSharedUserId(t){if(this._sharedUserIdSynced||!this._getCookieDomain())return"";this._sharedUserIdSynced=!0;let n=cr(o.Keys.UserId);return!n||n===t?"":(I(o.Keys.UserId,n),n)}_disposeInternal(){this._disposed=!0,this._queueFlushService&&this._queueFlushService.dispose(),this._pluginDisposers.length&&this._pluginDisposers.filter(t=>typeof t=="function").forEach(t=>t())}_ensureIntegrity(){this._getCookieDomain()&&cc(o.Keys.UserId);let t=_(o.Keys.UserId);t&&this._setUserIdCookie(t)}_getCurrentContextHash(){let t=this._getContext(),n=se(t),r=Dt();return r.has(n)||(r.set(n,t),$e(r)),n}_getContext(){let{context:t}=Qn.reduce((r,i)=>i(r),{context:{channelId:this.config.channelId}}),n={...t};for(let r in n)n[r]=String(n[r]).slice(0,Fo);return n}_resolveCookieDomain(t=""){let n=t.replace(/^\./,""),{hostname:r}=window.location;return!n.includes(".")||Yf.test(n)||r!==n&&!r.endsWith(`.${n}`)?"":n}_getCookieDomain(){return this.config.cookieDomain||""}_getIdentityHash(t,n,r){return se({dataSourceId:t,identity:n,userId:r})}_getNormalizedFields(t){return t&&[...t].sort((n,r)=>n.name===r.name?0:n.name<r.name?-1:1)}_getUserId(){let t=_(o.Keys.UserId),{emailAddressHashed:n}=this.config.identity,r=_(o.Keys.PrevEmailAddressHash);return n||(t=this._syncSharedUserId(t)||t),t||(t=this._generateUserId(),this._setUserIdCookie(t)),n&&n!==r&&(r&&(t=this._generateUserId(),this._replaceUserIdCookie(t)),I(o.Keys.PrevEmailAddressHash,n)),t}_generateUserId(){let t=Ue();return I(o.Keys.UserId,t),Ct(o.Keys.Identity),t}_isTrackingDisabled(){return Se[o.Keys.DisableTracking]||navigator.doNotTrack==="1"||navigator.doNotTrack==="yes"}_sendIdentity(t,n){let{dataSourceId:r}=this.config,{channelId:i}=this._getContext(),s=this._getIdentityHash(r,t,n),c=_(o.Keys.Identity),a=_(o.Keys.ChannelId);if(s!==c||i!==a){let{emailAddressHashed:u,fields:l}=t;I(o.Keys.ChannelId,i),I(o.Keys.Identity,s),this[o.Queues.IdentityMessage].addItem({channelId:i,dataSourceId:r,emailAddressHashed:u,fields:l,id:s,userId:n})}}_setUserIdCookie(t){let n=this._getCookieDomain();if(n){let r=cr(o.Keys.UserId);if(r&&r!==t)return}lr(o.Keys.UserId,t,n)}_replaceUserIdCookie(t){lr(o.Keys.UserId,t,this._getCookieDomain())}_initializeEventQueue(){let t=new sc({analyticsInstance:this});this[o.Queues.Events]=t,this._queueFlushService.addQueue(t,{priority:1})}_initializeEventMessageQueue(){let t=new nc({analyticsInstance:this});this[o.Queues.Messages]=t,this._queueFlushService.addQueue(t,{priority:1})}_initializeIdentityMessageQueue(){let t=new oc({analyticsInstance:this});this[o.Queues.IdentityMessage]=t,this._queueFlushService.addQueue(t,{priority:10})}_initializeAccountMessageQueue(){let t=new tc({analyticsInstance:this});this[o.Queues.AccountMessage]=t,this._queueFlushService.addQueue(t,{priority:10})}};o.Queues.AccountMessage,o.Queues.Events,o.Queues.Messages,o.Queues.IdentityMessage;var fr=Ke;Se.Analytics={create:fr.create};})();
//# sourceMappingURL=analytics-all-min.js.map
