@letscooee/web-sdk 9.12.4 → 9.12.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,41 +1,40 @@
1
- import{$ as pu,$a as Rt,A as su,Aa as Ne,B as vi,Ba as wn,C as yi,Ca as et,D as ln,Da as tt,E as au,Ea as X,F as cu,Fa as q,G as Pe,Ga as Ie,H as Fn,Ha as Qs,I as ft,Ia as st,J as lu,Ja as Me,K as N,Ka as J,L as Or,La as Hn,M as Rr,Ma as Kn,N as $e,Na as Xn,O as Ge,Oa as qn,P as Gt,Pa as fn,Q as or,Qa as Oe,R as Ei,Ra as Zn,S as ht,Sa as Wt,T as uu,Ta as Vt,U as He,Ua as bn,V as ot,Va as Ot,W as du,Wa as wi,X as ut,Xa as oo,Y as Tt,Ya as yu,Z as fu,Za as Eu,_ as hu,_a as St,a as O,aa as mu,ab as wu,b as xe,ba as gu,bb as bu,c as _i,ca as Vn,cb as ea,d as Ws,da as un,db as Su,e as eo,ea as vt,eb as Sn,f as Zl,fa as W,fb as kr,g as zs,ga as Ar,gb as Cu,h as Jt,ha as Zs,hb as ta,i as rr,ia as Qt,ib as so,j as we,ja as ro,jb as na,k as to,ka as dn,kb as ao,l as Jl,la as Nr,lb as nt,m as Ys,ma as Js,mb as Iu,n as Ql,na as Te,nb as Jn,o as eu,oa as Bn,ob as xu,p as Tr,pa as Un,pb as Du,q as tu,qa as io,r as Ks,ra as bt,rb as Tu,s as nu,sa as Ae,sb as Ou,t as ru,ta as Pr,tb as Ru,u as iu,ua as yn,ub as Qn,v as ir,va as be,w as no,wa as Mr,x as Xs,xa as En,y as ou,ya as _u,z as qs,za as vu}from"./chunk-QPIMOJV6.js";var Mu=Ws((Pu,co)=>{"use strict";(function(t){"use strict";var e={};e.VERSION="1.6.1";var n,r={},i=function(d,m){return function(){return m.apply(d,arguments)}},o=function(){var d=arguments,m=d[0],h,E;for(E=1;E<d.length;E++)for(h in d[E])!(h in m)&&d[E].hasOwnProperty(h)&&(m[h]=d[E][h]);return m},s=function(d,m){return{value:d,name:m}};e.TRACE=s(1,"TRACE"),e.DEBUG=s(2,"DEBUG"),e.INFO=s(3,"INFO"),e.TIME=s(4,"TIME"),e.WARN=s(5,"WARN"),e.ERROR=s(8,"ERROR"),e.OFF=s(99,"OFF");var a=function(d){this.context=d,this.setLevel(d.filterLevel),this.log=this.info};a.prototype={setLevel:function(d){d&&"value"in d&&(this.context.filterLevel=d)},getLevel:function(){return this.context.filterLevel},enabledFor:function(d){var m=this.context.filterLevel;return d.value>=m.value},trace:function(){this.invoke(e.TRACE,arguments)},debug:function(){this.invoke(e.DEBUG,arguments)},info:function(){this.invoke(e.INFO,arguments)},warn:function(){this.invoke(e.WARN,arguments)},error:function(){this.invoke(e.ERROR,arguments)},time:function(d){typeof d=="string"&&d.length>0&&this.invoke(e.TIME,[d,"start"])},timeEnd:function(d){typeof d=="string"&&d.length>0&&this.invoke(e.TIME,[d,"end"])},invoke:function(d,m){n&&this.enabledFor(d)&&n(m,o({level:d},this.context))}};var u=new a({filterLevel:e.OFF});(function(){var d=e;d.enabledFor=i(u,u.enabledFor),d.trace=i(u,u.trace),d.debug=i(u,u.debug),d.time=i(u,u.time),d.timeEnd=i(u,u.timeEnd),d.info=i(u,u.info),d.warn=i(u,u.warn),d.error=i(u,u.error),d.log=d.info})(),e.setHandler=function(d){n=d},e.setLevel=function(d){u.setLevel(d);for(var m in r)r.hasOwnProperty(m)&&r[m].setLevel(d)},e.getLevel=function(){return u.getLevel()},e.get=function(d){return r[d]||(r[d]=new a(o({name:d},u.context)))},e.createDefaultHandler=function(d){d=d||{},d.formatter=d.formatter||function(S,T){T.name&&S.unshift("["+T.name+"]")};var m={},h=function(E,S){Function.prototype.apply.call(E,console,S)};return typeof console>"u"?function(){}:function(E,S){E=Array.prototype.slice.call(E);var T=console.log,k;S.level===e.TIME?(k=(S.name?"["+S.name+"] ":"")+E[0],E[1]==="start"?console.time?console.time(k):m[k]=new Date().getTime():console.timeEnd?console.timeEnd(k):h(T,[k+": "+(new Date().getTime()-m[k])+"ms"])):(S.level===e.WARN&&console.warn?T=console.warn:S.level===e.ERROR&&console.error?T=console.error:S.level===e.INFO&&console.info?T=console.info:S.level===e.DEBUG&&console.debug?T=console.debug:S.level===e.TRACE&&console.trace&&(T=console.trace),d.formatter(E,S),h(T,E))}},e.useDefaults=function(d){e.setLevel(d&&d.defaultLevel||e.DEBUG),e.setHandler(e.createDefaultHandler(d))},e.setDefaults=e.useDefaults,typeof define=="function"&&define.amd?define(e):typeof co<"u"&&co.exports?co.exports=e:(e._prevLogger=t.Logger,e.noConflict=function(){return t.Logger=e._prevLogger,e},t.Logger=e)})(Pu)});var aa=Ws((lo,Lu)=>{"use strict";(function(t,e){typeof lo=="object"&&typeof Lu<"u"?e(lo):typeof define=="function"&&define.amd?define(["exports"],e):e((t=typeof globalThis<"u"?globalThis:t||self).Sqrl={})})(lo,function(t){"use strict";function e(R){var D,F,L=new Error(R);return D=L,F=e.prototype,Object.setPrototypeOf?Object.setPrototypeOf(D,F):D.__proto__=F,L}function n(R,D,F){var L=D.slice(0,F).split(/\n/),v=L.length,y=L[v-1].length+1;throw e(R+=" at line "+v+" col "+y+`:
1
+ import{$ as _r,$a as It,A as mt,Aa as et,B as jn,Ba as Ne,C as Qt,Ca as J,D as wl,Da as Tn,E as K,Ea as Yn,F as Li,Fa as zn,G as Ue,Ga as Kn,H as He,Ha as nn,I as Ft,Ia as Te,J as $n,Ja as kn,K as ei,Ka as Vt,L as Rt,La as Pt,M as Cl,Ma as fn,N as it,Na as Ct,O as Mt,Oa as Bi,P as Sl,Pa as Al,Q as bt,Qa as Nl,R as Wt,Ra as _t,S as Il,Sa as St,T as xl,Ta as Rl,U as Tl,Ua as Ml,V as gr,Va as Pl,W as en,Wa as Xn,X as ft,Xa as xs,Y as W,Ya as Ui,Z as ki,Za as Ts,_ as bs,_a as Ll,a as D,aa as ws,ab as kl,b as Ie,ba as tn,bb as Fn,c as Jr,ca as Cs,cb as Fl,d as ys,da as Ss,db as Vl,e as Ri,ea as Fe,f as cl,fa as Gn,fb as Bl,g as vs,ga as yr,gb as Ul,h as Qr,ha as Fi,hb as Vn,i as ll,ia as wt,ib as Hl,j as dt,jb as Hi,k as ul,ka as De,kb as On,l as dl,la as Vi,lb as jl,m as fl,ma as xn,mb as $l,n as pl,na as be,nb as ji,o as Mi,oa as ti,ob as Dn,p as Es,pa as Wn,pb as ni,q as hl,qa as Ol,qb as rn,r as ml,ra as Dl,rb as ri,s as Pi,sa as Ae,sb as Gl,t as gl,ta as dn,tb as Wl,u as _l,ua as qe,ub as Os,v as yl,va as Ze,vb as $i,w as vl,wa as X,wb as Ds,x as El,xa as q,xb as Yl,y as mr,ya as Se,z as bl,za as Is}from"./chunk-MO3SS2LC.js";var ql=ys((Xl,Gi)=>{"use strict";(function(t){"use strict";var e={};e.VERSION="1.6.1";var n,r={},i=function(d,g){return function(){return g.apply(d,arguments)}},o=function(){var d=arguments,g=d[0],p,E;for(E=1;E<d.length;E++)for(p in d[E])!(p in g)&&d[E].hasOwnProperty(p)&&(g[p]=d[E][p]);return g},s=function(d,g){return{value:d,name:g}};e.TRACE=s(1,"TRACE"),e.DEBUG=s(2,"DEBUG"),e.INFO=s(3,"INFO"),e.TIME=s(4,"TIME"),e.WARN=s(5,"WARN"),e.ERROR=s(8,"ERROR"),e.OFF=s(99,"OFF");var c=function(d){this.context=d,this.setLevel(d.filterLevel),this.log=this.info};c.prototype={setLevel:function(d){d&&"value"in d&&(this.context.filterLevel=d)},getLevel:function(){return this.context.filterLevel},enabledFor:function(d){var g=this.context.filterLevel;return d.value>=g.value},trace:function(){this.invoke(e.TRACE,arguments)},debug:function(){this.invoke(e.DEBUG,arguments)},info:function(){this.invoke(e.INFO,arguments)},warn:function(){this.invoke(e.WARN,arguments)},error:function(){this.invoke(e.ERROR,arguments)},time:function(d){typeof d=="string"&&d.length>0&&this.invoke(e.TIME,[d,"start"])},timeEnd:function(d){typeof d=="string"&&d.length>0&&this.invoke(e.TIME,[d,"end"])},invoke:function(d,g){n&&this.enabledFor(d)&&n(g,o({level:d},this.context))}};var u=new c({filterLevel:e.OFF});(function(){var d=e;d.enabledFor=i(u,u.enabledFor),d.trace=i(u,u.trace),d.debug=i(u,u.debug),d.time=i(u,u.time),d.timeEnd=i(u,u.timeEnd),d.info=i(u,u.info),d.warn=i(u,u.warn),d.error=i(u,u.error),d.log=d.info})(),e.setHandler=function(d){n=d},e.setLevel=function(d){u.setLevel(d);for(var g in r)r.hasOwnProperty(g)&&r[g].setLevel(d)},e.getLevel=function(){return u.getLevel()},e.get=function(d){return r[d]||(r[d]=new c(o({name:d},u.context)))},e.createDefaultHandler=function(d){d=d||{},d.formatter=d.formatter||function(C,O){O.name&&C.unshift("["+O.name+"]")};var g={},p=function(E,C){Function.prototype.apply.call(E,console,C)};return typeof console>"u"?function(){}:function(E,C){E=Array.prototype.slice.call(E);var O=console.log,M;C.level===e.TIME?(M=(C.name?"["+C.name+"] ":"")+E[0],E[1]==="start"?console.time?console.time(M):g[M]=new Date().getTime():console.timeEnd?console.timeEnd(M):p(O,[M+": "+(new Date().getTime()-g[M])+"ms"])):(C.level===e.WARN&&console.warn?O=console.warn:C.level===e.ERROR&&console.error?O=console.error:C.level===e.INFO&&console.info?O=console.info:C.level===e.DEBUG&&console.debug?O=console.debug:C.level===e.TRACE&&console.trace&&(O=console.trace),d.formatter(E,C),p(O,E))}},e.useDefaults=function(d){e.setLevel(d&&d.defaultLevel||e.DEBUG),e.setHandler(e.createDefaultHandler(d))},e.setDefaults=e.useDefaults,typeof define=="function"&&define.amd?define(e):typeof Gi<"u"&&Gi.exports?Gi.exports=e:(e._prevLogger=t.Logger,e.noConflict=function(){return t.Logger=e._prevLogger,e},t.Logger=e)})(Xl)});var Ps=ys((Wi,Jl)=>{"use strict";(function(t,e){typeof Wi=="object"&&typeof Jl<"u"?e(Wi):typeof define=="function"&&define.amd?define(["exports"],e):e((t=typeof globalThis<"u"?globalThis:t||self).Sqrl={})})(Wi,function(t){"use strict";function e(A){var T,k,P=new Error(A);return T=P,k=e.prototype,Object.setPrototypeOf?Object.setPrototypeOf(T,k):T.__proto__=k,P}function n(A,T,k){var P=T.slice(0,k).split(/\n/),y=P.length,v=P[y-1].length+1;throw e(A+=" at line "+y+" col "+v+`:
2
2
 
3
- `+D.split(/\n/)[v-1]+`
4
- `+Array(y).join(" ")+"^")}e.prototype=Object.create(Error.prototype,{name:{value:"Squirrelly Error",enumerable:!1}});var r=new Function("return this")().Promise,i=!1;try{i=new Function("return (async function(){}).constructor")()}catch(R){if(!(R instanceof SyntaxError))throw R}function o(R,D){return Object.prototype.hasOwnProperty.call(R,D)}function s(R,D,F){for(var L in D)o(D,L)&&(D[L]==null||typeof D[L]!="object"||L!=="storage"&&L!=="prefixes"||F?R[L]=D[L]:R[L]=s({},D[L]));return R}var a=/^async +/,u=/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})*}|(?!\${)[^\\`])*`/g,d=/'(?:\\[\s\w"'\\`]|[^\n\r'\\])*?'/g,m=/"(?:\\[\s\w"'\\`]|[^\n\r"\\])*?"/g,h=/[.*+\-?^${}()|[\]\\]/g;function E(R){return h.test(R)?R.replace(h,"\\$&"):R}function S(R,D){D.rmWhitespace&&(R=R.replace(/[\r\n]+/g,`
5
- `).replace(/^\s+|\s+$/gm,"")),u.lastIndex=0,d.lastIndex=0,m.lastIndex=0;var F=D.prefixes,L=[F.h,F.b,F.i,F.r,F.c,F.e].reduce(function(ae,te){return ae&&te?ae+"|"+E(te):te?E(te):ae},""),v=new RegExp("([|()]|=>)|('|\"|`|\\/\\*)|\\s*((\\/)?(-|_)?"+E(D.tags[1])+")","g"),y=new RegExp("([^]*?)"+E(D.tags[0])+"(-|_)?\\s*("+L+")?\\s*","g"),H=0,Z=!1;function re(ae,te){var de,ce={f:[]},he=0,pe="c";function me(ve){var Se=R.slice(H,ve),ye=Se.trim();if(pe==="f")ye==="safe"?ce.raw=!0:D.async&&a.test(ye)?(ye=ye.replace(a,""),ce.f.push([ye,"",!0])):ce.f.push([ye,""]);else if(pe==="fp")ce.f[ce.f.length-1][1]+=ye;else if(pe==="err"){if(ye){var Fe=Se.search(/\S/);n("invalid syntax",R,H+Fe)}}else ce[pe]=ye;H=ve+1}for(te==="h"||te==="b"||te==="c"?pe="n":te==="r"&&(ce.raw=!0,te="i"),v.lastIndex=H;(de=v.exec(R))!==null;){var p=de[1],c=de[2],l=de[3],_=de[4],I=de[5],A=de.index;if(p)p==="("?(he===0&&(pe==="n"?(me(A),pe="p"):pe==="f"&&(me(A),pe="fp")),he++):p===")"?--he===0&&pe!=="c"&&(me(A),pe="err"):he===0&&p==="|"?(me(A),pe="f"):p==="=>"&&(me(A),H+=1,pe="res");else if(c)if(c==="/*"){var V=R.indexOf("*/",v.lastIndex);V===-1&&n("unclosed comment",R,de.index),v.lastIndex=V+2}else c==="'"?(d.lastIndex=de.index,d.exec(R)?v.lastIndex=d.lastIndex:n("unclosed string",R,de.index)):c==='"'?(m.lastIndex=de.index,m.exec(R)?v.lastIndex=m.lastIndex:n("unclosed string",R,de.index)):c==="`"&&(u.lastIndex=de.index,u.exec(R)?v.lastIndex=u.lastIndex:n("unclosed string",R,de.index));else if(l)return me(A),H=A+de[0].length,y.lastIndex=H,Z=I,_&&te==="h"&&(te="s"),ce.t=te,ce}return n("unclosed tag",R,ae),ce}var oe=function ae(te,de){te.b=[],te.d=[];var ce,he=!1,pe=[];function me(Fe,Ve){Fe&&(Fe=function(Qe,jt,qt,Ln){var Dt,$t;return typeof jt.autoTrim=="string"?Dt=$t=jt.autoTrim:Array.isArray(jt.autoTrim)&&(Dt=jt.autoTrim[1],$t=jt.autoTrim[0]),(qt||qt===!1)&&(Dt=qt),(Ln||Ln===!1)&&($t=Ln),Dt==="slurp"&&$t==="slurp"?Qe.trim():(Dt==="_"||Dt==="slurp"?Qe=String.prototype.trimLeft?Qe.trimLeft():Qe.replace(/^[\s\uFEFF\xA0]+/,""):Dt!=="-"&&Dt!=="nl"||(Qe=Qe.replace(/^(?:\n|\r|\r\n)/,"")),$t==="_"||$t==="slurp"?Qe=String.prototype.trimRight?Qe.trimRight():Qe.replace(/[\s\uFEFF\xA0]+$/,""):$t!=="-"&&$t!=="nl"||(Qe=Qe.replace(/(?:\n|\r|\r\n)$/,"")),Qe)}(Fe,D,Z,Ve))&&(Fe=Fe.replace(/\\|'/g,"\\$&").replace(/\r\n|\n|\r/g,"\\n"),pe.push(Fe))}for(;(ce=y.exec(R))!==null;){var p,c=ce[1],l=ce[2],_=ce[3]||"";for(var I in F)if(F[I]===_){p=I;break}me(c,l),H=ce.index+ce[0].length,p||n("unrecognized tag type: "+_,R,H);var A=re(ce.index,p),V=A.t;if(V==="h"){var ve=A.n||"";D.async&&a.test(ve)&&(A.a=!0,A.n=ve.replace(a,"")),A=ae(A),pe.push(A)}else if(V==="c"){if(te.n===A.n)return he?(he.d=pe,te.b.push(he)):te.d=pe,te;n("Helper start and end don't match",R,ce.index+ce[0].length)}else if(V==="b"){he?(he.d=pe,te.b.push(he)):te.d=pe;var Se=A.n||"";D.async&&a.test(Se)&&(A.a=!0,A.n=Se.replace(a,"")),he=A,pe=[]}else if(V==="s"){var ye=A.n||"";D.async&&a.test(ye)&&(A.a=!0,A.n=ye.replace(a,"")),pe.push(A)}else pe.push(A)}if(!de)throw e('unclosed helper "'+te.n+'"');return me(R.slice(H,R.length),!1),te.d=pe,te}({f:[]},!0);if(D.plugins)for(var ue=0;ue<D.plugins.length;ue++){var Q=D.plugins[ue];Q.processAST&&(oe.d=Q.processAST(oe.d,D))}return oe.d}function T(R,D){var F=S(R,D),L="var tR='';"+(D.useWith?"with("+D.varName+"||{}){":"")+ee(F,D)+"if(cb){cb(null,tR)} return tR"+(D.useWith?"}":"");if(D.plugins)for(var v=0;v<D.plugins.length;v++){var y=D.plugins[v];y.processFnString&&(L=y.processFnString(L,D))}return L}function k(R,D){for(var F=0;F<D.length;F++){var L=D[F][0],v=D[F][1];R=(D[F][2]?"await ":"")+"c.l('F','"+L+"')("+R,v&&(R+=","+v),R+=")"}return R}function P(R,D,F,L,v,y){var H="{exec:"+(v?"async ":"")+Y(F,D,R)+",params:["+L+"]";return y&&(H+=",name:'"+y+"'"),v&&(H+=",async:true"),H+="}"}function j(R,D){for(var F="[",L=0;L<R.length;L++){var v=R[L];F+=P(D,v.res||"",v.d,v.p||"",v.a,v.n),L<R.length&&(F+=",")}return F+="]"}function Y(R,D,F){return"function("+D+"){var tR='';"+ee(R,F)+"return tR}"}function ee(R,D){for(var F=0,L=R.length,v="";F<L;F++){var y=R[F];if(typeof y=="string")v+="tR+='"+y+"';";else{var H=y.t,Z=y.c||"",re=y.f,oe=y.n||"",ue=y.p||"",Q=y.res||"",ae=y.b,te=!!y.a;if(H==="i"){D.defaultFilter&&(Z="c.l('F','"+D.defaultFilter+"')("+Z+")");var de=k(Z,re);!y.raw&&D.autoEscape&&(de="c.l('F','e')("+de+")"),v+="tR+="+de+";"}else if(H==="h")if(D.storage.nativeHelpers.get(oe))v+=D.storage.nativeHelpers.get(oe)(y,D);else{var ce=(te?"await ":"")+"c.l('H','"+oe+"')("+P(D,Q,y.d,ue,te);ce+=ae?","+j(ae,D):",[]",v+="tR+="+k(ce+=",c)",re)+";"}else H==="s"?v+="tR+="+k((te?"await ":"")+"c.l('H','"+oe+"')({params:["+ue+"]},[],c)",re)+";":H==="e"&&(v+=Z+`
6
- `)}}return v}var K=function(){function R(D){this.cache=D}return R.prototype.define=function(D,F){this.cache[D]=F},R.prototype.get=function(D){return this.cache[D]},R.prototype.remove=function(D){delete this.cache[D]},R.prototype.reset=function(){this.cache={}},R.prototype.load=function(D){s(this.cache,D,!0)},R}();function ge(R,D,F,L){if(D&&D.length>0)throw e((L?"Native":"")+"Helper '"+R+"' doesn't accept blocks");if(F&&F.length>0)throw e((L?"Native":"")+"Helper '"+R+"' doesn't accept filters")}var U={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function fe(R){return U[R]}var ne=new K({}),Ee=new K({each:function(R,D){var F="",L=R.params[0];if(ge("each",D,!1),R.async)return new Promise(function(y){(function H(Z,re,oe,ue,Q){oe(Z[re],re).then(function(ae){ue+=ae,re===Z.length-1?Q(ue):H(Z,re+1,oe,ue,Q)})})(L,0,R.exec,F,y)});for(var v=0;v<L.length;v++)F+=R.exec(L[v],v);return F},foreach:function(R,D){var F=R.params[0];if(ge("foreach",D,!1),R.async)return new Promise(function(y){(function H(Z,re,oe,ue,Q,ae){ue(re[oe],Z[re[oe]]).then(function(te){Q+=te,oe===re.length-1?ae(Q):H(Z,re,oe+1,ue,Q,ae)})})(F,Object.keys(F),0,R.exec,"",y)});var L="";for(var v in F)o(F,v)&&(L+=R.exec(v,F[v]));return L},include:function(R,D,F){ge("include",D,!1);var L=F.storage.templates.get(R.params[0]);if(!L)throw e('Could not fetch template "'+R.params[0]+'"');return L(R.params[1],F)},extends:function(R,D,F){var L=R.params[1]||{};L.content=R.exec();for(var v=0;v<D.length;v++){var y=D[v];L[y.name]=y.exec()}var H=F.storage.templates.get(R.params[0]);if(!H)throw e('Could not fetch template "'+R.params[0]+'"');return H(L,F)},useScope:function(R,D){return ge("useScope",D,!1),R.exec(R.params[0])}}),Le=new K({if:function(R,D){ge("if",!1,R.f,!0);var F="if("+R.p+"){"+ee(R.d,D)+"}";if(R.b)for(var L=0;L<R.b.length;L++){var v=R.b[L];v.n==="else"?F+="else{"+ee(v.d,D)+"}":v.n==="elif"&&(F+="else if("+v.p+"){"+ee(v.d,D)+"}")}return F},try:function(R,D){if(ge("try",!1,R.f,!0),!R.b||R.b.length!==1||R.b[0].n!=="catch")throw e("native helper 'try' only accepts 1 block, 'catch'");var F="try{"+ee(R.d,D)+"}",L=R.b[0];return F+="catch"+(L.res?"("+L.res+")":"")+"{"+ee(L.d,D)+"}"},block:function(R,D){return ge("block",R.b,R.f,!0),"if(!"+D.varName+"["+R.p+"]){tR+=("+Y(R.d,"",D)+")()}else{tR+="+D.varName+"["+R.p+"]}"}}),De=new K({e:function(R){var D=String(R);return/[&<>"']/.test(D)?D.replace(/[&<>"']/g,fe):D}}),Re={varName:"it",autoTrim:[!1,"nl"],autoEscape:!0,defaultFilter:!1,tags:["{{","}}"],l:function(R,D){if(R==="H"){var F=this.storage.helpers.get(D);if(F)return F;throw e("Can't find helper '"+D+"'")}if(R==="F"){var L=this.storage.filters.get(D);if(L)return L;throw e("Can't find filter '"+D+"'")}},async:!1,storage:{helpers:Ee,nativeHelpers:Le,filters:De,templates:ne},prefixes:{h:"@",b:"#",i:"",r:"*",c:"/",e:"!"},cache:!1,plugins:[],useWith:!1};function Ke(R,D){var F={};return s(F,Re),D&&s(F,D),R&&s(F,R),F.l.bind(F),F}function Xe(R,D){var F,L=Ke(D||{}),v=Function;if(L.async){if(!i)throw e("This environment doesn't support async/await");v=i}if(L.varName&&(F=L.varName,/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(F)===!1))throw e("options.varName must be a valid JS identifier");try{return new v(L.varName,"c","cb",T(R,L))}catch(y){throw y instanceof SyntaxError?e(`Bad template syntax
3
+ `+T.split(/\n/)[y-1]+`
4
+ `+Array(v).join(" ")+"^")}e.prototype=Object.create(Error.prototype,{name:{value:"Squirrelly Error",enumerable:!1}});var r=new Function("return this")().Promise,i=!1;try{i=new Function("return (async function(){}).constructor")()}catch(A){if(!(A instanceof SyntaxError))throw A}function o(A,T){return Object.prototype.hasOwnProperty.call(A,T)}function s(A,T,k){for(var P in T)o(T,P)&&(T[P]==null||typeof T[P]!="object"||P!=="storage"&&P!=="prefixes"||k?A[P]=T[P]:A[P]=s({},T[P]));return A}var c=/^async +/,u=/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})*}|(?!\${)[^\\`])*`/g,d=/'(?:\\[\s\w"'\\`]|[^\n\r'\\])*?'/g,g=/"(?:\\[\s\w"'\\`]|[^\n\r"\\])*?"/g,p=/[.*+\-?^${}()|[\]\\]/g;function E(A){return p.test(A)?A.replace(p,"\\$&"):A}function C(A,T){T.rmWhitespace&&(A=A.replace(/[\r\n]+/g,`
5
+ `).replace(/^\s+|\s+$/gm,"")),u.lastIndex=0,d.lastIndex=0,g.lastIndex=0;var k=T.prefixes,P=[k.h,k.b,k.i,k.r,k.c,k.e].reduce(function(ae,ee){return ae&&ee?ae+"|"+E(ee):ee?E(ee):ae},""),y=new RegExp("([|()]|=>)|('|\"|`|\\/\\*)|\\s*((\\/)?(-|_)?"+E(T.tags[1])+")","g"),v=new RegExp("([^]*?)"+E(T.tags[0])+"(-|_)?\\s*("+P+")?\\s*","g"),U=0,Z=!1;function ne(ae,ee){var de,ce={f:[]},pe=0,he="c";function me(_e){var we=A.slice(U,_e),ve=we.trim();if(he==="f")ve==="safe"?ce.raw=!0:T.async&&c.test(ve)?(ve=ve.replace(c,""),ce.f.push([ve,"",!0])):ce.f.push([ve,""]);else if(he==="fp")ce.f[ce.f.length-1][1]+=ve;else if(he==="err"){if(ve){var Pe=we.search(/\S/);n("invalid syntax",A,U+Pe)}}else ce[he]=ve;U=_e+1}for(ee==="h"||ee==="b"||ee==="c"?he="n":ee==="r"&&(ce.raw=!0,ee="i"),y.lastIndex=U;(de=y.exec(A))!==null;){var h=de[1],a=de[2],l=de[3],_=de[4],I=de[5],N=de.index;if(h)h==="("?(pe===0&&(he==="n"?(me(N),he="p"):he==="f"&&(me(N),he="fp")),pe++):h===")"?--pe===0&&he!=="c"&&(me(N),he="err"):pe===0&&h==="|"?(me(N),he="f"):h==="=>"&&(me(N),U+=1,he="res");else if(a)if(a==="/*"){var F=A.indexOf("*/",y.lastIndex);F===-1&&n("unclosed comment",A,de.index),y.lastIndex=F+2}else a==="'"?(d.lastIndex=de.index,d.exec(A)?y.lastIndex=d.lastIndex:n("unclosed string",A,de.index)):a==='"'?(g.lastIndex=de.index,g.exec(A)?y.lastIndex=g.lastIndex:n("unclosed string",A,de.index)):a==="`"&&(u.lastIndex=de.index,u.exec(A)?y.lastIndex=u.lastIndex:n("unclosed string",A,de.index));else if(l)return me(N),U=N+de[0].length,v.lastIndex=U,Z=I,_&&ee==="h"&&(ee="s"),ce.t=ee,ce}return n("unclosed tag",A,ae),ce}var ie=function ae(ee,de){ee.b=[],ee.d=[];var ce,pe=!1,he=[];function me(Pe,Le){Pe&&(Pe=function(Xe,Lt,$t,In){var Et,kt;return typeof Lt.autoTrim=="string"?Et=kt=Lt.autoTrim:Array.isArray(Lt.autoTrim)&&(Et=Lt.autoTrim[1],kt=Lt.autoTrim[0]),($t||$t===!1)&&(Et=$t),(In||In===!1)&&(kt=In),Et==="slurp"&&kt==="slurp"?Xe.trim():(Et==="_"||Et==="slurp"?Xe=String.prototype.trimLeft?Xe.trimLeft():Xe.replace(/^[\s\uFEFF\xA0]+/,""):Et!=="-"&&Et!=="nl"||(Xe=Xe.replace(/^(?:\n|\r|\r\n)/,"")),kt==="_"||kt==="slurp"?Xe=String.prototype.trimRight?Xe.trimRight():Xe.replace(/[\s\uFEFF\xA0]+$/,""):kt!=="-"&&kt!=="nl"||(Xe=Xe.replace(/(?:\n|\r|\r\n)$/,"")),Xe)}(Pe,T,Z,Le))&&(Pe=Pe.replace(/\\|'/g,"\\$&").replace(/\r\n|\n|\r/g,"\\n"),he.push(Pe))}for(;(ce=v.exec(A))!==null;){var h,a=ce[1],l=ce[2],_=ce[3]||"";for(var I in k)if(k[I]===_){h=I;break}me(a,l),U=ce.index+ce[0].length,h||n("unrecognized tag type: "+_,A,U);var N=ne(ce.index,h),F=N.t;if(F==="h"){var _e=N.n||"";T.async&&c.test(_e)&&(N.a=!0,N.n=_e.replace(c,"")),N=ae(N),he.push(N)}else if(F==="c"){if(ee.n===N.n)return pe?(pe.d=he,ee.b.push(pe)):ee.d=he,ee;n("Helper start and end don't match",A,ce.index+ce[0].length)}else if(F==="b"){pe?(pe.d=he,ee.b.push(pe)):ee.d=he;var we=N.n||"";T.async&&c.test(we)&&(N.a=!0,N.n=we.replace(c,"")),pe=N,he=[]}else if(F==="s"){var ve=N.n||"";T.async&&c.test(ve)&&(N.a=!0,N.n=ve.replace(c,"")),he.push(N)}else he.push(N)}if(!de)throw e('unclosed helper "'+ee.n+'"');return me(A.slice(U,A.length),!1),ee.d=he,ee}({f:[]},!0);if(T.plugins)for(var ue=0;ue<T.plugins.length;ue++){var Q=T.plugins[ue];Q.processAST&&(ie.d=Q.processAST(ie.d,T))}return ie.d}function O(A,T){var k=C(A,T),P="var tR='';"+(T.useWith?"with("+T.varName+"||{}){":"")+oe(k,T)+"if(cb){cb(null,tR)} return tR"+(T.useWith?"}":"");if(T.plugins)for(var y=0;y<T.plugins.length;y++){var v=T.plugins[y];v.processFnString&&(P=v.processFnString(P,T))}return P}function M(A,T){for(var k=0;k<T.length;k++){var P=T[k][0],y=T[k][1];A=(T[k][2]?"await ":"")+"c.l('F','"+P+"')("+A,y&&(A+=","+y),A+=")"}return A}function L(A,T,k,P,y,v){var U="{exec:"+(y?"async ":"")+Y(k,T,A)+",params:["+P+"]";return v&&(U+=",name:'"+v+"'"),y&&(U+=",async:true"),U+="}"}function H(A,T){for(var k="[",P=0;P<A.length;P++){var y=A[P];k+=L(T,y.res||"",y.d,y.p||"",y.a,y.n),P<A.length&&(k+=",")}return k+="]"}function Y(A,T,k){return"function("+T+"){var tR='';"+oe(A,k)+"return tR}"}function oe(A,T){for(var k=0,P=A.length,y="";k<P;k++){var v=A[k];if(typeof v=="string")y+="tR+='"+v+"';";else{var U=v.t,Z=v.c||"",ne=v.f,ie=v.n||"",ue=v.p||"",Q=v.res||"",ae=v.b,ee=!!v.a;if(U==="i"){T.defaultFilter&&(Z="c.l('F','"+T.defaultFilter+"')("+Z+")");var de=M(Z,ne);!v.raw&&T.autoEscape&&(de="c.l('F','e')("+de+")"),y+="tR+="+de+";"}else if(U==="h")if(T.storage.nativeHelpers.get(ie))y+=T.storage.nativeHelpers.get(ie)(v,T);else{var ce=(ee?"await ":"")+"c.l('H','"+ie+"')("+L(T,Q,v.d,ue,ee);ce+=ae?","+H(ae,T):",[]",y+="tR+="+M(ce+=",c)",ne)+";"}else U==="s"?y+="tR+="+M((ee?"await ":"")+"c.l('H','"+ie+"')({params:["+ue+"]},[],c)",ne)+";":U==="e"&&(y+=Z+`
6
+ `)}}return y}var z=function(){function A(T){this.cache=T}return A.prototype.define=function(T,k){this.cache[T]=k},A.prototype.get=function(T){return this.cache[T]},A.prototype.remove=function(T){delete this.cache[T]},A.prototype.reset=function(){this.cache={}},A.prototype.load=function(T){s(this.cache,T,!0)},A}();function ye(A,T,k,P){if(T&&T.length>0)throw e((P?"Native":"")+"Helper '"+A+"' doesn't accept blocks");if(k&&k.length>0)throw e((P?"Native":"")+"Helper '"+A+"' doesn't accept filters")}var B={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function fe(A){return B[A]}var te=new z({}),Ee=new z({each:function(A,T){var k="",P=A.params[0];if(ye("each",T,!1),A.async)return new Promise(function(v){(function U(Z,ne,ie,ue,Q){ie(Z[ne],ne).then(function(ae){ue+=ae,ne===Z.length-1?Q(ue):U(Z,ne+1,ie,ue,Q)})})(P,0,A.exec,k,v)});for(var y=0;y<P.length;y++)k+=A.exec(P[y],y);return k},foreach:function(A,T){var k=A.params[0];if(ye("foreach",T,!1),A.async)return new Promise(function(v){(function U(Z,ne,ie,ue,Q,ae){ue(ne[ie],Z[ne[ie]]).then(function(ee){Q+=ee,ie===ne.length-1?ae(Q):U(Z,ne,ie+1,ue,Q,ae)})})(k,Object.keys(k),0,A.exec,"",v)});var P="";for(var y in k)o(k,y)&&(P+=A.exec(y,k[y]));return P},include:function(A,T,k){ye("include",T,!1);var P=k.storage.templates.get(A.params[0]);if(!P)throw e('Could not fetch template "'+A.params[0]+'"');return P(A.params[1],k)},extends:function(A,T,k){var P=A.params[1]||{};P.content=A.exec();for(var y=0;y<T.length;y++){var v=T[y];P[v.name]=v.exec()}var U=k.storage.templates.get(A.params[0]);if(!U)throw e('Could not fetch template "'+A.params[0]+'"');return U(P,k)},useScope:function(A,T){return ye("useScope",T,!1),A.exec(A.params[0])}}),Me=new z({if:function(A,T){ye("if",!1,A.f,!0);var k="if("+A.p+"){"+oe(A.d,T)+"}";if(A.b)for(var P=0;P<A.b.length;P++){var y=A.b[P];y.n==="else"?k+="else{"+oe(y.d,T)+"}":y.n==="elif"&&(k+="else if("+y.p+"){"+oe(y.d,T)+"}")}return k},try:function(A,T){if(ye("try",!1,A.f,!0),!A.b||A.b.length!==1||A.b[0].n!=="catch")throw e("native helper 'try' only accepts 1 block, 'catch'");var k="try{"+oe(A.d,T)+"}",P=A.b[0];return k+="catch"+(P.res?"("+P.res+")":"")+"{"+oe(P.d,T)+"}"},block:function(A,T){return ye("block",A.b,A.f,!0),"if(!"+T.varName+"["+A.p+"]){tR+=("+Y(A.d,"",T)+")()}else{tR+="+T.varName+"["+A.p+"]}"}}),xe=new z({e:function(A){var T=String(A);return/[&<>"']/.test(T)?T.replace(/[&<>"']/g,fe):T}}),Oe={varName:"it",autoTrim:[!1,"nl"],autoEscape:!0,defaultFilter:!1,tags:["{{","}}"],l:function(A,T){if(A==="H"){var k=this.storage.helpers.get(T);if(k)return k;throw e("Can't find helper '"+T+"'")}if(A==="F"){var P=this.storage.filters.get(T);if(P)return P;throw e("Can't find filter '"+T+"'")}},async:!1,storage:{helpers:Ee,nativeHelpers:Me,filters:xe,templates:te},prefixes:{h:"@",b:"#",i:"",r:"*",c:"/",e:"!"},cache:!1,plugins:[],useWith:!1};function Ge(A,T){var k={};return s(k,Oe),T&&s(k,T),A&&s(k,A),k.l.bind(k),k}function We(A,T){var k,P=Ge(T||{}),y=Function;if(P.async){if(!i)throw e("This environment doesn't support async/await");y=i}if(P.varName&&(k=P.varName,/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(k)===!1))throw e("options.varName must be a valid JS identifier");try{return new y(P.varName,"c","cb",O(A,P))}catch(v){throw v instanceof SyntaxError?e(`Bad template syntax
7
7
 
8
- `+y.message+`
9
- `+Array(y.message.length+1).join("=")+`
10
- `+T(R,L)):y}}function _t(R,D){var F;return D.cache&&D.name&&D.storage.templates.get(D.name)?D.storage.templates.get(D.name):(F=typeof R=="function"?R:Xe(R,D),D.cache&&D.name&&D.storage.templates.define(D.name,F),F)}Re.l.bind(Re),t.compile=Xe,t.compileScope=ee,t.compileScopeIntoFunction=Y,t.compileToString=T,t.defaultConfig=Re,t.filters=De,t.getConfig=Ke,t.helpers=Ee,t.nativeHelpers=Le,t.parse=S,t.render=function(R,D,F,L){var v=Ke(F||{});if(!v.async)return _t(R,v)(D,v);if(!L){if(typeof r=="function")return new r(function(y,H){try{y(_t(R,v)(D,v))}catch(Z){H(Z)}});throw e("Please provide a callback function, this env doesn't support Promises")}try{_t(R,v)(D,v,L)}catch(y){return L(y)}},t.templates=ne,Object.defineProperty(t,"__esModule",{value:!0})})});var uf=Ws((lf,bc)=>{"use strict";(function(t){if(typeof lf=="object"&&typeof bc<"u")bc.exports=t();else if(typeof define=="function"&&define.amd)define([],t);else{var e;typeof window<"u"?e=window:typeof global<"u"?e=global:typeof self<"u"?e=self:e=this,e.localforage=t()}})(function(){var t,e,n;return function r(i,o,s){function a(m,h){if(!o[m]){if(!i[m]){var E=typeof _i=="function"&&_i;if(!h&&E)return E(m,!0);if(u)return u(m,!0);var S=new Error("Cannot find module '"+m+"'");throw S.code="MODULE_NOT_FOUND",S}var T=o[m]={exports:{}};i[m][0].call(T.exports,function(k){var P=i[m][1][k];return a(P||k)},T,T.exports,r,i,o,s)}return o[m].exports}for(var u=typeof _i=="function"&&_i,d=0;d<s.length;d++)a(s[d]);return a}({1:[function(r,i,o){(function(s){"use strict";var a=s.MutationObserver||s.WebKitMutationObserver,u;if(a){var d=0,m=new a(k),h=s.document.createTextNode("");m.observe(h,{characterData:!0}),u=function(){h.data=d=++d%2}}else if(!s.setImmediate&&typeof s.MessageChannel<"u"){var E=new s.MessageChannel;E.port1.onmessage=k,u=function(){E.port2.postMessage(0)}}else"document"in s&&"onreadystatechange"in s.document.createElement("script")?u=function(){var j=s.document.createElement("script");j.onreadystatechange=function(){k(),j.onreadystatechange=null,j.parentNode.removeChild(j),j=null},s.document.documentElement.appendChild(j)}:u=function(){setTimeout(k,0)};var S,T=[];function k(){S=!0;for(var j,Y,ee=T.length;ee;){for(Y=T,T=[],j=-1;++j<ee;)Y[j]();ee=T.length}S=!1}i.exports=P;function P(j){T.push(j)===1&&!S&&u()}}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(r,i,o){"use strict";var s=r(1);function a(){}var u={},d=["REJECTED"],m=["FULFILLED"],h=["PENDING"];i.exports=E;function E(U){if(typeof U!="function")throw new TypeError("resolver must be a function");this.state=h,this.queue=[],this.outcome=void 0,U!==a&&P(this,U)}E.prototype.catch=function(U){return this.then(null,U)},E.prototype.then=function(U,fe){if(typeof U!="function"&&this.state===m||typeof fe!="function"&&this.state===d)return this;var ne=new this.constructor(a);if(this.state!==h){var Ee=this.state===m?U:fe;T(ne,Ee,this.outcome)}else this.queue.push(new S(ne,U,fe));return ne};function S(U,fe,ne){this.promise=U,typeof fe=="function"&&(this.onFulfilled=fe,this.callFulfilled=this.otherCallFulfilled),typeof ne=="function"&&(this.onRejected=ne,this.callRejected=this.otherCallRejected)}S.prototype.callFulfilled=function(U){u.resolve(this.promise,U)},S.prototype.otherCallFulfilled=function(U){T(this.promise,this.onFulfilled,U)},S.prototype.callRejected=function(U){u.reject(this.promise,U)},S.prototype.otherCallRejected=function(U){T(this.promise,this.onRejected,U)};function T(U,fe,ne){s(function(){var Ee;try{Ee=fe(ne)}catch(Le){return u.reject(U,Le)}Ee===U?u.reject(U,new TypeError("Cannot resolve promise with itself")):u.resolve(U,Ee)})}u.resolve=function(U,fe){var ne=j(k,fe);if(ne.status==="error")return u.reject(U,ne.value);var Ee=ne.value;if(Ee)P(U,Ee);else{U.state=m,U.outcome=fe;for(var Le=-1,De=U.queue.length;++Le<De;)U.queue[Le].callFulfilled(fe)}return U},u.reject=function(U,fe){U.state=d,U.outcome=fe;for(var ne=-1,Ee=U.queue.length;++ne<Ee;)U.queue[ne].callRejected(fe);return U};function k(U){var fe=U&&U.then;if(U&&(typeof U=="object"||typeof U=="function")&&typeof fe=="function")return function(){fe.apply(U,arguments)}}function P(U,fe){var ne=!1;function Ee(Ke){ne||(ne=!0,u.reject(U,Ke))}function Le(Ke){ne||(ne=!0,u.resolve(U,Ke))}function De(){fe(Le,Ee)}var Re=j(De);Re.status==="error"&&Ee(Re.value)}function j(U,fe){var ne={};try{ne.value=U(fe),ne.status="success"}catch(Ee){ne.status="error",ne.value=Ee}return ne}E.resolve=Y;function Y(U){return U instanceof this?U:u.resolve(new this(a),U)}E.reject=ee;function ee(U){var fe=new this(a);return u.reject(fe,U)}E.all=K;function K(U){var fe=this;if(Object.prototype.toString.call(U)!=="[object Array]")return this.reject(new TypeError("must be an array"));var ne=U.length,Ee=!1;if(!ne)return this.resolve([]);for(var Le=new Array(ne),De=0,Re=-1,Ke=new this(a);++Re<ne;)Xe(U[Re],Re);return Ke;function Xe(_t,R){fe.resolve(_t).then(D,function(F){Ee||(Ee=!0,u.reject(Ke,F))});function D(F){Le[R]=F,++De===ne&&!Ee&&(Ee=!0,u.resolve(Ke,Le))}}}E.race=ge;function ge(U){var fe=this;if(Object.prototype.toString.call(U)!=="[object Array]")return this.reject(new TypeError("must be an array"));var ne=U.length,Ee=!1;if(!ne)return this.resolve([]);for(var Le=-1,De=new this(a);++Le<ne;)Re(U[Le]);return De;function Re(Ke){fe.resolve(Ke).then(function(Xe){Ee||(Ee=!0,u.resolve(De,Xe))},function(Xe){Ee||(Ee=!0,u.reject(De,Xe))})}}},{1:1}],3:[function(r,i,o){(function(s){"use strict";typeof s.Promise!="function"&&(s.Promise=r(2))}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(r,i,o){"use strict";var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(f){return typeof f}:function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f};function a(f,w){if(!(f instanceof w))throw new TypeError("Cannot call a class as a function")}function u(){try{if(typeof indexedDB<"u")return indexedDB;if(typeof webkitIndexedDB<"u")return webkitIndexedDB;if(typeof mozIndexedDB<"u")return mozIndexedDB;if(typeof OIndexedDB<"u")return OIndexedDB;if(typeof msIndexedDB<"u")return msIndexedDB}catch{return}}var d=u();function m(){try{if(!d||!d.open)return!1;var f=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),w=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!f||w)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function h(f,w){f=f||[],w=w||{};try{return new Blob(f,w)}catch(b){if(b.name!=="TypeError")throw b;for(var g=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,C=new g,x=0;x<f.length;x+=1)C.append(f[x]);return C.getBlob(w.type)}}typeof Promise>"u"&&r(3);var E=Promise;function S(f,w){w&&f.then(function(g){w(null,g)},function(g){w(g)})}function T(f,w,g){typeof w=="function"&&f.then(w),typeof g=="function"&&f.catch(g)}function k(f){return typeof f!="string"&&(console.warn(f+" used as a key, but it is not a string."),f=String(f)),f}function P(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var j="local-forage-detect-blob-support",Y=void 0,ee={},K=Object.prototype.toString,ge="readonly",U="readwrite";function fe(f){for(var w=f.length,g=new ArrayBuffer(w),C=new Uint8Array(g),x=0;x<w;x++)C[x]=f.charCodeAt(x);return g}function ne(f){return new E(function(w){var g=f.transaction(j,U),C=h([""]);g.objectStore(j).put(C,"key"),g.onabort=function(x){x.preventDefault(),x.stopPropagation(),w(!1)},g.oncomplete=function(){var x=navigator.userAgent.match(/Chrome\/(\d+)/),b=navigator.userAgent.match(/Edge\//);w(b||!x||parseInt(x[1],10)>=43)}}).catch(function(){return!1})}function Ee(f){return typeof Y=="boolean"?E.resolve(Y):ne(f).then(function(w){return Y=w,Y})}function Le(f){var w=ee[f.name],g={};g.promise=new E(function(C,x){g.resolve=C,g.reject=x}),w.deferredOperations.push(g),w.dbReady?w.dbReady=w.dbReady.then(function(){return g.promise}):w.dbReady=g.promise}function De(f){var w=ee[f.name],g=w.deferredOperations.pop();if(g)return g.resolve(),g.promise}function Re(f,w){var g=ee[f.name],C=g.deferredOperations.pop();if(C)return C.reject(w),C.promise}function Ke(f,w){return new E(function(g,C){if(ee[f.name]=ee[f.name]||Z(),f.db)if(w)Le(f),f.db.close();else return g(f.db);var x=[f.name];w&&x.push(f.version);var b=d.open.apply(d,x);w&&(b.onupgradeneeded=function(M){var B=b.result;try{B.createObjectStore(f.storeName),M.oldVersion<=1&&B.createObjectStore(j)}catch($){if($.name==="ConstraintError")console.warn('The database "'+f.name+'" has been upgraded from version '+M.oldVersion+" to version "+M.newVersion+', but the storage "'+f.storeName+'" already exists.');else throw $}}),b.onerror=function(M){M.preventDefault(),C(b.error)},b.onsuccess=function(){var M=b.result;M.onversionchange=function(B){B.target.close()},g(M),De(f)}})}function Xe(f){return Ke(f,!1)}function _t(f){return Ke(f,!0)}function R(f,w){if(!f.db)return!0;var g=!f.db.objectStoreNames.contains(f.storeName),C=f.version<f.db.version,x=f.version>f.db.version;if(C&&(f.version!==w&&console.warn('The database "'+f.name+`" can't be downgraded from version `+f.db.version+" to version "+f.version+"."),f.version=f.db.version),x||g){if(g){var b=f.db.version+1;b>f.version&&(f.version=b)}return!0}return!1}function D(f){return new E(function(w,g){var C=new FileReader;C.onerror=g,C.onloadend=function(x){var b=btoa(x.target.result||"");w({__local_forage_encoded_blob:!0,data:b,type:f.type})},C.readAsBinaryString(f)})}function F(f){var w=fe(atob(f.data));return h([w],{type:f.type})}function L(f){return f&&f.__local_forage_encoded_blob}function v(f){var w=this,g=w._initReady().then(function(){var C=ee[w._dbInfo.name];if(C&&C.dbReady)return C.dbReady});return T(g,f,f),g}function y(f){Le(f);for(var w=ee[f.name],g=w.forages,C=0;C<g.length;C++){var x=g[C];x._dbInfo.db&&(x._dbInfo.db.close(),x._dbInfo.db=null)}return f.db=null,Xe(f).then(function(b){return f.db=b,R(f)?_t(f):b}).then(function(b){f.db=w.db=b;for(var M=0;M<g.length;M++)g[M]._dbInfo.db=b}).catch(function(b){throw Re(f,b),b})}function H(f,w,g,C){C===void 0&&(C=1);try{var x=f.db.transaction(f.storeName,w);g(null,x)}catch(b){if(C>0&&(!f.db||b.name==="InvalidStateError"||b.name==="NotFoundError"))return E.resolve().then(function(){if(!f.db||b.name==="NotFoundError"&&!f.db.objectStoreNames.contains(f.storeName)&&f.version<=f.db.version)return f.db&&(f.version=f.db.version+1),_t(f)}).then(function(){return y(f).then(function(){H(f,w,g,C-1)})}).catch(g);g(b)}}function Z(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function re(f){var w=this,g={db:null};if(f)for(var C in f)g[C]=f[C];var x=ee[g.name];x||(x=Z(),ee[g.name]=x),x.forages.push(w),w._initReady||(w._initReady=w.ready,w.ready=v);var b=[];function M(){return E.resolve()}for(var B=0;B<x.forages.length;B++){var $=x.forages[B];$!==w&&b.push($._initReady().catch(M))}var G=x.forages.slice(0);return E.all(b).then(function(){return g.db=x.db,Xe(g)}).then(function(z){return g.db=z,R(g,w._defaultConfig.version)?_t(g):z}).then(function(z){g.db=x.db=z,w._dbInfo=g;for(var ie=0;ie<G.length;ie++){var Ce=G[ie];Ce!==w&&(Ce._dbInfo.db=g.db,Ce._dbInfo.version=g.version)}})}function oe(f,w){var g=this;f=k(f);var C=new E(function(x,b){g.ready().then(function(){H(g._dbInfo,ge,function(M,B){if(M)return b(M);try{var $=B.objectStore(g._dbInfo.storeName),G=$.get(f);G.onsuccess=function(){var z=G.result;z===void 0&&(z=null),L(z)&&(z=F(z)),x(z)},G.onerror=function(){b(G.error)}}catch(z){b(z)}})}).catch(b)});return S(C,w),C}function ue(f,w){var g=this,C=new E(function(x,b){g.ready().then(function(){H(g._dbInfo,ge,function(M,B){if(M)return b(M);try{var $=B.objectStore(g._dbInfo.storeName),G=$.openCursor(),z=1;G.onsuccess=function(){var ie=G.result;if(ie){var Ce=ie.value;L(Ce)&&(Ce=F(Ce));var Be=f(Ce,ie.key,z++);Be!==void 0?x(Be):ie.continue()}else x()},G.onerror=function(){b(G.error)}}catch(ie){b(ie)}})}).catch(b)});return S(C,w),C}function Q(f,w,g){var C=this;f=k(f);var x=new E(function(b,M){var B;C.ready().then(function(){return B=C._dbInfo,K.call(w)==="[object Blob]"?Ee(B.db).then(function($){return $?w:D(w)}):w}).then(function($){H(C._dbInfo,U,function(G,z){if(G)return M(G);try{var ie=z.objectStore(C._dbInfo.storeName);$===null&&($=void 0);var Ce=ie.put($,f);z.oncomplete=function(){$===void 0&&($=null),b($)},z.onabort=z.onerror=function(){var Be=Ce.error?Ce.error:Ce.transaction.error;M(Be)}}catch(Be){M(Be)}})}).catch(M)});return S(x,g),x}function ae(f,w){var g=this;f=k(f);var C=new E(function(x,b){g.ready().then(function(){H(g._dbInfo,U,function(M,B){if(M)return b(M);try{var $=B.objectStore(g._dbInfo.storeName),G=$.delete(f);B.oncomplete=function(){x()},B.onerror=function(){b(G.error)},B.onabort=function(){var z=G.error?G.error:G.transaction.error;b(z)}}catch(z){b(z)}})}).catch(b)});return S(C,w),C}function te(f){var w=this,g=new E(function(C,x){w.ready().then(function(){H(w._dbInfo,U,function(b,M){if(b)return x(b);try{var B=M.objectStore(w._dbInfo.storeName),$=B.clear();M.oncomplete=function(){C()},M.onabort=M.onerror=function(){var G=$.error?$.error:$.transaction.error;x(G)}}catch(G){x(G)}})}).catch(x)});return S(g,f),g}function de(f){var w=this,g=new E(function(C,x){w.ready().then(function(){H(w._dbInfo,ge,function(b,M){if(b)return x(b);try{var B=M.objectStore(w._dbInfo.storeName),$=B.count();$.onsuccess=function(){C($.result)},$.onerror=function(){x($.error)}}catch(G){x(G)}})}).catch(x)});return S(g,f),g}function ce(f,w){var g=this,C=new E(function(x,b){if(f<0){x(null);return}g.ready().then(function(){H(g._dbInfo,ge,function(M,B){if(M)return b(M);try{var $=B.objectStore(g._dbInfo.storeName),G=!1,z=$.openKeyCursor();z.onsuccess=function(){var ie=z.result;if(!ie){x(null);return}f===0||G?x(ie.key):(G=!0,ie.advance(f))},z.onerror=function(){b(z.error)}}catch(ie){b(ie)}})}).catch(b)});return S(C,w),C}function he(f){var w=this,g=new E(function(C,x){w.ready().then(function(){H(w._dbInfo,ge,function(b,M){if(b)return x(b);try{var B=M.objectStore(w._dbInfo.storeName),$=B.openKeyCursor(),G=[];$.onsuccess=function(){var z=$.result;if(!z){C(G);return}G.push(z.key),z.continue()},$.onerror=function(){x($.error)}}catch(z){x(z)}})}).catch(x)});return S(g,f),g}function pe(f,w){w=P.apply(this,arguments);var g=this.config();f=typeof f!="function"&&f||{},f.name||(f.name=f.name||g.name,f.storeName=f.storeName||g.storeName);var C=this,x;if(!f.name)x=E.reject("Invalid arguments");else{var b=f.name===g.name&&C._dbInfo.db,M=b?E.resolve(C._dbInfo.db):Xe(f).then(function(B){var $=ee[f.name],G=$.forages;$.db=B;for(var z=0;z<G.length;z++)G[z]._dbInfo.db=B;return B});f.storeName?x=M.then(function(B){if(B.objectStoreNames.contains(f.storeName)){var $=B.version+1;Le(f);var G=ee[f.name],z=G.forages;B.close();for(var ie=0;ie<z.length;ie++){var Ce=z[ie];Ce._dbInfo.db=null,Ce._dbInfo.version=$}var Be=new E(function(Ue,lt){var it=d.open(f.name,$);it.onerror=function(Zt){var gi=it.result;gi.close(),lt(Zt)},it.onupgradeneeded=function(){var Zt=it.result;Zt.deleteObjectStore(f.storeName)},it.onsuccess=function(){var Zt=it.result;Zt.close(),Ue(Zt)}});return Be.then(function(Ue){G.db=Ue;for(var lt=0;lt<z.length;lt++){var it=z[lt];it._dbInfo.db=Ue,De(it._dbInfo)}}).catch(function(Ue){throw(Re(f,Ue)||E.resolve()).catch(function(){}),Ue})}}):x=M.then(function(B){Le(f);var $=ee[f.name],G=$.forages;B.close();for(var z=0;z<G.length;z++){var ie=G[z];ie._dbInfo.db=null}var Ce=new E(function(Be,Ue){var lt=d.deleteDatabase(f.name);lt.onerror=function(){var it=lt.result;it&&it.close(),Ue(lt.error)},lt.onblocked=function(){console.warn('dropInstance blocked for database "'+f.name+'" until all open connections are closed')},lt.onsuccess=function(){var it=lt.result;it&&it.close(),Be(it)}});return Ce.then(function(Be){$.db=Be;for(var Ue=0;Ue<G.length;Ue++){var lt=G[Ue];De(lt._dbInfo)}}).catch(function(Be){throw(Re(f,Be)||E.resolve()).catch(function(){}),Be})})}return S(x,w),x}var me={_driver:"asyncStorage",_initStorage:re,_support:m(),iterate:ue,getItem:oe,setItem:Q,removeItem:ae,clear:te,length:de,key:ce,keys:he,dropInstance:pe};function p(){return typeof openDatabase=="function"}var c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l="~~local_forage_type~",_=/^~~local_forage_type~([^~]+)~/,I="__lfsc__:",A=I.length,V="arbf",ve="blob",Se="si08",ye="ui08",Fe="uic8",Ve="si16",Qe="si32",jt="ur16",qt="ui32",Ln="fl32",Dt="fl64",$t=A+V.length,Ji=Object.prototype.toString;function Gl(f){var w=f.length*.75,g=f.length,C,x=0,b,M,B,$;f[f.length-1]==="="&&(w--,f[f.length-2]==="="&&w--);var G=new ArrayBuffer(w),z=new Uint8Array(G);for(C=0;C<g;C+=4)b=c.indexOf(f[C]),M=c.indexOf(f[C+1]),B=c.indexOf(f[C+2]),$=c.indexOf(f[C+3]),z[x++]=b<<2|M>>4,z[x++]=(M&15)<<4|B>>2,z[x++]=(B&3)<<6|$&63;return G}function Bs(f){var w=new Uint8Array(f),g="",C;for(C=0;C<w.length;C+=3)g+=c[w[C]>>2],g+=c[(w[C]&3)<<4|w[C+1]>>4],g+=c[(w[C+1]&15)<<2|w[C+2]>>6],g+=c[w[C+2]&63];return w.length%3===2?g=g.substring(0,g.length-1)+"=":w.length%3===1&&(g=g.substring(0,g.length-2)+"=="),g}function wp(f,w){var g="";if(f&&(g=Ji.call(f)),f&&(g==="[object ArrayBuffer]"||f.buffer&&Ji.call(f.buffer)==="[object ArrayBuffer]")){var C,x=I;f instanceof ArrayBuffer?(C=f,x+=V):(C=f.buffer,g==="[object Int8Array]"?x+=Se:g==="[object Uint8Array]"?x+=ye:g==="[object Uint8ClampedArray]"?x+=Fe:g==="[object Int16Array]"?x+=Ve:g==="[object Uint16Array]"?x+=jt:g==="[object Int32Array]"?x+=Qe:g==="[object Uint32Array]"?x+=qt:g==="[object Float32Array]"?x+=Ln:g==="[object Float64Array]"?x+=Dt:w(new Error("Failed to get type for BinaryArray"))),w(x+Bs(C))}else if(g==="[object Blob]"){var b=new FileReader;b.onload=function(){var M=l+f.type+"~"+Bs(this.result);w(I+ve+M)},b.readAsArrayBuffer(f)}else try{w(JSON.stringify(f))}catch(M){console.error("Couldn't convert value into a JSON string: ",f),w(null,M)}}function bp(f){if(f.substring(0,A)!==I)return JSON.parse(f);var w=f.substring($t),g=f.substring(A,$t),C;if(g===ve&&_.test(w)){var x=w.match(_);C=x[1],w=w.substring(x[0].length)}var b=Gl(w);switch(g){case V:return b;case ve:return h([b],{type:C});case Se:return new Int8Array(b);case ye:return new Uint8Array(b);case Fe:return new Uint8ClampedArray(b);case Ve:return new Int16Array(b);case jt:return new Uint16Array(b);case Qe:return new Int32Array(b);case qt:return new Uint32Array(b);case Ln:return new Float32Array(b);case Dt:return new Float64Array(b);default:throw new Error("Unkown type: "+g)}}var Us={serialize:wp,deserialize:bp,stringToBuffer:Gl,bufferToString:Bs};function Wl(f,w,g,C){f.executeSql("CREATE TABLE IF NOT EXISTS "+w.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],g,C)}function Sp(f){var w=this,g={db:null};if(f)for(var C in f)g[C]=typeof f[C]!="string"?f[C].toString():f[C];var x=new E(function(b,M){try{g.db=openDatabase(g.name,String(g.version),g.description,g.size)}catch(B){return M(B)}g.db.transaction(function(B){Wl(B,g,function(){w._dbInfo=g,b()},function($,G){M(G)})},M)});return g.serializer=Us,x}function Yn(f,w,g,C,x,b){f.executeSql(g,C,x,function(M,B){B.code===B.SYNTAX_ERR?M.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[w.storeName],function($,G){G.rows.length?b($,B):Wl($,w,function(){$.executeSql(g,C,x,b)},b)},b):b(M,B)},b)}function Cp(f,w){var g=this;f=k(f);var C=new E(function(x,b){g.ready().then(function(){var M=g._dbInfo;M.db.transaction(function(B){Yn(B,M,"SELECT * FROM "+M.storeName+" WHERE key = ? LIMIT 1",[f],function($,G){var z=G.rows.length?G.rows.item(0).value:null;z&&(z=M.serializer.deserialize(z)),x(z)},function($,G){b(G)})})}).catch(b)});return S(C,w),C}function Ip(f,w){var g=this,C=new E(function(x,b){g.ready().then(function(){var M=g._dbInfo;M.db.transaction(function(B){Yn(B,M,"SELECT * FROM "+M.storeName,[],function($,G){for(var z=G.rows,ie=z.length,Ce=0;Ce<ie;Ce++){var Be=z.item(Ce),Ue=Be.value;if(Ue&&(Ue=M.serializer.deserialize(Ue)),Ue=f(Ue,Be.key,Ce+1),Ue!==void 0){x(Ue);return}}x()},function($,G){b(G)})})}).catch(b)});return S(C,w),C}function zl(f,w,g,C){var x=this;f=k(f);var b=new E(function(M,B){x.ready().then(function(){w===void 0&&(w=null);var $=w,G=x._dbInfo;G.serializer.serialize(w,function(z,ie){ie?B(ie):G.db.transaction(function(Ce){Yn(Ce,G,"INSERT OR REPLACE INTO "+G.storeName+" (key, value) VALUES (?, ?)",[f,z],function(){M($)},function(Be,Ue){B(Ue)})},function(Ce){if(Ce.code===Ce.QUOTA_ERR){if(C>0){M(zl.apply(x,[f,$,g,C-1]));return}B(Ce)}})})}).catch(B)});return S(b,g),b}function xp(f,w,g){return zl.apply(this,[f,w,g,1])}function Dp(f,w){var g=this;f=k(f);var C=new E(function(x,b){g.ready().then(function(){var M=g._dbInfo;M.db.transaction(function(B){Yn(B,M,"DELETE FROM "+M.storeName+" WHERE key = ?",[f],function(){x()},function($,G){b(G)})})}).catch(b)});return S(C,w),C}function Tp(f){var w=this,g=new E(function(C,x){w.ready().then(function(){var b=w._dbInfo;b.db.transaction(function(M){Yn(M,b,"DELETE FROM "+b.storeName,[],function(){C()},function(B,$){x($)})})}).catch(x)});return S(g,f),g}function Op(f){var w=this,g=new E(function(C,x){w.ready().then(function(){var b=w._dbInfo;b.db.transaction(function(M){Yn(M,b,"SELECT COUNT(key) as c FROM "+b.storeName,[],function(B,$){var G=$.rows.item(0).c;C(G)},function(B,$){x($)})})}).catch(x)});return S(g,f),g}function Rp(f,w){var g=this,C=new E(function(x,b){g.ready().then(function(){var M=g._dbInfo;M.db.transaction(function(B){Yn(B,M,"SELECT key FROM "+M.storeName+" WHERE id = ? LIMIT 1",[f+1],function($,G){var z=G.rows.length?G.rows.item(0).key:null;x(z)},function($,G){b(G)})})}).catch(b)});return S(C,w),C}function Ap(f){var w=this,g=new E(function(C,x){w.ready().then(function(){var b=w._dbInfo;b.db.transaction(function(M){Yn(M,b,"SELECT key FROM "+b.storeName,[],function(B,$){for(var G=[],z=0;z<$.rows.length;z++)G.push($.rows.item(z).key);C(G)},function(B,$){x($)})})}).catch(x)});return S(g,f),g}function Np(f){return new E(function(w,g){f.transaction(function(C){C.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(x,b){for(var M=[],B=0;B<b.rows.length;B++)M.push(b.rows.item(B).name);w({db:f,storeNames:M})},function(x,b){g(b)})},function(C){g(C)})})}function Pp(f,w){w=P.apply(this,arguments);var g=this.config();f=typeof f!="function"&&f||{},f.name||(f.name=f.name||g.name,f.storeName=f.storeName||g.storeName);var C=this,x;return f.name?x=new E(function(b){var M;f.name===g.name?M=C._dbInfo.db:M=openDatabase(f.name,"","",0),f.storeName?b({db:M,storeNames:[f.storeName]}):b(Np(M))}).then(function(b){return new E(function(M,B){b.db.transaction(function($){function G(Be){return new E(function(Ue,lt){$.executeSql("DROP TABLE IF EXISTS "+Be,[],function(){Ue()},function(it,Zt){lt(Zt)})})}for(var z=[],ie=0,Ce=b.storeNames.length;ie<Ce;ie++)z.push(G(b.storeNames[ie]));E.all(z).then(function(){M()}).catch(function(Be){B(Be)})},function($){B($)})})}):x=E.reject("Invalid arguments"),S(x,w),x}var Mp={_driver:"webSQLStorage",_initStorage:Sp,_support:p(),iterate:Ip,getItem:Cp,setItem:xp,removeItem:Dp,clear:Tp,length:Op,key:Rp,keys:Ap,dropInstance:Pp};function kp(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function Yl(f,w){var g=f.name+"/";return f.storeName!==w.storeName&&(g+=f.storeName+"/"),g}function Lp(){var f="_localforage_support_test";try{return localStorage.setItem(f,!0),localStorage.removeItem(f),!1}catch{return!0}}function Fp(){return!Lp()||localStorage.length>0}function Vp(f){var w=this,g={};if(f)for(var C in f)g[C]=f[C];return g.keyPrefix=Yl(f,w._defaultConfig),Fp()?(w._dbInfo=g,g.serializer=Us,E.resolve()):E.reject()}function Bp(f){var w=this,g=w.ready().then(function(){for(var C=w._dbInfo.keyPrefix,x=localStorage.length-1;x>=0;x--){var b=localStorage.key(x);b.indexOf(C)===0&&localStorage.removeItem(b)}});return S(g,f),g}function Up(f,w){var g=this;f=k(f);var C=g.ready().then(function(){var x=g._dbInfo,b=localStorage.getItem(x.keyPrefix+f);return b&&(b=x.serializer.deserialize(b)),b});return S(C,w),C}function Hp(f,w){var g=this,C=g.ready().then(function(){for(var x=g._dbInfo,b=x.keyPrefix,M=b.length,B=localStorage.length,$=1,G=0;G<B;G++){var z=localStorage.key(G);if(z.indexOf(b)===0){var ie=localStorage.getItem(z);if(ie&&(ie=x.serializer.deserialize(ie)),ie=f(ie,z.substring(M),$++),ie!==void 0)return ie}}});return S(C,w),C}function jp(f,w){var g=this,C=g.ready().then(function(){var x=g._dbInfo,b;try{b=localStorage.key(f)}catch{b=null}return b&&(b=b.substring(x.keyPrefix.length)),b});return S(C,w),C}function $p(f){var w=this,g=w.ready().then(function(){for(var C=w._dbInfo,x=localStorage.length,b=[],M=0;M<x;M++){var B=localStorage.key(M);B.indexOf(C.keyPrefix)===0&&b.push(B.substring(C.keyPrefix.length))}return b});return S(g,f),g}function Gp(f){var w=this,g=w.keys().then(function(C){return C.length});return S(g,f),g}function Wp(f,w){var g=this;f=k(f);var C=g.ready().then(function(){var x=g._dbInfo;localStorage.removeItem(x.keyPrefix+f)});return S(C,w),C}function zp(f,w,g){var C=this;f=k(f);var x=C.ready().then(function(){w===void 0&&(w=null);var b=w;return new E(function(M,B){var $=C._dbInfo;$.serializer.serialize(w,function(G,z){if(z)B(z);else try{localStorage.setItem($.keyPrefix+f,G),M(b)}catch(ie){(ie.name==="QuotaExceededError"||ie.name==="NS_ERROR_DOM_QUOTA_REACHED")&&B(ie),B(ie)}})})});return S(x,g),x}function Yp(f,w){if(w=P.apply(this,arguments),f=typeof f!="function"&&f||{},!f.name){var g=this.config();f.name=f.name||g.name,f.storeName=f.storeName||g.storeName}var C=this,x;return f.name?x=new E(function(b){f.storeName?b(Yl(f,C._defaultConfig)):b(f.name+"/")}).then(function(b){for(var M=localStorage.length-1;M>=0;M--){var B=localStorage.key(M);B.indexOf(b)===0&&localStorage.removeItem(B)}}):x=E.reject("Invalid arguments"),S(x,w),x}var Kp={_driver:"localStorageWrapper",_initStorage:Vp,_support:kp(),iterate:Hp,getItem:Up,setItem:zp,removeItem:Wp,clear:Bp,length:Gp,key:jp,keys:$p,dropInstance:Yp},Xp=function(w,g){return w===g||typeof w=="number"&&typeof g=="number"&&isNaN(w)&&isNaN(g)},qp=function(w,g){for(var C=w.length,x=0;x<C;){if(Xp(w[x],g))return!0;x++}return!1},Kl=Array.isArray||function(f){return Object.prototype.toString.call(f)==="[object Array]"},mi={},Xl={},Dr={INDEXEDDB:me,WEBSQL:Mp,LOCALSTORAGE:Kp},Zp=[Dr.INDEXEDDB._driver,Dr.WEBSQL._driver,Dr.LOCALSTORAGE._driver],Qi=["dropInstance"],Hs=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(Qi),Jp={description:"",driver:Zp.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function Qp(f,w){f[w]=function(){var g=arguments;return f.ready().then(function(){return f[w].apply(f,g)})}}function js(){for(var f=1;f<arguments.length;f++){var w=arguments[f];if(w)for(var g in w)w.hasOwnProperty(g)&&(Kl(w[g])?arguments[0][g]=w[g].slice():arguments[0][g]=w[g])}return arguments[0]}var em=function(){function f(w){a(this,f);for(var g in Dr)if(Dr.hasOwnProperty(g)){var C=Dr[g],x=C._driver;this[g]=x,mi[x]||this.defineDriver(C)}this._defaultConfig=js({},Jp),this._config=js({},this._defaultConfig,w),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return f.prototype.config=function(g){if((typeof g>"u"?"undefined":s(g))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var C in g){if(C==="storeName"&&(g[C]=g[C].replace(/\W/g,"_")),C==="version"&&typeof g[C]!="number")return new Error("Database version must be a number.");this._config[C]=g[C]}return"driver"in g&&g.driver?this.setDriver(this._config.driver):!0}else return typeof g=="string"?this._config[g]:this._config},f.prototype.defineDriver=function(g,C,x){var b=new E(function(M,B){try{var $=g._driver,G=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!g._driver){B(G);return}for(var z=Hs.concat("_initStorage"),ie=0,Ce=z.length;ie<Ce;ie++){var Be=z[ie],Ue=!qp(Qi,Be);if((Ue||g[Be])&&typeof g[Be]!="function"){B(G);return}}var lt=function(){for(var gi=function(rm){return function(){var im=new Error("Method "+rm+" is not implemented by the current driver"),ql=E.reject(im);return S(ql,arguments[arguments.length-1]),ql}},$s=0,nm=Qi.length;$s<nm;$s++){var Gs=Qi[$s];g[Gs]||(g[Gs]=gi(Gs))}};lt();var it=function(gi){mi[$]&&console.info("Redefining LocalForage driver: "+$),mi[$]=g,Xl[$]=gi,M()};"_support"in g?g._support&&typeof g._support=="function"?g._support().then(it,B):it(!!g._support):it(!0)}catch(Zt){B(Zt)}});return T(b,C,x),b},f.prototype.driver=function(){return this._driver||null},f.prototype.getDriver=function(g,C,x){var b=mi[g]?E.resolve(mi[g]):E.reject(new Error("Driver not found."));return T(b,C,x),b},f.prototype.getSerializer=function(g){var C=E.resolve(Us);return T(C,g),C},f.prototype.ready=function(g){var C=this,x=C._driverSet.then(function(){return C._ready===null&&(C._ready=C._initDriver()),C._ready});return T(x,g,g),x},f.prototype.setDriver=function(g,C,x){var b=this;Kl(g)||(g=[g]);var M=this._getSupportedDrivers(g);function B(){b._config.driver=b.driver()}function $(ie){return b._extend(ie),B(),b._ready=b._initStorage(b._config),b._ready}function G(ie){return function(){var Ce=0;function Be(){for(;Ce<ie.length;){var Ue=ie[Ce];return Ce++,b._dbInfo=null,b._ready=null,b.getDriver(Ue).then($).catch(Be)}B();var lt=new Error("No available storage method found.");return b._driverSet=E.reject(lt),b._driverSet}return Be()}}var z=this._driverSet!==null?this._driverSet.catch(function(){return E.resolve()}):E.resolve();return this._driverSet=z.then(function(){var ie=M[0];return b._dbInfo=null,b._ready=null,b.getDriver(ie).then(function(Ce){b._driver=Ce._driver,B(),b._wrapLibraryMethodsWithReady(),b._initDriver=G(M)})}).catch(function(){B();var ie=new Error("No available storage method found.");return b._driverSet=E.reject(ie),b._driverSet}),T(this._driverSet,C,x),this._driverSet},f.prototype.supports=function(g){return!!Xl[g]},f.prototype._extend=function(g){js(this,g)},f.prototype._getSupportedDrivers=function(g){for(var C=[],x=0,b=g.length;x<b;x++){var M=g[x];this.supports(M)&&C.push(M)}return C},f.prototype._wrapLibraryMethodsWithReady=function(){for(var g=0,C=Hs.length;g<C;g++)Qp(this,Hs[g])},f.prototype.createInstance=function(g){return new f(g)},f}(),tm=new em;i.exports=tm},{3:3}]},{},[4])(4)})});var sm={schedule(t,e){let n=setTimeout(t,e);return()=>clearTimeout(n)}};function am(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function cm(t){return!!t&&t.nodeType===Node.ELEMENT_NODE}var ra;function lm(t,e){if(!ra){let n=Element.prototype;ra=n.matches||n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector}return t.nodeType===Node.ELEMENT_NODE?ra.call(t,e):!1}function um(t){let e={};return t.forEach(({propName:n,templateName:r,transform:i})=>{e[am(r)]=[n,i]}),e}function dm(t,e){return e.get(Zs).resolveComponentFactory(t).inputs}function fm(t,e){let n=t.childNodes,r=e.map(()=>[]),i=-1;e.some((o,s)=>o==="*"?(i=s,!0):!1);for(let o=0,s=n.length;o<s;++o){let a=n[o],u=hm(a,e,i);u!==-1&&r[u].push(a)}return r}function hm(t,e,n){let r=n;return cm(t)&&e.some((i,o)=>i!=="*"&&lm(t,i)?(r=o,!0):!1),r}var pm=10,ia=class{componentFactory;inputMap=new Map;constructor(e,n){this.componentFactory=n.get(Zs).resolveComponentFactory(e);for(let r of this.componentFactory.inputs)this.inputMap.set(r.propName,r.templateName)}create(e){return new oa(this.componentFactory,e,this.inputMap)}},oa=class{componentFactory;injector;inputMap;eventEmitters=new Jl(1);events=this.eventEmitters.pipe(yi(e=>ir(...e)));componentRef=null;scheduledDestroyFn=null;initialInputValues=new Map;ngZone;elementZone;appRef;cdScheduler;constructor(e,n,r){this.componentFactory=e,this.injector=n,this.inputMap=r,this.ngZone=this.injector.get(ot),this.appRef=this.injector.get(Pr),this.cdScheduler=n.get(uu),this.elementZone=typeof Zone>"u"?null:this.ngZone.run(()=>Zone.current)}connect(e){this.runInZone(()=>{if(this.scheduledDestroyFn!==null){this.scheduledDestroyFn(),this.scheduledDestroyFn=null;return}this.componentRef===null&&this.initializeComponent(e)})}disconnect(){this.runInZone(()=>{this.componentRef===null||this.scheduledDestroyFn!==null||(this.scheduledDestroyFn=sm.schedule(()=>{this.componentRef!==null&&(this.componentRef.destroy(),this.componentRef=null)},pm))})}getInputValue(e){return this.runInZone(()=>this.componentRef===null?this.initialInputValues.get(e):this.componentRef.instance[e])}setInputValue(e,n){if(this.componentRef===null){this.initialInputValues.set(e,n);return}this.runInZone(()=>{this.componentRef.setInput(this.inputMap.get(e)??e,n),this.componentRef.hostView.dirty&&(this.componentRef.changeDetectorRef.markForRefresh(),this.cdScheduler.notify(6))})}initializeComponent(e){let n=ht.create({providers:[],parent:this.injector}),r=fm(e,this.componentFactory.ngContentSelectors);this.componentRef=this.componentFactory.create(n,r,e),this.initializeInputs(),this.initializeOutputs(this.componentRef),this.appRef.attachView(this.componentRef.hostView),this.componentRef.hostView.detectChanges()}initializeInputs(){for(let[e,n]of this.initialInputValues)this.setInputValue(e,n);this.initialInputValues.clear()}initializeOutputs(e){let n=this.componentFactory.outputs.map(({propName:r,templateName:i})=>{let o=e.instance[r];return new rr(s=>{let a=o.subscribe(u=>s.next({name:i,value:u}));return()=>a.unsubscribe()})});this.eventEmitters.next(n)}runInZone(e){return this.elementZone&&Zone.current!==this.elementZone?this.ngZone.run(e):e()}},sa=class extends HTMLElement{ngElementEventsSubscription=null};function Au(t,e){let n=dm(t,e.injector),r=e.strategyFactory||new ia(t,e.injector),i=um(n);class o extends sa{injector;static observedAttributes=Object.keys(i);get ngElementStrategy(){if(!this._ngElementStrategy){let a=this._ngElementStrategy=r.create(this.injector||e.injector);n.forEach(({propName:u,transform:d})=>{if(!this.hasOwnProperty(u))return;let m=this[u];delete this[u],a.setInputValue(u,m,d)})}return this._ngElementStrategy}_ngElementStrategy;constructor(a){super(),this.injector=a}attributeChangedCallback(a,u,d,m){let[h,E]=i[a];this.ngElementStrategy.setInputValue(h,d,E)}connectedCallback(){let a=!1;this.ngElementStrategy.events&&(this.subscribeToEvents(),a=!0),this.ngElementStrategy.connect(this),a||this.subscribeToEvents()}disconnectedCallback(){this._ngElementStrategy&&this._ngElementStrategy.disconnect(),this.ngElementEventsSubscription&&(this.ngElementEventsSubscription.unsubscribe(),this.ngElementEventsSubscription=null)}subscribeToEvents(){this.ngElementEventsSubscription=this.ngElementStrategy.events.subscribe(a=>{let u=new CustomEvent(a.name,{detail:a.value});this.dispatchEvent(u)})}}return n.forEach(({propName:s,transform:a})=>{Object.defineProperty(o.prototype,s,{get(){return this.ngElementStrategy.getInputValue(s)},set(u){this.ngElementStrategy.setInputValue(s,u,a)},configurable:!0,enumerable:!0})}),o}var Nu="9.12.4";var qe=class t{static SDK_VERSION=Nu;static SDK_VERSION_CODE;static SDK="WEB";static LOG_PREFIX="CooeeSDK";static COOEE="cooee";static SESSION_STORAGE_SCROLL_ID="sleid";static IDLE_TIME_IN_SECONDS=30*60;static IN_APP_WRAPPER_NAME="cooee-wrapper";static IN_APP_CONTAINER_NAME="cooee-container";static IN_APP_DEFAULT_PADDING=15;static EVENT_SCREEN_VIEW="CE Screen View";static EVENT_APP_BACKGROUND="CE App Background";static EVENT_TRIGGER_DISPLAYED="CE Trigger Displayed";static EVENT_CAMPAIGN_HOLDOUT="CE Campaign Holdout";static EVENT_CAMPAIGN_REJECTED="CE Campaign Rejected";static EVENT_CAMPAIGN_FAILED="CE Campaign Failed";static EVENT_TRIGGER_CLOSED="CE Trigger Closed";static EVENT_SCROLL="CE Scroll";static EVENT_TRIGGER_CLICKED="CE Trigger Clicked";static EVENT_FORM_SUBMITTED="CE Form Submitted";static EVENT_EXPERIMENT_START="CE Experiment Start";static EVENT_VIDEO_DIALOG_CLOSED="CE Video Dialog Closed";static EVENT_VIDEO_DIALOG_OPENED="CE Video Dialog Opened";static EVENT_VIDEO_CHANGE="CE Video Changed";static EVENT_LAST_VIDEO_ENDED="CE Last Video Ended";static EVENT_VIDEO_MUTED="CE Video Muted";static EVENT_VIDEO_UNMUTED="CE Video Unmuted";static EVENT_ADD_TO_CART_CLICKED="CE Add To Cart Clicked";static EVENT_VIEW_ITEM_CLICKED="CE View Item Clicked";static EVENT_MORE_ITEM_INFO_CLICKED="CE More Item Info Clicked";static EVENT_OPEN_CART_CLICKED="CE Open Cart Clicked";static EVENT_ADD_TO_CART="Add To Cart";static EVENT_REMOVE_FROM_CART="Remove From Cart";static EVENT_VIEW_ITEM="View Item";static EVENT_VIEW_CART="View Cart";static EVENT_OPEN_CART="Open Cart";static EVENT_VIEW_COLLECTION="View Collection";static EVENT_BUY_NOW_CLICKED="Buy Now Clicked";static EVENT_CHECKOUT_STARTED="Checkout Started";static EVENT_REVIEW_CLICKED="Review Clicked";static EVENT_ITEM_THUMBNAIL_CLICKED="Item Thumbnail Clicked";static JS_LOAD_WHITELIST_EVENTS=[this.EVENT_VIEW_ITEM,this.EVENT_VIEW_CART,this.EVENT_VIEW_COLLECTION];static HASH_INITIATE_CHECKOUT="initiate-checkout";static HASH_OPEN_CART_DRAWER="open-cart-drawer";static ADD_BUNDLE_CTA_INBOUND_EVENT="letscooee:inbound:cta:add-bundle";static CTA_OPEN_CART_EVENT="letscooee:outbound:open-cart";static CTA_AFTER_REFRESH_UI="letscooee:outbound:refresh-ui";static POPUP_ACTIVITY_EVENT="letscooee:outbound:popup-activities";static THIRD_PARTY_CHECKOUT_EVENT="letscooee:outbound:third-party-initiate-checkout";static CAMPAIGN_DISPLAYED_ACTIVITY="DISPLAYED";static CAMPAIGN_CLICKED_ACTIVITY="CLICKED";static CAMPAIGN_CLOSED_ACTIVITY="CLOSED";static BLACKLISTED_PAGE_NAMES=["collection","product","cart"];static API_CALL_MAX_ATTEMPTS=3;static API_CALL_RETRY_DELAY=1e3;static PLACEHOLDER_IMAGE="https://cdn.global.letscooee.com/images/placeholders/product.png";static CART_UPDATE_BROADCAST="CART_UPDATE";static GRAPHQL_VERSION="2024-10";static GRAPHQL_API_PATH=`/api/${this.GRAPHQL_VERSION}/graphql.json`;static SHADOW_SPLITTER=":shadow";static CAMPAIGN_ATTRIBUTE="_letscooee_campaign";static CONTENT_ATTRIBUTE="_letscooee_content";static VIA="_via";static PAYMENT_MODAL_DETAILS=[{identifier:"#flo-checkout-wrapper",gateway:"Shopflow"},{identifier:"#fastrr-main-container",gateway:"Shiprocket"},{identifier:"#gokwik-modal-wrapper",gateway:"Gokwik"},{identifier:"#zecpe",gateway:"Ecom 360"}];static{let e=t.SDK_VERSION.split(".").map(n=>n.padStart(2,"0")).join("");t.SDK_VERSION_CODE=parseInt(e,10)}};var jn={apiURL:"https://api.sdk.letscooee.com",debug:!1,mode:"production",styleURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${qe.SDK_VERSION}/dist/widget.min.css`,widgetURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${qe.SDK_VERSION}/dist/widget.min.js`};var zt=eo(Mu());var Ct=class{static log(...e){zt.default.info(...e)}static debug(...e){zt.default.debug(...e)}static error(...e){zt.default.error(...e)}static warn(...e){zt.default.warn(...e)}static info(...e){zt.default.info(...e)}static trace(...e){zt.default.trace(...e)}};function ku(t=qe.LOG_PREFIX){zt.default.useDefaults({formatter:function(n){n.unshift(`${t} (v${qe.SDK_VERSION}):`)}});let e=gm();(e==="1"||e==="on")&&(localStorage.cooeeLogLevel="TRACE"),localStorage.cooeeLogLevel?zt.default.setLevel(zt.default[localStorage.cooeeLogLevel]):zt.default.setLevel(jn.debug?zt.default.TRACE:zt.default.OFF)}function gm(){return new URL(location.href).searchParams?.get("cooee-debug")}var pi=eo(aa());var Fu={providers:[Su()]};var vm={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},pw=xe(O({},vm),{"[class.ng-submitted]":"isSubmitted"});var ym=new ft("",{providedIn:"root",factory:()=>Vu}),Vu="always";var Em=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=Bn({type:t});static \u0275inj=Fn({})}return t})();var Bu=(()=>{class t{static withConfig(n){return{ngModule:t,providers:[{provide:ym,useValue:n.callSetDisabledState??Vu}]}}static \u0275fac=function(r){return new(r||t)};static \u0275mod=Bn({type:t});static \u0275inj=Fn({imports:[Em]})}return t})();var en=class{static SWIPER_CSS="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css";static injectScriptURL(e,n){if(!e)return;let r=document.createElement("script");r.id=n??"",r.src=e,r.type="module",document.head.appendChild(r)}static injectRawScript(e){if(!e)return;let n=document.createElement("script");n.id="cooee-app-script",n.innerHTML=e,document.head.appendChild(n)}static injectRawCSS(e,n=document.head){if(!e)return;let r=document.createElement("style");r.textContent=e,n.appendChild(r)}static injectSwiperCSS(e=document.head){this.injectStylesheet(this.SWIPER_CSS,e)}static injectStylesheet(e,n=document.head){if(!e)return;let r=document.createElement("link");r.rel="stylesheet",r.href=e,e===this.SWIPER_CSS&&(r.crossOrigin="anonymous",r.onload=i=>{let s=i.currentTarget?.sheet?.cssRules;if(s){for(let a of s)if(a.type==CSSRule.FONT_FACE_RULE){let u=e.split("/"),d=u.slice(0,u.length-1).join("/"),m=a.cssText;m=m.replace(/url\s*\(\s*['"]?(?!((\/)|((?:https?:)?\/\/)|(?:data:?:)))([^'")]+)['"]?\s*\)/g,`url("${d}/$4")`);let h=document.createElement("style");h.appendChild(document.createTextNode(m)),document.head.appendChild(h)}}}),n.appendChild(r)}static async loadSwiperScript(){window.CooeeSDK.Swiper||(window.CooeeSDK.Swiper=(await import("https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.mjs")).Swiper)}};var Cn=class t{cooeeEvent=new He;cooeeCTA=new He;elementRef=N(ut);_engagementTrigger=Tt(null);_triggerContext=Tt(null);constructor(){this.elementRef.nativeElement.update=this.update.bind(this)}get classes(){let e=["letscooee-widget"],n=this._engagementTrigger();return e.push(`widget-${n?.shortID}`),e}get triggerContext(){return this._triggerContext()}set triggerContext(e){this._triggerContext.set(e),this._engagementTrigger.set(e.triggerData),this.engagementTriggerReceived(e.triggerData)}get engagementTrigger(){return this._engagementTrigger()}ngOnInit(){Ct.debug("Init",this.constructor.name);let e=this.elementRef.nativeElement.shadowRoot;e&&(en.injectStylesheet(jn.styleURL,e),en.injectRawCSS(window.CooeeSDK.config.website.commonCSS,e))}ngOnDestroy(){Ct.debug("Destroying",this.constructor.name)}sendEventToRenderer(e){this.cooeeEvent.emit(e)}executeCTAViaRenderer(e){this.cooeeCTA.emit(e)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Te({type:t,selectors:[["ng-component"]],hostVars:2,hostBindings:function(n,r){n&2&&_u(r.classes)},inputs:{triggerContext:"triggerContext"},outputs:{cooeeEvent:"cooeeEvent",cooeeCTA:"cooeeCTA"},decls:0,vars:0,template:function(n,r){},encapsulation:2})};var wm=(t,e,n)=>({"--option-color":t,"background-color":e,color:n}),Uu=(t,e)=>e.id;function bm(t,e){if(t&1&&(X(0,"span",6),Oe(1),q()),t&2){J();let n=Ot(0);W(),Zn(n)}}function Sm(t,e){if(t&1){let n=st();Vt(0),X(1,"button",5),Me("click",function(){let i=$e(n).$implicit,o=J().$implicit,s=J();return Ge(s.onOptionChange(o,i))}),Ae(2,bm,2,1,"span",6),q()}if(t&2){let n=e.$implicit,r=J().$implicit,i=Ot(1),o=J(),s=bn(n.name);W(),En("color-type",i)("selected",o.selectedOptions()[r.name]===s),be("disabled",n.disabled)("ngStyle",Eu(9,wm,i?s:"",i?s:"",i?"transparent":"")),yn("data-value",s),W(),Ne(i?-1:2)}}function Cm(t,e){if(t&1&&(X(0,"div"),Vt(1),X(2,"div",1),Oe(3),q(),X(4,"div",2),Oe(5),q(),X(6,"div",3),et(7,Sm,3,13,"button",4,Uu),q()()),t&2){let n=e.$implicit,r=J();vu("option-group ",n.name.toLowerCase(),""),W(),bn(n.name.toLowerCase().includes("color")),W(2),Wt("",n.name,":"),W(2),Zn(r.selectedOptions()[n.name]),W(2),tt(n.optionValues)}}var uo=class t extends Cn{selectedVariant=new He;item=du.required();selectedOptions=Tt({});options=so(()=>{let e=this.item();return!e.options||e.vars.length===1?[]:e.options});matchedVariant=so(()=>{let e=this.item(),n=this.selectedOptions();return e.vars.find(r=>e.options.every(i=>n[i.name]===r.selectedOptions.find(o=>o.name===i.name)?.value))});constructor(){super(),na(()=>{let n=this.matchedVariant();n&&(this.item().setSelectedVariant(n),this.selectedVariant.emit(n))});let e=na(()=>{let n=this.item();if(!n?.options)return;let r=O({},this.selectedOptions());n.options.forEach(i=>{let o=n.vars[0]?.selectedOptions.find(s=>s.name===i.name)?.value;o&&(r[i.name]=o)}),this.selectedOptions.set(r),e.destroy()})}onOptionChange(e,n){let r=O({},this.selectedOptions());r[e.name]=n.name,this.selectedOptions.set(r)}engagementTriggerReceived(){}update(){}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Te({type:t,selectors:[["cooee-item-options-picker"]],inputs:{item:[1,"item"]},outputs:{selectedVariant:"selectedVariant"},features:[bt],decls:2,vars:0,consts:[[3,"class"],[1,"name"],[1,"selected-value"],[1,"option-values"],[1,"option-value",3,"disabled","color-type","selected","ngStyle"],[1,"option-value",3,"click","disabled","ngStyle"],[1,"title"]],template:function(n,r){n&1&&et(0,Cm,9,6,"div",0,Uu),n&2&&tt(r.options())},dependencies:[Tu,xu,Bu],styles:[`.option-group{display:flex;gap:8px;align-items:center}.option-group+.option-group{margin-top:8px}.option-values{display:flex;flex-wrap:nowrap;overflow-x:auto;padding:6px;gap:8px}.selected-value{display:none}.option-value{padding:5px 10px;border:1px solid #ccc;cursor:pointer;border-radius:4px;min-width:32px;min-height:32px;text-align:center;position:relative;--selected-color: var(--option-color, var(--lc-color-button, rgb(var(--color-button, 0 0 0))))}.option-value.selected{box-shadow:#fff 0 0 0 2px,var(--selected-color) 0 0 0 4px}
11
- `],encapsulation:3})};var ca=function(t){return t.SHOPIFY_CHECKOUT="shopify_checkout",t.THIRD_PARTY_CHECKOUT="third_party_checkout",t.CART_PAGE="cart_page",t.CART_DRAWER="cart_drawer",t}(ca||{});var Yt=function(t){return t[t.NONE=0]="NONE",t[t.REJECT_POPUP=1]="REJECT_POPUP",t[t.ACCEPT_POPUP=2]="ACCEPT_POPUP",t[t.GO_TO_URL=4]="GO_TO_URL",t[t.SHARE=5]="SHARE",t[t.KEY_VALUE=100]="KEY_VALUE",t[t.GO_TO_PRODUCT=101]="GO_TO_PRODUCT",t[t.ADD_TO_CART=102]="ADD_TO_CART",t[t.COPY_COUPON_CODE=103]="COPY_COUPON_CODE",t[t.GO_TO_COLLECTION=104]="GO_TO_COLLECTION",t[t.OPEN_CART=105]="OPEN_CART",t[t.SUBMIT_FORM=106]="SUBMIT_FORM",t[t.INITIATE_CHECKOUT=107]="INITIATE_CHECKOUT",t[t.ADD_BUNDLE=108]="ADD_BUNDLE",t[t.UPGRADE_TO_SUBSCRIPTION=109]="UPGRADE_TO_SUBSCRIPTION",t}(Yt||{});var bi=function(t){return t.FREE_SHIPPING="FREE_SHIPPING",t.DISCOUNT="DISCOUNT",t.FREE_AUTO_GIFT="FREE_AUTO_GIFT",t.FREE_GIFT_SELECT="FREE_GIFT_SELECT",t.UI_ONLY="UI_ONLY",t}(bi||{});var Lr=class{id;mID;vID;vName;imageURL;name;link;quantity;price;finalPrice;constructor(e){this.id=e.id,this.mID=e.mID,this.vID=e.vID,this.vName=e.vName,this.imageURL=e.imageURL,this.name=e.name,this.link=e.link,this.quantity=e.quantity,this.price=e.price,this.finalPrice=e.finalPrice??e.price}};var la=(n=>(n.CART_AMOUNT="CART_AMOUNT",n.ITEM_COUNT="ITEM_COUNT",n))(la||{});var Fr=class{gaEnabled;gaMeasurementID;pixelPush;website;currencyCount;money;storefrontToken;skipItemAttribute;currency;static get(){return window.CooeeSDK.config}update(e){return e??={},this.gaEnabled=e.gaEnabled,this.gaMeasurementID=e.gaMeasurementID,this.pixelPush=e.pixelPush,this.website=e.website??{},this.currencyCount=e.currencyCount??0,this.money=e.money,this.currency=e.currency,this.storefrontToken=e.storefrontToken,this.skipItemAttribute=e.skipItemAttribute,this}};var Hu=Object.prototype.toString;function sr(t){switch(Hu.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return In(t,Error)}}function Vr(t,e){return Hu.call(t)===`[object ${e}]`}function fo(t){return Vr(t,"ErrorEvent")}function ho(t){return Vr(t,"DOMError")}function ua(t){return Vr(t,"DOMException")}function At(t){return Vr(t,"String")}function Br(t){return typeof t=="object"&&t!==null&&"__sentry_template_string__"in t&&"__sentry_template_values__"in t}function ar(t){return t===null||Br(t)||typeof t!="object"&&typeof t!="function"}function pn(t){return Vr(t,"Object")}function cr(t){return typeof Event<"u"&&In(t,Event)}function da(t){return typeof Element<"u"&&In(t,Element)}function fa(t){return Vr(t,"RegExp")}function $n(t){return!!(t&&t.then&&typeof t.then=="function")}function ha(t){return pn(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function In(t,e){try{return t instanceof e}catch{return!1}}function Si(t){return!!(typeof t=="object"&&t!==null&&(t.__isVue||t._isVue))}function xn(t,e=0){return typeof t!="string"||e===0||t.length<=e?t:`${t.slice(0,e)}...`}function po(t,e){if(!Array.isArray(t))return"";let n=[];for(let r=0;r<t.length;r++){let i=t[r];try{Si(i)?n.push("[VueViewModel]"):n.push(String(i))}catch{n.push("[value cannot be serialized]")}}return n.join(e)}function ju(t,e,n=!1){return At(t)?fa(e)?e.test(t):At(e)?n?t===e:t.includes(e):!1:!1}function Ur(t,e=[],n=!1){return e.some(r=>ju(t,r,n))}function ma(t,e,n=250,r,i,o,s){if(!o.exception||!o.exception.values||!s||!In(s.originalException,Error))return;let a=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;a&&(o.exception.values=Im(pa(t,e,i,s.originalException,r,o.exception.values,a,0),n))}function pa(t,e,n,r,i,o,s,a){if(o.length>=n+1)return o;let u=[...o];if(In(r[i],Error)){$u(s,a);let d=t(e,r[i]),m=u.length;Gu(d,i,m,a),u=pa(t,e,n,r[i],i,[d,...u],d,m)}return Array.isArray(r.errors)&&r.errors.forEach((d,m)=>{if(In(d,Error)){$u(s,a);let h=t(e,d),E=u.length;Gu(h,`errors[${m}]`,E,a),u=pa(t,e,n,d,i,[h,...u],h,E)}}),u}function $u(t,e){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism=xe(O(O({},t.mechanism),t.type==="AggregateError"&&{is_exception_group:!0}),{exception_id:e})}function Gu(t,e,n,r){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism=xe(O({},t.mechanism),{type:"chained",source:e,exception_id:n,parent_id:r})}function Im(t,e){return t.map(n=>(n.value&&(n.value=xn(n.value,e)),n))}var tn="8.18.0";var _e=globalThis;function Hr(t,e,n){let r=n||_e,i=r.__SENTRY__=r.__SENTRY__||{},o=i[tn]=i[tn]||{};return o[t]||(o[t]=e())}var ga=_e,xm=80;function Ci(t,e={}){if(!t)return"<unknown>";try{let n=t,r=5,i=[],o=0,s=0,a=" > ",u=a.length,d,m=Array.isArray(e)?e:e.keyAttrs,h=!Array.isArray(e)&&e.maxStringLength||xm;for(;n&&o++<r&&(d=Dm(n,m),!(d==="html"||o>1&&s+i.length*u+d.length>=h));)i.push(d),s+=d.length,n=n.parentNode;return i.reverse().join(a)}catch{return"<unknown>"}}function Dm(t,e){let n=t,r=[];if(!n||!n.tagName)return"";if(ga.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());let i=e&&e.length?e.filter(s=>n.getAttribute(s)).map(s=>[s,n.getAttribute(s)]):null;if(i&&i.length)i.forEach(s=>{r.push(`[${s[0]}="${s[1]}"]`)});else{n.id&&r.push(`#${n.id}`);let s=n.className;if(s&&At(s)){let a=s.split(/\s+/);for(let u of a)r.push(`.${u}`)}}let o=["aria-label","type","name","title","alt"];for(let s of o){let a=n.getAttribute(s);a&&r.push(`[${s}="${a}"]`)}return r.join("")}function _a(){try{return ga.document.location.href}catch{return""}}function va(t){if(!ga.HTMLElement)return null;let e=t,n=5;for(let r=0;r<n;r++){if(!e)return null;if(e instanceof HTMLElement){if(e.dataset.sentryComponent)return e.dataset.sentryComponent;if(e.dataset.sentryElement)return e.dataset.sentryElement}e=e.parentNode}return null}var Dn=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var Tm="Sentry Logger ",Ii=["debug","info","warn","error","log","assert","trace"],jr={};function $r(t){if(!("console"in _e))return t();let e=_e.console,n={},r=Object.keys(jr);r.forEach(i=>{let o=jr[i];n[i]=e[i],e[i]=o});try{return t()}finally{r.forEach(i=>{e[i]=n[i]})}}function Om(){let t=!1,e={enable:()=>{t=!0},disable:()=>{t=!1},isEnabled:()=>t};return Dn?Ii.forEach(n=>{e[n]=(...r)=>{t&&$r(()=>{_e.console[n](`${Tm}[${n}]:`,...r)})}}):Ii.forEach(n=>{e[n]=()=>{}}),e}var se=Om();var Rm=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Am(t){return t==="http"||t==="https"}function Tn(t,e=!1){let{host:n,path:r,pass:i,port:o,projectId:s,protocol:a,publicKey:u}=t;return`${a}://${u}${e&&i?`:${i}`:""}@${n}${o?`:${o}`:""}/${r&&`${r}/`}${s}`}function Wu(t){let e=Rm.exec(t);if(!e){$r(()=>{console.error(`Invalid Sentry Dsn: ${t}`)});return}let[n,r,i="",o="",s="",a=""]=e.slice(1),u="",d=a,m=d.split("/");if(m.length>1&&(u=m.slice(0,-1).join("/"),d=m.pop()),d){let h=d.match(/^\d+/);h&&(d=h[0])}return zu({host:o,pass:i,path:u,projectId:d,port:s,protocol:n,publicKey:r})}function zu(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function Nm(t){if(!Dn)return!0;let{port:e,projectId:n,protocol:r}=t;return["protocol","publicKey","host","projectId"].find(s=>t[s]?!1:(se.error(`Invalid Sentry Dsn: ${s} missing`),!0))?!1:n.match(/^\d+$/)?Am(r)?e&&isNaN(parseInt(e,10))?(se.error(`Invalid Sentry Dsn: Invalid port ${e}`),!1):!0:(se.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(se.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function mo(t){let e=typeof t=="string"?Wu(t):zu(t);if(!(!e||!Nm(e)))return e}var It=class extends Error{constructor(e,n="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=n}};function Ze(t,e,n){if(!(e in t))return;let r=t[e],i=n(r);typeof i=="function"&&go(i,r),t[e]=i}function Nt(t,e,n){try{Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}catch{Dn&&se.log(`Failed to add non-enumerable property "${e}" to object`,t)}}function go(t,e){try{let n=e.prototype||{};t.prototype=e.prototype=n,Nt(t,"__sentry_original__",e)}catch{}}function lr(t){return t.__sentry_original__}function Ea(t){return Object.keys(t).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`).join("&")}function _o(t){if(sr(t))return O({message:t.message,name:t.name,stack:t.stack},Ku(t));if(cr(t)){let e=O({type:t.type,target:Yu(t.target),currentTarget:Yu(t.currentTarget)},Ku(t));return typeof CustomEvent<"u"&&In(t,CustomEvent)&&(e.detail=t.detail),e}else return t}function Yu(t){try{return da(t)?Ci(t):Object.prototype.toString.call(t)}catch{return"<unknown>"}}function Ku(t){if(typeof t=="object"&&t!==null){let e={};for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}else return{}}function wa(t,e=40){let n=Object.keys(_o(t));n.sort();let r=n[0];if(!r)return"[object has no keys]";if(r.length>=e)return xn(r,e);for(let i=n.length;i>0;i--){let o=n.slice(0,i).join(", ");if(!(o.length>e))return i===n.length?o:xn(o,e)}return""}function pt(t){return ya(t,new Map)}function ya(t,e){if(Pm(t)){let n=e.get(t);if(n!==void 0)return n;let r={};e.set(t,r);for(let i of Object.keys(t))typeof t[i]<"u"&&(r[i]=ya(t[i],e));return r}if(Array.isArray(t)){let n=e.get(t);if(n!==void 0)return n;let r=[];return e.set(t,r),t.forEach(i=>{r.push(ya(i,e))}),r}return t}function Pm(t){if(!pn(t))return!1;try{let e=Object.getPrototypeOf(t).constructor.name;return!e||e==="Object"}catch{return!0}}var On="?",Xu=/\(error: (.*)\)/,qu=/captureMessage|captureException/;function Sa(...t){let e=t.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,i=0)=>{let o=[],s=n.split(`
12
- `);for(let a=r;a<s.length;a++){let u=s[a];if(u.length>1024)continue;let d=Xu.test(u)?u.replace(Xu,"$1"):u;if(!d.match(/\S*Error: /)){for(let m of e){let h=m(d);if(h){o.push(h);break}}if(o.length>=50+i)break}}return Zu(o.slice(i))}}function Zu(t){if(!t.length)return[];let e=Array.from(t);return/sentryWrapped/.test(vo(e).function||"")&&e.pop(),e.reverse(),qu.test(vo(e).function||"")&&(e.pop(),qu.test(vo(e).function||"")&&e.pop()),e.slice(0,50).map(n=>xe(O({},n),{filename:n.filename||vo(e).filename,function:n.function||On}))}function vo(t){return t[t.length-1]||{}}var ba="<anonymous>";function nn(t){try{return!t||typeof t!="function"?ba:t.name||ba}catch{return ba}}function yo(t){let e=t.exception;if(e){let n=[];try{return e.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}var Eo={},Ju={};function Pt(t,e){Eo[t]=Eo[t]||[],Eo[t].push(e)}function Mt(t,e){Ju[t]||(e(),Ju[t]=!0)}function mt(t,e){let n=t&&Eo[t];if(n)for(let r of n)try{r(e)}catch(i){Dn&&se.error(`Error while triggering instrumentation handler.
8
+ `+v.message+`
9
+ `+Array(v.message.length+1).join("=")+`
10
+ `+O(A,P)):v}}function ut(A,T){var k;return T.cache&&T.name&&T.storage.templates.get(T.name)?T.storage.templates.get(T.name):(k=typeof A=="function"?A:We(A,T),T.cache&&T.name&&T.storage.templates.define(T.name,k),k)}Oe.l.bind(Oe),t.compile=We,t.compileScope=oe,t.compileScopeIntoFunction=Y,t.compileToString=O,t.defaultConfig=Oe,t.filters=xe,t.getConfig=Ge,t.helpers=Ee,t.nativeHelpers=Me,t.parse=C,t.render=function(A,T,k,P){var y=Ge(k||{});if(!y.async)return ut(A,y)(T,y);if(!P){if(typeof r=="function")return new r(function(v,U){try{v(ut(A,y)(T,y))}catch(Z){U(Z)}});throw e("Please provide a callback function, this env doesn't support Promises")}try{ut(A,y)(T,y,P)}catch(v){return P(v)}},t.templates=te,Object.defineProperty(t,"__esModule",{value:!0})})});var Td=ys((xd,Ka)=>{"use strict";(function(t){if(typeof xd=="object"&&typeof Ka<"u")Ka.exports=t();else if(typeof define=="function"&&define.amd)define([],t);else{var e;typeof window<"u"?e=window:typeof global<"u"?e=global:typeof self<"u"?e=self:e=this,e.localforage=t()}})(function(){var t,e,n;return function r(i,o,s){function c(g,p){if(!o[g]){if(!i[g]){var E=typeof Jr=="function"&&Jr;if(!p&&E)return E(g,!0);if(u)return u(g,!0);var C=new Error("Cannot find module '"+g+"'");throw C.code="MODULE_NOT_FOUND",C}var O=o[g]={exports:{}};i[g][0].call(O.exports,function(M){var L=i[g][1][M];return c(L||M)},O,O.exports,r,i,o,s)}return o[g].exports}for(var u=typeof Jr=="function"&&Jr,d=0;d<s.length;d++)c(s[d]);return c}({1:[function(r,i,o){(function(s){"use strict";var c=s.MutationObserver||s.WebKitMutationObserver,u;if(c){var d=0,g=new c(M),p=s.document.createTextNode("");g.observe(p,{characterData:!0}),u=function(){p.data=d=++d%2}}else if(!s.setImmediate&&typeof s.MessageChannel<"u"){var E=new s.MessageChannel;E.port1.onmessage=M,u=function(){E.port2.postMessage(0)}}else"document"in s&&"onreadystatechange"in s.document.createElement("script")?u=function(){var H=s.document.createElement("script");H.onreadystatechange=function(){M(),H.onreadystatechange=null,H.parentNode.removeChild(H),H=null},s.document.documentElement.appendChild(H)}:u=function(){setTimeout(M,0)};var C,O=[];function M(){C=!0;for(var H,Y,oe=O.length;oe;){for(Y=O,O=[],H=-1;++H<oe;)Y[H]();oe=O.length}C=!1}i.exports=L;function L(H){O.push(H)===1&&!C&&u()}}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(r,i,o){"use strict";var s=r(1);function c(){}var u={},d=["REJECTED"],g=["FULFILLED"],p=["PENDING"];i.exports=E;function E(B){if(typeof B!="function")throw new TypeError("resolver must be a function");this.state=p,this.queue=[],this.outcome=void 0,B!==c&&L(this,B)}E.prototype.catch=function(B){return this.then(null,B)},E.prototype.then=function(B,fe){if(typeof B!="function"&&this.state===g||typeof fe!="function"&&this.state===d)return this;var te=new this.constructor(c);if(this.state!==p){var Ee=this.state===g?B:fe;O(te,Ee,this.outcome)}else this.queue.push(new C(te,B,fe));return te};function C(B,fe,te){this.promise=B,typeof fe=="function"&&(this.onFulfilled=fe,this.callFulfilled=this.otherCallFulfilled),typeof te=="function"&&(this.onRejected=te,this.callRejected=this.otherCallRejected)}C.prototype.callFulfilled=function(B){u.resolve(this.promise,B)},C.prototype.otherCallFulfilled=function(B){O(this.promise,this.onFulfilled,B)},C.prototype.callRejected=function(B){u.reject(this.promise,B)},C.prototype.otherCallRejected=function(B){O(this.promise,this.onRejected,B)};function O(B,fe,te){s(function(){var Ee;try{Ee=fe(te)}catch(Me){return u.reject(B,Me)}Ee===B?u.reject(B,new TypeError("Cannot resolve promise with itself")):u.resolve(B,Ee)})}u.resolve=function(B,fe){var te=H(M,fe);if(te.status==="error")return u.reject(B,te.value);var Ee=te.value;if(Ee)L(B,Ee);else{B.state=g,B.outcome=fe;for(var Me=-1,xe=B.queue.length;++Me<xe;)B.queue[Me].callFulfilled(fe)}return B},u.reject=function(B,fe){B.state=d,B.outcome=fe;for(var te=-1,Ee=B.queue.length;++te<Ee;)B.queue[te].callRejected(fe);return B};function M(B){var fe=B&&B.then;if(B&&(typeof B=="object"||typeof B=="function")&&typeof fe=="function")return function(){fe.apply(B,arguments)}}function L(B,fe){var te=!1;function Ee(Ge){te||(te=!0,u.reject(B,Ge))}function Me(Ge){te||(te=!0,u.resolve(B,Ge))}function xe(){fe(Me,Ee)}var Oe=H(xe);Oe.status==="error"&&Ee(Oe.value)}function H(B,fe){var te={};try{te.value=B(fe),te.status="success"}catch(Ee){te.status="error",te.value=Ee}return te}E.resolve=Y;function Y(B){return B instanceof this?B:u.resolve(new this(c),B)}E.reject=oe;function oe(B){var fe=new this(c);return u.reject(fe,B)}E.all=z;function z(B){var fe=this;if(Object.prototype.toString.call(B)!=="[object Array]")return this.reject(new TypeError("must be an array"));var te=B.length,Ee=!1;if(!te)return this.resolve([]);for(var Me=new Array(te),xe=0,Oe=-1,Ge=new this(c);++Oe<te;)We(B[Oe],Oe);return Ge;function We(ut,A){fe.resolve(ut).then(T,function(k){Ee||(Ee=!0,u.reject(Ge,k))});function T(k){Me[A]=k,++xe===te&&!Ee&&(Ee=!0,u.resolve(Ge,Me))}}}E.race=ye;function ye(B){var fe=this;if(Object.prototype.toString.call(B)!=="[object Array]")return this.reject(new TypeError("must be an array"));var te=B.length,Ee=!1;if(!te)return this.resolve([]);for(var Me=-1,xe=new this(c);++Me<te;)Oe(B[Me]);return xe;function Oe(Ge){fe.resolve(Ge).then(function(We){Ee||(Ee=!0,u.resolve(xe,We))},function(We){Ee||(Ee=!0,u.reject(xe,We))})}}},{1:1}],3:[function(r,i,o){(function(s){"use strict";typeof s.Promise!="function"&&(s.Promise=r(2))}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(r,i,o){"use strict";var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(f){return typeof f}:function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f};function c(f,b){if(!(f instanceof b))throw new TypeError("Cannot call a class as a function")}function u(){try{if(typeof indexedDB<"u")return indexedDB;if(typeof webkitIndexedDB<"u")return webkitIndexedDB;if(typeof mozIndexedDB<"u")return mozIndexedDB;if(typeof OIndexedDB<"u")return OIndexedDB;if(typeof msIndexedDB<"u")return msIndexedDB}catch{return}}var d=u();function g(){try{if(!d||!d.open)return!1;var f=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),b=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!f||b)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function p(f,b){f=f||[],b=b||{};try{return new Blob(f,b)}catch(w){if(w.name!=="TypeError")throw w;for(var m=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,S=new m,x=0;x<f.length;x+=1)S.append(f[x]);return S.getBlob(b.type)}}typeof Promise>"u"&&r(3);var E=Promise;function C(f,b){b&&f.then(function(m){b(null,m)},function(m){b(m)})}function O(f,b,m){typeof b=="function"&&f.then(b),typeof m=="function"&&f.catch(m)}function M(f){return typeof f!="string"&&(console.warn(f+" used as a key, but it is not a string."),f=String(f)),f}function L(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var H="local-forage-detect-blob-support",Y=void 0,oe={},z=Object.prototype.toString,ye="readonly",B="readwrite";function fe(f){for(var b=f.length,m=new ArrayBuffer(b),S=new Uint8Array(m),x=0;x<b;x++)S[x]=f.charCodeAt(x);return m}function te(f){return new E(function(b){var m=f.transaction(H,B),S=p([""]);m.objectStore(H).put(S,"key"),m.onabort=function(x){x.preventDefault(),x.stopPropagation(),b(!1)},m.oncomplete=function(){var x=navigator.userAgent.match(/Chrome\/(\d+)/),w=navigator.userAgent.match(/Edge\//);b(w||!x||parseInt(x[1],10)>=43)}}).catch(function(){return!1})}function Ee(f){return typeof Y=="boolean"?E.resolve(Y):te(f).then(function(b){return Y=b,Y})}function Me(f){var b=oe[f.name],m={};m.promise=new E(function(S,x){m.resolve=S,m.reject=x}),b.deferredOperations.push(m),b.dbReady?b.dbReady=b.dbReady.then(function(){return m.promise}):b.dbReady=m.promise}function xe(f){var b=oe[f.name],m=b.deferredOperations.pop();if(m)return m.resolve(),m.promise}function Oe(f,b){var m=oe[f.name],S=m.deferredOperations.pop();if(S)return S.reject(b),S.promise}function Ge(f,b){return new E(function(m,S){if(oe[f.name]=oe[f.name]||Z(),f.db)if(b)Me(f),f.db.close();else return m(f.db);var x=[f.name];b&&x.push(f.version);var w=d.open.apply(d,x);b&&(w.onupgradeneeded=function(R){var V=w.result;try{V.createObjectStore(f.storeName),R.oldVersion<=1&&V.createObjectStore(H)}catch(j){if(j.name==="ConstraintError")console.warn('The database "'+f.name+'" has been upgraded from version '+R.oldVersion+" to version "+R.newVersion+', but the storage "'+f.storeName+'" already exists.');else throw j}}),w.onerror=function(R){R.preventDefault(),S(w.error)},w.onsuccess=function(){var R=w.result;R.onversionchange=function(V){V.target.close()},m(R),xe(f)}})}function We(f){return Ge(f,!1)}function ut(f){return Ge(f,!0)}function A(f,b){if(!f.db)return!0;var m=!f.db.objectStoreNames.contains(f.storeName),S=f.version<f.db.version,x=f.version>f.db.version;if(S&&(f.version!==b&&console.warn('The database "'+f.name+`" can't be downgraded from version `+f.db.version+" to version "+f.version+"."),f.version=f.db.version),x||m){if(m){var w=f.db.version+1;w>f.version&&(f.version=w)}return!0}return!1}function T(f){return new E(function(b,m){var S=new FileReader;S.onerror=m,S.onloadend=function(x){var w=btoa(x.target.result||"");b({__local_forage_encoded_blob:!0,data:w,type:f.type})},S.readAsBinaryString(f)})}function k(f){var b=fe(atob(f.data));return p([b],{type:f.type})}function P(f){return f&&f.__local_forage_encoded_blob}function y(f){var b=this,m=b._initReady().then(function(){var S=oe[b._dbInfo.name];if(S&&S.dbReady)return S.dbReady});return O(m,f,f),m}function v(f){Me(f);for(var b=oe[f.name],m=b.forages,S=0;S<m.length;S++){var x=m[S];x._dbInfo.db&&(x._dbInfo.db.close(),x._dbInfo.db=null)}return f.db=null,We(f).then(function(w){return f.db=w,A(f)?ut(f):w}).then(function(w){f.db=b.db=w;for(var R=0;R<m.length;R++)m[R]._dbInfo.db=w}).catch(function(w){throw Oe(f,w),w})}function U(f,b,m,S){S===void 0&&(S=1);try{var x=f.db.transaction(f.storeName,b);m(null,x)}catch(w){if(S>0&&(!f.db||w.name==="InvalidStateError"||w.name==="NotFoundError"))return E.resolve().then(function(){if(!f.db||w.name==="NotFoundError"&&!f.db.objectStoreNames.contains(f.storeName)&&f.version<=f.db.version)return f.db&&(f.version=f.db.version+1),ut(f)}).then(function(){return v(f).then(function(){U(f,b,m,S-1)})}).catch(m);m(w)}}function Z(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function ne(f){var b=this,m={db:null};if(f)for(var S in f)m[S]=f[S];var x=oe[m.name];x||(x=Z(),oe[m.name]=x),x.forages.push(b),b._initReady||(b._initReady=b.ready,b.ready=y);var w=[];function R(){return E.resolve()}for(var V=0;V<x.forages.length;V++){var j=x.forages[V];j!==b&&w.push(j._initReady().catch(R))}var $=x.forages.slice(0);return E.all(w).then(function(){return m.db=x.db,We(m)}).then(function(G){return m.db=G,A(m,b._defaultConfig.version)?ut(m):G}).then(function(G){m.db=x.db=G,b._dbInfo=m;for(var re=0;re<$.length;re++){var Ce=$[re];Ce!==b&&(Ce._dbInfo.db=m.db,Ce._dbInfo.version=m.version)}})}function ie(f,b){var m=this;f=M(f);var S=new E(function(x,w){m.ready().then(function(){U(m._dbInfo,ye,function(R,V){if(R)return w(R);try{var j=V.objectStore(m._dbInfo.storeName),$=j.get(f);$.onsuccess=function(){var G=$.result;G===void 0&&(G=null),P(G)&&(G=k(G)),x(G)},$.onerror=function(){w($.error)}}catch(G){w(G)}})}).catch(w)});return C(S,b),S}function ue(f,b){var m=this,S=new E(function(x,w){m.ready().then(function(){U(m._dbInfo,ye,function(R,V){if(R)return w(R);try{var j=V.objectStore(m._dbInfo.storeName),$=j.openCursor(),G=1;$.onsuccess=function(){var re=$.result;if(re){var Ce=re.value;P(Ce)&&(Ce=k(Ce));var ke=f(Ce,re.key,G++);ke!==void 0?x(ke):re.continue()}else x()},$.onerror=function(){w($.error)}}catch(re){w(re)}})}).catch(w)});return C(S,b),S}function Q(f,b,m){var S=this;f=M(f);var x=new E(function(w,R){var V;S.ready().then(function(){return V=S._dbInfo,z.call(b)==="[object Blob]"?Ee(V.db).then(function(j){return j?b:T(b)}):b}).then(function(j){U(S._dbInfo,B,function($,G){if($)return R($);try{var re=G.objectStore(S._dbInfo.storeName);j===null&&(j=void 0);var Ce=re.put(j,f);G.oncomplete=function(){j===void 0&&(j=null),w(j)},G.onabort=G.onerror=function(){var ke=Ce.error?Ce.error:Ce.transaction.error;R(ke)}}catch(ke){R(ke)}})}).catch(R)});return C(x,m),x}function ae(f,b){var m=this;f=M(f);var S=new E(function(x,w){m.ready().then(function(){U(m._dbInfo,B,function(R,V){if(R)return w(R);try{var j=V.objectStore(m._dbInfo.storeName),$=j.delete(f);V.oncomplete=function(){x()},V.onerror=function(){w($.error)},V.onabort=function(){var G=$.error?$.error:$.transaction.error;w(G)}}catch(G){w(G)}})}).catch(w)});return C(S,b),S}function ee(f){var b=this,m=new E(function(S,x){b.ready().then(function(){U(b._dbInfo,B,function(w,R){if(w)return x(w);try{var V=R.objectStore(b._dbInfo.storeName),j=V.clear();R.oncomplete=function(){S()},R.onabort=R.onerror=function(){var $=j.error?j.error:j.transaction.error;x($)}}catch($){x($)}})}).catch(x)});return C(m,f),m}function de(f){var b=this,m=new E(function(S,x){b.ready().then(function(){U(b._dbInfo,ye,function(w,R){if(w)return x(w);try{var V=R.objectStore(b._dbInfo.storeName),j=V.count();j.onsuccess=function(){S(j.result)},j.onerror=function(){x(j.error)}}catch($){x($)}})}).catch(x)});return C(m,f),m}function ce(f,b){var m=this,S=new E(function(x,w){if(f<0){x(null);return}m.ready().then(function(){U(m._dbInfo,ye,function(R,V){if(R)return w(R);try{var j=V.objectStore(m._dbInfo.storeName),$=!1,G=j.openKeyCursor();G.onsuccess=function(){var re=G.result;if(!re){x(null);return}f===0||$?x(re.key):($=!0,re.advance(f))},G.onerror=function(){w(G.error)}}catch(re){w(re)}})}).catch(w)});return C(S,b),S}function pe(f){var b=this,m=new E(function(S,x){b.ready().then(function(){U(b._dbInfo,ye,function(w,R){if(w)return x(w);try{var V=R.objectStore(b._dbInfo.storeName),j=V.openKeyCursor(),$=[];j.onsuccess=function(){var G=j.result;if(!G){S($);return}$.push(G.key),G.continue()},j.onerror=function(){x(j.error)}}catch(G){x(G)}})}).catch(x)});return C(m,f),m}function he(f,b){b=L.apply(this,arguments);var m=this.config();f=typeof f!="function"&&f||{},f.name||(f.name=f.name||m.name,f.storeName=f.storeName||m.storeName);var S=this,x;if(!f.name)x=E.reject("Invalid arguments");else{var w=f.name===m.name&&S._dbInfo.db,R=w?E.resolve(S._dbInfo.db):We(f).then(function(V){var j=oe[f.name],$=j.forages;j.db=V;for(var G=0;G<$.length;G++)$[G]._dbInfo.db=V;return V});f.storeName?x=R.then(function(V){if(V.objectStoreNames.contains(f.storeName)){var j=V.version+1;Me(f);var $=oe[f.name],G=$.forages;V.close();for(var re=0;re<G.length;re++){var Ce=G[re];Ce._dbInfo.db=null,Ce._dbInfo.version=j}var ke=new E(function(Ve,rt){var Qe=d.open(f.name,j);Qe.onerror=function(Gt){var Zr=Qe.result;Zr.close(),rt(Gt)},Qe.onupgradeneeded=function(){var Gt=Qe.result;Gt.deleteObjectStore(f.storeName)},Qe.onsuccess=function(){var Gt=Qe.result;Gt.close(),Ve(Gt)}});return ke.then(function(Ve){$.db=Ve;for(var rt=0;rt<G.length;rt++){var Qe=G[rt];Qe._dbInfo.db=Ve,xe(Qe._dbInfo)}}).catch(function(Ve){throw(Oe(f,Ve)||E.resolve()).catch(function(){}),Ve})}}):x=R.then(function(V){Me(f);var j=oe[f.name],$=j.forages;V.close();for(var G=0;G<$.length;G++){var re=$[G];re._dbInfo.db=null}var Ce=new E(function(ke,Ve){var rt=d.deleteDatabase(f.name);rt.onerror=function(){var Qe=rt.result;Qe&&Qe.close(),Ve(rt.error)},rt.onblocked=function(){console.warn('dropInstance blocked for database "'+f.name+'" until all open connections are closed')},rt.onsuccess=function(){var Qe=rt.result;Qe&&Qe.close(),ke(Qe)}});return Ce.then(function(ke){j.db=ke;for(var Ve=0;Ve<$.length;Ve++){var rt=$[Ve];xe(rt._dbInfo)}}).catch(function(ke){throw(Oe(f,ke)||E.resolve()).catch(function(){}),ke})})}return C(x,b),x}var me={_driver:"asyncStorage",_initStorage:ne,_support:g(),iterate:ue,getItem:ie,setItem:Q,removeItem:ae,clear:ee,length:de,key:ce,keys:pe,dropInstance:he};function h(){return typeof openDatabase=="function"}var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l="~~local_forage_type~",_=/^~~local_forage_type~([^~]+)~/,I="__lfsc__:",N=I.length,F="arbf",_e="blob",we="si08",ve="ui08",Pe="uic8",Le="si16",Xe="si32",Lt="ur16",$t="ui32",In="fl32",Et="fl64",kt=N+F.length,Ai=Object.prototype.toString;function tl(f){var b=f.length*.75,m=f.length,S,x=0,w,R,V,j;f[f.length-1]==="="&&(b--,f[f.length-2]==="="&&b--);var $=new ArrayBuffer(b),G=new Uint8Array($);for(S=0;S<m;S+=4)w=a.indexOf(f[S]),R=a.indexOf(f[S+1]),V=a.indexOf(f[S+2]),j=a.indexOf(f[S+3]),G[x++]=w<<2|R>>4,G[x++]=(R&15)<<4|V>>2,G[x++]=(V&3)<<6|j&63;return $}function fs(f){var b=new Uint8Array(f),m="",S;for(S=0;S<b.length;S+=3)m+=a[b[S]>>2],m+=a[(b[S]&3)<<4|b[S+1]>>4],m+=a[(b[S+1]&15)<<2|b[S+2]>>6],m+=a[b[S+2]&63];return b.length%3===2?m=m.substring(0,m.length-1)+"=":b.length%3===1&&(m=m.substring(0,m.length-2)+"=="),m}function gp(f,b){var m="";if(f&&(m=Ai.call(f)),f&&(m==="[object ArrayBuffer]"||f.buffer&&Ai.call(f.buffer)==="[object ArrayBuffer]")){var S,x=I;f instanceof ArrayBuffer?(S=f,x+=F):(S=f.buffer,m==="[object Int8Array]"?x+=we:m==="[object Uint8Array]"?x+=ve:m==="[object Uint8ClampedArray]"?x+=Pe:m==="[object Int16Array]"?x+=Le:m==="[object Uint16Array]"?x+=Lt:m==="[object Int32Array]"?x+=Xe:m==="[object Uint32Array]"?x+=$t:m==="[object Float32Array]"?x+=In:m==="[object Float64Array]"?x+=Et:b(new Error("Failed to get type for BinaryArray"))),b(x+fs(S))}else if(m==="[object Blob]"){var w=new FileReader;w.onload=function(){var R=l+f.type+"~"+fs(this.result);b(I+_e+R)},w.readAsArrayBuffer(f)}else try{b(JSON.stringify(f))}catch(R){console.error("Couldn't convert value into a JSON string: ",f),b(null,R)}}function _p(f){if(f.substring(0,N)!==I)return JSON.parse(f);var b=f.substring(kt),m=f.substring(N,kt),S;if(m===_e&&_.test(b)){var x=b.match(_);S=x[1],b=b.substring(x[0].length)}var w=tl(b);switch(m){case F:return w;case _e:return p([w],{type:S});case we:return new Int8Array(w);case ve:return new Uint8Array(w);case Pe:return new Uint8ClampedArray(w);case Le:return new Int16Array(w);case Lt:return new Uint16Array(w);case Xe:return new Int32Array(w);case $t:return new Uint32Array(w);case In:return new Float32Array(w);case Et:return new Float64Array(w);default:throw new Error("Unkown type: "+m)}}var ps={serialize:gp,deserialize:_p,stringToBuffer:tl,bufferToString:fs};function nl(f,b,m,S){f.executeSql("CREATE TABLE IF NOT EXISTS "+b.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],m,S)}function yp(f){var b=this,m={db:null};if(f)for(var S in f)m[S]=typeof f[S]!="string"?f[S].toString():f[S];var x=new E(function(w,R){try{m.db=openDatabase(m.name,String(m.version),m.description,m.size)}catch(V){return R(V)}m.db.transaction(function(V){nl(V,m,function(){b._dbInfo=m,w()},function(j,$){R($)})},R)});return m.serializer=ps,x}function Ln(f,b,m,S,x,w){f.executeSql(m,S,x,function(R,V){V.code===V.SYNTAX_ERR?R.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[b.storeName],function(j,$){$.rows.length?w(j,V):nl(j,b,function(){j.executeSql(m,S,x,w)},w)},w):w(R,V)},w)}function vp(f,b){var m=this;f=M(f);var S=new E(function(x,w){m.ready().then(function(){var R=m._dbInfo;R.db.transaction(function(V){Ln(V,R,"SELECT * FROM "+R.storeName+" WHERE key = ? LIMIT 1",[f],function(j,$){var G=$.rows.length?$.rows.item(0).value:null;G&&(G=R.serializer.deserialize(G)),x(G)},function(j,$){w($)})})}).catch(w)});return C(S,b),S}function Ep(f,b){var m=this,S=new E(function(x,w){m.ready().then(function(){var R=m._dbInfo;R.db.transaction(function(V){Ln(V,R,"SELECT * FROM "+R.storeName,[],function(j,$){for(var G=$.rows,re=G.length,Ce=0;Ce<re;Ce++){var ke=G.item(Ce),Ve=ke.value;if(Ve&&(Ve=R.serializer.deserialize(Ve)),Ve=f(Ve,ke.key,Ce+1),Ve!==void 0){x(Ve);return}}x()},function(j,$){w($)})})}).catch(w)});return C(S,b),S}function rl(f,b,m,S){var x=this;f=M(f);var w=new E(function(R,V){x.ready().then(function(){b===void 0&&(b=null);var j=b,$=x._dbInfo;$.serializer.serialize(b,function(G,re){re?V(re):$.db.transaction(function(Ce){Ln(Ce,$,"INSERT OR REPLACE INTO "+$.storeName+" (key, value) VALUES (?, ?)",[f,G],function(){R(j)},function(ke,Ve){V(Ve)})},function(Ce){if(Ce.code===Ce.QUOTA_ERR){if(S>0){R(rl.apply(x,[f,j,m,S-1]));return}V(Ce)}})})}).catch(V)});return C(w,m),w}function bp(f,b,m){return rl.apply(this,[f,b,m,1])}function wp(f,b){var m=this;f=M(f);var S=new E(function(x,w){m.ready().then(function(){var R=m._dbInfo;R.db.transaction(function(V){Ln(V,R,"DELETE FROM "+R.storeName+" WHERE key = ?",[f],function(){x()},function(j,$){w($)})})}).catch(w)});return C(S,b),S}function Cp(f){var b=this,m=new E(function(S,x){b.ready().then(function(){var w=b._dbInfo;w.db.transaction(function(R){Ln(R,w,"DELETE FROM "+w.storeName,[],function(){S()},function(V,j){x(j)})})}).catch(x)});return C(m,f),m}function Sp(f){var b=this,m=new E(function(S,x){b.ready().then(function(){var w=b._dbInfo;w.db.transaction(function(R){Ln(R,w,"SELECT COUNT(key) as c FROM "+w.storeName,[],function(V,j){var $=j.rows.item(0).c;S($)},function(V,j){x(j)})})}).catch(x)});return C(m,f),m}function Ip(f,b){var m=this,S=new E(function(x,w){m.ready().then(function(){var R=m._dbInfo;R.db.transaction(function(V){Ln(V,R,"SELECT key FROM "+R.storeName+" WHERE id = ? LIMIT 1",[f+1],function(j,$){var G=$.rows.length?$.rows.item(0).key:null;x(G)},function(j,$){w($)})})}).catch(w)});return C(S,b),S}function xp(f){var b=this,m=new E(function(S,x){b.ready().then(function(){var w=b._dbInfo;w.db.transaction(function(R){Ln(R,w,"SELECT key FROM "+w.storeName,[],function(V,j){for(var $=[],G=0;G<j.rows.length;G++)$.push(j.rows.item(G).key);S($)},function(V,j){x(j)})})}).catch(x)});return C(m,f),m}function Tp(f){return new E(function(b,m){f.transaction(function(S){S.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(x,w){for(var R=[],V=0;V<w.rows.length;V++)R.push(w.rows.item(V).name);b({db:f,storeNames:R})},function(x,w){m(w)})},function(S){m(S)})})}function Op(f,b){b=L.apply(this,arguments);var m=this.config();f=typeof f!="function"&&f||{},f.name||(f.name=f.name||m.name,f.storeName=f.storeName||m.storeName);var S=this,x;return f.name?x=new E(function(w){var R;f.name===m.name?R=S._dbInfo.db:R=openDatabase(f.name,"","",0),f.storeName?w({db:R,storeNames:[f.storeName]}):w(Tp(R))}).then(function(w){return new E(function(R,V){w.db.transaction(function(j){function $(ke){return new E(function(Ve,rt){j.executeSql("DROP TABLE IF EXISTS "+ke,[],function(){Ve()},function(Qe,Gt){rt(Gt)})})}for(var G=[],re=0,Ce=w.storeNames.length;re<Ce;re++)G.push($(w.storeNames[re]));E.all(G).then(function(){R()}).catch(function(ke){V(ke)})},function(j){V(j)})})}):x=E.reject("Invalid arguments"),C(x,b),x}var Dp={_driver:"webSQLStorage",_initStorage:yp,_support:h(),iterate:Ep,getItem:vp,setItem:bp,removeItem:wp,clear:Cp,length:Sp,key:Ip,keys:xp,dropInstance:Op};function Ap(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function il(f,b){var m=f.name+"/";return f.storeName!==b.storeName&&(m+=f.storeName+"/"),m}function Np(){var f="_localforage_support_test";try{return localStorage.setItem(f,!0),localStorage.removeItem(f),!1}catch{return!0}}function Rp(){return!Np()||localStorage.length>0}function Mp(f){var b=this,m={};if(f)for(var S in f)m[S]=f[S];return m.keyPrefix=il(f,b._defaultConfig),Rp()?(b._dbInfo=m,m.serializer=ps,E.resolve()):E.reject()}function Pp(f){var b=this,m=b.ready().then(function(){for(var S=b._dbInfo.keyPrefix,x=localStorage.length-1;x>=0;x--){var w=localStorage.key(x);w.indexOf(S)===0&&localStorage.removeItem(w)}});return C(m,f),m}function Lp(f,b){var m=this;f=M(f);var S=m.ready().then(function(){var x=m._dbInfo,w=localStorage.getItem(x.keyPrefix+f);return w&&(w=x.serializer.deserialize(w)),w});return C(S,b),S}function kp(f,b){var m=this,S=m.ready().then(function(){for(var x=m._dbInfo,w=x.keyPrefix,R=w.length,V=localStorage.length,j=1,$=0;$<V;$++){var G=localStorage.key($);if(G.indexOf(w)===0){var re=localStorage.getItem(G);if(re&&(re=x.serializer.deserialize(re)),re=f(re,G.substring(R),j++),re!==void 0)return re}}});return C(S,b),S}function Fp(f,b){var m=this,S=m.ready().then(function(){var x=m._dbInfo,w;try{w=localStorage.key(f)}catch{w=null}return w&&(w=w.substring(x.keyPrefix.length)),w});return C(S,b),S}function Vp(f){var b=this,m=b.ready().then(function(){for(var S=b._dbInfo,x=localStorage.length,w=[],R=0;R<x;R++){var V=localStorage.key(R);V.indexOf(S.keyPrefix)===0&&w.push(V.substring(S.keyPrefix.length))}return w});return C(m,f),m}function Bp(f){var b=this,m=b.keys().then(function(S){return S.length});return C(m,f),m}function Up(f,b){var m=this;f=M(f);var S=m.ready().then(function(){var x=m._dbInfo;localStorage.removeItem(x.keyPrefix+f)});return C(S,b),S}function Hp(f,b,m){var S=this;f=M(f);var x=S.ready().then(function(){b===void 0&&(b=null);var w=b;return new E(function(R,V){var j=S._dbInfo;j.serializer.serialize(b,function($,G){if(G)V(G);else try{localStorage.setItem(j.keyPrefix+f,$),R(w)}catch(re){(re.name==="QuotaExceededError"||re.name==="NS_ERROR_DOM_QUOTA_REACHED")&&V(re),V(re)}})})});return C(x,m),x}function jp(f,b){if(b=L.apply(this,arguments),f=typeof f!="function"&&f||{},!f.name){var m=this.config();f.name=f.name||m.name,f.storeName=f.storeName||m.storeName}var S=this,x;return f.name?x=new E(function(w){f.storeName?w(il(f,S._defaultConfig)):w(f.name+"/")}).then(function(w){for(var R=localStorage.length-1;R>=0;R--){var V=localStorage.key(R);V.indexOf(w)===0&&localStorage.removeItem(V)}}):x=E.reject("Invalid arguments"),C(x,b),x}var $p={_driver:"localStorageWrapper",_initStorage:Mp,_support:Ap(),iterate:kp,getItem:Lp,setItem:Hp,removeItem:Up,clear:Pp,length:Bp,key:Fp,keys:Vp,dropInstance:jp},Gp=function(b,m){return b===m||typeof b=="number"&&typeof m=="number"&&isNaN(b)&&isNaN(m)},Wp=function(b,m){for(var S=b.length,x=0;x<S;){if(Gp(b[x],m))return!0;x++}return!1},ol=Array.isArray||function(f){return Object.prototype.toString.call(f)==="[object Array]"},qr={},sl={},hr={INDEXEDDB:me,WEBSQL:Dp,LOCALSTORAGE:$p},Yp=[hr.INDEXEDDB._driver,hr.WEBSQL._driver,hr.LOCALSTORAGE._driver],Ni=["dropInstance"],hs=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(Ni),zp={description:"",driver:Yp.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function Kp(f,b){f[b]=function(){var m=arguments;return f.ready().then(function(){return f[b].apply(f,m)})}}function ms(){for(var f=1;f<arguments.length;f++){var b=arguments[f];if(b)for(var m in b)b.hasOwnProperty(m)&&(ol(b[m])?arguments[0][m]=b[m].slice():arguments[0][m]=b[m])}return arguments[0]}var Xp=function(){function f(b){c(this,f);for(var m in hr)if(hr.hasOwnProperty(m)){var S=hr[m],x=S._driver;this[m]=x,qr[x]||this.defineDriver(S)}this._defaultConfig=ms({},zp),this._config=ms({},this._defaultConfig,b),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return f.prototype.config=function(m){if((typeof m>"u"?"undefined":s(m))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var S in m){if(S==="storeName"&&(m[S]=m[S].replace(/\W/g,"_")),S==="version"&&typeof m[S]!="number")return new Error("Database version must be a number.");this._config[S]=m[S]}return"driver"in m&&m.driver?this.setDriver(this._config.driver):!0}else return typeof m=="string"?this._config[m]:this._config},f.prototype.defineDriver=function(m,S,x){var w=new E(function(R,V){try{var j=m._driver,$=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!m._driver){V($);return}for(var G=hs.concat("_initStorage"),re=0,Ce=G.length;re<Ce;re++){var ke=G[re],Ve=!Wp(Ni,ke);if((Ve||m[ke])&&typeof m[ke]!="function"){V($);return}}var rt=function(){for(var Zr=function(Jp){return function(){var Qp=new Error("Method "+Jp+" is not implemented by the current driver"),al=E.reject(Qp);return C(al,arguments[arguments.length-1]),al}},gs=0,Zp=Ni.length;gs<Zp;gs++){var _s=Ni[gs];m[_s]||(m[_s]=Zr(_s))}};rt();var Qe=function(Zr){qr[j]&&console.info("Redefining LocalForage driver: "+j),qr[j]=m,sl[j]=Zr,R()};"_support"in m?m._support&&typeof m._support=="function"?m._support().then(Qe,V):Qe(!!m._support):Qe(!0)}catch(Gt){V(Gt)}});return O(w,S,x),w},f.prototype.driver=function(){return this._driver||null},f.prototype.getDriver=function(m,S,x){var w=qr[m]?E.resolve(qr[m]):E.reject(new Error("Driver not found."));return O(w,S,x),w},f.prototype.getSerializer=function(m){var S=E.resolve(ps);return O(S,m),S},f.prototype.ready=function(m){var S=this,x=S._driverSet.then(function(){return S._ready===null&&(S._ready=S._initDriver()),S._ready});return O(x,m,m),x},f.prototype.setDriver=function(m,S,x){var w=this;ol(m)||(m=[m]);var R=this._getSupportedDrivers(m);function V(){w._config.driver=w.driver()}function j(re){return w._extend(re),V(),w._ready=w._initStorage(w._config),w._ready}function $(re){return function(){var Ce=0;function ke(){for(;Ce<re.length;){var Ve=re[Ce];return Ce++,w._dbInfo=null,w._ready=null,w.getDriver(Ve).then(j).catch(ke)}V();var rt=new Error("No available storage method found.");return w._driverSet=E.reject(rt),w._driverSet}return ke()}}var G=this._driverSet!==null?this._driverSet.catch(function(){return E.resolve()}):E.resolve();return this._driverSet=G.then(function(){var re=R[0];return w._dbInfo=null,w._ready=null,w.getDriver(re).then(function(Ce){w._driver=Ce._driver,V(),w._wrapLibraryMethodsWithReady(),w._initDriver=$(R)})}).catch(function(){V();var re=new Error("No available storage method found.");return w._driverSet=E.reject(re),w._driverSet}),O(this._driverSet,S,x),this._driverSet},f.prototype.supports=function(m){return!!sl[m]},f.prototype._extend=function(m){ms(this,m)},f.prototype._getSupportedDrivers=function(m){for(var S=[],x=0,w=m.length;x<w;x++){var R=m[x];this.supports(R)&&S.push(R)}return S},f.prototype._wrapLibraryMethodsWithReady=function(){for(var m=0,S=hs.length;m<S;m++)Kp(this,hs[m])},f.prototype.createInstance=function(m){return new f(m)},f}(),qp=new Xp;i.exports=qp},{3:3}]},{},[4])(4)})});var th={schedule(t,e){let n=setTimeout(t,e);return()=>clearTimeout(n)}};function nh(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function rh(t){return!!t&&t.nodeType===Node.ELEMENT_NODE}var As;function ih(t,e){if(!As){let n=Element.prototype;As=n.matches||n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector}return t.nodeType===Node.ELEMENT_NODE?As.call(t,e):!1}function oh(t){let e={};return t.forEach(({propName:n,templateName:r,transform:i})=>{e[nh(r)]=[n,i]}),e}function sh(t,e){return e.get(bs).resolveComponentFactory(t).inputs}function ah(t,e){let n=t.childNodes,r=e.map(()=>[]),i=-1;e.some((o,s)=>o==="*"?(i=s,!0):!1);for(let o=0,s=n.length;o<s;++o){let c=n[o],u=ch(c,e,i);u!==-1&&r[u].push(c)}return r}function ch(t,e,n){let r=n;return rh(t)&&e.some((i,o)=>i!=="*"&&ih(t,i)?(r=o,!0):!1),r}var lh=10,Ns=class{componentFactory;inputMap=new Map;constructor(e,n){this.componentFactory=n.get(bs).resolveComponentFactory(e);for(let r of this.componentFactory.inputs)this.inputMap.set(r.propName,r.templateName)}create(e){return new Rs(this.componentFactory,e,this.inputMap)}},Rs=class{componentFactory;injector;inputMap;eventEmitters=new dl(1);events=this.eventEmitters.pipe(El(e=>Pi(...e)));componentRef=null;scheduledDestroyFn=null;initialInputValues=new Map;ngZone;elementZone;appRef;cdScheduler;constructor(e,n,r){this.componentFactory=e,this.injector=n,this.inputMap=r,this.ngZone=this.injector.get(Mt),this.appRef=this.injector.get(Vi),this.cdScheduler=n.get(Cl),this.elementZone=typeof Zone>"u"?null:this.ngZone.run(()=>Zone.current)}connect(e){this.runInZone(()=>{if(this.scheduledDestroyFn!==null){this.scheduledDestroyFn(),this.scheduledDestroyFn=null;return}this.componentRef===null&&this.initializeComponent(e)})}disconnect(){this.runInZone(()=>{this.componentRef===null||this.scheduledDestroyFn!==null||(this.scheduledDestroyFn=th.schedule(()=>{this.componentRef!==null&&(this.componentRef.destroy(),this.componentRef=null)},lh))})}getInputValue(e){return this.runInZone(()=>this.componentRef===null?this.initialInputValues.get(e):this.componentRef.instance[e])}setInputValue(e,n){if(this.componentRef===null){this.initialInputValues.set(e,n);return}this.runInZone(()=>{this.componentRef.setInput(this.inputMap.get(e)??e,n),this.componentRef.hostView.dirty&&(this.componentRef.changeDetectorRef.markForRefresh(),this.cdScheduler.notify(6))})}initializeComponent(e){let n=Rt.create({providers:[],parent:this.injector}),r=ah(e,this.componentFactory.ngContentSelectors);this.componentRef=this.componentFactory.create(n,r,e),this.initializeInputs(),this.initializeOutputs(this.componentRef),this.appRef.attachView(this.componentRef.hostView),this.componentRef.hostView.detectChanges()}initializeInputs(){for(let[e,n]of this.initialInputValues)this.setInputValue(e,n);this.initialInputValues.clear()}initializeOutputs(e){let n=this.componentFactory.outputs.map(({propName:r,templateName:i})=>{let o=e.instance[r];return new ll(s=>{let c=o.subscribe(u=>s.next({name:i,value:u}));return()=>c.unsubscribe()})});this.eventEmitters.next(n)}runInZone(e){return this.elementZone&&Zone.current!==this.elementZone?this.ngZone.run(e):e()}},Ms=class extends HTMLElement{ngElementEventsSubscription=null};function zl(t,e){let n=sh(t,e.injector),r=e.strategyFactory||new Ns(t,e.injector),i=oh(n);class o extends Ms{injector;static observedAttributes=Object.keys(i);get ngElementStrategy(){if(!this._ngElementStrategy){let c=this._ngElementStrategy=r.create(this.injector||e.injector);n.forEach(({propName:u,transform:d})=>{if(!this.hasOwnProperty(u))return;let g=this[u];delete this[u],c.setInputValue(u,g,d)})}return this._ngElementStrategy}_ngElementStrategy;constructor(c){super(),this.injector=c}attributeChangedCallback(c,u,d,g){let[p,E]=i[c];this.ngElementStrategy.setInputValue(p,d,E)}connectedCallback(){let c=!1;this.ngElementStrategy.events&&(this.subscribeToEvents(),c=!0),this.ngElementStrategy.connect(this),c||this.subscribeToEvents()}disconnectedCallback(){this._ngElementStrategy&&this._ngElementStrategy.disconnect(),this.ngElementEventsSubscription&&(this.ngElementEventsSubscription.unsubscribe(),this.ngElementEventsSubscription=null)}subscribeToEvents(){this.ngElementEventsSubscription=this.ngElementStrategy.events.subscribe(c=>{let u=new CustomEvent(c.name,{detail:c.value});this.dispatchEvent(u)})}}return n.forEach(({propName:s,transform:c})=>{Object.defineProperty(o.prototype,s,{get(){return this.ngElementStrategy.getInputValue(s)},set(u){this.ngElementStrategy.setInputValue(s,u,c)},configurable:!0,enumerable:!0})}),o}var Kl="9.12.6";var Ye=class t{static SDK_VERSION=Kl;static SDK_VERSION_CODE;static SDK="WEB";static LOG_PREFIX="CooeeSDK";static COOEE="cooee";static SESSION_STORAGE_SCROLL_ID="sleid";static IDLE_TIME_IN_SECONDS=30*60;static IN_APP_WRAPPER_NAME="cooee-wrapper";static IN_APP_CONTAINER_NAME="cooee-container";static IN_APP_DEFAULT_PADDING=15;static EVENT_SCREEN_VIEW="CE Screen View";static EVENT_APP_BACKGROUND="CE App Background";static EVENT_TRIGGER_DISPLAYED="CE Trigger Displayed";static EVENT_CAMPAIGN_HOLDOUT="CE Campaign Holdout";static EVENT_CAMPAIGN_REJECTED="CE Campaign Rejected";static EVENT_CAMPAIGN_FAILED="CE Campaign Failed";static EVENT_TRIGGER_CLOSED="CE Trigger Closed";static EVENT_SCROLL="CE Scroll";static EVENT_TRIGGER_CLICKED="CE Trigger Clicked";static EVENT_FORM_SUBMITTED="CE Form Submitted";static EVENT_EXPERIMENT_START="CE Experiment Start";static EVENT_VIDEO_DIALOG_CLOSED="CE Video Dialog Closed";static EVENT_VIDEO_DIALOG_OPENED="CE Video Dialog Opened";static EVENT_VIDEO_CHANGE="CE Video Changed";static EVENT_LAST_VIDEO_ENDED="CE Last Video Ended";static EVENT_VIDEO_MUTED="CE Video Muted";static EVENT_VIDEO_UNMUTED="CE Video Unmuted";static EVENT_ADD_TO_CART_CLICKED="CE Add To Cart Clicked";static EVENT_VIEW_ITEM_CLICKED="CE View Item Clicked";static EVENT_MORE_ITEM_INFO_CLICKED="CE More Item Info Clicked";static EVENT_OPEN_CART_CLICKED="CE Open Cart Clicked";static EVENT_ADD_TO_CART="Add To Cart";static EVENT_REMOVE_FROM_CART="Remove From Cart";static EVENT_VIEW_ITEM="View Item";static EVENT_VIEW_CART="View Cart";static EVENT_OPEN_CART="Open Cart";static EVENT_VIEW_COLLECTION="View Collection";static EVENT_BUY_NOW_CLICKED="Buy Now Clicked";static EVENT_CHECKOUT_STARTED="Checkout Started";static EVENT_REVIEW_CLICKED="Review Clicked";static EVENT_ITEM_THUMBNAIL_CLICKED="Item Thumbnail Clicked";static JS_LOAD_WHITELIST_EVENTS=[this.EVENT_VIEW_ITEM,this.EVENT_VIEW_CART,this.EVENT_VIEW_COLLECTION];static HASH_INITIATE_CHECKOUT="initiate-checkout";static HASH_OPEN_CART_DRAWER="open-cart-drawer";static ADD_BUNDLE_CTA_INBOUND_EVENT="letscooee:inbound:cta:add-bundle";static CTA_OPEN_CART_EVENT="letscooee:outbound:open-cart";static CTA_AFTER_REFRESH_UI="letscooee:outbound:refresh-ui";static POPUP_ACTIVITY_EVENT="letscooee:outbound:popup-activities";static THIRD_PARTY_CHECKOUT_EVENT="letscooee:outbound:third-party-initiate-checkout";static CAMPAIGN_DISPLAYED_ACTIVITY="DISPLAYED";static CAMPAIGN_CLICKED_ACTIVITY="CLICKED";static CAMPAIGN_CLOSED_ACTIVITY="CLOSED";static BLACKLISTED_PAGE_NAMES=["collection","product","cart"];static API_CALL_MAX_ATTEMPTS=3;static API_CALL_RETRY_DELAY=1e3;static PLACEHOLDER_IMAGE="https://cdn.global.letscooee.com/images/placeholders/product.png";static CART_UPDATE_BROADCAST="CART_UPDATE";static GRAPHQL_VERSION="2024-10";static GRAPHQL_API_PATH=`/api/${this.GRAPHQL_VERSION}/graphql.json`;static SHADOW_SPLITTER=":shadow";static CAMPAIGN_ATTRIBUTE="_letscooee_campaign";static CONTENT_ATTRIBUTE="_letscooee_content";static VIA="_via";static PAYMENT_MODAL_DETAILS=[{identifier:"#flo-checkout-wrapper",gateway:"Shopflow"},{identifier:"#fastrr-main-container",gateway:"Shiprocket"},{identifier:"#gokwik-modal-wrapper",gateway:"Gokwik"},{identifier:"#zecpe",gateway:"Ecom 360"}];static{let e=t.SDK_VERSION.split(".").map(n=>n.padStart(2,"0")).join("");t.SDK_VERSION_CODE=parseInt(e,10)}};var An={apiURL:"https://api.sdk.letscooee.com",debug:!1,mode:"production",styleURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${Ye.SDK_VERSION}/dist/widget.min.css`,widgetURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${Ye.SDK_VERSION}/dist/widget.min.js`};var Bt=Ri(ql());var gt=class{static log(...e){Bt.default.info(...e)}static debug(...e){Bt.default.debug(...e)}static error(...e){Bt.default.error(...e)}static warn(...e){Bt.default.warn(...e)}static info(...e){Bt.default.info(...e)}static trace(...e){Bt.default.trace(...e)}};function Zl(t=Ye.LOG_PREFIX){Bt.default.useDefaults({formatter:function(n){n.unshift(`${t} (v${Ye.SDK_VERSION}):`)}});let e=dh();(e==="1"||e==="on")&&(localStorage.cooeeLogLevel="TRACE"),localStorage.cooeeLogLevel?Bt.default.setLevel(Bt.default[localStorage.cooeeLogLevel]):Bt.default.setLevel(An.debug?Bt.default.TRACE:Bt.default.OFF)}function dh(){return new URL(location.href).searchParams?.get("cooee-debug")}var Xr=Ri(Ps());var Ql={providers:[Pl()]};var ph={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},j0=Ie(D({},ph),{"[class.ng-submitted]":"isSubmitted"});var hh=new Qt("",{providedIn:"root",factory:()=>nu}),nu="always";var mh=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=Gn({type:t});static \u0275inj=jn({})}return t})();var ru=(()=>{class t{static withConfig(n){return{ngModule:t,providers:[{provide:hh,useValue:n.callSetDisabledState??nu}]}}static \u0275fac=function(r){return new(r||t)};static \u0275mod=Gn({type:t});static \u0275inj=jn({imports:[mh]})}return t})();var Yt=class{static SWIPER_CSS="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css";static injectScriptURL(e,n){if(!e)return;let r=document.createElement("script");r.id=n??"",r.src=e,r.type="module",document.head.appendChild(r)}static injectRawScript(e){if(!e)return;let n=document.createElement("script");n.id="cooee-app-script",n.innerHTML=e,document.head.appendChild(n)}static injectRawCSS(e,n=document.head){if(!e)return;let r=document.createElement("style");r.textContent=e,n.appendChild(r)}static injectSwiperCSS(e=document.head){this.injectStylesheet(this.SWIPER_CSS,e)}static injectStylesheet(e,n=document.head){if(!e)return;let r=document.createElement("link");r.rel="stylesheet",r.href=e,e===this.SWIPER_CSS&&(r.crossOrigin="anonymous",r.onload=i=>{let s=i.currentTarget?.sheet?.cssRules;if(s){for(let c of s)if(c.type==CSSRule.FONT_FACE_RULE){let u=e.split("/"),d=u.slice(0,u.length-1).join("/"),g=c.cssText;g=g.replace(/url\s*\(\s*['"]?(?!((\/)|((?:https?:)?\/\/)|(?:data:?:)))([^'")]+)['"]?\s*\)/g,`url("${d}/$4")`);let p=document.createElement("style");p.appendChild(document.createTextNode(g)),document.head.appendChild(p)}}}),n.appendChild(r)}static async loadSwiperScript(){window.CooeeSDK.Swiper||(window.CooeeSDK.Swiper=(await import("https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.mjs")).Swiper)}};var pn=class t{cooeeEvent=new it;cooeeCTA=new it;elementRef=K(bt);_engagementTrigger=Wt(null);_triggerContext=Wt(null);constructor(){this.elementRef.nativeElement.update=this.update.bind(this)}get classes(){let e=["letscooee-widget"],n=this._engagementTrigger();return e.push(`widget-${n?.shortID}`),e}get triggerContext(){return this._triggerContext()}set triggerContext(e){this._triggerContext.set(e),this._engagementTrigger.set(e.triggerData),this.engagementTriggerReceived(e.triggerData)}get engagementTrigger(){return this._engagementTrigger()}ngOnInit(){gt.debug("Init",this.constructor.name);let e=this.elementRef.nativeElement.shadowRoot;e&&(Yt.injectStylesheet(An.styleURL,e),Yt.injectRawCSS(window.CooeeSDK.config.website.commonCSS,e))}ngOnDestroy(){gt.debug("Destroying",this.constructor.name)}sendEventToRenderer(e){this.cooeeEvent.emit(e)}executeCTAViaRenderer(e){this.cooeeCTA.emit(e)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Fe({type:t,selectors:[["ng-component"]],hostVars:2,hostBindings:function(n,r){n&2&&Ol(r.classes)},inputs:{triggerContext:"triggerContext"},outputs:{cooeeEvent:"cooeeEvent",cooeeCTA:"cooeeCTA"},decls:0,vars:0,template:function(n,r){},encapsulation:2})};var gh=(t,e,n)=>({"--option-color":t,"background-color":e,color:n}),iu=(t,e)=>e.id;function _h(t,e){if(t&1&&(X(0,"span",6),Te(1),q()),t&2){J();let n=Ct(0);W(),kn(n)}}function yh(t,e){if(t&1){let n=et();Pt(0),X(1,"button",5),Ne("click",function(){let i=Ue(n).$implicit,o=J().$implicit,s=J();return He(s.onOptionChange(o,i))}),De(2,_h,2,1,"span",6),q()}if(t&2){let n=e.$implicit,r=J().$implicit,i=Ct(1),o=J(),s=fn(n.name);W(),Wn("color-type",i)("selected",o.selectedOptions()[r.name]===s),be("disabled",n.disabled)("ngStyle",Nl(9,gh,i?s:"",i?s:"",i?"transparent":"")),xn("data-value",s),W(),Ae(i?-1:2)}}function vh(t,e){if(t&1&&(X(0,"div"),Pt(1),X(2,"div",1),Te(3),q(),X(4,"div",2),Te(5),q(),X(6,"div",3),qe(7,yh,3,13,"button",4,iu),q()()),t&2){let n=e.$implicit,r=J();Dl("option-group ",n.name.toLowerCase(),""),W(),fn(n.name.toLowerCase().includes("color")),W(2),Vt("",n.name,":"),W(2),kn(r.selectedOptions()[n.name]),W(2),Ze(n.optionValues)}}var Yi=class t extends pn{selectedVariant=new it;item=Sl.required();selectedOptions=Wt({});options=Ui(()=>{let e=this.item();if(!e.options||e.vars.length===1)return[];if(window.cooeeManipulateProductOptions)try{window.cooeeManipulateProductOptions(e)}catch(n){gt.error(n)}return e.options});matchedVariant=Ui(()=>{let e=this.item(),n=this.selectedOptions();return e.vars.find(r=>e.options.every(i=>n[i.name]===r.selectedOptions.find(o=>o.name===i.name)?.value))});constructor(){super(),Ts(()=>{let n=this.matchedVariant();n&&(this.item().setSelectedVariant(n),this.selectedVariant.emit(n))});let e=Ts(()=>{let n=this.item();if(!n?.options)return;let r=D({},this.selectedOptions());n.options.forEach(i=>{let o=n.vars[0]?.selectedOptions.find(s=>s.name===i.name)?.value;o&&(r[i.name]=o)}),this.selectedOptions.set(r),e.destroy()})}onOptionChange(e,n){let r=D({},this.selectedOptions());r[e.name]=n.name,this.selectedOptions.set(r)}engagementTriggerReceived(){}update(){}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Fe({type:t,selectors:[["cooee-item-options-picker"]],inputs:{item:[1,"item"]},outputs:{selectedVariant:"selectedVariant"},features:[wt],decls:2,vars:0,consts:[[3,"class"],[1,"name"],[1,"selected-value"],[1,"option-values"],[1,"option-value",3,"disabled","color-type","selected","ngStyle"],[1,"option-value",3,"click","disabled","ngStyle"],[1,"title"]],template:function(n,r){n&1&&qe(0,vh,9,6,"div",0,iu),n&2&&Ze(r.options())},dependencies:[Bl,Fl,ru],styles:[`.option-group{display:flex;gap:8px;align-items:center}.option-group+.option-group{margin-top:8px}.option-values{display:flex;flex-wrap:nowrap;overflow-x:auto;padding:6px;gap:8px}.selected-value{display:none}.option-value{padding:5px 10px;border:1px solid #ccc;cursor:pointer;border-radius:4px;min-width:32px;min-height:32px;text-align:center;position:relative;--selected-color: var(--option-color, rgb(var(--lc-color-button, 0 0 0)))}.option-value.selected{box-shadow:#fff 0 0 0 2px,var(--selected-color) 0 0 0 4px}
11
+ `],encapsulation:3})};var Ls=function(t){return t.SHOPIFY_CHECKOUT="shopify_checkout",t.THIRD_PARTY_CHECKOUT="third_party_checkout",t.CART_PAGE="cart_page",t.CART_DRAWER="cart_drawer",t}(Ls||{});var Ut=function(t){return t[t.NONE=0]="NONE",t[t.REJECT_POPUP=1]="REJECT_POPUP",t[t.ACCEPT_POPUP=2]="ACCEPT_POPUP",t[t.GO_TO_URL=4]="GO_TO_URL",t[t.SHARE=5]="SHARE",t[t.KEY_VALUE=100]="KEY_VALUE",t[t.GO_TO_PRODUCT=101]="GO_TO_PRODUCT",t[t.ADD_TO_CART=102]="ADD_TO_CART",t[t.COPY_COUPON_CODE=103]="COPY_COUPON_CODE",t[t.GO_TO_COLLECTION=104]="GO_TO_COLLECTION",t[t.OPEN_CART=105]="OPEN_CART",t[t.SUBMIT_FORM=106]="SUBMIT_FORM",t[t.INITIATE_CHECKOUT=107]="INITIATE_CHECKOUT",t[t.ADD_BUNDLE=108]="ADD_BUNDLE",t[t.UPGRADE_TO_SUBSCRIPTION=109]="UPGRADE_TO_SUBSCRIPTION",t}(Ut||{});var ii=function(t){return t.FREE_SHIPPING="FREE_SHIPPING",t.DISCOUNT="DISCOUNT",t.FREE_AUTO_GIFT="FREE_AUTO_GIFT",t.FREE_GIFT_SELECT="FREE_GIFT_SELECT",t.UI_ONLY="UI_ONLY",t}(ii||{});var vr=class{id;mID;vID;vName;imageURL;name;link;quantity;price;finalPrice;constructor(e){this.id=e.id,this.mID=e.mID,this.vID=e.vID,this.vName=e.vName,this.imageURL=e.imageURL,this.name=e.name,this.link=e.link,this.quantity=e.quantity,this.price=e.price,this.finalPrice=e.finalPrice??e.price}};var ks=(n=>(n.CART_AMOUNT="CART_AMOUNT",n.ITEM_COUNT="ITEM_COUNT",n))(ks||{});var Er=class{gaEnabled;gaMeasurementID;pixelPush;website;currencyCount;money;storefrontToken;skipItemAttribute;currency;static get(){return window.CooeeSDK.config}update(e){return e??={},this.gaEnabled=e.gaEnabled,this.gaMeasurementID=e.gaMeasurementID,this.pixelPush=e.pixelPush,this.website=e.website??{},this.currencyCount=e.currencyCount??0,this.money=e.money,this.currency=e.currency,this.storefrontToken=e.storefrontToken,this.skipItemAttribute=e.skipItemAttribute,this}};var ou=Object.prototype.toString;function qn(t){switch(ou.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return hn(t,Error)}}function br(t,e){return ou.call(t)===`[object ${e}]`}function zi(t){return br(t,"ErrorEvent")}function Ki(t){return br(t,"DOMError")}function Fs(t){return br(t,"DOMException")}function xt(t){return br(t,"String")}function wr(t){return typeof t=="object"&&t!==null&&"__sentry_template_string__"in t&&"__sentry_template_values__"in t}function Zn(t){return t===null||wr(t)||typeof t!="object"&&typeof t!="function"}function sn(t){return br(t,"Object")}function Jn(t){return typeof Event<"u"&&hn(t,Event)}function Vs(t){return typeof Element<"u"&&hn(t,Element)}function Bs(t){return br(t,"RegExp")}function Nn(t){return!!(t&&t.then&&typeof t.then=="function")}function Us(t){return sn(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function hn(t,e){try{return t instanceof e}catch{return!1}}function oi(t){return!!(typeof t=="object"&&t!==null&&(t.__isVue||t._isVue))}function mn(t,e=0){return typeof t!="string"||e===0||t.length<=e?t:`${t.slice(0,e)}...`}function Xi(t,e){if(!Array.isArray(t))return"";let n=[];for(let r=0;r<t.length;r++){let i=t[r];try{oi(i)?n.push("[VueViewModel]"):n.push(String(i))}catch{n.push("[value cannot be serialized]")}}return n.join(e)}function su(t,e,n=!1){return xt(t)?Bs(e)?e.test(t):xt(e)?n?t===e:t.includes(e):!1:!1}function Cr(t,e=[],n=!1){return e.some(r=>su(t,r,n))}function js(t,e,n=250,r,i,o,s){if(!o.exception||!o.exception.values||!s||!hn(s.originalException,Error))return;let c=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;c&&(o.exception.values=Eh(Hs(t,e,i,s.originalException,r,o.exception.values,c,0),n))}function Hs(t,e,n,r,i,o,s,c){if(o.length>=n+1)return o;let u=[...o];if(hn(r[i],Error)){au(s,c);let d=t(e,r[i]),g=u.length;cu(d,i,g,c),u=Hs(t,e,n,r[i],i,[d,...u],d,g)}return Array.isArray(r.errors)&&r.errors.forEach((d,g)=>{if(hn(d,Error)){au(s,c);let p=t(e,d),E=u.length;cu(p,`errors[${g}]`,E,c),u=Hs(t,e,n,d,i,[p,...u],p,E)}}),u}function au(t,e){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism=Ie(D(D({},t.mechanism),t.type==="AggregateError"&&{is_exception_group:!0}),{exception_id:e})}function cu(t,e,n,r){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism=Ie(D({},t.mechanism),{type:"chained",source:e,exception_id:n,parent_id:r})}function Eh(t,e){return t.map(n=>(n.value&&(n.value=mn(n.value,e)),n))}var zt="8.18.0";var ge=globalThis;function Sr(t,e,n){let r=n||ge,i=r.__SENTRY__=r.__SENTRY__||{},o=i[zt]=i[zt]||{};return o[t]||(o[t]=e())}var $s=ge,bh=80;function si(t,e={}){if(!t)return"<unknown>";try{let n=t,r=5,i=[],o=0,s=0,c=" > ",u=c.length,d,g=Array.isArray(e)?e:e.keyAttrs,p=!Array.isArray(e)&&e.maxStringLength||bh;for(;n&&o++<r&&(d=wh(n,g),!(d==="html"||o>1&&s+i.length*u+d.length>=p));)i.push(d),s+=d.length,n=n.parentNode;return i.reverse().join(c)}catch{return"<unknown>"}}function wh(t,e){let n=t,r=[];if(!n||!n.tagName)return"";if($s.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());let i=e&&e.length?e.filter(s=>n.getAttribute(s)).map(s=>[s,n.getAttribute(s)]):null;if(i&&i.length)i.forEach(s=>{r.push(`[${s[0]}="${s[1]}"]`)});else{n.id&&r.push(`#${n.id}`);let s=n.className;if(s&&xt(s)){let c=s.split(/\s+/);for(let u of c)r.push(`.${u}`)}}let o=["aria-label","type","name","title","alt"];for(let s of o){let c=n.getAttribute(s);c&&r.push(`[${s}="${c}"]`)}return r.join("")}function Gs(){try{return $s.document.location.href}catch{return""}}function Ws(t){if(!$s.HTMLElement)return null;let e=t,n=5;for(let r=0;r<n;r++){if(!e)return null;if(e instanceof HTMLElement){if(e.dataset.sentryComponent)return e.dataset.sentryComponent;if(e.dataset.sentryElement)return e.dataset.sentryElement}e=e.parentNode}return null}var gn=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var Ch="Sentry Logger ",ai=["debug","info","warn","error","log","assert","trace"],Ir={};function xr(t){if(!("console"in ge))return t();let e=ge.console,n={},r=Object.keys(Ir);r.forEach(i=>{let o=Ir[i];n[i]=e[i],e[i]=o});try{return t()}finally{r.forEach(i=>{e[i]=n[i]})}}function Sh(){let t=!1,e={enable:()=>{t=!0},disable:()=>{t=!1},isEnabled:()=>t};return gn?ai.forEach(n=>{e[n]=(...r)=>{t&&xr(()=>{ge.console[n](`${Ch}[${n}]:`,...r)})}}):ai.forEach(n=>{e[n]=()=>{}}),e}var se=Sh();var Ih=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function xh(t){return t==="http"||t==="https"}function _n(t,e=!1){let{host:n,path:r,pass:i,port:o,projectId:s,protocol:c,publicKey:u}=t;return`${c}://${u}${e&&i?`:${i}`:""}@${n}${o?`:${o}`:""}/${r&&`${r}/`}${s}`}function lu(t){let e=Ih.exec(t);if(!e){xr(()=>{console.error(`Invalid Sentry Dsn: ${t}`)});return}let[n,r,i="",o="",s="",c=""]=e.slice(1),u="",d=c,g=d.split("/");if(g.length>1&&(u=g.slice(0,-1).join("/"),d=g.pop()),d){let p=d.match(/^\d+/);p&&(d=p[0])}return uu({host:o,pass:i,path:u,projectId:d,port:s,protocol:n,publicKey:r})}function uu(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function Th(t){if(!gn)return!0;let{port:e,projectId:n,protocol:r}=t;return["protocol","publicKey","host","projectId"].find(s=>t[s]?!1:(se.error(`Invalid Sentry Dsn: ${s} missing`),!0))?!1:n.match(/^\d+$/)?xh(r)?e&&isNaN(parseInt(e,10))?(se.error(`Invalid Sentry Dsn: Invalid port ${e}`),!1):!0:(se.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(se.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function qi(t){let e=typeof t=="string"?lu(t):uu(t);if(!(!e||!Th(e)))return e}var yt=class extends Error{constructor(e,n="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=n}};function ze(t,e,n){if(!(e in t))return;let r=t[e],i=n(r);typeof i=="function"&&Zi(i,r),t[e]=i}function Tt(t,e,n){try{Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}catch{gn&&se.log(`Failed to add non-enumerable property "${e}" to object`,t)}}function Zi(t,e){try{let n=e.prototype||{};t.prototype=e.prototype=n,Tt(t,"__sentry_original__",e)}catch{}}function Qn(t){return t.__sentry_original__}function zs(t){return Object.keys(t).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`).join("&")}function Ji(t){if(qn(t))return D({message:t.message,name:t.name,stack:t.stack},fu(t));if(Jn(t)){let e=D({type:t.type,target:du(t.target),currentTarget:du(t.currentTarget)},fu(t));return typeof CustomEvent<"u"&&hn(t,CustomEvent)&&(e.detail=t.detail),e}else return t}function du(t){try{return Vs(t)?si(t):Object.prototype.toString.call(t)}catch{return"<unknown>"}}function fu(t){if(typeof t=="object"&&t!==null){let e={};for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}else return{}}function Ks(t,e=40){let n=Object.keys(Ji(t));n.sort();let r=n[0];if(!r)return"[object has no keys]";if(r.length>=e)return mn(r,e);for(let i=n.length;i>0;i--){let o=n.slice(0,i).join(", ");if(!(o.length>e))return i===n.length?o:mn(o,e)}return""}function at(t){return Ys(t,new Map)}function Ys(t,e){if(Oh(t)){let n=e.get(t);if(n!==void 0)return n;let r={};e.set(t,r);for(let i of Object.keys(t))typeof t[i]<"u"&&(r[i]=Ys(t[i],e));return r}if(Array.isArray(t)){let n=e.get(t);if(n!==void 0)return n;let r=[];return e.set(t,r),t.forEach(i=>{r.push(Ys(i,e))}),r}return t}function Oh(t){if(!sn(t))return!1;try{let e=Object.getPrototypeOf(t).constructor.name;return!e||e==="Object"}catch{return!0}}var yn="?",pu=/\(error: (.*)\)/,hu=/captureMessage|captureException/;function qs(...t){let e=t.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,i=0)=>{let o=[],s=n.split(`
12
+ `);for(let c=r;c<s.length;c++){let u=s[c];if(u.length>1024)continue;let d=pu.test(u)?u.replace(pu,"$1"):u;if(!d.match(/\S*Error: /)){for(let g of e){let p=g(d);if(p){o.push(p);break}}if(o.length>=50+i)break}}return mu(o.slice(i))}}function mu(t){if(!t.length)return[];let e=Array.from(t);return/sentryWrapped/.test(Qi(e).function||"")&&e.pop(),e.reverse(),hu.test(Qi(e).function||"")&&(e.pop(),hu.test(Qi(e).function||"")&&e.pop()),e.slice(0,50).map(n=>Ie(D({},n),{filename:n.filename||Qi(e).filename,function:n.function||yn}))}function Qi(t){return t[t.length-1]||{}}var Xs="<anonymous>";function Kt(t){try{return!t||typeof t!="function"?Xs:t.name||Xs}catch{return Xs}}function eo(t){let e=t.exception;if(e){let n=[];try{return e.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}var to={},gu={};function Ot(t,e){to[t]=to[t]||[],to[t].push(e)}function Dt(t,e){gu[t]||(e(),gu[t]=!0)}function ct(t,e){let n=t&&to[t];if(n)for(let r of n)try{r(e)}catch(i){gn&&se.error(`Error while triggering instrumentation handler.
13
13
  Type: ${t}
14
- Name: ${nn(r)}
15
- Error:`,i)}}function Ca(t){let e="console";Pt(e,t),Mt(e,Mm)}function Mm(){"console"in _e&&Ii.forEach(function(t){t in _e.console&&Ze(_e.console,t,function(e){return jr[t]=e,function(...n){mt("console",{args:n,level:t});let i=jr[t];i&&i.apply(_e.console,n)}})})}var Ia=_e;function Qu(){if(!("fetch"in Ia))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function xi(t){return t&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function xa(){if(typeof EdgeRuntime=="string")return!0;if(!Qu())return!1;if(xi(Ia.fetch))return!0;let t=!1,e=Ia.document;if(e&&typeof e.createElement=="function")try{let n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(t=xi(n.contentWindow.fetch)),e.head.removeChild(n)}catch(n){Dn&&se.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return t}var ed=1e3;function Rn(){return Date.now()/ed}function km(){let{performance:t}=_e;if(!t||!t.now)return Rn;let e=Date.now()-t.now(),n=t.timeOrigin==null?e:t.timeOrigin;return()=>(n+t.now())/ed}var Kt=km(),Di,Lm=(()=>{let{performance:t}=_e;if(!t||!t.now){Di="none";return}let e=3600*1e3,n=t.now(),r=Date.now(),i=t.timeOrigin?Math.abs(t.timeOrigin+n-r):e,o=i<e,s=t.timing&&t.timing.navigationStart,u=typeof s=="number"?Math.abs(s+n-r):e,d=u<e;return o||d?i<=u?(Di="timeOrigin",t.timeOrigin):(Di="navigationStart",s):(Di="dateNow",r)})();function Ta(t){let e="fetch";Pt(e,t),Mt(e,Fm)}function Fm(){xa()&&Ze(_e,"fetch",function(t){return function(...e){let{method:n,url:r}=Vm(e),i={args:e,fetchData:{method:n,url:r},startTimestamp:Kt()*1e3};mt("fetch",O({},i));let o=new Error().stack;return t.apply(_e,e).then(s=>{let a=xe(O({},i),{endTimestamp:Kt()*1e3,response:s});return mt("fetch",a),s},s=>{let a=xe(O({},i),{endTimestamp:Kt()*1e3,error:s});throw mt("fetch",a),sr(s)&&s.stack===void 0&&(s.stack=o,Nt(s,"framesToPop",1)),s})}})}function Da(t,e){return!!t&&typeof t=="object"&&!!t[e]}function td(t){return typeof t=="string"?t:t?Da(t,"url")?t.url:t.toString?t.toString():"":""}function Vm(t){if(t.length===0)return{method:"GET",url:""};if(t.length===2){let[n,r]=t;return{url:td(n),method:Da(r,"method")?String(r.method).toUpperCase():"GET"}}let e=t[0];return{url:td(e),method:Da(e,"method")?String(e.method).toUpperCase():"GET"}}var wo=null;function Oa(t){let e="error";Pt(e,t),Mt(e,Bm)}function Bm(){wo=_e.onerror,_e.onerror=function(t,e,n,r,i){return mt("error",{column:r,error:i,line:n,msg:t,url:e}),wo&&!wo.__SENTRY_LOADER__?wo.apply(this,arguments):!1},_e.onerror.__SENTRY_INSTRUMENTED__=!0}var bo=null;function Ra(t){let e="unhandledrejection";Pt(e,t),Mt(e,Um)}function Um(){bo=_e.onunhandledrejection,_e.onunhandledrejection=function(t){return mt("unhandledrejection",t),bo&&!bo.__SENTRY_LOADER__?bo.apply(this,arguments):!0},_e.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function Aa(){return"npm"}function nd(){let t=typeof WeakSet=="function",e=t?new WeakSet:[];function n(i){if(t)return e.has(i)?!0:(e.add(i),!1);for(let o=0;o<e.length;o++)if(e[o]===i)return!0;return e.push(i),!1}function r(i){if(t)e.delete(i);else for(let o=0;o<e.length;o++)if(e[o]===i){e.splice(o,1);break}}return[n,r]}function yt(){let t=_e,e=t.crypto||t.msCrypto,n=()=>Math.random()*16;try{if(e&&e.randomUUID)return e.randomUUID().replace(/-/g,"");e&&e.getRandomValues&&(n=()=>{let r=new Uint8Array(1);return e.getRandomValues(r),r[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,r=>(r^(n()&15)>>r/4).toString(16))}function rd(t){return t.exception&&t.exception.values?t.exception.values[0]:void 0}function mn(t){let{message:e,event_id:n}=t;if(e)return e;let r=rd(t);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Gr(t,e,n){let r=t.exception=t.exception||{},i=r.values=r.values||[],o=i[0]=i[0]||{};o.value||(o.value=e||""),o.type||(o.type=n||"Error")}function Gn(t,e){let n=rd(t);if(!n)return;let r={type:"generic",handled:!0},i=n.mechanism;if(n.mechanism=O(O(O({},r),i),e),e&&"data"in e){let o=O(O({},i&&i.data),e.data);n.mechanism.data=o}}function So(t){if(t&&t.__sentry_captured__)return!0;try{Nt(t,"__sentry_captured__",!0)}catch{}return!1}function Co(t){return Array.isArray(t)?t:[t]}function gn(t,e=100,n=1/0){try{return Na("",t,e,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function Io(t,e=3,n=100*1024){let r=gn(t,e);return Gm(r)>n?Io(t,e-1,n):r}function Na(t,e,n=1/0,r=1/0,i=nd()){let[o,s]=i;if(e==null||["number","boolean","string"].includes(typeof e)&&!Number.isNaN(e))return e;let a=Hm(t,e);if(!a.startsWith("[object "))return a;if(e.__sentry_skip_normalization__)return e;let u=typeof e.__sentry_override_normalization_depth__=="number"?e.__sentry_override_normalization_depth__:n;if(u===0)return a.replace("object ","");if(o(e))return"[Circular ~]";let d=e;if(d&&typeof d.toJSON=="function")try{let S=d.toJSON();return Na("",S,u-1,r,i)}catch{}let m=Array.isArray(e)?[]:{},h=0,E=_o(e);for(let S in E){if(!Object.prototype.hasOwnProperty.call(E,S))continue;if(h>=r){m[S]="[MaxProperties ~]";break}let T=E[S];m[S]=Na(S,T,u-1,r,i),h++}return s(e),m}function Hm(t,e){try{if(t==="domain"&&e&&typeof e=="object"&&e._events)return"[Domain]";if(t==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&e===global)return"[Global]";if(typeof window<"u"&&e===window)return"[Window]";if(typeof document<"u"&&e===document)return"[Document]";if(Si(e))return"[VueViewModel]";if(ha(e))return"[SyntheticEvent]";if(typeof e=="number"&&e!==e)return"[NaN]";if(typeof e=="function")return`[Function: ${nn(e)}]`;if(typeof e=="symbol")return`[${String(e)}]`;if(typeof e=="bigint")return`[BigInt: ${String(e)}]`;let n=jm(e);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function jm(t){let e=Object.getPrototypeOf(t);return e?e.constructor.name:"null prototype"}function $m(t){return~-encodeURI(t).split(/%..|./).length}function Gm(t){return $m(JSON.stringify(t))}var Wn;(function(t){t[t.PENDING=0]="PENDING";let n=1;t[t.RESOLVED=n]="RESOLVED";let r=2;t[t.REJECTED=r]="REJECTED"})(Wn||(Wn={}));function rn(t){return new _n(e=>{e(t)})}function er(t){return new _n((e,n)=>{n(t)})}var _n=class t{constructor(e){t.prototype.__init.call(this),t.prototype.__init2.call(this),t.prototype.__init3.call(this),t.prototype.__init4.call(this),this._state=Wn.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(n){this._reject(n)}}then(e,n){return new t((r,i)=>{this._handlers.push([!1,o=>{if(!e)r(o);else try{r(e(o))}catch(s){i(s)}},o=>{if(!n)i(o);else try{r(n(o))}catch(s){i(s)}}]),this._executeHandlers()})}catch(e){return this.then(n=>n,e)}finally(e){return new t((n,r)=>{let i,o;return this.then(s=>{o=!1,i=s,e&&e()},s=>{o=!0,i=s,e&&e()}).then(()=>{if(o){r(i);return}n(i)})})}__init(){this._resolve=e=>{this._setResult(Wn.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(Wn.REJECTED,e)}}__init3(){this._setResult=(e,n)=>{if(this._state===Wn.PENDING){if($n(n)){n.then(this._resolve,this._reject);return}this._state=e,this._value=n,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===Wn.PENDING)return;let e=this._handlers.slice();this._handlers=[],e.forEach(n=>{n[0]||(this._state===Wn.RESOLVED&&n[1](this._value),this._state===Wn.REJECTED&&n[2](this._value),n[0]=!0)})}}};function Pa(t){let e=[];function n(){return t===void 0||e.length<t}function r(s){return e.splice(e.indexOf(s),1)[0]||Promise.resolve(void 0)}function i(s){if(!n())return er(new It("Not adding Promise because buffer limit was reached."));let a=s();return e.indexOf(a)===-1&&e.push(a),a.then(()=>r(a)).then(null,()=>r(a).then(null,()=>{})),a}function o(s){return new _n((a,u)=>{let d=e.length;if(!d)return a(!0);let m=setTimeout(()=>{s&&s>0&&a(!1)},s);e.forEach(h=>{rn(h).then(()=>{--d||(clearTimeout(m),a(!0))},u)})})}return{$:e,add:i,drain:o}}function Ti(t){if(!t)return{};let e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};let n=e[6]||"",r=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],search:n,hash:r,relative:e[5]+n+r}}var id=["fatal","error","warning","log","info","debug"];function Ma(t){return t==="warn"?"warning":id.includes(t)?t:"log"}var sd="sentry-",ad=/^sentry-/;function ka(t){let e=cd(t);if(!e)return;let n=Object.entries(e).reduce((r,[i,o])=>{if(i.match(ad)){let s=i.slice(sd.length);r[s]=o}return r},{});if(Object.keys(n).length>0)return n}function cd(t){if(!(!t||!At(t)&&!Array.isArray(t)))return Array.isArray(t)?t.reduce((e,n)=>{let r=od(n);return Object.entries(r).forEach(([i,o])=>{e[i]=o}),e},{}):od(t)}function od(t){return t.split(",").map(e=>e.split("=").map(n=>decodeURIComponent(n.trim()))).reduce((e,[n,r])=>(n&&r&&(e[n]=r),e),{})}function An(t,e=[]){return[t,e]}function Fa(t,e){let[n,r]=t;return[n,[...r,e]]}function xo(t,e){let n=t[1];for(let r of n){let i=r[0].type;if(e(r,i))return!0}return!1}function La(t){return _e.__SENTRY__&&_e.__SENTRY__.encodePolyfill?_e.__SENTRY__.encodePolyfill(t):new TextEncoder().encode(t)}function Va(t){let[e,n]=t,r=JSON.stringify(e);function i(o){typeof r=="string"?r=typeof o=="string"?r+o:[La(r),o]:r.push(typeof o=="string"?La(o):o)}for(let o of n){let[s,a]=o;if(i(`
14
+ Name: ${Kt(r)}
15
+ Error:`,i)}}function Zs(t){let e="console";Ot(e,t),Dt(e,Dh)}function Dh(){"console"in ge&&ai.forEach(function(t){t in ge.console&&ze(ge.console,t,function(e){return Ir[t]=e,function(...n){ct("console",{args:n,level:t});let i=Ir[t];i&&i.apply(ge.console,n)}})})}var Js=ge;function _u(){if(!("fetch"in Js))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function ci(t){return t&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function Qs(){if(typeof EdgeRuntime=="string")return!0;if(!_u())return!1;if(ci(Js.fetch))return!0;let t=!1,e=Js.document;if(e&&typeof e.createElement=="function")try{let n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(t=ci(n.contentWindow.fetch)),e.head.removeChild(n)}catch(n){gn&&se.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return t}var yu=1e3;function vn(){return Date.now()/yu}function Ah(){let{performance:t}=ge;if(!t||!t.now)return vn;let e=Date.now()-t.now(),n=t.timeOrigin==null?e:t.timeOrigin;return()=>(n+t.now())/yu}var Ht=Ah(),li,Nh=(()=>{let{performance:t}=ge;if(!t||!t.now){li="none";return}let e=3600*1e3,n=t.now(),r=Date.now(),i=t.timeOrigin?Math.abs(t.timeOrigin+n-r):e,o=i<e,s=t.timing&&t.timing.navigationStart,u=typeof s=="number"?Math.abs(s+n-r):e,d=u<e;return o||d?i<=u?(li="timeOrigin",t.timeOrigin):(li="navigationStart",s):(li="dateNow",r)})();function ta(t){let e="fetch";Ot(e,t),Dt(e,Rh)}function Rh(){Qs()&&ze(ge,"fetch",function(t){return function(...e){let{method:n,url:r}=Mh(e),i={args:e,fetchData:{method:n,url:r},startTimestamp:Ht()*1e3};ct("fetch",D({},i));let o=new Error().stack;return t.apply(ge,e).then(s=>{let c=Ie(D({},i),{endTimestamp:Ht()*1e3,response:s});return ct("fetch",c),s},s=>{let c=Ie(D({},i),{endTimestamp:Ht()*1e3,error:s});throw ct("fetch",c),qn(s)&&s.stack===void 0&&(s.stack=o,Tt(s,"framesToPop",1)),s})}})}function ea(t,e){return!!t&&typeof t=="object"&&!!t[e]}function vu(t){return typeof t=="string"?t:t?ea(t,"url")?t.url:t.toString?t.toString():"":""}function Mh(t){if(t.length===0)return{method:"GET",url:""};if(t.length===2){let[n,r]=t;return{url:vu(n),method:ea(r,"method")?String(r.method).toUpperCase():"GET"}}let e=t[0];return{url:vu(e),method:ea(e,"method")?String(e.method).toUpperCase():"GET"}}var no=null;function na(t){let e="error";Ot(e,t),Dt(e,Ph)}function Ph(){no=ge.onerror,ge.onerror=function(t,e,n,r,i){return ct("error",{column:r,error:i,line:n,msg:t,url:e}),no&&!no.__SENTRY_LOADER__?no.apply(this,arguments):!1},ge.onerror.__SENTRY_INSTRUMENTED__=!0}var ro=null;function ra(t){let e="unhandledrejection";Ot(e,t),Dt(e,Lh)}function Lh(){ro=ge.onunhandledrejection,ge.onunhandledrejection=function(t){return ct("unhandledrejection",t),ro&&!ro.__SENTRY_LOADER__?ro.apply(this,arguments):!0},ge.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function ia(){return"npm"}function Eu(){let t=typeof WeakSet=="function",e=t?new WeakSet:[];function n(i){if(t)return e.has(i)?!0:(e.add(i),!1);for(let o=0;o<e.length;o++)if(e[o]===i)return!0;return e.push(i),!1}function r(i){if(t)e.delete(i);else for(let o=0;o<e.length;o++)if(e[o]===i){e.splice(o,1);break}}return[n,r]}function pt(){let t=ge,e=t.crypto||t.msCrypto,n=()=>Math.random()*16;try{if(e&&e.randomUUID)return e.randomUUID().replace(/-/g,"");e&&e.getRandomValues&&(n=()=>{let r=new Uint8Array(1);return e.getRandomValues(r),r[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,r=>(r^(n()&15)>>r/4).toString(16))}function bu(t){return t.exception&&t.exception.values?t.exception.values[0]:void 0}function an(t){let{message:e,event_id:n}=t;if(e)return e;let r=bu(t);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Tr(t,e,n){let r=t.exception=t.exception||{},i=r.values=r.values||[],o=i[0]=i[0]||{};o.value||(o.value=e||""),o.type||(o.type=n||"Error")}function Rn(t,e){let n=bu(t);if(!n)return;let r={type:"generic",handled:!0},i=n.mechanism;if(n.mechanism=D(D(D({},r),i),e),e&&"data"in e){let o=D(D({},i&&i.data),e.data);n.mechanism.data=o}}function io(t){if(t&&t.__sentry_captured__)return!0;try{Tt(t,"__sentry_captured__",!0)}catch{}return!1}function oo(t){return Array.isArray(t)?t:[t]}function cn(t,e=100,n=1/0){try{return oa("",t,e,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function so(t,e=3,n=100*1024){let r=cn(t,e);return Bh(r)>n?so(t,e-1,n):r}function oa(t,e,n=1/0,r=1/0,i=Eu()){let[o,s]=i;if(e==null||["number","boolean","string"].includes(typeof e)&&!Number.isNaN(e))return e;let c=kh(t,e);if(!c.startsWith("[object "))return c;if(e.__sentry_skip_normalization__)return e;let u=typeof e.__sentry_override_normalization_depth__=="number"?e.__sentry_override_normalization_depth__:n;if(u===0)return c.replace("object ","");if(o(e))return"[Circular ~]";let d=e;if(d&&typeof d.toJSON=="function")try{let C=d.toJSON();return oa("",C,u-1,r,i)}catch{}let g=Array.isArray(e)?[]:{},p=0,E=Ji(e);for(let C in E){if(!Object.prototype.hasOwnProperty.call(E,C))continue;if(p>=r){g[C]="[MaxProperties ~]";break}let O=E[C];g[C]=oa(C,O,u-1,r,i),p++}return s(e),g}function kh(t,e){try{if(t==="domain"&&e&&typeof e=="object"&&e._events)return"[Domain]";if(t==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&e===global)return"[Global]";if(typeof window<"u"&&e===window)return"[Window]";if(typeof document<"u"&&e===document)return"[Document]";if(oi(e))return"[VueViewModel]";if(Us(e))return"[SyntheticEvent]";if(typeof e=="number"&&e!==e)return"[NaN]";if(typeof e=="function")return`[Function: ${Kt(e)}]`;if(typeof e=="symbol")return`[${String(e)}]`;if(typeof e=="bigint")return`[BigInt: ${String(e)}]`;let n=Fh(e);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function Fh(t){let e=Object.getPrototypeOf(t);return e?e.constructor.name:"null prototype"}function Vh(t){return~-encodeURI(t).split(/%..|./).length}function Bh(t){return Vh(JSON.stringify(t))}var Mn;(function(t){t[t.PENDING=0]="PENDING";let n=1;t[t.RESOLVED=n]="RESOLVED";let r=2;t[t.REJECTED=r]="REJECTED"})(Mn||(Mn={}));function Xt(t){return new ln(e=>{e(t)})}function Bn(t){return new ln((e,n)=>{n(t)})}var ln=class t{constructor(e){t.prototype.__init.call(this),t.prototype.__init2.call(this),t.prototype.__init3.call(this),t.prototype.__init4.call(this),this._state=Mn.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(n){this._reject(n)}}then(e,n){return new t((r,i)=>{this._handlers.push([!1,o=>{if(!e)r(o);else try{r(e(o))}catch(s){i(s)}},o=>{if(!n)i(o);else try{r(n(o))}catch(s){i(s)}}]),this._executeHandlers()})}catch(e){return this.then(n=>n,e)}finally(e){return new t((n,r)=>{let i,o;return this.then(s=>{o=!1,i=s,e&&e()},s=>{o=!0,i=s,e&&e()}).then(()=>{if(o){r(i);return}n(i)})})}__init(){this._resolve=e=>{this._setResult(Mn.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(Mn.REJECTED,e)}}__init3(){this._setResult=(e,n)=>{if(this._state===Mn.PENDING){if(Nn(n)){n.then(this._resolve,this._reject);return}this._state=e,this._value=n,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===Mn.PENDING)return;let e=this._handlers.slice();this._handlers=[],e.forEach(n=>{n[0]||(this._state===Mn.RESOLVED&&n[1](this._value),this._state===Mn.REJECTED&&n[2](this._value),n[0]=!0)})}}};function sa(t){let e=[];function n(){return t===void 0||e.length<t}function r(s){return e.splice(e.indexOf(s),1)[0]||Promise.resolve(void 0)}function i(s){if(!n())return Bn(new yt("Not adding Promise because buffer limit was reached."));let c=s();return e.indexOf(c)===-1&&e.push(c),c.then(()=>r(c)).then(null,()=>r(c).then(null,()=>{})),c}function o(s){return new ln((c,u)=>{let d=e.length;if(!d)return c(!0);let g=setTimeout(()=>{s&&s>0&&c(!1)},s);e.forEach(p=>{Xt(p).then(()=>{--d||(clearTimeout(g),c(!0))},u)})})}return{$:e,add:i,drain:o}}function ui(t){if(!t)return{};let e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};let n=e[6]||"",r=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],search:n,hash:r,relative:e[5]+n+r}}var wu=["fatal","error","warning","log","info","debug"];function aa(t){return t==="warn"?"warning":wu.includes(t)?t:"log"}var Su="sentry-",Iu=/^sentry-/;function ca(t){let e=xu(t);if(!e)return;let n=Object.entries(e).reduce((r,[i,o])=>{if(i.match(Iu)){let s=i.slice(Su.length);r[s]=o}return r},{});if(Object.keys(n).length>0)return n}function xu(t){if(!(!t||!xt(t)&&!Array.isArray(t)))return Array.isArray(t)?t.reduce((e,n)=>{let r=Cu(n);return Object.entries(r).forEach(([i,o])=>{e[i]=o}),e},{}):Cu(t)}function Cu(t){return t.split(",").map(e=>e.split("=").map(n=>decodeURIComponent(n.trim()))).reduce((e,[n,r])=>(n&&r&&(e[n]=r),e),{})}function En(t,e=[]){return[t,e]}function ua(t,e){let[n,r]=t;return[n,[...r,e]]}function ao(t,e){let n=t[1];for(let r of n){let i=r[0].type;if(e(r,i))return!0}return!1}function la(t){return ge.__SENTRY__&&ge.__SENTRY__.encodePolyfill?ge.__SENTRY__.encodePolyfill(t):new TextEncoder().encode(t)}function da(t){let[e,n]=t,r=JSON.stringify(e);function i(o){typeof r=="string"?r=typeof o=="string"?r+o:[la(r),o]:r.push(typeof o=="string"?la(o):o)}for(let o of n){let[s,c]=o;if(i(`
16
16
  ${JSON.stringify(s)}
17
- `),typeof a=="string"||a instanceof Uint8Array)i(a);else{let u;try{u=JSON.stringify(a)}catch{u=JSON.stringify(gn(a))}i(u)}}return typeof r=="string"?r:Wm(r)}function Wm(t){let e=t.reduce((i,o)=>i+o.length,0),n=new Uint8Array(e),r=0;for(let i of t)n.set(i,r),r+=i.length;return n}function Ba(t){let e=typeof t.data=="string"?La(t.data):t.data;return[pt({type:"attachment",length:e.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType}),e]}var zm={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket"};function Do(t){return zm[t]}function To(t){if(!t||!t.sdk)return;let{name:e,version:n}=t.sdk;return{name:e,version:n}}function Ua(t,e,n,r){let i=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.dynamicSamplingContext;return O(O(O({event_id:t.event_id,sent_at:new Date().toISOString()},e&&{sdk:e}),!!n&&r&&{dsn:Tn(r)}),i&&{trace:pt(O({},i))})}function Ha(t,e,n){let r=[{type:"client_report"},{timestamp:n||Rn(),discarded_events:t}];return An(e?{dsn:e}:{},[r])}function ld(t,e=Date.now()){let n=parseInt(`${t}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${t}`);return isNaN(r)?6e4:r-e}function ud(t,e){return t[e]||t.all||0}function ja(t,e,n=Date.now()){return ud(t,e)>n}function $a(t,{statusCode:e,headers:n},r=Date.now()){let i=O({},t),o=n&&n["x-sentry-rate-limits"],s=n&&n["retry-after"];if(o)for(let a of o.trim().split(",")){let[u,d,,,m]=a.split(":",5),h=parseInt(u,10),E=(isNaN(h)?60:h)*1e3;if(!d)i.all=r+E;else for(let S of d.split(";"))S==="metric_bucket"?(!m||m.split(";").includes("custom"))&&(i[S]=r+E):i[S]=r+E}else s?i.all=r+ld(s,r):e===429&&(i.all=r+60*1e3);return i}function Oo(){return{traceId:yt(),spanId:yt().substring(16)}}var Ro=_e;function Ga(){let t=Ro.chrome,e=t&&t.app&&t.app.runtime,n="history"in Ro&&!!Ro.history.pushState&&!!Ro.history.replaceState;return!e&&n}var je=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function ur(){return Oi(_e),_e}function Oi(t){let e=t.__SENTRY__=t.__SENTRY__||{};return e.version=e.version||tn,e[tn]=e[tn]||{}}function Ri(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),!t.did&&!e.did&&(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||Kt(),e.abnormal_mechanism&&(t.abnormal_mechanism=e.abnormal_mechanism),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=e.sid.length===32?e.sid:yt()),e.init!==void 0&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),typeof e.started=="number"&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if(typeof e.duration=="number")t.duration=e.duration;else{let n=t.timestamp-t.started;t.duration=n>=0?n:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),typeof e.errors=="number"&&(t.errors=e.errors),e.status&&(t.status=e.status)}var Wa="_sentrySpan";function za(t,e){e?Nt(t,Wa,e):delete t[Wa]}function Ya(t){return t[Wa]}var Xm=100,Ka=class t{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=Oo()}clone(){let e=new t;return e._breadcrumbs=[...this._breadcrumbs],e._tags=O({},this._tags),e._extra=O({},this._extra),e._contexts=O({},this._contexts),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata=O({},this._sdkProcessingMetadata),e._propagationContext=O({},this._propagationContext),e._client=this._client,e._lastEventId=this._lastEventId,za(e,Ya(this)),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&Ri(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags=O(O({},this._tags),e),this._notifyScopeListeners(),this}setTag(e,n){return this._tags=xe(O({},this._tags),{[e]:n}),this._notifyScopeListeners(),this}setExtras(e){return this._extra=O(O({},this._extra),e),this._notifyScopeListeners(),this}setExtra(e,n){return this._extra=xe(O({},this._extra),{[e]:n}),this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,n){return n===null?delete this._contexts[e]:this._contexts[e]=n,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;let n=typeof e=="function"?e(this):e,[r,i]=n instanceof xt?[n.getScopeData(),n.getRequestSession()]:pn(n)?[e,e.requestSession]:[],{tags:o,extra:s,user:a,contexts:u,level:d,fingerprint:m=[],propagationContext:h}=r||{};return this._tags=O(O({},this._tags),o),this._extra=O(O({},this._extra),s),this._contexts=O(O({},this._contexts),u),a&&Object.keys(a).length&&(this._user=a),d&&(this._level=d),m.length&&(this._fingerprint=m),h&&(this._propagationContext=h),i&&(this._requestSession=i),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,za(this,void 0),this._attachments=[],this._propagationContext=Oo(),this._notifyScopeListeners(),this}addBreadcrumb(e,n){let r=typeof n=="number"?n:Xm;if(r<=0)return this;let i=O({timestamp:Rn()},e),o=this._breadcrumbs;return o.push(i),this._breadcrumbs=o.length>r?o.slice(-r):o,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:Ya(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=O(O({},this._sdkProcessingMetadata),e),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,n){let r=n&&n.event_id?n.event_id:yt();if(!this._client)return se.warn("No client configured on scope - will not capture exception!"),r;let i=new Error("Sentry syntheticException");return this._client.captureException(e,xe(O({originalException:e,syntheticException:i},n),{event_id:r}),this),r}captureMessage(e,n,r){let i=r&&r.event_id?r.event_id:yt();if(!this._client)return se.warn("No client configured on scope - will not capture message!"),i;let o=new Error(e);return this._client.captureMessage(e,n,xe(O({originalException:e,syntheticException:o},r),{event_id:i}),this),i}captureEvent(e,n){let r=n&&n.event_id?n.event_id:yt();return this._client?(this._client.captureEvent(e,xe(O({},n),{event_id:r}),this),r):(se.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}},xt=Ka;function dd(){return Hr("defaultCurrentScope",()=>new xt)}function fd(){return Hr("defaultIsolationScope",()=>new xt)}var Xa=class{constructor(e,n){let r;e?r=e:r=new xt;let i;n?i=n:i=new xt,this._stack=[{scope:r}],this._isolationScope=i}withScope(e){let n=this._pushScope(),r;try{r=e(n)}catch(i){throw this._popScope(),i}return $n(r)?r.then(i=>(this._popScope(),i),i=>{throw this._popScope(),i}):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){let e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}};function Wr(){let t=ur(),e=Oi(t);return e.stack=e.stack||new Xa(dd(),fd())}function qm(t){return Wr().withScope(t)}function Zm(t,e){let n=Wr();return n.withScope(()=>(n.getStackTop().scope=t,e(t)))}function hd(t){return Wr().withScope(()=>t(Wr().getIsolationScope()))}function pd(){return{withIsolationScope:hd,withScope:qm,withSetScope:Zm,withSetIsolationScope:(t,e)=>hd(e),getCurrentScope:()=>Wr().getScope(),getIsolationScope:()=>Wr().getIsolationScope()}}function Ao(t){let e=Oi(t);return e.acs?e.acs:pd()}function dr(){let t=ur();return Ao(t).getCurrentScope()}function fr(){let t=ur();return Ao(t).getIsolationScope()}function No(){return Hr("globalScope",()=>new xt)}function Po(...t){let e=ur(),n=Ao(e);if(t.length===2){let[r,i]=t;return r?n.withSetScope(r,i):n.withScope(i)}return n.withScope(t[0])}function Je(){return dr().getClient()}var Jm="_sentryMetrics";function md(t){let e=t[Jm];if(!e)return;let n={};for(let[,[r,i]]of e)(n[r]||(n[r]=[])).push(pt(i));return n}var qa="sentry.source",Za="sentry.sample_rate",Ja="sentry.op",Qa="sentry.origin";var Qm=1;function vd(t){let{spanId:e,traceId:n}=t.spanContext(),{parent_span_id:r}=hr(t);return pt({parent_span_id:r,span_id:e,trace_id:n})}function gd(t){return typeof t=="number"?_d(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?_d(t.getTime()):Kt()}function _d(t){return t>9999999999?t/1e3:t}function hr(t){if(tg(t))return t.getSpanJSON();try{let{spanId:e,traceId:n}=t.spanContext();if(eg(t)){let{attributes:r,startTime:i,name:o,endTime:s,parentSpanId:a,status:u}=t;return pt({span_id:e,trace_id:n,data:r,description:o,parent_span_id:a,start_timestamp:gd(i),timestamp:gd(s)||void 0,status:ng(u),op:r[Ja],origin:r[Qa],_metrics_summary:md(t)})}return{span_id:e,trace_id:n}}catch{return{}}}function eg(t){let e=t;return!!e.attributes&&!!e.startTime&&!!e.name&&!!e.endTime&&!!e.status}function tg(t){return typeof t.getSpanJSON=="function"}function yd(t){let{traceFlags:e}=t.spanContext();return e===Qm}function ng(t){if(!(!t||t.code===0))return t.code===1?"ok":t.message||"unknown_error"}var rg="_sentryRootSpan";function Ai(t){return t[rg]||t}var Mo="production";var ig="_frozenDsc";function ec(t,e){let n=e.getOptions(),{publicKey:r}=e.getDsn()||{},i=pt({environment:n.environment||Mo,release:n.release,public_key:r,trace_id:t});return e.emit("createDsc",i),i}function Ed(t){let e=Je();if(!e)return{};let n=ec(hr(t).trace_id||"",e),r=Ai(t),i=r[ig];if(i)return i;let o=r.spanContext().traceState,s=o&&o.get("sentry.dsc"),a=s&&ka(s);if(a)return a;let u=hr(r),d=u.data||{},m=d[Za];m!=null&&(n.sample_rate=`${m}`);let h=d[qa],E=u.description;return h!=="url"&&E&&(n.transaction=E),n.sampled=String(yd(r)),e.emit("createDsc",n,r),n}function wd(t){if(typeof t=="boolean")return Number(t);let e=typeof t=="string"?parseFloat(t):t;if(typeof e!="number"||isNaN(e)||e<0||e>1){je&&se.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(t)} of type ${JSON.stringify(typeof t)}.`);return}return e}function og(t,e){return e&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=[...t.sdk.integrations||[],...e.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...e.packages||[]]),t}function bd(t,e,n,r){let i=To(n),o=O(O({sent_at:new Date().toISOString()},i&&{sdk:i}),!!r&&e&&{dsn:Tn(e)}),s="aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()];return An(o,[s])}function Sd(t,e,n,r){let i=To(n),o=t.type&&t.type!=="replay_event"?t.type:"event";og(t,n&&n.sdk);let s=Ua(t,i,r,e);return delete t.sdkProcessingMetadata,An(s,[[{type:o},t]])}function ko(t,e,n,r=0){return new _n((i,o)=>{let s=t[r];if(e===null||typeof s!="function")i(e);else{let a=s(O({},e),n);je&&s.id&&a===null&&se.log(`Event processor "${s.id}" dropped event`),$n(a)?a.then(u=>ko(t,u,n,r+1).then(i)).then(null,o):ko(t,a,n,r+1).then(i).then(null,o)}})}function Cd(t,e){let{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:o}=e;sg(t,e),r&&lg(t,r),ug(t,n),ag(t,i),cg(t,o)}function tc(t,e){let{extra:n,tags:r,user:i,contexts:o,level:s,sdkProcessingMetadata:a,breadcrumbs:u,fingerprint:d,eventProcessors:m,attachments:h,propagationContext:E,transactionName:S,span:T}=e;Ni(t,"extra",n),Ni(t,"tags",r),Ni(t,"user",i),Ni(t,"contexts",o),Ni(t,"sdkProcessingMetadata",a),s&&(t.level=s),S&&(t.transactionName=S),T&&(t.span=T),u.length&&(t.breadcrumbs=[...t.breadcrumbs,...u]),d.length&&(t.fingerprint=[...t.fingerprint,...d]),m.length&&(t.eventProcessors=[...t.eventProcessors,...m]),h.length&&(t.attachments=[...t.attachments,...h]),t.propagationContext=O(O({},t.propagationContext),E)}function Ni(t,e,n){if(n&&Object.keys(n).length){t[e]=O({},t[e]);for(let r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[e][r]=n[r])}}function sg(t,e){let{extra:n,tags:r,user:i,contexts:o,level:s,transactionName:a}=e,u=pt(n);u&&Object.keys(u).length&&(t.extra=O(O({},u),t.extra));let d=pt(r);d&&Object.keys(d).length&&(t.tags=O(O({},d),t.tags));let m=pt(i);m&&Object.keys(m).length&&(t.user=O(O({},m),t.user));let h=pt(o);h&&Object.keys(h).length&&(t.contexts=O(O({},h),t.contexts)),s&&(t.level=s),a&&t.type!=="transaction"&&(t.transaction=a)}function ag(t,e){let n=[...t.breadcrumbs||[],...e];t.breadcrumbs=n.length?n:void 0}function cg(t,e){t.sdkProcessingMetadata=O(O({},t.sdkProcessingMetadata),e)}function lg(t,e){t.contexts=O({trace:vd(e)},t.contexts),t.sdkProcessingMetadata=O({dynamicSamplingContext:Ed(e)},t.sdkProcessingMetadata);let n=Ai(e),r=hr(n).description;r&&!t.transaction&&t.type==="transaction"&&(t.transaction=r)}function ug(t,e){t.fingerprint=t.fingerprint?Co(t.fingerprint):[],e&&(t.fingerprint=t.fingerprint.concat(e)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}function xd(t,e,n,r,i,o){let{normalizeDepth:s=3,normalizeMaxBreadth:a=1e3}=t,u=xe(O({},e),{event_id:e.event_id||n.event_id||yt(),timestamp:e.timestamp||Rn()}),d=n.integrations||t.integrations.map(P=>P.name);dg(u,t),pg(u,d),i&&i.emit("applyFrameMetadata",e),e.type===void 0&&fg(u,t.stackParser);let m=gg(r,n.captureContext);n.mechanism&&Gn(u,n.mechanism);let h=i?i.getEventProcessors():[],E=No().getScopeData();if(o){let P=o.getScopeData();tc(E,P)}if(m){let P=m.getScopeData();tc(E,P)}let S=[...n.attachments||[],...E.attachments];S.length&&(n.attachments=S),Cd(u,E);let T=[...h,...E.eventProcessors];return ko(T,u,n).then(P=>(P&&hg(P),typeof s=="number"&&s>0?mg(P,s,a):P))}function dg(t,e){let{environment:n,release:r,dist:i,maxValueLength:o=250}=e;"environment"in t||(t.environment="environment"in e?n:Mo),t.release===void 0&&r!==void 0&&(t.release=r),t.dist===void 0&&i!==void 0&&(t.dist=i),t.message&&(t.message=xn(t.message,o));let s=t.exception&&t.exception.values&&t.exception.values[0];s&&s.value&&(s.value=xn(s.value,o));let a=t.request;a&&a.url&&(a.url=xn(a.url,o))}var Id=new WeakMap;function fg(t,e){let n=_e._sentryDebugIds;if(!n)return;let r,i=Id.get(e);i?r=i:(r=new Map,Id.set(e,r));let o=Object.entries(n).reduce((s,[a,u])=>{let d,m=r.get(a);m?d=m:(d=e(a),r.set(a,d));for(let h=d.length-1;h>=0;h--){let E=d[h];if(E.filename){s[E.filename]=u;break}}return s},{});try{t.exception.values.forEach(s=>{s.stacktrace.frames.forEach(a=>{a.filename&&(a.debug_id=o[a.filename])})})}catch{}}function hg(t){let e={};try{t.exception.values.forEach(r=>{r.stacktrace.frames.forEach(i=>{i.debug_id&&(i.abs_path?e[i.abs_path]=i.debug_id:i.filename&&(e[i.filename]=i.debug_id),delete i.debug_id)})})}catch{}if(Object.keys(e).length===0)return;t.debug_meta=t.debug_meta||{},t.debug_meta.images=t.debug_meta.images||[];let n=t.debug_meta.images;Object.entries(e).forEach(([r,i])=>{n.push({type:"sourcemap",code_file:r,debug_id:i})})}function pg(t,e){e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}function mg(t,e,n){if(!t)return null;let r=O(O(O(O(O({},t),t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(i=>O(O({},i),i.data&&{data:gn(i.data,e,n)}))}),t.user&&{user:gn(t.user,e,n)}),t.contexts&&{contexts:gn(t.contexts,e,n)}),t.extra&&{extra:gn(t.extra,e,n)});return t.contexts&&t.contexts.trace&&r.contexts&&(r.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(r.contexts.trace.data=gn(t.contexts.trace.data,e,n))),t.spans&&(r.spans=t.spans.map(i=>O(O({},i),i.data&&{data:gn(i.data,e,n)}))),r}function gg(t,e){if(!e)return t;let n=t?t.clone():new xt;return n.update(e),n}function Dd(t){if(t)return _g(t)?{captureContext:t}:yg(t)?{captureContext:t}:t}function _g(t){return t instanceof xt||typeof t=="function"}var vg=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function yg(t){return Object.keys(t).some(e=>vg.includes(e))}function Lo(t,e){return dr().captureException(t,Dd(e))}function Pi(t,e){return dr().captureEvent(t,e)}var Eg="7";function wg(t){let e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}function bg(t){return`${wg(t)}${t.projectId}/envelope/`}function Sg(t,e){return Ea(O({sentry_key:t.publicKey,sentry_version:Eg},e&&{sentry_client:`${e.name}/${e.version}`}))}function Od(t,e,n){return e||`${bg(t)}?${Sg(t,n)}`}var Rd=[];function Ad(t,e){let n={};return e.forEach(r=>{r&&rc(t,r,n)}),n}function nc(t,e){for(let n of e)n&&n.afterAllSetup&&n.afterAllSetup(t)}function rc(t,e,n){if(n[e.name]){je&&se.log(`Integration skipped because it was already installed: ${e.name}`);return}if(n[e.name]=e,Rd.indexOf(e.name)===-1&&typeof e.setupOnce=="function"&&(e.setupOnce(),Rd.push(e.name)),e.setup&&typeof e.setup=="function"&&e.setup(t),typeof e.preprocessEvent=="function"){let r=e.preprocessEvent.bind(e);t.on("preprocessEvent",(i,o)=>r(i,o,t))}if(typeof e.processEvent=="function"){let r=e.processEvent.bind(e),i=Object.assign((o,s)=>r(o,s,t),{id:e.name});t.addEventProcessor(i)}je&&se.log(`Integration installed: ${e.name}`)}var Nd="Not capturing exception because it's already been captured.",Mi=class{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=mo(e.dsn):je&&se.warn("No DSN provided, client will not send events."),this._dsn){let n=Od(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport(xe(O({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this)},e.transportOptions),{url:n}))}}captureException(e,n,r){let i=yt();if(So(e))return je&&se.log(Nd),i;let o=O({event_id:i},n);return this._process(this.eventFromException(e,o).then(s=>this._captureEvent(s,o,r))),o.event_id}captureMessage(e,n,r,i){let o=O({event_id:yt()},r),s=Br(e)?e:String(e),a=ar(e)?this.eventFromMessage(s,n,o):this.eventFromException(e,o);return this._process(a.then(u=>this._captureEvent(u,o,i))),o.event_id}captureEvent(e,n,r){let i=yt();if(n&&n.originalException&&So(n.originalException))return je&&se.log(Nd),i;let o=O({event_id:i},n),a=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,o,a||r)),o.event_id}captureSession(e){typeof e.release!="string"?je&&se.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),Ri(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){let n=this._transport;return n?(this.emit("flush"),this._isClientDoneProcessing(e).then(r=>n.flush(e).then(i=>r&&i))):rn(!0)}close(e){return this.flush(e).then(n=>(this.getOptions().enabled=!1,this.emit("close"),n))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){this._isEnabled()&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){let n=this._integrations[e.name];rc(this,e,this._integrations),n||nc(this,[e])}sendEvent(e,n={}){this.emit("beforeSendEvent",e,n);let r=Sd(e,this._dsn,this._options._metadata,this._options.tunnel);for(let o of n.attachments||[])r=Fa(r,Ba(o));let i=this.sendEnvelope(r);i&&i.then(o=>this.emit("afterSendEvent",e,o),null)}sendSession(e){let n=bd(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(n)}recordDroppedEvent(e,n,r){if(this._options.sendClientReports){let i=`${e}:${n}`;je&&se.log(`Adding outcome: "${i}"`),this._outcomes[i]=(this._outcomes[i]||0)+1}}on(e,n){let r=this._hooks[e]=this._hooks[e]||[];return r.push(n),()=>{let i=r.indexOf(n);i>-1&&r.splice(i,1)}}emit(e,...n){let r=this._hooks[e];r&&r.forEach(i=>i(...n))}sendEnvelope(e){return this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport?this._transport.send(e).then(null,n=>(je&&se.error("Error while sending event:",n),n)):(je&&se.error("Transport disabled"),rn({}))}_setupIntegrations(){let{integrations:e}=this._options;this._integrations=Ad(this,e),nc(this,e)}_updateSessionFromEvent(e,n){let r=!1,i=!1,o=n.exception&&n.exception.values;if(o){i=!0;for(let u of o){let d=u.mechanism;if(d&&d.handled===!1){r=!0;break}}}let s=e.status==="ok";(s&&e.errors===0||s&&r)&&(Ri(e,xe(O({},r&&{status:"crashed"}),{errors:e.errors||Number(i||r)})),this.captureSession(e))}_isClientDoneProcessing(e){return new _n(n=>{let r=0,i=1,o=setInterval(()=>{this._numProcessing==0?(clearInterval(o),n(!0)):(r+=i,e&&r>=e&&(clearInterval(o),n(!1)))},i)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,n,r,i=fr()){let o=this.getOptions(),s=Object.keys(this._integrations);return!n.integrations&&s.length>0&&(n.integrations=s),this.emit("preprocessEvent",e,n),e.type||i.setLastEventId(e.event_id||n.event_id),xd(o,e,n,r,this,i).then(a=>{if(a===null)return a;let u=O(O({},i.getPropagationContext()),r?r.getPropagationContext():void 0);if(!(a.contexts&&a.contexts.trace)&&u){let{traceId:m,spanId:h,parentSpanId:E,dsc:S}=u;a.contexts=O({trace:pt({trace_id:m,span_id:h,parent_span_id:E})},a.contexts);let T=S||ec(m,this);a.sdkProcessingMetadata=O({dynamicSamplingContext:T},a.sdkProcessingMetadata)}return a})}_captureEvent(e,n={},r){return this._processEvent(e,n,r).then(i=>i.event_id,i=>{if(je){let o=i;o.logLevel==="log"?se.log(o.message):se.warn(o)}})}_processEvent(e,n,r){let i=this.getOptions(),{sampleRate:o}=i,s=ic(e),a=Pd(e),u=e.type||"error",d=`before send for type \`${u}\``,m=typeof o>"u"?void 0:wd(o);if(a&&typeof m=="number"&&Math.random()>m)return this.recordDroppedEvent("sample_rate","error",e),er(new It(`Discarding event because it's not included in the random sample (sampling rate = ${o})`,"log"));let h=u==="replay_event"?"replay":u,S=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,n,r,S).then(T=>{if(T===null)throw this.recordDroppedEvent("event_processor",h,e),new It("An event processor returned `null`, will not send event.","log");if(n.data&&n.data.__sentry__===!0)return T;let P=Ig(this,i,T,n);return Cg(P,d)}).then(T=>{if(T===null){if(this.recordDroppedEvent("before_send",h,e),ic(e)){let Y=1+(e.spans||[]).length;this._outcomes.span=(this._outcomes.span||0)+Y}throw new It(`${d} returned \`null\`, will not send event.`,"log")}let k=r&&r.getSession();!s&&k&&this._updateSessionFromEvent(k,T);let P=T.transaction_info;if(s&&P&&T.transaction!==e.transaction){let j="custom";T.transaction_info=xe(O({},P),{source:j})}return this.sendEvent(T,n),T}).then(null,T=>{throw T instanceof It?T:(this.captureException(T,{data:{__sentry__:!0},originalException:T}),new It(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
18
- Reason: ${T}`))})}_process(e){this._numProcessing++,e.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.entries(e).map(([n,r])=>{let[i,o]=n.split(":");return{reason:i,category:o,quantity:r}})}};function Cg(t,e){let n=`${e} must return \`null\` or a valid event.`;if($n(t))return t.then(r=>{if(!pn(r)&&r!==null)throw new It(n);return r},r=>{throw new It(`${e} rejected with ${r}`)});if(!pn(t)&&t!==null)throw new It(n);return t}function Ig(t,e,n,r){let{beforeSend:i,beforeSendTransaction:o,beforeSendSpan:s}=e;if(Pd(n)&&i)return i(n,r);if(ic(n)){if(n.spans&&s){let a=[];for(let u of n.spans){let d=s(u);d?a.push(d):t.recordDroppedEvent("before_send","span")}n.spans=a}if(o)return o(n,r)}return n}function Pd(t){return t.type===void 0}function ic(t){return t.type==="transaction"}var xg=64;function Fo(t,e,n=Pa(t.bufferSize||xg)){let r={},i=s=>n.drain(s);function o(s){let a=[];if(xo(s,(h,E)=>{let S=Do(E);if(ja(r,S)){let T=Md(h,E);t.recordDroppedEvent("ratelimit_backoff",S,T)}else a.push(h)}),a.length===0)return rn({});let u=An(s[0],a),d=h=>{xo(u,(E,S)=>{let T=Md(E,S);t.recordDroppedEvent(h,Do(S),T)})},m=()=>e({body:Va(u)}).then(h=>(h.statusCode!==void 0&&(h.statusCode<200||h.statusCode>=300)&&je&&se.warn(`Sentry responded with status code ${h.statusCode} to sent event.`),r=$a(r,h),h),h=>{throw d("network_error"),h});return n.add(m).then(h=>h,h=>{if(h instanceof It)return je&&se.error("Skipped sending event because buffer is full."),d("queue_overflow"),rn({});throw h})}return{send:o,flush:i}}function Md(t,e){if(!(e!=="event"&&e!=="transaction"))return Array.isArray(t)?t[1]:void 0}function oc(t,e,n=[e],r="npm"){let i=t._metadata||{};i.sdk||(i.sdk={name:`sentry.javascript.${e}`,packages:n.map(o=>({name:`${r}:@sentry/${o}`,version:tn})),version:tn}),t._metadata=i}var Dg=100;function Nn(t,e){let n=Je(),r=fr();if(!n)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:o=Dg}=n.getOptions();if(o<=0)return;let s=Rn(),a=O({timestamp:s},t),u=i?$r(()=>i(a,e)):a;u!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",u,e),r.addBreadcrumb(u,o))}var kd,Tg="FunctionToString",Ld=new WeakMap,Og=()=>({name:Tg,setupOnce(){kd=Function.prototype.toString;try{Function.prototype.toString=function(...t){let e=lr(this),n=Ld.has(Je())&&e!==void 0?e:this;return kd.apply(n,t)}}catch{}},setup(t){Ld.set(t,!0)}}),Vo=Og;var Rg=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,"undefined is not an object (evaluating 'a.L')",`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler"],Ag="InboundFilters",Ng=(t={})=>({name:Ag,processEvent(e,n,r){let i=r.getOptions(),o=Pg(t,i);return Mg(e,o)?null:e}}),Uo=Ng;function Pg(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...t.disableErrorDefaults?[]:Rg],ignoreTransactions:[...t.ignoreTransactions||[],...e.ignoreTransactions||[]],ignoreInternal:t.ignoreInternal!==void 0?t.ignoreInternal:!0}}function Mg(t,e){return e.ignoreInternal&&Ug(t)?(je&&se.warn(`Event dropped due to being internal Sentry Error.
19
- Event: ${mn(t)}`),!0):kg(t,e.ignoreErrors)?(je&&se.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
20
- Event: ${mn(t)}`),!0):jg(t)?(je&&se.warn(`Event dropped due to not having an error message, error type or stacktrace.
21
- Event: ${mn(t)}`),!0):Lg(t,e.ignoreTransactions)?(je&&se.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
22
- Event: ${mn(t)}`),!0):Fg(t,e.denyUrls)?(je&&se.warn(`Event dropped due to being matched by \`denyUrls\` option.
23
- Event: ${mn(t)}.
24
- Url: ${Bo(t)}`),!0):Vg(t,e.allowUrls)?!1:(je&&se.warn(`Event dropped due to not being matched by \`allowUrls\` option.
25
- Event: ${mn(t)}.
26
- Url: ${Bo(t)}`),!0)}function kg(t,e){return t.type||!e||!e.length?!1:Bg(t).some(n=>Ur(n,e))}function Lg(t,e){if(t.type!=="transaction"||!e||!e.length)return!1;let n=t.transaction;return n?Ur(n,e):!1}function Fg(t,e){if(!e||!e.length)return!1;let n=Bo(t);return n?Ur(n,e):!1}function Vg(t,e){if(!e||!e.length)return!0;let n=Bo(t);return n?Ur(n,e):!0}function Bg(t){let e=[];t.message&&e.push(t.message);let n;try{n=t.exception.values[t.exception.values.length-1]}catch{}return n&&n.value&&(e.push(n.value),n.type&&e.push(`${n.type}: ${n.value}`)),e}function Ug(t){try{return t.exception.values[0].type==="SentryError"}catch{}return!1}function Hg(t=[]){for(let e=t.length-1;e>=0;e--){let n=t[e];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function Bo(t){try{let e;try{e=t.exception.values[0].stacktrace.frames}catch{}return e?Hg(e):null}catch{return je&&se.error(`Cannot extract url for event ${mn(t)}`),null}}function jg(t){return t.type||!t.exception||!t.exception.values||t.exception.values.length===0?!1:!t.message&&!t.exception.values.some(e=>e.stacktrace||e.type&&e.type!=="Error"||e.value)}var $g="Dedupe",Gg=()=>{let t;return{name:$g,processEvent(e){if(e.type)return e;try{if(Wg(e,t))return je&&se.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return t=e}}},Ho=Gg;function Wg(t,e){return e?!!(zg(t,e)||Yg(t,e)):!1}function zg(t,e){let n=t.message,r=e.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!Bd(t,e)||!Vd(t,e))}function Yg(t,e){let n=Fd(e),r=Fd(t);return!(!n||!r||n.type!==r.type||n.value!==r.value||!Bd(t,e)||!Vd(t,e))}function Vd(t,e){let n=yo(t),r=yo(e);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let i=0;i<r.length;i++){let o=r[i],s=n[i];if(o.filename!==s.filename||o.lineno!==s.lineno||o.colno!==s.colno||o.function!==s.function)return!1}return!0}function Bd(t,e){let n=t.fingerprint,r=e.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function Fd(t){return t.exception&&t.exception.values&&t.exception.values[0]}var at=_e,sc=0;function ac(){return sc>0}function s_(){sc++,setTimeout(()=>{sc--})}function pr(t,e={},n){if(typeof t!="function")return t;try{let i=t.__sentry_wrapped__;if(i)return i;if(lr(t))return t}catch{return t}let r=function(){let i=Array.prototype.slice.call(arguments);try{n&&typeof n=="function"&&n.apply(this,arguments);let o=i.map(s=>pr(s,e));return t.apply(this,o)}catch(o){throw s_(),Po(s=>{s.addEventProcessor(a=>(e.mechanism&&(Gr(a,void 0,void 0),Gn(a,e.mechanism)),a.extra=xe(O({},a.extra),{arguments:i}),a)),Lo(o)}),o}};try{for(let i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=t[i])}catch{}go(r,t),Nt(t,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return t.name}})}catch{}return r}var zn=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function jo(t,e){let n=uc(t,e),r={type:e&&e.name,value:d_(e)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function a_(t,e,n,r){let i=Je(),o=i&&i.getOptions().normalizeDepth,s=p_(e),a={__serialized__:Io(e,o)};if(s)return{exception:{values:[jo(t,s)]},extra:a};let u={exception:{values:[{type:cr(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:f_(e,{isUnhandledRejection:r})}]},extra:a};if(n){let d=uc(t,n);d.length&&(u.exception.values[0].stacktrace={frames:d})}return u}function cc(t,e){return{exception:{values:[jo(t,e)]}}}function uc(t,e){let n=e.stacktrace||e.stack||"",r=l_(e),i=u_(e);try{return t(n,r,i)}catch{}return[]}var c_=/Minified React error #\d+;/i;function l_(t){return t&&c_.test(t.message)?1:0}function u_(t){return typeof t.framesToPop=="number"?t.framesToPop:0}function d_(t){let e=t&&t.message;return e?e.error&&typeof e.error.message=="string"?e.error.message:e:"No error message"}function $d(t,e,n,r){let i=n&&n.syntheticException||void 0,o=$o(t,e,i,r);return Gn(o),o.level="error",n&&n.event_id&&(o.event_id=n.event_id),rn(o)}function Gd(t,e,n="info",r,i){let o=r&&r.syntheticException||void 0,s=lc(t,e,o,i);return s.level=n,r&&r.event_id&&(s.event_id=r.event_id),rn(s)}function $o(t,e,n,r,i){let o;if(fo(e)&&e.error)return cc(t,e.error);if(ho(e)||ua(e)){let s=e;if("stack"in e)o=cc(t,e);else{let a=s.name||(ho(s)?"DOMError":"DOMException"),u=s.message?`${a}: ${s.message}`:a;o=lc(t,u,n,r),Gr(o,u)}return"code"in s&&(o.tags=xe(O({},o.tags),{"DOMException.code":`${s.code}`})),o}return sr(e)?cc(t,e):pn(e)||cr(e)?(o=a_(t,e,n,i),Gn(o,{synthetic:!0}),o):(o=lc(t,e,n,r),Gr(o,`${e}`,void 0),Gn(o,{synthetic:!0}),o)}function lc(t,e,n,r){let i={};if(r&&n){let o=uc(t,n);o.length&&(i.exception={values:[{value:e,stacktrace:{frames:o}}]})}if(Br(e)){let{__sentry_template_string__:o,__sentry_template_values__:s}=e;return i.logentry={message:o,params:s},i}return i.message=e,i}function f_(t,{isUnhandledRejection:e}){let n=wa(t),r=e?"promise rejection":"exception";return fo(t)?`Event \`ErrorEvent\` captured as ${r} with message \`${t.message}\``:cr(t)?`Event \`${h_(t)}\` (type=${t.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function h_(t){try{let e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch{}}function p_(t){for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e)){let n=t[e];if(n instanceof Error)return n}}function Wd(t,{metadata:e,tunnel:n,dsn:r}){let i=O(O({event_id:t.event_id,sent_at:new Date().toISOString()},e&&e.sdk&&{sdk:{name:e.sdk.name,version:e.sdk.version}}),!!n&&!!r&&{dsn:Tn(r)}),o=m_(t);return An(i,[o])}function m_(t){return[{type:"user_report"},t]}var ki=class extends Mi{constructor(e){let n=O({parentSpanIsAlwaysRootSpan:!0},e),r=at.SENTRY_SDK_SOURCE||Aa();oc(n,"browser",["browser"],r),super(n),n.sendClientReports&&at.document&&at.document.addEventListener("visibilitychange",()=>{at.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(e,n){return $d(this._options.stackParser,e,n,this._options.attachStacktrace)}eventFromMessage(e,n="info",r){return Gd(this._options.stackParser,e,n,r,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled()){zn&&se.warn("SDK not enabled, will not capture user feedback.");return}let n=Wd(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(n)}_prepareEvent(e,n,r){return e.platform=e.platform||"javascript",super._prepareEvent(e,n,r)}_flushOutcomes(){let e=this._clearOutcomes();if(e.length===0){zn&&se.log("No outcomes to send");return}if(!this._dsn){zn&&se.log("No dsn provided, will not send outcomes");return}zn&&se.log("Sending outcomes:",e);let n=Ha(e,this._options.tunnel&&Tn(this._dsn));this.sendEnvelope(n)}};var zd=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var dt=_e;var g_=1e3,Yd,dc,fc;function hc(t){let e="dom";Pt(e,t),Mt(e,__)}function __(){if(!dt.document)return;let t=mt.bind(null,"dom"),e=Kd(t,!0);dt.document.addEventListener("click",e,!1),dt.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(n=>{let r=dt[n]&&dt[n].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(Ze(r,"addEventListener",function(i){return function(o,s,a){if(o==="click"||o=="keypress")try{let u=this,d=u.__sentry_instrumentation_handlers__=u.__sentry_instrumentation_handlers__||{},m=d[o]=d[o]||{refCount:0};if(!m.handler){let h=Kd(t);m.handler=h,i.call(this,o,h,a)}m.refCount++}catch{}return i.call(this,o,s,a)}}),Ze(r,"removeEventListener",function(i){return function(o,s,a){if(o==="click"||o=="keypress")try{let u=this,d=u.__sentry_instrumentation_handlers__||{},m=d[o];m&&(m.refCount--,m.refCount<=0&&(i.call(this,o,m.handler,a),m.handler=void 0,delete d[o]),Object.keys(d).length===0&&delete u.__sentry_instrumentation_handlers__)}catch{}return i.call(this,o,s,a)}}))})}function v_(t){if(t.type!==dc)return!1;try{if(!t.target||t.target._sentryId!==fc)return!1}catch{}return!0}function y_(t,e){return t!=="keypress"?!1:!e||!e.tagName?!0:!(e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable)}function Kd(t,e=!1){return n=>{if(!n||n._sentryCaptured)return;let r=E_(n);if(y_(n.type,r))return;Nt(n,"_sentryCaptured",!0),r&&!r._sentryId&&Nt(r,"_sentryId",yt());let i=n.type==="keypress"?"input":n.type;v_(n)||(t({event:n,name:i,global:e}),dc=n.type,fc=r?r._sentryId:void 0),clearTimeout(Yd),Yd=dt.setTimeout(()=>{fc=void 0,dc=void 0},g_)}}function E_(t){try{return t.target}catch{return null}}var Go;function pc(t){let e="history";Pt(e,t),Mt(e,w_)}function w_(){if(!Ga())return;let t=dt.onpopstate;dt.onpopstate=function(...n){let r=dt.location.href,i=Go;if(Go=r,mt("history",{from:i,to:r}),t)try{return t.apply(this,n)}catch{}};function e(n){return function(...r){let i=r.length>2?r[2]:void 0;if(i){let o=Go,s=String(i);Go=s,mt("history",{from:o,to:s})}return n.apply(this,r)}}Ze(dt.history,"pushState",e),Ze(dt.history,"replaceState",e)}var Wo={};function mc(t){let e=Wo[t];if(e)return e;let n=dt[t];if(xi(n))return Wo[t]=n.bind(dt);let r=dt.document;if(r&&typeof r.createElement=="function")try{let i=r.createElement("iframe");i.hidden=!0,r.head.appendChild(i);let o=i.contentWindow;o&&o[t]&&(n=o[t]),r.head.removeChild(i)}catch(i){zd&&se.warn(`Could not create sandbox iframe for ${t} check, bailing to window.${t}: `,i)}return n&&(Wo[t]=n.bind(dt))}function zo(t){Wo[t]=void 0}var mr="__sentry_xhr_v3__";function gc(t){let e="xhr";Pt(e,t),Mt(e,b_)}function b_(){if(!dt.XMLHttpRequest)return;let t=XMLHttpRequest.prototype;Ze(t,"open",function(e){return function(...n){let r=Kt()*1e3,i=At(n[0])?n[0].toUpperCase():void 0,o=S_(n[1]);if(!i||!o)return e.apply(this,n);this[mr]={method:i,url:o,request_headers:{}},i==="POST"&&o.match(/sentry_key/)&&(this.__sentry_own_request__=!0);let s=()=>{let a=this[mr];if(a&&this.readyState===4){try{a.status_code=this.status}catch{}let u={endTimestamp:Kt()*1e3,startTimestamp:r,xhr:this};mt("xhr",u)}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?Ze(this,"onreadystatechange",function(a){return function(...u){return s(),a.apply(this,u)}}):this.addEventListener("readystatechange",s),Ze(this,"setRequestHeader",function(a){return function(...u){let[d,m]=u,h=this[mr];return h&&At(d)&&At(m)&&(h.request_headers[d.toLowerCase()]=m),a.apply(this,u)}}),e.apply(this,n)}}),Ze(t,"send",function(e){return function(...n){let r=this[mr];if(!r)return e.apply(this,n);n[0]!==void 0&&(r.body=n[0]);let i={startTimestamp:Kt()*1e3,xhr:this};return mt("xhr",i),e.apply(this,n)}})}function S_(t){if(At(t))return t;try{return t.toString()}catch{}}function _c(t,e=mc("fetch")){let n=0,r=0;function i(o){let s=o.body.length;n+=s,r++;let a=O({body:o.body,method:"POST",referrerPolicy:"origin",headers:t.headers,keepalive:n<=6e4&&r<15},t.fetchOptions);if(!e)return zo("fetch"),er("No fetch implementation available");try{return e(t.url,a).then(u=>(n-=s,r--,{statusCode:u.status,headers:{"x-sentry-rate-limits":u.headers.get("X-Sentry-Rate-Limits"),"retry-after":u.headers.get("Retry-After")}}))}catch(u){return zo("fetch"),n-=s,r--,er(u)}}return Fo(t,i)}var C_=30;var I_=50;function vc(t,e,n,r){let i={filename:t,function:e==="<anonymous>"?On:e,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}var x_=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,D_=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,T_=/\((\S*)(?::(\d+))(?::(\d+))\)/,O_=t=>{let e=x_.exec(t);if(e){let[,r,i,o]=e;return vc(r,On,+i,+o)}let n=D_.exec(t);if(n){if(n[2]&&n[2].indexOf("eval")===0){let s=T_.exec(n[2]);s&&(n[2]=s[1],n[3]=s[2],n[4]=s[3])}let[i,o]=Jd(n[1]||On,n[2]);return vc(o,i,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},Xd=[C_,O_],R_=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,A_=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,N_=t=>{let e=R_.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){let o=A_.exec(e[3]);o&&(e[1]=e[1]||"eval",e[3]=o[1],e[4]=o[2],e[5]="")}let r=e[3],i=e[1]||On;return[i,r]=Jd(i,r),vc(r,i,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}},qd=[I_,N_];var Zd=[Xd,qd],yc=Sa(...Zd),Jd=(t,e)=>{let n=t.indexOf("safari-extension")!==-1,r=t.indexOf("safari-web-extension")!==-1;return n||r?[t.indexOf("@")!==-1?t.split("@")[0]:On,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]};var Yo=1024,M_="Breadcrumbs",k_=(t={})=>{let e=O({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},t);return{name:M_,setup(n){e.console&&Ca(V_(n)),e.dom&&hc(F_(n,e.dom)),e.xhr&&gc(B_(n)),e.fetch&&Ta(U_(n)),e.history&&pc(H_(n)),e.sentry&&n.on("beforeSendEvent",L_(n))}}},Qd=k_;function L_(t){return function(n){Je()===t&&Nn({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:mn(n)},{event:n})}}function F_(t,e){return function(r){if(Je()!==t)return;let i,o,s=typeof e=="object"?e.serializeAttribute:void 0,a=typeof e=="object"&&typeof e.maxStringLength=="number"?e.maxStringLength:void 0;a&&a>Yo&&(zn&&se.warn(`\`dom.maxStringLength\` cannot exceed ${Yo}, but a value of ${a} was configured. Sentry will use ${Yo} instead.`),a=Yo),typeof s=="string"&&(s=[s]);try{let d=r.event,m=j_(d)?d.target:d;i=Ci(m,{keyAttrs:s,maxStringLength:a}),o=va(m)}catch{i="<unknown>"}if(i.length===0)return;let u={category:`ui.${r.name}`,message:i};o&&(u.data={"ui.component_name":o}),Nn(u,{event:r.event,name:r.name,global:r.global})}}function V_(t){return function(n){if(Je()!==t)return;let r={category:"console",data:{arguments:n.args,logger:"console"},level:Ma(n.level),message:po(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${po(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;Nn(r,{input:n.args,level:n.level})}}function B_(t){return function(n){if(Je()!==t)return;let{startTimestamp:r,endTimestamp:i}=n,o=n.xhr[mr];if(!r||!i||!o)return;let{method:s,url:a,status_code:u,body:d}=o,m={method:s,url:a,status_code:u},h={xhr:n.xhr,input:d,startTimestamp:r,endTimestamp:i};Nn({category:"xhr",data:m,type:"http"},h)}}function U_(t){return function(n){if(Je()!==t)return;let{startTimestamp:r,endTimestamp:i}=n;if(i&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.error){let o=n.fetchData,s={data:n.error,input:n.args,startTimestamp:r,endTimestamp:i};Nn({category:"fetch",data:o,level:"error",type:"http"},s)}else{let o=n.response,s=xe(O({},n.fetchData),{status_code:o&&o.status}),a={input:n.args,response:o,startTimestamp:r,endTimestamp:i};Nn({category:"fetch",data:s,type:"http"},a)}}}function H_(t){return function(n){if(Je()!==t)return;let r=n.from,i=n.to,o=Ti(at.location.href),s=r?Ti(r):void 0,a=Ti(i);(!s||!s.path)&&(s=o),o.protocol===a.protocol&&o.host===a.host&&(i=a.relative),o.protocol===s.protocol&&o.host===s.host&&(r=s.relative),Nn({category:"navigation",data:{from:r,to:i}})}}function j_(t){return!!t&&!!t.target}var $_=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],G_="BrowserApiErrors",W_=(t={})=>{let e=O({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},t);return{name:G_,setupOnce(){e.setTimeout&&Ze(at,"setTimeout",ef),e.setInterval&&Ze(at,"setInterval",ef),e.requestAnimationFrame&&Ze(at,"requestAnimationFrame",z_),e.XMLHttpRequest&&"XMLHttpRequest"in at&&Ze(XMLHttpRequest.prototype,"send",Y_);let n=e.eventTarget;n&&(Array.isArray(n)?n:$_).forEach(K_)}}},tf=W_;function ef(t){return function(...e){let n=e[0];return e[0]=pr(n,{mechanism:{data:{function:nn(t)},handled:!1,type:"instrument"}}),t.apply(this,e)}}function z_(t){return function(e){return t.apply(this,[pr(e,{mechanism:{data:{function:"requestAnimationFrame",handler:nn(t)},handled:!1,type:"instrument"}})])}}function Y_(t){return function(...e){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(i=>{i in n&&typeof n[i]=="function"&&Ze(n,i,function(o){let s={mechanism:{data:{function:i,handler:nn(o)},handled:!1,type:"instrument"}},a=lr(o);return a&&(s.mechanism.data.handler=nn(a)),pr(o,s)})}),t.apply(this,e)}}function K_(t){let e=at,n=e[t]&&e[t].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(Ze(n,"addEventListener",function(r){return function(i,o,s){try{typeof o.handleEvent=="function"&&(o.handleEvent=pr(o.handleEvent,{mechanism:{data:{function:"handleEvent",handler:nn(o),target:t},handled:!1,type:"instrument"}}))}catch{}return r.apply(this,[i,pr(o,{mechanism:{data:{function:"addEventListener",handler:nn(o),target:t},handled:!1,type:"instrument"}}),s])}}),Ze(n,"removeEventListener",function(r){return function(i,o,s){let a=o;try{let u=a&&a.__sentry_wrapped__;u&&r.call(this,i,u,s)}catch{}return r.call(this,i,a,s)}}))}var X_="GlobalHandlers",q_=(t={})=>{let e=O({onerror:!0,onunhandledrejection:!0},t);return{name:X_,setupOnce(){Error.stackTraceLimit=50},setup(n){e.onerror&&(Z_(n),nf("onerror")),e.onunhandledrejection&&(J_(n),nf("onunhandledrejection"))}}},rf=q_;function Z_(t){Oa(e=>{let{stackParser:n,attachStacktrace:r}=of();if(Je()!==t||ac())return;let{msg:i,url:o,line:s,column:a,error:u}=e,d=tv($o(n,u||i,void 0,r,!1),o,s,a);d.level="error",Pi(d,{originalException:u,mechanism:{handled:!1,type:"onerror"}})})}function J_(t){Ra(e=>{let{stackParser:n,attachStacktrace:r}=of();if(Je()!==t||ac())return;let i=Q_(e),o=ar(i)?ev(i):$o(n,i,void 0,r,!0);o.level="error",Pi(o,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function Q_(t){if(ar(t))return t;try{if("reason"in t)return t.reason;if("detail"in t&&"reason"in t.detail)return t.detail.reason}catch{}return t}function ev(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}function tv(t,e,n,r){let i=t.exception=t.exception||{},o=i.values=i.values||[],s=o[0]=o[0]||{},a=s.stacktrace=s.stacktrace||{},u=a.frames=a.frames||[],d=isNaN(parseInt(r,10))?void 0:r,m=isNaN(parseInt(n,10))?void 0:n,h=At(e)&&e.length>0?e:_a();return u.length===0&&u.push({colno:d,filename:h,function:On,in_app:!0,lineno:m}),t}function nf(t){zn&&se.log(`Global Handler attached: ${t}`)}function of(){let t=Je();return t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}var sf=()=>({name:"HttpContext",preprocessEvent(t){if(!at.navigator&&!at.location&&!at.document)return;let e=t.request&&t.request.url||at.location&&at.location.href,{referrer:n}=at.document||{},{userAgent:r}=at.navigator||{},i=O(O(O({},t.request&&t.request.headers),n&&{Referer:n}),r&&{"User-Agent":r}),o=xe(O(O({},t.request),e&&{url:e}),{headers:i});t.request=o}});var nv="cause",rv=5,iv="LinkedErrors",ov=(t={})=>{let e=t.limit||rv,n=t.key||nv;return{name:iv,preprocessEvent(r,i,o){let s=o.getOptions();ma(jo,s.stackParser,s.maxValueLength,n,e,r,i)}}},af=ov;function Ec(t){return[Uo(),Vo(),tf(),Qd(),rf(),af(),Ho(),sf()]}var wc=class extends Error{cause;constructor(e,n){super(e),this.cause=n}},Ko=class t{static INSTANCE;contexts={};tags;client;user;constructor(){this.init()}static getInstance(){return this.INSTANCE||(this.INSTANCE=new t),this.INSTANCE}captureException(e,n,r){Ct.error(e),this.getNewScope(n,r).captureException(e)}captureMessage(e,n,r,i){this.getNewScope(r,i).captureMessage(e,n??"error")}captureError(e,n,r,i){Ct.error(e,n);let o=this.getNewScope(r,i),s=new wc(e,n);o.captureException(s)}setGlobalContext(e,n){this.contexts[e]=O({context:n},this.contexts[e])}setUser(e){this.user=e}setTags(e){this.tags=e}getNewScope(e,n){let r=new xt;if(r.setClient(this.client),r.setUser(this.user),e?.triggerContext){let i=e.triggerContext;r.setExtras(i.triggerData.sentryContext()),delete e.triggerContext}return e&&r.setExtras(e),this.tags&&r.setTags(this.tags),n&&r.setTags(n),Object.keys(this.contexts).forEach(i=>{r.setContext(i,this.contexts[i])}),r.setTag("language",navigator.language),r.setTag("timezone",cf()),r}init(){let e=Ec({}).filter(n=>!["BrowserApiErrors","Breadcrumbs","GlobalHandlers"].includes(n.name));this.client=new ki({dsn:"https://1bc3dda4c861f60cd6be1b67584f4bc6@o559187.ingest.us.sentry.io/4507626484203520",transport:_c,stackParser:yc,integrations:e,environment:jn.mode,release:`web-sdk@${qe.SDK_VERSION}`,debug:jn.debug}),this.client.init()}};var zr=class{static ID="id";static SESSION_LANDING_PAGE="landing";static SESSION_LAST_USED_TIME="lastUsedTime";static SESSION_SYNCED="synced";static APP_CONFIG="conf";static DEVICE_ID="did";static SDK_TOKEN="token";static FIRST_SEEN="firstSeen";static SESSION_NUMBER="sessionNumber";static GA_CLIENT_ID="gacid";static CURRENT_CART="cart";static MUTED="muted"};var Sc=eo(uf());function Xo(t){return Sc.default.createInstance({name:"lc",storeName:t,driver:Sc.default.LOCALSTORAGE})}var Yr=class{static storage;static async get(e,n){return await this.storage?.getItem(e)??n}static set(e,n){return this.storage?.setItem(e,n)}static remove(e){return this.storage?.removeItem(e)}static clear(){return this.storage?.clear()}static getForage(){return this.storage}};var Cc=class extends Yr{static storeName="ses";static{this.storage=Xo(this.storeName)}};var Kr=class extends Yr{static storeName="usr";static{this.storage=Xo(this.storeName)}};var qo=class{static format(e,n){let r=/{{\s*(\w+)\s*}}/;return n.replace(r,(i,o)=>{switch(o){case"amount":return this.formatWithDelimiters(e,2);case"amount_no_decimals":return this.formatWithDelimiters(e,0);case"amount_with_comma_separator":return this.formatWithDelimiters(e,2,".",",");case"amount_no_decimals_with_comma_separator":return this.formatWithDelimiters(e,0,".",",");case"amount_with_apostrophe_separator":return this.formatWithDelimiters(e,2,"'",".");case"amount_no_decimals_with_space_separator":return this.formatWithDelimiters(e,0," ");case"amount_with_space_separator":return this.formatWithDelimiters(e,2," ",",");case"amount_with_period_and_space_separator":return this.formatWithDelimiters(e,2," ",".");default:return i}})}static formatWithDelimiters(e,n=2,r=",",i="."){if(isNaN(e)||e==null)return"0";let s=(e/100).toFixed(n).split("."),a=s[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+r),u=s[1]?i+s[1]:"";return a+u}};var Zo=class{isCartDirty=!0;cartEngagements;isGoKwikPopupOpen;previewIDs;previewVariant;pageName;moneyFormat;jsLoadTime=new Date;shopCurrencyCode;locale;activeExperiment;inInactive=!1;lastEnterActive=new Date;lastEnterInactive=null;currentItem;_currencyCode;get currencyCode(){return this._currencyCode}set currencyCode(e){this._currencyCode=e}static get(){return window.CooeeSDK.runtimeData}isInactive(){return this.inInactive}async setInactive(){return this.inInactive?0:(this.inInactive=!0,this.lastEnterInactive=new Date,Math.max((this.lastEnterInactive.getTime()-this.lastEnterActive.getTime())/1e3,0))}setActive(){return this.inInactive?(this.inInactive=!1,this.lastEnterActive=new Date,Math.max((this.lastEnterActive.getTime()-this.lastEnterInactive.getTime())/1e3,0)):0}isFirstActive(){return this.lastEnterInactive==null}getCurrentItem(){return this.currentItem}setCurrentItem(e){this.currentItem=new Lr(e)}};function gr(t,e){if(t==0&&e)return"Free";let n=Zo.get(),r=Fr.get(),i=n.shopCurrencyCode||r.currency,o=n.currencyCode;o||Ct.warn("Currency code is not set in RuntimeData");let s=r.money?.format??n.moneyFormat,a;if(s&&i===o)a=qo.format(t*100,s);else{let u;try{u=new Intl.NumberFormat(sv(),{style:"currency",currency:o||i,minimumFractionDigits:0,maximumFractionDigits:2})}catch(d){return Ko.getInstance().captureException(d,{currentCurrency:o,shopCurrency:i}),""}a=u.format(t),a=a.replace("\u20B9","Rs. "),r.money?.showCurrency&&o!=="INR"&&(a=a.concat(` ${o}`))}return a}function sv(){return navigator.languages!==void 0?navigator.languages[0].split("-")[0]:navigator.language??"en"}var Jo;function cf(){if(Jo)return Jo;try{return Jo=Intl.DateTimeFormat().resolvedOptions().timeZone,Jo}catch{return""}}var Pn=class t{transform(e){return e==null?null:gr(e)}static \u0275fac=function(n){return new(n||t)};static \u0275pipe=io({name:"cooeeCurrency",type:t,pure:!0})};var df=(()=>{class t{static entityMap={'"':"&quot;"};static escapeHtml(n){return String(n).replace(/"/g,r=>t.entityMap[r])}}return t})();var av=Object.prototype.toString,qr=Array.isArray||function(e){return av.call(e)==="[object Array]"};function xc(t){return typeof t=="function"}function cv(t){return qr(t)?"array":typeof t}function Ic(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function ff(t,e){return t!=null&&typeof t=="object"&&e in t}function lv(t,e){return t!=null&&typeof t!="object"&&t.hasOwnProperty&&t.hasOwnProperty(e)}var uv=RegExp.prototype.test;function dv(t,e){return uv.call(t,e)}var fv=/\S/;function hv(t){return!dv(fv,t)}var pv={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"};function mv(t){return String(t).replace(/[&<>"'`=\/]/g,function(n){return pv[n]})}var gv=/\s*/,_v=/\s+/,hf=/\s*=/,vv=/\s*\}/,yv=/#|\^|\/|>|\{|&|=|!/;function Ev(t,e){if(!t)return[];var n=!1,r=[],i=[],o=[],s=!1,a=!1,u="",d=0;function m(){if(s&&!a)for(;o.length;)delete i[o.pop()];else o=[];s=!1,a=!1}var h,E,S;function T(ne){if(typeof ne=="string"&&(ne=ne.split(_v,2)),!qr(ne)||ne.length!==2)throw new Error("Invalid tags: "+ne);h=new RegExp(Ic(ne[0])+"\\s*"),E=new RegExp("\\s*"+Ic(ne[1])),S=new RegExp("\\s*"+Ic("}"+ne[1]))}T(e||on.tags);for(var k=new Fi(t),P,j,Y,ee,K,ge;!k.eos();){if(P=k.pos,Y=k.scanUntil(h),Y)for(var U=0,fe=Y.length;U<fe;++U)ee=Y.charAt(U),hv(ee)?(o.push(i.length),u+=ee):(a=!0,n=!0,u+=" "),i.push(["text",ee,P,P+1]),P+=1,ee===`
27
- `&&(m(),u="",d=0,n=!1);if(!k.scan(h))break;if(s=!0,j=k.scan(yv)||"name",k.scan(gv),j==="="?(Y=k.scanUntil(hf),k.scan(hf),k.scanUntil(E)):j==="{"?(Y=k.scanUntil(S),k.scan(vv),k.scanUntil(E),j="&"):Y=k.scanUntil(E),!k.scan(E))throw new Error("Unclosed tag at "+k.pos);if(j==">"?K=[j,Y,P,k.pos,u,d,n]:K=[j,Y,P,k.pos],d++,i.push(K),j==="#"||j==="^")r.push(K);else if(j==="/"){if(ge=r.pop(),!ge)throw new Error('Unopened section "'+Y+'" at '+P);if(ge[1]!==Y)throw new Error('Unclosed section "'+ge[1]+'" at '+P)}else j==="name"||j==="{"||j==="&"?a=!0:j==="="&&T(Y)}if(m(),ge=r.pop(),ge)throw new Error('Unclosed section "'+ge[1]+'" at '+k.pos);return bv(wv(i))}function wv(t){for(var e=[],n,r,i=0,o=t.length;i<o;++i)n=t[i],n&&(n[0]==="text"&&r&&r[0]==="text"?(r[1]+=n[1],r[3]=n[3]):(e.push(n),r=n));return e}function bv(t){for(var e=[],n=e,r=[],i,o,s=0,a=t.length;s<a;++s)switch(i=t[s],i[0]){case"#":case"^":n.push(i),r.push(i),n=i[4]=[];break;case"/":o=r.pop(),o[5]=i[2],n=r.length>0?r[r.length-1][4]:e;break;default:n.push(i)}return e}function Fi(t){this.string=t,this.tail=t,this.pos=0}Fi.prototype.eos=function(){return this.tail===""};Fi.prototype.scan=function(e){var n=this.tail.match(e);if(!n||n.index!==0)return"";var r=n[0];return this.tail=this.tail.substring(r.length),this.pos+=r.length,r};Fi.prototype.scanUntil=function(e){var n=this.tail.search(e),r;switch(n){case-1:r=this.tail,this.tail="";break;case 0:r="";break;default:r=this.tail.substring(0,n),this.tail=this.tail.substring(n)}return this.pos+=r.length,r};function Xr(t,e){this.view=t,this.cache={".":this.view},this.parent=e}Xr.prototype.push=function(e){return new Xr(e,this)};Xr.prototype.lookup=function(e){var n=this.cache,r;if(n.hasOwnProperty(e))r=n[e];else{for(var i=this,o,s,a,u=!1;i;){if(e.indexOf(".")>0)for(o=i.view,s=e.split("."),a=0;o!=null&&a<s.length;)a===s.length-1&&(u=ff(o,s[a])||lv(o,s[a])),o=o[s[a++]];else o=i.view[e],u=ff(i.view,e);if(u){r=o;break}i=i.parent}n[e]=r}return xc(r)&&(r=r.call(this.view)),r};function kt(){this.templateCache={_cache:{},set:function(e,n){this._cache[e]=n},get:function(e){return this._cache[e]},clear:function(){this._cache={}}}}kt.prototype.clearCache=function(){typeof this.templateCache<"u"&&this.templateCache.clear()};kt.prototype.parse=function(e,n){var r=this.templateCache,i=e+":"+(n||on.tags).join(":"),o=typeof r<"u",s=o?r.get(i):void 0;return s==null&&(s=Ev(e,n),o&&r.set(i,s)),s};kt.prototype.render=function(e,n,r,i){var o=this.getConfigTags(i),s=this.parse(e,o),a=n instanceof Xr?n:new Xr(n,void 0);return this.renderTokens(s,a,r,e,i)};kt.prototype.renderTokens=function(e,n,r,i,o){for(var s="",a,u,d,m=0,h=e.length;m<h;++m)d=void 0,a=e[m],u=a[0],u==="#"?d=this.renderSection(a,n,r,i,o):u==="^"?d=this.renderInverted(a,n,r,i,o):u===">"?d=this.renderPartial(a,n,r,o):u==="&"?d=this.unescapedValue(a,n):u==="name"?d=this.escapedValue(a,n,o):u==="text"&&(d=this.rawValue(a)),d!==void 0&&(s+=d);return s};kt.prototype.renderSection=function(e,n,r,i,o){var s=this,a="",u=n.lookup(e[1]);function d(E){return s.render(E,n,r,o)}if(u){if(qr(u))for(var m=0,h=u.length;m<h;++m)a+=this.renderTokens(e[4],n.push(u[m]),r,i,o);else if(typeof u=="object"||typeof u=="string"||typeof u=="number")a+=this.renderTokens(e[4],n.push(u),r,i,o);else if(xc(u)){if(typeof i!="string")throw new Error("Cannot use higher-order sections without the original template");u=u.call(n.view,i.slice(e[3],e[5]),d),u!=null&&(a+=u)}else a+=this.renderTokens(e[4],n,r,i,o);return a}};kt.prototype.renderInverted=function(e,n,r,i,o){var s=n.lookup(e[1]);if(!s||qr(s)&&s.length===0)return this.renderTokens(e[4],n,r,i,o)};kt.prototype.indentPartial=function(e,n,r){for(var i=n.replace(/[^ \t]/g,""),o=e.split(`
17
+ `),typeof c=="string"||c instanceof Uint8Array)i(c);else{let u;try{u=JSON.stringify(c)}catch{u=JSON.stringify(cn(c))}i(u)}}return typeof r=="string"?r:Uh(r)}function Uh(t){let e=t.reduce((i,o)=>i+o.length,0),n=new Uint8Array(e),r=0;for(let i of t)n.set(i,r),r+=i.length;return n}function fa(t){let e=typeof t.data=="string"?la(t.data):t.data;return[at({type:"attachment",length:e.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType}),e]}var Hh={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket"};function co(t){return Hh[t]}function lo(t){if(!t||!t.sdk)return;let{name:e,version:n}=t.sdk;return{name:e,version:n}}function pa(t,e,n,r){let i=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.dynamicSamplingContext;return D(D(D({event_id:t.event_id,sent_at:new Date().toISOString()},e&&{sdk:e}),!!n&&r&&{dsn:_n(r)}),i&&{trace:at(D({},i))})}function ha(t,e,n){let r=[{type:"client_report"},{timestamp:n||vn(),discarded_events:t}];return En(e?{dsn:e}:{},[r])}function Tu(t,e=Date.now()){let n=parseInt(`${t}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${t}`);return isNaN(r)?6e4:r-e}function Ou(t,e){return t[e]||t.all||0}function ma(t,e,n=Date.now()){return Ou(t,e)>n}function ga(t,{statusCode:e,headers:n},r=Date.now()){let i=D({},t),o=n&&n["x-sentry-rate-limits"],s=n&&n["retry-after"];if(o)for(let c of o.trim().split(",")){let[u,d,,,g]=c.split(":",5),p=parseInt(u,10),E=(isNaN(p)?60:p)*1e3;if(!d)i.all=r+E;else for(let C of d.split(";"))C==="metric_bucket"?(!g||g.split(";").includes("custom"))&&(i[C]=r+E):i[C]=r+E}else s?i.all=r+Tu(s,r):e===429&&(i.all=r+60*1e3);return i}function uo(){return{traceId:pt(),spanId:pt().substring(16)}}var fo=ge;function _a(){let t=fo.chrome,e=t&&t.app&&t.app.runtime,n="history"in fo&&!!fo.history.pushState&&!!fo.history.replaceState;return!e&&n}var Be=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function er(){return di(ge),ge}function di(t){let e=t.__SENTRY__=t.__SENTRY__||{};return e.version=e.version||zt,e[zt]=e[zt]||{}}function fi(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),!t.did&&!e.did&&(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||Ht(),e.abnormal_mechanism&&(t.abnormal_mechanism=e.abnormal_mechanism),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=e.sid.length===32?e.sid:pt()),e.init!==void 0&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),typeof e.started=="number"&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if(typeof e.duration=="number")t.duration=e.duration;else{let n=t.timestamp-t.started;t.duration=n>=0?n:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),typeof e.errors=="number"&&(t.errors=e.errors),e.status&&(t.status=e.status)}var ya="_sentrySpan";function va(t,e){e?Tt(t,ya,e):delete t[ya]}function Ea(t){return t[ya]}var Gh=100,ba=class t{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=uo()}clone(){let e=new t;return e._breadcrumbs=[...this._breadcrumbs],e._tags=D({},this._tags),e._extra=D({},this._extra),e._contexts=D({},this._contexts),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata=D({},this._sdkProcessingMetadata),e._propagationContext=D({},this._propagationContext),e._client=this._client,e._lastEventId=this._lastEventId,va(e,Ea(this)),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&fi(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags=D(D({},this._tags),e),this._notifyScopeListeners(),this}setTag(e,n){return this._tags=Ie(D({},this._tags),{[e]:n}),this._notifyScopeListeners(),this}setExtras(e){return this._extra=D(D({},this._extra),e),this._notifyScopeListeners(),this}setExtra(e,n){return this._extra=Ie(D({},this._extra),{[e]:n}),this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,n){return n===null?delete this._contexts[e]:this._contexts[e]=n,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;let n=typeof e=="function"?e(this):e,[r,i]=n instanceof vt?[n.getScopeData(),n.getRequestSession()]:sn(n)?[e,e.requestSession]:[],{tags:o,extra:s,user:c,contexts:u,level:d,fingerprint:g=[],propagationContext:p}=r||{};return this._tags=D(D({},this._tags),o),this._extra=D(D({},this._extra),s),this._contexts=D(D({},this._contexts),u),c&&Object.keys(c).length&&(this._user=c),d&&(this._level=d),g.length&&(this._fingerprint=g),p&&(this._propagationContext=p),i&&(this._requestSession=i),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,va(this,void 0),this._attachments=[],this._propagationContext=uo(),this._notifyScopeListeners(),this}addBreadcrumb(e,n){let r=typeof n=="number"?n:Gh;if(r<=0)return this;let i=D({timestamp:vn()},e),o=this._breadcrumbs;return o.push(i),this._breadcrumbs=o.length>r?o.slice(-r):o,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:Ea(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=D(D({},this._sdkProcessingMetadata),e),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,n){let r=n&&n.event_id?n.event_id:pt();if(!this._client)return se.warn("No client configured on scope - will not capture exception!"),r;let i=new Error("Sentry syntheticException");return this._client.captureException(e,Ie(D({originalException:e,syntheticException:i},n),{event_id:r}),this),r}captureMessage(e,n,r){let i=r&&r.event_id?r.event_id:pt();if(!this._client)return se.warn("No client configured on scope - will not capture message!"),i;let o=new Error(e);return this._client.captureMessage(e,n,Ie(D({originalException:e,syntheticException:o},r),{event_id:i}),this),i}captureEvent(e,n){let r=n&&n.event_id?n.event_id:pt();return this._client?(this._client.captureEvent(e,Ie(D({},n),{event_id:r}),this),r):(se.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}},vt=ba;function Du(){return Sr("defaultCurrentScope",()=>new vt)}function Au(){return Sr("defaultIsolationScope",()=>new vt)}var wa=class{constructor(e,n){let r;e?r=e:r=new vt;let i;n?i=n:i=new vt,this._stack=[{scope:r}],this._isolationScope=i}withScope(e){let n=this._pushScope(),r;try{r=e(n)}catch(i){throw this._popScope(),i}return Nn(r)?r.then(i=>(this._popScope(),i),i=>{throw this._popScope(),i}):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){let e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}};function Or(){let t=er(),e=di(t);return e.stack=e.stack||new wa(Du(),Au())}function Wh(t){return Or().withScope(t)}function Yh(t,e){let n=Or();return n.withScope(()=>(n.getStackTop().scope=t,e(t)))}function Nu(t){return Or().withScope(()=>t(Or().getIsolationScope()))}function Ru(){return{withIsolationScope:Nu,withScope:Wh,withSetScope:Yh,withSetIsolationScope:(t,e)=>Nu(e),getCurrentScope:()=>Or().getScope(),getIsolationScope:()=>Or().getIsolationScope()}}function po(t){let e=di(t);return e.acs?e.acs:Ru()}function tr(){let t=er();return po(t).getCurrentScope()}function nr(){let t=er();return po(t).getIsolationScope()}function ho(){return Sr("globalScope",()=>new vt)}function mo(...t){let e=er(),n=po(e);if(t.length===2){let[r,i]=t;return r?n.withSetScope(r,i):n.withScope(i)}return n.withScope(t[0])}function Ke(){return tr().getClient()}var zh="_sentryMetrics";function Mu(t){let e=t[zh];if(!e)return;let n={};for(let[,[r,i]]of e)(n[r]||(n[r]=[])).push(at(i));return n}var Ca="sentry.source",Sa="sentry.sample_rate",Ia="sentry.op",xa="sentry.origin";var Kh=1;function ku(t){let{spanId:e,traceId:n}=t.spanContext(),{parent_span_id:r}=rr(t);return at({parent_span_id:r,span_id:e,trace_id:n})}function Pu(t){return typeof t=="number"?Lu(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?Lu(t.getTime()):Ht()}function Lu(t){return t>9999999999?t/1e3:t}function rr(t){if(qh(t))return t.getSpanJSON();try{let{spanId:e,traceId:n}=t.spanContext();if(Xh(t)){let{attributes:r,startTime:i,name:o,endTime:s,parentSpanId:c,status:u}=t;return at({span_id:e,trace_id:n,data:r,description:o,parent_span_id:c,start_timestamp:Pu(i),timestamp:Pu(s)||void 0,status:Zh(u),op:r[Ia],origin:r[xa],_metrics_summary:Mu(t)})}return{span_id:e,trace_id:n}}catch{return{}}}function Xh(t){let e=t;return!!e.attributes&&!!e.startTime&&!!e.name&&!!e.endTime&&!!e.status}function qh(t){return typeof t.getSpanJSON=="function"}function Fu(t){let{traceFlags:e}=t.spanContext();return e===Kh}function Zh(t){if(!(!t||t.code===0))return t.code===1?"ok":t.message||"unknown_error"}var Jh="_sentryRootSpan";function pi(t){return t[Jh]||t}var go="production";var Qh="_frozenDsc";function Ta(t,e){let n=e.getOptions(),{publicKey:r}=e.getDsn()||{},i=at({environment:n.environment||go,release:n.release,public_key:r,trace_id:t});return e.emit("createDsc",i),i}function Vu(t){let e=Ke();if(!e)return{};let n=Ta(rr(t).trace_id||"",e),r=pi(t),i=r[Qh];if(i)return i;let o=r.spanContext().traceState,s=o&&o.get("sentry.dsc"),c=s&&ca(s);if(c)return c;let u=rr(r),d=u.data||{},g=d[Sa];g!=null&&(n.sample_rate=`${g}`);let p=d[Ca],E=u.description;return p!=="url"&&E&&(n.transaction=E),n.sampled=String(Fu(r)),e.emit("createDsc",n,r),n}function Bu(t){if(typeof t=="boolean")return Number(t);let e=typeof t=="string"?parseFloat(t):t;if(typeof e!="number"||isNaN(e)||e<0||e>1){Be&&se.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(t)} of type ${JSON.stringify(typeof t)}.`);return}return e}function em(t,e){return e&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=[...t.sdk.integrations||[],...e.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...e.packages||[]]),t}function Uu(t,e,n,r){let i=lo(n),o=D(D({sent_at:new Date().toISOString()},i&&{sdk:i}),!!r&&e&&{dsn:_n(e)}),s="aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()];return En(o,[s])}function Hu(t,e,n,r){let i=lo(n),o=t.type&&t.type!=="replay_event"?t.type:"event";em(t,n&&n.sdk);let s=pa(t,i,r,e);return delete t.sdkProcessingMetadata,En(s,[[{type:o},t]])}function _o(t,e,n,r=0){return new ln((i,o)=>{let s=t[r];if(e===null||typeof s!="function")i(e);else{let c=s(D({},e),n);Be&&s.id&&c===null&&se.log(`Event processor "${s.id}" dropped event`),Nn(c)?c.then(u=>_o(t,u,n,r+1).then(i)).then(null,o):_o(t,c,n,r+1).then(i).then(null,o)}})}function ju(t,e){let{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:o}=e;tm(t,e),r&&im(t,r),om(t,n),nm(t,i),rm(t,o)}function Oa(t,e){let{extra:n,tags:r,user:i,contexts:o,level:s,sdkProcessingMetadata:c,breadcrumbs:u,fingerprint:d,eventProcessors:g,attachments:p,propagationContext:E,transactionName:C,span:O}=e;hi(t,"extra",n),hi(t,"tags",r),hi(t,"user",i),hi(t,"contexts",o),hi(t,"sdkProcessingMetadata",c),s&&(t.level=s),C&&(t.transactionName=C),O&&(t.span=O),u.length&&(t.breadcrumbs=[...t.breadcrumbs,...u]),d.length&&(t.fingerprint=[...t.fingerprint,...d]),g.length&&(t.eventProcessors=[...t.eventProcessors,...g]),p.length&&(t.attachments=[...t.attachments,...p]),t.propagationContext=D(D({},t.propagationContext),E)}function hi(t,e,n){if(n&&Object.keys(n).length){t[e]=D({},t[e]);for(let r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[e][r]=n[r])}}function tm(t,e){let{extra:n,tags:r,user:i,contexts:o,level:s,transactionName:c}=e,u=at(n);u&&Object.keys(u).length&&(t.extra=D(D({},u),t.extra));let d=at(r);d&&Object.keys(d).length&&(t.tags=D(D({},d),t.tags));let g=at(i);g&&Object.keys(g).length&&(t.user=D(D({},g),t.user));let p=at(o);p&&Object.keys(p).length&&(t.contexts=D(D({},p),t.contexts)),s&&(t.level=s),c&&t.type!=="transaction"&&(t.transaction=c)}function nm(t,e){let n=[...t.breadcrumbs||[],...e];t.breadcrumbs=n.length?n:void 0}function rm(t,e){t.sdkProcessingMetadata=D(D({},t.sdkProcessingMetadata),e)}function im(t,e){t.contexts=D({trace:ku(e)},t.contexts),t.sdkProcessingMetadata=D({dynamicSamplingContext:Vu(e)},t.sdkProcessingMetadata);let n=pi(e),r=rr(n).description;r&&!t.transaction&&t.type==="transaction"&&(t.transaction=r)}function om(t,e){t.fingerprint=t.fingerprint?oo(t.fingerprint):[],e&&(t.fingerprint=t.fingerprint.concat(e)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}function Gu(t,e,n,r,i,o){let{normalizeDepth:s=3,normalizeMaxBreadth:c=1e3}=t,u=Ie(D({},e),{event_id:e.event_id||n.event_id||pt(),timestamp:e.timestamp||vn()}),d=n.integrations||t.integrations.map(L=>L.name);sm(u,t),lm(u,d),i&&i.emit("applyFrameMetadata",e),e.type===void 0&&am(u,t.stackParser);let g=dm(r,n.captureContext);n.mechanism&&Rn(u,n.mechanism);let p=i?i.getEventProcessors():[],E=ho().getScopeData();if(o){let L=o.getScopeData();Oa(E,L)}if(g){let L=g.getScopeData();Oa(E,L)}let C=[...n.attachments||[],...E.attachments];C.length&&(n.attachments=C),ju(u,E);let O=[...p,...E.eventProcessors];return _o(O,u,n).then(L=>(L&&cm(L),typeof s=="number"&&s>0?um(L,s,c):L))}function sm(t,e){let{environment:n,release:r,dist:i,maxValueLength:o=250}=e;"environment"in t||(t.environment="environment"in e?n:go),t.release===void 0&&r!==void 0&&(t.release=r),t.dist===void 0&&i!==void 0&&(t.dist=i),t.message&&(t.message=mn(t.message,o));let s=t.exception&&t.exception.values&&t.exception.values[0];s&&s.value&&(s.value=mn(s.value,o));let c=t.request;c&&c.url&&(c.url=mn(c.url,o))}var $u=new WeakMap;function am(t,e){let n=ge._sentryDebugIds;if(!n)return;let r,i=$u.get(e);i?r=i:(r=new Map,$u.set(e,r));let o=Object.entries(n).reduce((s,[c,u])=>{let d,g=r.get(c);g?d=g:(d=e(c),r.set(c,d));for(let p=d.length-1;p>=0;p--){let E=d[p];if(E.filename){s[E.filename]=u;break}}return s},{});try{t.exception.values.forEach(s=>{s.stacktrace.frames.forEach(c=>{c.filename&&(c.debug_id=o[c.filename])})})}catch{}}function cm(t){let e={};try{t.exception.values.forEach(r=>{r.stacktrace.frames.forEach(i=>{i.debug_id&&(i.abs_path?e[i.abs_path]=i.debug_id:i.filename&&(e[i.filename]=i.debug_id),delete i.debug_id)})})}catch{}if(Object.keys(e).length===0)return;t.debug_meta=t.debug_meta||{},t.debug_meta.images=t.debug_meta.images||[];let n=t.debug_meta.images;Object.entries(e).forEach(([r,i])=>{n.push({type:"sourcemap",code_file:r,debug_id:i})})}function lm(t,e){e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}function um(t,e,n){if(!t)return null;let r=D(D(D(D(D({},t),t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(i=>D(D({},i),i.data&&{data:cn(i.data,e,n)}))}),t.user&&{user:cn(t.user,e,n)}),t.contexts&&{contexts:cn(t.contexts,e,n)}),t.extra&&{extra:cn(t.extra,e,n)});return t.contexts&&t.contexts.trace&&r.contexts&&(r.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(r.contexts.trace.data=cn(t.contexts.trace.data,e,n))),t.spans&&(r.spans=t.spans.map(i=>D(D({},i),i.data&&{data:cn(i.data,e,n)}))),r}function dm(t,e){if(!e)return t;let n=t?t.clone():new vt;return n.update(e),n}function Wu(t){if(t)return fm(t)?{captureContext:t}:hm(t)?{captureContext:t}:t}function fm(t){return t instanceof vt||typeof t=="function"}var pm=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function hm(t){return Object.keys(t).some(e=>pm.includes(e))}function yo(t,e){return tr().captureException(t,Wu(e))}function mi(t,e){return tr().captureEvent(t,e)}var mm="7";function gm(t){let e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}function _m(t){return`${gm(t)}${t.projectId}/envelope/`}function ym(t,e){return zs(D({sentry_key:t.publicKey,sentry_version:mm},e&&{sentry_client:`${e.name}/${e.version}`}))}function zu(t,e,n){return e||`${_m(t)}?${ym(t,n)}`}var Ku=[];function Xu(t,e){let n={};return e.forEach(r=>{r&&Aa(t,r,n)}),n}function Da(t,e){for(let n of e)n&&n.afterAllSetup&&n.afterAllSetup(t)}function Aa(t,e,n){if(n[e.name]){Be&&se.log(`Integration skipped because it was already installed: ${e.name}`);return}if(n[e.name]=e,Ku.indexOf(e.name)===-1&&typeof e.setupOnce=="function"&&(e.setupOnce(),Ku.push(e.name)),e.setup&&typeof e.setup=="function"&&e.setup(t),typeof e.preprocessEvent=="function"){let r=e.preprocessEvent.bind(e);t.on("preprocessEvent",(i,o)=>r(i,o,t))}if(typeof e.processEvent=="function"){let r=e.processEvent.bind(e),i=Object.assign((o,s)=>r(o,s,t),{id:e.name});t.addEventProcessor(i)}Be&&se.log(`Integration installed: ${e.name}`)}var qu="Not capturing exception because it's already been captured.",gi=class{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=qi(e.dsn):Be&&se.warn("No DSN provided, client will not send events."),this._dsn){let n=zu(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport(Ie(D({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this)},e.transportOptions),{url:n}))}}captureException(e,n,r){let i=pt();if(io(e))return Be&&se.log(qu),i;let o=D({event_id:i},n);return this._process(this.eventFromException(e,o).then(s=>this._captureEvent(s,o,r))),o.event_id}captureMessage(e,n,r,i){let o=D({event_id:pt()},r),s=wr(e)?e:String(e),c=Zn(e)?this.eventFromMessage(s,n,o):this.eventFromException(e,o);return this._process(c.then(u=>this._captureEvent(u,o,i))),o.event_id}captureEvent(e,n,r){let i=pt();if(n&&n.originalException&&io(n.originalException))return Be&&se.log(qu),i;let o=D({event_id:i},n),c=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,o,c||r)),o.event_id}captureSession(e){typeof e.release!="string"?Be&&se.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),fi(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){let n=this._transport;return n?(this.emit("flush"),this._isClientDoneProcessing(e).then(r=>n.flush(e).then(i=>r&&i))):Xt(!0)}close(e){return this.flush(e).then(n=>(this.getOptions().enabled=!1,this.emit("close"),n))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){this._isEnabled()&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){let n=this._integrations[e.name];Aa(this,e,this._integrations),n||Da(this,[e])}sendEvent(e,n={}){this.emit("beforeSendEvent",e,n);let r=Hu(e,this._dsn,this._options._metadata,this._options.tunnel);for(let o of n.attachments||[])r=ua(r,fa(o));let i=this.sendEnvelope(r);i&&i.then(o=>this.emit("afterSendEvent",e,o),null)}sendSession(e){let n=Uu(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(n)}recordDroppedEvent(e,n,r){if(this._options.sendClientReports){let i=`${e}:${n}`;Be&&se.log(`Adding outcome: "${i}"`),this._outcomes[i]=(this._outcomes[i]||0)+1}}on(e,n){let r=this._hooks[e]=this._hooks[e]||[];return r.push(n),()=>{let i=r.indexOf(n);i>-1&&r.splice(i,1)}}emit(e,...n){let r=this._hooks[e];r&&r.forEach(i=>i(...n))}sendEnvelope(e){return this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport?this._transport.send(e).then(null,n=>(Be&&se.error("Error while sending event:",n),n)):(Be&&se.error("Transport disabled"),Xt({}))}_setupIntegrations(){let{integrations:e}=this._options;this._integrations=Xu(this,e),Da(this,e)}_updateSessionFromEvent(e,n){let r=!1,i=!1,o=n.exception&&n.exception.values;if(o){i=!0;for(let u of o){let d=u.mechanism;if(d&&d.handled===!1){r=!0;break}}}let s=e.status==="ok";(s&&e.errors===0||s&&r)&&(fi(e,Ie(D({},r&&{status:"crashed"}),{errors:e.errors||Number(i||r)})),this.captureSession(e))}_isClientDoneProcessing(e){return new ln(n=>{let r=0,i=1,o=setInterval(()=>{this._numProcessing==0?(clearInterval(o),n(!0)):(r+=i,e&&r>=e&&(clearInterval(o),n(!1)))},i)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,n,r,i=nr()){let o=this.getOptions(),s=Object.keys(this._integrations);return!n.integrations&&s.length>0&&(n.integrations=s),this.emit("preprocessEvent",e,n),e.type||i.setLastEventId(e.event_id||n.event_id),Gu(o,e,n,r,this,i).then(c=>{if(c===null)return c;let u=D(D({},i.getPropagationContext()),r?r.getPropagationContext():void 0);if(!(c.contexts&&c.contexts.trace)&&u){let{traceId:g,spanId:p,parentSpanId:E,dsc:C}=u;c.contexts=D({trace:at({trace_id:g,span_id:p,parent_span_id:E})},c.contexts);let O=C||Ta(g,this);c.sdkProcessingMetadata=D({dynamicSamplingContext:O},c.sdkProcessingMetadata)}return c})}_captureEvent(e,n={},r){return this._processEvent(e,n,r).then(i=>i.event_id,i=>{if(Be){let o=i;o.logLevel==="log"?se.log(o.message):se.warn(o)}})}_processEvent(e,n,r){let i=this.getOptions(),{sampleRate:o}=i,s=Na(e),c=Zu(e),u=e.type||"error",d=`before send for type \`${u}\``,g=typeof o>"u"?void 0:Bu(o);if(c&&typeof g=="number"&&Math.random()>g)return this.recordDroppedEvent("sample_rate","error",e),Bn(new yt(`Discarding event because it's not included in the random sample (sampling rate = ${o})`,"log"));let p=u==="replay_event"?"replay":u,C=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,n,r,C).then(O=>{if(O===null)throw this.recordDroppedEvent("event_processor",p,e),new yt("An event processor returned `null`, will not send event.","log");if(n.data&&n.data.__sentry__===!0)return O;let L=Em(this,i,O,n);return vm(L,d)}).then(O=>{if(O===null){if(this.recordDroppedEvent("before_send",p,e),Na(e)){let Y=1+(e.spans||[]).length;this._outcomes.span=(this._outcomes.span||0)+Y}throw new yt(`${d} returned \`null\`, will not send event.`,"log")}let M=r&&r.getSession();!s&&M&&this._updateSessionFromEvent(M,O);let L=O.transaction_info;if(s&&L&&O.transaction!==e.transaction){let H="custom";O.transaction_info=Ie(D({},L),{source:H})}return this.sendEvent(O,n),O}).then(null,O=>{throw O instanceof yt?O:(this.captureException(O,{data:{__sentry__:!0},originalException:O}),new yt(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
18
+ Reason: ${O}`))})}_process(e){this._numProcessing++,e.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.entries(e).map(([n,r])=>{let[i,o]=n.split(":");return{reason:i,category:o,quantity:r}})}};function vm(t,e){let n=`${e} must return \`null\` or a valid event.`;if(Nn(t))return t.then(r=>{if(!sn(r)&&r!==null)throw new yt(n);return r},r=>{throw new yt(`${e} rejected with ${r}`)});if(!sn(t)&&t!==null)throw new yt(n);return t}function Em(t,e,n,r){let{beforeSend:i,beforeSendTransaction:o,beforeSendSpan:s}=e;if(Zu(n)&&i)return i(n,r);if(Na(n)){if(n.spans&&s){let c=[];for(let u of n.spans){let d=s(u);d?c.push(d):t.recordDroppedEvent("before_send","span")}n.spans=c}if(o)return o(n,r)}return n}function Zu(t){return t.type===void 0}function Na(t){return t.type==="transaction"}var bm=64;function vo(t,e,n=sa(t.bufferSize||bm)){let r={},i=s=>n.drain(s);function o(s){let c=[];if(ao(s,(p,E)=>{let C=co(E);if(ma(r,C)){let O=Ju(p,E);t.recordDroppedEvent("ratelimit_backoff",C,O)}else c.push(p)}),c.length===0)return Xt({});let u=En(s[0],c),d=p=>{ao(u,(E,C)=>{let O=Ju(E,C);t.recordDroppedEvent(p,co(C),O)})},g=()=>e({body:da(u)}).then(p=>(p.statusCode!==void 0&&(p.statusCode<200||p.statusCode>=300)&&Be&&se.warn(`Sentry responded with status code ${p.statusCode} to sent event.`),r=ga(r,p),p),p=>{throw d("network_error"),p});return n.add(g).then(p=>p,p=>{if(p instanceof yt)return Be&&se.error("Skipped sending event because buffer is full."),d("queue_overflow"),Xt({});throw p})}return{send:o,flush:i}}function Ju(t,e){if(!(e!=="event"&&e!=="transaction"))return Array.isArray(t)?t[1]:void 0}function Ra(t,e,n=[e],r="npm"){let i=t._metadata||{};i.sdk||(i.sdk={name:`sentry.javascript.${e}`,packages:n.map(o=>({name:`${r}:@sentry/${o}`,version:zt})),version:zt}),t._metadata=i}var wm=100;function bn(t,e){let n=Ke(),r=nr();if(!n)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:o=wm}=n.getOptions();if(o<=0)return;let s=vn(),c=D({timestamp:s},t),u=i?xr(()=>i(c,e)):c;u!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",u,e),r.addBreadcrumb(u,o))}var Qu,Cm="FunctionToString",ed=new WeakMap,Sm=()=>({name:Cm,setupOnce(){Qu=Function.prototype.toString;try{Function.prototype.toString=function(...t){let e=Qn(this),n=ed.has(Ke())&&e!==void 0?e:this;return Qu.apply(n,t)}}catch{}},setup(t){ed.set(t,!0)}}),Eo=Sm;var Im=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,"undefined is not an object (evaluating 'a.L')",`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler"],xm="InboundFilters",Tm=(t={})=>({name:xm,processEvent(e,n,r){let i=r.getOptions(),o=Om(t,i);return Dm(e,o)?null:e}}),wo=Tm;function Om(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...t.disableErrorDefaults?[]:Im],ignoreTransactions:[...t.ignoreTransactions||[],...e.ignoreTransactions||[]],ignoreInternal:t.ignoreInternal!==void 0?t.ignoreInternal:!0}}function Dm(t,e){return e.ignoreInternal&&Lm(t)?(Be&&se.warn(`Event dropped due to being internal Sentry Error.
19
+ Event: ${an(t)}`),!0):Am(t,e.ignoreErrors)?(Be&&se.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
20
+ Event: ${an(t)}`),!0):Fm(t)?(Be&&se.warn(`Event dropped due to not having an error message, error type or stacktrace.
21
+ Event: ${an(t)}`),!0):Nm(t,e.ignoreTransactions)?(Be&&se.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
22
+ Event: ${an(t)}`),!0):Rm(t,e.denyUrls)?(Be&&se.warn(`Event dropped due to being matched by \`denyUrls\` option.
23
+ Event: ${an(t)}.
24
+ Url: ${bo(t)}`),!0):Mm(t,e.allowUrls)?!1:(Be&&se.warn(`Event dropped due to not being matched by \`allowUrls\` option.
25
+ Event: ${an(t)}.
26
+ Url: ${bo(t)}`),!0)}function Am(t,e){return t.type||!e||!e.length?!1:Pm(t).some(n=>Cr(n,e))}function Nm(t,e){if(t.type!=="transaction"||!e||!e.length)return!1;let n=t.transaction;return n?Cr(n,e):!1}function Rm(t,e){if(!e||!e.length)return!1;let n=bo(t);return n?Cr(n,e):!1}function Mm(t,e){if(!e||!e.length)return!0;let n=bo(t);return n?Cr(n,e):!0}function Pm(t){let e=[];t.message&&e.push(t.message);let n;try{n=t.exception.values[t.exception.values.length-1]}catch{}return n&&n.value&&(e.push(n.value),n.type&&e.push(`${n.type}: ${n.value}`)),e}function Lm(t){try{return t.exception.values[0].type==="SentryError"}catch{}return!1}function km(t=[]){for(let e=t.length-1;e>=0;e--){let n=t[e];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function bo(t){try{let e;try{e=t.exception.values[0].stacktrace.frames}catch{}return e?km(e):null}catch{return Be&&se.error(`Cannot extract url for event ${an(t)}`),null}}function Fm(t){return t.type||!t.exception||!t.exception.values||t.exception.values.length===0?!1:!t.message&&!t.exception.values.some(e=>e.stacktrace||e.type&&e.type!=="Error"||e.value)}var Vm="Dedupe",Bm=()=>{let t;return{name:Vm,processEvent(e){if(e.type)return e;try{if(Um(e,t))return Be&&se.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return t=e}}},Co=Bm;function Um(t,e){return e?!!(Hm(t,e)||jm(t,e)):!1}function Hm(t,e){let n=t.message,r=e.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!rd(t,e)||!nd(t,e))}function jm(t,e){let n=td(e),r=td(t);return!(!n||!r||n.type!==r.type||n.value!==r.value||!rd(t,e)||!nd(t,e))}function nd(t,e){let n=eo(t),r=eo(e);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let i=0;i<r.length;i++){let o=r[i],s=n[i];if(o.filename!==s.filename||o.lineno!==s.lineno||o.colno!==s.colno||o.function!==s.function)return!1}return!0}function rd(t,e){let n=t.fingerprint,r=e.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function td(t){return t.exception&&t.exception.values&&t.exception.values[0]}var tt=ge,Ma=0;function Pa(){return Ma>0}function tg(){Ma++,setTimeout(()=>{Ma--})}function ir(t,e={},n){if(typeof t!="function")return t;try{let i=t.__sentry_wrapped__;if(i)return i;if(Qn(t))return t}catch{return t}let r=function(){let i=Array.prototype.slice.call(arguments);try{n&&typeof n=="function"&&n.apply(this,arguments);let o=i.map(s=>ir(s,e));return t.apply(this,o)}catch(o){throw tg(),mo(s=>{s.addEventProcessor(c=>(e.mechanism&&(Tr(c,void 0,void 0),Rn(c,e.mechanism)),c.extra=Ie(D({},c.extra),{arguments:i}),c)),yo(o)}),o}};try{for(let i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=t[i])}catch{}Zi(r,t),Tt(t,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return t.name}})}catch{}return r}var Pn=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function So(t,e){let n=Fa(t,e),r={type:e&&e.name,value:sg(e)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function ng(t,e,n,r){let i=Ke(),o=i&&i.getOptions().normalizeDepth,s=lg(e),c={__serialized__:so(e,o)};if(s)return{exception:{values:[So(t,s)]},extra:c};let u={exception:{values:[{type:Jn(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:ag(e,{isUnhandledRejection:r})}]},extra:c};if(n){let d=Fa(t,n);d.length&&(u.exception.values[0].stacktrace={frames:d})}return u}function La(t,e){return{exception:{values:[So(t,e)]}}}function Fa(t,e){let n=e.stacktrace||e.stack||"",r=ig(e),i=og(e);try{return t(n,r,i)}catch{}return[]}var rg=/Minified React error #\d+;/i;function ig(t){return t&&rg.test(t.message)?1:0}function og(t){return typeof t.framesToPop=="number"?t.framesToPop:0}function sg(t){let e=t&&t.message;return e?e.error&&typeof e.error.message=="string"?e.error.message:e:"No error message"}function ad(t,e,n,r){let i=n&&n.syntheticException||void 0,o=Io(t,e,i,r);return Rn(o),o.level="error",n&&n.event_id&&(o.event_id=n.event_id),Xt(o)}function cd(t,e,n="info",r,i){let o=r&&r.syntheticException||void 0,s=ka(t,e,o,i);return s.level=n,r&&r.event_id&&(s.event_id=r.event_id),Xt(s)}function Io(t,e,n,r,i){let o;if(zi(e)&&e.error)return La(t,e.error);if(Ki(e)||Fs(e)){let s=e;if("stack"in e)o=La(t,e);else{let c=s.name||(Ki(s)?"DOMError":"DOMException"),u=s.message?`${c}: ${s.message}`:c;o=ka(t,u,n,r),Tr(o,u)}return"code"in s&&(o.tags=Ie(D({},o.tags),{"DOMException.code":`${s.code}`})),o}return qn(e)?La(t,e):sn(e)||Jn(e)?(o=ng(t,e,n,i),Rn(o,{synthetic:!0}),o):(o=ka(t,e,n,r),Tr(o,`${e}`,void 0),Rn(o,{synthetic:!0}),o)}function ka(t,e,n,r){let i={};if(r&&n){let o=Fa(t,n);o.length&&(i.exception={values:[{value:e,stacktrace:{frames:o}}]})}if(wr(e)){let{__sentry_template_string__:o,__sentry_template_values__:s}=e;return i.logentry={message:o,params:s},i}return i.message=e,i}function ag(t,{isUnhandledRejection:e}){let n=Ks(t),r=e?"promise rejection":"exception";return zi(t)?`Event \`ErrorEvent\` captured as ${r} with message \`${t.message}\``:Jn(t)?`Event \`${cg(t)}\` (type=${t.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function cg(t){try{let e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch{}}function lg(t){for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e)){let n=t[e];if(n instanceof Error)return n}}function ld(t,{metadata:e,tunnel:n,dsn:r}){let i=D(D({event_id:t.event_id,sent_at:new Date().toISOString()},e&&e.sdk&&{sdk:{name:e.sdk.name,version:e.sdk.version}}),!!n&&!!r&&{dsn:_n(r)}),o=ug(t);return En(i,[o])}function ug(t){return[{type:"user_report"},t]}var _i=class extends gi{constructor(e){let n=D({parentSpanIsAlwaysRootSpan:!0},e),r=tt.SENTRY_SDK_SOURCE||ia();Ra(n,"browser",["browser"],r),super(n),n.sendClientReports&&tt.document&&tt.document.addEventListener("visibilitychange",()=>{tt.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(e,n){return ad(this._options.stackParser,e,n,this._options.attachStacktrace)}eventFromMessage(e,n="info",r){return cd(this._options.stackParser,e,n,r,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled()){Pn&&se.warn("SDK not enabled, will not capture user feedback.");return}let n=ld(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(n)}_prepareEvent(e,n,r){return e.platform=e.platform||"javascript",super._prepareEvent(e,n,r)}_flushOutcomes(){let e=this._clearOutcomes();if(e.length===0){Pn&&se.log("No outcomes to send");return}if(!this._dsn){Pn&&se.log("No dsn provided, will not send outcomes");return}Pn&&se.log("Sending outcomes:",e);let n=ha(e,this._options.tunnel&&_n(this._dsn));this.sendEnvelope(n)}};var ud=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var st=ge;var dg=1e3,dd,Va,Ba;function Ua(t){let e="dom";Ot(e,t),Dt(e,fg)}function fg(){if(!st.document)return;let t=ct.bind(null,"dom"),e=fd(t,!0);st.document.addEventListener("click",e,!1),st.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(n=>{let r=st[n]&&st[n].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(ze(r,"addEventListener",function(i){return function(o,s,c){if(o==="click"||o=="keypress")try{let u=this,d=u.__sentry_instrumentation_handlers__=u.__sentry_instrumentation_handlers__||{},g=d[o]=d[o]||{refCount:0};if(!g.handler){let p=fd(t);g.handler=p,i.call(this,o,p,c)}g.refCount++}catch{}return i.call(this,o,s,c)}}),ze(r,"removeEventListener",function(i){return function(o,s,c){if(o==="click"||o=="keypress")try{let u=this,d=u.__sentry_instrumentation_handlers__||{},g=d[o];g&&(g.refCount--,g.refCount<=0&&(i.call(this,o,g.handler,c),g.handler=void 0,delete d[o]),Object.keys(d).length===0&&delete u.__sentry_instrumentation_handlers__)}catch{}return i.call(this,o,s,c)}}))})}function pg(t){if(t.type!==Va)return!1;try{if(!t.target||t.target._sentryId!==Ba)return!1}catch{}return!0}function hg(t,e){return t!=="keypress"?!1:!e||!e.tagName?!0:!(e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable)}function fd(t,e=!1){return n=>{if(!n||n._sentryCaptured)return;let r=mg(n);if(hg(n.type,r))return;Tt(n,"_sentryCaptured",!0),r&&!r._sentryId&&Tt(r,"_sentryId",pt());let i=n.type==="keypress"?"input":n.type;pg(n)||(t({event:n,name:i,global:e}),Va=n.type,Ba=r?r._sentryId:void 0),clearTimeout(dd),dd=st.setTimeout(()=>{Ba=void 0,Va=void 0},dg)}}function mg(t){try{return t.target}catch{return null}}var xo;function Ha(t){let e="history";Ot(e,t),Dt(e,gg)}function gg(){if(!_a())return;let t=st.onpopstate;st.onpopstate=function(...n){let r=st.location.href,i=xo;if(xo=r,ct("history",{from:i,to:r}),t)try{return t.apply(this,n)}catch{}};function e(n){return function(...r){let i=r.length>2?r[2]:void 0;if(i){let o=xo,s=String(i);xo=s,ct("history",{from:o,to:s})}return n.apply(this,r)}}ze(st.history,"pushState",e),ze(st.history,"replaceState",e)}var To={};function ja(t){let e=To[t];if(e)return e;let n=st[t];if(ci(n))return To[t]=n.bind(st);let r=st.document;if(r&&typeof r.createElement=="function")try{let i=r.createElement("iframe");i.hidden=!0,r.head.appendChild(i);let o=i.contentWindow;o&&o[t]&&(n=o[t]),r.head.removeChild(i)}catch(i){ud&&se.warn(`Could not create sandbox iframe for ${t} check, bailing to window.${t}: `,i)}return n&&(To[t]=n.bind(st))}function Oo(t){To[t]=void 0}var or="__sentry_xhr_v3__";function $a(t){let e="xhr";Ot(e,t),Dt(e,_g)}function _g(){if(!st.XMLHttpRequest)return;let t=XMLHttpRequest.prototype;ze(t,"open",function(e){return function(...n){let r=Ht()*1e3,i=xt(n[0])?n[0].toUpperCase():void 0,o=yg(n[1]);if(!i||!o)return e.apply(this,n);this[or]={method:i,url:o,request_headers:{}},i==="POST"&&o.match(/sentry_key/)&&(this.__sentry_own_request__=!0);let s=()=>{let c=this[or];if(c&&this.readyState===4){try{c.status_code=this.status}catch{}let u={endTimestamp:Ht()*1e3,startTimestamp:r,xhr:this};ct("xhr",u)}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?ze(this,"onreadystatechange",function(c){return function(...u){return s(),c.apply(this,u)}}):this.addEventListener("readystatechange",s),ze(this,"setRequestHeader",function(c){return function(...u){let[d,g]=u,p=this[or];return p&&xt(d)&&xt(g)&&(p.request_headers[d.toLowerCase()]=g),c.apply(this,u)}}),e.apply(this,n)}}),ze(t,"send",function(e){return function(...n){let r=this[or];if(!r)return e.apply(this,n);n[0]!==void 0&&(r.body=n[0]);let i={startTimestamp:Ht()*1e3,xhr:this};return ct("xhr",i),e.apply(this,n)}})}function yg(t){if(xt(t))return t;try{return t.toString()}catch{}}function Ga(t,e=ja("fetch")){let n=0,r=0;function i(o){let s=o.body.length;n+=s,r++;let c=D({body:o.body,method:"POST",referrerPolicy:"origin",headers:t.headers,keepalive:n<=6e4&&r<15},t.fetchOptions);if(!e)return Oo("fetch"),Bn("No fetch implementation available");try{return e(t.url,c).then(u=>(n-=s,r--,{statusCode:u.status,headers:{"x-sentry-rate-limits":u.headers.get("X-Sentry-Rate-Limits"),"retry-after":u.headers.get("Retry-After")}}))}catch(u){return Oo("fetch"),n-=s,r--,Bn(u)}}return vo(t,i)}var vg=30;var Eg=50;function Wa(t,e,n,r){let i={filename:t,function:e==="<anonymous>"?yn:e,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}var bg=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,wg=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Cg=/\((\S*)(?::(\d+))(?::(\d+))\)/,Sg=t=>{let e=bg.exec(t);if(e){let[,r,i,o]=e;return Wa(r,yn,+i,+o)}let n=wg.exec(t);if(n){if(n[2]&&n[2].indexOf("eval")===0){let s=Cg.exec(n[2]);s&&(n[2]=s[1],n[3]=s[2],n[4]=s[3])}let[i,o]=gd(n[1]||yn,n[2]);return Wa(o,i,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},pd=[vg,Sg],Ig=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,xg=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Tg=t=>{let e=Ig.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){let o=xg.exec(e[3]);o&&(e[1]=e[1]||"eval",e[3]=o[1],e[4]=o[2],e[5]="")}let r=e[3],i=e[1]||yn;return[i,r]=gd(i,r),Wa(r,i,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}},hd=[Eg,Tg];var md=[pd,hd],Ya=qs(...md),gd=(t,e)=>{let n=t.indexOf("safari-extension")!==-1,r=t.indexOf("safari-web-extension")!==-1;return n||r?[t.indexOf("@")!==-1?t.split("@")[0]:yn,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]};var Do=1024,Dg="Breadcrumbs",Ag=(t={})=>{let e=D({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},t);return{name:Dg,setup(n){e.console&&Zs(Mg(n)),e.dom&&Ua(Rg(n,e.dom)),e.xhr&&$a(Pg(n)),e.fetch&&ta(Lg(n)),e.history&&Ha(kg(n)),e.sentry&&n.on("beforeSendEvent",Ng(n))}}},_d=Ag;function Ng(t){return function(n){Ke()===t&&bn({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:an(n)},{event:n})}}function Rg(t,e){return function(r){if(Ke()!==t)return;let i,o,s=typeof e=="object"?e.serializeAttribute:void 0,c=typeof e=="object"&&typeof e.maxStringLength=="number"?e.maxStringLength:void 0;c&&c>Do&&(Pn&&se.warn(`\`dom.maxStringLength\` cannot exceed ${Do}, but a value of ${c} was configured. Sentry will use ${Do} instead.`),c=Do),typeof s=="string"&&(s=[s]);try{let d=r.event,g=Fg(d)?d.target:d;i=si(g,{keyAttrs:s,maxStringLength:c}),o=Ws(g)}catch{i="<unknown>"}if(i.length===0)return;let u={category:`ui.${r.name}`,message:i};o&&(u.data={"ui.component_name":o}),bn(u,{event:r.event,name:r.name,global:r.global})}}function Mg(t){return function(n){if(Ke()!==t)return;let r={category:"console",data:{arguments:n.args,logger:"console"},level:aa(n.level),message:Xi(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${Xi(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;bn(r,{input:n.args,level:n.level})}}function Pg(t){return function(n){if(Ke()!==t)return;let{startTimestamp:r,endTimestamp:i}=n,o=n.xhr[or];if(!r||!i||!o)return;let{method:s,url:c,status_code:u,body:d}=o,g={method:s,url:c,status_code:u},p={xhr:n.xhr,input:d,startTimestamp:r,endTimestamp:i};bn({category:"xhr",data:g,type:"http"},p)}}function Lg(t){return function(n){if(Ke()!==t)return;let{startTimestamp:r,endTimestamp:i}=n;if(i&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.error){let o=n.fetchData,s={data:n.error,input:n.args,startTimestamp:r,endTimestamp:i};bn({category:"fetch",data:o,level:"error",type:"http"},s)}else{let o=n.response,s=Ie(D({},n.fetchData),{status_code:o&&o.status}),c={input:n.args,response:o,startTimestamp:r,endTimestamp:i};bn({category:"fetch",data:s,type:"http"},c)}}}function kg(t){return function(n){if(Ke()!==t)return;let r=n.from,i=n.to,o=ui(tt.location.href),s=r?ui(r):void 0,c=ui(i);(!s||!s.path)&&(s=o),o.protocol===c.protocol&&o.host===c.host&&(i=c.relative),o.protocol===s.protocol&&o.host===s.host&&(r=s.relative),bn({category:"navigation",data:{from:r,to:i}})}}function Fg(t){return!!t&&!!t.target}var Vg=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],Bg="BrowserApiErrors",Ug=(t={})=>{let e=D({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},t);return{name:Bg,setupOnce(){e.setTimeout&&ze(tt,"setTimeout",yd),e.setInterval&&ze(tt,"setInterval",yd),e.requestAnimationFrame&&ze(tt,"requestAnimationFrame",Hg),e.XMLHttpRequest&&"XMLHttpRequest"in tt&&ze(XMLHttpRequest.prototype,"send",jg);let n=e.eventTarget;n&&(Array.isArray(n)?n:Vg).forEach($g)}}},vd=Ug;function yd(t){return function(...e){let n=e[0];return e[0]=ir(n,{mechanism:{data:{function:Kt(t)},handled:!1,type:"instrument"}}),t.apply(this,e)}}function Hg(t){return function(e){return t.apply(this,[ir(e,{mechanism:{data:{function:"requestAnimationFrame",handler:Kt(t)},handled:!1,type:"instrument"}})])}}function jg(t){return function(...e){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(i=>{i in n&&typeof n[i]=="function"&&ze(n,i,function(o){let s={mechanism:{data:{function:i,handler:Kt(o)},handled:!1,type:"instrument"}},c=Qn(o);return c&&(s.mechanism.data.handler=Kt(c)),ir(o,s)})}),t.apply(this,e)}}function $g(t){let e=tt,n=e[t]&&e[t].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(ze(n,"addEventListener",function(r){return function(i,o,s){try{typeof o.handleEvent=="function"&&(o.handleEvent=ir(o.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Kt(o),target:t},handled:!1,type:"instrument"}}))}catch{}return r.apply(this,[i,ir(o,{mechanism:{data:{function:"addEventListener",handler:Kt(o),target:t},handled:!1,type:"instrument"}}),s])}}),ze(n,"removeEventListener",function(r){return function(i,o,s){let c=o;try{let u=c&&c.__sentry_wrapped__;u&&r.call(this,i,u,s)}catch{}return r.call(this,i,c,s)}}))}var Gg="GlobalHandlers",Wg=(t={})=>{let e=D({onerror:!0,onunhandledrejection:!0},t);return{name:Gg,setupOnce(){Error.stackTraceLimit=50},setup(n){e.onerror&&(Yg(n),Ed("onerror")),e.onunhandledrejection&&(zg(n),Ed("onunhandledrejection"))}}},bd=Wg;function Yg(t){na(e=>{let{stackParser:n,attachStacktrace:r}=wd();if(Ke()!==t||Pa())return;let{msg:i,url:o,line:s,column:c,error:u}=e,d=qg(Io(n,u||i,void 0,r,!1),o,s,c);d.level="error",mi(d,{originalException:u,mechanism:{handled:!1,type:"onerror"}})})}function zg(t){ra(e=>{let{stackParser:n,attachStacktrace:r}=wd();if(Ke()!==t||Pa())return;let i=Kg(e),o=Zn(i)?Xg(i):Io(n,i,void 0,r,!0);o.level="error",mi(o,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function Kg(t){if(Zn(t))return t;try{if("reason"in t)return t.reason;if("detail"in t&&"reason"in t.detail)return t.detail.reason}catch{}return t}function Xg(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}function qg(t,e,n,r){let i=t.exception=t.exception||{},o=i.values=i.values||[],s=o[0]=o[0]||{},c=s.stacktrace=s.stacktrace||{},u=c.frames=c.frames||[],d=isNaN(parseInt(r,10))?void 0:r,g=isNaN(parseInt(n,10))?void 0:n,p=xt(e)&&e.length>0?e:Gs();return u.length===0&&u.push({colno:d,filename:p,function:yn,in_app:!0,lineno:g}),t}function Ed(t){Pn&&se.log(`Global Handler attached: ${t}`)}function wd(){let t=Ke();return t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}var Cd=()=>({name:"HttpContext",preprocessEvent(t){if(!tt.navigator&&!tt.location&&!tt.document)return;let e=t.request&&t.request.url||tt.location&&tt.location.href,{referrer:n}=tt.document||{},{userAgent:r}=tt.navigator||{},i=D(D(D({},t.request&&t.request.headers),n&&{Referer:n}),r&&{"User-Agent":r}),o=Ie(D(D({},t.request),e&&{url:e}),{headers:i});t.request=o}});var Zg="cause",Jg=5,Qg="LinkedErrors",e_=(t={})=>{let e=t.limit||Jg,n=t.key||Zg;return{name:Qg,preprocessEvent(r,i,o){let s=o.getOptions();js(So,s.stackParser,s.maxValueLength,n,e,r,i)}}},Sd=e_;function za(t){return[wo(),Eo(),vd(),_d(),bd(),Sd(),Co(),Cd()]}var Ao=class t{static INSTANCE;contexts={};tags;client;user;constructor(){this.init()}static getInstance(){return this.INSTANCE||(this.INSTANCE=new t),this.INSTANCE}captureError(e,n,r){gt.error(`${n}:`,e);let i=this.getNewScope(r);i.setTag("operation",n),i.captureException(e)}captureMessage(e,n,r){this.getNewScope(r).captureMessage(e,n??"error")}setGlobalContext(e,n){this.contexts[e]=D({context:n},this.contexts[e])}setUser(e){this.user=e}setTags(e){this.tags=e}getNewScope(e){e??={};let{extra:n,tags:r}=e,i=new vt;if(i.setClient(this.client),i.setUser(this.user),e.triggerContext&&!e.engagementTrigger&&(e.engagementTrigger=e.triggerContext.triggerData),e.engagementTrigger){let o=e.engagementTrigger;i.setTags({"engagement.id":o.engagementID,"engagement.short_id":o.shortID,"engagement.objective":o.objective,"engagement.delivery_type":o.onsiteDeliveryType,"engagement.content_id":o.contentID,"engagement.variation":o.variation,"engagement.currency":o.currency})}return n&&i.setExtras(n),this.tags&&i.setTags(this.tags),r&&i.setTags(r),Object.keys(this.contexts).forEach(o=>{i.setContext(o,this.contexts[o])}),i.setTag("language",navigator.language),i.setTag("timezone",Id()),this.addShopifyTags(i),i}addShopifyTags(e){window.Shopify&&(e.setTag("shopify.shop",window.Shopify.shop),e.setTag("shopify.currency",window.Shopify.currency?.active),e.setTag("shopify.locale",window.Shopify.locale),e.setTag("theme.schema_name",window.Shopify.theme?.schema_name),e.setTag("theme.schema_version",window.Shopify.theme?.schema_version))}init(){let e=za({}).filter(n=>!["BrowserApiErrors","Breadcrumbs","GlobalHandlers"].includes(n.name));this.client=new _i({dsn:"https://1bc3dda4c861f60cd6be1b67584f4bc6@o559187.ingest.us.sentry.io/4507626484203520",transport:Ga,stackParser:Ya,integrations:e,environment:An.mode,release:`web-sdk@${Ye.SDK_VERSION}`,debug:An.debug}),this.client.init()}};var Dr=class{static ID="id";static SESSION_LANDING_PAGE="landing";static SESSION_LAST_USED_TIME="lastUsedTime";static SESSION_SYNCED="synced";static APP_CONFIG="conf";static DEVICE_ID="did";static SDK_TOKEN="token";static FIRST_SEEN="firstSeen";static SESSION_NUMBER="sessionNumber";static GA_CLIENT_ID="gacid";static CURRENT_CART="cart";static MUTED="muted"};var Xa=Ri(Td());function No(t){return Xa.default.createInstance({name:"lc",storeName:t,driver:Xa.default.LOCALSTORAGE})}var Ar=class{static storage;static async get(e,n){return await this.storage?.getItem(e)??n}static set(e,n){return this.storage?.setItem(e,n)}static remove(e){return this.storage?.removeItem(e)}static clear(){return this.storage?.clear()}static getForage(){return this.storage}};var qa=class extends Ar{static storeName="ses";static{this.storage=No(this.storeName)}};var Nr=class extends Ar{static storeName="usr";static{this.storage=No(this.storeName)}};var Ro=class{static format(e,n){let r=/{{\s*(\w+)\s*}}/;return n.replace(r,(i,o)=>{switch(o){case"amount":return this.formatWithDelimiters(e,2);case"amount_no_decimals":return this.formatWithDelimiters(e,0);case"amount_with_comma_separator":return this.formatWithDelimiters(e,2,".",",");case"amount_no_decimals_with_comma_separator":return this.formatWithDelimiters(e,0,".",",");case"amount_with_apostrophe_separator":return this.formatWithDelimiters(e,2,"'",".");case"amount_no_decimals_with_space_separator":return this.formatWithDelimiters(e,0," ");case"amount_with_space_separator":return this.formatWithDelimiters(e,2," ",",");case"amount_with_period_and_space_separator":return this.formatWithDelimiters(e,2," ",".");default:return i}})}static formatWithDelimiters(e,n=2,r=",",i="."){if(isNaN(e)||e==null)return"0";let s=(e/100).toFixed(n).split("."),c=s[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+r),u=s[1]?i+s[1]:"";return c+u}};var Mo=class{isCartDirty=!0;cartEngagements;isGoKwikPopupOpen;previewIDs;previewVariant;pageName;moneyFormat;jsLoadTime=new Date;shopCurrencyCode;locale;activeExperiment;inInactive=!1;lastEnterActive=new Date;lastEnterInactive=null;currentItem;_currencyCode;get currencyCode(){return this._currencyCode}set currencyCode(e){this._currencyCode=e}static get(){return window.CooeeSDK.runtimeData}isInactive(){return this.inInactive}async setInactive(){return this.inInactive?0:(this.inInactive=!0,this.lastEnterInactive=new Date,Math.max((this.lastEnterInactive.getTime()-this.lastEnterActive.getTime())/1e3,0))}setActive(){return this.inInactive?(this.inInactive=!1,this.lastEnterActive=new Date,Math.max((this.lastEnterActive.getTime()-this.lastEnterInactive.getTime())/1e3,0)):0}isFirstActive(){return this.lastEnterInactive==null}getCurrentItem(){return this.currentItem}setCurrentItem(e){this.currentItem=new vr(e)}};function sr(t,e){if(t==0&&e)return"Free";let n=Mo.get(),r=Er.get(),i=n.shopCurrencyCode||r.currency,o=n.currencyCode;o||gt.warn("Currency code is not set in RuntimeData");let s=r.money?.format??n.moneyFormat,c;if(s&&i===o)c=Ro.format(t*100,s);else{let u;try{u=new Intl.NumberFormat(t_(),{style:"currency",currency:o||i,minimumFractionDigits:0,maximumFractionDigits:2})}catch(d){return Ao.getInstance().captureError(d,"format-currency",{extra:{currentCurrency:o,shopCurrency:i}}),""}c=u.format(t),c=c.replace("\u20B9","Rs. "),r.money?.showCurrency&&o!=="INR"&&(c=c.concat(` ${o}`))}return c}function t_(){return navigator.languages!==void 0?navigator.languages[0].split("-")[0]:navigator.language??"en"}var Po;function Id(){if(Po)return Po;try{return Po=Intl.DateTimeFormat().resolvedOptions().timeZone,Po}catch{return""}}var wn=class t{transform(e){return e==null?null:sr(e)}static \u0275fac=function(n){return new(n||t)};static \u0275pipe=Fi({name:"cooeeCurrency",type:t,pure:!0})};var Od=(()=>{class t{static entityMap={'"':"&quot;"};static escapeHtml(n){return String(n).replace(/"/g,r=>t.entityMap[r])}}return t})();var n_=Object.prototype.toString,Mr=Array.isArray||function(e){return n_.call(e)==="[object Array]"};function Ja(t){return typeof t=="function"}function r_(t){return Mr(t)?"array":typeof t}function Za(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Dd(t,e){return t!=null&&typeof t=="object"&&e in t}function i_(t,e){return t!=null&&typeof t!="object"&&t.hasOwnProperty&&t.hasOwnProperty(e)}var o_=RegExp.prototype.test;function s_(t,e){return o_.call(t,e)}var a_=/\S/;function c_(t){return!s_(a_,t)}var l_={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"};function u_(t){return String(t).replace(/[&<>"'`=\/]/g,function(n){return l_[n]})}var d_=/\s*/,f_=/\s+/,Ad=/\s*=/,p_=/\s*\}/,h_=/#|\^|\/|>|\{|&|=|!/;function m_(t,e){if(!t)return[];var n=!1,r=[],i=[],o=[],s=!1,c=!1,u="",d=0;function g(){if(s&&!c)for(;o.length;)delete i[o.pop()];else o=[];s=!1,c=!1}var p,E,C;function O(te){if(typeof te=="string"&&(te=te.split(f_,2)),!Mr(te)||te.length!==2)throw new Error("Invalid tags: "+te);p=new RegExp(Za(te[0])+"\\s*"),E=new RegExp("\\s*"+Za(te[1])),C=new RegExp("\\s*"+Za("}"+te[1]))}O(e||qt.tags);for(var M=new vi(t),L,H,Y,oe,z,ye;!M.eos();){if(L=M.pos,Y=M.scanUntil(p),Y)for(var B=0,fe=Y.length;B<fe;++B)oe=Y.charAt(B),c_(oe)?(o.push(i.length),u+=oe):(c=!0,n=!0,u+=" "),i.push(["text",oe,L,L+1]),L+=1,oe===`
27
+ `&&(g(),u="",d=0,n=!1);if(!M.scan(p))break;if(s=!0,H=M.scan(h_)||"name",M.scan(d_),H==="="?(Y=M.scanUntil(Ad),M.scan(Ad),M.scanUntil(E)):H==="{"?(Y=M.scanUntil(C),M.scan(p_),M.scanUntil(E),H="&"):Y=M.scanUntil(E),!M.scan(E))throw new Error("Unclosed tag at "+M.pos);if(H==">"?z=[H,Y,L,M.pos,u,d,n]:z=[H,Y,L,M.pos],d++,i.push(z),H==="#"||H==="^")r.push(z);else if(H==="/"){if(ye=r.pop(),!ye)throw new Error('Unopened section "'+Y+'" at '+L);if(ye[1]!==Y)throw new Error('Unclosed section "'+ye[1]+'" at '+L)}else H==="name"||H==="{"||H==="&"?c=!0:H==="="&&O(Y)}if(g(),ye=r.pop(),ye)throw new Error('Unclosed section "'+ye[1]+'" at '+M.pos);return __(g_(i))}function g_(t){for(var e=[],n,r,i=0,o=t.length;i<o;++i)n=t[i],n&&(n[0]==="text"&&r&&r[0]==="text"?(r[1]+=n[1],r[3]=n[3]):(e.push(n),r=n));return e}function __(t){for(var e=[],n=e,r=[],i,o,s=0,c=t.length;s<c;++s)switch(i=t[s],i[0]){case"#":case"^":n.push(i),r.push(i),n=i[4]=[];break;case"/":o=r.pop(),o[5]=i[2],n=r.length>0?r[r.length-1][4]:e;break;default:n.push(i)}return e}function vi(t){this.string=t,this.tail=t,this.pos=0}vi.prototype.eos=function(){return this.tail===""};vi.prototype.scan=function(e){var n=this.tail.match(e);if(!n||n.index!==0)return"";var r=n[0];return this.tail=this.tail.substring(r.length),this.pos+=r.length,r};vi.prototype.scanUntil=function(e){var n=this.tail.search(e),r;switch(n){case-1:r=this.tail,this.tail="";break;case 0:r="";break;default:r=this.tail.substring(0,n),this.tail=this.tail.substring(n)}return this.pos+=r.length,r};function Rr(t,e){this.view=t,this.cache={".":this.view},this.parent=e}Rr.prototype.push=function(e){return new Rr(e,this)};Rr.prototype.lookup=function(e){var n=this.cache,r;if(n.hasOwnProperty(e))r=n[e];else{for(var i=this,o,s,c,u=!1;i;){if(e.indexOf(".")>0)for(o=i.view,s=e.split("."),c=0;o!=null&&c<s.length;)c===s.length-1&&(u=Dd(o,s[c])||i_(o,s[c])),o=o[s[c++]];else o=i.view[e],u=Dd(i.view,e);if(u){r=o;break}i=i.parent}n[e]=r}return Ja(r)&&(r=r.call(this.view)),r};function At(){this.templateCache={_cache:{},set:function(e,n){this._cache[e]=n},get:function(e){return this._cache[e]},clear:function(){this._cache={}}}}At.prototype.clearCache=function(){typeof this.templateCache<"u"&&this.templateCache.clear()};At.prototype.parse=function(e,n){var r=this.templateCache,i=e+":"+(n||qt.tags).join(":"),o=typeof r<"u",s=o?r.get(i):void 0;return s==null&&(s=m_(e,n),o&&r.set(i,s)),s};At.prototype.render=function(e,n,r,i){var o=this.getConfigTags(i),s=this.parse(e,o),c=n instanceof Rr?n:new Rr(n,void 0);return this.renderTokens(s,c,r,e,i)};At.prototype.renderTokens=function(e,n,r,i,o){for(var s="",c,u,d,g=0,p=e.length;g<p;++g)d=void 0,c=e[g],u=c[0],u==="#"?d=this.renderSection(c,n,r,i,o):u==="^"?d=this.renderInverted(c,n,r,i,o):u===">"?d=this.renderPartial(c,n,r,o):u==="&"?d=this.unescapedValue(c,n):u==="name"?d=this.escapedValue(c,n,o):u==="text"&&(d=this.rawValue(c)),d!==void 0&&(s+=d);return s};At.prototype.renderSection=function(e,n,r,i,o){var s=this,c="",u=n.lookup(e[1]);function d(E){return s.render(E,n,r,o)}if(u){if(Mr(u))for(var g=0,p=u.length;g<p;++g)c+=this.renderTokens(e[4],n.push(u[g]),r,i,o);else if(typeof u=="object"||typeof u=="string"||typeof u=="number")c+=this.renderTokens(e[4],n.push(u),r,i,o);else if(Ja(u)){if(typeof i!="string")throw new Error("Cannot use higher-order sections without the original template");u=u.call(n.view,i.slice(e[3],e[5]),d),u!=null&&(c+=u)}else c+=this.renderTokens(e[4],n,r,i,o);return c}};At.prototype.renderInverted=function(e,n,r,i,o){var s=n.lookup(e[1]);if(!s||Mr(s)&&s.length===0)return this.renderTokens(e[4],n,r,i,o)};At.prototype.indentPartial=function(e,n,r){for(var i=n.replace(/[^ \t]/g,""),o=e.split(`
28
28
  `),s=0;s<o.length;s++)o[s].length&&(s>0||!r)&&(o[s]=i+o[s]);return o.join(`
29
- `)};kt.prototype.renderPartial=function(e,n,r,i){if(r){var o=this.getConfigTags(i),s=xc(r)?r(e[1]):r[e[1]];if(s!=null){var a=e[6],u=e[5],d=e[4],m=s;u==0&&d&&(m=this.indentPartial(s,d,a));var h=this.parse(m,o);return this.renderTokens(h,n,r,m,i)}}};kt.prototype.unescapedValue=function(e,n){var r=n.lookup(e[1]);if(r!=null)return r};kt.prototype.escapedValue=function(e,n,r){var i=this.getConfigEscape(r)||on.escape,o=n.lookup(e[1]);if(o!=null)return typeof o=="number"&&i===on.escape?String(o):i(o)};kt.prototype.rawValue=function(e){return e[1]};kt.prototype.getConfigTags=function(e){return qr(e)?e:e&&typeof e=="object"?e.tags:void 0};kt.prototype.getConfigEscape=function(e){if(e&&typeof e=="object"&&!qr(e))return e.escape};var on={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(t){Li.templateCache=t},get templateCache(){return Li.templateCache}},Li=new kt;on.clearCache=function(){return Li.clearCache()};on.parse=function(e,n){return Li.parse(e,n)};on.render=function(e,n,r,i){if(typeof e!="string")throw new TypeError('Invalid template! Template should be a "string" but "'+cv(e)+'" was given as the first argument for mustache#render(template, view, partials)');return Li.render(e,n,r,i)};on.escape=mv;on.Scanner=Fi;on.Context=Xr;on.Writer=kt;var Dc=on;Dc.escape=df.escapeHtml;var Qo=class t{transform(e,n){return e?Dc.render(e,O({},n)):null}static \u0275fac=function(n){return new(n||t)};static \u0275pipe=io({name:"cooeeDynamicVariables",type:t,pure:!0})};var Tc={};(function t(e,n,r,i){var o=!!(e.Worker&&e.Blob&&e.Promise&&e.OffscreenCanvas&&e.OffscreenCanvasRenderingContext2D&&e.HTMLCanvasElement&&e.HTMLCanvasElement.prototype.transferControlToOffscreen&&e.URL&&e.URL.createObjectURL),s=typeof Path2D=="function"&&typeof DOMMatrix=="function",a=function(){if(!e.OffscreenCanvas)return!1;var v=new OffscreenCanvas(1,1),y=v.getContext("2d");y.fillRect(0,0,1,1);var H=v.transferToImageBitmap();try{y.createPattern(H,"no-repeat")}catch{return!1}return!0}();function u(){}function d(v){var y=n.exports.Promise,H=y!==void 0?y:e.Promise;return typeof H=="function"?new H(v):(v(u,u),null)}var m=function(v,y){return{transform:function(H){if(v)return H;if(y.has(H))return y.get(H);var Z=new OffscreenCanvas(H.width,H.height),re=Z.getContext("2d");return re.drawImage(H,0,0),y.set(H,Z),Z},clear:function(){y.clear()}}}(a,new Map),h=function(){var v=Math.floor(16.666666666666668),y,H,Z={},re=0;return typeof requestAnimationFrame=="function"&&typeof cancelAnimationFrame=="function"?(y=function(oe){var ue=Math.random();return Z[ue]=requestAnimationFrame(function Q(ae){re===ae||re+v-1<ae?(re=ae,delete Z[ue],oe()):Z[ue]=requestAnimationFrame(Q)}),ue},H=function(oe){Z[oe]&&cancelAnimationFrame(Z[oe])}):(y=function(oe){return setTimeout(oe,v)},H=function(oe){return clearTimeout(oe)}),{frame:y,cancel:H}}(),E=function(){var v,y,H={};function Z(re){function oe(ue,Q){re.postMessage({options:ue||{},callback:Q})}re.init=function(Q){var ae=Q.transferControlToOffscreen();re.postMessage({canvas:ae},[ae])},re.fire=function(Q,ae,te){if(y)return oe(Q,null),y;var de=Math.random().toString(36).slice(2);return y=d(function(ce){function he(pe){pe.data.callback===de&&(delete H[de],re.removeEventListener("message",he),y=null,m.clear(),te(),ce())}re.addEventListener("message",he),oe(Q,de),H[de]=he.bind(null,{data:{callback:de}})}),y},re.reset=function(){re.postMessage({reset:!0});for(var Q in H)H[Q](),delete H[Q]}}return function(){if(v)return v;if(!r&&o){var re=["var CONFETTI, SIZE = {}, module = {};","("+t.toString()+")(this, module, true, SIZE);","onmessage = function(msg) {"," if (msg.data.options) {"," CONFETTI(msg.data.options).then(function () {"," if (msg.data.callback) {"," postMessage({ callback: msg.data.callback });"," }"," });"," } else if (msg.data.reset) {"," CONFETTI && CONFETTI.reset();"," } else if (msg.data.resize) {"," SIZE.width = msg.data.resize.width;"," SIZE.height = msg.data.resize.height;"," } else if (msg.data.canvas) {"," SIZE.width = msg.data.canvas.width;"," SIZE.height = msg.data.canvas.height;"," CONFETTI = module.exports.create(msg.data.canvas);"," }","}"].join(`
30
- `);try{v=new Worker(URL.createObjectURL(new Blob([re])))}catch(oe){return typeof console!==void 0&&typeof console.warn=="function"&&console.warn("\u{1F38A} Could not load worker",oe),null}Z(v)}return v}}(),S={particleCount:50,angle:90,spread:45,startVelocity:45,decay:.9,gravity:1,drift:0,ticks:200,x:.5,y:.5,shapes:["square","circle"],zIndex:100,colors:["#26ccff","#a25afd","#ff5e7e","#88ff5a","#fcff42","#ffa62d","#ff36ff"],disableForReducedMotion:!1,scalar:1};function T(v,y){return y?y(v):v}function k(v){return v!=null}function P(v,y,H){return T(v&&k(v[y])?v[y]:S[y],H)}function j(v){return v<0?0:Math.floor(v)}function Y(v,y){return Math.floor(Math.random()*(y-v))+v}function ee(v){return parseInt(v,16)}function K(v){return v.map(ge)}function ge(v){var y=String(v).replace(/[^0-9a-f]/gi,"");return y.length<6&&(y=y[0]+y[0]+y[1]+y[1]+y[2]+y[2]),{r:ee(y.substring(0,2)),g:ee(y.substring(2,4)),b:ee(y.substring(4,6))}}function U(v){var y=P(v,"origin",Object);return y.x=P(y,"x",Number),y.y=P(y,"y",Number),y}function fe(v){v.width=document.documentElement.clientWidth,v.height=document.documentElement.clientHeight}function ne(v){var y=v.getBoundingClientRect();v.width=y.width,v.height=y.height}function Ee(v){var y=document.createElement("canvas");return y.style.position="fixed",y.style.top="0px",y.style.left="0px",y.style.pointerEvents="none",y.style.zIndex=v,y}function Le(v,y,H,Z,re,oe,ue,Q,ae){v.save(),v.translate(y,H),v.rotate(oe),v.scale(Z,re),v.arc(0,0,1,ue,Q,ae),v.restore()}function De(v){var y=v.angle*(Math.PI/180),H=v.spread*(Math.PI/180);return{x:v.x,y:v.y,wobble:Math.random()*10,wobbleSpeed:Math.min(.11,Math.random()*.1+.05),velocity:v.startVelocity*.5+Math.random()*v.startVelocity,angle2D:-y+(.5*H-Math.random()*H),tiltAngle:(Math.random()*(.75-.25)+.25)*Math.PI,color:v.color,shape:v.shape,tick:0,totalTicks:v.ticks,decay:v.decay,drift:v.drift,random:Math.random()+2,tiltSin:0,tiltCos:0,wobbleX:0,wobbleY:0,gravity:v.gravity*3,ovalScalar:.6,scalar:v.scalar,flat:v.flat}}function Re(v,y){y.x+=Math.cos(y.angle2D)*y.velocity+y.drift,y.y+=Math.sin(y.angle2D)*y.velocity+y.gravity,y.velocity*=y.decay,y.flat?(y.wobble=0,y.wobbleX=y.x+10*y.scalar,y.wobbleY=y.y+10*y.scalar,y.tiltSin=0,y.tiltCos=0,y.random=1):(y.wobble+=y.wobbleSpeed,y.wobbleX=y.x+10*y.scalar*Math.cos(y.wobble),y.wobbleY=y.y+10*y.scalar*Math.sin(y.wobble),y.tiltAngle+=.1,y.tiltSin=Math.sin(y.tiltAngle),y.tiltCos=Math.cos(y.tiltAngle),y.random=Math.random()+2);var H=y.tick++/y.totalTicks,Z=y.x+y.random*y.tiltCos,re=y.y+y.random*y.tiltSin,oe=y.wobbleX+y.random*y.tiltCos,ue=y.wobbleY+y.random*y.tiltSin;if(v.fillStyle="rgba("+y.color.r+", "+y.color.g+", "+y.color.b+", "+(1-H)+")",v.beginPath(),s&&y.shape.type==="path"&&typeof y.shape.path=="string"&&Array.isArray(y.shape.matrix))v.fill(D(y.shape.path,y.shape.matrix,y.x,y.y,Math.abs(oe-Z)*.1,Math.abs(ue-re)*.1,Math.PI/10*y.wobble));else if(y.shape.type==="bitmap"){var Q=Math.PI/10*y.wobble,ae=Math.abs(oe-Z)*.1,te=Math.abs(ue-re)*.1,de=y.shape.bitmap.width*y.scalar,ce=y.shape.bitmap.height*y.scalar,he=new DOMMatrix([Math.cos(Q)*ae,Math.sin(Q)*ae,-Math.sin(Q)*te,Math.cos(Q)*te,y.x,y.y]);he.multiplySelf(new DOMMatrix(y.shape.matrix));var pe=v.createPattern(m.transform(y.shape.bitmap),"no-repeat");pe.setTransform(he),v.globalAlpha=1-H,v.fillStyle=pe,v.fillRect(y.x-de/2,y.y-ce/2,de,ce),v.globalAlpha=1}else if(y.shape==="circle")v.ellipse?v.ellipse(y.x,y.y,Math.abs(oe-Z)*y.ovalScalar,Math.abs(ue-re)*y.ovalScalar,Math.PI/10*y.wobble,0,2*Math.PI):Le(v,y.x,y.y,Math.abs(oe-Z)*y.ovalScalar,Math.abs(ue-re)*y.ovalScalar,Math.PI/10*y.wobble,0,2*Math.PI);else if(y.shape==="star")for(var me=Math.PI/2*3,p=4*y.scalar,c=8*y.scalar,l=y.x,_=y.y,I=5,A=Math.PI/I;I--;)l=y.x+Math.cos(me)*c,_=y.y+Math.sin(me)*c,v.lineTo(l,_),me+=A,l=y.x+Math.cos(me)*p,_=y.y+Math.sin(me)*p,v.lineTo(l,_),me+=A;else v.moveTo(Math.floor(y.x),Math.floor(y.y)),v.lineTo(Math.floor(y.wobbleX),Math.floor(re)),v.lineTo(Math.floor(oe),Math.floor(ue)),v.lineTo(Math.floor(Z),Math.floor(y.wobbleY));return v.closePath(),v.fill(),y.tick<y.totalTicks}function Ke(v,y,H,Z,re){var oe=y.slice(),ue=v.getContext("2d"),Q,ae,te=d(function(de){function ce(){Q=ae=null,ue.clearRect(0,0,Z.width,Z.height),m.clear(),re(),de()}function he(){r&&!(Z.width===i.width&&Z.height===i.height)&&(Z.width=v.width=i.width,Z.height=v.height=i.height),!Z.width&&!Z.height&&(H(v),Z.width=v.width,Z.height=v.height),ue.clearRect(0,0,Z.width,Z.height),oe=oe.filter(function(pe){return Re(ue,pe)}),oe.length?Q=h.frame(he):ce()}Q=h.frame(he),ae=ce});return{addFettis:function(de){return oe=oe.concat(de),te},canvas:v,promise:te,reset:function(){Q&&h.cancel(Q),ae&&ae()}}}function Xe(v,y){var H=!v,Z=!!P(y||{},"resize"),re=!1,oe=P(y,"disableForReducedMotion",Boolean),ue=o&&!!P(y||{},"useWorker"),Q=ue?E():null,ae=H?fe:ne,te=v&&Q?!!v.__confetti_initialized:!1,de=typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion)").matches,ce;function he(me,p,c){for(var l=P(me,"particleCount",j),_=P(me,"angle",Number),I=P(me,"spread",Number),A=P(me,"startVelocity",Number),V=P(me,"decay",Number),ve=P(me,"gravity",Number),Se=P(me,"drift",Number),ye=P(me,"colors",K),Fe=P(me,"ticks",Number),Ve=P(me,"shapes"),Qe=P(me,"scalar"),jt=!!P(me,"flat"),qt=U(me),Ln=l,Dt=[],$t=v.width*qt.x,Ji=v.height*qt.y;Ln--;)Dt.push(De({x:$t,y:Ji,angle:_,spread:I,startVelocity:A,color:ye[Ln%ye.length],shape:Ve[Y(0,Ve.length)],ticks:Fe,decay:V,gravity:ve,drift:Se,scalar:Qe,flat:jt}));return ce?ce.addFettis(Dt):(ce=Ke(v,Dt,ae,p,c),ce.promise)}function pe(me){var p=oe||P(me,"disableForReducedMotion",Boolean),c=P(me,"zIndex",Number);if(p&&de)return d(function(A){A()});H&&ce?v=ce.canvas:H&&!v&&(v=Ee(c),document.body.appendChild(v)),Z&&!te&&ae(v);var l={width:v.width,height:v.height};Q&&!te&&Q.init(v),te=!0,Q&&(v.__confetti_initialized=!0);function _(){if(Q){var A={getBoundingClientRect:function(){if(!H)return v.getBoundingClientRect()}};ae(A),Q.postMessage({resize:{width:A.width,height:A.height}});return}l.width=l.height=null}function I(){ce=null,Z&&(re=!1,e.removeEventListener("resize",_)),H&&v&&(document.body.contains(v)&&document.body.removeChild(v),v=null,te=!1)}return Z&&!re&&(re=!0,e.addEventListener("resize",_,!1)),Q?Q.fire(me,l,I):he(me,l,I)}return pe.reset=function(){Q&&Q.reset(),ce&&ce.reset()},pe}var _t;function R(){return _t||(_t=Xe(null,{useWorker:!0,resize:!0})),_t}function D(v,y,H,Z,re,oe,ue){var Q=new Path2D(v),ae=new Path2D;ae.addPath(Q,new DOMMatrix(y));var te=new Path2D;return te.addPath(ae,new DOMMatrix([Math.cos(ue)*re,Math.sin(ue)*re,-Math.sin(ue)*oe,Math.cos(ue)*oe,H,Z])),te}function F(v){if(!s)throw new Error("path confetti are not supported in this browser");var y,H;typeof v=="string"?y=v:(y=v.path,H=v.matrix);var Z=new Path2D(y),re=document.createElement("canvas"),oe=re.getContext("2d");if(!H){for(var ue=1e3,Q=ue,ae=ue,te=0,de=0,ce,he,pe=0;pe<ue;pe+=2)for(var me=0;me<ue;me+=2)oe.isPointInPath(Z,pe,me,"nonzero")&&(Q=Math.min(Q,pe),ae=Math.min(ae,me),te=Math.max(te,pe),de=Math.max(de,me));ce=te-Q,he=de-ae;var p=10,c=Math.min(p/ce,p/he);H=[c,0,0,c,-Math.round(ce/2+Q)*c,-Math.round(he/2+ae)*c]}return{type:"path",path:y,matrix:H}}function L(v){var y,H=1,Z="#000000",re='"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "EmojiOne Color", "Android Emoji", "Twemoji Mozilla", "system emoji", sans-serif';typeof v=="string"?y=v:(y=v.text,H="scalar"in v?v.scalar:H,re="fontFamily"in v?v.fontFamily:re,Z="color"in v?v.color:Z);var oe=10*H,ue=""+oe+"px "+re,Q=new OffscreenCanvas(oe,oe),ae=Q.getContext("2d");ae.font=ue;var te=ae.measureText(y),de=Math.ceil(te.actualBoundingBoxRight+te.actualBoundingBoxLeft),ce=Math.ceil(te.actualBoundingBoxAscent+te.actualBoundingBoxDescent),he=2,pe=te.actualBoundingBoxLeft+he,me=te.actualBoundingBoxAscent+he;de+=he+he,ce+=he+he,Q=new OffscreenCanvas(de,ce),ae=Q.getContext("2d"),ae.font=ue,ae.fillStyle=Z,ae.fillText(y,pe,me);var p=1/H;return{type:"bitmap",bitmap:Q.transferToImageBitmap(),matrix:[p,0,0,p,-de*p/2,-ce*p/2]}}n.exports=function(){return R().apply(this,arguments)},n.exports.reset=function(){R().reset()},n.exports.create=Xe,n.exports.shapeFromPath=F,n.exports.shapeFromText=L})(function(){return typeof window<"u"?window:typeof self<"u"?self:this||{}}(),Tc,!1);var pf=Tc.exports,z1=Tc.exports.create;var es=class{static DEFAULTS={scalar:1.4,zIndex:1e4,shapes:["circle","circle","square"],colors:["#f51c8f","#2179e2","#d52dc8","#01a9d9","#78ff44","#fdff6a"]};static async basic(){await this.fire({particleCount:100,spread:70,origin:{y:.6}})}static async leftRight(e=100){let n=[],r=Date.now()+2e3,i=()=>{n.push(this.fire({angle:60,spread:55,origin:{x:0}}),this.fire({angle:120,spread:55,origin:{x:1}})),Date.now()<r&&e>0&&(requestAnimationFrame(i),e--)};i(),await Promise.all(n)}static async realistic(){await Promise.all([this.realisticFire(.25,{spread:26,startVelocity:55}),this.realisticFire(.2,{spread:60}),this.realisticFire(.35,{spread:100,decay:.91,scalar:.8}),this.realisticFire(.1,{spread:120,startVelocity:25,decay:.92,scalar:1.2}),this.realisticFire(.1,{spread:120,startVelocity:45})])}static async fire(e){Object.assign(e,this.DEFAULTS,e),e.particleCount=e.particleCount??this.DEFAULTS.colors.length,await pf(e)}static async realisticFire(e,n){let i={origin:{y:.7}};await this.fire(Object.assign({},i,n,{particleCount:Math.floor(200*e)}))}};var Sv=(t,e)=>e.minValue;function Cv(t,e){if(t&1&&(Ie(0,"div",7),St(1,"safeHtml")),t&2){let n=J().$implicit;be("innerHTML",Rt(1,1,n.minValue+" Products"),un)}}function Iv(t,e){if(t&1&&(Ie(0,"div",7),St(1,"cooeeCurrency"),St(2,"safeHtml")),t&2){let n=J().$implicit;be("innerHTML",Rt(2,3,Rt(1,1,n.minValue)),un)}}function xv(t,e){if(t&1&&(X(0,"li",6)(1,"div"),Ae(2,Cv,2,3,"div",7)(3,Iv,3,5,"div",7),Ie(4,"img",8),X(5,"div",9),Oe(6),q()()()),t&2){let n=e.$implicit,r=J(2);Mr("left",n.calculatedAlignment+"%"),W(2),Ne((r.progressBarConfig==null?null:r.progressBarConfig.rewardBasis)===r.RewardBasis.ITEM_COUNT?2:3),W(2),be("src",r.getIconURL(n),vt),W(2),Zn(n.label)}}function Dv(t,e){if(t&1&&(Vt(0)(1),Ie(2,"div",0),St(3,"cooeeDynamicVariables"),St(4,"safeHtml"),X(5,"div",1)(6,"ul",2)(7,"div",3),Ie(8,"div",4),q(),et(9,xv,7,5,"li",5,Sv),q()()),t&2){let n=J(),r=n.calculatedState(),i=r.nextMilestone?r.nextMilestone.reachingText:r.lastMilestone.reachedText;W(2),be("innerHTML",Rt(4,6,wu(3,3,i,n.localDynamicVariables())),un),W(6),Mr("width",r.cartValuePercentage+"%"),W(),tt(r.milestones)}}var ts=class t extends Cn{cart;localDynamicVariables=Tt({});calculatedState=Tt({});progressBarConfig;RewardBasis=la;constructor(){super()}engagementTriggerReceived(e){this.progressBarConfig=e.progressBarConfig}ngOnInit(){super.ngOnInit(),this.calculateMilestonesSilently()}update(){this.calculateMilestonesSilently()}getIconURL(e){return e.rewardType===bi.FREE_SHIPPING?"https://img.icons8.com/ios-filled/50/FFFFFF/free-shipping.png":e.rewardType===bi.DISCOUNT?"https://img.icons8.com/ios-glyphs/30/FFFFFF/sale-price-tag.png":e.rewardType===bi.FREE_AUTO_GIFT?"https://img.icons8.com/ios-filled/50/FFFFFF/gift--v1.png":""}calculateMilestonesSilently(){this.calculateMilestones().catch(e=>Ct.error(e))}async calculateMilestones(){let e=this.engagementTrigger,n=this.progressBarConfig;if(!n?.milestones?.length){Ct.warn("Milestones not available in progress bar config",e);return}let r=await this.cart.getNormalisedCart(),i=n.milestones.at(-1),o=n?.reachedAmountOrCount??r.originalAmount,s=n.totalProgress??0;Ct.debug("Cart value:",o,`, percentage: ${s}%`),this.celebrate(e,o);let a={milestonesReady:!0,cartValuePercentage:s,milestones:n.milestones},u=n.milestones.find(d=>!d.reached);if(u){let d=gr(u.minValue-o);if(n.rewardBasis==="ITEM_COUNT"){let m=u.minValue-o;d=`${m} ${m===1?"product":"products"}`}this.localDynamicVariables.set({amount_left:d}),a.nextMilestone=u,this.calculatedState.set(a);return}a.lastMilestone=i,this.calculatedState.set(a)}celebrate(e,n){let o=[...e.progressBarConfig.milestones].reverse().find(u=>u.minValue<n);if(!o)return;let s=`lc/en/${e.shortID}/${o.minValue}`;sessionStorage.getItem(s)||(sessionStorage.setItem(s,"1"),this.progressBarConfig?.noConfetti||es.realistic())}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Te({type:t,selectors:[["cooee-progressbar"]],inputs:{cart:"cart"},features:[bt],decls:1,vars:1,consts:[[1,"heading",3,"innerHTML"],[1,"milestone-container"],[1,"milestone-list"],[1,"untracked-path"],[1,"tracked-path"],[1,"milestone-list-item",3,"left"],[1,"milestone-list-item"],[1,"milestone-value",3,"innerHTML"],["width","20","height","20","alt","milestone icon",1,"milestone-icon",3,"src"],[1,"milestone-label"]],template:function(n,r){n&1&&Ae(0,Dv,11,8),n&2&&Ne(r.calculatedState().milestonesReady?0:-1)},dependencies:[Qo,Qn,Pn],styles:[`:host{display:block;padding:10px;background:linear-gradient(0deg,rgba(var(--lc-color-primary),.1) 0%,transparent 100%)}.milestone-container{width:95%;margin:8px 0}.heading{font-weight:500;text-align:center;font-size:12px}.milestone-list{display:flex;align-items:center;position:relative;font-size:10px;font-weight:500}.untracked-path{width:100%;background-color:#e5e7eb;height:4px;position:absolute}.tracked-path{background-color:rgb(var(--lc-color-primary));height:100%;display:block;transition:width .5s ease-in-out}.milestone-list{padding:0;margin:0}.milestone-list-item{position:relative;display:flex;flex-direction:column;align-items:center;height:75px}.milestone-list-item>div{display:flex;flex-direction:column;align-items:center;justify-content:space-between;position:absolute;height:100%;width:100px}.milestone-icon{padding:5px;border-radius:1000px;background-color:rgb(var(--lc-color-primary))}
31
- `],encapsulation:3})};var mf=eo(aa());var Tv=(t,e)=>({enter:t,exit:e});function Ov(t,e){if(t&1&&(X(0,"div",7),Oe(1),q(),X(2,"div",8),Oe(3),q()),t&2){let n=J(2);W(),Wt(" ",n.getCurrency(n.selectedVariant().price.cmp)," "),W(2),Wt(" ",n.getDiscountPercentage(n.selectedVariant().price),"% off ")}}function Rv(t,e){if(t&1&&(X(0,"div",6),Oe(1),q()),t&2){let n=J(2);W(),Wt(" ",n.stickyATCConfig.leftText," ")}}function Av(t,e){if(t&1&&(X(0,"div",1)(1,"div",5),Oe(2),q(),Ae(3,Ov,4,2)(4,Rv,2,1,"div",6),q()),t&2){let n=J();W(2),Wt(" ",n.getCurrency(n.selectedVariant().price.d)," "),W(),Ne(n.selectedVariant().price.cmp?3:-1),W(),Ne(n.stickyATCConfig.leftText?4:-1)}}function Nv(t,e){if(t&1&&(X(0,"div",9),Oe(1),q()),t&2){let n=e.$implicit,r=e.$index;J(2);let i=Ot(5);be("ngClass",yu(2,Tv,r===i.currentIndex,r===i.previousIndex)),W(),Wt(" ",n," ")}}function Pv(t,e){if(t&1&&(X(0,"div",4),et(1,Nv,2,5,"div",9,wn),q()),t&2){J();let n=Ot(5);W(),tt(n.features)}}var ns=class t extends Cn{currentItem;stickyATCConfig;selectedVariant=Tt(void 0);featureSlider=Tt({features:[],currentIndex:0});constructor(){super()}engagementTriggerReceived(e){this.stickyATCConfig=e.stickyATCConfig??{},this.currentItem=e.items[0],this.selectedVariant.set(this.currentItem.vars[0]),this.stickyATCConfig.leftText=this.replaceVariables(this.stickyATCConfig.leftText),this.stickyATCConfig.rightText=this.replaceVariables(this.stickyATCConfig.rightText),this.startFeatureRotation()}update(){}getCurrency(e){return gr(e)}getDiscountPercentage(e){return((e.cmp-e.d)/e.cmp*100).toFixed(0)}async addToCart(){this.executeCTAViaRenderer({clickAction:{at:102},item:this.currentItem})}startFeatureRotation(){if(!this.stickyATCConfig.rightText)return;let e=this.stickyATCConfig.rightText.split(`
32
- `),n=e.length===1?null:setInterval(()=>{this.featureSlider.update(r=>xe(O({},r),{previousIndex:r.currentIndex,currentIndex:(r.currentIndex+1)%r.features.length}))},3e3);this.featureSlider.set({intervalRef:n,currentIndex:0,features:e})}replaceVariables(e){return e?(0,mf.render)(e,this.currentItem.getTemplateVariables()):""}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Te({type:t,selectors:[["cooee-sticky-atc"]],features:[bt],decls:7,vars:3,consts:[[1,"lc-wrapper"],[1,"lc-prices"],[1,"lc-button-wrapper"],["type","button",1,"lc-button","lc-button-atc",3,"click"],[1,"lc-features"],[1,"lc-sale-price"],[1,"lc-additional-text"],[1,"lc-compare-price"],[1,"lc-discount-label"],[1,"lc-feature",3,"ngClass"]],template:function(n,r){if(n&1){let i=st();X(0,"div",0),Ae(1,Av,5,3,"div",1),X(2,"div",2)(3,"button",3),Me("click",function(){return $e(i),Ge(r.addToCart())}),Oe(4,"Add To Cart"),q(),Vt(5),Ae(6,Pv,3,0,"div",4),q()()}if(n&2){W(),Ne(r.selectedVariant()&&r.stickyATCConfig.showProductInfo?1:-1),W(4);let i=bn(r.featureSlider());W(),Ne(i.features.length?6:-1)}},dependencies:[Jn],styles:["[_nghost-%COMP%]{display:flex;justify-content:center;padding:10px;background-color:#fff;width:100%;box-shadow:4px 0 10px #0006;line-height:normal}.lc-wrapper[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:8px;max-width:1100px;width:100%}.lc-prices[_ngcontent-%COMP%]{flex:1 1 100%;display:flex;flex-wrap:wrap;align-items:center;gap:6px}@media (min-width: 768px){.lc-prices[_ngcontent-%COMP%]{gap:8px}}.lc-sale-price[_ngcontent-%COMP%]{font-size:24px;font-weight:600}.lc-compare-price[_ngcontent-%COMP%]{font-size:18px;font-weight:600;color:red;text-decoration:line-through}.lc-discount-label[_ngcontent-%COMP%]{font-size:12px;font-weight:500;color:green}.lc-button-wrapper[_ngcontent-%COMP%]{flex:1 1 100%;display:flex;flex-direction:column;gap:4px;align-items:center}.lc-button[_ngcontent-%COMP%]{background-color:#000;color:#fff;opacity:1;cursor:pointer;pointer-events:auto;border-radius:4px;min-width:150px;width:100%;padding:8px}.lc-additional-text[_ngcontent-%COMP%], .lc-feature[_ngcontent-%COMP%]{font-size:12px;color:#666}.lc-features[_ngcontent-%COMP%]{position:relative;overflow:hidden;height:16px;text-align:center;width:100%}.lc-features[_ngcontent-%COMP%] .lc-feature[_ngcontent-%COMP%]{position:absolute;width:100%;opacity:0;transform:translateY(100%);transition:transform .5s ease,opacity .5s ease}.lc-features[_ngcontent-%COMP%] .lc-feature.enter[_ngcontent-%COMP%]{opacity:1;transform:translateY(0);z-index:2}.lc-features[_ngcontent-%COMP%] .lc-feature.exit[_ngcontent-%COMP%]{opacity:0;transform:translateY(-100%);z-index:1}"]})};var Ef,We,wf,Mc,_r,gf,bf,Rc,Sf,kc,Ac,Nc,Mv,Pc={},Cf=[],kv=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Lc=Array.isArray;function tr(t,e){for(var n in e)t[n]=e[n];return t}function Fc(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function Oc(t,e,n,r,i){var o={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++wf,__i:-1,__u:0};return i==null&&We.vnode!=null&&We.vnode(o),o}function Vc(t){return t.children}function Zr(t,e){this.props=t,this.context=e}function Jr(t,e){if(e==null)return t.__?Jr(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?Jr(t):null}function If(t){var e,n;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null){t.__e=t.__c.base=n.__e;break}return If(t)}}function _f(t){(!t.__d&&(t.__d=!0)&&_r.push(t)&&!is.__r++||gf!==We.debounceRendering)&&((gf=We.debounceRendering)||bf)(is)}function is(){var t,e,n,r,i,o,s,a;for(_r.sort(Rc);t=_r.shift();)t.__d&&(e=_r.length,r=void 0,o=(i=(n=t).__v).__e,s=[],a=[],n.__P&&((r=tr({},i)).__v=i.__v+1,We.vnode&&We.vnode(r),Tf(n.__P,r,i,n.__n,n.__P.namespaceURI,32&i.__u?[o]:null,s,o??Jr(i),!!(32&i.__u),a),r.__v=i.__v,r.__.__k[r.__i]=r,Vv(s,r,a),r.__e!=o&&If(r)),_r.length>e&&_r.sort(Rc));is.__r=0}function xf(t,e,n,r,i,o,s,a,u,d,m){var h,E,S,T,k,P,j=r&&r.__k||Cf,Y=e.length;for(u=Lv(n,e,j,u,Y),h=0;h<Y;h++)(S=n.__k[h])!=null&&(E=S.__i===-1?Pc:j[S.__i]||Pc,S.__i=h,P=Tf(t,S,E,i,o,s,a,u,d,m),T=S.__e,S.ref&&E.ref!=S.ref&&(E.ref&&Bc(E.ref,null,S),m.push(S.ref,S.__c||T,S)),k==null&&T!=null&&(k=T),4&S.__u||E.__k===S.__k?u=Df(S,u,t):typeof S.type=="function"&&P!==void 0?u=P:T&&(u=T.nextSibling),S.__u&=-7);return n.__e=k,u}function Lv(t,e,n,r,i){var o,s,a,u,d,m=n.length,h=m,E=0;for(t.__k=new Array(i),o=0;o<i;o++)(s=e[o])!=null&&typeof s!="boolean"&&typeof s!="function"?(u=o+E,(s=t.__k[o]=typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?Oc(null,s,null,null,null):Lc(s)?Oc(Vc,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?Oc(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):s).__=t,s.__b=t.__b+1,a=null,(d=s.__i=Fv(s,n,u,h))!==-1&&(h--,(a=n[d])&&(a.__u|=2)),a==null||a.__v===null?(d==-1&&E--,typeof s.type!="function"&&(s.__u|=4)):d!=u&&(d==u-1?E--:d==u+1?E++:(d>u?E--:E++,s.__u|=4))):t.__k[o]=null;if(h)for(o=0;o<m;o++)(a=n[o])!=null&&(2&a.__u)==0&&(a.__e==r&&(r=Jr(a)),Of(a,a));return r}function Df(t,e,n){var r,i;if(typeof t.type=="function"){for(r=t.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=t,e=Df(r[i],e,n));return e}t.__e!=e&&(e&&t.type&&!n.contains(e)&&(e=Jr(t)),n.insertBefore(t.__e,e||null),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function Fv(t,e,n,r){var i,o,s=t.key,a=t.type,u=e[n];if(u===null||u&&s==u.key&&a===u.type&&(2&u.__u)==0)return n;if(r>(u!=null&&(2&u.__u)==0?1:0))for(i=n-1,o=n+1;i>=0||o<e.length;){if(i>=0){if((u=e[i])&&(2&u.__u)==0&&s==u.key&&a===u.type)return i;i--}if(o<e.length){if((u=e[o])&&(2&u.__u)==0&&s==u.key&&a===u.type)return o;o++}}return-1}function vf(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||kv.test(e)?n:n+"px"}function rs(t,e,n,r,i){var o;e:if(e=="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof r=="string"&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||vf(t.style,e,"");if(n)for(e in n)r&&n[e]===r[e]||vf(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")o=e!=(e=e.replace(Sf,"$1")),e=e.toLowerCase()in t||e=="onFocusOut"||e=="onFocusIn"?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+o]=n,n?r?n.u=r.u:(n.u=kc,t.addEventListener(e,o?Nc:Ac,o)):t.removeEventListener(e,o?Nc:Ac,o);else{if(i=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n))}}function yf(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=kc++;else if(e.t<n.u)return;return n(We.event?We.event(e):e)}}}function Tf(t,e,n,r,i,o,s,a,u,d){var m,h,E,S,T,k,P,j,Y,ee,K,ge,U,fe,ne,Ee,Le,De=e.type;if(e.constructor!==void 0)return null;128&n.__u&&(u=!!(32&n.__u),o=[a=e.__e=n.__e]),(m=We.__b)&&m(e);e:if(typeof De=="function")try{if(j=e.props,Y="prototype"in De&&De.prototype.render,ee=(m=De.contextType)&&r[m.__c],K=m?ee?ee.props.value:m.__:r,n.__c?P=(h=e.__c=n.__c).__=h.__E:(Y?e.__c=h=new De(j,K):(e.__c=h=new Zr(j,K),h.constructor=De,h.render=Uv),ee&&ee.sub(h),h.props=j,h.state||(h.state={}),h.context=K,h.__n=r,E=h.__d=!0,h.__h=[],h._sb=[]),Y&&h.__s==null&&(h.__s=h.state),Y&&De.getDerivedStateFromProps!=null&&(h.__s==h.state&&(h.__s=tr({},h.__s)),tr(h.__s,De.getDerivedStateFromProps(j,h.__s))),S=h.props,T=h.state,h.__v=e,E)Y&&De.getDerivedStateFromProps==null&&h.componentWillMount!=null&&h.componentWillMount(),Y&&h.componentDidMount!=null&&h.__h.push(h.componentDidMount);else{if(Y&&De.getDerivedStateFromProps==null&&j!==S&&h.componentWillReceiveProps!=null&&h.componentWillReceiveProps(j,K),!h.__e&&(h.shouldComponentUpdate!=null&&h.shouldComponentUpdate(j,h.__s,K)===!1||e.__v==n.__v)){for(e.__v!=n.__v&&(h.props=j,h.state=h.__s,h.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(Re){Re&&(Re.__=e)}),ge=0;ge<h._sb.length;ge++)h.__h.push(h._sb[ge]);h._sb=[],h.__h.length&&s.push(h);break e}h.componentWillUpdate!=null&&h.componentWillUpdate(j,h.__s,K),Y&&h.componentDidUpdate!=null&&h.__h.push(function(){h.componentDidUpdate(S,T,k)})}if(h.context=K,h.props=j,h.__P=t,h.__e=!1,U=We.__r,fe=0,Y){for(h.state=h.__s,h.__d=!1,U&&U(e),m=h.render(h.props,h.state,h.context),ne=0;ne<h._sb.length;ne++)h.__h.push(h._sb[ne]);h._sb=[]}else do h.__d=!1,U&&U(e),m=h.render(h.props,h.state,h.context),h.state=h.__s;while(h.__d&&++fe<25);h.state=h.__s,h.getChildContext!=null&&(r=tr(tr({},r),h.getChildContext())),Y&&!E&&h.getSnapshotBeforeUpdate!=null&&(k=h.getSnapshotBeforeUpdate(S,T)),a=xf(t,Lc(Ee=m!=null&&m.type===Vc&&m.key==null?m.props.children:m)?Ee:[Ee],e,n,r,i,o,s,a,u,d),h.base=e.__e,e.__u&=-161,h.__h.length&&s.push(h),P&&(h.__E=h.__=null)}catch(Re){if(e.__v=null,u||o!=null)if(Re.then){for(e.__u|=u?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;o[o.indexOf(a)]=null,e.__e=a}else for(Le=o.length;Le--;)Fc(o[Le]);else e.__e=n.__e,e.__k=n.__k;We.__e(Re,e,n)}else o==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):a=e.__e=Bv(n.__e,e,n,r,i,o,s,u,d);return(m=We.diffed)&&m(e),128&e.__u?void 0:a}function Vv(t,e,n){for(var r=0;r<n.length;r++)Bc(n[r],n[++r],n[++r]);We.__c&&We.__c(e,t),t.some(function(i){try{t=i.__h,i.__h=[],t.some(function(o){o.call(i)})}catch(o){We.__e(o,i.__v)}})}function Bv(t,e,n,r,i,o,s,a,u){var d,m,h,E,S,T,k,P=n.props,j=e.props,Y=e.type;if(Y=="svg"?i="http://www.w3.org/2000/svg":Y=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),o!=null){for(d=0;d<o.length;d++)if((S=o[d])&&"setAttribute"in S==!!Y&&(Y?S.localName==Y:S.nodeType==3)){t=S,o[d]=null;break}}if(t==null){if(Y==null)return document.createTextNode(j);t=document.createElementNS(i,Y,j.is&&j),a&&(We.__m&&We.__m(e,o),a=!1),o=null}if(Y===null)P===j||a&&t.data===j||(t.data=j);else{if(o=o&&Ef.call(t.childNodes),P=n.props||Pc,!a&&o!=null)for(P={},d=0;d<t.attributes.length;d++)P[(S=t.attributes[d]).name]=S.value;for(d in P)if(S=P[d],d!="children"){if(d=="dangerouslySetInnerHTML")h=S;else if(!(d in j)){if(d=="value"&&"defaultValue"in j||d=="checked"&&"defaultChecked"in j)continue;rs(t,d,null,S,i)}}for(d in j)S=j[d],d=="children"?E=S:d=="dangerouslySetInnerHTML"?m=S:d=="value"?T=S:d=="checked"?k=S:a&&typeof S!="function"||P[d]===S||rs(t,d,S,P[d],i);if(m)a||h&&(m.__html===h.__html||m.__html===t.innerHTML)||(t.innerHTML=m.__html),e.__k=[];else if(h&&(t.innerHTML=""),xf(t,Lc(E)?E:[E],e,n,r,Y=="foreignObject"?"http://www.w3.org/1999/xhtml":i,o,s,o?o[0]:n.__k&&Jr(n,0),a,u),o!=null)for(d=o.length;d--;)Fc(o[d]);a||(d="value",Y=="progress"&&T==null?t.removeAttribute("value"):T!==void 0&&(T!==t[d]||Y=="progress"&&!T||Y=="option"&&T!==P[d])&&rs(t,d,T,P[d],i),d="checked",k!==void 0&&k!==t[d]&&rs(t,d,k,P[d],i))}return t}function Bc(t,e,n){try{if(typeof t=="function"){var r=typeof t.__u=="function";r&&t.__u(),r&&e==null||(t.__u=t(e))}else t.current=e}catch(i){We.__e(i,n)}}function Of(t,e,n){var r,i;if(We.unmount&&We.unmount(t),(r=t.ref)&&(r.current&&r.current!==t.__e||Bc(r,null,e)),(r=t.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){We.__e(o,e)}r.base=r.__P=null}if(r=t.__k)for(i=0;i<r.length;i++)r[i]&&Of(r[i],e,n||typeof t.type!="function");n||Fc(t.__e),t.__c=t.__=t.__e=void 0}function Uv(t,e,n){return this.constructor(t,n)}Ef=Cf.slice,We={__e:function(t,e,n,r){for(var i,o,s;e=e.__;)if((i=e.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(t)),s=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(t,r||{}),s=i.__d),s)return i.__E=i}catch(a){t=a}throw t}},wf=0,Mc=function(t){return t!=null&&t.constructor==null},Zr.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=tr({},this.state),typeof t=="function"&&(t=t(tr({},n),this.props)),t&&tr(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),_f(this))},Zr.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),_f(this))},Zr.prototype.render=Vc,_r=[],bf=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Rc=function(t,e){return t.__v.__b-e.__v.__b},is.__r=0,Sf=/(PointerCapture)$|Capture$/i,kc=0,Ac=yf(!1),Nc=yf(!0),Mv=0;var Hc,Xt,Uc,Rf,Af=0,Bf=[],gt=We,Nf=gt.__b,Pf=gt.__r,Mf=gt.diffed,kf=gt.__c,Lf=gt.unmount,Ff=gt.__;function Hv(t,e){gt.__h&&gt.__h(Xt,t,Af||e),Af=0;var n=Xt.__H||(Xt.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function $c(t,e){var n=Hv(Hc++,7);return Gv(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function jv(){for(var t;t=Bf.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(os),t.__H.__h.forEach(jc),t.__H.__h=[]}catch(e){t.__H.__h=[],gt.__e(e,t.__v)}}gt.__b=function(t){Xt=null,Nf&&Nf(t)},gt.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),Ff&&Ff(t,e)},gt.__r=function(t){Pf&&Pf(t),Hc=0;var e=(Xt=t.__c).__H;e&&(Uc===Xt?(e.__h=[],Xt.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.i=n.__N=void 0})):(e.__h.forEach(os),e.__h.forEach(jc),e.__h=[],Hc=0)),Uc=Xt},gt.diffed=function(t){Mf&&Mf(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(Bf.push(e)!==1&&Rf===gt.requestAnimationFrame||((Rf=gt.requestAnimationFrame)||$v)(jv)),e.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.i=void 0})),Uc=Xt=null},gt.__c=function(t,e){e.some(function(n){try{n.__h.forEach(os),n.__h=n.__h.filter(function(r){return!r.__||jc(r)})}catch(r){e.some(function(i){i.__h&&(i.__h=[])}),e=[],gt.__e(r,n.__v)}}),kf&&kf(t,e)},gt.unmount=function(t){Lf&&Lf(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{os(r)}catch(i){e=i}}),n.__H=void 0,e&&gt.__e(e,n.__v))};var Vf=typeof requestAnimationFrame=="function";function $v(t){var e,n=function(){clearTimeout(r),Vf&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);Vf&&(e=requestAnimationFrame(n))}function os(t){var e=Xt,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),Xt=e}function jc(t){var e=Xt;t.__c=t.__(),Xt=e}function Gv(t,e){return!t||t.length!==e.length||e.some(function(n,r){return n!==t[r]})}var Wv=Symbol.for("preact-signals");function Wc(){if(Qr>1)Qr--;else{for(var t,e=!1;Vi!==void 0;){var n=Vi;for(Vi=void 0,Gc++;n!==void 0;){var r=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&Hf(n))try{n.c()}catch(i){e||(t=i,e=!0)}n=r}}if(Gc=0,Qr--,e)throw t}}var ze=void 0;var Vi=void 0,Qr=0,Gc=0,ss=0;function Uf(t){if(ze!==void 0){var e=t.n;if(e===void 0||e.t!==ze)return e={i:0,S:t,p:ze.s,n:void 0,t:ze,e:void 0,x:void 0,r:e},ze.s!==void 0&&(ze.s.n=e),ze.s=e,t.n=e,32&ze.f&&t.S(e),e;if(e.i===-1)return e.i=0,e.n!==void 0&&(e.n.p=e.p,e.p!==void 0&&(e.p.n=e.n),e.p=ze.s,e.n=void 0,ze.s.n=e,ze.s=e),e}}function Et(t){this.v=t,this.i=0,this.n=void 0,this.t=void 0}Et.prototype.brand=Wv;Et.prototype.h=function(){return!0};Et.prototype.S=function(t){this.t!==t&&t.e===void 0&&(t.x=this.t,this.t!==void 0&&(this.t.e=t),this.t=t)};Et.prototype.U=function(t){if(this.t!==void 0){var e=t.e,n=t.x;e!==void 0&&(e.x=n,t.e=void 0),n!==void 0&&(n.e=e,t.x=void 0),t===this.t&&(this.t=n)}};Et.prototype.subscribe=function(t){var e=this;return as(function(){var n=e.value,r=ze;ze=void 0;try{t(n)}finally{ze=r}})};Et.prototype.valueOf=function(){return this.value};Et.prototype.toString=function(){return this.value+""};Et.prototype.toJSON=function(){return this.value};Et.prototype.peek=function(){var t=ze;ze=void 0;try{return this.value}finally{ze=t}};Object.defineProperty(Et.prototype,"value",{get:function(){var t=Uf(this);return t!==void 0&&(t.i=this.i),this.v},set:function(t){if(t!==this.v){if(Gc>100)throw new Error("Cycle detected");this.v=t,this.i++,ss++,Qr++;try{for(var e=this.t;e!==void 0;e=e.x)e.t.N()}finally{Wc()}}}});function Bi(t){return new Et(t)}function Hf(t){for(var e=t.s;e!==void 0;e=e.n)if(e.S.i!==e.i||!e.S.h()||e.S.i!==e.i)return!0;return!1}function jf(t){for(var e=t.s;e!==void 0;e=e.n){var n=e.S.n;if(n!==void 0&&(e.r=n),e.S.n=e,e.i=-1,e.n===void 0){t.s=e;break}}}function $f(t){for(var e=t.s,n=void 0;e!==void 0;){var r=e.p;e.i===-1?(e.S.U(e),r!==void 0&&(r.n=e.n),e.n!==void 0&&(e.n.p=r)):n=e,e.S.n=e.r,e.r!==void 0&&(e.r=void 0),e=r}t.s=n}function ei(t){Et.call(this,void 0),this.x=t,this.s=void 0,this.g=ss-1,this.f=4}(ei.prototype=new Et).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===ss))return!0;if(this.g=ss,this.f|=1,this.i>0&&!Hf(this))return this.f&=-2,!0;var t=ze;try{jf(this),ze=this;var e=this.x();(16&this.f||this.v!==e||this.i===0)&&(this.v=e,this.f&=-17,this.i++)}catch(n){this.v=n,this.f|=16,this.i++}return ze=t,$f(this),this.f&=-2,!0};ei.prototype.S=function(t){if(this.t===void 0){this.f|=36;for(var e=this.s;e!==void 0;e=e.n)e.S.S(e)}Et.prototype.S.call(this,t)};ei.prototype.U=function(t){if(this.t!==void 0&&(Et.prototype.U.call(this,t),this.t===void 0)){this.f&=-33;for(var e=this.s;e!==void 0;e=e.n)e.S.U(e)}};ei.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var t=this.t;t!==void 0;t=t.x)t.t.N()}};Object.defineProperty(ei.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var t=Uf(this);if(this.h(),t!==void 0&&(t.i=this.i),16&this.f)throw this.v;return this.v}});function Gf(t){return new ei(t)}function Wf(t){var e=t.u;if(t.u=void 0,typeof e=="function"){Qr++;var n=ze;ze=void 0;try{e()}catch(r){throw t.f&=-2,t.f|=8,zc(t),r}finally{ze=n,Wc()}}}function zc(t){for(var e=t.s;e!==void 0;e=e.n)e.S.U(e);t.x=void 0,t.s=void 0,Wf(t)}function zv(t){if(ze!==this)throw new Error("Out-of-order effect");$f(this),ze=t,this.f&=-2,8&this.f&&zc(this),Wc()}function Ui(t){this.x=t,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}Ui.prototype.c=function(){var t=this.S();try{if(8&this.f||this.x===void 0)return;var e=this.x();typeof e=="function"&&(this.u=e)}finally{t()}};Ui.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,Wf(this),jf(this),Qr++;var t=ze;return ze=this,zv.bind(this,t)};Ui.prototype.N=function(){2&this.f||(this.f|=2,this.o=Vi,Vi=this)};Ui.prototype.d=function(){this.f|=8,1&this.f||zc(this)};function as(t){var e=new Ui(t);try{e.c()}catch(n){throw e.d(),n}return e.d.bind(e)}var Kc,Yc;function ti(t,e){We[t]=e.bind(null,We[t]||function(){})}function cs(t){Yc&&Yc(),Yc=t&&t.S()}function zf(t){var e=this,n=t.data,r=Kv(n);r.value=n;var i=$c(function(){for(var o=e.__v;o=o.__;)if(o.__c){o.__c.__$f|=4;break}return e.__$u.c=function(){var s,a=e.__$u.S(),u=i.value;a(),Mc(u)||((s=e.base)==null?void 0:s.nodeType)!==3?(e.__$f|=1,e.setState({})):e.base.data=u},Gf(function(){var s=r.value.value;return s===0?0:s===!0?"":s||""})},[]);return i.value}zf.displayName="_st";Object.defineProperties(Et.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:zf},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}});ti("__b",function(t,e){if(typeof e.type=="string"){var n,r=e.props;for(var i in r)if(i!=="children"){var o=r[i];o instanceof Et&&(n||(e.__np=n={}),n[i]=o,r[i]=o.peek())}}t(e)});ti("__r",function(t,e){cs();var n,r=e.__c;r&&(r.__$f&=-2,(n=r.__$u)===void 0&&(r.__$u=n=function(i){var o;return as(function(){o=this}),o.c=function(){r.__$f|=1,r.setState({})},o}())),Kc=r,cs(n),t(e)});ti("__e",function(t,e,n,r){cs(),Kc=void 0,t(e,n,r)});ti("diffed",function(t,e){cs(),Kc=void 0;var n;if(typeof e.type=="string"&&(n=e.__e)){var r=e.__np,i=e.props;if(r){var o=n.U;if(o)for(var s in o){var a=o[s];a!==void 0&&!(s in r)&&(a.d(),o[s]=void 0)}else n.U=o={};for(var u in r){var d=o[u],m=r[u];d===void 0?(d=Yv(n,u,m,i),o[u]=d):d.o(m,i)}}}t(e)});function Yv(t,e,n,r){var i=e in t&&t.ownerSVGElement===void 0,o=Bi(n);return{o:function(s,a){o.value=s,r=a},d:as(function(){var s=o.value.value;r[e]!==s&&(r[e]=s,i?t[e]=s:s?t.setAttribute(e,s):t.removeAttribute(e))})}}ti("unmount",function(t,e){if(typeof e.type=="string"){var n=e.__e;if(n){var r=n.U;if(r){n.U=void 0;for(var i in r){var o=r[i];o&&o.d()}}}}else{var s=e.__c;if(s){var a=s.__$u;a&&(s.__$u=void 0,a.d())}}t(e)});ti("__h",function(t,e,n,r){(r<3||r===9)&&(e.__$f|=2),t(e,n,r)});Zr.prototype.shouldComponentUpdate=function(t,e){var n=this.__$u,r=n&&n.s!==void 0;for(var i in e)return!0;if(this.__f||typeof this.u=="boolean"&&this.u===!0){if(!(r||2&this.__$f||4&this.__$f)||1&this.__$f)return!0}else if(!(r||4&this.__$f)||3&this.__$f)return!0;for(var o in t)if(o!=="__source"&&t[o]!==this.props[o])return!0;for(var s in this.props)if(!(s in t))return!0;return!1};function Kv(t){return $c(function(){return Bi(t)},[])}var Xc=(i=>(i.SIMPLE="SIMPLE",i.SWIPER="SWIPER",i.STORY="STORY",i.FLOATING_POPUP="FLOATING_POPUP",i))(Xc||{}),qc=(r=>(r.ON="ON",r.OFF="OFF",r.ON_HOVER="ON_HOVER",r))(qc||{}),Zc=(r=>(r.FIRST_ITEM="FIRST_ITEM",r.BADGE="BADGE",r.NONE="NONE",r))(Zc||{});function Xv(t,e){return e={exports:{}},t(e,e.exports),e.exports}var qv=ey,Zv=ny,Jv=oy,kn=[],an=[],Qv=typeof Uint8Array<"u"?Uint8Array:Array,Jc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(vr=0,Yf=Jc.length;vr<Yf;++vr)kn[vr]=Jc[vr],an[Jc.charCodeAt(vr)]=vr;var vr,Yf;an[45]=62;an[95]=63;function lh(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");n===-1&&(n=e);var r=n===e?0:4-n%4;return[n,r]}function ey(t){var e=lh(t),n=e[0],r=e[1];return(n+r)*3/4-r}function ty(t,e,n){return(e+n)*3/4-n}function ny(t){var e,n=lh(t),r=n[0],i=n[1],o=new Qv(ty(t,r,i)),s=0,a=i>0?r-4:r,u;for(u=0;u<a;u+=4)e=an[t.charCodeAt(u)]<<18|an[t.charCodeAt(u+1)]<<12|an[t.charCodeAt(u+2)]<<6|an[t.charCodeAt(u+3)],o[s++]=e>>16&255,o[s++]=e>>8&255,o[s++]=e&255;return i===2&&(e=an[t.charCodeAt(u)]<<2|an[t.charCodeAt(u+1)]>>4,o[s++]=e&255),i===1&&(e=an[t.charCodeAt(u)]<<10|an[t.charCodeAt(u+1)]<<4|an[t.charCodeAt(u+2)]>>2,o[s++]=e>>8&255,o[s++]=e&255),o}function ry(t){return kn[t>>18&63]+kn[t>>12&63]+kn[t>>6&63]+kn[t&63]}function iy(t,e,n){for(var r,i=[],o=e;o<n;o+=3)r=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(t[o+2]&255),i.push(ry(r));return i.join("")}function oy(t){for(var e,n=t.length,r=n%3,i=[],o=16383,s=0,a=n-r;s<a;s+=o)i.push(iy(t,s,s+o>a?a:s+o));return r===1?(e=t[n-1],i.push(kn[e>>2]+kn[e<<4&63]+"==")):r===2&&(e=(t[n-2]<<8)+t[n-1],i.push(kn[e>>10]+kn[e>>4&63]+kn[e<<2&63]+"=")),i.join("")}var Qc={byteLength:qv,toByteArray:Zv,fromByteArray:Jv};var sy=function(e,n,r,i,o){var s,a,u=o*8-i-1,d=(1<<u)-1,m=d>>1,h=-7,E=r?o-1:0,S=r?-1:1,T=e[n+E];for(E+=S,s=T&(1<<-h)-1,T>>=-h,h+=u;h>0;s=s*256+e[n+E],E+=S,h-=8);for(a=s&(1<<-h)-1,s>>=-h,h+=i;h>0;a=a*256+e[n+E],E+=S,h-=8);if(s===0)s=1-m;else{if(s===d)return a?NaN:(T?-1:1)*(1/0);a=a+Math.pow(2,i),s=s-m}return(T?-1:1)*a*Math.pow(2,s-i)},ay=function(e,n,r,i,o,s){var a,u,d,m=s*8-o-1,h=(1<<m)-1,E=h>>1,S=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,T=i?0:s-1,k=i?1:-1,P=n<0||n===0&&1/n<0?1:0;for(n=Math.abs(n),isNaN(n)||n===1/0?(u=isNaN(n)?1:0,a=h):(a=Math.floor(Math.log(n)/Math.LN2),n*(d=Math.pow(2,-a))<1&&(a--,d*=2),a+E>=1?n+=S/d:n+=S*Math.pow(2,1-E),n*d>=2&&(a++,d/=2),a+E>=h?(u=0,a=h):a+E>=1?(u=(n*d-1)*Math.pow(2,o),a=a+E):(u=n*Math.pow(2,E-1)*Math.pow(2,o),a=0));o>=8;e[r+T]=u&255,T+=k,u/=256,o-=8);for(a=a<<o|u,m+=o;m>0;e[r+T]=a&255,T+=k,a/=256,m-=8);e[r+T-k]|=P*128},ni={read:sy,write:ay},ds=Xv(function(t,e){var n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=s,e.SlowBuffer=j,e.INSPECT_MAX_BYTES=50;var r=2147483647;e.kMaxLength=r,s.TYPED_ARRAY_SUPPORT=i(),!s.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function i(){try{var p=new Uint8Array(1),c={foo:function(){return 42}};return Object.setPrototypeOf(c,Uint8Array.prototype),Object.setPrototypeOf(p,c),p.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function o(p){if(p>r)throw new RangeError('The value "'+p+'" is invalid for option "size"');var c=new Uint8Array(p);return Object.setPrototypeOf(c,s.prototype),c}function s(p,c,l){if(typeof p=="number"){if(typeof c=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return m(p)}return a(p,c,l)}s.poolSize=8192;function a(p,c,l){if(typeof p=="string")return h(p,c);if(ArrayBuffer.isView(p))return S(p);if(p==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(p));if(he(p,ArrayBuffer)||p&&he(p.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(he(p,SharedArrayBuffer)||p&&he(p.buffer,SharedArrayBuffer)))return T(p,c,l);if(typeof p=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var _=p.valueOf&&p.valueOf();if(_!=null&&_!==p)return s.from(_,c,l);var I=k(p);if(I)return I;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof p[Symbol.toPrimitive]=="function")return s.from(p[Symbol.toPrimitive]("string"),c,l);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(p))}s.from=function(p,c,l){return a(p,c,l)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function u(p){if(typeof p!="number")throw new TypeError('"size" argument must be of type number');if(p<0)throw new RangeError('The value "'+p+'" is invalid for option "size"')}function d(p,c,l){return u(p),p<=0?o(p):c!==void 0?typeof l=="string"?o(p).fill(c,l):o(p).fill(c):o(p)}s.alloc=function(p,c,l){return d(p,c,l)};function m(p){return u(p),o(p<0?0:P(p)|0)}s.allocUnsafe=function(p){return m(p)},s.allocUnsafeSlow=function(p){return m(p)};function h(p,c){if((typeof c!="string"||c==="")&&(c="utf8"),!s.isEncoding(c))throw new TypeError("Unknown encoding: "+c);var l=Y(p,c)|0,_=o(l),I=_.write(p,c);return I!==l&&(_=_.slice(0,I)),_}function E(p){for(var c=p.length<0?0:P(p.length)|0,l=o(c),_=0;_<c;_+=1)l[_]=p[_]&255;return l}function S(p){if(he(p,Uint8Array)){var c=new Uint8Array(p);return T(c.buffer,c.byteOffset,c.byteLength)}return E(p)}function T(p,c,l){if(c<0||p.byteLength<c)throw new RangeError('"offset" is outside of buffer bounds');if(p.byteLength<c+(l||0))throw new RangeError('"length" is outside of buffer bounds');var _;return c===void 0&&l===void 0?_=new Uint8Array(p):l===void 0?_=new Uint8Array(p,c):_=new Uint8Array(p,c,l),Object.setPrototypeOf(_,s.prototype),_}function k(p){if(s.isBuffer(p)){var c=P(p.length)|0,l=o(c);return l.length===0||p.copy(l,0,0,c),l}if(p.length!==void 0)return typeof p.length!="number"||pe(p.length)?o(0):E(p);if(p.type==="Buffer"&&Array.isArray(p.data))return E(p.data)}function P(p){if(p>=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return p|0}function j(p){return+p!=p&&(p=0),s.alloc(+p)}s.isBuffer=function(c){return c!=null&&c._isBuffer===!0&&c!==s.prototype},s.compare=function(c,l){if(he(c,Uint8Array)&&(c=s.from(c,c.offset,c.byteLength)),he(l,Uint8Array)&&(l=s.from(l,l.offset,l.byteLength)),!s.isBuffer(c)||!s.isBuffer(l))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(c===l)return 0;for(var _=c.length,I=l.length,A=0,V=Math.min(_,I);A<V;++A)if(c[A]!==l[A]){_=c[A],I=l[A];break}return _<I?-1:I<_?1:0},s.isEncoding=function(c){switch(String(c).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(c,l){if(!Array.isArray(c))throw new TypeError('"list" argument must be an Array of Buffers');if(c.length===0)return s.alloc(0);var _;if(l===void 0)for(l=0,_=0;_<c.length;++_)l+=c[_].length;var I=s.allocUnsafe(l),A=0;for(_=0;_<c.length;++_){var V=c[_];if(he(V,Uint8Array))A+V.length>I.length?s.from(V).copy(I,A):Uint8Array.prototype.set.call(I,V,A);else if(s.isBuffer(V))V.copy(I,A);else throw new TypeError('"list" argument must be an Array of Buffers');A+=V.length}return I};function Y(p,c){if(s.isBuffer(p))return p.length;if(ArrayBuffer.isView(p)||he(p,ArrayBuffer))return p.byteLength;if(typeof p!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+babelHelpers.typeof(p));var l=p.length,_=arguments.length>2&&arguments[2]===!0;if(!_&&l===0)return 0;for(var I=!1;;)switch(c){case"ascii":case"latin1":case"binary":return l;case"utf8":case"utf-8":return Q(p).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return l*2;case"hex":return l>>>1;case"base64":return de(p).length;default:if(I)return _?-1:Q(p).length;c=(""+c).toLowerCase(),I=!0}}s.byteLength=Y;function ee(p,c,l){var _=!1;if((c===void 0||c<0)&&(c=0),c>this.length||((l===void 0||l>this.length)&&(l=this.length),l<=0)||(l>>>=0,c>>>=0,l<=c))return"";for(p||(p="utf8");;)switch(p){case"hex":return F(this,c,l);case"utf8":case"utf-8":return Ke(this,c,l);case"ascii":return R(this,c,l);case"latin1":case"binary":return D(this,c,l);case"base64":return Re(this,c,l);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,c,l);default:if(_)throw new TypeError("Unknown encoding: "+p);p=(p+"").toLowerCase(),_=!0}}s.prototype._isBuffer=!0;function K(p,c,l){var _=p[c];p[c]=p[l],p[l]=_}s.prototype.swap16=function(){var c=this.length;if(c%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var l=0;l<c;l+=2)K(this,l,l+1);return this},s.prototype.swap32=function(){var c=this.length;if(c%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var l=0;l<c;l+=4)K(this,l,l+3),K(this,l+1,l+2);return this},s.prototype.swap64=function(){var c=this.length;if(c%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var l=0;l<c;l+=8)K(this,l,l+7),K(this,l+1,l+6),K(this,l+2,l+5),K(this,l+3,l+4);return this},s.prototype.toString=function(){var c=this.length;return c===0?"":arguments.length===0?Ke(this,0,c):ee.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(c){if(!s.isBuffer(c))throw new TypeError("Argument must be a Buffer");return this===c?!0:s.compare(this,c)===0},s.prototype.inspect=function(){var c="",l=e.INSPECT_MAX_BYTES;return c=this.toString("hex",0,l).replace(/(.{2})/g,"$1 ").trim(),this.length>l&&(c+=" ... "),"<Buffer "+c+">"},n&&(s.prototype[n]=s.prototype.inspect),s.prototype.compare=function(c,l,_,I,A){if(he(c,Uint8Array)&&(c=s.from(c,c.offset,c.byteLength)),!s.isBuffer(c))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+babelHelpers.typeof(c));if(l===void 0&&(l=0),_===void 0&&(_=c?c.length:0),I===void 0&&(I=0),A===void 0&&(A=this.length),l<0||_>c.length||I<0||A>this.length)throw new RangeError("out of range index");if(I>=A&&l>=_)return 0;if(I>=A)return-1;if(l>=_)return 1;if(l>>>=0,_>>>=0,I>>>=0,A>>>=0,this===c)return 0;for(var V=A-I,ve=_-l,Se=Math.min(V,ve),ye=this.slice(I,A),Fe=c.slice(l,_),Ve=0;Ve<Se;++Ve)if(ye[Ve]!==Fe[Ve]){V=ye[Ve],ve=Fe[Ve];break}return V<ve?-1:ve<V?1:0};function ge(p,c,l,_,I){if(p.length===0)return-1;if(typeof l=="string"?(_=l,l=0):l>2147483647?l=2147483647:l<-2147483648&&(l=-2147483648),l=+l,pe(l)&&(l=I?0:p.length-1),l<0&&(l=p.length+l),l>=p.length){if(I)return-1;l=p.length-1}else if(l<0)if(I)l=0;else return-1;if(typeof c=="string"&&(c=s.from(c,_)),s.isBuffer(c))return c.length===0?-1:U(p,c,l,_,I);if(typeof c=="number")return c=c&255,typeof Uint8Array.prototype.indexOf=="function"?I?Uint8Array.prototype.indexOf.call(p,c,l):Uint8Array.prototype.lastIndexOf.call(p,c,l):U(p,[c],l,_,I);throw new TypeError("val must be string, number or Buffer")}function U(p,c,l,_,I){var A=1,V=p.length,ve=c.length;if(_!==void 0&&(_=String(_).toLowerCase(),_==="ucs2"||_==="ucs-2"||_==="utf16le"||_==="utf-16le")){if(p.length<2||c.length<2)return-1;A=2,V/=2,ve/=2,l/=2}function Se(jt,qt){return A===1?jt[qt]:jt.readUInt16BE(qt*A)}var ye;if(I){var Fe=-1;for(ye=l;ye<V;ye++)if(Se(p,ye)===Se(c,Fe===-1?0:ye-Fe)){if(Fe===-1&&(Fe=ye),ye-Fe+1===ve)return Fe*A}else Fe!==-1&&(ye-=ye-Fe),Fe=-1}else for(l+ve>V&&(l=V-ve),ye=l;ye>=0;ye--){for(var Ve=!0,Qe=0;Qe<ve;Qe++)if(Se(p,ye+Qe)!==Se(c,Qe)){Ve=!1;break}if(Ve)return ye}return-1}s.prototype.includes=function(c,l,_){return this.indexOf(c,l,_)!==-1},s.prototype.indexOf=function(c,l,_){return ge(this,c,l,_,!0)},s.prototype.lastIndexOf=function(c,l,_){return ge(this,c,l,_,!1)};function fe(p,c,l,_){l=Number(l)||0;var I=p.length-l;_?(_=Number(_),_>I&&(_=I)):_=I;var A=c.length;_>A/2&&(_=A/2);for(var V=0;V<_;++V){var ve=parseInt(c.substr(V*2,2),16);if(pe(ve))return V;p[l+V]=ve}return V}function ne(p,c,l,_){return ce(Q(c,p.length-l),p,l,_)}function Ee(p,c,l,_){return ce(ae(c),p,l,_)}function Le(p,c,l,_){return ce(de(c),p,l,_)}function De(p,c,l,_){return ce(te(c,p.length-l),p,l,_)}s.prototype.write=function(c,l,_,I){if(l===void 0)I="utf8",_=this.length,l=0;else if(_===void 0&&typeof l=="string")I=l,_=this.length,l=0;else if(isFinite(l))l=l>>>0,isFinite(_)?(_=_>>>0,I===void 0&&(I="utf8")):(I=_,_=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var A=this.length-l;if((_===void 0||_>A)&&(_=A),c.length>0&&(_<0||l<0)||l>this.length)throw new RangeError("Attempt to write outside buffer bounds");I||(I="utf8");for(var V=!1;;)switch(I){case"hex":return fe(this,c,l,_);case"utf8":case"utf-8":return ne(this,c,l,_);case"ascii":case"latin1":case"binary":return Ee(this,c,l,_);case"base64":return Le(this,c,l,_);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return De(this,c,l,_);default:if(V)throw new TypeError("Unknown encoding: "+I);I=(""+I).toLowerCase(),V=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Re(p,c,l){return c===0&&l===p.length?Qc.fromByteArray(p):Qc.fromByteArray(p.slice(c,l))}function Ke(p,c,l){l=Math.min(p.length,l);for(var _=[],I=c;I<l;){var A=p[I],V=null,ve=A>239?4:A>223?3:A>191?2:1;if(I+ve<=l){var Se,ye,Fe,Ve;switch(ve){case 1:A<128&&(V=A);break;case 2:Se=p[I+1],(Se&192)===128&&(Ve=(A&31)<<6|Se&63,Ve>127&&(V=Ve));break;case 3:Se=p[I+1],ye=p[I+2],(Se&192)===128&&(ye&192)===128&&(Ve=(A&15)<<12|(Se&63)<<6|ye&63,Ve>2047&&(Ve<55296||Ve>57343)&&(V=Ve));break;case 4:Se=p[I+1],ye=p[I+2],Fe=p[I+3],(Se&192)===128&&(ye&192)===128&&(Fe&192)===128&&(Ve=(A&15)<<18|(Se&63)<<12|(ye&63)<<6|Fe&63,Ve>65535&&Ve<1114112&&(V=Ve))}}V===null?(V=65533,ve=1):V>65535&&(V-=65536,_.push(V>>>10&1023|55296),V=56320|V&1023),_.push(V),I+=ve}return _t(_)}var Xe=4096;function _t(p){var c=p.length;if(c<=Xe)return String.fromCharCode.apply(String,p);for(var l="",_=0;_<c;)l+=String.fromCharCode.apply(String,p.slice(_,_+=Xe));return l}function R(p,c,l){var _="";l=Math.min(p.length,l);for(var I=c;I<l;++I)_+=String.fromCharCode(p[I]&127);return _}function D(p,c,l){var _="";l=Math.min(p.length,l);for(var I=c;I<l;++I)_+=String.fromCharCode(p[I]);return _}function F(p,c,l){var _=p.length;(!c||c<0)&&(c=0),(!l||l<0||l>_)&&(l=_);for(var I="",A=c;A<l;++A)I+=me[p[A]];return I}function L(p,c,l){for(var _=p.slice(c,l),I="",A=0;A<_.length-1;A+=2)I+=String.fromCharCode(_[A]+_[A+1]*256);return I}s.prototype.slice=function(c,l){var _=this.length;c=~~c,l=l===void 0?_:~~l,c<0?(c+=_,c<0&&(c=0)):c>_&&(c=_),l<0?(l+=_,l<0&&(l=0)):l>_&&(l=_),l<c&&(l=c);var I=this.subarray(c,l);return Object.setPrototypeOf(I,s.prototype),I};function v(p,c,l){if(p%1!==0||p<0)throw new RangeError("offset is not uint");if(p+c>l)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(c,l,_){c=c>>>0,l=l>>>0,_||v(c,l,this.length);for(var I=this[c],A=1,V=0;++V<l&&(A*=256);)I+=this[c+V]*A;return I},s.prototype.readUintBE=s.prototype.readUIntBE=function(c,l,_){c=c>>>0,l=l>>>0,_||v(c,l,this.length);for(var I=this[c+--l],A=1;l>0&&(A*=256);)I+=this[c+--l]*A;return I},s.prototype.readUint8=s.prototype.readUInt8=function(c,l){return c=c>>>0,l||v(c,1,this.length),this[c]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(c,l){return c=c>>>0,l||v(c,2,this.length),this[c]|this[c+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(c,l){return c=c>>>0,l||v(c,2,this.length),this[c]<<8|this[c+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(c,l){return c=c>>>0,l||v(c,4,this.length),(this[c]|this[c+1]<<8|this[c+2]<<16)+this[c+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(c,l){return c=c>>>0,l||v(c,4,this.length),this[c]*16777216+(this[c+1]<<16|this[c+2]<<8|this[c+3])},s.prototype.readIntLE=function(c,l,_){c=c>>>0,l=l>>>0,_||v(c,l,this.length);for(var I=this[c],A=1,V=0;++V<l&&(A*=256);)I+=this[c+V]*A;return A*=128,I>=A&&(I-=Math.pow(2,8*l)),I},s.prototype.readIntBE=function(c,l,_){c=c>>>0,l=l>>>0,_||v(c,l,this.length);for(var I=l,A=1,V=this[c+--I];I>0&&(A*=256);)V+=this[c+--I]*A;return A*=128,V>=A&&(V-=Math.pow(2,8*l)),V},s.prototype.readInt8=function(c,l){return c=c>>>0,l||v(c,1,this.length),this[c]&128?(255-this[c]+1)*-1:this[c]},s.prototype.readInt16LE=function(c,l){c=c>>>0,l||v(c,2,this.length);var _=this[c]|this[c+1]<<8;return _&32768?_|4294901760:_},s.prototype.readInt16BE=function(c,l){c=c>>>0,l||v(c,2,this.length);var _=this[c+1]|this[c]<<8;return _&32768?_|4294901760:_},s.prototype.readInt32LE=function(c,l){return c=c>>>0,l||v(c,4,this.length),this[c]|this[c+1]<<8|this[c+2]<<16|this[c+3]<<24},s.prototype.readInt32BE=function(c,l){return c=c>>>0,l||v(c,4,this.length),this[c]<<24|this[c+1]<<16|this[c+2]<<8|this[c+3]},s.prototype.readFloatLE=function(c,l){return c=c>>>0,l||v(c,4,this.length),ni.read(this,c,!0,23,4)},s.prototype.readFloatBE=function(c,l){return c=c>>>0,l||v(c,4,this.length),ni.read(this,c,!1,23,4)},s.prototype.readDoubleLE=function(c,l){return c=c>>>0,l||v(c,8,this.length),ni.read(this,c,!0,52,8)},s.prototype.readDoubleBE=function(c,l){return c=c>>>0,l||v(c,8,this.length),ni.read(this,c,!1,52,8)};function y(p,c,l,_,I,A){if(!s.isBuffer(p))throw new TypeError('"buffer" argument must be a Buffer instance');if(c>I||c<A)throw new RangeError('"value" argument is out of bounds');if(l+_>p.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(c,l,_,I){if(c=+c,l=l>>>0,_=_>>>0,!I){var A=Math.pow(2,8*_)-1;y(this,c,l,_,A,0)}var V=1,ve=0;for(this[l]=c&255;++ve<_&&(V*=256);)this[l+ve]=c/V&255;return l+_},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(c,l,_,I){if(c=+c,l=l>>>0,_=_>>>0,!I){var A=Math.pow(2,8*_)-1;y(this,c,l,_,A,0)}var V=_-1,ve=1;for(this[l+V]=c&255;--V>=0&&(ve*=256);)this[l+V]=c/ve&255;return l+_},s.prototype.writeUint8=s.prototype.writeUInt8=function(c,l,_){return c=+c,l=l>>>0,_||y(this,c,l,1,255,0),this[l]=c&255,l+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(c,l,_){return c=+c,l=l>>>0,_||y(this,c,l,2,65535,0),this[l]=c&255,this[l+1]=c>>>8,l+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(c,l,_){return c=+c,l=l>>>0,_||y(this,c,l,2,65535,0),this[l]=c>>>8,this[l+1]=c&255,l+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(c,l,_){return c=+c,l=l>>>0,_||y(this,c,l,4,4294967295,0),this[l+3]=c>>>24,this[l+2]=c>>>16,this[l+1]=c>>>8,this[l]=c&255,l+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(c,l,_){return c=+c,l=l>>>0,_||y(this,c,l,4,4294967295,0),this[l]=c>>>24,this[l+1]=c>>>16,this[l+2]=c>>>8,this[l+3]=c&255,l+4},s.prototype.writeIntLE=function(c,l,_,I){if(c=+c,l=l>>>0,!I){var A=Math.pow(2,8*_-1);y(this,c,l,_,A-1,-A)}var V=0,ve=1,Se=0;for(this[l]=c&255;++V<_&&(ve*=256);)c<0&&Se===0&&this[l+V-1]!==0&&(Se=1),this[l+V]=(c/ve>>0)-Se&255;return l+_},s.prototype.writeIntBE=function(c,l,_,I){if(c=+c,l=l>>>0,!I){var A=Math.pow(2,8*_-1);y(this,c,l,_,A-1,-A)}var V=_-1,ve=1,Se=0;for(this[l+V]=c&255;--V>=0&&(ve*=256);)c<0&&Se===0&&this[l+V+1]!==0&&(Se=1),this[l+V]=(c/ve>>0)-Se&255;return l+_},s.prototype.writeInt8=function(c,l,_){return c=+c,l=l>>>0,_||y(this,c,l,1,127,-128),c<0&&(c=255+c+1),this[l]=c&255,l+1},s.prototype.writeInt16LE=function(c,l,_){return c=+c,l=l>>>0,_||y(this,c,l,2,32767,-32768),this[l]=c&255,this[l+1]=c>>>8,l+2},s.prototype.writeInt16BE=function(c,l,_){return c=+c,l=l>>>0,_||y(this,c,l,2,32767,-32768),this[l]=c>>>8,this[l+1]=c&255,l+2},s.prototype.writeInt32LE=function(c,l,_){return c=+c,l=l>>>0,_||y(this,c,l,4,2147483647,-2147483648),this[l]=c&255,this[l+1]=c>>>8,this[l+2]=c>>>16,this[l+3]=c>>>24,l+4},s.prototype.writeInt32BE=function(c,l,_){return c=+c,l=l>>>0,_||y(this,c,l,4,2147483647,-2147483648),c<0&&(c=4294967295+c+1),this[l]=c>>>24,this[l+1]=c>>>16,this[l+2]=c>>>8,this[l+3]=c&255,l+4};function H(p,c,l,_,I,A){if(l+_>p.length)throw new RangeError("Index out of range");if(l<0)throw new RangeError("Index out of range")}function Z(p,c,l,_,I){return c=+c,l=l>>>0,I||H(p,c,l,4),ni.write(p,c,l,_,23,4),l+4}s.prototype.writeFloatLE=function(c,l,_){return Z(this,c,l,!0,_)},s.prototype.writeFloatBE=function(c,l,_){return Z(this,c,l,!1,_)};function re(p,c,l,_,I){return c=+c,l=l>>>0,I||H(p,c,l,8),ni.write(p,c,l,_,52,8),l+8}s.prototype.writeDoubleLE=function(c,l,_){return re(this,c,l,!0,_)},s.prototype.writeDoubleBE=function(c,l,_){return re(this,c,l,!1,_)},s.prototype.copy=function(c,l,_,I){if(!s.isBuffer(c))throw new TypeError("argument should be a Buffer");if(_||(_=0),!I&&I!==0&&(I=this.length),l>=c.length&&(l=c.length),l||(l=0),I>0&&I<_&&(I=_),I===_||c.length===0||this.length===0)return 0;if(l<0)throw new RangeError("targetStart out of bounds");if(_<0||_>=this.length)throw new RangeError("Index out of range");if(I<0)throw new RangeError("sourceEnd out of bounds");I>this.length&&(I=this.length),c.length-l<I-_&&(I=c.length-l+_);var A=I-_;return this===c&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(l,_,I):Uint8Array.prototype.set.call(c,this.subarray(_,I),l),A},s.prototype.fill=function(c,l,_,I){if(typeof c=="string"){if(typeof l=="string"?(I=l,l=0,_=this.length):typeof _=="string"&&(I=_,_=this.length),I!==void 0&&typeof I!="string")throw new TypeError("encoding must be a string");if(typeof I=="string"&&!s.isEncoding(I))throw new TypeError("Unknown encoding: "+I);if(c.length===1){var A=c.charCodeAt(0);(I==="utf8"&&A<128||I==="latin1")&&(c=A)}}else typeof c=="number"?c=c&255:typeof c=="boolean"&&(c=Number(c));if(l<0||this.length<l||this.length<_)throw new RangeError("Out of range index");if(_<=l)return this;l=l>>>0,_=_===void 0?this.length:_>>>0,c||(c=0);var V;if(typeof c=="number")for(V=l;V<_;++V)this[V]=c;else{var ve=s.isBuffer(c)?c:s.from(c,I),Se=ve.length;if(Se===0)throw new TypeError('The value "'+c+'" is invalid for argument "value"');for(V=0;V<_-l;++V)this[V+l]=ve[V%Se]}return this};var oe=/[^+/0-9A-Za-z-_]/g;function ue(p){if(p=p.split("=")[0],p=p.trim().replace(oe,""),p.length<2)return"";for(;p.length%4!==0;)p=p+"=";return p}function Q(p,c){c=c||1/0;for(var l,_=p.length,I=null,A=[],V=0;V<_;++V){if(l=p.charCodeAt(V),l>55295&&l<57344){if(!I){if(l>56319){(c-=3)>-1&&A.push(239,191,189);continue}else if(V+1===_){(c-=3)>-1&&A.push(239,191,189);continue}I=l;continue}if(l<56320){(c-=3)>-1&&A.push(239,191,189),I=l;continue}l=(I-55296<<10|l-56320)+65536}else I&&(c-=3)>-1&&A.push(239,191,189);if(I=null,l<128){if((c-=1)<0)break;A.push(l)}else if(l<2048){if((c-=2)<0)break;A.push(l>>6|192,l&63|128)}else if(l<65536){if((c-=3)<0)break;A.push(l>>12|224,l>>6&63|128,l&63|128)}else if(l<1114112){if((c-=4)<0)break;A.push(l>>18|240,l>>12&63|128,l>>6&63|128,l&63|128)}else throw new Error("Invalid code point")}return A}function ae(p){for(var c=[],l=0;l<p.length;++l)c.push(p.charCodeAt(l)&255);return c}function te(p,c){for(var l,_,I,A=[],V=0;V<p.length&&!((c-=2)<0);++V)l=p.charCodeAt(V),_=l>>8,I=l%256,A.push(I),A.push(_);return A}function de(p){return Qc.toByteArray(ue(p))}function ce(p,c,l,_){for(var I=0;I<_&&!(I+l>=c.length||I>=p.length);++I)c[I+l]=p[I];return I}function he(p,c){return p instanceof c||p!=null&&p.constructor!=null&&p.constructor.name!=null&&p.constructor.name===c.name}function pe(p){return p!==p}var me=function(){for(var p="0123456789abcdef",c=new Array(256),l=0;l<16;++l)for(var _=l*16,I=0;I<16;++I)c[_+I]=p[l]+p[I];return c}()}),ke=ds.Buffer;ds.SlowBuffer;ds.INSPECT_MAX_BYTES;ds.kMaxLength;var il=function(e,n){return il=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)i.hasOwnProperty(o)&&(r[o]=i[o])},il(e,n)};function fs(t,e){il(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var Er=function(t){fs(e,t);function e(n){var r=t.call(this,n)||this;return Object.setPrototypeOf(r,e.prototype),r}return Object.defineProperty(e.prototype,"name",{get:function(){return"BSONError"},enumerable:!1,configurable:!0}),e}(Error),rt=function(t){fs(e,t);function e(n){var r=t.call(this,n)||this;return Object.setPrototypeOf(r,e.prototype),r}return Object.defineProperty(e.prototype,"name",{get:function(){return"BSONTypeError"},enumerable:!1,configurable:!0}),e}(TypeError);function ls(t){return t&&t.Math==Math&&t}function uh(){return ls(typeof globalThis=="object"&&globalThis)||ls(typeof window=="object"&&window)||ls(typeof self=="object"&&self)||ls(typeof global=="object"&&global)||Function("return this")()}function cy(){var t=uh();return typeof t.navigator=="object"&&t.navigator.product==="ReactNative"}var ly=function(e){var n=cy()?"BSON: For React Native please polyfill crypto.getRandomValues, e.g. using: https://www.npmjs.com/package/react-native-get-random-values.":"BSON: No cryptographic implementation for random bytes present, falling back to a less secure implementation.";console.warn(n);for(var r=ke.alloc(e),i=0;i<e;++i)r[i]=Math.floor(Math.random()*256);return r},uy=function(){{if(typeof window<"u"){var t=window.crypto||window.msCrypto;if(t&&t.getRandomValues)return function(e){return t.getRandomValues(ke.alloc(e))}}return typeof global<"u"&&global.crypto&&global.crypto.getRandomValues?function(e){return global.crypto.getRandomValues(ke.alloc(e))}:ly}},dh=uy();function dy(t){return["[object ArrayBuffer]","[object SharedArrayBuffer]"].includes(Object.prototype.toString.call(t))}function sl(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}function fy(t){return Object.prototype.toString.call(t)==="[object RegExp]"}function hy(t){return Gi(t)&&Object.prototype.toString.call(t)==="[object Date]"}function Gi(t){return typeof t=="object"&&t!==null}function hs(t,e){var n=!1;function r(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];return n||(console.warn(e),n=!0),t.apply(this,i)}return r}function us(t){if(ArrayBuffer.isView(t))return ke.from(t.buffer,t.byteOffset,t.byteLength);if(dy(t))return ke.from(t);throw new rt("Must use either Buffer or TypedArray")}var py=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[0-9a-f]{12}4[0-9a-f]{3}[89ab][0-9a-f]{15})$/i,fh=function(t){return typeof t=="string"&&py.test(t)},ol=function(t){if(!fh(t))throw new rt('UUID string representations must be a 32 or 36 character hex string (dashes excluded/included). Format: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" or "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx".');var e=t.replace(/-/g,"");return ke.from(e,"hex")},Kf=function(t,e){return e===void 0&&(e=!0),e?t.toString("hex",0,4)+"-"+t.toString("hex",4,6)+"-"+t.toString("hex",6,8)+"-"+t.toString("hex",8,10)+"-"+t.toString("hex",10,16):t.toString("hex")};var rR=Math.pow(2,63)-1,iR=-Math.pow(2,63),my=Math.pow(2,53),gy=-Math.pow(2,53);var hh=4;var wr=function(){function t(e,n){if(!(this instanceof t))return new t(e,n);if(e!=null&&typeof e!="string"&&!ArrayBuffer.isView(e)&&!(e instanceof ArrayBuffer)&&!Array.isArray(e))throw new rt("Binary can only be constructed from string, Buffer, TypedArray, or Array<number>");this.sub_type=n??t.BSON_BINARY_SUBTYPE_DEFAULT,e==null?(this.buffer=ke.alloc(t.BUFFER_SIZE),this.position=0):(typeof e=="string"?this.buffer=ke.from(e,"binary"):Array.isArray(e)?this.buffer=ke.from(e):this.buffer=us(e),this.position=this.buffer.byteLength)}return t.prototype.put=function(e){if(typeof e=="string"&&e.length!==1)throw new rt("only accepts single character String");if(typeof e!="number"&&e.length!==1)throw new rt("only accepts single character Uint8Array or Array");var n;if(typeof e=="string"?n=e.charCodeAt(0):typeof e=="number"?n=e:n=e[0],n<0||n>255)throw new rt("only accepts number in a valid unsigned byte range 0-255");if(this.buffer.length>this.position)this.buffer[this.position++]=n;else{var r=ke.alloc(t.BUFFER_SIZE+this.buffer.length);this.buffer.copy(r,0,0,this.buffer.length),this.buffer=r,this.buffer[this.position++]=n}},t.prototype.write=function(e,n){if(n=typeof n=="number"?n:this.position,this.buffer.length<n+e.length){var r=ke.alloc(this.buffer.length+e.length);this.buffer.copy(r,0,0,this.buffer.length),this.buffer=r}ArrayBuffer.isView(e)?(this.buffer.set(us(e),n),this.position=n+e.byteLength>this.position?n+e.length:this.position):typeof e=="string"&&(this.buffer.write(e,n,e.length,"binary"),this.position=n+e.length>this.position?n+e.length:this.position)},t.prototype.read=function(e,n){return n=n&&n>0?n:this.position,this.buffer.slice(e,e+n)},t.prototype.value=function(e){return e=!!e,e&&this.buffer.length===this.position?this.buffer:e?this.buffer.slice(0,this.position):this.buffer.toString("binary",0,this.position)},t.prototype.length=function(){return this.position},t.prototype.toJSON=function(){return this.buffer.toString("base64")},t.prototype.toString=function(e){return this.buffer.toString(e)},t.prototype.toExtendedJSON=function(e){e=e||{};var n=this.buffer.toString("base64"),r=Number(this.sub_type).toString(16);return e.legacy?{$binary:n,$type:r.length===1?"0"+r:r}:{$binary:{base64:n,subType:r.length===1?"0"+r:r}}},t.prototype.toUUID=function(){if(this.sub_type===t.SUBTYPE_UUID)return new Xf(this.buffer.slice(0,this.position));throw new Er('Binary sub_type "'.concat(this.sub_type,'" is not supported for converting to UUID. Only "').concat(t.SUBTYPE_UUID,'" is currently supported.'))},t.fromExtendedJSON=function(e,n){n=n||{};var r,i;if("$binary"in e?n.legacy&&typeof e.$binary=="string"&&"$type"in e?(i=e.$type?parseInt(e.$type,16):0,r=ke.from(e.$binary,"base64")):typeof e.$binary!="string"&&(i=e.$binary.subType?parseInt(e.$binary.subType,16):0,r=ke.from(e.$binary.base64,"base64")):"$uuid"in e&&(i=4,r=ol(e.$uuid)),!r)throw new rt("Unexpected Binary Extended JSON format ".concat(JSON.stringify(e)));return i===hh?new Xf(r):new t(r,i)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){var e=this.value(!0);return'new Binary(Buffer.from("'.concat(e.toString("hex"),'", "hex"), ').concat(this.sub_type,")")},t.BSON_BINARY_SUBTYPE_DEFAULT=0,t.BUFFER_SIZE=256,t.SUBTYPE_DEFAULT=0,t.SUBTYPE_FUNCTION=1,t.SUBTYPE_BYTE_ARRAY=2,t.SUBTYPE_UUID_OLD=3,t.SUBTYPE_UUID=4,t.SUBTYPE_MD5=5,t.SUBTYPE_ENCRYPTED=6,t.SUBTYPE_COLUMN=7,t.SUBTYPE_USER_DEFINED=128,t}();Object.defineProperty(wr.prototype,"_bsontype",{value:"Binary"});var el=16,Xf=function(t){fs(e,t);function e(n){var r=this,i,o;if(n==null)i=e.generate();else if(n instanceof e)i=ke.from(n.buffer),o=n.__id;else if(ArrayBuffer.isView(n)&&n.byteLength===el)i=us(n);else if(typeof n=="string")i=ol(n);else throw new rt("Argument passed in UUID constructor must be a UUID, a 16 byte Buffer or a 32/36 character hex string (dashes excluded/included, format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).");return r=t.call(this,i,hh)||this,r.__id=o,r}return Object.defineProperty(e.prototype,"id",{get:function(){return this.buffer},set:function(n){this.buffer=n,e.cacheHexString&&(this.__id=Kf(n))},enumerable:!1,configurable:!0}),e.prototype.toHexString=function(n){if(n===void 0&&(n=!0),e.cacheHexString&&this.__id)return this.__id;var r=Kf(this.id,n);return e.cacheHexString&&(this.__id=r),r},e.prototype.toString=function(n){return n?this.id.toString(n):this.toHexString()},e.prototype.toJSON=function(){return this.toHexString()},e.prototype.equals=function(n){if(!n)return!1;if(n instanceof e)return n.id.equals(this.id);try{return new e(n).id.equals(this.id)}catch{return!1}},e.prototype.toBinary=function(){return new wr(this.id,wr.SUBTYPE_UUID)},e.generate=function(){var n=dh(el);return n[6]=n[6]&15|64,n[8]=n[8]&63|128,ke.from(n)},e.isValid=function(n){return n?n instanceof e?!0:typeof n=="string"?fh(n):sl(n)?n.length!==el?!1:(n[6]&240)===64&&(n[8]&128)===128:!1:!1},e.createFromHexString=function(n){var r=ol(n);return new e(r)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new UUID("'.concat(this.toHexString(),'")')},e}(wr),ps=function(){function t(e,n){if(!(this instanceof t))return new t(e,n);this.code=e,this.scope=n}return t.prototype.toJSON=function(){return{code:this.code,scope:this.scope}},t.prototype.toExtendedJSON=function(){return this.scope?{$code:this.code,$scope:this.scope}:{$code:this.code}},t.fromExtendedJSON=function(e){return new t(e.$code,e.$scope)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){var e=this.toJSON();return'new Code("'.concat(String(e.code),'"').concat(e.scope?", ".concat(JSON.stringify(e.scope)):"",")")},t}();Object.defineProperty(ps.prototype,"_bsontype",{value:"Code"});function _y(t){return Gi(t)&&t.$id!=null&&typeof t.$ref=="string"&&(t.$db==null||typeof t.$db=="string")}var ji=function(){function t(e,n,r,i){if(!(this instanceof t))return new t(e,n,r,i);var o=e.split(".");o.length===2&&(r=o.shift(),e=o.shift()),this.collection=e,this.oid=n,this.db=r,this.fields=i||{}}return Object.defineProperty(t.prototype,"namespace",{get:function(){return this.collection},set:function(e){this.collection=e},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){var e=Object.assign({$ref:this.collection,$id:this.oid},this.fields);return this.db!=null&&(e.$db=this.db),e},t.prototype.toExtendedJSON=function(e){e=e||{};var n={$ref:this.collection,$id:this.oid};return e.legacy||(this.db&&(n.$db=this.db),n=Object.assign(n,this.fields)),n},t.fromExtendedJSON=function(e){var n=Object.assign({},e);return delete n.$ref,delete n.$id,delete n.$db,new t(e.$ref,e.$id,e.$db,n)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){var e=this.oid===void 0||this.oid.toString===void 0?this.oid:this.oid.toString();return'new DBRef("'.concat(this.namespace,'", new ObjectId("').concat(String(e),'")').concat(this.db?', "'.concat(this.db,'"'):"",")")},t}();Object.defineProperty(ji.prototype,"_bsontype",{value:"DBRef"});var sn=void 0;try{sn=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}var qf=65536,vy=1<<24,ii=qf*qf,ph=ii*ii,Zf=ph/2,Jf={},Qf={},le=function(){function t(e,n,r){if(e===void 0&&(e=0),!(this instanceof t))return new t(e,n,r);typeof e=="bigint"?Object.assign(this,t.fromBigInt(e,!!n)):typeof e=="string"?Object.assign(this,t.fromString(e,!!n)):(this.low=e|0,this.high=n|0,this.unsigned=!!r),Object.defineProperty(this,"__isLong__",{value:!0,configurable:!1,writable:!1,enumerable:!1})}return t.fromBits=function(e,n,r){return new t(e,n,r)},t.fromInt=function(e,n){var r,i,o;return n?(e>>>=0,(o=0<=e&&e<256)&&(i=Qf[e],i)?i:(r=t.fromBits(e,(e|0)<0?-1:0,!0),o&&(Qf[e]=r),r)):(e|=0,(o=-128<=e&&e<128)&&(i=Jf[e],i)?i:(r=t.fromBits(e,e<0?-1:0,!1),o&&(Jf[e]=r),r))},t.fromNumber=function(e,n){if(isNaN(e))return n?t.UZERO:t.ZERO;if(n){if(e<0)return t.UZERO;if(e>=ph)return t.MAX_UNSIGNED_VALUE}else{if(e<=-Zf)return t.MIN_VALUE;if(e+1>=Zf)return t.MAX_VALUE}return e<0?t.fromNumber(-e,n).neg():t.fromBits(e%ii|0,e/ii|0,n)},t.fromBigInt=function(e,n){return t.fromString(e.toString(),n)},t.fromString=function(e,n,r){if(e.length===0)throw Error("empty string");if(e==="NaN"||e==="Infinity"||e==="+Infinity"||e==="-Infinity")return t.ZERO;if(typeof n=="number"?(r=n,n=!1):n=!!n,r=r||10,r<2||36<r)throw RangeError("radix");var i;if((i=e.indexOf("-"))>0)throw Error("interior hyphen");if(i===0)return t.fromString(e.substring(1),n,r).neg();for(var o=t.fromNumber(Math.pow(r,8)),s=t.ZERO,a=0;a<e.length;a+=8){var u=Math.min(8,e.length-a),d=parseInt(e.substring(a,a+u),r);if(u<8){var m=t.fromNumber(Math.pow(r,u));s=s.mul(m).add(t.fromNumber(d))}else s=s.mul(o),s=s.add(t.fromNumber(d))}return s.unsigned=n,s},t.fromBytes=function(e,n,r){return r?t.fromBytesLE(e,n):t.fromBytesBE(e,n)},t.fromBytesLE=function(e,n){return new t(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,n)},t.fromBytesBE=function(e,n){return new t(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],n)},t.isLong=function(e){return Gi(e)&&e.__isLong__===!0},t.fromValue=function(e,n){return typeof e=="number"?t.fromNumber(e,n):typeof e=="string"?t.fromString(e,n):t.fromBits(e.low,e.high,typeof n=="boolean"?n:e.unsigned)},t.prototype.add=function(e){t.isLong(e)||(e=t.fromValue(e));var n=this.high>>>16,r=this.high&65535,i=this.low>>>16,o=this.low&65535,s=e.high>>>16,a=e.high&65535,u=e.low>>>16,d=e.low&65535,m=0,h=0,E=0,S=0;return S+=o+d,E+=S>>>16,S&=65535,E+=i+u,h+=E>>>16,E&=65535,h+=r+a,m+=h>>>16,h&=65535,m+=n+s,m&=65535,t.fromBits(E<<16|S,m<<16|h,this.unsigned)},t.prototype.and=function(e){return t.isLong(e)||(e=t.fromValue(e)),t.fromBits(this.low&e.low,this.high&e.high,this.unsigned)},t.prototype.compare=function(e){if(t.isLong(e)||(e=t.fromValue(e)),this.eq(e))return 0;var n=this.isNegative(),r=e.isNegative();return n&&!r?-1:!n&&r?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},t.prototype.comp=function(e){return this.compare(e)},t.prototype.divide=function(e){if(t.isLong(e)||(e=t.fromValue(e)),e.isZero())throw Error("division by zero");if(sn){if(!this.unsigned&&this.high===-2147483648&&e.low===-1&&e.high===-1)return this;var n=(this.unsigned?sn.div_u:sn.div_s)(this.low,this.high,e.low,e.high);return t.fromBits(n,sn.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?t.UZERO:t.ZERO;var r,i,o;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return t.UZERO;if(e.gt(this.shru(1)))return t.UONE;o=t.UZERO}else{if(this.eq(t.MIN_VALUE)){if(e.eq(t.ONE)||e.eq(t.NEG_ONE))return t.MIN_VALUE;if(e.eq(t.MIN_VALUE))return t.ONE;var s=this.shr(1);return r=s.div(e).shl(1),r.eq(t.ZERO)?e.isNegative()?t.ONE:t.NEG_ONE:(i=this.sub(e.mul(r)),o=r.add(i.div(e)),o)}else if(e.eq(t.MIN_VALUE))return this.unsigned?t.UZERO:t.ZERO;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();o=t.ZERO}for(i=this;i.gte(e);){r=Math.max(1,Math.floor(i.toNumber()/e.toNumber()));for(var a=Math.ceil(Math.log(r)/Math.LN2),u=a<=48?1:Math.pow(2,a-48),d=t.fromNumber(r),m=d.mul(e);m.isNegative()||m.gt(i);)r-=u,d=t.fromNumber(r,this.unsigned),m=d.mul(e);d.isZero()&&(d=t.ONE),o=o.add(d),i=i.sub(m)}return o},t.prototype.div=function(e){return this.divide(e)},t.prototype.equals=function(e){return t.isLong(e)||(e=t.fromValue(e)),this.unsigned!==e.unsigned&&this.high>>>31===1&&e.high>>>31===1?!1:this.high===e.high&&this.low===e.low},t.prototype.eq=function(e){return this.equals(e)},t.prototype.getHighBits=function(){return this.high},t.prototype.getHighBitsUnsigned=function(){return this.high>>>0},t.prototype.getLowBits=function(){return this.low},t.prototype.getLowBitsUnsigned=function(){return this.low>>>0},t.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.eq(t.MIN_VALUE)?64:this.neg().getNumBitsAbs();var e=this.high!==0?this.high:this.low,n;for(n=31;n>0&&(e&1<<n)===0;n--);return this.high!==0?n+33:n+1},t.prototype.greaterThan=function(e){return this.comp(e)>0},t.prototype.gt=function(e){return this.greaterThan(e)},t.prototype.greaterThanOrEqual=function(e){return this.comp(e)>=0},t.prototype.gte=function(e){return this.greaterThanOrEqual(e)},t.prototype.ge=function(e){return this.greaterThanOrEqual(e)},t.prototype.isEven=function(){return(this.low&1)===0},t.prototype.isNegative=function(){return!this.unsigned&&this.high<0},t.prototype.isOdd=function(){return(this.low&1)===1},t.prototype.isPositive=function(){return this.unsigned||this.high>=0},t.prototype.isZero=function(){return this.high===0&&this.low===0},t.prototype.lessThan=function(e){return this.comp(e)<0},t.prototype.lt=function(e){return this.lessThan(e)},t.prototype.lessThanOrEqual=function(e){return this.comp(e)<=0},t.prototype.lte=function(e){return this.lessThanOrEqual(e)},t.prototype.modulo=function(e){if(t.isLong(e)||(e=t.fromValue(e)),sn){var n=(this.unsigned?sn.rem_u:sn.rem_s)(this.low,this.high,e.low,e.high);return t.fromBits(n,sn.get_high(),this.unsigned)}return this.sub(this.div(e).mul(e))},t.prototype.mod=function(e){return this.modulo(e)},t.prototype.rem=function(e){return this.modulo(e)},t.prototype.multiply=function(e){if(this.isZero())return t.ZERO;if(t.isLong(e)||(e=t.fromValue(e)),sn){var n=sn.mul(this.low,this.high,e.low,e.high);return t.fromBits(n,sn.get_high(),this.unsigned)}if(e.isZero())return t.ZERO;if(this.eq(t.MIN_VALUE))return e.isOdd()?t.MIN_VALUE:t.ZERO;if(e.eq(t.MIN_VALUE))return this.isOdd()?t.MIN_VALUE:t.ZERO;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(t.TWO_PWR_24)&&e.lt(t.TWO_PWR_24))return t.fromNumber(this.toNumber()*e.toNumber(),this.unsigned);var r=this.high>>>16,i=this.high&65535,o=this.low>>>16,s=this.low&65535,a=e.high>>>16,u=e.high&65535,d=e.low>>>16,m=e.low&65535,h=0,E=0,S=0,T=0;return T+=s*m,S+=T>>>16,T&=65535,S+=o*m,E+=S>>>16,S&=65535,S+=s*d,E+=S>>>16,S&=65535,E+=i*m,h+=E>>>16,E&=65535,E+=o*d,h+=E>>>16,E&=65535,E+=s*u,h+=E>>>16,E&=65535,h+=r*m+i*d+o*u+s*a,h&=65535,t.fromBits(S<<16|T,h<<16|E,this.unsigned)},t.prototype.mul=function(e){return this.multiply(e)},t.prototype.negate=function(){return!this.unsigned&&this.eq(t.MIN_VALUE)?t.MIN_VALUE:this.not().add(t.ONE)},t.prototype.neg=function(){return this.negate()},t.prototype.not=function(){return t.fromBits(~this.low,~this.high,this.unsigned)},t.prototype.notEquals=function(e){return!this.equals(e)},t.prototype.neq=function(e){return this.notEquals(e)},t.prototype.ne=function(e){return this.notEquals(e)},t.prototype.or=function(e){return t.isLong(e)||(e=t.fromValue(e)),t.fromBits(this.low|e.low,this.high|e.high,this.unsigned)},t.prototype.shiftLeft=function(e){return t.isLong(e)&&(e=e.toInt()),(e&=63)===0?this:e<32?t.fromBits(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned):t.fromBits(0,this.low<<e-32,this.unsigned)},t.prototype.shl=function(e){return this.shiftLeft(e)},t.prototype.shiftRight=function(e){return t.isLong(e)&&(e=e.toInt()),(e&=63)===0?this:e<32?t.fromBits(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned):t.fromBits(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},t.prototype.shr=function(e){return this.shiftRight(e)},t.prototype.shiftRightUnsigned=function(e){if(t.isLong(e)&&(e=e.toInt()),e&=63,e===0)return this;var n=this.high;if(e<32){var r=this.low;return t.fromBits(r>>>e|n<<32-e,n>>>e,this.unsigned)}else return e===32?t.fromBits(n,0,this.unsigned):t.fromBits(n>>>e-32,0,this.unsigned)},t.prototype.shr_u=function(e){return this.shiftRightUnsigned(e)},t.prototype.shru=function(e){return this.shiftRightUnsigned(e)},t.prototype.subtract=function(e){return t.isLong(e)||(e=t.fromValue(e)),this.add(e.neg())},t.prototype.sub=function(e){return this.subtract(e)},t.prototype.toInt=function(){return this.unsigned?this.low>>>0:this.low},t.prototype.toNumber=function(){return this.unsigned?(this.high>>>0)*ii+(this.low>>>0):this.high*ii+(this.low>>>0)},t.prototype.toBigInt=function(){return BigInt(this.toString())},t.prototype.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},t.prototype.toBytesLE=function(){var e=this.high,n=this.low;return[n&255,n>>>8&255,n>>>16&255,n>>>24,e&255,e>>>8&255,e>>>16&255,e>>>24]},t.prototype.toBytesBE=function(){var e=this.high,n=this.low;return[e>>>24,e>>>16&255,e>>>8&255,e&255,n>>>24,n>>>16&255,n>>>8&255,n&255]},t.prototype.toSigned=function(){return this.unsigned?t.fromBits(this.low,this.high,!1):this},t.prototype.toString=function(e){if(e=e||10,e<2||36<e)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(t.MIN_VALUE)){var n=t.fromNumber(e),r=this.div(n),i=r.mul(n).sub(this);return r.toString(e)+i.toInt().toString(e)}else return"-"+this.neg().toString(e);for(var o=t.fromNumber(Math.pow(e,6),this.unsigned),s=this,a="";;){var u=s.div(o),d=s.sub(u.mul(o)).toInt()>>>0,m=d.toString(e);if(s=u,s.isZero())return m+a;for(;m.length<6;)m="0"+m;a=""+m+a}},t.prototype.toUnsigned=function(){return this.unsigned?this:t.fromBits(this.low,this.high,!0)},t.prototype.xor=function(e){return t.isLong(e)||(e=t.fromValue(e)),t.fromBits(this.low^e.low,this.high^e.high,this.unsigned)},t.prototype.eqz=function(){return this.isZero()},t.prototype.le=function(e){return this.lessThanOrEqual(e)},t.prototype.toExtendedJSON=function(e){return e&&e.relaxed?this.toNumber():{$numberLong:this.toString()}},t.fromExtendedJSON=function(e,n){var r=t.fromString(e.$numberLong);return n&&n.relaxed?r.toNumber():r},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return'new Long("'.concat(this.toString(),'"').concat(this.unsigned?", true":"",")")},t.TWO_PWR_24=t.fromInt(vy),t.MAX_UNSIGNED_VALUE=t.fromBits(-1,-1,!0),t.ZERO=t.fromInt(0),t.UZERO=t.fromInt(0,!0),t.ONE=t.fromInt(1),t.UONE=t.fromInt(1,!0),t.NEG_ONE=t.fromInt(-1),t.MAX_VALUE=t.fromBits(-1,2147483647,!1),t.MIN_VALUE=t.fromBits(0,-2147483648,!1),t}();Object.defineProperty(le.prototype,"__isLong__",{value:!0});Object.defineProperty(le.prototype,"_bsontype",{value:"Long"});var yy=/^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/,Ey=/^(\+|-)?(Infinity|inf)$/i,wy=/^(\+|-)?NaN$/i,Hi=6111,tl=-6176,eh=6176,by=34,nl=[124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),th=[248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),nh=[120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Sy=/^([-+])?(\d+)?$/,Cy=31,rh=16383,Iy=30,xy=31;function ih(t){return!isNaN(parseInt(t,10))}function Dy(t){var e=le.fromNumber(1e9),n=le.fromNumber(0);if(!t.parts[0]&&!t.parts[1]&&!t.parts[2]&&!t.parts[3])return{quotient:t,rem:n};for(var r=0;r<=3;r++)n=n.shiftLeft(32),n=n.add(new le(t.parts[r],0)),t.parts[r]=n.div(e).low,n=n.modulo(e);return{quotient:t,rem:n}}function Ty(t,e){if(!t&&!e)return{high:le.fromNumber(0),low:le.fromNumber(0)};var n=t.shiftRightUnsigned(32),r=new le(t.getLowBits(),0),i=e.shiftRightUnsigned(32),o=new le(e.getLowBits(),0),s=n.multiply(i),a=n.multiply(o),u=r.multiply(i),d=r.multiply(o);return s=s.add(a.shiftRightUnsigned(32)),a=new le(a.getLowBits(),0).add(u).add(d.shiftRightUnsigned(32)),s=s.add(a.shiftRightUnsigned(32)),d=a.shiftLeft(32).add(new le(d.getLowBits(),0)),{high:s,low:d}}function Oy(t,e){var n=t.high>>>0,r=e.high>>>0;if(n<r)return!0;if(n===r){var i=t.low>>>0,o=e.low>>>0;if(i<o)return!0}return!1}function ri(t,e){throw new rt('"'.concat(t,'" is not a valid Decimal128 string - ').concat(e))}var al=function(){function t(e){if(!(this instanceof t))return new t(e);if(typeof e=="string")this.bytes=t.fromString(e).bytes;else if(sl(e)){if(e.byteLength!==16)throw new rt("Decimal128 must take a Buffer of 16 bytes");this.bytes=e}else throw new rt("Decimal128 must take a Buffer or string")}return t.fromString=function(e){var n=!1,r=!1,i=!1,o=0,s=0,a=0,u=0,d=0,m=[0],h=0,E=0,S=0,T=0,k=0,P=0,j=new le(0,0),Y=new le(0,0),ee=0,K=0;if(e.length>=7e3)throw new rt(""+e+" not a valid Decimal128 string");var ge=e.match(yy),U=e.match(Ey),fe=e.match(wy);if(!ge&&!U&&!fe||e.length===0)throw new rt(""+e+" not a valid Decimal128 string");if(ge){var ne=ge[2],Ee=ge[4],Le=ge[5],De=ge[6];Ee&&De===void 0&&ri(e,"missing exponent power"),Ee&&ne===void 0&&ri(e,"missing exponent base"),Ee===void 0&&(Le||De)&&ri(e,"missing e before exponent")}if((e[K]==="+"||e[K]==="-")&&(n=e[K++]==="-"),!ih(e[K])&&e[K]!=="."){if(e[K]==="i"||e[K]==="I")return new t(ke.from(n?th:nh));if(e[K]==="N")return new t(ke.from(nl))}for(;ih(e[K])||e[K]===".";){if(e[K]==="."){r&&ri(e,"contains multiple periods"),r=!0,K=K+1;continue}h<34&&(e[K]!=="0"||i)&&(i||(d=s),i=!0,m[E++]=parseInt(e[K],10),h=h+1),i&&(a=a+1),r&&(u=u+1),s=s+1,K=K+1}if(r&&!s)throw new rt(""+e+" not a valid Decimal128 string");if(e[K]==="e"||e[K]==="E"){var Re=e.substr(++K).match(Sy);if(!Re||!Re[2])return new t(ke.from(nl));k=parseInt(Re[0],10),K=K+Re[0].length}if(e[K])return new t(ke.from(nl));if(S=0,!h)S=0,T=0,m[0]=0,a=1,h=1,o=0;else if(T=h-1,o=a,o!==1)for(;m[d+o-1]===0;)o=o-1;for(k<=u&&u-k>16384?k=tl:k=k-u;k>Hi;){if(T=T+1,T-S>by){var Ke=m.join("");if(Ke.match(/^0+$/)){k=Hi;break}ri(e,"overflow")}k=k-1}for(;k<tl||h<a;){if(T===0&&o<h){k=tl,o=0;break}if(h<a?a=a-1:T=T-1,k<Hi)k=k+1;else{var Ke=m.join("");if(Ke.match(/^0+$/)){k=Hi;break}ri(e,"overflow")}}if(T-S+1<o){var Xe=s;r&&(d=d+1,Xe=Xe+1),n&&(d=d+1,Xe=Xe+1);var _t=parseInt(e[d+T+1],10),R=0;if(_t>=5&&(R=1,_t===5)){for(R=m[T]%2===1?1:0,P=d+T+2;P<Xe;P++)if(parseInt(e[P],10)){R=1;break}}if(R){for(var D=T;D>=0;D--)if(++m[D]>9&&(m[D]=0,D===0))if(k<Hi)k=k+1,m[D]=1;else return new t(ke.from(n?th:nh))}}if(j=le.fromNumber(0),Y=le.fromNumber(0),o===0)j=le.fromNumber(0),Y=le.fromNumber(0);else if(T-S<17){var D=S;for(Y=le.fromNumber(m[D++]),j=new le(0,0);D<=T;D++)Y=Y.multiply(le.fromNumber(10)),Y=Y.add(le.fromNumber(m[D]))}else{var D=S;for(j=le.fromNumber(m[D++]);D<=T-17;D++)j=j.multiply(le.fromNumber(10)),j=j.add(le.fromNumber(m[D]));for(Y=le.fromNumber(m[D++]);D<=T;D++)Y=Y.multiply(le.fromNumber(10)),Y=Y.add(le.fromNumber(m[D]))}var F=Ty(j,le.fromString("100000000000000000"));F.low=F.low.add(Y),Oy(F.low,Y)&&(F.high=F.high.add(le.fromNumber(1))),ee=k+eh;var L={low:le.fromNumber(0),high:le.fromNumber(0)};F.high.shiftRightUnsigned(49).and(le.fromNumber(1)).equals(le.fromNumber(1))?(L.high=L.high.or(le.fromNumber(3).shiftLeft(61)),L.high=L.high.or(le.fromNumber(ee).and(le.fromNumber(16383).shiftLeft(47))),L.high=L.high.or(F.high.and(le.fromNumber(0x7fffffffffff)))):(L.high=L.high.or(le.fromNumber(ee&16383).shiftLeft(49)),L.high=L.high.or(F.high.and(le.fromNumber(562949953421311)))),L.low=F.low,n&&(L.high=L.high.or(le.fromString("9223372036854775808")));var v=ke.alloc(16);return K=0,v[K++]=L.low.low&255,v[K++]=L.low.low>>8&255,v[K++]=L.low.low>>16&255,v[K++]=L.low.low>>24&255,v[K++]=L.low.high&255,v[K++]=L.low.high>>8&255,v[K++]=L.low.high>>16&255,v[K++]=L.low.high>>24&255,v[K++]=L.high.low&255,v[K++]=L.high.low>>8&255,v[K++]=L.high.low>>16&255,v[K++]=L.high.low>>24&255,v[K++]=L.high.high&255,v[K++]=L.high.high>>8&255,v[K++]=L.high.high>>16&255,v[K++]=L.high.high>>24&255,new t(v)},t.prototype.toString=function(){for(var e,n=0,r=new Array(36),i=0;i<r.length;i++)r[i]=0;var o=0,s=!1,a,u={parts:[0,0,0,0]},d,m,h=[];o=0;var E=this.bytes,S=E[o++]|E[o++]<<8|E[o++]<<16|E[o++]<<24,T=E[o++]|E[o++]<<8|E[o++]<<16|E[o++]<<24,k=E[o++]|E[o++]<<8|E[o++]<<16|E[o++]<<24,P=E[o++]|E[o++]<<8|E[o++]<<16|E[o++]<<24;o=0;var j={low:new le(S,T),high:new le(k,P)};j.high.lessThan(le.ZERO)&&h.push("-");var Y=P>>26&Cy;if(Y>>3===3){if(Y===Iy)return h.join("")+"Infinity";if(Y===xy)return"NaN";e=P>>15&rh,a=8+(P>>14&1)}else a=P>>14&7,e=P>>17&rh;var ee=e-eh;if(u.parts[0]=(P&16383)+((a&15)<<14),u.parts[1]=k,u.parts[2]=T,u.parts[3]=S,u.parts[0]===0&&u.parts[1]===0&&u.parts[2]===0&&u.parts[3]===0)s=!0;else for(m=3;m>=0;m--){var K=0,ge=Dy(u);if(u=ge.quotient,K=ge.rem.low,!!K)for(d=8;d>=0;d--)r[m*9+d]=K%10,K=Math.floor(K/10)}if(s)n=1,r[o]=0;else for(n=36;!r[o];)n=n-1,o=o+1;var U=n-1+ee;if(U>=34||U<=-7||ee>0){if(n>34)return h.push("".concat(0)),ee>0?h.push("E+".concat(ee)):ee<0&&h.push("E".concat(ee)),h.join("");h.push("".concat(r[o++])),n=n-1,n&&h.push(".");for(var i=0;i<n;i++)h.push("".concat(r[o++]));h.push("E"),U>0?h.push("+".concat(U)):h.push("".concat(U))}else if(ee>=0)for(var i=0;i<n;i++)h.push("".concat(r[o++]));else{var fe=n+ee;if(fe>0)for(var i=0;i<fe;i++)h.push("".concat(r[o++]));else h.push("0");for(h.push(".");fe++<0;)h.push("0");for(var i=0;i<n-Math.max(fe-1,0);i++)h.push("".concat(r[o++]))}return h.join("")},t.prototype.toJSON=function(){return{$numberDecimal:this.toString()}},t.prototype.toExtendedJSON=function(){return{$numberDecimal:this.toString()}},t.fromExtendedJSON=function(e){return t.fromString(e.$numberDecimal)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return'new Decimal128("'.concat(this.toString(),'")')},t}();Object.defineProperty(al.prototype,"_bsontype",{value:"Decimal128"});var ms=function(){function t(e){if(!(this instanceof t))return new t(e);e instanceof Number&&(e=e.valueOf()),this.value=+e}return t.prototype.valueOf=function(){return this.value},t.prototype.toJSON=function(){return this.value},t.prototype.toString=function(e){return this.value.toString(e)},t.prototype.toExtendedJSON=function(e){return e&&(e.legacy||e.relaxed&&isFinite(this.value))?this.value:Object.is(Math.sign(this.value),-0)?{$numberDouble:"-".concat(this.value.toFixed(1))}:{$numberDouble:Number.isInteger(this.value)?this.value.toFixed(1):this.value.toString()}},t.fromExtendedJSON=function(e,n){var r=parseFloat(e.$numberDouble);return n&&n.relaxed?r:new t(r)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){var e=this.toExtendedJSON();return"new Double(".concat(e.$numberDouble,")")},t}();Object.defineProperty(ms.prototype,"_bsontype",{value:"Double"});var gs=function(){function t(e){if(!(this instanceof t))return new t(e);e instanceof Number&&(e=e.valueOf()),this.value=+e|0}return t.prototype.valueOf=function(){return this.value},t.prototype.toString=function(e){return this.value.toString(e)},t.prototype.toJSON=function(){return this.value},t.prototype.toExtendedJSON=function(e){return e&&(e.relaxed||e.legacy)?this.value:{$numberInt:this.value.toString()}},t.fromExtendedJSON=function(e,n){return n&&n.relaxed?parseInt(e.$numberInt,10):new t(e.$numberInt)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return"new Int32(".concat(this.valueOf(),")")},t}();Object.defineProperty(gs.prototype,"_bsontype",{value:"Int32"});var cl=function(){function t(){if(!(this instanceof t))return new t}return t.prototype.toExtendedJSON=function(){return{$maxKey:1}},t.fromExtendedJSON=function(){return new t},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return"new MaxKey()"},t}();Object.defineProperty(cl.prototype,"_bsontype",{value:"MaxKey"});var ll=function(){function t(){if(!(this instanceof t))return new t}return t.prototype.toExtendedJSON=function(){return{$minKey:1}},t.fromExtendedJSON=function(){return new t},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return"new MinKey()"},t}();Object.defineProperty(ll.prototype,"_bsontype",{value:"MinKey"});var Ry=new RegExp("^[0-9a-fA-F]{24}$"),yr=null,Mn=Symbol("id"),Lt=function(){function t(e){if(!(this instanceof t))return new t(e);var n;if(typeof e=="object"&&e&&"id"in e){if(typeof e.id!="string"&&!ArrayBuffer.isView(e.id))throw new rt("Argument passed in must have an id that is of type string or Buffer");"toHexString"in e&&typeof e.toHexString=="function"?n=ke.from(e.toHexString(),"hex"):n=e.id}else n=e;if(n==null||typeof n=="number")this[Mn]=t.generate(typeof n=="number"?n:void 0);else if(ArrayBuffer.isView(n)&&n.byteLength===12)this[Mn]=n instanceof ke?n:us(n);else if(typeof n=="string")if(n.length===12){var r=ke.from(n);if(r.byteLength===12)this[Mn]=r;else throw new rt("Argument passed in must be a string of 12 bytes")}else if(n.length===24&&Ry.test(n))this[Mn]=ke.from(n,"hex");else throw new rt("Argument passed in must be a string of 12 bytes or a string of 24 hex characters or an integer");else throw new rt("Argument passed in does not match the accepted types");t.cacheHexString&&(this.__id=this.id.toString("hex"))}return Object.defineProperty(t.prototype,"id",{get:function(){return this[Mn]},set:function(e){this[Mn]=e,t.cacheHexString&&(this.__id=e.toString("hex"))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"generationTime",{get:function(){return this.id.readInt32BE(0)},set:function(e){this.id.writeUInt32BE(e,0)},enumerable:!1,configurable:!0}),t.prototype.toHexString=function(){if(t.cacheHexString&&this.__id)return this.__id;var e=this.id.toString("hex");return t.cacheHexString&&!this.__id&&(this.__id=e),e},t.getInc=function(){return t.index=(t.index+1)%16777215},t.generate=function(e){typeof e!="number"&&(e=Math.floor(Date.now()/1e3));var n=t.getInc(),r=ke.alloc(12);return r.writeUInt32BE(e,0),yr===null&&(yr=dh(5)),r[4]=yr[0],r[5]=yr[1],r[6]=yr[2],r[7]=yr[3],r[8]=yr[4],r[11]=n&255,r[10]=n>>8&255,r[9]=n>>16&255,r},t.prototype.toString=function(e){return e?this.id.toString(e):this.toHexString()},t.prototype.toJSON=function(){return this.toHexString()},t.prototype.equals=function(e){if(e==null)return!1;if(e instanceof t)return this[Mn][11]===e[Mn][11]&&this[Mn].equals(e[Mn]);if(typeof e=="string"&&t.isValid(e)&&e.length===12&&sl(this.id))return e===ke.prototype.toString.call(this.id,"latin1");if(typeof e=="string"&&t.isValid(e)&&e.length===24)return e.toLowerCase()===this.toHexString();if(typeof e=="string"&&t.isValid(e)&&e.length===12)return ke.from(e).equals(this.id);if(typeof e=="object"&&"toHexString"in e&&typeof e.toHexString=="function"){var n=e.toHexString(),r=this.toHexString().toLowerCase();return typeof n=="string"&&n.toLowerCase()===r}return!1},t.prototype.getTimestamp=function(){var e=new Date,n=this.id.readUInt32BE(0);return e.setTime(Math.floor(n)*1e3),e},t.createPk=function(){return new t},t.createFromTime=function(e){var n=ke.from([0,0,0,0,0,0,0,0,0,0,0,0]);return n.writeUInt32BE(e,0),new t(n)},t.createFromHexString=function(e){if(typeof e>"u"||e!=null&&e.length!==24)throw new rt("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");return new t(ke.from(e,"hex"))},t.isValid=function(e){if(e==null)return!1;try{return new t(e),!0}catch{return!1}},t.prototype.toExtendedJSON=function(){return this.toHexString?{$oid:this.toHexString()}:{$oid:this.toString("hex")}},t.fromExtendedJSON=function(e){return new t(e.$oid)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return'new ObjectId("'.concat(this.toHexString(),'")')},t.index=Math.floor(Math.random()*16777215),t}();Object.defineProperty(Lt.prototype,"generate",{value:hs(function(t){return Lt.generate(t)},"Please use the static `ObjectId.generate(time)` instead")});Object.defineProperty(Lt.prototype,"getInc",{value:hs(function(){return Lt.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(Lt.prototype,"get_inc",{value:hs(function(){return Lt.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(Lt,"get_inc",{value:hs(function(){return Lt.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(Lt.prototype,"_bsontype",{value:"ObjectID"});function Ay(t){return t.split("").sort().join("")}var $i=function(){function t(e,n){if(!(this instanceof t))return new t(e,n);if(this.pattern=e,this.options=Ay(n??""),this.pattern.indexOf("\0")!==-1)throw new Er("BSON Regex patterns cannot contain null bytes, found: ".concat(JSON.stringify(this.pattern)));if(this.options.indexOf("\0")!==-1)throw new Er("BSON Regex options cannot contain null bytes, found: ".concat(JSON.stringify(this.options)));for(var r=0;r<this.options.length;r++)if(!(this.options[r]==="i"||this.options[r]==="m"||this.options[r]==="x"||this.options[r]==="l"||this.options[r]==="s"||this.options[r]==="u"))throw new Er("The regular expression option [".concat(this.options[r],"] is not supported"))}return t.parseOptions=function(e){return e?e.split("").sort().join(""):""},t.prototype.toExtendedJSON=function(e){return e=e||{},e.legacy?{$regex:this.pattern,$options:this.options}:{$regularExpression:{pattern:this.pattern,options:this.options}}},t.fromExtendedJSON=function(e){if("$regex"in e)if(typeof e.$regex!="string"){if(e.$regex._bsontype==="BSONRegExp")return e}else return new t(e.$regex,t.parseOptions(e.$options));if("$regularExpression"in e)return new t(e.$regularExpression.pattern,t.parseOptions(e.$regularExpression.options));throw new rt("Unexpected BSONRegExp EJSON object form: ".concat(JSON.stringify(e)))},t}();Object.defineProperty($i.prototype,"_bsontype",{value:"BSONRegExp"});var ul=function(){function t(e){if(!(this instanceof t))return new t(e);this.value=e}return t.prototype.valueOf=function(){return this.value},t.prototype.toString=function(){return this.value},t.prototype.inspect=function(){return'new BSONSymbol("'.concat(this.value,'")')},t.prototype.toJSON=function(){return this.value},t.prototype.toExtendedJSON=function(){return{$symbol:this.value}},t.fromExtendedJSON=function(e){return new t(e.$symbol)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t}();Object.defineProperty(ul.prototype,"_bsontype",{value:"Symbol"});var Ny=le,mh=function(t){fs(e,t);function e(n,r){var i=this;return i instanceof e?(le.isLong(n)?i=t.call(this,n.low,n.high,!0)||this:Gi(n)&&typeof n.t<"u"&&typeof n.i<"u"?i=t.call(this,n.i,n.t,!0)||this:i=t.call(this,n,r,!0)||this,Object.defineProperty(i,"_bsontype",{value:"Timestamp",writable:!1,configurable:!1,enumerable:!1}),i):new e(n,r)}return e.prototype.toJSON=function(){return{$timestamp:this.toString()}},e.fromInt=function(n){return new e(le.fromInt(n,!0))},e.fromNumber=function(n){return new e(le.fromNumber(n,!0))},e.fromBits=function(n,r){return new e(n,r)},e.fromString=function(n,r){return new e(le.fromString(n,!0,r))},e.prototype.toExtendedJSON=function(){return{$timestamp:{t:this.high>>>0,i:this.low>>>0}}},e.fromExtendedJSON=function(n){return new e(n.$timestamp)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return"new Timestamp({ t: ".concat(this.getHighBits(),", i: ").concat(this.getLowBits()," })")},e.MAX_VALUE=le.MAX_UNSIGNED_VALUE,e}(Ny);function Py(t){return Gi(t)&&Reflect.has(t,"_bsontype")&&typeof t._bsontype=="string"}var gh=2147483647,_h=-2147483648,vh=9223372036854776e3,yh=-9223372036854776e3,My={$oid:Lt,$binary:wr,$uuid:wr,$symbol:ul,$numberInt:gs,$numberDecimal:al,$numberDouble:ms,$numberLong:le,$minKey:ll,$maxKey:cl,$regex:$i,$regularExpression:$i,$timestamp:mh};function Eh(t,e){if(e===void 0&&(e={}),typeof t=="number"){if(e.relaxed||e.legacy)return t;if(Math.floor(t)===t){if(t>=_h&&t<=gh)return new gs(t);if(t>=yh&&t<=vh)return le.fromNumber(t)}return new ms(t)}if(t==null||typeof t!="object")return t;if(t.$undefined)return null;for(var n=Object.keys(t).filter(function(h){return h.startsWith("$")&&t[h]!=null}),r=0;r<n.length;r++){var i=My[n[r]];if(i)return i.fromExtendedJSON(t,e)}if(t.$date!=null){var o=t.$date,s=new Date;return e.legacy?typeof o=="number"?s.setTime(o):typeof o=="string"&&s.setTime(Date.parse(o)):typeof o=="string"?s.setTime(Date.parse(o)):le.isLong(o)?s.setTime(o.toNumber()):typeof o=="number"&&e.relaxed&&s.setTime(o),s}if(t.$code!=null){var a=Object.assign({},t);return t.$scope&&(a.$scope=Eh(t.$scope)),ps.fromExtendedJSON(t)}if(_y(t)||t.$dbPointer){var u=t.$ref?t:t.$dbPointer;if(u instanceof ji)return u;var d=Object.keys(u).filter(function(h){return h.startsWith("$")}),m=!0;if(d.forEach(function(h){["$ref","$id","$db"].indexOf(h)===-1&&(m=!1)}),m)return ji.fromExtendedJSON(u)}return t}function ky(t,e){return t.map(function(n,r){e.seenObjects.push({propertyName:"index ".concat(r),obj:null});try{return nr(n,e)}finally{e.seenObjects.pop()}})}function oh(t){var e=t.toISOString();return t.getUTCMilliseconds()!==0?e:e.slice(0,-5)+"Z"}function nr(t,e){if((typeof t=="object"||typeof t=="function")&&t!==null){var n=e.seenObjects.findIndex(function(j){return j.obj===t});if(n!==-1){var r=e.seenObjects.map(function(j){return j.propertyName}),i=r.slice(0,n).map(function(j){return"".concat(j," -> ")}).join(""),o=r[n],s=" -> "+r.slice(n+1,r.length-1).map(function(j){return"".concat(j," -> ")}).join(""),a=r[r.length-1],u=" ".repeat(i.length+o.length/2),d="-".repeat(s.length+(o.length+a.length)/2-1);throw new rt(`Converting circular structure to EJSON:
33
- `+" ".concat(i).concat(o).concat(s).concat(a,`
34
- `)+" ".concat(u,"\\").concat(d,"/"))}e.seenObjects[e.seenObjects.length-1].obj=t}if(Array.isArray(t))return ky(t,e);if(t===void 0)return null;if(t instanceof Date||hy(t)){var m=t.getTime(),h=m>-1&&m<2534023188e5;return e.legacy?e.relaxed&&h?{$date:t.getTime()}:{$date:oh(t)}:e.relaxed&&h?{$date:oh(t)}:{$date:{$numberLong:t.getTime().toString()}}}if(typeof t=="number"&&(!e.relaxed||!isFinite(t))){if(Math.floor(t)===t){var E=t>=_h&&t<=gh,S=t>=yh&&t<=vh;if(E)return{$numberInt:t.toString()};if(S)return{$numberLong:t.toString()}}return{$numberDouble:t.toString()}}if(t instanceof RegExp||fy(t)){var T=t.flags;if(T===void 0){var k=t.toString().match(/[gimuy]*$/);k&&(T=k[0])}var P=new $i(t.source,T);return P.toExtendedJSON(e)}return t!=null&&typeof t=="object"?Fy(t,e):t}var Ly={Binary:function(t){return new wr(t.value(),t.sub_type)},Code:function(t){return new ps(t.code,t.scope)},DBRef:function(t){return new ji(t.collection||t.namespace,t.oid,t.db,t.fields)},Decimal128:function(t){return new al(t.bytes)},Double:function(t){return new ms(t.value)},Int32:function(t){return new gs(t.value)},Long:function(t){return le.fromBits(t.low!=null?t.low:t.low_,t.low!=null?t.high:t.high_,t.low!=null?t.unsigned:t.unsigned_)},MaxKey:function(){return new cl},MinKey:function(){return new ll},ObjectID:function(t){return new Lt(t)},ObjectId:function(t){return new Lt(t)},BSONRegExp:function(t){return new $i(t.pattern,t.options)},Symbol:function(t){return new ul(t.value)},Timestamp:function(t){return mh.fromBits(t.low,t.high)}};function Fy(t,e){if(t==null||typeof t!="object")throw new Er("not an object instance");var n=t._bsontype;if(typeof n>"u"){var r={};for(var i in t){e.seenObjects.push({propertyName:i,obj:null});try{var o=nr(t[i],e);i==="__proto__"?Object.defineProperty(r,i,{value:o,writable:!0,enumerable:!0,configurable:!0}):r[i]=o}finally{e.seenObjects.pop()}}return r}else if(Py(t)){var s=t;if(typeof s.toExtendedJSON!="function"){var a=Ly[t._bsontype];if(!a)throw new rt("Unrecognized or invalid _bsontype: "+t._bsontype);s=a(s)}return n==="Code"&&s.scope?s=new ps(s.code,nr(s.scope,e)):n==="DBRef"&&s.oid&&(s=new ji(nr(s.collection,e),nr(s.oid,e),nr(s.db,e),nr(s.fields,e))),s.toExtendedJSON(e)}else throw new Er("_bsontype must be a string, but was: "+typeof n)}var sh;(function(t){function e(o,s){var a=Object.assign({},{relaxed:!0,legacy:!1},s);return typeof a.relaxed=="boolean"&&(a.strict=!a.relaxed),typeof a.strict=="boolean"&&(a.relaxed=!a.strict),JSON.parse(o,function(u,d){if(u.indexOf("\0")!==-1)throw new Er("BSON Document field names cannot contain null bytes, found: ".concat(JSON.stringify(u)));return Eh(d,a)})}t.parse=e;function n(o,s,a,u){a!=null&&typeof a=="object"&&(u=a,a=0),s!=null&&typeof s=="object"&&!Array.isArray(s)&&(u=s,s=void 0,a=0);var d=Object.assign({relaxed:!0,legacy:!1},u,{seenObjects:[{propertyName:"(root)",obj:null}]}),m=nr(o,d);return JSON.stringify(m,s,a)}t.stringify=n;function r(o,s){return s=s||{},JSON.parse(n(o,s))}t.serialize=r;function i(o,s){return s=s||{},e(JSON.stringify(o),s)}t.deserialize=i})(sh||(sh={}));var ah,ch=uh();ch.Map?ah=ch.Map:ah=function(){function t(e){e===void 0&&(e=[]),this._keys=[],this._values={};for(var n=0;n<e.length;n++)if(e[n]!=null){var r=e[n],i=r[0],o=r[1];this._keys.push(i),this._values[i]={v:o,i:this._keys.length-1}}}return t.prototype.clear=function(){this._keys=[],this._values={}},t.prototype.delete=function(e){var n=this._values[e];return n==null?!1:(delete this._values[e],this._keys.splice(n.i,1),!0)},t.prototype.entries=function(){var e=this,n=0;return{next:function(){var r=e._keys[n++];return{value:r!==void 0?[r,e._values[r].v]:void 0,done:r===void 0}}}},t.prototype.forEach=function(e,n){n=n||this;for(var r=0;r<this._keys.length;r++){var i=this._keys[r];e.call(n,this._values[i].v,i,n)}},t.prototype.get=function(e){return this._values[e]?this._values[e].v:void 0},t.prototype.has=function(e){return this._values[e]!=null},t.prototype.keys=function(){var e=this,n=0;return{next:function(){var r=e._keys[n++];return{value:r!==void 0?r:void 0,done:r===void 0}}}},t.prototype.set=function(e,n){return this._values[e]?(this._values[e].v=n,this):(this._keys.push(e),this._values[e]={v:n,i:this._keys.length-1},this)},t.prototype.values=function(){var e=this,n=0;return{next:function(){var r=e._keys[n++];return{value:r!==void 0?e._values[r].v:void 0,done:r===void 0}}}},Object.defineProperty(t.prototype,"size",{get:function(){return this._keys.length},enumerable:!1,configurable:!0}),t}();var oR=le.fromNumber(my),sR=le.fromNumber(gy);var rl=new Uint8Array(8),aR=new DataView(rl.buffer,rl.byteOffset,rl.byteLength);var Vy=1024*1024*17,cR=ke.alloc(Vy);var _s=class{triggerID;nudgeID;engagementID;contentID;shortID;contentType;variation;props;objective;onsiteDeliveryType;holdout;constructor(e){e=e||{},this.triggerID=e.id||e.triggerID,this.nudgeID=e.nudgeID,this.shortID=e.shortID,this.contentType=e.contentType,this.engagementID=e.engagementID,this.contentID=e.contentID,this.variation=e.variation,this.props=e.props,this.objective=e.objective,this.onsiteDeliveryType=e.onsiteDeliveryType,this.holdout=e.holdout}};var oi=class{constructor(e,n={},r,i){this.name=e;this.properties=n;this.id=i?new Lt(i):new Lt,this.occurred=new Date,r&&(this.trigger=new _s(r)),this.newEvent=!i}trigger;items;videos;id;newEvent;cart;currentItem;deviceProps;landingPage;occurred;page;sessionID;sessionNumber;locale};function By(t,e){t&1&&(Gt(),Ie(0,"path",3))}function Uy(t,e){t&1&&(Gt(),Ie(0,"path",4))}var si=class t{muted;videoEl;toggled=new He;toggleMute(e){e.stopPropagation(),e.preventDefault(),this.muted=!this.muted,this.videoEl.muted=this.muted,this.toggled.emit(this.muted),this.muted||this.videoEl.play()}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Te({type:t,selectors:[["cooee-mute-toggle"]],inputs:{muted:"muted",videoEl:"videoEl"},outputs:{toggled:"toggled"},decls:5,vars:1,consts:[["type","button",1,"lc:bg-black/50",3,"click"],["xmlns","http://www.w3.org/2000/svg","height","24px","viewBox","0 0 24 24","width","24px","fill","#fff"],["d","M0 0h24v24H0V0z","fill","none"],["d","M4.34 2.93L2.93 4.34 7.29 8.7 7 9H3v6h4l5 5v-6.59l4.18 4.18c-.65.49-1.38.88-2.18 1.11v2.06c1.34-.3 2.57-.92 3.61-1.75l2.05 2.05 1.41-1.41L4.34 2.93zM10 15.17L7.83 13H5v-2h2.83l.88-.88L10 11.41v3.76zM19 12c0 .82-.15 1.61-.41 2.34l1.53 1.53c.56-1.17.88-2.48.88-3.87 0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zm-7-8l-1.88 1.88L12 7.76zm4.5 8c0-1.77-1.02-3.29-2.5-4.03v1.79l2.48 2.48c.01-.08.02-.16.02-.24z"],["d","M3 9v6h4l5 5V4L7 9H3zm7-.17v6.34L7.83 13H5v-2h2.83L10 8.83zM16.5 12c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77 0-4.28-2.99-7.86-7-8.77z"]],template:function(n,r){n&1&&(X(0,"button",0),Me("click",function(o){return r.toggleMute(o)}),Gt(),X(1,"svg",1),Ie(2,"path",2),Ae(3,By,1,0,":svg:path",3)(4,Uy,1,0,":svg:path",4),q()()),n&2&&(W(3),Ne(r.muted?3:4))},styles:["button[_ngcontent-%COMP%]{width:40px;height:40px;display:flex;justify-content:center;align-items:center;border:none;cursor:pointer;border-radius:100%}"]})};var dl;function Hy(){if(dl==null){let t=typeof document<"u"?document.head:null;dl=!!(t&&(t.createShadowRoot||t.attachShadow))}return dl}function ai(t){if(Hy()){let e=t.getRootNode?t.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&e instanceof ShadowRoot)return e}return null}function vs(){let t=typeof document<"u"&&document?document.activeElement:null;for(;t&&t.shadowRoot;){let e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}function Bt(t){return t.composedPath?t.composedPath()[0]:t.target}function ys(t){return t.buttons===0||t.detail===0}function Es(t){let e=t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0];return!!e&&e.identifier===-1&&(e.radiusX==null||e.radiusX===1)&&(e.radiusY==null||e.radiusY===1)}function fl(t,e=0){return jy(t)?Number(t):arguments.length===2?e:0}function jy(t){return!isNaN(parseFloat(t))&&!isNaN(Number(t))}function Ut(t){return t instanceof ut?t.nativeElement:t}function wt(t,e,n,r,i){let o=parseInt(ea.major),s=parseInt(ea.minor);return o>19||o===19&&s>0||o===0&&s===0?t.listen(e,n,r,i):(e.addEventListener(n,r,i),()=>{e.removeEventListener(n,r,i)})}var ws=new WeakMap,br=(()=>{class t{_appRef;_injector=N(ht);_environmentInjector=N(Or);load(n){let r=this._appRef=this._appRef||this._injector.get(Pr),i=ws.get(r);i||(i={loaders:new Set,refs:[]},ws.set(r,i),r.onDestroy(()=>{ws.get(r)?.refs.forEach(o=>o.destroy()),ws.delete(r)})),i.loaders.has(n)||(i.loaders.add(n),i.refs.push(ao(n,{environmentInjector:this._environmentInjector})))}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Pe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var hl;try{hl=typeof Intl<"u"&&Intl.v8BreakIterator}catch{hl=!1}var Ht=(()=>{class t{_platformId=N(pu);isBrowser=this._platformId?Ou(this._platformId):typeof document=="object"&&!!document;EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent);TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent);BLINK=this.isBrowser&&!!(window.chrome||hl)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT;WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT;IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window);FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent);ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT;SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT;constructor(){}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Pe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var $y=new ft("cdk-dir-doc",{providedIn:"root",factory:Gy});function Gy(){return N(nt)}var Wy=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;function zy(t){let e=t?.toLowerCase()||"";return e==="auto"&&typeof navigator<"u"&&navigator?.language?Wy.test(navigator.language)?"rtl":"ltr":e==="rtl"?"rtl":"ltr"}var Sr=(()=>{class t{value="ltr";change=new He;constructor(){let n=N($y,{optional:!0});if(n){let r=n.body?n.body.dir:null,i=n.documentElement?n.documentElement.dir:null;this.value=zy(r||i||"ltr")}}ngOnDestroy(){this.change.complete()}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Pe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Cr;function wh(){if(Cr==null){if(typeof document!="object"||!document||typeof Element!="function"||!Element)return Cr=!1,Cr;if("scrollBehavior"in document.documentElement.style)Cr=!0;else{let t=Element.prototype.scrollTo;t?Cr=!/\{\s*\[native code\]\s*\}/.test(t.toString()):Cr=!1}}return Cr}var Yy=20,pl=(()=>{class t{_ngZone=N(ot);_platform=N(Ht);_renderer=N(Qt).createRenderer(null,null);_cleanupGlobalListener;constructor(){}_scrolled=new we;_scrolledCount=0;scrollContainers=new Map;register(n){this.scrollContainers.has(n)||this.scrollContainers.set(n,n.elementScrolled().subscribe(()=>this._scrolled.next(n)))}deregister(n){let r=this.scrollContainers.get(n);r&&(r.unsubscribe(),this.scrollContainers.delete(n))}scrolled(n=Yy){return this._platform.isBrowser?new rr(r=>{this._cleanupGlobalListener||(this._cleanupGlobalListener=this._ngZone.runOutsideAngular(()=>this._renderer.listen("document","scroll",()=>this._scrolled.next())));let i=n>0?this._scrolled.pipe(Xs(n)).subscribe(r):this._scrolled.subscribe(r);return this._scrolledCount++,()=>{i.unsubscribe(),this._scrolledCount--,this._scrolledCount||(this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0)}}):Tr()}ngOnDestroy(){this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0,this.scrollContainers.forEach((n,r)=>this.deregister(r)),this._scrolled.complete()}ancestorScrolled(n,r){let i=this.getAncestorScrollContainers(n);return this.scrolled(r).pipe(no(o=>!o||i.indexOf(o)>-1))}getAncestorScrollContainers(n){let r=[];return this.scrollContainers.forEach((i,o)=>{this._scrollableContainsElement(o,n)&&r.push(o)}),r}_scrollableContainsElement(n,r){let i=Ut(r),o=n.getElementRef().nativeElement;do if(i==o)return!0;while(i=i.parentElement);return!1}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Pe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Ky=20,Wi=(()=>{class t{_platform=N(Ht);_listeners;_viewportSize;_change=new we;_document=N(nt,{optional:!0});constructor(){let n=N(ot),r=N(Qt).createRenderer(null,null);n.runOutsideAngular(()=>{if(this._platform.isBrowser){let i=o=>this._change.next(o);this._listeners=[r.listen("window","resize",i),r.listen("window","orientationchange",i)]}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){this._listeners?.forEach(n=>n()),this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();let n={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),n}getViewportRect(){let n=this.getViewportScrollPosition(),{width:r,height:i}=this.getViewportSize();return{top:n.top,left:n.left,bottom:n.top+i,right:n.left+r,height:i,width:r}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};let n=this._document,r=this._getWindow(),i=n.documentElement,o=i.getBoundingClientRect(),s=-o.top||n.body.scrollTop||r.scrollY||i.scrollTop||0,a=-o.left||n.body.scrollLeft||r.scrollX||i.scrollLeft||0;return{top:s,left:a}}change(n=Ky){return n>0?this._change.pipe(Xs(n)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){let n=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:n.innerWidth,height:n.innerHeight}:{width:0,height:0}}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Pe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var ml={},bs=(()=>{class t{_appId=N(hu);getId(n){return this._appId!=="ng"&&(n+=this._appId),ml.hasOwnProperty(n)||(ml[n]=0),`${n}${ml[n]++}`}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Pe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function gl(t){return Array.isArray(t)?t:[t]}function Lh(t){let e=t.cloneNode(!0),n=e.querySelectorAll("[id]"),r=t.nodeName.toLowerCase();e.removeAttribute("id");for(let i=0;i<n.length;i++)n[i].removeAttribute("id");return r==="canvas"?Ch(t,e):(r==="input"||r==="select"||r==="textarea")&&Sh(t,e),bh("canvas",t,e,Ch),bh("input, textarea, select",t,e,Sh),e}function bh(t,e,n,r){let i=e.querySelectorAll(t);if(i.length){let o=n.querySelectorAll(t);for(let s=0;s<i.length;s++)r(i[s],o[s])}}var Xy=0;function Sh(t,e){e.type!=="file"&&(e.value=t.value),e.type==="radio"&&e.name&&(e.name=`mat-clone-${e.name}-${Xy++}`)}function Ch(t,e){let n=e.getContext("2d");if(n)try{n.drawImage(t,0,0)}catch{}}function Cl(t){let e=t.getBoundingClientRect();return{top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height,x:e.x,y:e.y}}function yl(t,e,n){let{top:r,bottom:i,left:o,right:s}=t;return n>=r&&n<=i&&e>=o&&e<=s}function Ki(t,e,n){t.top+=e,t.bottom=t.top+t.height,t.left+=n,t.right=t.left+t.width}function Ih(t,e,n,r){let{top:i,right:o,bottom:s,left:a,width:u,height:d}=t,m=u*e,h=d*e;return r>i-h&&r<s+h&&n>a-m&&n<o+m}var Ss=class{_document;positions=new Map;constructor(e){this._document=e}clear(){this.positions.clear()}cache(e){this.clear(),this.positions.set(this._document,{scrollPosition:this.getViewportScrollPosition()}),e.forEach(n=>{this.positions.set(n,{scrollPosition:{top:n.scrollTop,left:n.scrollLeft},clientRect:Cl(n)})})}handleScroll(e){let n=Bt(e),r=this.positions.get(n);if(!r)return null;let i=r.scrollPosition,o,s;if(n===this._document){let d=this.getViewportScrollPosition();o=d.top,s=d.left}else o=n.scrollTop,s=n.scrollLeft;let a=i.top-o,u=i.left-s;return this.positions.forEach((d,m)=>{d.clientRect&&n!==m&&n.contains(m)&&Ki(d.clientRect,a,u)}),i.top=o,i.left=s,{top:a,left:u}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}};function Fh(t,e){let n=t.rootNodes;if(n.length===1&&n[0].nodeType===e.ELEMENT_NODE)return n[0];let r=e.createElement("div");return n.forEach(i=>r.appendChild(i)),r}function Il(t,e,n){for(let r in e)if(e.hasOwnProperty(r)){let i=e[r];i?t.setProperty(r,i,n?.has(r)?"important":""):t.removeProperty(r)}return t}function ci(t,e){let n=e?"":"none";Il(t.style,{"touch-action":e?"":"none","-webkit-user-drag":e?"":"none","-webkit-tap-highlight-color":e?"":"transparent","user-select":n,"-ms-user-select":n,"-webkit-user-select":n,"-moz-user-select":n})}function xh(t,e,n){Il(t.style,{position:e?"":"fixed",top:e?"":"0",opacity:e?"":"0",left:e?"":"-999em"},n)}function Cs(t,e){return e&&e!="none"?t+" "+e:t}function Dh(t,e){t.style.width=`${e.width}px`,t.style.height=`${e.height}px`,t.style.transform=Is(e.left,e.top)}function Is(t,e){return`translate3d(${Math.round(t)}px, ${Math.round(e)}px, 0)`}function Th(t){let e=t.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(t)*e}function qy(t){let e=getComputedStyle(t),n=_l(e,"transition-property"),r=n.find(a=>a==="transform"||a==="all");if(!r)return 0;let i=n.indexOf(r),o=_l(e,"transition-duration"),s=_l(e,"transition-delay");return Th(o[i])+Th(s[i])}function _l(t,e){return t.getPropertyValue(e).split(",").map(r=>r.trim())}var Zy=new Set(["position"]),El=class{_document;_rootElement;_direction;_initialDomRect;_previewTemplate;_previewClass;_pickupPositionOnPage;_initialTransform;_zIndex;_renderer;_previewEmbeddedView;_preview;get element(){return this._preview}constructor(e,n,r,i,o,s,a,u,d,m){this._document=e,this._rootElement=n,this._direction=r,this._initialDomRect=i,this._previewTemplate=o,this._previewClass=s,this._pickupPositionOnPage=a,this._initialTransform=u,this._zIndex=d,this._renderer=m}attach(e){this._preview=this._createPreview(),e.appendChild(this._preview),Oh(this._preview)&&this._preview.showPopover()}destroy(){this._preview.remove(),this._previewEmbeddedView?.destroy(),this._preview=this._previewEmbeddedView=null}setTransform(e){this._preview.style.transform=e}getBoundingClientRect(){return this._preview.getBoundingClientRect()}addClass(e){this._preview.classList.add(e)}getTransitionDuration(){return qy(this._preview)}addEventListener(e,n){return this._renderer.listen(this._preview,e,n)}_createPreview(){let e=this._previewTemplate,n=this._previewClass,r=e?e.template:null,i;if(r&&e){let o=e.matchSize?this._initialDomRect:null,s=e.viewContainer.createEmbeddedView(r,e.context);s.detectChanges(),i=Fh(s,this._document),this._previewEmbeddedView=s,e.matchSize?Dh(i,o):i.style.transform=Is(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else i=Lh(this._rootElement),Dh(i,this._initialDomRect),this._initialTransform&&(i.style.transform=this._initialTransform);return Il(i.style,{"pointer-events":"none",margin:Oh(i)?"0 auto 0 0":"0",position:"fixed",top:"0",left:"0","z-index":this._zIndex+""},Zy),ci(i,!1),i.classList.add("cdk-drag-preview"),i.setAttribute("popover","manual"),i.setAttribute("dir",this._direction),n&&(Array.isArray(n)?n.forEach(o=>i.classList.add(o)):i.classList.add(n)),i}};function Oh(t){return"showPopover"in t}var Jy={passive:!0},Rh={passive:!1},Qy={passive:!1,capture:!0},e0=800,Ah=new Set(["position"]),wl=class{_config;_document;_ngZone;_viewportRuler;_dragDropRegistry;_renderer;_rootElementCleanups;_cleanupShadowRootSelectStart;_preview;_previewContainer;_placeholderRef;_placeholder;_pickupPositionInElement;_pickupPositionOnPage;_anchor;_passiveTransform={x:0,y:0};_activeTransform={x:0,y:0};_initialTransform;_hasStartedDragging=Tt(!1);_hasMoved;_initialContainer;_initialIndex;_parentPositions;_moveEvents=new we;_pointerDirectionDelta;_pointerPositionAtLastDirectionChange;_lastKnownPointerPosition;_rootElement;_ownerSVGElement;_rootElementTapHighlight;_pointerMoveSubscription=Jt.EMPTY;_pointerUpSubscription=Jt.EMPTY;_scrollSubscription=Jt.EMPTY;_resizeSubscription=Jt.EMPTY;_lastTouchEventTime;_dragStartTime;_boundaryElement=null;_nativeInteractionsEnabled=!0;_initialDomRect;_previewRect;_boundaryRect;_previewTemplate;_placeholderTemplate;_handles=[];_disabledHandles=new Set;_dropContainer;_direction="ltr";_parentDragRef;_cachedShadowRoot;lockAxis;dragStartDelay=0;previewClass;scale=1;get disabled(){return this._disabled||!!(this._dropContainer&&this._dropContainer.disabled)}set disabled(e){e!==this._disabled&&(this._disabled=e,this._toggleNativeDragInteractions(),this._handles.forEach(n=>ci(n,e)))}_disabled=!1;beforeStarted=new we;started=new we;released=new we;ended=new we;entered=new we;exited=new we;dropped=new we;moved=this._moveEvents;data;constrainPosition;constructor(e,n,r,i,o,s,a){this._config=n,this._document=r,this._ngZone=i,this._viewportRuler=o,this._dragDropRegistry=s,this._renderer=a,this.withRootElement(e).withParent(n.parentDragRef||null),this._parentPositions=new Ss(r),s.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(e){this._handles=e.map(r=>Ut(r)),this._handles.forEach(r=>ci(r,this.disabled)),this._toggleNativeDragInteractions();let n=new Set;return this._disabledHandles.forEach(r=>{this._handles.indexOf(r)>-1&&n.add(r)}),this._disabledHandles=n,this}withPreviewTemplate(e){return this._previewTemplate=e,this}withPlaceholderTemplate(e){return this._placeholderTemplate=e,this}withRootElement(e){let n=Ut(e);return n!==this._rootElement&&(this._removeRootElementListeners(),this._rootElementCleanups=this._ngZone.runOutsideAngular(()=>[wt(this._renderer,n,"mousedown",this._pointerDown,Rh),wt(this._renderer,n,"touchstart",this._pointerDown,Jy),wt(this._renderer,n,"dragstart",this._nativeDragStart,Rh)]),this._initialTransform=void 0,this._rootElement=n),typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(e){return this._boundaryElement=e?Ut(e):null,this._resizeSubscription.unsubscribe(),e&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(e){return this._parentDragRef=e,this}dispose(){this._removeRootElementListeners(),this.isDragging()&&this._rootElement?.remove(),this._anchor?.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeListeners(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._anchor=this._parentDragRef=null}isDragging(){return this._hasStartedDragging()&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}disableHandle(e){!this._disabledHandles.has(e)&&this._handles.indexOf(e)>-1&&(this._disabledHandles.add(e),ci(e,!0))}enableHandle(e){this._disabledHandles.has(e)&&(this._disabledHandles.delete(e),ci(e,this.disabled))}withDirection(e){return this._direction=e,this}_withDropContainer(e){this._dropContainer=e}getFreeDragPosition(){let e=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:e.x,y:e.y}}setFreeDragPosition(e){return this._activeTransform={x:0,y:0},this._passiveTransform.x=e.x,this._passiveTransform.y=e.y,this._dropContainer||this._applyRootElementTransform(e.x,e.y),this}withPreviewContainer(e){return this._previewContainer=e,this}_sortFromLastPointerPosition(){let e=this._lastKnownPointerPosition;e&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(e),e)}_removeListeners(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe(),this._cleanupShadowRootSelectStart?.(),this._cleanupShadowRootSelectStart=void 0}_destroyPreview(){this._preview?.destroy(),this._preview=null}_destroyPlaceholder(){this._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._placeholderRef=null}_pointerDown=e=>{if(this.beforeStarted.next(),this._handles.length){let n=this._getTargetHandle(e);n&&!this._disabledHandles.has(n)&&!this.disabled&&this._initializeDragSequence(n,e)}else this.disabled||this._initializeDragSequence(this._rootElement,e)};_pointerMove=e=>{let n=this._getPointerPositionOnPage(e);if(!this._hasStartedDragging()){let i=Math.abs(n.x-this._pickupPositionOnPage.x),o=Math.abs(n.y-this._pickupPositionOnPage.y);if(i+o>=this._config.dragStartThreshold){let a=Date.now()>=this._dragStartTime+this._getDragStartDelay(e),u=this._dropContainer;if(!a){this._endDragSequence(e);return}(!u||!u.isDragging()&&!u.isReceiving())&&(e.cancelable&&e.preventDefault(),this._hasStartedDragging.set(!0),this._ngZone.run(()=>this._startDragSequence(e)))}return}e.cancelable&&e.preventDefault();let r=this._getConstrainedPointerPosition(n);if(this._hasMoved=!0,this._lastKnownPointerPosition=n,this._updatePointerDirectionDelta(r),this._dropContainer)this._updateActiveDropContainer(r,n);else{let i=this.constrainPosition?this._initialDomRect:this._pickupPositionOnPage,o=this._activeTransform;o.x=r.x-i.x+this._passiveTransform.x,o.y=r.y-i.y+this._passiveTransform.y,this._applyRootElementTransform(o.x,o.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:r,event:e,distance:this._getDragDistance(r),delta:this._pointerDirectionDelta})})};_pointerUp=e=>{this._endDragSequence(e)};_endDragSequence(e){if(this._dragDropRegistry.isDragging(this)&&(this._removeListeners(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),!!this._hasStartedDragging()))if(this.released.next({source:this,event:e}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(e),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;let n=this._getPointerPositionOnPage(e);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(n),dropPoint:n,event:e})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(e){zi(e)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();let n=this._getShadowRoot(),r=this._dropContainer;if(n&&this._ngZone.runOutsideAngular(()=>{this._cleanupShadowRootSelectStart=wt(this._renderer,n,"selectstart",t0,Qy)}),r){let i=this._rootElement,o=i.parentNode,s=this._placeholder=this._createPlaceholderElement(),a=this._anchor=this._anchor||this._document.createComment("");o.insertBefore(a,i),this._initialTransform=i.style.transform||"",this._preview=new El(this._document,this._rootElement,this._direction,this._initialDomRect,this._previewTemplate||null,this.previewClass||null,this._pickupPositionOnPage,this._initialTransform,this._config.zIndex||1e3,this._renderer),this._preview.attach(this._getPreviewInsertionPoint(o,n)),xh(i,!1,Ah),this._document.body.appendChild(o.replaceChild(s,i)),this.started.next({source:this,event:e}),r.start(),this._initialContainer=r,this._initialIndex=r.getItemIndex(this)}else this.started.next({source:this,event:e}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(r?r.getScrollableParents():[])}_initializeDragSequence(e,n){this._parentDragRef&&n.stopPropagation();let r=this.isDragging(),i=zi(n),o=!i&&n.button!==0,s=this._rootElement,a=Bt(n),u=!i&&this._lastTouchEventTime&&this._lastTouchEventTime+e0>Date.now(),d=i?Es(n):ys(n);if(a&&a.draggable&&n.type==="mousedown"&&n.preventDefault(),r||o||u||d)return;if(this._handles.length){let E=s.style;this._rootElementTapHighlight=E.webkitTapHighlightColor||"",E.webkitTapHighlightColor="transparent"}this._hasMoved=!1,this._hasStartedDragging.set(this._hasMoved),this._removeListeners(),this._initialDomRect=this._rootElement.getBoundingClientRect(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(E=>this._updateOnScroll(E)),this._boundaryElement&&(this._boundaryRect=Cl(this._boundaryElement));let m=this._previewTemplate;this._pickupPositionInElement=m&&m.template&&!m.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialDomRect,e,n);let h=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(n);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:h.x,y:h.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,n)}_cleanupDragArtifacts(e){xh(this._rootElement,!0,Ah),this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._initialDomRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{let n=this._dropContainer,r=n.getItemIndex(this),i=this._getPointerPositionOnPage(e),o=this._getDragDistance(i),s=n._isOverContainer(i.x,i.y);this.ended.next({source:this,distance:o,dropPoint:i,event:e}),this.dropped.next({item:this,currentIndex:r,previousIndex:this._initialIndex,container:n,previousContainer:this._initialContainer,isPointerOverContainer:s,distance:o,dropPoint:i,event:e}),n.drop(this,r,this._initialIndex,this._initialContainer,s,o,i,e),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:e,y:n},{x:r,y:i}){let o=this._initialContainer._getSiblingContainerFromPosition(this,e,n);!o&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(e,n)&&(o=this._initialContainer),o&&o!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=o,this._dropContainer.enter(this,e,n,o===this._initialContainer&&o.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:o,currentIndex:o.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(r,i),this._dropContainer._sortItem(this,e,n,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(e,n):this._applyPreviewTransform(e-this._pickupPositionInElement.x,n-this._pickupPositionInElement.y))}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();let e=this._placeholder.getBoundingClientRect();this._preview.addClass("cdk-drag-animating"),this._applyPreviewTransform(e.left,e.top);let n=this._preview.getTransitionDuration();return n===0?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(r=>{let i=a=>{(!a||this._preview&&Bt(a)===this._preview.element&&a.propertyName==="transform")&&(s(),r(),clearTimeout(o))},o=setTimeout(i,n*1.5),s=this._preview.addEventListener("transitionend",i)}))}_createPlaceholderElement(){let e=this._placeholderTemplate,n=e?e.template:null,r;return n?(this._placeholderRef=e.viewContainer.createEmbeddedView(n,e.context),this._placeholderRef.detectChanges(),r=Fh(this._placeholderRef,this._document)):r=Lh(this._rootElement),r.style.pointerEvents="none",r.classList.add("cdk-drag-placeholder"),r}_getPointerPositionInElement(e,n,r){let i=n===this._rootElement?null:n,o=i?i.getBoundingClientRect():e,s=zi(r)?r.targetTouches[0]:r,a=this._getViewportScrollPosition(),u=s.pageX-o.left-a.left,d=s.pageY-o.top-a.top;return{x:o.left-e.left+u,y:o.top-e.top+d}}_getPointerPositionOnPage(e){let n=this._getViewportScrollPosition(),r=zi(e)?e.touches[0]||e.changedTouches[0]||{pageX:0,pageY:0}:e,i=r.pageX-n.left,o=r.pageY-n.top;if(this._ownerSVGElement){let s=this._ownerSVGElement.getScreenCTM();if(s){let a=this._ownerSVGElement.createSVGPoint();return a.x=i,a.y=o,a.matrixTransform(s.inverse())}}return{x:i,y:o}}_getConstrainedPointerPosition(e){let n=this._dropContainer?this._dropContainer.lockAxis:null,{x:r,y:i}=this.constrainPosition?this.constrainPosition(e,this,this._initialDomRect,this._pickupPositionInElement):e;if(this.lockAxis==="x"||n==="x"?i=this._pickupPositionOnPage.y-(this.constrainPosition?this._pickupPositionInElement.y:0):(this.lockAxis==="y"||n==="y")&&(r=this._pickupPositionOnPage.x-(this.constrainPosition?this._pickupPositionInElement.x:0)),this._boundaryRect){let{x:o,y:s}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,a=this._boundaryRect,{width:u,height:d}=this._getPreviewRect(),m=a.top+s,h=a.bottom-(d-s),E=a.left+o,S=a.right-(u-o);r=Nh(r,E,S),i=Nh(i,m,h)}return{x:r,y:i}}_updatePointerDirectionDelta(e){let{x:n,y:r}=e,i=this._pointerDirectionDelta,o=this._pointerPositionAtLastDirectionChange,s=Math.abs(n-o.x),a=Math.abs(r-o.y);return s>this._config.pointerDirectionChangeThreshold&&(i.x=n>o.x?1:-1,o.x=n),a>this._config.pointerDirectionChangeThreshold&&(i.y=r>o.y?1:-1,o.y=r),i}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;let e=this._handles.length>0||!this.isDragging();e!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=e,ci(this._rootElement,e))}_removeRootElementListeners(){this._rootElementCleanups?.forEach(e=>e()),this._rootElementCleanups=void 0}_applyRootElementTransform(e,n){let r=1/this.scale,i=Is(e*r,n*r),o=this._rootElement.style;this._initialTransform==null&&(this._initialTransform=o.transform&&o.transform!="none"?o.transform:""),o.transform=Cs(i,this._initialTransform)}_applyPreviewTransform(e,n){let r=this._previewTemplate?.template?void 0:this._initialTransform,i=Is(e,n);this._preview.setTransform(Cs(i,r))}_getDragDistance(e){let n=this._pickupPositionOnPage;return n?{x:e.x-n.x,y:e.y-n.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:e,y:n}=this._passiveTransform;if(e===0&&n===0||this.isDragging()||!this._boundaryElement)return;let r=this._rootElement.getBoundingClientRect(),i=this._boundaryElement.getBoundingClientRect();if(i.width===0&&i.height===0||r.width===0&&r.height===0)return;let o=i.left-r.left,s=r.right-i.right,a=i.top-r.top,u=r.bottom-i.bottom;i.width>r.width?(o>0&&(e+=o),s>0&&(e-=s)):e=0,i.height>r.height?(a>0&&(n+=a),u>0&&(n-=u)):n=0,(e!==this._passiveTransform.x||n!==this._passiveTransform.y)&&this.setFreeDragPosition({y:n,x:e})}_getDragStartDelay(e){let n=this.dragStartDelay;return typeof n=="number"?n:zi(e)?n.touch:n?n.mouse:0}_updateOnScroll(e){let n=this._parentPositions.handleScroll(e);if(n){let r=Bt(e);this._boundaryRect&&r!==this._boundaryElement&&r.contains(this._boundaryElement)&&Ki(this._boundaryRect,n.top,n.left),this._pickupPositionOnPage.x+=n.left,this._pickupPositionOnPage.y+=n.top,this._dropContainer||(this._activeTransform.x-=n.left,this._activeTransform.y-=n.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){return this._parentPositions.positions.get(this._document)?.scrollPosition||this._parentPositions.getViewportScrollPosition()}_getShadowRoot(){return this._cachedShadowRoot===void 0&&(this._cachedShadowRoot=ai(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(e,n){let r=this._previewContainer||"global";if(r==="parent")return e;if(r==="global"){let i=this._document;return n||i.fullscreenElement||i.webkitFullscreenElement||i.mozFullScreenElement||i.msFullscreenElement||i.body}return Ut(r)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialDomRect),this._previewRect}_nativeDragStart=e=>{if(this._handles.length){let n=this._getTargetHandle(e);n&&!this._disabledHandles.has(n)&&!this.disabled&&e.preventDefault()}else this.disabled||e.preventDefault()};_getTargetHandle(e){return this._handles.find(n=>e.target&&(e.target===n||n.contains(e.target)))}};function Nh(t,e,n){return Math.max(e,Math.min(n,t))}function zi(t){return t.type[0]==="t"}function t0(t){t.preventDefault()}function Vh(t,e,n){let r=Ph(e,t.length-1),i=Ph(n,t.length-1);if(r===i)return;let o=t[r],s=i<r?-1:1;for(let a=r;a!==i;a+=s)t[a]=t[a+s];t[i]=o}function Ph(t,e){return Math.max(0,Math.min(e,t))}var xs=class{_dragDropRegistry;_element;_sortPredicate;_itemPositions=[];_activeDraggables;orientation="vertical";direction;constructor(e){this._dragDropRegistry=e}_previousSwap={drag:null,delta:0,overlaps:!1};start(e){this.withItems(e)}sort(e,n,r,i){let o=this._itemPositions,s=this._getItemIndexFromPointerPosition(e,n,r,i);if(s===-1&&o.length>0)return null;let a=this.orientation==="horizontal",u=o.findIndex(P=>P.drag===e),d=o[s],m=o[u].clientRect,h=d.clientRect,E=u>s?1:-1,S=this._getItemOffsetPx(m,h,E),T=this._getSiblingOffsetPx(u,o,E),k=o.slice();return Vh(o,u,s),o.forEach((P,j)=>{if(k[j]===P)return;let Y=P.drag===e,ee=Y?S:T,K=Y?e.getPlaceholderElement():P.drag.getRootElement();P.offset+=ee;let ge=Math.round(P.offset*(1/P.drag.scale));a?(K.style.transform=Cs(`translate3d(${ge}px, 0, 0)`,P.initialTransform),Ki(P.clientRect,0,ee)):(K.style.transform=Cs(`translate3d(0, ${ge}px, 0)`,P.initialTransform),Ki(P.clientRect,ee,0))}),this._previousSwap.overlaps=yl(h,n,r),this._previousSwap.drag=d.drag,this._previousSwap.delta=a?i.x:i.y,{previousIndex:u,currentIndex:s}}enter(e,n,r,i){let o=i==null||i<0?this._getItemIndexFromPointerPosition(e,n,r):i,s=this._activeDraggables,a=s.indexOf(e),u=e.getPlaceholderElement(),d=s[o];if(d===e&&(d=s[o+1]),!d&&(o==null||o===-1||o<s.length-1)&&this._shouldEnterAsFirstChild(n,r)&&(d=s[0]),a>-1&&s.splice(a,1),d&&!this._dragDropRegistry.isDragging(d)){let m=d.getRootElement();m.parentElement.insertBefore(u,m),s.splice(o,0,e)}else this._element.appendChild(u),s.push(e);u.style.transform="",this._cacheItemPositions()}withItems(e){this._activeDraggables=e.slice(),this._cacheItemPositions()}withSortPredicate(e){this._sortPredicate=e}reset(){this._activeDraggables?.forEach(e=>{let n=e.getRootElement();if(n){let r=this._itemPositions.find(i=>i.drag===e)?.initialTransform;n.style.transform=r||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(e){return(this.orientation==="horizontal"&&this.direction==="rtl"?this._itemPositions.slice().reverse():this._itemPositions).findIndex(r=>r.drag===e)}updateOnScroll(e,n){this._itemPositions.forEach(({clientRect:r})=>{Ki(r,e,n)}),this._itemPositions.forEach(({drag:r})=>{this._dragDropRegistry.isDragging(r)&&r._sortFromLastPointerPosition()})}withElementContainer(e){this._element=e}_cacheItemPositions(){let e=this.orientation==="horizontal";this._itemPositions=this._activeDraggables.map(n=>{let r=n.getVisibleElement();return{drag:n,offset:0,initialTransform:r.style.transform||"",clientRect:Cl(r)}}).sort((n,r)=>e?n.clientRect.left-r.clientRect.left:n.clientRect.top-r.clientRect.top)}_getItemOffsetPx(e,n,r){let i=this.orientation==="horizontal",o=i?n.left-e.left:n.top-e.top;return r===-1&&(o+=i?n.width-e.width:n.height-e.height),o}_getSiblingOffsetPx(e,n,r){let i=this.orientation==="horizontal",o=n[e].clientRect,s=n[e+r*-1],a=o[i?"width":"height"]*r;if(s){let u=i?"left":"top",d=i?"right":"bottom";r===-1?a-=s.clientRect[u]-o[d]:a+=o[u]-s.clientRect[d]}return a}_shouldEnterAsFirstChild(e,n){if(!this._activeDraggables.length)return!1;let r=this._itemPositions,i=this.orientation==="horizontal";if(r[0].drag!==this._activeDraggables[0]){let s=r[r.length-1].clientRect;return i?e>=s.right:n>=s.bottom}else{let s=r[0].clientRect;return i?e<=s.left:n<=s.top}}_getItemIndexFromPointerPosition(e,n,r,i){let o=this.orientation==="horizontal",s=this._itemPositions.findIndex(({drag:a,clientRect:u})=>{if(a===e)return!1;if(i){let d=o?i.x:i.y;if(a===this._previousSwap.drag&&this._previousSwap.overlaps&&d===this._previousSwap.delta)return!1}return o?n>=Math.floor(u.left)&&n<Math.floor(u.right):r>=Math.floor(u.top)&&r<Math.floor(u.bottom)});return s===-1||!this._sortPredicate(s,e)?-1:s}},bl=class{_document;_dragDropRegistry;_element;_sortPredicate;_rootNode;_activeItems;_previousSwap={drag:null,deltaX:0,deltaY:0,overlaps:!1};_relatedNodes=[];constructor(e,n){this._document=e,this._dragDropRegistry=n}start(e){let n=this._element.childNodes;this._relatedNodes=[];for(let r=0;r<n.length;r++){let i=n[r];this._relatedNodes.push([i,i.nextSibling])}this.withItems(e)}sort(e,n,r,i){let o=this._getItemIndexFromPointerPosition(e,n,r),s=this._previousSwap;if(o===-1||this._activeItems[o]===e)return null;let a=this._activeItems[o];if(s.drag===a&&s.overlaps&&s.deltaX===i.x&&s.deltaY===i.y)return null;let u=this.getItemIndex(e),d=e.getPlaceholderElement(),m=a.getRootElement();o>u?m.after(d):m.before(d),Vh(this._activeItems,u,o);let h=this._getRootNode().elementFromPoint(n,r);return s.deltaX=i.x,s.deltaY=i.y,s.drag=a,s.overlaps=m===h||m.contains(h),{previousIndex:u,currentIndex:o}}enter(e,n,r,i){let o=i==null||i<0?this._getItemIndexFromPointerPosition(e,n,r):i;o===-1&&(o=this._getClosestItemIndexToPointer(e,n,r));let s=this._activeItems[o],a=this._activeItems.indexOf(e);a>-1&&this._activeItems.splice(a,1),s&&!this._dragDropRegistry.isDragging(s)?(this._activeItems.splice(o,0,e),s.getRootElement().before(e.getPlaceholderElement())):(this._activeItems.push(e),this._element.appendChild(e.getPlaceholderElement()))}withItems(e){this._activeItems=e.slice()}withSortPredicate(e){this._sortPredicate=e}reset(){let e=this._element,n=this._previousSwap;for(let r=this._relatedNodes.length-1;r>-1;r--){let[i,o]=this._relatedNodes[r];i.parentNode===e&&i.nextSibling!==o&&(o===null?e.appendChild(i):o.parentNode===e&&e.insertBefore(i,o))}this._relatedNodes=[],this._activeItems=[],n.drag=null,n.deltaX=n.deltaY=0,n.overlaps=!1}getActiveItemsSnapshot(){return this._activeItems}getItemIndex(e){return this._activeItems.indexOf(e)}updateOnScroll(){this._activeItems.forEach(e=>{this._dragDropRegistry.isDragging(e)&&e._sortFromLastPointerPosition()})}withElementContainer(e){e!==this._element&&(this._element=e,this._rootNode=void 0)}_getItemIndexFromPointerPosition(e,n,r){let i=this._getRootNode().elementFromPoint(Math.floor(n),Math.floor(r)),o=i?this._activeItems.findIndex(s=>{let a=s.getRootElement();return i===a||a.contains(i)}):-1;return o===-1||!this._sortPredicate(o,e)?-1:o}_getRootNode(){return this._rootNode||(this._rootNode=ai(this._element)||this._document),this._rootNode}_getClosestItemIndexToPointer(e,n,r){if(this._activeItems.length===0)return-1;if(this._activeItems.length===1)return 0;let i=1/0,o=-1;for(let s=0;s<this._activeItems.length;s++){let a=this._activeItems[s];if(a!==e){let{x:u,y:d}=a.getRootElement().getBoundingClientRect(),m=Math.hypot(n-u,r-d);m<i&&(i=m,o=s)}}return o}},Mh=.05,Bh=.05,cn=function(t){return t[t.NONE=0]="NONE",t[t.UP=1]="UP",t[t.DOWN=2]="DOWN",t}(cn||{}),Ft=function(t){return t[t.NONE=0]="NONE",t[t.LEFT=1]="LEFT",t[t.RIGHT=2]="RIGHT",t}(Ft||{}),Sl=class{_dragDropRegistry;_ngZone;_viewportRuler;element;disabled=!1;sortingDisabled=!1;lockAxis;autoScrollDisabled=!1;autoScrollStep=2;enterPredicate=()=>!0;sortPredicate=()=>!0;beforeStarted=new we;entered=new we;exited=new we;dropped=new we;sorted=new we;receivingStarted=new we;receivingStopped=new we;data;_container;_isDragging=!1;_parentPositions;_sortStrategy;_domRect;_draggables=[];_siblings=[];_activeSiblings=new Set;_viewportScrollSubscription=Jt.EMPTY;_verticalScrollDirection=cn.NONE;_horizontalScrollDirection=Ft.NONE;_scrollNode;_stopScrollTimers=new we;_cachedShadowRoot=null;_document;_scrollableElements=[];_initialScrollSnap;_direction="ltr";constructor(e,n,r,i,o){this._dragDropRegistry=n,this._ngZone=i,this._viewportRuler=o;let s=this.element=Ut(e);this._document=r,this.withOrientation("vertical").withElementContainer(s),n.registerDropContainer(this),this._parentPositions=new Ss(r)}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this.receivingStarted.complete(),this.receivingStopped.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(e,n,r,i){this._draggingStarted(),i==null&&this.sortingDisabled&&(i=this._draggables.indexOf(e)),this._sortStrategy.enter(e,n,r,i),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:e,container:this,currentIndex:this.getItemIndex(e)})}exit(e){this._reset(),this.exited.next({item:e,container:this})}drop(e,n,r,i,o,s,a,u={}){this._reset(),this.dropped.next({item:e,currentIndex:n,previousIndex:r,container:this,previousContainer:i,isPointerOverContainer:o,distance:s,dropPoint:a,event:u})}withItems(e){let n=this._draggables;return this._draggables=e,e.forEach(r=>r._withDropContainer(this)),this.isDragging()&&(n.filter(i=>i.isDragging()).every(i=>e.indexOf(i)===-1)?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(e){return this._direction=e,this._sortStrategy instanceof xs&&(this._sortStrategy.direction=e),this}connectedTo(e){return this._siblings=e.slice(),this}withOrientation(e){if(e==="mixed")this._sortStrategy=new bl(this._document,this._dragDropRegistry);else{let n=new xs(this._dragDropRegistry);n.direction=this._direction,n.orientation=e,this._sortStrategy=n}return this._sortStrategy.withElementContainer(this._container),this._sortStrategy.withSortPredicate((n,r)=>this.sortPredicate(n,r,this)),this}withScrollableParents(e){let n=this._container;return this._scrollableElements=e.indexOf(n)===-1?[n,...e]:e.slice(),this}withElementContainer(e){if(e===this._container)return this;let n=Ut(this.element),r=this._scrollableElements.indexOf(this._container),i=this._scrollableElements.indexOf(e);return r>-1&&this._scrollableElements.splice(r,1),i>-1&&this._scrollableElements.splice(i,1),this._sortStrategy&&this._sortStrategy.withElementContainer(e),this._cachedShadowRoot=null,this._scrollableElements.unshift(e),this._container=e,this}getScrollableParents(){return this._scrollableElements}getItemIndex(e){return this._isDragging?this._sortStrategy.getItemIndex(e):this._draggables.indexOf(e)}isReceiving(){return this._activeSiblings.size>0}_sortItem(e,n,r,i){if(this.sortingDisabled||!this._domRect||!Ih(this._domRect,Mh,n,r))return;let o=this._sortStrategy.sort(e,n,r,i);o&&this.sorted.next({previousIndex:o.previousIndex,currentIndex:o.currentIndex,container:this,item:e})}_startScrollingIfNecessary(e,n){if(this.autoScrollDisabled)return;let r,i=cn.NONE,o=Ft.NONE;if(this._parentPositions.positions.forEach((s,a)=>{a===this._document||!s.clientRect||r||Ih(s.clientRect,Mh,e,n)&&([i,o]=n0(a,s.clientRect,this._direction,e,n),(i||o)&&(r=a))}),!i&&!o){let{width:s,height:a}=this._viewportRuler.getViewportSize(),u={width:s,height:a,top:0,right:s,bottom:a,left:0};i=Uh(u,n),o=Hh(u,e),r=window}r&&(i!==this._verticalScrollDirection||o!==this._horizontalScrollDirection||r!==this._scrollNode)&&(this._verticalScrollDirection=i,this._horizontalScrollDirection=o,this._scrollNode=r,(i||o)&&r?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){let e=this._container.style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=e.msScrollSnapType||e.scrollSnapType||"",e.scrollSnapType=e.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){this._parentPositions.cache(this._scrollableElements),this._domRect=this._parentPositions.positions.get(this._container).clientRect}_reset(){this._isDragging=!1;let e=this._container.style;e.scrollSnapType=e.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(n=>n._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_startScrollInterval=()=>{this._stopScrolling(),iu(0,Ys).pipe(ln(this._stopScrollTimers)).subscribe(()=>{let e=this._scrollNode,n=this.autoScrollStep;this._verticalScrollDirection===cn.UP?e.scrollBy(0,-n):this._verticalScrollDirection===cn.DOWN&&e.scrollBy(0,n),this._horizontalScrollDirection===Ft.LEFT?e.scrollBy(-n,0):this._horizontalScrollDirection===Ft.RIGHT&&e.scrollBy(n,0)})};_isOverContainer(e,n){return this._domRect!=null&&yl(this._domRect,e,n)}_getSiblingContainerFromPosition(e,n,r){return this._siblings.find(i=>i._canReceive(e,n,r))}_canReceive(e,n,r){if(!this._domRect||!yl(this._domRect,n,r)||!this.enterPredicate(e,this))return!1;let i=this._getShadowRoot().elementFromPoint(n,r);return i?i===this._container||this._container.contains(i):!1}_startReceiving(e,n){let r=this._activeSiblings;!r.has(e)&&n.every(i=>this.enterPredicate(i,this)||this._draggables.indexOf(i)>-1)&&(r.add(e),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:e,receiver:this,items:n}))}_stopReceiving(e){this._activeSiblings.delete(e),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:e,receiver:this})}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(e=>{if(this.isDragging()){let n=this._parentPositions.handleScroll(e);n&&this._sortStrategy.updateOnScroll(n.top,n.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){let e=ai(this._container);this._cachedShadowRoot=e||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){let e=this._sortStrategy.getActiveItemsSnapshot().filter(n=>n.isDragging());this._siblings.forEach(n=>n._startReceiving(this,e))}};function Uh(t,e){let{top:n,bottom:r,height:i}=t,o=i*Bh;return e>=n-o&&e<=n+o?cn.UP:e>=r-o&&e<=r+o?cn.DOWN:cn.NONE}function Hh(t,e){let{left:n,right:r,width:i}=t,o=i*Bh;return e>=n-o&&e<=n+o?Ft.LEFT:e>=r-o&&e<=r+o?Ft.RIGHT:Ft.NONE}function n0(t,e,n,r,i){let o=Uh(e,i),s=Hh(e,r),a=cn.NONE,u=Ft.NONE;if(o){let d=t.scrollTop;o===cn.UP?d>0&&(a=cn.UP):t.scrollHeight-d>t.clientHeight&&(a=cn.DOWN)}if(s){let d=t.scrollLeft;n==="rtl"?s===Ft.RIGHT?d<0&&(u=Ft.RIGHT):t.scrollWidth+d>t.clientWidth&&(u=Ft.LEFT):s===Ft.LEFT?d>0&&(u=Ft.LEFT):t.scrollWidth-d>t.clientWidth&&(u=Ft.RIGHT)}return[a,u]}var Yi={capture:!0},vl={passive:!1,capture:!0},r0=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Te({type:t,selectors:[["ng-component"]],hostAttrs:["cdk-drag-resets-container",""],decls:0,vars:0,template:function(r,i){},styles:[`@layer cdk-resets{.cdk-drag-preview{background:none;border:none;padding:0;color:inherit;inset:auto}}.cdk-drag-placeholder *,.cdk-drag-preview *{pointer-events:none !important}
35
- `],encapsulation:2,changeDetection:0})}return t})(),jh=(()=>{class t{_ngZone=N(ot);_document=N(nt);_styleLoader=N(br);_renderer=N(Qt).createRenderer(null,null);_cleanupDocumentTouchmove;_dropInstances=new Set;_dragInstances=new Set;_activeDragInstances=Tt([]);_globalListeners;_draggingPredicate=n=>n.isDragging();_domNodesToDirectives=null;pointerMove=new we;pointerUp=new we;scroll=new we;constructor(){}registerDropContainer(n){this._dropInstances.has(n)||this._dropInstances.add(n)}registerDragItem(n){this._dragInstances.add(n),this._dragInstances.size===1&&this._ngZone.runOutsideAngular(()=>{this._cleanupDocumentTouchmove?.(),this._cleanupDocumentTouchmove=wt(this._renderer,this._document,"touchmove",this._persistentTouchmoveListener,vl)})}removeDropContainer(n){this._dropInstances.delete(n)}removeDragItem(n){this._dragInstances.delete(n),this.stopDragging(n),this._dragInstances.size===0&&this._cleanupDocumentTouchmove?.()}startDragging(n,r){if(!(this._activeDragInstances().indexOf(n)>-1)&&(this._styleLoader.load(r0),this._activeDragInstances.update(i=>[...i,n]),this._activeDragInstances().length===1)){let i=r.type.startsWith("touch"),o=a=>this.pointerUp.next(a),s=[["scroll",a=>this.scroll.next(a),Yi],["selectstart",this._preventDefaultWhileDragging,vl]];i?s.push(["touchend",o,Yi],["touchcancel",o,Yi]):s.push(["mouseup",o,Yi]),i||s.push(["mousemove",a=>this.pointerMove.next(a),vl]),this._ngZone.runOutsideAngular(()=>{this._globalListeners=s.map(([a,u,d])=>wt(this._renderer,this._document,a,u,d))})}}stopDragging(n){this._activeDragInstances.update(r=>{let i=r.indexOf(n);return i>-1?(r.splice(i,1),[...r]):r}),this._activeDragInstances().length===0&&this._clearGlobalListeners()}isDragging(n){return this._activeDragInstances().indexOf(n)>-1}scrolled(n){let r=[this.scroll];return n&&n!==this._document&&r.push(new rr(i=>this._ngZone.runOutsideAngular(()=>{let o=wt(this._renderer,n,"scroll",s=>{this._activeDragInstances().length&&i.next(s)},Yi);return()=>{o()}}))),ir(...r)}registerDirectiveNode(n,r){this._domNodesToDirectives??=new WeakMap,this._domNodesToDirectives.set(n,r)}removeDirectiveNode(n){this._domNodesToDirectives?.delete(n)}getDragDirectiveForNode(n){return this._domNodesToDirectives?.get(n)||null}ngOnDestroy(){this._dragInstances.forEach(n=>this.removeDragItem(n)),this._dropInstances.forEach(n=>this.removeDropContainer(n)),this._domNodesToDirectives=null,this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_preventDefaultWhileDragging=n=>{this._activeDragInstances().length>0&&n.preventDefault()};_persistentTouchmoveListener=n=>{this._activeDragInstances().length>0&&(this._activeDragInstances().some(this._draggingPredicate)&&n.preventDefault(),this.pointerMove.next(n))};_clearGlobalListeners(){this._globalListeners?.forEach(n=>n()),this._globalListeners=void 0}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Pe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),i0={dragStartThreshold:5,pointerDirectionChangeThreshold:5},o0=(()=>{class t{_document=N(nt);_ngZone=N(ot);_viewportRuler=N(Wi);_dragDropRegistry=N(jh);_renderer=N(Qt).createRenderer(null,null);constructor(){}createDrag(n,r=i0){return new wl(n,r,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry,this._renderer)}createDropList(n){return new Sl(n,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Pe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),kh=new ft("CDK_DRAG_PARENT");var s0=new ft("CdkDragHandle");var a0=new ft("CDK_DRAG_CONFIG"),c0=new ft("CdkDropList"),$h=(()=>{class t{element=N(ut);dropContainer=N(c0,{optional:!0,skipSelf:!0});_ngZone=N(ot);_viewContainerRef=N(Nr);_dir=N(Sr,{optional:!0});_changeDetectorRef=N(Sn);_selfHandle=N(s0,{optional:!0,self:!0});_parentDrag=N(kh,{optional:!0,skipSelf:!0});_dragDropRegistry=N(jh);_destroyed=new we;_handles=new to([]);_previewTemplate;_placeholderTemplate;_dragRef;data;lockAxis;rootElementSelector;boundaryElement;dragStartDelay;freeDragPosition;get disabled(){return this._disabled||!!(this.dropContainer&&this.dropContainer.disabled)}set disabled(n){this._disabled=n,this._dragRef.disabled=this._disabled}_disabled;constrainPosition;previewClass;previewContainer;scale=1;started=new He;released=new He;ended=new He;entered=new He;exited=new He;dropped=new He;moved=new rr(n=>{let r=this._dragRef.moved.pipe(tu(i=>({source:this,pointerPosition:i.pointerPosition,event:i.event,delta:i.delta,distance:i.distance}))).subscribe(n);return()=>{r.unsubscribe()}});_injector=N(ht);constructor(){let n=this.dropContainer,r=N(a0,{optional:!0}),i=N(o0);this._dragRef=i.createDrag(this.element,{dragStartThreshold:r&&r.dragStartThreshold!=null?r.dragStartThreshold:5,pointerDirectionChangeThreshold:r&&r.pointerDirectionChangeThreshold!=null?r.pointerDirectionChangeThreshold:5,zIndex:r?.zIndex}),this._dragRef.data=this,this._dragDropRegistry.registerDirectiveNode(this.element.nativeElement,this),r&&this._assignDefaults(r),n&&(this._dragRef._withDropContainer(n._dropListRef),n.addItem(this),n._dropListRef.beforeStarted.pipe(ln(this._destroyed)).subscribe(()=>{this._dragRef.scale=this.scale})),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}getPlaceholderElement(){return this._dragRef.getPlaceholderElement()}getRootElement(){return this._dragRef.getRootElement()}reset(){this._dragRef.reset()}getFreeDragPosition(){return this._dragRef.getFreeDragPosition()}setFreeDragPosition(n){this._dragRef.setFreeDragPosition(n)}ngAfterViewInit(){Vn(()=>{this._updateRootElement(),this._setupHandlesListener(),this._dragRef.scale=this.scale,this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)},{injector:this._injector})}ngOnChanges(n){let r=n.rootElementSelector,i=n.freeDragPosition;r&&!r.firstChange&&this._updateRootElement(),this._dragRef.scale=this.scale,i&&!i.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this),this._dragDropRegistry.removeDirectiveNode(this.element.nativeElement),this._ngZone.runOutsideAngular(()=>{this._handles.complete(),this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()})}_addHandle(n){let r=this._handles.getValue();r.push(n),this._handles.next(r)}_removeHandle(n){let r=this._handles.getValue(),i=r.indexOf(n);i>-1&&(r.splice(i,1),this._handles.next(r))}_setPreviewTemplate(n){this._previewTemplate=n}_resetPreviewTemplate(n){n===this._previewTemplate&&(this._previewTemplate=null)}_setPlaceholderTemplate(n){this._placeholderTemplate=n}_resetPlaceholderTemplate(n){n===this._placeholderTemplate&&(this._placeholderTemplate=null)}_updateRootElement(){let n=this.element.nativeElement,r=n;this.rootElementSelector&&(r=n.closest!==void 0?n.closest(this.rootElementSelector):n.parentElement?.closest(this.rootElementSelector)),this._dragRef.withRootElement(r||n)}_getBoundaryElement(){let n=this.boundaryElement;return n?typeof n=="string"?this.element.nativeElement.closest(n):Ut(n):null}_syncInputs(n){n.beforeStarted.subscribe(()=>{if(!n.isDragging()){let r=this._dir,i=this.dragStartDelay,o=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,s=this._previewTemplate?{template:this._previewTemplate.templateRef,context:this._previewTemplate.data,matchSize:this._previewTemplate.matchSize,viewContainer:this._viewContainerRef}:null;n.disabled=this.disabled,n.lockAxis=this.lockAxis,n.scale=this.scale,n.dragStartDelay=typeof i=="object"&&i?i:fl(i),n.constrainPosition=this.constrainPosition,n.previewClass=this.previewClass,n.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(o).withPreviewTemplate(s).withPreviewContainer(this.previewContainer||"global"),r&&n.withDirection(r.value)}}),n.beforeStarted.pipe(ou(1)).subscribe(()=>{if(this._parentDrag){n.withParent(this._parentDrag._dragRef);return}let r=this.element.nativeElement.parentElement;for(;r;){let i=this._dragDropRegistry.getDragDirectiveForNode(r);if(i){n.withParent(i._dragRef);break}r=r.parentElement}})}_handleEvents(n){n.started.subscribe(r=>{this.started.emit({source:this,event:r.event}),this._changeDetectorRef.markForCheck()}),n.released.subscribe(r=>{this.released.emit({source:this,event:r.event})}),n.ended.subscribe(r=>{this.ended.emit({source:this,distance:r.distance,dropPoint:r.dropPoint,event:r.event}),this._changeDetectorRef.markForCheck()}),n.entered.subscribe(r=>{this.entered.emit({container:r.container.data,item:this,currentIndex:r.currentIndex})}),n.exited.subscribe(r=>{this.exited.emit({container:r.container.data,item:this})}),n.dropped.subscribe(r=>{this.dropped.emit({previousIndex:r.previousIndex,currentIndex:r.currentIndex,previousContainer:r.previousContainer.data,container:r.container.data,isPointerOverContainer:r.isPointerOverContainer,item:this,distance:r.distance,dropPoint:r.dropPoint,event:r.event})})}_assignDefaults(n){let{lockAxis:r,dragStartDelay:i,constrainPosition:o,previewClass:s,boundaryElement:a,draggingDisabled:u,rootElementSelector:d,previewContainer:m}=n;this.disabled=u??!1,this.dragStartDelay=i||0,r&&(this.lockAxis=r),o&&(this.constrainPosition=o),s&&(this.previewClass=s),a&&(this.boundaryElement=a),d&&(this.rootElementSelector=d),m&&(this.previewContainer=m)}_setupHandlesListener(){this._handles.pipe(au(n=>{let r=n.map(i=>i.element);this._selfHandle&&this.rootElementSelector&&r.push(this.element),this._dragRef.withHandles(r)}),yi(n=>ir(...n.map(r=>r._stateChanges.pipe(vi(r))))),ln(this._destroyed)).subscribe(n=>{let r=this._dragRef,i=n.element.nativeElement;n.disabled?r.disableHandle(i):r.enableHandle(i)})}static \u0275fac=function(r){return new(r||t)};static \u0275dir=Un({type:t,selectors:[["","cdkDrag",""]],hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(r,i){r&2&&En("cdk-drag-disabled",i.disabled)("cdk-drag-dragging",i._dragRef.isDragging())},inputs:{data:[0,"cdkDragData","data"],lockAxis:[0,"cdkDragLockAxis","lockAxis"],rootElementSelector:[0,"cdkDragRootElement","rootElementSelector"],boundaryElement:[0,"cdkDragBoundary","boundaryElement"],dragStartDelay:[0,"cdkDragStartDelay","dragStartDelay"],freeDragPosition:[0,"cdkDragFreeDragPosition","freeDragPosition"],disabled:[2,"cdkDragDisabled","disabled",kr],constrainPosition:[0,"cdkDragConstrainPosition","constrainPosition"],previewClass:[0,"cdkDragPreviewClass","previewClass"],previewContainer:[0,"cdkDragPreviewContainer","previewContainer"],scale:[2,"cdkDragScale","scale",Cu]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],features:[wi([{provide:kh,useExisting:t}]),Rr]})}return t})();var l0=t=>({"lc:cursor-grab":t}),u0=(t,e)=>e.url;function d0(t,e){if(t&1&&Ie(0,"source",11),t&2){let n=e.$implicit;Hn("type",n.mimeType),be("src",n.url,vt)}}var Ds=class t{constructor(e){this.elementRef=e}video;closeClicked=new He;videoClicked=new He;isDragging=!1;ngOnInit(){let e=this.elementRef.nativeElement.parentElement.parentElement;e.style.zIndex="2147483647"}close(){this.closeClicked.emit()}onVideoClick(){if(this.isDragging){this.isDragging=!1;return}this.videoClicked.emit()}static \u0275fac=function(n){return new(n||t)(dn(ut))};static \u0275cmp=Te({type:t,selectors:[["cooee-draggable-video-popup"]],inputs:{video:"video"},outputs:{closeClicked:"closeClicked",videoClicked:"videoClicked"},decls:14,vars:5,consts:[["role","button","tabindex","0","cdkDrag","",1,"lc-popup-inner","lc:shadow-2xl","lc:rounded-lg","lc:flex","lc:justify-center","lc:items-center",3,"click","keyup","cdkDragMoved","ngClass","cdkDragBoundary"],[1,"lc-close-button","lc:absolute","lc:-top-3.5","lc:-right-3.5","lc:bg-black/50","lc:rounded-full","lc:w-8","lc:h-8","lc:border-none","lc:z-10","lc:flex","lc:justify-center","lc:items-center",3,"click"],["xmlns","http://www.w3.org/2000/svg","height","24px","viewBox","0 0 24 24","width","24px","fill","#fff"],["d","M0 0h24v24H0V0z","fill","none"],["d","M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"],[1,"lc-play-button"],[1,"lc-icon"],["viewBox","0 0 28.31 30"],["d","M19.15,1.29A1.24,1.24,0,0,0,17.82.15a1.36,1.36,0,0,0-.35.07,3.2,3.2,0,0,0-.65.46l-5.06,4.6a1.24,1.24,0,0,0,0,1.75l0,0a1.22,1.22,0,0,0,.89.39,1.25,1.25,0,0,0,.85-.32l3-2.78.17-.13v8l2.44,2.62ZM26.79,26.6l-7.64-7.93-2.5-2.58-6-6.34L8.9,8,5.23,4.15a1.17,1.17,0,0,0-1.66,0h0a1.18,1.18,0,0,0,0,1.66h0L6.1,8.47H3.32a2.94,2.94,0,0,0-2.45,3v7.16a3,3,0,0,0,2.86,3.08H8.07a.44.44,0,0,1,.33.13C9.7,23,11,24.19,12.26,25.36L17,29.7a1.24,1.24,0,0,0,2.17-1V22.21l5.95,6.15a1.2,1.2,0,0,0,1.67,0,1.17,1.17,0,0,0,.08-1.66Zm-10.14-.67-.18-.11L9.75,19.67a1.72,1.72,0,0,0-1.16-.45H4c-.48,0-.59-.11-.59-.61V11.55c0-.49,0-.6.59-.6H8.29l8.29,8.55ZM29.09,15.07A9.9,9.9,0,0,1,26.33,22l-.11.13a1.24,1.24,0,0,1-2-.28,1.29,1.29,0,0,1,.24-1.52h0a6.77,6.77,0,0,0,1.32-1.89,7.41,7.41,0,0,0-1.37-8.55,1.24,1.24,0,0,1-.08-1.75,1.33,1.33,0,0,1,.41-.29,1.19,1.19,0,0,1,1.34.2A8.88,8.88,0,0,1,28,10.36a10,10,0,0,1,1.17,4.17A3.35,3.35,0,0,1,29.09,15.07Z","transform","translate(-0.86 -0.14)","fill","#191919"],[1,"lc-text"],["loop","","preload","auto","playsinline","","autoplay","",1,"lc:rounded-lg","lc:w-full",3,"muted"],[3,"src","type"]],template:function(n,r){n&1&&(X(0,"div",0),Me("click",function(){return r.onVideoClick()})("keyup",function(){return r.onVideoClick()})("cdkDragMoved",function(){return r.isDragging=!0}),X(1,"button",1),Me("click",function(o){return o.stopPropagation(),r.close()}),Gt(),X(2,"svg",2),Ie(3,"path",3)(4,"path",4),q()(),or(),X(5,"div",5)(6,"div",6),Gt(),X(7,"svg",7),Ie(8,"path",8),q()(),or(),X(9,"div",9),Oe(10,"Tap to unmute"),q()(),X(11,"video",10),et(12,d0,1,2,"source",11,u0),q()()),n&2&&(be("ngClass",oo(3,l0,r.isDragging))("cdkDragBoundary","body"),W(11),be("muted",!0),W(),tt(r.video.sources))},dependencies:[Jn,$h],styles:["[_nghost-%COMP%]{position:fixed;display:block;right:24px;bottom:24px;max-width:150px}.lc-play-button[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%) scale(1);transition:all .1s ease-in-out;z-index:999;flex-wrap:wrap;width:100%;max-width:130px;border-radius:5px;padding:5px 10px;background-color:#97979761;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.lc-play-button[_ngcontent-%COMP%] .lc-icon[_ngcontent-%COMP%]{width:14px;height:14px}.lc-play-button[_ngcontent-%COMP%] path[_ngcontent-%COMP%]{fill:#fff}.lc-play-button[_ngcontent-%COMP%] .lc-text[_ngcontent-%COMP%]{font-size:11px;line-height:1;color:#fff;font-weight:400;margin-left:5px;text-align:center}"]})};var Xi=class{_attachedHost;attach(e){return this._attachedHost=e,e.attach(this)}detach(){let e=this._attachedHost;e!=null&&(this._attachedHost=null,e.detach())}get isAttached(){return this._attachedHost!=null}setAttachedHost(e){this._attachedHost=e}},li=class extends Xi{component;viewContainerRef;injector;componentFactoryResolver;projectableNodes;constructor(e,n,r,i,o){super(),this.component=e,this.viewContainerRef=n,this.injector=r,this.projectableNodes=o}},ui=class extends Xi{templateRef;viewContainerRef;context;injector;constructor(e,n,r,i){super(),this.templateRef=e,this.viewContainerRef=n,this.context=r,this.injector=i}get origin(){return this.templateRef.elementRef}attach(e,n=this.context){return this.context=n,super.attach(e)}detach(){return this.context=void 0,super.detach()}},xl=class extends Xi{element;constructor(e){super(),this.element=e instanceof ut?e.nativeElement:e}},di=class{_attachedPortal;_disposeFn;_isDisposed=!1;hasAttached(){return!!this._attachedPortal}attach(e){if(e instanceof li)return this._attachedPortal=e,this.attachComponentPortal(e);if(e instanceof ui)return this._attachedPortal=e,this.attachTemplatePortal(e);if(this.attachDomPortal&&e instanceof xl)return this._attachedPortal=e,this.attachDomPortal(e)}attachDomPortal=null;detach(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}dispose(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}setDisposeFn(e){this._disposeFn=e}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}};var Ts=class extends di{outletElement;_appRef;_defaultInjector;_document;constructor(e,n,r,i,o){super(),this.outletElement=e,this._appRef=r,this._defaultInjector=i,this._document=o}attachComponentPortal(e){let n;if(e.viewContainerRef){let r=e.injector||e.viewContainerRef.injector,i=r.get(Js,null,{optional:!0})||void 0;n=e.viewContainerRef.createComponent(e.component,{index:e.viewContainerRef.length,injector:r,ngModuleRef:i,projectableNodes:e.projectableNodes||void 0}),this.setDisposeFn(()=>n.destroy())}else{let r=this._appRef,i=e.injector||this._defaultInjector||ht.NULL,o=i.get(Or,r.injector);n=ao(e.component,{elementInjector:i,environmentInjector:o,projectableNodes:e.projectableNodes||void 0}),r.attachView(n.hostView),this.setDisposeFn(()=>{r.viewCount>0&&r.detachView(n.hostView),n.destroy()})}return this.outletElement.appendChild(this._getComponentRootNode(n)),this._attachedPortal=e,n}attachTemplatePortal(e){let n=e.viewContainerRef,r=n.createEmbeddedView(e.templateRef,e.context,{injector:e.injector});return r.rootNodes.forEach(i=>this.outletElement.appendChild(i)),r.detectChanges(),this.setDisposeFn(()=>{let i=n.indexOf(r);i!==-1&&n.remove(i)}),this._attachedPortal=e,r}attachDomPortal=e=>{let n=e.element;n.parentNode;let r=this._document.createComment("dom-portal");n.parentNode.insertBefore(r,n),this.outletElement.appendChild(n),this._attachedPortal=e,super.setDisposeFn(()=>{r.parentNode&&r.parentNode.replaceChild(n,r)})};dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(e){return e.hostView.rootNodes[0]}};var Dl=(()=>{class t extends di{_moduleRef=N(Js,{optional:!0});_document=N(nt);_viewContainerRef=N(Nr);_isInitialized=!1;_attachedRef;constructor(){super()}get portal(){return this._attachedPortal}set portal(n){this.hasAttached()&&!n&&!this._isInitialized||(this.hasAttached()&&super.detach(),n&&super.attach(n),this._attachedPortal=n||null)}attached=new He;get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedRef=this._attachedPortal=null}attachComponentPortal(n){n.setAttachedHost(this);let r=n.viewContainerRef!=null?n.viewContainerRef:this._viewContainerRef,i=r.createComponent(n.component,{index:r.length,injector:n.injector||r.injector,projectableNodes:n.projectableNodes||void 0,ngModuleRef:this._moduleRef||void 0});return r!==this._viewContainerRef&&this._getRootNode().appendChild(i.hostView.rootNodes[0]),super.setDisposeFn(()=>i.destroy()),this._attachedPortal=n,this._attachedRef=i,this.attached.emit(i),i}attachTemplatePortal(n){n.setAttachedHost(this);let r=this._viewContainerRef.createEmbeddedView(n.templateRef,n.context,{injector:n.injector});return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=n,this._attachedRef=r,this.attached.emit(r),r}attachDomPortal=n=>{let r=n.element;r.parentNode;let i=this._document.createComment("dom-portal");n.setAttachedHost(this),r.parentNode.insertBefore(i,r),this._getRootNode().appendChild(r),this._attachedPortal=n,super.setDisposeFn(()=>{i.parentNode&&i.parentNode.replaceChild(r,i)})};_getRootNode(){let n=this._viewContainerRef.element.nativeElement;return n.nodeType===n.ELEMENT_NODE?n:n.parentNode}static \u0275fac=function(r){return new(r||t)};static \u0275dir=Un({type:t,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:[0,"cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[bt]})}return t})();var qi;function f0(){if(qi==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>qi=!0}))}finally{qi=qi||!1}return qi}function Gh(t){return f0()?t:!!t.capture}var h0=new ft("cdk-input-modality-detector-options"),p0={ignoreKeys:[18,17,224,91,16]},Wh=650,Tl={passive:!0,capture:!0},m0=(()=>{class t{_platform=N(Ht);_listenerCleanups;modalityDetected;modalityChanged;get mostRecentModality(){return this._modality.value}_mostRecentTarget=null;_modality=new to(null);_options;_lastTouchMs=0;_onKeydown=n=>{this._options?.ignoreKeys?.some(r=>r===n.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=Bt(n))};_onMousedown=n=>{Date.now()-this._lastTouchMs<Wh||(this._modality.next(ys(n)?"keyboard":"mouse"),this._mostRecentTarget=Bt(n))};_onTouchstart=n=>{if(Es(n)){this._modality.next("keyboard");return}this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=Bt(n)};constructor(){let n=N(ot),r=N(nt),i=N(h0,{optional:!0});if(this._options=O(O({},p0),i),this.modalityDetected=this._modality.pipe(su(1)),this.modalityChanged=this.modalityDetected.pipe(qs()),this._platform.isBrowser){let o=N(Qt).createRenderer(null,null);this._listenerCleanups=n.runOutsideAngular(()=>[wt(o,r,"keydown",this._onKeydown,Tl),wt(o,r,"mousedown",this._onMousedown,Tl),wt(o,r,"touchstart",this._onTouchstart,Tl)])}}ngOnDestroy(){this._modality.complete(),this._listenerCleanups?.forEach(n=>n())}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Pe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Rs=function(t){return t[t.IMMEDIATE=0]="IMMEDIATE",t[t.EVENTUAL=1]="EVENTUAL",t}(Rs||{}),g0=new ft("cdk-focus-monitor-default-options"),Os=Gh({passive:!0,capture:!0}),zh=(()=>{class t{_ngZone=N(ot);_platform=N(Ht);_inputModalityDetector=N(m0);_origin=null;_lastFocusOrigin;_windowFocused=!1;_windowFocusTimeoutId;_originTimeoutId;_originFromTouchInteraction=!1;_elementInfo=new Map;_monitoredElementCount=0;_rootNodeFocusListenerCount=new Map;_detectionMode;_windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=setTimeout(()=>this._windowFocused=!1)};_document=N(nt,{optional:!0});_stopInputModalityDetector=new we;constructor(){let n=N(g0,{optional:!0});this._detectionMode=n?.detectionMode||Rs.IMMEDIATE}_rootNodeFocusAndBlurListener=n=>{let r=Bt(n);for(let i=r;i;i=i.parentElement)n.type==="focus"?this._onFocus(n,i):this._onBlur(n,i)};monitor(n,r=!1){let i=Ut(n);if(!this._platform.isBrowser||i.nodeType!==1)return Tr();let o=ai(i)||this._getDocument(),s=this._elementInfo.get(i);if(s)return r&&(s.checkChildren=!0),s.subject;let a={checkChildren:r,subject:new we,rootNode:o};return this._elementInfo.set(i,a),this._registerGlobalListeners(a),a.subject}stopMonitoring(n){let r=Ut(n),i=this._elementInfo.get(r);i&&(i.subject.complete(),this._setClasses(r),this._elementInfo.delete(r),this._removeGlobalListeners(i))}focusVia(n,r,i){let o=Ut(n),s=this._getDocument().activeElement;o===s?this._getClosestElementsInfo(o).forEach(([a,u])=>this._originChanged(a,r,u)):(this._setOrigin(r),typeof o.focus=="function"&&o.focus(i))}ngOnDestroy(){this._elementInfo.forEach((n,r)=>this.stopMonitoring(r))}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_getFocusOrigin(n){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(n)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:n&&this._isLastInteractionFromInputLabel(n)?"mouse":"program"}_shouldBeAttributedToTouch(n){return this._detectionMode===Rs.EVENTUAL||!!n?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(n,r){n.classList.toggle("cdk-focused",!!r),n.classList.toggle("cdk-touch-focused",r==="touch"),n.classList.toggle("cdk-keyboard-focused",r==="keyboard"),n.classList.toggle("cdk-mouse-focused",r==="mouse"),n.classList.toggle("cdk-program-focused",r==="program")}_setOrigin(n,r=!1){this._ngZone.runOutsideAngular(()=>{if(this._origin=n,this._originFromTouchInteraction=n==="touch"&&r,this._detectionMode===Rs.IMMEDIATE){clearTimeout(this._originTimeoutId);let i=this._originFromTouchInteraction?Wh:1;this._originTimeoutId=setTimeout(()=>this._origin=null,i)}})}_onFocus(n,r){let i=this._elementInfo.get(r),o=Bt(n);!i||!i.checkChildren&&r!==o||this._originChanged(r,this._getFocusOrigin(o),i)}_onBlur(n,r){let i=this._elementInfo.get(r);!i||i.checkChildren&&n.relatedTarget instanceof Node&&r.contains(n.relatedTarget)||(this._setClasses(r),this._emitOrigin(i,null))}_emitOrigin(n,r){n.subject.observers.length&&this._ngZone.run(()=>n.subject.next(r))}_registerGlobalListeners(n){if(!this._platform.isBrowser)return;let r=n.rootNode,i=this._rootNodeFocusListenerCount.get(r)||0;i||this._ngZone.runOutsideAngular(()=>{r.addEventListener("focus",this._rootNodeFocusAndBlurListener,Os),r.addEventListener("blur",this._rootNodeFocusAndBlurListener,Os)}),this._rootNodeFocusListenerCount.set(r,i+1),++this._monitoredElementCount===1&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(ln(this._stopInputModalityDetector)).subscribe(o=>{this._setOrigin(o,!0)}))}_removeGlobalListeners(n){let r=n.rootNode;if(this._rootNodeFocusListenerCount.has(r)){let i=this._rootNodeFocusListenerCount.get(r);i>1?this._rootNodeFocusListenerCount.set(r,i-1):(r.removeEventListener("focus",this._rootNodeFocusAndBlurListener,Os),r.removeEventListener("blur",this._rootNodeFocusAndBlurListener,Os),this._rootNodeFocusListenerCount.delete(r))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(n,r,i){this._setClasses(n,r),this._emitOrigin(i,r),this._lastFocusOrigin=r}_getClosestElementsInfo(n){let r=[];return this._elementInfo.forEach((i,o)=>{(o===n||i.checkChildren&&o.contains(n))&&r.push([o,i])}),r}_isLastInteractionFromInputLabel(n){let{_mostRecentTarget:r,mostRecentModality:i}=this._inputModalityDetector;if(i!=="mouse"||!r||r===n||n.nodeName!=="INPUT"&&n.nodeName!=="TEXTAREA"||n.disabled)return!1;let o=n.labels;if(o){for(let s=0;s<o.length;s++)if(o[s].contains(r))return!0}return!1}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Pe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Yh=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Te({type:t,selectors:[["ng-component"]],exportAs:["cdkVisuallyHidden"],decls:0,vars:0,template:function(r,i){},styles:[`.cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none;left:0}[dir=rtl] .cdk-visually-hidden{left:auto;right:0}
36
- `],encapsulation:2,changeDetection:0})}return t})();var Rl=(()=>{class t{_platform=N(Ht);constructor(){}isDisabled(n){return n.hasAttribute("disabled")}isVisible(n){return v0(n)&&getComputedStyle(n).visibility==="visible"}isTabbable(n){if(!this._platform.isBrowser)return!1;let r=_0(x0(n));if(r&&(Kh(r)===-1||!this.isVisible(r)))return!1;let i=n.nodeName.toLowerCase(),o=Kh(n);return n.hasAttribute("contenteditable")?o!==-1:i==="iframe"||i==="object"||this._platform.WEBKIT&&this._platform.IOS&&!C0(n)?!1:i==="audio"?n.hasAttribute("controls")?o!==-1:!1:i==="video"?o===-1?!1:o!==null?!0:this._platform.FIREFOX||n.hasAttribute("controls"):n.tabIndex>=0}isFocusable(n,r){return I0(n)&&!this.isDisabled(n)&&(r?.ignoreVisibility||this.isVisible(n))}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Pe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function _0(t){try{return t.frameElement}catch{return null}}function v0(t){return!!(t.offsetWidth||t.offsetHeight||typeof t.getClientRects=="function"&&t.getClientRects().length)}function y0(t){let e=t.nodeName.toLowerCase();return e==="input"||e==="select"||e==="button"||e==="textarea"}function E0(t){return b0(t)&&t.type=="hidden"}function w0(t){return S0(t)&&t.hasAttribute("href")}function b0(t){return t.nodeName.toLowerCase()=="input"}function S0(t){return t.nodeName.toLowerCase()=="a"}function Xh(t){if(!t.hasAttribute("tabindex")||t.tabIndex===void 0)return!1;let e=t.getAttribute("tabindex");return!!(e&&!isNaN(parseInt(e,10)))}function Kh(t){if(!Xh(t))return null;let e=parseInt(t.getAttribute("tabindex")||"",10);return isNaN(e)?-1:e}function C0(t){let e=t.nodeName.toLowerCase(),n=e==="input"&&t.type;return n==="text"||n==="password"||e==="select"||e==="textarea"}function I0(t){return E0(t)?!1:y0(t)||w0(t)||t.hasAttribute("contenteditable")||Xh(t)}function x0(t){return t.ownerDocument&&t.ownerDocument.defaultView||window}var Ol=class{_element;_checker;_ngZone;_document;_injector;_startAnchor;_endAnchor;_hasAttached=!1;startAnchorListener=()=>this.focusLastTabbableElement();endAnchorListener=()=>this.focusFirstTabbableElement();get enabled(){return this._enabled}set enabled(e){this._enabled=e,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(e,this._startAnchor),this._toggleAnchorTabIndex(e,this._endAnchor))}_enabled=!0;constructor(e,n,r,i,o=!1,s){this._element=e,this._checker=n,this._ngZone=r,this._document=i,this._injector=s,o||this.attachAnchors()}destroy(){let e=this._startAnchor,n=this._endAnchor;e&&(e.removeEventListener("focus",this.startAnchorListener),e.remove()),n&&(n.removeEventListener("focus",this.endAnchorListener),n.remove()),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return this._hasAttached?!0:(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(e){return new Promise(n=>{this._executeOnStable(()=>n(this.focusInitialElement(e)))})}focusFirstTabbableElementWhenReady(e){return new Promise(n=>{this._executeOnStable(()=>n(this.focusFirstTabbableElement(e)))})}focusLastTabbableElementWhenReady(e){return new Promise(n=>{this._executeOnStable(()=>n(this.focusLastTabbableElement(e)))})}_getRegionBoundary(e){let n=this._element.querySelectorAll(`[cdk-focus-region-${e}], [cdkFocusRegion${e}], [cdk-focus-${e}]`);return e=="start"?n.length?n[0]:this._getFirstTabbableElement(this._element):n.length?n[n.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(e){let n=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(n){if(!this._checker.isFocusable(n)){let r=this._getFirstTabbableElement(n);return r?.focus(e),!!r}return n.focus(e),!0}return this.focusFirstTabbableElement(e)}focusFirstTabbableElement(e){let n=this._getRegionBoundary("start");return n&&n.focus(e),!!n}focusLastTabbableElement(e){let n=this._getRegionBoundary("end");return n&&n.focus(e),!!n}hasAttached(){return this._hasAttached}_getFirstTabbableElement(e){if(this._checker.isFocusable(e)&&this._checker.isTabbable(e))return e;let n=e.children;for(let r=0;r<n.length;r++){let i=n[r].nodeType===this._document.ELEMENT_NODE?this._getFirstTabbableElement(n[r]):null;if(i)return i}return null}_getLastTabbableElement(e){if(this._checker.isFocusable(e)&&this._checker.isTabbable(e))return e;let n=e.children;for(let r=n.length-1;r>=0;r--){let i=n[r].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(n[r]):null;if(i)return i}return null}_createAnchor(){let e=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,e),e.classList.add("cdk-visually-hidden"),e.classList.add("cdk-focus-trap-anchor"),e.setAttribute("aria-hidden","true"),e}_toggleAnchorTabIndex(e,n){e?n.setAttribute("tabindex","0"):n.removeAttribute("tabindex")}toggleAnchors(e){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(e,this._startAnchor),this._toggleAnchorTabIndex(e,this._endAnchor))}_executeOnStable(e){this._injector?Vn(e,{injector:this._injector}):setTimeout(e)}},qh=(()=>{class t{_checker=N(Rl);_ngZone=N(ot);_document=N(nt);_injector=N(ht);constructor(){N(br).load(Yh)}create(n,r=!1){return new Ol(n,this._checker,this._ngZone,this._document,r,this._injector)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Pe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Al(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}function ct(t){return t==null?"":typeof t=="string"?t:`${t}px`}function Zh(t,...e){return e.length?e.some(n=>t[n]):t.altKey||t.shiftKey||t.ctrlKey||t.metaKey}var Jh=wh(),Nl=class{_viewportRuler;_previousHTMLStyles={top:"",left:""};_previousScrollPosition;_isEnabled=!1;_document;constructor(e,n){this._viewportRuler=e,this._document=n}attach(){}enable(){if(this._canBeEnabled()){let e=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=e.style.left||"",this._previousHTMLStyles.top=e.style.top||"",e.style.left=ct(-this._previousScrollPosition.left),e.style.top=ct(-this._previousScrollPosition.top),e.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){let e=this._document.documentElement,n=this._document.body,r=e.style,i=n.style,o=r.scrollBehavior||"",s=i.scrollBehavior||"";this._isEnabled=!1,r.left=this._previousHTMLStyles.left,r.top=this._previousHTMLStyles.top,e.classList.remove("cdk-global-scrollblock"),Jh&&(r.scrollBehavior=i.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),Jh&&(r.scrollBehavior=o,i.scrollBehavior=s)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;let n=this._document.documentElement,r=this._viewportRuler.getViewportSize();return n.scrollHeight>r.height||n.scrollWidth>r.width}};var Pl=class{_scrollDispatcher;_ngZone;_viewportRuler;_config;_scrollSubscription=null;_overlayRef;_initialScrollPosition;constructor(e,n,r,i){this._scrollDispatcher=e,this._ngZone=n,this._viewportRuler=r,this._config=i}attach(e){this._overlayRef,this._overlayRef=e}enable(){if(this._scrollSubscription)return;let e=this._scrollDispatcher.scrolled(0).pipe(no(n=>!n||!this._overlayRef.overlayElement.contains(n.getElementRef().nativeElement)));this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=e.subscribe(()=>{let n=this._viewportRuler.getViewportScrollPosition().top;Math.abs(n-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=e.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}_detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}},As=class{enable(){}disable(){}attach(){}};function Ml(t,e){return e.some(n=>{let r=t.bottom<n.top,i=t.top>n.bottom,o=t.right<n.left,s=t.left>n.right;return r||i||o||s})}function Qh(t,e){return e.some(n=>{let r=t.top<n.top,i=t.bottom>n.bottom,o=t.left<n.left,s=t.right>n.right;return r||i||o||s})}var kl=class{_scrollDispatcher;_viewportRuler;_ngZone;_config;_scrollSubscription=null;_overlayRef;constructor(e,n,r,i){this._scrollDispatcher=e,this._viewportRuler=n,this._ngZone=r,this._config=i}attach(e){this._overlayRef,this._overlayRef=e}enable(){if(!this._scrollSubscription){let e=this._config?this._config.scrollThrottle:0;this._scrollSubscription=this._scrollDispatcher.scrolled(e).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){let n=this._overlayRef.overlayElement.getBoundingClientRect(),{width:r,height:i}=this._viewportRuler.getViewportSize();Ml(n,[{width:r,height:i,bottom:i,right:r,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}})}}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}},T0=(()=>{class t{_scrollDispatcher=N(pl);_viewportRuler=N(Wi);_ngZone=N(ot);_document=N(nt);constructor(){}noop=()=>new As;close=n=>new Pl(this._scrollDispatcher,this._ngZone,this._viewportRuler,n);block=()=>new Nl(this._viewportRuler,this._document);reposition=n=>new kl(this._scrollDispatcher,this._viewportRuler,this._ngZone,n);static \u0275fac=function(r){return new(r||t)};static \u0275prov=Pe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Zi=class{positionStrategy;scrollStrategy=new As;panelClass="";hasBackdrop=!1;backdropClass="cdk-overlay-dark-backdrop";width;height;minWidth;minHeight;maxWidth;maxHeight;direction;disposeOnNavigation=!1;constructor(e){if(e){let n=Object.keys(e);for(let r of n)e[r]!==void 0&&(this[r]=e[r])}}};var Ll=class{connectionPair;scrollableViewProperties;constructor(e,n){this.connectionPair=e,this.scrollableViewProperties=n}};var op=(()=>{class t{_attachedOverlays=[];_document=N(nt);_isAttached;constructor(){}ngOnDestroy(){this.detach()}add(n){this.remove(n),this._attachedOverlays.push(n)}remove(n){let r=this._attachedOverlays.indexOf(n);r>-1&&this._attachedOverlays.splice(r,1),this._attachedOverlays.length===0&&this.detach()}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Pe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),O0=(()=>{class t extends op{_ngZone=N(ot);_renderer=N(Qt).createRenderer(null,null);_cleanupKeydown;add(n){super.add(n),this._isAttached||(this._ngZone.runOutsideAngular(()=>{this._cleanupKeydown=this._renderer.listen("body","keydown",this._keydownListener)}),this._isAttached=!0)}detach(){this._isAttached&&(this._cleanupKeydown?.(),this._isAttached=!1)}_keydownListener=n=>{let r=this._attachedOverlays;for(let i=r.length-1;i>-1;i--)if(r[i]._keydownEvents.observers.length>0){this._ngZone.run(()=>r[i]._keydownEvents.next(n));break}};static \u0275fac=(()=>{let n;return function(i){return(n||(n=Ei(t)))(i||t)}})();static \u0275prov=Pe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),R0=(()=>{class t extends op{_platform=N(Ht);_ngZone=N(ot);_renderer=N(Qt).createRenderer(null,null);_cursorOriginalValue;_cursorStyleIsSet=!1;_pointerDownEventTarget;_cleanups;add(n){if(super.add(n),!this._isAttached){let r=this._document.body,i={capture:!0};this._cleanups=this._ngZone.runOutsideAngular(()=>[wt(this._renderer,r,"pointerdown",this._pointerDownListener,i),wt(this._renderer,r,"click",this._clickListener,i),wt(this._renderer,r,"auxclick",this._clickListener,i),wt(this._renderer,r,"contextmenu",this._clickListener,i)]),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=r.style.cursor,r.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}detach(){this._isAttached&&(this._cleanups?.forEach(n=>n()),this._cleanups=void 0,this._platform.IOS&&this._cursorStyleIsSet&&(this._document.body.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1)}_pointerDownListener=n=>{this._pointerDownEventTarget=Bt(n)};_clickListener=n=>{let r=Bt(n),i=n.type==="click"&&this._pointerDownEventTarget?this._pointerDownEventTarget:r;this._pointerDownEventTarget=null;let o=this._attachedOverlays.slice();for(let s=o.length-1;s>-1;s--){let a=o[s];if(a._outsidePointerEvents.observers.length<1||!a.hasAttached())continue;if(ep(a.overlayElement,r)||ep(a.overlayElement,i))break;let u=a._outsidePointerEvents;this._ngZone?this._ngZone.run(()=>u.next(n)):u.next(n)}};static \u0275fac=(()=>{let n;return function(i){return(n||(n=Ei(t)))(i||t)}})();static \u0275prov=Pe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function ep(t,e){let n=typeof ShadowRoot<"u"&&ShadowRoot,r=e;for(;r;){if(r===t)return!0;r=n&&r instanceof ShadowRoot?r.host:r.parentNode}return!1}var sp=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Te({type:t,selectors:[["ng-component"]],hostAttrs:["cdk-overlay-style-loader",""],decls:0,vars:0,template:function(r,i){},styles:[`.cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed}@layer cdk-overlay{.cdk-overlay-container{z-index:1000}}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute}@layer cdk-overlay{.cdk-global-overlay-wrapper{z-index:1000}}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;display:flex;max-width:100%;max-height:100%}@layer cdk-overlay{.cdk-overlay-pane{z-index:1000}}.cdk-overlay-backdrop{position:absolute;top:0;bottom:0;left:0;right:0;pointer-events:auto;-webkit-tap-highlight-color:rgba(0,0,0,0);opacity:0}@layer cdk-overlay{.cdk-overlay-backdrop{z-index:1000;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}}@media(prefers-reduced-motion){.cdk-overlay-backdrop{transition-duration:1ms}}.cdk-overlay-backdrop-showing{opacity:1}@media(forced-colors: active){.cdk-overlay-backdrop-showing{opacity:.6}}@layer cdk-overlay{.cdk-overlay-dark-backdrop{background:rgba(0,0,0,.32)}}.cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing,.cdk-high-contrast-active .cdk-overlay-transparent-backdrop{opacity:0;visibility:visible}.cdk-overlay-backdrop-noop-animation{transition:none}.cdk-overlay-connected-position-bounding-box{position:absolute;display:flex;flex-direction:column;min-width:1px;min-height:1px}@layer cdk-overlay{.cdk-overlay-connected-position-bounding-box{z-index:1000}}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}
37
- `],encapsulation:2,changeDetection:0})}return t})(),Ns=(()=>{class t{_platform=N(Ht);_containerElement;_document=N(nt);_styleLoader=N(br);constructor(){}ngOnDestroy(){this._containerElement?.remove()}getContainerElement(){return this._loadStyles(),this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let n="cdk-overlay-container";if(this._platform.isBrowser||Al()){let i=this._document.querySelectorAll(`.${n}[platform="server"], .${n}[platform="test"]`);for(let o=0;o<i.length;o++)i[o].remove()}let r=this._document.createElement("div");r.classList.add(n),Al()?r.setAttribute("platform","test"):this._platform.isBrowser||r.setAttribute("platform","server"),this._document.body.appendChild(r),this._containerElement=r}_loadStyles(){this._styleLoader.load(sp)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Pe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Fl=class{_renderer;_ngZone;element;_cleanupClick;_cleanupTransitionEnd;_fallbackTimeout;constructor(e,n,r,i){this._renderer=n,this._ngZone=r,this.element=e.createElement("div"),this.element.classList.add("cdk-overlay-backdrop"),this._cleanupClick=n.listen(this.element,"click",i)}detach(){this._ngZone.runOutsideAngular(()=>{let e=this.element;clearTimeout(this._fallbackTimeout),this._cleanupTransitionEnd?.(),this._cleanupTransitionEnd=this._renderer.listen(e,"transitionend",this.dispose),this._fallbackTimeout=setTimeout(this.dispose,500),e.style.pointerEvents="none",e.classList.remove("cdk-overlay-backdrop-showing")})}dispose=()=>{clearTimeout(this._fallbackTimeout),this._cleanupClick?.(),this._cleanupTransitionEnd?.(),this._cleanupClick=this._cleanupTransitionEnd=this._fallbackTimeout=void 0,this.element.remove()}},fi=class{_portalOutlet;_host;_pane;_config;_ngZone;_keyboardDispatcher;_document;_location;_outsideClickDispatcher;_animationsDisabled;_injector;_renderer;_backdropClick=new we;_attachments=new we;_detachments=new we;_positionStrategy;_scrollStrategy;_locationChanges=Jt.EMPTY;_backdropRef=null;_previousHostParent;_keydownEvents=new we;_outsidePointerEvents=new we;_renders=new we;_afterRenderRef;_afterNextRenderRef;constructor(e,n,r,i,o,s,a,u,d,m=!1,h,E){this._portalOutlet=e,this._host=n,this._pane=r,this._config=i,this._ngZone=o,this._keyboardDispatcher=s,this._document=a,this._location=u,this._outsideClickDispatcher=d,this._animationsDisabled=m,this._injector=h,this._renderer=E,i.scrollStrategy&&(this._scrollStrategy=i.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=i.positionStrategy,this._afterRenderRef=ta(()=>gu(()=>{this._renders.next()},{injector:this._injector}))}get overlayElement(){return this._pane}get backdropElement(){return this._backdropRef?.element||null}get hostElement(){return this._host}attach(e){!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host);let n=this._portalOutlet.attach(e);return this._positionStrategy&&this._positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._afterNextRenderRef?.destroy(),this._afterNextRenderRef=Vn(()=>{this.hasAttached()&&this.updatePosition()},{injector:this._injector}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),typeof n?.onDestroy=="function"&&n.onDestroy(()=>{this.hasAttached()&&this._ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>this.detach()))}),n}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();let e=this._portalOutlet.detach();return this._detachments.next(),this._keyboardDispatcher.remove(this),this._detachContentWhenEmpty(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),e}dispose(){let e=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this._backdropRef?.dispose(),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),this._host?.remove(),this._afterNextRenderRef?.destroy(),this._previousHostParent=this._pane=this._host=this._backdropRef=null,e&&this._detachments.next(),this._detachments.complete(),this._afterRenderRef.destroy(),this._renders.complete()}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(e){e!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=e,this.hasAttached()&&(e.attach(this),this.updatePosition()))}updateSize(e){this._config=O(O({},this._config),e),this._updateElementSize()}setDirection(e){this._config=xe(O({},this._config),{direction:e}),this._updateElementDirection()}addPanelClass(e){this._pane&&this._toggleClasses(this._pane,e,!0)}removePanelClass(e){this._pane&&this._toggleClasses(this._pane,e,!1)}getDirection(){let e=this._config.direction;return e?typeof e=="string"?e:e.value:"ltr"}updateScrollStrategy(e){e!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=e,this.hasAttached()&&(e.attach(this),e.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;let e=this._pane.style;e.width=ct(this._config.width),e.height=ct(this._config.height),e.minWidth=ct(this._config.minWidth),e.minHeight=ct(this._config.minHeight),e.maxWidth=ct(this._config.maxWidth),e.maxHeight=ct(this._config.maxHeight)}_togglePointerEvents(e){this._pane.style.pointerEvents=e?"":"none"}_attachBackdrop(){let e="cdk-overlay-backdrop-showing";this._backdropRef?.dispose(),this._backdropRef=new Fl(this._document,this._renderer,this._ngZone,n=>{this._backdropClick.next(n)}),this._animationsDisabled&&this._backdropRef.element.classList.add("cdk-overlay-backdrop-noop-animation"),this._config.backdropClass&&this._toggleClasses(this._backdropRef.element,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropRef.element,this._host),!this._animationsDisabled&&typeof requestAnimationFrame<"u"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>this._backdropRef?.element.classList.add(e))}):this._backdropRef.element.classList.add(e)}_updateStackingOrder(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){this._animationsDisabled?(this._backdropRef?.dispose(),this._backdropRef=null):this._backdropRef?.detach()}_toggleClasses(e,n,r){let i=gl(n||[]).filter(o=>!!o);i.length&&(r?e.classList.add(...i):e.classList.remove(...i))}_detachContentWhenEmpty(){this._ngZone.runOutsideAngular(()=>{let e=this._renders.pipe(ln(ir(this._attachments,this._detachments))).subscribe(()=>{(!this._pane||!this._host||this._pane.children.length===0)&&(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._host.remove()),e.unsubscribe())})})}_disposeScrollStrategy(){let e=this._scrollStrategy;e?.disable(),e?.detach?.()}},tp="cdk-overlay-connected-position-bounding-box",A0=/([A-Za-z%]+)$/,Vl=class{_viewportRuler;_document;_platform;_overlayContainer;_overlayRef;_isInitialRender;_lastBoundingBoxSize={width:0,height:0};_isPushed=!1;_canPush=!0;_growAfterOpen=!1;_hasFlexibleDimensions=!0;_positionLocked=!1;_originRect;_overlayRect;_viewportRect;_containerRect;_viewportMargin=0;_scrollables=[];_preferredPositions=[];_origin;_pane;_isDisposed;_boundingBox;_lastPosition;_lastScrollVisibility;_positionChanges=new we;_resizeSubscription=Jt.EMPTY;_offsetX=0;_offsetY=0;_transformOriginSelector;_appliedPanelClasses=[];_previousPushAmount;positionChanges=this._positionChanges;get positions(){return this._preferredPositions}constructor(e,n,r,i,o){this._viewportRuler=n,this._document=r,this._platform=i,this._overlayContainer=o,this.setOrigin(e)}attach(e){this._overlayRef&&this._overlayRef,this._validatePositions(),e.hostElement.classList.add(tp),this._overlayRef=e,this._boundingBox=e.hostElement,this._pane=e.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition){this.reapplyLastPosition();return}this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let e=this._originRect,n=this._overlayRect,r=this._viewportRect,i=this._containerRect,o=[],s;for(let a of this._preferredPositions){let u=this._getOriginPoint(e,i,a),d=this._getOverlayPoint(u,n,a),m=this._getOverlayFit(d,n,r,a);if(m.isCompletelyWithinViewport){this._isPushed=!1,this._applyPosition(a,u);return}if(this._canFitWithFlexibleDimensions(m,d,r)){o.push({position:a,origin:u,overlayRect:n,boundingBoxRect:this._calculateBoundingBoxRect(u,a)});continue}(!s||s.overlayFit.visibleArea<m.visibleArea)&&(s={overlayFit:m,overlayPoint:d,originPoint:u,position:a,overlayRect:n})}if(o.length){let a=null,u=-1;for(let d of o){let m=d.boundingBoxRect.width*d.boundingBoxRect.height*(d.position.weight||1);m>u&&(u=m,a=d)}this._isPushed=!1,this._applyPosition(a.position,a.origin);return}if(this._canPush){this._isPushed=!0,this._applyPosition(s.position,s.originPoint);return}this._applyPosition(s.position,s.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&Ir(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(tp),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(this._isDisposed||!this._platform.isBrowser)return;let e=this._lastPosition;if(e){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let n=this._getOriginPoint(this._originRect,this._containerRect,e);this._applyPosition(e,n)}else this.apply()}withScrollableContainers(e){return this._scrollables=e,this}withPositions(e){return this._preferredPositions=e,e.indexOf(this._lastPosition)===-1&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(e){return this._viewportMargin=e,this}withFlexibleDimensions(e=!0){return this._hasFlexibleDimensions=e,this}withGrowAfterOpen(e=!0){return this._growAfterOpen=e,this}withPush(e=!0){return this._canPush=e,this}withLockedPosition(e=!0){return this._positionLocked=e,this}setOrigin(e){return this._origin=e,this}withDefaultOffsetX(e){return this._offsetX=e,this}withDefaultOffsetY(e){return this._offsetY=e,this}withTransformOriginOn(e){return this._transformOriginSelector=e,this}_getOriginPoint(e,n,r){let i;if(r.originX=="center")i=e.left+e.width/2;else{let s=this._isRtl()?e.right:e.left,a=this._isRtl()?e.left:e.right;i=r.originX=="start"?s:a}n.left<0&&(i-=n.left);let o;return r.originY=="center"?o=e.top+e.height/2:o=r.originY=="top"?e.top:e.bottom,n.top<0&&(o-=n.top),{x:i,y:o}}_getOverlayPoint(e,n,r){let i;r.overlayX=="center"?i=-n.width/2:r.overlayX==="start"?i=this._isRtl()?-n.width:0:i=this._isRtl()?0:-n.width;let o;return r.overlayY=="center"?o=-n.height/2:o=r.overlayY=="top"?0:-n.height,{x:e.x+i,y:e.y+o}}_getOverlayFit(e,n,r,i){let o=rp(n),{x:s,y:a}=e,u=this._getOffset(i,"x"),d=this._getOffset(i,"y");u&&(s+=u),d&&(a+=d);let m=0-s,h=s+o.width-r.width,E=0-a,S=a+o.height-r.height,T=this._subtractOverflows(o.width,m,h),k=this._subtractOverflows(o.height,E,S),P=T*k;return{visibleArea:P,isCompletelyWithinViewport:o.width*o.height===P,fitsInViewportVertically:k===o.height,fitsInViewportHorizontally:T==o.width}}_canFitWithFlexibleDimensions(e,n,r){if(this._hasFlexibleDimensions){let i=r.bottom-n.y,o=r.right-n.x,s=np(this._overlayRef.getConfig().minHeight),a=np(this._overlayRef.getConfig().minWidth),u=e.fitsInViewportVertically||s!=null&&s<=i,d=e.fitsInViewportHorizontally||a!=null&&a<=o;return u&&d}return!1}_pushOverlayOnScreen(e,n,r){if(this._previousPushAmount&&this._positionLocked)return{x:e.x+this._previousPushAmount.x,y:e.y+this._previousPushAmount.y};let i=rp(n),o=this._viewportRect,s=Math.max(e.x+i.width-o.width,0),a=Math.max(e.y+i.height-o.height,0),u=Math.max(o.top-r.top-e.y,0),d=Math.max(o.left-r.left-e.x,0),m=0,h=0;return i.width<=o.width?m=d||-s:m=e.x<this._viewportMargin?o.left-r.left-e.x:0,i.height<=o.height?h=u||-a:h=e.y<this._viewportMargin?o.top-r.top-e.y:0,this._previousPushAmount={x:m,y:h},{x:e.x+m,y:e.y+h}}_applyPosition(e,n){if(this._setTransformOrigin(e),this._setOverlayElementStyles(n,e),this._setBoundingBoxStyles(n,e),e.panelClass&&this._addPanelClasses(e.panelClass),this._positionChanges.observers.length){let r=this._getScrollVisibility();if(e!==this._lastPosition||!this._lastScrollVisibility||!N0(this._lastScrollVisibility,r)){let i=new Ll(e,r);this._positionChanges.next(i)}this._lastScrollVisibility=r}this._lastPosition=e,this._isInitialRender=!1}_setTransformOrigin(e){if(!this._transformOriginSelector)return;let n=this._boundingBox.querySelectorAll(this._transformOriginSelector),r,i=e.overlayY;e.overlayX==="center"?r="center":this._isRtl()?r=e.overlayX==="start"?"right":"left":r=e.overlayX==="start"?"left":"right";for(let o=0;o<n.length;o++)n[o].style.transformOrigin=`${r} ${i}`}_calculateBoundingBoxRect(e,n){let r=this._viewportRect,i=this._isRtl(),o,s,a;if(n.overlayY==="top")s=e.y,o=r.height-s+this._viewportMargin;else if(n.overlayY==="bottom")a=r.height-e.y+this._viewportMargin*2,o=r.height-a+this._viewportMargin;else{let S=Math.min(r.bottom-e.y+r.top,e.y),T=this._lastBoundingBoxSize.height;o=S*2,s=e.y-S,o>T&&!this._isInitialRender&&!this._growAfterOpen&&(s=e.y-T/2)}let u=n.overlayX==="start"&&!i||n.overlayX==="end"&&i,d=n.overlayX==="end"&&!i||n.overlayX==="start"&&i,m,h,E;if(d)E=r.width-e.x+this._viewportMargin*2,m=e.x-this._viewportMargin;else if(u)h=e.x,m=r.right-e.x;else{let S=Math.min(r.right-e.x+r.left,e.x),T=this._lastBoundingBoxSize.width;m=S*2,h=e.x-S,m>T&&!this._isInitialRender&&!this._growAfterOpen&&(h=e.x-T/2)}return{top:s,left:h,bottom:a,right:E,width:m,height:o}}_setBoundingBoxStyles(e,n){let r=this._calculateBoundingBoxRect(e,n);!this._isInitialRender&&!this._growAfterOpen&&(r.height=Math.min(r.height,this._lastBoundingBoxSize.height),r.width=Math.min(r.width,this._lastBoundingBoxSize.width));let i={};if(this._hasExactPosition())i.top=i.left="0",i.bottom=i.right=i.maxHeight=i.maxWidth="",i.width=i.height="100%";else{let o=this._overlayRef.getConfig().maxHeight,s=this._overlayRef.getConfig().maxWidth;i.height=ct(r.height),i.top=ct(r.top),i.bottom=ct(r.bottom),i.width=ct(r.width),i.left=ct(r.left),i.right=ct(r.right),n.overlayX==="center"?i.alignItems="center":i.alignItems=n.overlayX==="end"?"flex-end":"flex-start",n.overlayY==="center"?i.justifyContent="center":i.justifyContent=n.overlayY==="bottom"?"flex-end":"flex-start",o&&(i.maxHeight=ct(o)),s&&(i.maxWidth=ct(s))}this._lastBoundingBoxSize=r,Ir(this._boundingBox.style,i)}_resetBoundingBoxStyles(){Ir(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){Ir(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(e,n){let r={},i=this._hasExactPosition(),o=this._hasFlexibleDimensions,s=this._overlayRef.getConfig();if(i){let m=this._viewportRuler.getViewportScrollPosition();Ir(r,this._getExactOverlayY(n,e,m)),Ir(r,this._getExactOverlayX(n,e,m))}else r.position="static";let a="",u=this._getOffset(n,"x"),d=this._getOffset(n,"y");u&&(a+=`translateX(${u}px) `),d&&(a+=`translateY(${d}px)`),r.transform=a.trim(),s.maxHeight&&(i?r.maxHeight=ct(s.maxHeight):o&&(r.maxHeight="")),s.maxWidth&&(i?r.maxWidth=ct(s.maxWidth):o&&(r.maxWidth="")),Ir(this._pane.style,r)}_getExactOverlayY(e,n,r){let i={top:"",bottom:""},o=this._getOverlayPoint(n,this._overlayRect,e);if(this._isPushed&&(o=this._pushOverlayOnScreen(o,this._overlayRect,r)),e.overlayY==="bottom"){let s=this._document.documentElement.clientHeight;i.bottom=`${s-(o.y+this._overlayRect.height)}px`}else i.top=ct(o.y);return i}_getExactOverlayX(e,n,r){let i={left:"",right:""},o=this._getOverlayPoint(n,this._overlayRect,e);this._isPushed&&(o=this._pushOverlayOnScreen(o,this._overlayRect,r));let s;if(this._isRtl()?s=e.overlayX==="end"?"left":"right":s=e.overlayX==="end"?"right":"left",s==="right"){let a=this._document.documentElement.clientWidth;i.right=`${a-(o.x+this._overlayRect.width)}px`}else i.left=ct(o.x);return i}_getScrollVisibility(){let e=this._getOriginRect(),n=this._pane.getBoundingClientRect(),r=this._scrollables.map(i=>i.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:Qh(e,r),isOriginOutsideView:Ml(e,r),isOverlayClipped:Qh(n,r),isOverlayOutsideView:Ml(n,r)}}_subtractOverflows(e,...n){return n.reduce((r,i)=>r-Math.max(i,0),e)}_getNarrowedViewportRect(){let e=this._document.documentElement.clientWidth,n=this._document.documentElement.clientHeight,r=this._viewportRuler.getViewportScrollPosition();return{top:r.top+this._viewportMargin,left:r.left+this._viewportMargin,right:r.left+e-this._viewportMargin,bottom:r.top+n-this._viewportMargin,width:e-2*this._viewportMargin,height:n-2*this._viewportMargin}}_isRtl(){return this._overlayRef.getDirection()==="rtl"}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(e,n){return n==="x"?e.offsetX==null?this._offsetX:e.offsetX:e.offsetY==null?this._offsetY:e.offsetY}_validatePositions(){}_addPanelClasses(e){this._pane&&gl(e).forEach(n=>{n!==""&&this._appliedPanelClasses.indexOf(n)===-1&&(this._appliedPanelClasses.push(n),this._pane.classList.add(n))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(e=>{this._pane.classList.remove(e)}),this._appliedPanelClasses=[])}_getOriginRect(){let e=this._origin;if(e instanceof ut)return e.nativeElement.getBoundingClientRect();if(e instanceof Element)return e.getBoundingClientRect();let n=e.width||0,r=e.height||0;return{top:e.y,bottom:e.y+r,left:e.x,right:e.x+n,height:r,width:n}}};function Ir(t,e){for(let n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function np(t){if(typeof t!="number"&&t!=null){let[e,n]=t.split(A0);return!n||n==="px"?parseFloat(e):null}return t||null}function rp(t){return{top:Math.floor(t.top),right:Math.floor(t.right),bottom:Math.floor(t.bottom),left:Math.floor(t.left),width:Math.floor(t.width),height:Math.floor(t.height)}}function N0(t,e){return t===e?!0:t.isOriginClipped===e.isOriginClipped&&t.isOriginOutsideView===e.isOriginOutsideView&&t.isOverlayClipped===e.isOverlayClipped&&t.isOverlayOutsideView===e.isOverlayOutsideView}var ip="cdk-global-overlay-wrapper",Bl=class{_overlayRef;_cssPosition="static";_topOffset="";_bottomOffset="";_alignItems="";_xPosition="";_xOffset="";_width="";_height="";_isDisposed=!1;attach(e){let n=e.getConfig();this._overlayRef=e,this._width&&!n.width&&e.updateSize({width:this._width}),this._height&&!n.height&&e.updateSize({height:this._height}),e.hostElement.classList.add(ip),this._isDisposed=!1}top(e=""){return this._bottomOffset="",this._topOffset=e,this._alignItems="flex-start",this}left(e=""){return this._xOffset=e,this._xPosition="left",this}bottom(e=""){return this._topOffset="",this._bottomOffset=e,this._alignItems="flex-end",this}right(e=""){return this._xOffset=e,this._xPosition="right",this}start(e=""){return this._xOffset=e,this._xPosition="start",this}end(e=""){return this._xOffset=e,this._xPosition="end",this}width(e=""){return this._overlayRef?this._overlayRef.updateSize({width:e}):this._width=e,this}height(e=""){return this._overlayRef?this._overlayRef.updateSize({height:e}):this._height=e,this}centerHorizontally(e=""){return this.left(e),this._xPosition="center",this}centerVertically(e=""){return this.top(e),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;let e=this._overlayRef.overlayElement.style,n=this._overlayRef.hostElement.style,r=this._overlayRef.getConfig(),{width:i,height:o,maxWidth:s,maxHeight:a}=r,u=(i==="100%"||i==="100vw")&&(!s||s==="100%"||s==="100vw"),d=(o==="100%"||o==="100vh")&&(!a||a==="100%"||a==="100vh"),m=this._xPosition,h=this._xOffset,E=this._overlayRef.getConfig().direction==="rtl",S="",T="",k="";u?k="flex-start":m==="center"?(k="center",E?T=h:S=h):E?m==="left"||m==="end"?(k="flex-end",S=h):(m==="right"||m==="start")&&(k="flex-start",T=h):m==="left"||m==="start"?(k="flex-start",S=h):(m==="right"||m==="end")&&(k="flex-end",T=h),e.position=this._cssPosition,e.marginLeft=u?"0":S,e.marginTop=d?"0":this._topOffset,e.marginBottom=this._bottomOffset,e.marginRight=u?"0":T,n.justifyContent=k,n.alignItems=d?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;let e=this._overlayRef.overlayElement.style,n=this._overlayRef.hostElement,r=n.style;n.classList.remove(ip),r.justifyContent=r.alignItems=e.marginTop=e.marginBottom=e.marginLeft=e.marginRight=e.position="",this._overlayRef=null,this._isDisposed=!0}},P0=(()=>{class t{_viewportRuler=N(Wi);_document=N(nt);_platform=N(Ht);_overlayContainer=N(Ns);constructor(){}global(){return new Bl}flexibleConnectedTo(n){return new Vl(n,this._viewportRuler,this._document,this._platform,this._overlayContainer)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Pe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Ul=(()=>{class t{scrollStrategies=N(T0);_overlayContainer=N(Ns);_positionBuilder=N(P0);_keyboardDispatcher=N(O0);_injector=N(ht);_ngZone=N(ot);_document=N(nt);_directionality=N(Sr);_location=N(Iu);_outsideClickDispatcher=N(R0);_animationsModuleType=N(mu,{optional:!0});_idGenerator=N(bs);_renderer=N(Qt).createRenderer(null,null);_appRef;_styleLoader=N(br);constructor(){}create(n){this._styleLoader.load(sp);let r=this._createHostElement(),i=this._createPaneElement(r),o=this._createPortalOutlet(i),s=new Zi(n);return s.direction=s.direction||this._directionality.value,new fi(o,r,i,s,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher,this._animationsModuleType==="NoopAnimations",this._injector.get(Or),this._renderer)}position(){return this._positionBuilder}_createPaneElement(n){let r=this._document.createElement("div");return r.id=this._idGenerator.getId("cdk-overlay-"),r.classList.add("cdk-overlay-pane"),n.appendChild(r),r}_createHostElement(){let n=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(n),n}_createPortalOutlet(n){return this._appRef||(this._appRef=this._injector.get(Pr)),new Ts(n,null,this._appRef,this._injector,this._document)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Pe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function M0(t,e){}var hi=class{viewContainerRef;injector;id;role="dialog";panelClass="";hasBackdrop=!0;backdropClass="";disableClose=!1;width="";height="";minWidth;minHeight;maxWidth;maxHeight;positionStrategy;data=null;direction;ariaDescribedBy=null;ariaLabelledBy=null;ariaLabel=null;ariaModal=!1;autoFocus="first-tabbable";restoreFocus=!0;scrollStrategy;closeOnNavigation=!0;closeOnDestroy=!0;closeOnOverlayDetachments=!0;componentFactoryResolver;providers;container;templateContext};var k0=(()=>{class t extends di{_elementRef=N(ut);_focusTrapFactory=N(qh);_config;_interactivityChecker=N(Rl);_ngZone=N(ot);_overlayRef=N(fi);_focusMonitor=N(zh);_renderer=N(ro);_platform=N(Ht);_document=N(nt,{optional:!0});_portalOutlet;_focusTrap=null;_elementFocusedBeforeDialogWasOpened=null;_closeInteractionType=null;_ariaLabelledByQueue=[];_changeDetectorRef=N(Sn);_injector=N(ht);_isDestroyed=!1;constructor(){super(),this._config=N(hi,{optional:!0})||new hi,this._config.ariaLabelledBy&&this._ariaLabelledByQueue.push(this._config.ariaLabelledBy)}_addAriaLabelledBy(n){this._ariaLabelledByQueue.push(n),this._changeDetectorRef.markForCheck()}_removeAriaLabelledBy(n){let r=this._ariaLabelledByQueue.indexOf(n);r>-1&&(this._ariaLabelledByQueue.splice(r,1),this._changeDetectorRef.markForCheck())}_contentAttached(){this._initializeFocusTrap(),this._handleBackdropClicks(),this._captureInitialFocus()}_captureInitialFocus(){this._trapFocus()}ngOnDestroy(){this._isDestroyed=!0,this._restoreFocus()}attachComponentPortal(n){this._portalOutlet.hasAttached();let r=this._portalOutlet.attachComponentPortal(n);return this._contentAttached(),r}attachTemplatePortal(n){this._portalOutlet.hasAttached();let r=this._portalOutlet.attachTemplatePortal(n);return this._contentAttached(),r}attachDomPortal=n=>{this._portalOutlet.hasAttached();let r=this._portalOutlet.attachDomPortal(n);return this._contentAttached(),r};_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(n,r){this._interactivityChecker.isFocusable(n)||(n.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{let i=()=>{o(),s(),n.removeAttribute("tabindex")},o=this._renderer.listen(n,"blur",i),s=this._renderer.listen(n,"mousedown",i)})),n.focus(r)}_focusByCssSelector(n,r){let i=this._elementRef.nativeElement.querySelector(n);i&&this._forceFocus(i,r)}_trapFocus(n){this._isDestroyed||Vn(()=>{let r=this._elementRef.nativeElement;switch(this._config.autoFocus){case!1:case"dialog":this._containsFocus()||r.focus(n);break;case!0:case"first-tabbable":this._focusTrap?.focusInitialElement(n)||this._focusDialogContainer(n);break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]',n);break;default:this._focusByCssSelector(this._config.autoFocus,n);break}},{injector:this._injector})}_restoreFocus(){let n=this._config.restoreFocus,r=null;if(typeof n=="string"?r=this._document.querySelector(n):typeof n=="boolean"?r=n?this._elementFocusedBeforeDialogWasOpened:null:n&&(r=n),this._config.restoreFocus&&r&&typeof r.focus=="function"){let i=vs(),o=this._elementRef.nativeElement;(!i||i===this._document.body||i===o||o.contains(i))&&(this._focusMonitor?(this._focusMonitor.focusVia(r,this._closeInteractionType),this._closeInteractionType=null):r.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(n){this._elementRef.nativeElement.focus&&this._elementRef.nativeElement.focus(n)}_containsFocus(){let n=this._elementRef.nativeElement,r=vs();return n===r||n.contains(r)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=vs()))}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Te({type:t,selectors:[["cdk-dialog-container"]],viewQuery:function(r,i){if(r&1&&Kn(Dl,7),r&2){let o;Xn(o=qn())&&(i._portalOutlet=o.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(r,i){r&2&&yn("id",i._config.id||null)("role",i._config.role)("aria-modal",i._config.ariaModal)("aria-labelledby",i._config.ariaLabel?null:i._ariaLabelledByQueue[0])("aria-label",i._config.ariaLabel)("aria-describedby",i._config.ariaDescribedBy||null)},features:[bt],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(r,i){r&1&&Ae(0,M0,0,0,"ng-template",0)},dependencies:[Dl],styles:[`.cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}
38
- `],encapsulation:2})}return t})(),xr=class{overlayRef;config;componentInstance;componentRef;containerInstance;disableClose;closed=new we;backdropClick;keydownEvents;outsidePointerEvents;id;_detachSubscription;constructor(e,n){this.overlayRef=e,this.config=n,this.disableClose=n.disableClose,this.backdropClick=e.backdropClick(),this.keydownEvents=e.keydownEvents(),this.outsidePointerEvents=e.outsidePointerEvents(),this.id=n.id,this.keydownEvents.subscribe(r=>{r.keyCode===27&&!this.disableClose&&!Zh(r)&&(r.preventDefault(),this.close(void 0,{focusOrigin:"keyboard"}))}),this.backdropClick.subscribe(()=>{this.disableClose||this.close(void 0,{focusOrigin:"mouse"})}),this._detachSubscription=e.detachments().subscribe(()=>{n.closeOnOverlayDetachments!==!1&&this.close()})}close(e,n){if(this.containerInstance){let r=this.closed;this.containerInstance._closeInteractionType=n?.focusOrigin||"program",this._detachSubscription.unsubscribe(),this.overlayRef.dispose(),r.next(e),r.complete(),this.componentInstance=this.containerInstance=null}}updatePosition(){return this.overlayRef.updatePosition(),this}updateSize(e="",n=""){return this.overlayRef.updateSize({width:e,height:n}),this}addPanelClass(e){return this.overlayRef.addPanelClass(e),this}removePanelClass(e){return this.overlayRef.removePanelClass(e),this}},L0=new ft("DialogScrollStrategy",{providedIn:"root",factory:()=>{let t=N(Ul);return()=>t.scrollStrategies.block()}}),jl=new ft("DialogData"),F0=new ft("DefaultDialogConfig");var ap=(()=>{class t{_overlay=N(Ul);_injector=N(ht);_defaultOptions=N(F0,{optional:!0});_parentDialog=N(t,{optional:!0,skipSelf:!0});_overlayContainer=N(Ns);_idGenerator=N(bs);_openDialogsAtThisLevel=[];_afterAllClosedAtThisLevel=new we;_afterOpenedAtThisLevel=new we;_ariaHiddenElements=new Map;_scrollStrategy=N(L0);get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}afterAllClosed=nu(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(vi(void 0)));constructor(){}open(n,r){let i=this._defaultOptions||new hi;r=O(O({},i),r),r.id=r.id||this._idGenerator.getId("cdk-dialog-"),r.id&&this.getDialogById(r.id);let o=this._getOverlayConfig(r),s=this._overlay.create(o),a=new xr(s,r),u=this._attachContainer(s,a,r);return a.containerInstance=u,this._attachDialogContent(n,a,u,r),this.openDialogs.length||this._hideNonDialogContentFromAssistiveTechnology(),this.openDialogs.push(a),a.closed.subscribe(()=>this._removeOpenDialog(a,!0)),this.afterOpened.next(a),a}closeAll(){Hl(this.openDialogs,n=>n.close())}getDialogById(n){return this.openDialogs.find(r=>r.id===n)}ngOnDestroy(){Hl(this._openDialogsAtThisLevel,n=>{n.config.closeOnDestroy===!1&&this._removeOpenDialog(n,!1)}),Hl(this._openDialogsAtThisLevel,n=>n.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(n){let r=new Zi({positionStrategy:n.positionStrategy||this._overlay.position().global().centerHorizontally().centerVertically(),scrollStrategy:n.scrollStrategy||this._scrollStrategy(),panelClass:n.panelClass,hasBackdrop:n.hasBackdrop,direction:n.direction,minWidth:n.minWidth,minHeight:n.minHeight,maxWidth:n.maxWidth,maxHeight:n.maxHeight,width:n.width,height:n.height,disposeOnNavigation:n.closeOnNavigation});return n.backdropClass&&(r.backdropClass=n.backdropClass),r}_attachContainer(n,r,i){let o=i.injector||i.viewContainerRef?.injector,s=[{provide:hi,useValue:i},{provide:xr,useValue:r},{provide:fi,useValue:n}],a;i.container?typeof i.container=="function"?a=i.container:(a=i.container.type,s.push(...i.container.providers(i))):a=k0;let u=new li(a,i.viewContainerRef,ht.create({parent:o||this._injector,providers:s}));return n.attach(u).instance}_attachDialogContent(n,r,i,o){if(n instanceof Ar){let s=this._createInjector(o,r,i,void 0),a={$implicit:o.data,dialogRef:r};o.templateContext&&(a=O(O({},a),typeof o.templateContext=="function"?o.templateContext():o.templateContext)),i.attachTemplatePortal(new ui(n,null,a,s))}else{let s=this._createInjector(o,r,i,this._injector),a=i.attachComponentPortal(new li(n,o.viewContainerRef,s));r.componentRef=a,r.componentInstance=a.instance}}_createInjector(n,r,i,o){let s=n.injector||n.viewContainerRef?.injector,a=[{provide:jl,useValue:n.data},{provide:xr,useValue:r}];return n.providers&&(typeof n.providers=="function"?a.push(...n.providers(r,n,i)):a.push(...n.providers)),n.direction&&(!s||!s.get(Sr,null,{optional:!0}))&&a.push({provide:Sr,useValue:{value:n.direction,change:Tr()}}),ht.create({parent:s||o,providers:a})}_removeOpenDialog(n,r){let i=this.openDialogs.indexOf(n);i>-1&&(this.openDialogs.splice(i,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((o,s)=>{o?s.setAttribute("aria-hidden",o):s.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),r&&this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(){let n=this._overlayContainer.getContainerElement();if(n.parentElement){let r=n.parentElement.children;for(let i=r.length-1;i>-1;i--){let o=r[i];o!==n&&o.nodeName!=="SCRIPT"&&o.nodeName!=="STYLE"&&!o.hasAttribute("aria-live")&&(this._ariaHiddenElements.set(o,o.getAttribute("aria-hidden")),o.setAttribute("aria-hidden","true"))}}}_getAfterAllClosed(){let n=this._parentDialog;return n?n._getAfterAllClosed():this._afterAllClosedAtThisLevel}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Pe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Hl(t,e){let n=t.length;for(;n--;)e(t[n])}var Ps=class{lastWidth;lastHeight;resizeTimeout=null;debounceDelay=200;onResizeCallback;constructor(e){this.onResizeCallback=e,this.lastWidth=window.innerWidth,this.lastHeight=window.innerHeight,window.addEventListener("resize",this.debouncedResize),window.addEventListener("orientationchange",this.handleImmediateResize)}destroy(){window.removeEventListener("resize",this.debouncedResize),window.removeEventListener("orientationchange",this.handleImmediateResize)}handleImmediateResize=()=>{this.triggerResize()};debouncedResize=()=>{this.resizeTimeout!==null&&clearTimeout(this.resizeTimeout),this.resizeTimeout=window.setTimeout(()=>{this.triggerResize()},this.debounceDelay)};triggerResize(){let e=window.innerWidth,n=window.innerHeight;(n!==this.lastHeight||e!==this.lastWidth)&&(this.onResizeCallback(),this.lastWidth=e,this.lastHeight=n)}};var V0=lu;function B0(t){return!!t[V0]}var U0=Symbol("__destroy"),fp=Symbol("__decoratorApplied");function hp(t){return typeof t=="string"?Symbol(`__destroy__${t}`):U0}function H0(t){t.prototype[fp]=!0}function pp(t,e){t[e]||(t[e]=new we)}function mp(t,e){t[e]&&(t[e].next(),t[e].complete(),t[e]=null)}function gp(t){t instanceof Jt&&t.unsubscribe()}function j0(t){Array.isArray(t)&&t.forEach(gp)}function _p(t,e){return function(){if(t&&t.call(this),mp(this,hp()),e.arrayName&&j0(this[e.arrayName]),e.checkProperties)for(let n in this)e.blackList?.includes(n)||gp(this[n])}}function $0(t,e){t.prototype.ngOnDestroy=_p(t.prototype.ngOnDestroy,e)}function G0(t,e){let n=t.\u0275pipe;n.onDestroy=_p(n.onDestroy,e)}function vp(t={}){return e=>{B0(e)?G0(e,t):$0(e,t),H0(e)}}var lp=7,up=Symbol("CheckerHasBeenSet");function W0(t,e){t[up]||z0()||(dp(()=>eu(Promise.resolve()).pipe(Ks(()=>{let n;try{n=fu(t)}catch{n=null}let r=n?.lView;if(r==null)return Ql;let i=r[lp]||(r[lp]=[]),o=new we;return i.push(function(){dp(()=>{o.next(),o.complete()})}),o}),Ks(()=>Promise.resolve())).subscribe(()=>{(e.observed??e.observers.length>0)&&console.warn(Y0(t))})),t[up]=!0)}function z0(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha||typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]"}function dp(t){let e=cu.Zone;return!!e&&typeof e.root?.run=="function"?e.root.run(t):t()}function Y0(t){return`
29
+ `)};At.prototype.renderPartial=function(e,n,r,i){if(r){var o=this.getConfigTags(i),s=Ja(r)?r(e[1]):r[e[1]];if(s!=null){var c=e[6],u=e[5],d=e[4],g=s;u==0&&d&&(g=this.indentPartial(s,d,c));var p=this.parse(g,o);return this.renderTokens(p,n,r,g,i)}}};At.prototype.unescapedValue=function(e,n){var r=n.lookup(e[1]);if(r!=null)return r};At.prototype.escapedValue=function(e,n,r){var i=this.getConfigEscape(r)||qt.escape,o=n.lookup(e[1]);if(o!=null)return typeof o=="number"&&i===qt.escape?String(o):i(o)};At.prototype.rawValue=function(e){return e[1]};At.prototype.getConfigTags=function(e){return Mr(e)?e:e&&typeof e=="object"?e.tags:void 0};At.prototype.getConfigEscape=function(e){if(e&&typeof e=="object"&&!Mr(e))return e.escape};var qt={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(t){yi.templateCache=t},get templateCache(){return yi.templateCache}},yi=new At;qt.clearCache=function(){return yi.clearCache()};qt.parse=function(e,n){return yi.parse(e,n)};qt.render=function(e,n,r,i){if(typeof e!="string")throw new TypeError('Invalid template! Template should be a "string" but "'+r_(e)+'" was given as the first argument for mustache#render(template, view, partials)');return yi.render(e,n,r,i)};qt.escape=u_;qt.Scanner=vi;qt.Context=Rr;qt.Writer=At;var Qa=qt;Qa.escape=Od.escapeHtml;var Lo=class t{transform(e,n){return e?Qa.render(e,D({},n)):null}static \u0275fac=function(n){return new(n||t)};static \u0275pipe=Fi({name:"cooeeDynamicVariables",type:t,pure:!0})};var ec={};(function t(e,n,r,i){var o=!!(e.Worker&&e.Blob&&e.Promise&&e.OffscreenCanvas&&e.OffscreenCanvasRenderingContext2D&&e.HTMLCanvasElement&&e.HTMLCanvasElement.prototype.transferControlToOffscreen&&e.URL&&e.URL.createObjectURL),s=typeof Path2D=="function"&&typeof DOMMatrix=="function",c=function(){if(!e.OffscreenCanvas)return!1;var y=new OffscreenCanvas(1,1),v=y.getContext("2d");v.fillRect(0,0,1,1);var U=y.transferToImageBitmap();try{v.createPattern(U,"no-repeat")}catch{return!1}return!0}();function u(){}function d(y){var v=n.exports.Promise,U=v!==void 0?v:e.Promise;return typeof U=="function"?new U(y):(y(u,u),null)}var g=function(y,v){return{transform:function(U){if(y)return U;if(v.has(U))return v.get(U);var Z=new OffscreenCanvas(U.width,U.height),ne=Z.getContext("2d");return ne.drawImage(U,0,0),v.set(U,Z),Z},clear:function(){v.clear()}}}(c,new Map),p=function(){var y=Math.floor(16.666666666666668),v,U,Z={},ne=0;return typeof requestAnimationFrame=="function"&&typeof cancelAnimationFrame=="function"?(v=function(ie){var ue=Math.random();return Z[ue]=requestAnimationFrame(function Q(ae){ne===ae||ne+y-1<ae?(ne=ae,delete Z[ue],ie()):Z[ue]=requestAnimationFrame(Q)}),ue},U=function(ie){Z[ie]&&cancelAnimationFrame(Z[ie])}):(v=function(ie){return setTimeout(ie,y)},U=function(ie){return clearTimeout(ie)}),{frame:v,cancel:U}}(),E=function(){var y,v,U={};function Z(ne){function ie(ue,Q){ne.postMessage({options:ue||{},callback:Q})}ne.init=function(Q){var ae=Q.transferControlToOffscreen();ne.postMessage({canvas:ae},[ae])},ne.fire=function(Q,ae,ee){if(v)return ie(Q,null),v;var de=Math.random().toString(36).slice(2);return v=d(function(ce){function pe(he){he.data.callback===de&&(delete U[de],ne.removeEventListener("message",pe),v=null,g.clear(),ee(),ce())}ne.addEventListener("message",pe),ie(Q,de),U[de]=pe.bind(null,{data:{callback:de}})}),v},ne.reset=function(){ne.postMessage({reset:!0});for(var Q in U)U[Q](),delete U[Q]}}return function(){if(y)return y;if(!r&&o){var ne=["var CONFETTI, SIZE = {}, module = {};","("+t.toString()+")(this, module, true, SIZE);","onmessage = function(msg) {"," if (msg.data.options) {"," CONFETTI(msg.data.options).then(function () {"," if (msg.data.callback) {"," postMessage({ callback: msg.data.callback });"," }"," });"," } else if (msg.data.reset) {"," CONFETTI && CONFETTI.reset();"," } else if (msg.data.resize) {"," SIZE.width = msg.data.resize.width;"," SIZE.height = msg.data.resize.height;"," } else if (msg.data.canvas) {"," SIZE.width = msg.data.canvas.width;"," SIZE.height = msg.data.canvas.height;"," CONFETTI = module.exports.create(msg.data.canvas);"," }","}"].join(`
30
+ `);try{y=new Worker(URL.createObjectURL(new Blob([ne])))}catch(ie){return typeof console!==void 0&&typeof console.warn=="function"&&console.warn("\u{1F38A} Could not load worker",ie),null}Z(y)}return y}}(),C={particleCount:50,angle:90,spread:45,startVelocity:45,decay:.9,gravity:1,drift:0,ticks:200,x:.5,y:.5,shapes:["square","circle"],zIndex:100,colors:["#26ccff","#a25afd","#ff5e7e","#88ff5a","#fcff42","#ffa62d","#ff36ff"],disableForReducedMotion:!1,scalar:1};function O(y,v){return v?v(y):y}function M(y){return y!=null}function L(y,v,U){return O(y&&M(y[v])?y[v]:C[v],U)}function H(y){return y<0?0:Math.floor(y)}function Y(y,v){return Math.floor(Math.random()*(v-y))+y}function oe(y){return parseInt(y,16)}function z(y){return y.map(ye)}function ye(y){var v=String(y).replace(/[^0-9a-f]/gi,"");return v.length<6&&(v=v[0]+v[0]+v[1]+v[1]+v[2]+v[2]),{r:oe(v.substring(0,2)),g:oe(v.substring(2,4)),b:oe(v.substring(4,6))}}function B(y){var v=L(y,"origin",Object);return v.x=L(v,"x",Number),v.y=L(v,"y",Number),v}function fe(y){y.width=document.documentElement.clientWidth,y.height=document.documentElement.clientHeight}function te(y){var v=y.getBoundingClientRect();y.width=v.width,y.height=v.height}function Ee(y){var v=document.createElement("canvas");return v.style.position="fixed",v.style.top="0px",v.style.left="0px",v.style.pointerEvents="none",v.style.zIndex=y,v}function Me(y,v,U,Z,ne,ie,ue,Q,ae){y.save(),y.translate(v,U),y.rotate(ie),y.scale(Z,ne),y.arc(0,0,1,ue,Q,ae),y.restore()}function xe(y){var v=y.angle*(Math.PI/180),U=y.spread*(Math.PI/180);return{x:y.x,y:y.y,wobble:Math.random()*10,wobbleSpeed:Math.min(.11,Math.random()*.1+.05),velocity:y.startVelocity*.5+Math.random()*y.startVelocity,angle2D:-v+(.5*U-Math.random()*U),tiltAngle:(Math.random()*(.75-.25)+.25)*Math.PI,color:y.color,shape:y.shape,tick:0,totalTicks:y.ticks,decay:y.decay,drift:y.drift,random:Math.random()+2,tiltSin:0,tiltCos:0,wobbleX:0,wobbleY:0,gravity:y.gravity*3,ovalScalar:.6,scalar:y.scalar,flat:y.flat}}function Oe(y,v){v.x+=Math.cos(v.angle2D)*v.velocity+v.drift,v.y+=Math.sin(v.angle2D)*v.velocity+v.gravity,v.velocity*=v.decay,v.flat?(v.wobble=0,v.wobbleX=v.x+10*v.scalar,v.wobbleY=v.y+10*v.scalar,v.tiltSin=0,v.tiltCos=0,v.random=1):(v.wobble+=v.wobbleSpeed,v.wobbleX=v.x+10*v.scalar*Math.cos(v.wobble),v.wobbleY=v.y+10*v.scalar*Math.sin(v.wobble),v.tiltAngle+=.1,v.tiltSin=Math.sin(v.tiltAngle),v.tiltCos=Math.cos(v.tiltAngle),v.random=Math.random()+2);var U=v.tick++/v.totalTicks,Z=v.x+v.random*v.tiltCos,ne=v.y+v.random*v.tiltSin,ie=v.wobbleX+v.random*v.tiltCos,ue=v.wobbleY+v.random*v.tiltSin;if(y.fillStyle="rgba("+v.color.r+", "+v.color.g+", "+v.color.b+", "+(1-U)+")",y.beginPath(),s&&v.shape.type==="path"&&typeof v.shape.path=="string"&&Array.isArray(v.shape.matrix))y.fill(T(v.shape.path,v.shape.matrix,v.x,v.y,Math.abs(ie-Z)*.1,Math.abs(ue-ne)*.1,Math.PI/10*v.wobble));else if(v.shape.type==="bitmap"){var Q=Math.PI/10*v.wobble,ae=Math.abs(ie-Z)*.1,ee=Math.abs(ue-ne)*.1,de=v.shape.bitmap.width*v.scalar,ce=v.shape.bitmap.height*v.scalar,pe=new DOMMatrix([Math.cos(Q)*ae,Math.sin(Q)*ae,-Math.sin(Q)*ee,Math.cos(Q)*ee,v.x,v.y]);pe.multiplySelf(new DOMMatrix(v.shape.matrix));var he=y.createPattern(g.transform(v.shape.bitmap),"no-repeat");he.setTransform(pe),y.globalAlpha=1-U,y.fillStyle=he,y.fillRect(v.x-de/2,v.y-ce/2,de,ce),y.globalAlpha=1}else if(v.shape==="circle")y.ellipse?y.ellipse(v.x,v.y,Math.abs(ie-Z)*v.ovalScalar,Math.abs(ue-ne)*v.ovalScalar,Math.PI/10*v.wobble,0,2*Math.PI):Me(y,v.x,v.y,Math.abs(ie-Z)*v.ovalScalar,Math.abs(ue-ne)*v.ovalScalar,Math.PI/10*v.wobble,0,2*Math.PI);else if(v.shape==="star")for(var me=Math.PI/2*3,h=4*v.scalar,a=8*v.scalar,l=v.x,_=v.y,I=5,N=Math.PI/I;I--;)l=v.x+Math.cos(me)*a,_=v.y+Math.sin(me)*a,y.lineTo(l,_),me+=N,l=v.x+Math.cos(me)*h,_=v.y+Math.sin(me)*h,y.lineTo(l,_),me+=N;else y.moveTo(Math.floor(v.x),Math.floor(v.y)),y.lineTo(Math.floor(v.wobbleX),Math.floor(ne)),y.lineTo(Math.floor(ie),Math.floor(ue)),y.lineTo(Math.floor(Z),Math.floor(v.wobbleY));return y.closePath(),y.fill(),v.tick<v.totalTicks}function Ge(y,v,U,Z,ne){var ie=v.slice(),ue=y.getContext("2d"),Q,ae,ee=d(function(de){function ce(){Q=ae=null,ue.clearRect(0,0,Z.width,Z.height),g.clear(),ne(),de()}function pe(){r&&!(Z.width===i.width&&Z.height===i.height)&&(Z.width=y.width=i.width,Z.height=y.height=i.height),!Z.width&&!Z.height&&(U(y),Z.width=y.width,Z.height=y.height),ue.clearRect(0,0,Z.width,Z.height),ie=ie.filter(function(he){return Oe(ue,he)}),ie.length?Q=p.frame(pe):ce()}Q=p.frame(pe),ae=ce});return{addFettis:function(de){return ie=ie.concat(de),ee},canvas:y,promise:ee,reset:function(){Q&&p.cancel(Q),ae&&ae()}}}function We(y,v){var U=!y,Z=!!L(v||{},"resize"),ne=!1,ie=L(v,"disableForReducedMotion",Boolean),ue=o&&!!L(v||{},"useWorker"),Q=ue?E():null,ae=U?fe:te,ee=y&&Q?!!y.__confetti_initialized:!1,de=typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion)").matches,ce;function pe(me,h,a){for(var l=L(me,"particleCount",H),_=L(me,"angle",Number),I=L(me,"spread",Number),N=L(me,"startVelocity",Number),F=L(me,"decay",Number),_e=L(me,"gravity",Number),we=L(me,"drift",Number),ve=L(me,"colors",z),Pe=L(me,"ticks",Number),Le=L(me,"shapes"),Xe=L(me,"scalar"),Lt=!!L(me,"flat"),$t=B(me),In=l,Et=[],kt=y.width*$t.x,Ai=y.height*$t.y;In--;)Et.push(xe({x:kt,y:Ai,angle:_,spread:I,startVelocity:N,color:ve[In%ve.length],shape:Le[Y(0,Le.length)],ticks:Pe,decay:F,gravity:_e,drift:we,scalar:Xe,flat:Lt}));return ce?ce.addFettis(Et):(ce=Ge(y,Et,ae,h,a),ce.promise)}function he(me){var h=ie||L(me,"disableForReducedMotion",Boolean),a=L(me,"zIndex",Number);if(h&&de)return d(function(N){N()});U&&ce?y=ce.canvas:U&&!y&&(y=Ee(a),document.body.appendChild(y)),Z&&!ee&&ae(y);var l={width:y.width,height:y.height};Q&&!ee&&Q.init(y),ee=!0,Q&&(y.__confetti_initialized=!0);function _(){if(Q){var N={getBoundingClientRect:function(){if(!U)return y.getBoundingClientRect()}};ae(N),Q.postMessage({resize:{width:N.width,height:N.height}});return}l.width=l.height=null}function I(){ce=null,Z&&(ne=!1,e.removeEventListener("resize",_)),U&&y&&(document.body.contains(y)&&document.body.removeChild(y),y=null,ee=!1)}return Z&&!ne&&(ne=!0,e.addEventListener("resize",_,!1)),Q?Q.fire(me,l,I):pe(me,l,I)}return he.reset=function(){Q&&Q.reset(),ce&&ce.reset()},he}var ut;function A(){return ut||(ut=We(null,{useWorker:!0,resize:!0})),ut}function T(y,v,U,Z,ne,ie,ue){var Q=new Path2D(y),ae=new Path2D;ae.addPath(Q,new DOMMatrix(v));var ee=new Path2D;return ee.addPath(ae,new DOMMatrix([Math.cos(ue)*ne,Math.sin(ue)*ne,-Math.sin(ue)*ie,Math.cos(ue)*ie,U,Z])),ee}function k(y){if(!s)throw new Error("path confetti are not supported in this browser");var v,U;typeof y=="string"?v=y:(v=y.path,U=y.matrix);var Z=new Path2D(v),ne=document.createElement("canvas"),ie=ne.getContext("2d");if(!U){for(var ue=1e3,Q=ue,ae=ue,ee=0,de=0,ce,pe,he=0;he<ue;he+=2)for(var me=0;me<ue;me+=2)ie.isPointInPath(Z,he,me,"nonzero")&&(Q=Math.min(Q,he),ae=Math.min(ae,me),ee=Math.max(ee,he),de=Math.max(de,me));ce=ee-Q,pe=de-ae;var h=10,a=Math.min(h/ce,h/pe);U=[a,0,0,a,-Math.round(ce/2+Q)*a,-Math.round(pe/2+ae)*a]}return{type:"path",path:v,matrix:U}}function P(y){var v,U=1,Z="#000000",ne='"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "EmojiOne Color", "Android Emoji", "Twemoji Mozilla", "system emoji", sans-serif';typeof y=="string"?v=y:(v=y.text,U="scalar"in y?y.scalar:U,ne="fontFamily"in y?y.fontFamily:ne,Z="color"in y?y.color:Z);var ie=10*U,ue=""+ie+"px "+ne,Q=new OffscreenCanvas(ie,ie),ae=Q.getContext("2d");ae.font=ue;var ee=ae.measureText(v),de=Math.ceil(ee.actualBoundingBoxRight+ee.actualBoundingBoxLeft),ce=Math.ceil(ee.actualBoundingBoxAscent+ee.actualBoundingBoxDescent),pe=2,he=ee.actualBoundingBoxLeft+pe,me=ee.actualBoundingBoxAscent+pe;de+=pe+pe,ce+=pe+pe,Q=new OffscreenCanvas(de,ce),ae=Q.getContext("2d"),ae.font=ue,ae.fillStyle=Z,ae.fillText(v,he,me);var h=1/U;return{type:"bitmap",bitmap:Q.transferToImageBitmap(),matrix:[h,0,0,h,-de*h/2,-ce*h/2]}}n.exports=function(){return A().apply(this,arguments)},n.exports.reset=function(){A().reset()},n.exports.create=We,n.exports.shapeFromPath=k,n.exports.shapeFromText=P})(function(){return typeof window<"u"?window:typeof self<"u"?self:this||{}}(),ec,!1);var Nd=ec.exports,bT=ec.exports.create;var ko=class{static DEFAULTS={scalar:1.4,zIndex:1e4,shapes:["circle","circle","square"],colors:["#f51c8f","#2179e2","#d52dc8","#01a9d9","#78ff44","#fdff6a"]};static async basic(){await this.fire({particleCount:100,spread:70,origin:{y:.6}})}static async leftRight(e=100){let n=[],r=Date.now()+2e3,i=()=>{n.push(this.fire({angle:60,spread:55,origin:{x:0}}),this.fire({angle:120,spread:55,origin:{x:1}})),Date.now()<r&&e>0&&(requestAnimationFrame(i),e--)};i(),await Promise.all(n)}static async realistic(){await Promise.all([this.realisticFire(.25,{spread:26,startVelocity:55}),this.realisticFire(.2,{spread:60}),this.realisticFire(.35,{spread:100,decay:.91,scalar:.8}),this.realisticFire(.1,{spread:120,startVelocity:25,decay:.92,scalar:1.2}),this.realisticFire(.1,{spread:120,startVelocity:45})])}static async fire(e){Object.assign(e,this.DEFAULTS,e),e.particleCount=e.particleCount??this.DEFAULTS.colors.length,await Nd(e)}static async realisticFire(e,n){let i={origin:{y:.7}};await this.fire(Object.assign({},i,n,{particleCount:Math.floor(200*e)}))}};var y_=(t,e)=>e.minValue;function v_(t,e){if(t&1&&(Se(0,"div",7),_t(1,"safeHtml")),t&2){let n=J().$implicit;be("innerHTML",St(1,1,n.minValue+" Products"),en)}}function E_(t,e){if(t&1&&(Se(0,"div",7),_t(1,"cooeeCurrency"),_t(2,"safeHtml")),t&2){let n=J().$implicit;be("innerHTML",St(2,3,St(1,1,n.minValue)),en)}}function b_(t,e){if(t&1&&(X(0,"li",6)(1,"div"),De(2,v_,2,3,"div",7)(3,E_,3,5,"div",7),Se(4,"img",8),X(5,"div",9),Te(6),q()()()),t&2){let n=e.$implicit,r=J(2);ti("left",n.calculatedAlignment+"%"),W(2),Ae((r.progressBarConfig==null?null:r.progressBarConfig.rewardBasis)===r.RewardBasis.ITEM_COUNT?2:3),W(2),be("src",r.getIconURL(n),ft),W(2),kn(n.label)}}function w_(t,e){if(t&1&&(Pt(0)(1),Se(2,"div",0),_t(3,"cooeeDynamicVariables"),_t(4,"safeHtml"),X(5,"div",1)(6,"ul",2)(7,"div",3),Se(8,"div",4),q(),qe(9,b_,7,5,"li",5,y_),q()()),t&2){let n=J(),r=n.calculatedState(),i=r.nextMilestone?r.nextMilestone.reachingText:r.lastMilestone.reachedText;W(2),be("innerHTML",St(4,6,Rl(3,3,i,n.localDynamicVariables())),en),W(6),ti("width",r.cartValuePercentage+"%"),W(),Ze(r.milestones)}}var Fo=class t extends pn{cart;localDynamicVariables=Wt({});calculatedState=Wt({});progressBarConfig;RewardBasis=ks;constructor(){super()}engagementTriggerReceived(e){this.progressBarConfig=e.progressBarConfig}ngOnInit(){super.ngOnInit(),this.calculateMilestonesSilently()}update(){this.calculateMilestonesSilently()}getIconURL(e){return e.rewardType===ii.FREE_SHIPPING?"https://img.icons8.com/ios-filled/50/FFFFFF/free-shipping.png":e.rewardType===ii.DISCOUNT?"https://img.icons8.com/ios-glyphs/30/FFFFFF/sale-price-tag.png":e.rewardType===ii.FREE_AUTO_GIFT?"https://img.icons8.com/ios-filled/50/FFFFFF/gift--v1.png":""}calculateMilestonesSilently(){this.calculateMilestones().catch(e=>gt.error(e))}async calculateMilestones(){let e=this.engagementTrigger,n=this.progressBarConfig;if(!n?.milestones?.length){gt.warn("Milestones not available in progress bar config",e);return}let r=await this.cart.getNormalisedCart(),i=n.milestones.at(-1),o=n?.reachedAmountOrCount??r.originalAmount,s=n.totalProgress??0;gt.debug("Cart value:",o,`, percentage: ${s}%`),this.celebrate(e,o);let c={milestonesReady:!0,cartValuePercentage:s,milestones:n.milestones},u=n.milestones.find(d=>!d.reached);if(u){let d=sr(u.minValue-o);if(n.rewardBasis==="ITEM_COUNT"){let g=u.minValue-o;d=`${g} ${g===1?"product":"products"}`}this.localDynamicVariables.set({amount_left:d}),c.nextMilestone=u,this.calculatedState.set(c);return}c.lastMilestone=i,this.calculatedState.set(c)}celebrate(e,n){let o=[...e.progressBarConfig.milestones].reverse().find(u=>u.minValue<n);if(!o)return;let s=`lc/en/${e.shortID}/${o.minValue}`;sessionStorage.getItem(s)||(sessionStorage.setItem(s,"1"),this.progressBarConfig?.noConfetti||ko.realistic())}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Fe({type:t,selectors:[["cooee-progressbar"]],inputs:{cart:"cart"},features:[wt],decls:1,vars:1,consts:[[1,"heading",3,"innerHTML"],[1,"milestone-container"],[1,"milestone-list"],[1,"untracked-path"],[1,"tracked-path"],[1,"milestone-list-item",3,"left"],[1,"milestone-list-item"],[1,"milestone-value",3,"innerHTML"],["width","20","height","20","alt","milestone icon",1,"milestone-icon",3,"src"],[1,"milestone-label"]],template:function(n,r){n&1&&De(0,w_,11,8),n&2&&Ae(r.calculatedState().milestonesReady?0:-1)},dependencies:[Lo,Vn,wn],styles:[`:host{display:block;padding:10px;background:linear-gradient(0deg,rgba(var(--lc-color-primary),.1) 0%,transparent 100%)}.milestone-container{width:95%;margin:8px 0}.heading{font-weight:500;text-align:center;font-size:12px}.milestone-list{display:flex;align-items:center;position:relative;font-size:10px;font-weight:500}.untracked-path{width:100%;background-color:#e5e7eb;height:4px;position:absolute}.tracked-path{background-color:rgb(var(--lc-color-primary));height:100%;display:block;transition:width .5s ease-in-out}.milestone-list{padding:0;margin:0}.milestone-list-item{position:relative;display:flex;flex-direction:column;align-items:center;height:75px}.milestone-list-item>div{display:flex;flex-direction:column;align-items:center;justify-content:space-between;position:absolute;height:100%;width:100px}.milestone-icon{padding:5px;border-radius:1000px;background-color:rgb(var(--lc-color-primary))}
31
+ `],encapsulation:3})};var Rd=Ri(Ps());var C_=(t,e)=>({enter:t,exit:e});function S_(t,e){if(t&1&&(X(0,"div",7),Te(1),q(),X(2,"div",8),Te(3),q()),t&2){let n=J(2);W(),Vt(" ",n.getCurrency(n.selectedVariant().price.cmp)," "),W(2),Vt(" ",n.getDiscountPercentage(n.selectedVariant().price),"% off ")}}function I_(t,e){if(t&1&&(X(0,"div",6),Te(1),q()),t&2){let n=J(2);W(),Vt(" ",n.stickyATCConfig.leftText," ")}}function x_(t,e){if(t&1&&(X(0,"div",1)(1,"div",5),Te(2),q(),De(3,S_,4,2)(4,I_,2,1,"div",6),q()),t&2){let n=J();W(2),Vt(" ",n.getCurrency(n.selectedVariant().price.d)," "),W(),Ae(n.selectedVariant().price.cmp?3:-1),W(),Ae(n.stickyATCConfig.leftText?4:-1)}}function T_(t,e){if(t&1&&(X(0,"div",9),Te(1),q()),t&2){let n=e.$implicit,r=e.$index;J(2);let i=Ct(5);be("ngClass",Al(2,C_,r===i.currentIndex,r===i.previousIndex)),W(),Vt(" ",n," ")}}function O_(t,e){if(t&1&&(X(0,"div",4),qe(1,T_,2,5,"div",9,dn),q()),t&2){J();let n=Ct(5);W(),Ze(n.features)}}var Vo=class t extends pn{currentItem;stickyATCConfig;selectedVariant=Wt(void 0);featureSlider=Wt({features:[],currentIndex:0});constructor(){super()}engagementTriggerReceived(e){this.stickyATCConfig=e.stickyATCConfig??{},this.currentItem=e.items[0],this.selectedVariant.set(this.currentItem.vars[0]),this.stickyATCConfig.leftText=this.replaceVariables(this.stickyATCConfig.leftText),this.stickyATCConfig.rightText=this.replaceVariables(this.stickyATCConfig.rightText),this.startFeatureRotation()}update(){}getCurrency(e){return sr(e)}getDiscountPercentage(e){return((e.cmp-e.d)/e.cmp*100).toFixed(0)}async addToCart(){this.executeCTAViaRenderer({clickAction:{at:102},item:this.currentItem})}startFeatureRotation(){if(!this.stickyATCConfig.rightText)return;let e=this.stickyATCConfig.rightText.split(`
32
+ `),n=e.length===1?null:setInterval(()=>{this.featureSlider.update(r=>Ie(D({},r),{previousIndex:r.currentIndex,currentIndex:(r.currentIndex+1)%r.features.length}))},3e3);this.featureSlider.set({intervalRef:n,currentIndex:0,features:e})}replaceVariables(e){return e?(0,Rd.render)(e,this.currentItem.getTemplateVariables()):""}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Fe({type:t,selectors:[["cooee-sticky-atc"]],features:[wt],decls:7,vars:3,consts:[[1,"lc-wrapper"],[1,"lc-prices"],[1,"lc-button-wrapper"],["type","button",1,"lc-button","lc-button-atc",3,"click"],[1,"lc-features"],[1,"lc-sale-price"],[1,"lc-additional-text"],[1,"lc-compare-price"],[1,"lc-discount-label"],[1,"lc-feature",3,"ngClass"]],template:function(n,r){if(n&1){let i=et();X(0,"div",0),De(1,x_,5,3,"div",1),X(2,"div",2)(3,"button",3),Ne("click",function(){return Ue(i),He(r.addToCart())}),Te(4,"Add To Cart"),q(),Pt(5),De(6,O_,3,0,"div",4),q()()}if(n&2){W(),Ae(r.selectedVariant()&&r.stickyATCConfig.showProductInfo?1:-1),W(4);let i=fn(r.featureSlider());W(),Ae(i.features.length?6:-1)}},dependencies:[Fn],styles:["[_nghost-%COMP%]{display:flex;justify-content:center;padding:10px;background-color:#fff;width:100%;box-shadow:4px 0 10px #0006;line-height:normal}.lc-wrapper[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:8px;max-width:1100px;width:100%}.lc-prices[_ngcontent-%COMP%]{flex:1 1 100%;display:flex;flex-wrap:wrap;align-items:center;gap:6px}@media (min-width: 768px){.lc-prices[_ngcontent-%COMP%]{gap:8px}}.lc-sale-price[_ngcontent-%COMP%]{font-size:24px;font-weight:600}.lc-compare-price[_ngcontent-%COMP%]{font-size:18px;font-weight:600;color:red;text-decoration:line-through}.lc-discount-label[_ngcontent-%COMP%]{font-size:12px;font-weight:500;color:green}.lc-button-wrapper[_ngcontent-%COMP%]{flex:1 1 100%;display:flex;flex-direction:column;gap:4px;align-items:center}.lc-button[_ngcontent-%COMP%]{background-color:#000;color:#fff;opacity:1;cursor:pointer;pointer-events:auto;border-radius:4px;min-width:150px;width:100%;padding:8px}.lc-additional-text[_ngcontent-%COMP%], .lc-feature[_ngcontent-%COMP%]{font-size:12px;color:#666}.lc-features[_ngcontent-%COMP%]{position:relative;overflow:hidden;height:16px;text-align:center;width:100%}.lc-features[_ngcontent-%COMP%] .lc-feature[_ngcontent-%COMP%]{position:absolute;width:100%;opacity:0;transform:translateY(100%);transition:transform .5s ease,opacity .5s ease}.lc-features[_ngcontent-%COMP%] .lc-feature.enter[_ngcontent-%COMP%]{opacity:1;transform:translateY(0);z-index:2}.lc-features[_ngcontent-%COMP%] .lc-feature.exit[_ngcontent-%COMP%]{opacity:0;transform:translateY(-100%);z-index:1}"]})};var Fd,je,Vd,sc,ar,Md,Bd,nc,Ud,ac,rc,ic,D_,oc={},Hd=[],A_=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,cc=Array.isArray;function Un(t,e){for(var n in e)t[n]=e[n];return t}function lc(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function tc(t,e,n,r,i){var o={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++Vd,__i:-1,__u:0};return i==null&&je.vnode!=null&&je.vnode(o),o}function uc(t){return t.children}function Pr(t,e){this.props=t,this.context=e}function Lr(t,e){if(e==null)return t.__?Lr(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?Lr(t):null}function jd(t){var e,n;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null){t.__e=t.__c.base=n.__e;break}return jd(t)}}function Pd(t){(!t.__d&&(t.__d=!0)&&ar.push(t)&&!Uo.__r++||Md!==je.debounceRendering)&&((Md=je.debounceRendering)||Bd)(Uo)}function Uo(){var t,e,n,r,i,o,s,c;for(ar.sort(nc);t=ar.shift();)t.__d&&(e=ar.length,r=void 0,o=(i=(n=t).__v).__e,s=[],c=[],n.__P&&((r=Un({},i)).__v=i.__v+1,je.vnode&&je.vnode(r),Wd(n.__P,r,i,n.__n,n.__P.namespaceURI,32&i.__u?[o]:null,s,o??Lr(i),!!(32&i.__u),c),r.__v=i.__v,r.__.__k[r.__i]=r,M_(s,r,c),r.__e!=o&&jd(r)),ar.length>e&&ar.sort(nc));Uo.__r=0}function $d(t,e,n,r,i,o,s,c,u,d,g){var p,E,C,O,M,L,H=r&&r.__k||Hd,Y=e.length;for(u=N_(n,e,H,u,Y),p=0;p<Y;p++)(C=n.__k[p])!=null&&(E=C.__i===-1?oc:H[C.__i]||oc,C.__i=p,L=Wd(t,C,E,i,o,s,c,u,d,g),O=C.__e,C.ref&&E.ref!=C.ref&&(E.ref&&dc(E.ref,null,C),g.push(C.ref,C.__c||O,C)),M==null&&O!=null&&(M=O),4&C.__u||E.__k===C.__k?u=Gd(C,u,t):typeof C.type=="function"&&L!==void 0?u=L:O&&(u=O.nextSibling),C.__u&=-7);return n.__e=M,u}function N_(t,e,n,r,i){var o,s,c,u,d,g=n.length,p=g,E=0;for(t.__k=new Array(i),o=0;o<i;o++)(s=e[o])!=null&&typeof s!="boolean"&&typeof s!="function"?(u=o+E,(s=t.__k[o]=typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?tc(null,s,null,null,null):cc(s)?tc(uc,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?tc(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):s).__=t,s.__b=t.__b+1,c=null,(d=s.__i=R_(s,n,u,p))!==-1&&(p--,(c=n[d])&&(c.__u|=2)),c==null||c.__v===null?(d==-1&&E--,typeof s.type!="function"&&(s.__u|=4)):d!=u&&(d==u-1?E--:d==u+1?E++:(d>u?E--:E++,s.__u|=4))):t.__k[o]=null;if(p)for(o=0;o<g;o++)(c=n[o])!=null&&(2&c.__u)==0&&(c.__e==r&&(r=Lr(c)),Yd(c,c));return r}function Gd(t,e,n){var r,i;if(typeof t.type=="function"){for(r=t.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=t,e=Gd(r[i],e,n));return e}t.__e!=e&&(e&&t.type&&!n.contains(e)&&(e=Lr(t)),n.insertBefore(t.__e,e||null),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function R_(t,e,n,r){var i,o,s=t.key,c=t.type,u=e[n];if(u===null||u&&s==u.key&&c===u.type&&(2&u.__u)==0)return n;if(r>(u!=null&&(2&u.__u)==0?1:0))for(i=n-1,o=n+1;i>=0||o<e.length;){if(i>=0){if((u=e[i])&&(2&u.__u)==0&&s==u.key&&c===u.type)return i;i--}if(o<e.length){if((u=e[o])&&(2&u.__u)==0&&s==u.key&&c===u.type)return o;o++}}return-1}function Ld(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||A_.test(e)?n:n+"px"}function Bo(t,e,n,r,i){var o;e:if(e=="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof r=="string"&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||Ld(t.style,e,"");if(n)for(e in n)r&&n[e]===r[e]||Ld(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")o=e!=(e=e.replace(Ud,"$1")),e=e.toLowerCase()in t||e=="onFocusOut"||e=="onFocusIn"?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+o]=n,n?r?n.u=r.u:(n.u=ac,t.addEventListener(e,o?ic:rc,o)):t.removeEventListener(e,o?ic:rc,o);else{if(i=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n))}}function kd(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=ac++;else if(e.t<n.u)return;return n(je.event?je.event(e):e)}}}function Wd(t,e,n,r,i,o,s,c,u,d){var g,p,E,C,O,M,L,H,Y,oe,z,ye,B,fe,te,Ee,Me,xe=e.type;if(e.constructor!==void 0)return null;128&n.__u&&(u=!!(32&n.__u),o=[c=e.__e=n.__e]),(g=je.__b)&&g(e);e:if(typeof xe=="function")try{if(H=e.props,Y="prototype"in xe&&xe.prototype.render,oe=(g=xe.contextType)&&r[g.__c],z=g?oe?oe.props.value:g.__:r,n.__c?L=(p=e.__c=n.__c).__=p.__E:(Y?e.__c=p=new xe(H,z):(e.__c=p=new Pr(H,z),p.constructor=xe,p.render=L_),oe&&oe.sub(p),p.props=H,p.state||(p.state={}),p.context=z,p.__n=r,E=p.__d=!0,p.__h=[],p._sb=[]),Y&&p.__s==null&&(p.__s=p.state),Y&&xe.getDerivedStateFromProps!=null&&(p.__s==p.state&&(p.__s=Un({},p.__s)),Un(p.__s,xe.getDerivedStateFromProps(H,p.__s))),C=p.props,O=p.state,p.__v=e,E)Y&&xe.getDerivedStateFromProps==null&&p.componentWillMount!=null&&p.componentWillMount(),Y&&p.componentDidMount!=null&&p.__h.push(p.componentDidMount);else{if(Y&&xe.getDerivedStateFromProps==null&&H!==C&&p.componentWillReceiveProps!=null&&p.componentWillReceiveProps(H,z),!p.__e&&(p.shouldComponentUpdate!=null&&p.shouldComponentUpdate(H,p.__s,z)===!1||e.__v==n.__v)){for(e.__v!=n.__v&&(p.props=H,p.state=p.__s,p.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(Oe){Oe&&(Oe.__=e)}),ye=0;ye<p._sb.length;ye++)p.__h.push(p._sb[ye]);p._sb=[],p.__h.length&&s.push(p);break e}p.componentWillUpdate!=null&&p.componentWillUpdate(H,p.__s,z),Y&&p.componentDidUpdate!=null&&p.__h.push(function(){p.componentDidUpdate(C,O,M)})}if(p.context=z,p.props=H,p.__P=t,p.__e=!1,B=je.__r,fe=0,Y){for(p.state=p.__s,p.__d=!1,B&&B(e),g=p.render(p.props,p.state,p.context),te=0;te<p._sb.length;te++)p.__h.push(p._sb[te]);p._sb=[]}else do p.__d=!1,B&&B(e),g=p.render(p.props,p.state,p.context),p.state=p.__s;while(p.__d&&++fe<25);p.state=p.__s,p.getChildContext!=null&&(r=Un(Un({},r),p.getChildContext())),Y&&!E&&p.getSnapshotBeforeUpdate!=null&&(M=p.getSnapshotBeforeUpdate(C,O)),c=$d(t,cc(Ee=g!=null&&g.type===uc&&g.key==null?g.props.children:g)?Ee:[Ee],e,n,r,i,o,s,c,u,d),p.base=e.__e,e.__u&=-161,p.__h.length&&s.push(p),L&&(p.__E=p.__=null)}catch(Oe){if(e.__v=null,u||o!=null)if(Oe.then){for(e.__u|=u?160:128;c&&c.nodeType==8&&c.nextSibling;)c=c.nextSibling;o[o.indexOf(c)]=null,e.__e=c}else for(Me=o.length;Me--;)lc(o[Me]);else e.__e=n.__e,e.__k=n.__k;je.__e(Oe,e,n)}else o==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):c=e.__e=P_(n.__e,e,n,r,i,o,s,u,d);return(g=je.diffed)&&g(e),128&e.__u?void 0:c}function M_(t,e,n){for(var r=0;r<n.length;r++)dc(n[r],n[++r],n[++r]);je.__c&&je.__c(e,t),t.some(function(i){try{t=i.__h,i.__h=[],t.some(function(o){o.call(i)})}catch(o){je.__e(o,i.__v)}})}function P_(t,e,n,r,i,o,s,c,u){var d,g,p,E,C,O,M,L=n.props,H=e.props,Y=e.type;if(Y=="svg"?i="http://www.w3.org/2000/svg":Y=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),o!=null){for(d=0;d<o.length;d++)if((C=o[d])&&"setAttribute"in C==!!Y&&(Y?C.localName==Y:C.nodeType==3)){t=C,o[d]=null;break}}if(t==null){if(Y==null)return document.createTextNode(H);t=document.createElementNS(i,Y,H.is&&H),c&&(je.__m&&je.__m(e,o),c=!1),o=null}if(Y===null)L===H||c&&t.data===H||(t.data=H);else{if(o=o&&Fd.call(t.childNodes),L=n.props||oc,!c&&o!=null)for(L={},d=0;d<t.attributes.length;d++)L[(C=t.attributes[d]).name]=C.value;for(d in L)if(C=L[d],d!="children"){if(d=="dangerouslySetInnerHTML")p=C;else if(!(d in H)){if(d=="value"&&"defaultValue"in H||d=="checked"&&"defaultChecked"in H)continue;Bo(t,d,null,C,i)}}for(d in H)C=H[d],d=="children"?E=C:d=="dangerouslySetInnerHTML"?g=C:d=="value"?O=C:d=="checked"?M=C:c&&typeof C!="function"||L[d]===C||Bo(t,d,C,L[d],i);if(g)c||p&&(g.__html===p.__html||g.__html===t.innerHTML)||(t.innerHTML=g.__html),e.__k=[];else if(p&&(t.innerHTML=""),$d(t,cc(E)?E:[E],e,n,r,Y=="foreignObject"?"http://www.w3.org/1999/xhtml":i,o,s,o?o[0]:n.__k&&Lr(n,0),c,u),o!=null)for(d=o.length;d--;)lc(o[d]);c||(d="value",Y=="progress"&&O==null?t.removeAttribute("value"):O!==void 0&&(O!==t[d]||Y=="progress"&&!O||Y=="option"&&O!==L[d])&&Bo(t,d,O,L[d],i),d="checked",M!==void 0&&M!==t[d]&&Bo(t,d,M,L[d],i))}return t}function dc(t,e,n){try{if(typeof t=="function"){var r=typeof t.__u=="function";r&&t.__u(),r&&e==null||(t.__u=t(e))}else t.current=e}catch(i){je.__e(i,n)}}function Yd(t,e,n){var r,i;if(je.unmount&&je.unmount(t),(r=t.ref)&&(r.current&&r.current!==t.__e||dc(r,null,e)),(r=t.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){je.__e(o,e)}r.base=r.__P=null}if(r=t.__k)for(i=0;i<r.length;i++)r[i]&&Yd(r[i],e,n||typeof t.type!="function");n||lc(t.__e),t.__c=t.__=t.__e=void 0}function L_(t,e,n){return this.constructor(t,n)}Fd=Hd.slice,je={__e:function(t,e,n,r){for(var i,o,s;e=e.__;)if((i=e.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(t)),s=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(t,r||{}),s=i.__d),s)return i.__E=i}catch(c){t=c}throw t}},Vd=0,sc=function(t){return t!=null&&t.constructor==null},Pr.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Un({},this.state),typeof t=="function"&&(t=t(Un({},n),this.props)),t&&Un(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),Pd(this))},Pr.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),Pd(this))},Pr.prototype.render=uc,ar=[],Bd=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,nc=function(t,e){return t.__v.__b-e.__v.__b},Uo.__r=0,Ud=/(PointerCapture)$|Capture$/i,ac=0,rc=kd(!1),ic=kd(!0),D_=0;var pc,jt,fc,zd,Kd=0,nf=[],lt=je,Xd=lt.__b,qd=lt.__r,Zd=lt.diffed,Jd=lt.__c,Qd=lt.unmount,ef=lt.__;function k_(t,e){lt.__h&&lt.__h(jt,t,Kd||e),Kd=0;var n=jt.__H||(jt.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function mc(t,e){var n=k_(pc++,7);return B_(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function F_(){for(var t;t=nf.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(Ho),t.__H.__h.forEach(hc),t.__H.__h=[]}catch(e){t.__H.__h=[],lt.__e(e,t.__v)}}lt.__b=function(t){jt=null,Xd&&Xd(t)},lt.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),ef&&ef(t,e)},lt.__r=function(t){qd&&qd(t),pc=0;var e=(jt=t.__c).__H;e&&(fc===jt?(e.__h=[],jt.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.i=n.__N=void 0})):(e.__h.forEach(Ho),e.__h.forEach(hc),e.__h=[],pc=0)),fc=jt},lt.diffed=function(t){Zd&&Zd(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(nf.push(e)!==1&&zd===lt.requestAnimationFrame||((zd=lt.requestAnimationFrame)||V_)(F_)),e.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.i=void 0})),fc=jt=null},lt.__c=function(t,e){e.some(function(n){try{n.__h.forEach(Ho),n.__h=n.__h.filter(function(r){return!r.__||hc(r)})}catch(r){e.some(function(i){i.__h&&(i.__h=[])}),e=[],lt.__e(r,n.__v)}}),Jd&&Jd(t,e)},lt.unmount=function(t){Qd&&Qd(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Ho(r)}catch(i){e=i}}),n.__H=void 0,e&&lt.__e(e,n.__v))};var tf=typeof requestAnimationFrame=="function";function V_(t){var e,n=function(){clearTimeout(r),tf&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);tf&&(e=requestAnimationFrame(n))}function Ho(t){var e=jt,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),jt=e}function hc(t){var e=jt;t.__c=t.__(),jt=e}function B_(t,e){return!t||t.length!==e.length||e.some(function(n,r){return n!==t[r]})}var U_=Symbol.for("preact-signals");function _c(){if(kr>1)kr--;else{for(var t,e=!1;Ei!==void 0;){var n=Ei;for(Ei=void 0,gc++;n!==void 0;){var r=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&of(n))try{n.c()}catch(i){e||(t=i,e=!0)}n=r}}if(gc=0,kr--,e)throw t}}var $e=void 0;var Ei=void 0,kr=0,gc=0,jo=0;function rf(t){if($e!==void 0){var e=t.n;if(e===void 0||e.t!==$e)return e={i:0,S:t,p:$e.s,n:void 0,t:$e,e:void 0,x:void 0,r:e},$e.s!==void 0&&($e.s.n=e),$e.s=e,t.n=e,32&$e.f&&t.S(e),e;if(e.i===-1)return e.i=0,e.n!==void 0&&(e.n.p=e.p,e.p!==void 0&&(e.p.n=e.n),e.p=$e.s,e.n=void 0,$e.s.n=e,$e.s=e),e}}function ht(t){this.v=t,this.i=0,this.n=void 0,this.t=void 0}ht.prototype.brand=U_;ht.prototype.h=function(){return!0};ht.prototype.S=function(t){this.t!==t&&t.e===void 0&&(t.x=this.t,this.t!==void 0&&(this.t.e=t),this.t=t)};ht.prototype.U=function(t){if(this.t!==void 0){var e=t.e,n=t.x;e!==void 0&&(e.x=n,t.e=void 0),n!==void 0&&(n.e=e,t.x=void 0),t===this.t&&(this.t=n)}};ht.prototype.subscribe=function(t){var e=this;return $o(function(){var n=e.value,r=$e;$e=void 0;try{t(n)}finally{$e=r}})};ht.prototype.valueOf=function(){return this.value};ht.prototype.toString=function(){return this.value+""};ht.prototype.toJSON=function(){return this.value};ht.prototype.peek=function(){var t=$e;$e=void 0;try{return this.value}finally{$e=t}};Object.defineProperty(ht.prototype,"value",{get:function(){var t=rf(this);return t!==void 0&&(t.i=this.i),this.v},set:function(t){if(t!==this.v){if(gc>100)throw new Error("Cycle detected");this.v=t,this.i++,jo++,kr++;try{for(var e=this.t;e!==void 0;e=e.x)e.t.N()}finally{_c()}}}});function bi(t){return new ht(t)}function of(t){for(var e=t.s;e!==void 0;e=e.n)if(e.S.i!==e.i||!e.S.h()||e.S.i!==e.i)return!0;return!1}function sf(t){for(var e=t.s;e!==void 0;e=e.n){var n=e.S.n;if(n!==void 0&&(e.r=n),e.S.n=e,e.i=-1,e.n===void 0){t.s=e;break}}}function af(t){for(var e=t.s,n=void 0;e!==void 0;){var r=e.p;e.i===-1?(e.S.U(e),r!==void 0&&(r.n=e.n),e.n!==void 0&&(e.n.p=r)):n=e,e.S.n=e.r,e.r!==void 0&&(e.r=void 0),e=r}t.s=n}function Fr(t){ht.call(this,void 0),this.x=t,this.s=void 0,this.g=jo-1,this.f=4}(Fr.prototype=new ht).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===jo))return!0;if(this.g=jo,this.f|=1,this.i>0&&!of(this))return this.f&=-2,!0;var t=$e;try{sf(this),$e=this;var e=this.x();(16&this.f||this.v!==e||this.i===0)&&(this.v=e,this.f&=-17,this.i++)}catch(n){this.v=n,this.f|=16,this.i++}return $e=t,af(this),this.f&=-2,!0};Fr.prototype.S=function(t){if(this.t===void 0){this.f|=36;for(var e=this.s;e!==void 0;e=e.n)e.S.S(e)}ht.prototype.S.call(this,t)};Fr.prototype.U=function(t){if(this.t!==void 0&&(ht.prototype.U.call(this,t),this.t===void 0)){this.f&=-33;for(var e=this.s;e!==void 0;e=e.n)e.S.U(e)}};Fr.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var t=this.t;t!==void 0;t=t.x)t.t.N()}};Object.defineProperty(Fr.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var t=rf(this);if(this.h(),t!==void 0&&(t.i=this.i),16&this.f)throw this.v;return this.v}});function cf(t){return new Fr(t)}function lf(t){var e=t.u;if(t.u=void 0,typeof e=="function"){kr++;var n=$e;$e=void 0;try{e()}catch(r){throw t.f&=-2,t.f|=8,yc(t),r}finally{$e=n,_c()}}}function yc(t){for(var e=t.s;e!==void 0;e=e.n)e.S.U(e);t.x=void 0,t.s=void 0,lf(t)}function H_(t){if($e!==this)throw new Error("Out-of-order effect");af(this),$e=t,this.f&=-2,8&this.f&&yc(this),_c()}function wi(t){this.x=t,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}wi.prototype.c=function(){var t=this.S();try{if(8&this.f||this.x===void 0)return;var e=this.x();typeof e=="function"&&(this.u=e)}finally{t()}};wi.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,lf(this),sf(this),kr++;var t=$e;return $e=this,H_.bind(this,t)};wi.prototype.N=function(){2&this.f||(this.f|=2,this.o=Ei,Ei=this)};wi.prototype.d=function(){this.f|=8,1&this.f||yc(this)};function $o(t){var e=new wi(t);try{e.c()}catch(n){throw e.d(),n}return e.d.bind(e)}var Ec,vc;function Vr(t,e){je[t]=e.bind(null,je[t]||function(){})}function Go(t){vc&&vc(),vc=t&&t.S()}function uf(t){var e=this,n=t.data,r=$_(n);r.value=n;var i=mc(function(){for(var o=e.__v;o=o.__;)if(o.__c){o.__c.__$f|=4;break}return e.__$u.c=function(){var s,c=e.__$u.S(),u=i.value;c(),sc(u)||((s=e.base)==null?void 0:s.nodeType)!==3?(e.__$f|=1,e.setState({})):e.base.data=u},cf(function(){var s=r.value.value;return s===0?0:s===!0?"":s||""})},[]);return i.value}uf.displayName="_st";Object.defineProperties(ht.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:uf},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}});Vr("__b",function(t,e){if(typeof e.type=="string"){var n,r=e.props;for(var i in r)if(i!=="children"){var o=r[i];o instanceof ht&&(n||(e.__np=n={}),n[i]=o,r[i]=o.peek())}}t(e)});Vr("__r",function(t,e){Go();var n,r=e.__c;r&&(r.__$f&=-2,(n=r.__$u)===void 0&&(r.__$u=n=function(i){var o;return $o(function(){o=this}),o.c=function(){r.__$f|=1,r.setState({})},o}())),Ec=r,Go(n),t(e)});Vr("__e",function(t,e,n,r){Go(),Ec=void 0,t(e,n,r)});Vr("diffed",function(t,e){Go(),Ec=void 0;var n;if(typeof e.type=="string"&&(n=e.__e)){var r=e.__np,i=e.props;if(r){var o=n.U;if(o)for(var s in o){var c=o[s];c!==void 0&&!(s in r)&&(c.d(),o[s]=void 0)}else n.U=o={};for(var u in r){var d=o[u],g=r[u];d===void 0?(d=j_(n,u,g,i),o[u]=d):d.o(g,i)}}}t(e)});function j_(t,e,n,r){var i=e in t&&t.ownerSVGElement===void 0,o=bi(n);return{o:function(s,c){o.value=s,r=c},d:$o(function(){var s=o.value.value;r[e]!==s&&(r[e]=s,i?t[e]=s:s?t.setAttribute(e,s):t.removeAttribute(e))})}}Vr("unmount",function(t,e){if(typeof e.type=="string"){var n=e.__e;if(n){var r=n.U;if(r){n.U=void 0;for(var i in r){var o=r[i];o&&o.d()}}}}else{var s=e.__c;if(s){var c=s.__$u;c&&(s.__$u=void 0,c.d())}}t(e)});Vr("__h",function(t,e,n,r){(r<3||r===9)&&(e.__$f|=2),t(e,n,r)});Pr.prototype.shouldComponentUpdate=function(t,e){var n=this.__$u,r=n&&n.s!==void 0;for(var i in e)return!0;if(this.__f||typeof this.u=="boolean"&&this.u===!0){if(!(r||2&this.__$f||4&this.__$f)||1&this.__$f)return!0}else if(!(r||4&this.__$f)||3&this.__$f)return!0;for(var o in t)if(o!=="__source"&&t[o]!==this.props[o])return!0;for(var s in this.props)if(!(s in t))return!0;return!1};function $_(t){return mc(function(){return bi(t)},[])}var bc=(i=>(i.SIMPLE="SIMPLE",i.SWIPER="SWIPER",i.STORY="STORY",i.FLOATING_POPUP="FLOATING_POPUP",i))(bc||{}),wc=(r=>(r.ON="ON",r.OFF="OFF",r.ON_HOVER="ON_HOVER",r))(wc||{}),Cc=(r=>(r.FIRST_ITEM="FIRST_ITEM",r.BADGE="BADGE",r.NONE="NONE",r))(Cc||{});function G_(t,e){return e={exports:{}},t(e,e.exports),e.exports}var W_=X_,Y_=Z_,z_=ey,Sn=[],Jt=[],K_=typeof Uint8Array<"u"?Uint8Array:Array,Sc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(cr=0,df=Sc.length;cr<df;++cr)Sn[cr]=Sc[cr],Jt[Sc.charCodeAt(cr)]=cr;var cr,df;Jt[45]=62;Jt[95]=63;function Tf(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");n===-1&&(n=e);var r=n===e?0:4-n%4;return[n,r]}function X_(t){var e=Tf(t),n=e[0],r=e[1];return(n+r)*3/4-r}function q_(t,e,n){return(e+n)*3/4-n}function Z_(t){var e,n=Tf(t),r=n[0],i=n[1],o=new K_(q_(t,r,i)),s=0,c=i>0?r-4:r,u;for(u=0;u<c;u+=4)e=Jt[t.charCodeAt(u)]<<18|Jt[t.charCodeAt(u+1)]<<12|Jt[t.charCodeAt(u+2)]<<6|Jt[t.charCodeAt(u+3)],o[s++]=e>>16&255,o[s++]=e>>8&255,o[s++]=e&255;return i===2&&(e=Jt[t.charCodeAt(u)]<<2|Jt[t.charCodeAt(u+1)]>>4,o[s++]=e&255),i===1&&(e=Jt[t.charCodeAt(u)]<<10|Jt[t.charCodeAt(u+1)]<<4|Jt[t.charCodeAt(u+2)]>>2,o[s++]=e>>8&255,o[s++]=e&255),o}function J_(t){return Sn[t>>18&63]+Sn[t>>12&63]+Sn[t>>6&63]+Sn[t&63]}function Q_(t,e,n){for(var r,i=[],o=e;o<n;o+=3)r=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(t[o+2]&255),i.push(J_(r));return i.join("")}function ey(t){for(var e,n=t.length,r=n%3,i=[],o=16383,s=0,c=n-r;s<c;s+=o)i.push(Q_(t,s,s+o>c?c:s+o));return r===1?(e=t[n-1],i.push(Sn[e>>2]+Sn[e<<4&63]+"==")):r===2&&(e=(t[n-2]<<8)+t[n-1],i.push(Sn[e>>10]+Sn[e>>4&63]+Sn[e<<2&63]+"=")),i.join("")}var Ic={byteLength:W_,toByteArray:Y_,fromByteArray:z_};var ty=function(e,n,r,i,o){var s,c,u=o*8-i-1,d=(1<<u)-1,g=d>>1,p=-7,E=r?o-1:0,C=r?-1:1,O=e[n+E];for(E+=C,s=O&(1<<-p)-1,O>>=-p,p+=u;p>0;s=s*256+e[n+E],E+=C,p-=8);for(c=s&(1<<-p)-1,s>>=-p,p+=i;p>0;c=c*256+e[n+E],E+=C,p-=8);if(s===0)s=1-g;else{if(s===d)return c?NaN:(O?-1:1)*(1/0);c=c+Math.pow(2,i),s=s-g}return(O?-1:1)*c*Math.pow(2,s-i)},ny=function(e,n,r,i,o,s){var c,u,d,g=s*8-o-1,p=(1<<g)-1,E=p>>1,C=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,O=i?0:s-1,M=i?1:-1,L=n<0||n===0&&1/n<0?1:0;for(n=Math.abs(n),isNaN(n)||n===1/0?(u=isNaN(n)?1:0,c=p):(c=Math.floor(Math.log(n)/Math.LN2),n*(d=Math.pow(2,-c))<1&&(c--,d*=2),c+E>=1?n+=C/d:n+=C*Math.pow(2,1-E),n*d>=2&&(c++,d/=2),c+E>=p?(u=0,c=p):c+E>=1?(u=(n*d-1)*Math.pow(2,o),c=c+E):(u=n*Math.pow(2,E-1)*Math.pow(2,o),c=0));o>=8;e[r+O]=u&255,O+=M,u/=256,o-=8);for(c=c<<o|u,g+=o;g>0;e[r+O]=c&255,O+=M,c/=256,g-=8);e[r+O-M]|=L*128},Br={read:ty,write:ny},zo=G_(function(t,e){var n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=s,e.SlowBuffer=H,e.INSPECT_MAX_BYTES=50;var r=2147483647;e.kMaxLength=r,s.TYPED_ARRAY_SUPPORT=i(),!s.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function i(){try{var h=new Uint8Array(1),a={foo:function(){return 42}};return Object.setPrototypeOf(a,Uint8Array.prototype),Object.setPrototypeOf(h,a),h.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function o(h){if(h>r)throw new RangeError('The value "'+h+'" is invalid for option "size"');var a=new Uint8Array(h);return Object.setPrototypeOf(a,s.prototype),a}function s(h,a,l){if(typeof h=="number"){if(typeof a=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return g(h)}return c(h,a,l)}s.poolSize=8192;function c(h,a,l){if(typeof h=="string")return p(h,a);if(ArrayBuffer.isView(h))return C(h);if(h==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(h));if(pe(h,ArrayBuffer)||h&&pe(h.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(pe(h,SharedArrayBuffer)||h&&pe(h.buffer,SharedArrayBuffer)))return O(h,a,l);if(typeof h=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var _=h.valueOf&&h.valueOf();if(_!=null&&_!==h)return s.from(_,a,l);var I=M(h);if(I)return I;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof h[Symbol.toPrimitive]=="function")return s.from(h[Symbol.toPrimitive]("string"),a,l);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(h))}s.from=function(h,a,l){return c(h,a,l)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function u(h){if(typeof h!="number")throw new TypeError('"size" argument must be of type number');if(h<0)throw new RangeError('The value "'+h+'" is invalid for option "size"')}function d(h,a,l){return u(h),h<=0?o(h):a!==void 0?typeof l=="string"?o(h).fill(a,l):o(h).fill(a):o(h)}s.alloc=function(h,a,l){return d(h,a,l)};function g(h){return u(h),o(h<0?0:L(h)|0)}s.allocUnsafe=function(h){return g(h)},s.allocUnsafeSlow=function(h){return g(h)};function p(h,a){if((typeof a!="string"||a==="")&&(a="utf8"),!s.isEncoding(a))throw new TypeError("Unknown encoding: "+a);var l=Y(h,a)|0,_=o(l),I=_.write(h,a);return I!==l&&(_=_.slice(0,I)),_}function E(h){for(var a=h.length<0?0:L(h.length)|0,l=o(a),_=0;_<a;_+=1)l[_]=h[_]&255;return l}function C(h){if(pe(h,Uint8Array)){var a=new Uint8Array(h);return O(a.buffer,a.byteOffset,a.byteLength)}return E(h)}function O(h,a,l){if(a<0||h.byteLength<a)throw new RangeError('"offset" is outside of buffer bounds');if(h.byteLength<a+(l||0))throw new RangeError('"length" is outside of buffer bounds');var _;return a===void 0&&l===void 0?_=new Uint8Array(h):l===void 0?_=new Uint8Array(h,a):_=new Uint8Array(h,a,l),Object.setPrototypeOf(_,s.prototype),_}function M(h){if(s.isBuffer(h)){var a=L(h.length)|0,l=o(a);return l.length===0||h.copy(l,0,0,a),l}if(h.length!==void 0)return typeof h.length!="number"||he(h.length)?o(0):E(h);if(h.type==="Buffer"&&Array.isArray(h.data))return E(h.data)}function L(h){if(h>=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return h|0}function H(h){return+h!=h&&(h=0),s.alloc(+h)}s.isBuffer=function(a){return a!=null&&a._isBuffer===!0&&a!==s.prototype},s.compare=function(a,l){if(pe(a,Uint8Array)&&(a=s.from(a,a.offset,a.byteLength)),pe(l,Uint8Array)&&(l=s.from(l,l.offset,l.byteLength)),!s.isBuffer(a)||!s.isBuffer(l))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(a===l)return 0;for(var _=a.length,I=l.length,N=0,F=Math.min(_,I);N<F;++N)if(a[N]!==l[N]){_=a[N],I=l[N];break}return _<I?-1:I<_?1:0},s.isEncoding=function(a){switch(String(a).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(a,l){if(!Array.isArray(a))throw new TypeError('"list" argument must be an Array of Buffers');if(a.length===0)return s.alloc(0);var _;if(l===void 0)for(l=0,_=0;_<a.length;++_)l+=a[_].length;var I=s.allocUnsafe(l),N=0;for(_=0;_<a.length;++_){var F=a[_];if(pe(F,Uint8Array))N+F.length>I.length?s.from(F).copy(I,N):Uint8Array.prototype.set.call(I,F,N);else if(s.isBuffer(F))F.copy(I,N);else throw new TypeError('"list" argument must be an Array of Buffers');N+=F.length}return I};function Y(h,a){if(s.isBuffer(h))return h.length;if(ArrayBuffer.isView(h)||pe(h,ArrayBuffer))return h.byteLength;if(typeof h!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+babelHelpers.typeof(h));var l=h.length,_=arguments.length>2&&arguments[2]===!0;if(!_&&l===0)return 0;for(var I=!1;;)switch(a){case"ascii":case"latin1":case"binary":return l;case"utf8":case"utf-8":return Q(h).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return l*2;case"hex":return l>>>1;case"base64":return de(h).length;default:if(I)return _?-1:Q(h).length;a=(""+a).toLowerCase(),I=!0}}s.byteLength=Y;function oe(h,a,l){var _=!1;if((a===void 0||a<0)&&(a=0),a>this.length||((l===void 0||l>this.length)&&(l=this.length),l<=0)||(l>>>=0,a>>>=0,l<=a))return"";for(h||(h="utf8");;)switch(h){case"hex":return k(this,a,l);case"utf8":case"utf-8":return Ge(this,a,l);case"ascii":return A(this,a,l);case"latin1":case"binary":return T(this,a,l);case"base64":return Oe(this,a,l);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,a,l);default:if(_)throw new TypeError("Unknown encoding: "+h);h=(h+"").toLowerCase(),_=!0}}s.prototype._isBuffer=!0;function z(h,a,l){var _=h[a];h[a]=h[l],h[l]=_}s.prototype.swap16=function(){var a=this.length;if(a%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var l=0;l<a;l+=2)z(this,l,l+1);return this},s.prototype.swap32=function(){var a=this.length;if(a%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var l=0;l<a;l+=4)z(this,l,l+3),z(this,l+1,l+2);return this},s.prototype.swap64=function(){var a=this.length;if(a%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var l=0;l<a;l+=8)z(this,l,l+7),z(this,l+1,l+6),z(this,l+2,l+5),z(this,l+3,l+4);return this},s.prototype.toString=function(){var a=this.length;return a===0?"":arguments.length===0?Ge(this,0,a):oe.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(a){if(!s.isBuffer(a))throw new TypeError("Argument must be a Buffer");return this===a?!0:s.compare(this,a)===0},s.prototype.inspect=function(){var a="",l=e.INSPECT_MAX_BYTES;return a=this.toString("hex",0,l).replace(/(.{2})/g,"$1 ").trim(),this.length>l&&(a+=" ... "),"<Buffer "+a+">"},n&&(s.prototype[n]=s.prototype.inspect),s.prototype.compare=function(a,l,_,I,N){if(pe(a,Uint8Array)&&(a=s.from(a,a.offset,a.byteLength)),!s.isBuffer(a))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+babelHelpers.typeof(a));if(l===void 0&&(l=0),_===void 0&&(_=a?a.length:0),I===void 0&&(I=0),N===void 0&&(N=this.length),l<0||_>a.length||I<0||N>this.length)throw new RangeError("out of range index");if(I>=N&&l>=_)return 0;if(I>=N)return-1;if(l>=_)return 1;if(l>>>=0,_>>>=0,I>>>=0,N>>>=0,this===a)return 0;for(var F=N-I,_e=_-l,we=Math.min(F,_e),ve=this.slice(I,N),Pe=a.slice(l,_),Le=0;Le<we;++Le)if(ve[Le]!==Pe[Le]){F=ve[Le],_e=Pe[Le];break}return F<_e?-1:_e<F?1:0};function ye(h,a,l,_,I){if(h.length===0)return-1;if(typeof l=="string"?(_=l,l=0):l>2147483647?l=2147483647:l<-2147483648&&(l=-2147483648),l=+l,he(l)&&(l=I?0:h.length-1),l<0&&(l=h.length+l),l>=h.length){if(I)return-1;l=h.length-1}else if(l<0)if(I)l=0;else return-1;if(typeof a=="string"&&(a=s.from(a,_)),s.isBuffer(a))return a.length===0?-1:B(h,a,l,_,I);if(typeof a=="number")return a=a&255,typeof Uint8Array.prototype.indexOf=="function"?I?Uint8Array.prototype.indexOf.call(h,a,l):Uint8Array.prototype.lastIndexOf.call(h,a,l):B(h,[a],l,_,I);throw new TypeError("val must be string, number or Buffer")}function B(h,a,l,_,I){var N=1,F=h.length,_e=a.length;if(_!==void 0&&(_=String(_).toLowerCase(),_==="ucs2"||_==="ucs-2"||_==="utf16le"||_==="utf-16le")){if(h.length<2||a.length<2)return-1;N=2,F/=2,_e/=2,l/=2}function we(Lt,$t){return N===1?Lt[$t]:Lt.readUInt16BE($t*N)}var ve;if(I){var Pe=-1;for(ve=l;ve<F;ve++)if(we(h,ve)===we(a,Pe===-1?0:ve-Pe)){if(Pe===-1&&(Pe=ve),ve-Pe+1===_e)return Pe*N}else Pe!==-1&&(ve-=ve-Pe),Pe=-1}else for(l+_e>F&&(l=F-_e),ve=l;ve>=0;ve--){for(var Le=!0,Xe=0;Xe<_e;Xe++)if(we(h,ve+Xe)!==we(a,Xe)){Le=!1;break}if(Le)return ve}return-1}s.prototype.includes=function(a,l,_){return this.indexOf(a,l,_)!==-1},s.prototype.indexOf=function(a,l,_){return ye(this,a,l,_,!0)},s.prototype.lastIndexOf=function(a,l,_){return ye(this,a,l,_,!1)};function fe(h,a,l,_){l=Number(l)||0;var I=h.length-l;_?(_=Number(_),_>I&&(_=I)):_=I;var N=a.length;_>N/2&&(_=N/2);for(var F=0;F<_;++F){var _e=parseInt(a.substr(F*2,2),16);if(he(_e))return F;h[l+F]=_e}return F}function te(h,a,l,_){return ce(Q(a,h.length-l),h,l,_)}function Ee(h,a,l,_){return ce(ae(a),h,l,_)}function Me(h,a,l,_){return ce(de(a),h,l,_)}function xe(h,a,l,_){return ce(ee(a,h.length-l),h,l,_)}s.prototype.write=function(a,l,_,I){if(l===void 0)I="utf8",_=this.length,l=0;else if(_===void 0&&typeof l=="string")I=l,_=this.length,l=0;else if(isFinite(l))l=l>>>0,isFinite(_)?(_=_>>>0,I===void 0&&(I="utf8")):(I=_,_=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var N=this.length-l;if((_===void 0||_>N)&&(_=N),a.length>0&&(_<0||l<0)||l>this.length)throw new RangeError("Attempt to write outside buffer bounds");I||(I="utf8");for(var F=!1;;)switch(I){case"hex":return fe(this,a,l,_);case"utf8":case"utf-8":return te(this,a,l,_);case"ascii":case"latin1":case"binary":return Ee(this,a,l,_);case"base64":return Me(this,a,l,_);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return xe(this,a,l,_);default:if(F)throw new TypeError("Unknown encoding: "+I);I=(""+I).toLowerCase(),F=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Oe(h,a,l){return a===0&&l===h.length?Ic.fromByteArray(h):Ic.fromByteArray(h.slice(a,l))}function Ge(h,a,l){l=Math.min(h.length,l);for(var _=[],I=a;I<l;){var N=h[I],F=null,_e=N>239?4:N>223?3:N>191?2:1;if(I+_e<=l){var we,ve,Pe,Le;switch(_e){case 1:N<128&&(F=N);break;case 2:we=h[I+1],(we&192)===128&&(Le=(N&31)<<6|we&63,Le>127&&(F=Le));break;case 3:we=h[I+1],ve=h[I+2],(we&192)===128&&(ve&192)===128&&(Le=(N&15)<<12|(we&63)<<6|ve&63,Le>2047&&(Le<55296||Le>57343)&&(F=Le));break;case 4:we=h[I+1],ve=h[I+2],Pe=h[I+3],(we&192)===128&&(ve&192)===128&&(Pe&192)===128&&(Le=(N&15)<<18|(we&63)<<12|(ve&63)<<6|Pe&63,Le>65535&&Le<1114112&&(F=Le))}}F===null?(F=65533,_e=1):F>65535&&(F-=65536,_.push(F>>>10&1023|55296),F=56320|F&1023),_.push(F),I+=_e}return ut(_)}var We=4096;function ut(h){var a=h.length;if(a<=We)return String.fromCharCode.apply(String,h);for(var l="",_=0;_<a;)l+=String.fromCharCode.apply(String,h.slice(_,_+=We));return l}function A(h,a,l){var _="";l=Math.min(h.length,l);for(var I=a;I<l;++I)_+=String.fromCharCode(h[I]&127);return _}function T(h,a,l){var _="";l=Math.min(h.length,l);for(var I=a;I<l;++I)_+=String.fromCharCode(h[I]);return _}function k(h,a,l){var _=h.length;(!a||a<0)&&(a=0),(!l||l<0||l>_)&&(l=_);for(var I="",N=a;N<l;++N)I+=me[h[N]];return I}function P(h,a,l){for(var _=h.slice(a,l),I="",N=0;N<_.length-1;N+=2)I+=String.fromCharCode(_[N]+_[N+1]*256);return I}s.prototype.slice=function(a,l){var _=this.length;a=~~a,l=l===void 0?_:~~l,a<0?(a+=_,a<0&&(a=0)):a>_&&(a=_),l<0?(l+=_,l<0&&(l=0)):l>_&&(l=_),l<a&&(l=a);var I=this.subarray(a,l);return Object.setPrototypeOf(I,s.prototype),I};function y(h,a,l){if(h%1!==0||h<0)throw new RangeError("offset is not uint");if(h+a>l)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(a,l,_){a=a>>>0,l=l>>>0,_||y(a,l,this.length);for(var I=this[a],N=1,F=0;++F<l&&(N*=256);)I+=this[a+F]*N;return I},s.prototype.readUintBE=s.prototype.readUIntBE=function(a,l,_){a=a>>>0,l=l>>>0,_||y(a,l,this.length);for(var I=this[a+--l],N=1;l>0&&(N*=256);)I+=this[a+--l]*N;return I},s.prototype.readUint8=s.prototype.readUInt8=function(a,l){return a=a>>>0,l||y(a,1,this.length),this[a]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(a,l){return a=a>>>0,l||y(a,2,this.length),this[a]|this[a+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(a,l){return a=a>>>0,l||y(a,2,this.length),this[a]<<8|this[a+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(a,l){return a=a>>>0,l||y(a,4,this.length),(this[a]|this[a+1]<<8|this[a+2]<<16)+this[a+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(a,l){return a=a>>>0,l||y(a,4,this.length),this[a]*16777216+(this[a+1]<<16|this[a+2]<<8|this[a+3])},s.prototype.readIntLE=function(a,l,_){a=a>>>0,l=l>>>0,_||y(a,l,this.length);for(var I=this[a],N=1,F=0;++F<l&&(N*=256);)I+=this[a+F]*N;return N*=128,I>=N&&(I-=Math.pow(2,8*l)),I},s.prototype.readIntBE=function(a,l,_){a=a>>>0,l=l>>>0,_||y(a,l,this.length);for(var I=l,N=1,F=this[a+--I];I>0&&(N*=256);)F+=this[a+--I]*N;return N*=128,F>=N&&(F-=Math.pow(2,8*l)),F},s.prototype.readInt8=function(a,l){return a=a>>>0,l||y(a,1,this.length),this[a]&128?(255-this[a]+1)*-1:this[a]},s.prototype.readInt16LE=function(a,l){a=a>>>0,l||y(a,2,this.length);var _=this[a]|this[a+1]<<8;return _&32768?_|4294901760:_},s.prototype.readInt16BE=function(a,l){a=a>>>0,l||y(a,2,this.length);var _=this[a+1]|this[a]<<8;return _&32768?_|4294901760:_},s.prototype.readInt32LE=function(a,l){return a=a>>>0,l||y(a,4,this.length),this[a]|this[a+1]<<8|this[a+2]<<16|this[a+3]<<24},s.prototype.readInt32BE=function(a,l){return a=a>>>0,l||y(a,4,this.length),this[a]<<24|this[a+1]<<16|this[a+2]<<8|this[a+3]},s.prototype.readFloatLE=function(a,l){return a=a>>>0,l||y(a,4,this.length),Br.read(this,a,!0,23,4)},s.prototype.readFloatBE=function(a,l){return a=a>>>0,l||y(a,4,this.length),Br.read(this,a,!1,23,4)},s.prototype.readDoubleLE=function(a,l){return a=a>>>0,l||y(a,8,this.length),Br.read(this,a,!0,52,8)},s.prototype.readDoubleBE=function(a,l){return a=a>>>0,l||y(a,8,this.length),Br.read(this,a,!1,52,8)};function v(h,a,l,_,I,N){if(!s.isBuffer(h))throw new TypeError('"buffer" argument must be a Buffer instance');if(a>I||a<N)throw new RangeError('"value" argument is out of bounds');if(l+_>h.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(a,l,_,I){if(a=+a,l=l>>>0,_=_>>>0,!I){var N=Math.pow(2,8*_)-1;v(this,a,l,_,N,0)}var F=1,_e=0;for(this[l]=a&255;++_e<_&&(F*=256);)this[l+_e]=a/F&255;return l+_},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(a,l,_,I){if(a=+a,l=l>>>0,_=_>>>0,!I){var N=Math.pow(2,8*_)-1;v(this,a,l,_,N,0)}var F=_-1,_e=1;for(this[l+F]=a&255;--F>=0&&(_e*=256);)this[l+F]=a/_e&255;return l+_},s.prototype.writeUint8=s.prototype.writeUInt8=function(a,l,_){return a=+a,l=l>>>0,_||v(this,a,l,1,255,0),this[l]=a&255,l+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(a,l,_){return a=+a,l=l>>>0,_||v(this,a,l,2,65535,0),this[l]=a&255,this[l+1]=a>>>8,l+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(a,l,_){return a=+a,l=l>>>0,_||v(this,a,l,2,65535,0),this[l]=a>>>8,this[l+1]=a&255,l+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(a,l,_){return a=+a,l=l>>>0,_||v(this,a,l,4,4294967295,0),this[l+3]=a>>>24,this[l+2]=a>>>16,this[l+1]=a>>>8,this[l]=a&255,l+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(a,l,_){return a=+a,l=l>>>0,_||v(this,a,l,4,4294967295,0),this[l]=a>>>24,this[l+1]=a>>>16,this[l+2]=a>>>8,this[l+3]=a&255,l+4},s.prototype.writeIntLE=function(a,l,_,I){if(a=+a,l=l>>>0,!I){var N=Math.pow(2,8*_-1);v(this,a,l,_,N-1,-N)}var F=0,_e=1,we=0;for(this[l]=a&255;++F<_&&(_e*=256);)a<0&&we===0&&this[l+F-1]!==0&&(we=1),this[l+F]=(a/_e>>0)-we&255;return l+_},s.prototype.writeIntBE=function(a,l,_,I){if(a=+a,l=l>>>0,!I){var N=Math.pow(2,8*_-1);v(this,a,l,_,N-1,-N)}var F=_-1,_e=1,we=0;for(this[l+F]=a&255;--F>=0&&(_e*=256);)a<0&&we===0&&this[l+F+1]!==0&&(we=1),this[l+F]=(a/_e>>0)-we&255;return l+_},s.prototype.writeInt8=function(a,l,_){return a=+a,l=l>>>0,_||v(this,a,l,1,127,-128),a<0&&(a=255+a+1),this[l]=a&255,l+1},s.prototype.writeInt16LE=function(a,l,_){return a=+a,l=l>>>0,_||v(this,a,l,2,32767,-32768),this[l]=a&255,this[l+1]=a>>>8,l+2},s.prototype.writeInt16BE=function(a,l,_){return a=+a,l=l>>>0,_||v(this,a,l,2,32767,-32768),this[l]=a>>>8,this[l+1]=a&255,l+2},s.prototype.writeInt32LE=function(a,l,_){return a=+a,l=l>>>0,_||v(this,a,l,4,2147483647,-2147483648),this[l]=a&255,this[l+1]=a>>>8,this[l+2]=a>>>16,this[l+3]=a>>>24,l+4},s.prototype.writeInt32BE=function(a,l,_){return a=+a,l=l>>>0,_||v(this,a,l,4,2147483647,-2147483648),a<0&&(a=4294967295+a+1),this[l]=a>>>24,this[l+1]=a>>>16,this[l+2]=a>>>8,this[l+3]=a&255,l+4};function U(h,a,l,_,I,N){if(l+_>h.length)throw new RangeError("Index out of range");if(l<0)throw new RangeError("Index out of range")}function Z(h,a,l,_,I){return a=+a,l=l>>>0,I||U(h,a,l,4),Br.write(h,a,l,_,23,4),l+4}s.prototype.writeFloatLE=function(a,l,_){return Z(this,a,l,!0,_)},s.prototype.writeFloatBE=function(a,l,_){return Z(this,a,l,!1,_)};function ne(h,a,l,_,I){return a=+a,l=l>>>0,I||U(h,a,l,8),Br.write(h,a,l,_,52,8),l+8}s.prototype.writeDoubleLE=function(a,l,_){return ne(this,a,l,!0,_)},s.prototype.writeDoubleBE=function(a,l,_){return ne(this,a,l,!1,_)},s.prototype.copy=function(a,l,_,I){if(!s.isBuffer(a))throw new TypeError("argument should be a Buffer");if(_||(_=0),!I&&I!==0&&(I=this.length),l>=a.length&&(l=a.length),l||(l=0),I>0&&I<_&&(I=_),I===_||a.length===0||this.length===0)return 0;if(l<0)throw new RangeError("targetStart out of bounds");if(_<0||_>=this.length)throw new RangeError("Index out of range");if(I<0)throw new RangeError("sourceEnd out of bounds");I>this.length&&(I=this.length),a.length-l<I-_&&(I=a.length-l+_);var N=I-_;return this===a&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(l,_,I):Uint8Array.prototype.set.call(a,this.subarray(_,I),l),N},s.prototype.fill=function(a,l,_,I){if(typeof a=="string"){if(typeof l=="string"?(I=l,l=0,_=this.length):typeof _=="string"&&(I=_,_=this.length),I!==void 0&&typeof I!="string")throw new TypeError("encoding must be a string");if(typeof I=="string"&&!s.isEncoding(I))throw new TypeError("Unknown encoding: "+I);if(a.length===1){var N=a.charCodeAt(0);(I==="utf8"&&N<128||I==="latin1")&&(a=N)}}else typeof a=="number"?a=a&255:typeof a=="boolean"&&(a=Number(a));if(l<0||this.length<l||this.length<_)throw new RangeError("Out of range index");if(_<=l)return this;l=l>>>0,_=_===void 0?this.length:_>>>0,a||(a=0);var F;if(typeof a=="number")for(F=l;F<_;++F)this[F]=a;else{var _e=s.isBuffer(a)?a:s.from(a,I),we=_e.length;if(we===0)throw new TypeError('The value "'+a+'" is invalid for argument "value"');for(F=0;F<_-l;++F)this[F+l]=_e[F%we]}return this};var ie=/[^+/0-9A-Za-z-_]/g;function ue(h){if(h=h.split("=")[0],h=h.trim().replace(ie,""),h.length<2)return"";for(;h.length%4!==0;)h=h+"=";return h}function Q(h,a){a=a||1/0;for(var l,_=h.length,I=null,N=[],F=0;F<_;++F){if(l=h.charCodeAt(F),l>55295&&l<57344){if(!I){if(l>56319){(a-=3)>-1&&N.push(239,191,189);continue}else if(F+1===_){(a-=3)>-1&&N.push(239,191,189);continue}I=l;continue}if(l<56320){(a-=3)>-1&&N.push(239,191,189),I=l;continue}l=(I-55296<<10|l-56320)+65536}else I&&(a-=3)>-1&&N.push(239,191,189);if(I=null,l<128){if((a-=1)<0)break;N.push(l)}else if(l<2048){if((a-=2)<0)break;N.push(l>>6|192,l&63|128)}else if(l<65536){if((a-=3)<0)break;N.push(l>>12|224,l>>6&63|128,l&63|128)}else if(l<1114112){if((a-=4)<0)break;N.push(l>>18|240,l>>12&63|128,l>>6&63|128,l&63|128)}else throw new Error("Invalid code point")}return N}function ae(h){for(var a=[],l=0;l<h.length;++l)a.push(h.charCodeAt(l)&255);return a}function ee(h,a){for(var l,_,I,N=[],F=0;F<h.length&&!((a-=2)<0);++F)l=h.charCodeAt(F),_=l>>8,I=l%256,N.push(I),N.push(_);return N}function de(h){return Ic.toByteArray(ue(h))}function ce(h,a,l,_){for(var I=0;I<_&&!(I+l>=a.length||I>=h.length);++I)a[I+l]=h[I];return I}function pe(h,a){return h instanceof a||h!=null&&h.constructor!=null&&h.constructor.name!=null&&h.constructor.name===a.name}function he(h){return h!==h}var me=function(){for(var h="0123456789abcdef",a=new Array(256),l=0;l<16;++l)for(var _=l*16,I=0;I<16;++I)a[_+I]=h[l]+h[I];return a}()}),Re=zo.Buffer;zo.SlowBuffer;zo.INSPECT_MAX_BYTES;zo.kMaxLength;var Ac=function(e,n){return Ac=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)i.hasOwnProperty(o)&&(r[o]=i[o])},Ac(e,n)};function Ko(t,e){Ac(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var ur=function(t){Ko(e,t);function e(n){var r=t.call(this,n)||this;return Object.setPrototypeOf(r,e.prototype),r}return Object.defineProperty(e.prototype,"name",{get:function(){return"BSONError"},enumerable:!1,configurable:!0}),e}(Error),Je=function(t){Ko(e,t);function e(n){var r=t.call(this,n)||this;return Object.setPrototypeOf(r,e.prototype),r}return Object.defineProperty(e.prototype,"name",{get:function(){return"BSONTypeError"},enumerable:!1,configurable:!0}),e}(TypeError);function Wo(t){return t&&t.Math==Math&&t}function Of(){return Wo(typeof globalThis=="object"&&globalThis)||Wo(typeof window=="object"&&window)||Wo(typeof self=="object"&&self)||Wo(typeof global=="object"&&global)||Function("return this")()}function ry(){var t=Of();return typeof t.navigator=="object"&&t.navigator.product==="ReactNative"}var iy=function(e){var n=ry()?"BSON: For React Native please polyfill crypto.getRandomValues, e.g. using: https://www.npmjs.com/package/react-native-get-random-values.":"BSON: No cryptographic implementation for random bytes present, falling back to a less secure implementation.";console.warn(n);for(var r=Re.alloc(e),i=0;i<e;++i)r[i]=Math.floor(Math.random()*256);return r},oy=function(){{if(typeof window<"u"){var t=window.crypto||window.msCrypto;if(t&&t.getRandomValues)return function(e){return t.getRandomValues(Re.alloc(e))}}return typeof global<"u"&&global.crypto&&global.crypto.getRandomValues?function(e){return global.crypto.getRandomValues(Re.alloc(e))}:iy}},Df=oy();function sy(t){return["[object ArrayBuffer]","[object SharedArrayBuffer]"].includes(Object.prototype.toString.call(t))}function Rc(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}function ay(t){return Object.prototype.toString.call(t)==="[object RegExp]"}function cy(t){return xi(t)&&Object.prototype.toString.call(t)==="[object Date]"}function xi(t){return typeof t=="object"&&t!==null}function Xo(t,e){var n=!1;function r(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];return n||(console.warn(e),n=!0),t.apply(this,i)}return r}function Yo(t){if(ArrayBuffer.isView(t))return Re.from(t.buffer,t.byteOffset,t.byteLength);if(sy(t))return Re.from(t);throw new Je("Must use either Buffer or TypedArray")}var ly=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[0-9a-f]{12}4[0-9a-f]{3}[89ab][0-9a-f]{15})$/i,Af=function(t){return typeof t=="string"&&ly.test(t)},Nc=function(t){if(!Af(t))throw new Je('UUID string representations must be a 32 or 36 character hex string (dashes excluded/included). Format: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" or "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx".');var e=t.replace(/-/g,"");return Re.from(e,"hex")},ff=function(t,e){return e===void 0&&(e=!0),e?t.toString("hex",0,4)+"-"+t.toString("hex",4,6)+"-"+t.toString("hex",6,8)+"-"+t.toString("hex",8,10)+"-"+t.toString("hex",10,16):t.toString("hex")};var RO=Math.pow(2,63)-1,MO=-Math.pow(2,63),uy=Math.pow(2,53),dy=-Math.pow(2,53);var Nf=4;var dr=function(){function t(e,n){if(!(this instanceof t))return new t(e,n);if(e!=null&&typeof e!="string"&&!ArrayBuffer.isView(e)&&!(e instanceof ArrayBuffer)&&!Array.isArray(e))throw new Je("Binary can only be constructed from string, Buffer, TypedArray, or Array<number>");this.sub_type=n??t.BSON_BINARY_SUBTYPE_DEFAULT,e==null?(this.buffer=Re.alloc(t.BUFFER_SIZE),this.position=0):(typeof e=="string"?this.buffer=Re.from(e,"binary"):Array.isArray(e)?this.buffer=Re.from(e):this.buffer=Yo(e),this.position=this.buffer.byteLength)}return t.prototype.put=function(e){if(typeof e=="string"&&e.length!==1)throw new Je("only accepts single character String");if(typeof e!="number"&&e.length!==1)throw new Je("only accepts single character Uint8Array or Array");var n;if(typeof e=="string"?n=e.charCodeAt(0):typeof e=="number"?n=e:n=e[0],n<0||n>255)throw new Je("only accepts number in a valid unsigned byte range 0-255");if(this.buffer.length>this.position)this.buffer[this.position++]=n;else{var r=Re.alloc(t.BUFFER_SIZE+this.buffer.length);this.buffer.copy(r,0,0,this.buffer.length),this.buffer=r,this.buffer[this.position++]=n}},t.prototype.write=function(e,n){if(n=typeof n=="number"?n:this.position,this.buffer.length<n+e.length){var r=Re.alloc(this.buffer.length+e.length);this.buffer.copy(r,0,0,this.buffer.length),this.buffer=r}ArrayBuffer.isView(e)?(this.buffer.set(Yo(e),n),this.position=n+e.byteLength>this.position?n+e.length:this.position):typeof e=="string"&&(this.buffer.write(e,n,e.length,"binary"),this.position=n+e.length>this.position?n+e.length:this.position)},t.prototype.read=function(e,n){return n=n&&n>0?n:this.position,this.buffer.slice(e,e+n)},t.prototype.value=function(e){return e=!!e,e&&this.buffer.length===this.position?this.buffer:e?this.buffer.slice(0,this.position):this.buffer.toString("binary",0,this.position)},t.prototype.length=function(){return this.position},t.prototype.toJSON=function(){return this.buffer.toString("base64")},t.prototype.toString=function(e){return this.buffer.toString(e)},t.prototype.toExtendedJSON=function(e){e=e||{};var n=this.buffer.toString("base64"),r=Number(this.sub_type).toString(16);return e.legacy?{$binary:n,$type:r.length===1?"0"+r:r}:{$binary:{base64:n,subType:r.length===1?"0"+r:r}}},t.prototype.toUUID=function(){if(this.sub_type===t.SUBTYPE_UUID)return new pf(this.buffer.slice(0,this.position));throw new ur('Binary sub_type "'.concat(this.sub_type,'" is not supported for converting to UUID. Only "').concat(t.SUBTYPE_UUID,'" is currently supported.'))},t.fromExtendedJSON=function(e,n){n=n||{};var r,i;if("$binary"in e?n.legacy&&typeof e.$binary=="string"&&"$type"in e?(i=e.$type?parseInt(e.$type,16):0,r=Re.from(e.$binary,"base64")):typeof e.$binary!="string"&&(i=e.$binary.subType?parseInt(e.$binary.subType,16):0,r=Re.from(e.$binary.base64,"base64")):"$uuid"in e&&(i=4,r=Nc(e.$uuid)),!r)throw new Je("Unexpected Binary Extended JSON format ".concat(JSON.stringify(e)));return i===Nf?new pf(r):new t(r,i)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){var e=this.value(!0);return'new Binary(Buffer.from("'.concat(e.toString("hex"),'", "hex"), ').concat(this.sub_type,")")},t.BSON_BINARY_SUBTYPE_DEFAULT=0,t.BUFFER_SIZE=256,t.SUBTYPE_DEFAULT=0,t.SUBTYPE_FUNCTION=1,t.SUBTYPE_BYTE_ARRAY=2,t.SUBTYPE_UUID_OLD=3,t.SUBTYPE_UUID=4,t.SUBTYPE_MD5=5,t.SUBTYPE_ENCRYPTED=6,t.SUBTYPE_COLUMN=7,t.SUBTYPE_USER_DEFINED=128,t}();Object.defineProperty(dr.prototype,"_bsontype",{value:"Binary"});var xc=16,pf=function(t){Ko(e,t);function e(n){var r=this,i,o;if(n==null)i=e.generate();else if(n instanceof e)i=Re.from(n.buffer),o=n.__id;else if(ArrayBuffer.isView(n)&&n.byteLength===xc)i=Yo(n);else if(typeof n=="string")i=Nc(n);else throw new Je("Argument passed in UUID constructor must be a UUID, a 16 byte Buffer or a 32/36 character hex string (dashes excluded/included, format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).");return r=t.call(this,i,Nf)||this,r.__id=o,r}return Object.defineProperty(e.prototype,"id",{get:function(){return this.buffer},set:function(n){this.buffer=n,e.cacheHexString&&(this.__id=ff(n))},enumerable:!1,configurable:!0}),e.prototype.toHexString=function(n){if(n===void 0&&(n=!0),e.cacheHexString&&this.__id)return this.__id;var r=ff(this.id,n);return e.cacheHexString&&(this.__id=r),r},e.prototype.toString=function(n){return n?this.id.toString(n):this.toHexString()},e.prototype.toJSON=function(){return this.toHexString()},e.prototype.equals=function(n){if(!n)return!1;if(n instanceof e)return n.id.equals(this.id);try{return new e(n).id.equals(this.id)}catch{return!1}},e.prototype.toBinary=function(){return new dr(this.id,dr.SUBTYPE_UUID)},e.generate=function(){var n=Df(xc);return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Re.from(n)},e.isValid=function(n){return n?n instanceof e?!0:typeof n=="string"?Af(n):Rc(n)?n.length!==xc?!1:(n[6]&240)===64&&(n[8]&128)===128:!1:!1},e.createFromHexString=function(n){var r=Nc(n);return new e(r)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new UUID("'.concat(this.toHexString(),'")')},e}(dr),qo=function(){function t(e,n){if(!(this instanceof t))return new t(e,n);this.code=e,this.scope=n}return t.prototype.toJSON=function(){return{code:this.code,scope:this.scope}},t.prototype.toExtendedJSON=function(){return this.scope?{$code:this.code,$scope:this.scope}:{$code:this.code}},t.fromExtendedJSON=function(e){return new t(e.$code,e.$scope)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){var e=this.toJSON();return'new Code("'.concat(String(e.code),'"').concat(e.scope?", ".concat(JSON.stringify(e.scope)):"",")")},t}();Object.defineProperty(qo.prototype,"_bsontype",{value:"Code"});function fy(t){return xi(t)&&t.$id!=null&&typeof t.$ref=="string"&&(t.$db==null||typeof t.$db=="string")}var Si=function(){function t(e,n,r,i){if(!(this instanceof t))return new t(e,n,r,i);var o=e.split(".");o.length===2&&(r=o.shift(),e=o.shift()),this.collection=e,this.oid=n,this.db=r,this.fields=i||{}}return Object.defineProperty(t.prototype,"namespace",{get:function(){return this.collection},set:function(e){this.collection=e},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){var e=Object.assign({$ref:this.collection,$id:this.oid},this.fields);return this.db!=null&&(e.$db=this.db),e},t.prototype.toExtendedJSON=function(e){e=e||{};var n={$ref:this.collection,$id:this.oid};return e.legacy||(this.db&&(n.$db=this.db),n=Object.assign(n,this.fields)),n},t.fromExtendedJSON=function(e){var n=Object.assign({},e);return delete n.$ref,delete n.$id,delete n.$db,new t(e.$ref,e.$id,e.$db,n)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){var e=this.oid===void 0||this.oid.toString===void 0?this.oid:this.oid.toString();return'new DBRef("'.concat(this.namespace,'", new ObjectId("').concat(String(e),'")').concat(this.db?', "'.concat(this.db,'"'):"",")")},t}();Object.defineProperty(Si.prototype,"_bsontype",{value:"DBRef"});var Zt=void 0;try{Zt=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}var hf=65536,py=1<<24,Hr=hf*hf,Rf=Hr*Hr,mf=Rf/2,gf={},_f={},le=function(){function t(e,n,r){if(e===void 0&&(e=0),!(this instanceof t))return new t(e,n,r);typeof e=="bigint"?Object.assign(this,t.fromBigInt(e,!!n)):typeof e=="string"?Object.assign(this,t.fromString(e,!!n)):(this.low=e|0,this.high=n|0,this.unsigned=!!r),Object.defineProperty(this,"__isLong__",{value:!0,configurable:!1,writable:!1,enumerable:!1})}return t.fromBits=function(e,n,r){return new t(e,n,r)},t.fromInt=function(e,n){var r,i,o;return n?(e>>>=0,(o=0<=e&&e<256)&&(i=_f[e],i)?i:(r=t.fromBits(e,(e|0)<0?-1:0,!0),o&&(_f[e]=r),r)):(e|=0,(o=-128<=e&&e<128)&&(i=gf[e],i)?i:(r=t.fromBits(e,e<0?-1:0,!1),o&&(gf[e]=r),r))},t.fromNumber=function(e,n){if(isNaN(e))return n?t.UZERO:t.ZERO;if(n){if(e<0)return t.UZERO;if(e>=Rf)return t.MAX_UNSIGNED_VALUE}else{if(e<=-mf)return t.MIN_VALUE;if(e+1>=mf)return t.MAX_VALUE}return e<0?t.fromNumber(-e,n).neg():t.fromBits(e%Hr|0,e/Hr|0,n)},t.fromBigInt=function(e,n){return t.fromString(e.toString(),n)},t.fromString=function(e,n,r){if(e.length===0)throw Error("empty string");if(e==="NaN"||e==="Infinity"||e==="+Infinity"||e==="-Infinity")return t.ZERO;if(typeof n=="number"?(r=n,n=!1):n=!!n,r=r||10,r<2||36<r)throw RangeError("radix");var i;if((i=e.indexOf("-"))>0)throw Error("interior hyphen");if(i===0)return t.fromString(e.substring(1),n,r).neg();for(var o=t.fromNumber(Math.pow(r,8)),s=t.ZERO,c=0;c<e.length;c+=8){var u=Math.min(8,e.length-c),d=parseInt(e.substring(c,c+u),r);if(u<8){var g=t.fromNumber(Math.pow(r,u));s=s.mul(g).add(t.fromNumber(d))}else s=s.mul(o),s=s.add(t.fromNumber(d))}return s.unsigned=n,s},t.fromBytes=function(e,n,r){return r?t.fromBytesLE(e,n):t.fromBytesBE(e,n)},t.fromBytesLE=function(e,n){return new t(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,n)},t.fromBytesBE=function(e,n){return new t(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],n)},t.isLong=function(e){return xi(e)&&e.__isLong__===!0},t.fromValue=function(e,n){return typeof e=="number"?t.fromNumber(e,n):typeof e=="string"?t.fromString(e,n):t.fromBits(e.low,e.high,typeof n=="boolean"?n:e.unsigned)},t.prototype.add=function(e){t.isLong(e)||(e=t.fromValue(e));var n=this.high>>>16,r=this.high&65535,i=this.low>>>16,o=this.low&65535,s=e.high>>>16,c=e.high&65535,u=e.low>>>16,d=e.low&65535,g=0,p=0,E=0,C=0;return C+=o+d,E+=C>>>16,C&=65535,E+=i+u,p+=E>>>16,E&=65535,p+=r+c,g+=p>>>16,p&=65535,g+=n+s,g&=65535,t.fromBits(E<<16|C,g<<16|p,this.unsigned)},t.prototype.and=function(e){return t.isLong(e)||(e=t.fromValue(e)),t.fromBits(this.low&e.low,this.high&e.high,this.unsigned)},t.prototype.compare=function(e){if(t.isLong(e)||(e=t.fromValue(e)),this.eq(e))return 0;var n=this.isNegative(),r=e.isNegative();return n&&!r?-1:!n&&r?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},t.prototype.comp=function(e){return this.compare(e)},t.prototype.divide=function(e){if(t.isLong(e)||(e=t.fromValue(e)),e.isZero())throw Error("division by zero");if(Zt){if(!this.unsigned&&this.high===-2147483648&&e.low===-1&&e.high===-1)return this;var n=(this.unsigned?Zt.div_u:Zt.div_s)(this.low,this.high,e.low,e.high);return t.fromBits(n,Zt.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?t.UZERO:t.ZERO;var r,i,o;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return t.UZERO;if(e.gt(this.shru(1)))return t.UONE;o=t.UZERO}else{if(this.eq(t.MIN_VALUE)){if(e.eq(t.ONE)||e.eq(t.NEG_ONE))return t.MIN_VALUE;if(e.eq(t.MIN_VALUE))return t.ONE;var s=this.shr(1);return r=s.div(e).shl(1),r.eq(t.ZERO)?e.isNegative()?t.ONE:t.NEG_ONE:(i=this.sub(e.mul(r)),o=r.add(i.div(e)),o)}else if(e.eq(t.MIN_VALUE))return this.unsigned?t.UZERO:t.ZERO;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();o=t.ZERO}for(i=this;i.gte(e);){r=Math.max(1,Math.floor(i.toNumber()/e.toNumber()));for(var c=Math.ceil(Math.log(r)/Math.LN2),u=c<=48?1:Math.pow(2,c-48),d=t.fromNumber(r),g=d.mul(e);g.isNegative()||g.gt(i);)r-=u,d=t.fromNumber(r,this.unsigned),g=d.mul(e);d.isZero()&&(d=t.ONE),o=o.add(d),i=i.sub(g)}return o},t.prototype.div=function(e){return this.divide(e)},t.prototype.equals=function(e){return t.isLong(e)||(e=t.fromValue(e)),this.unsigned!==e.unsigned&&this.high>>>31===1&&e.high>>>31===1?!1:this.high===e.high&&this.low===e.low},t.prototype.eq=function(e){return this.equals(e)},t.prototype.getHighBits=function(){return this.high},t.prototype.getHighBitsUnsigned=function(){return this.high>>>0},t.prototype.getLowBits=function(){return this.low},t.prototype.getLowBitsUnsigned=function(){return this.low>>>0},t.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.eq(t.MIN_VALUE)?64:this.neg().getNumBitsAbs();var e=this.high!==0?this.high:this.low,n;for(n=31;n>0&&(e&1<<n)===0;n--);return this.high!==0?n+33:n+1},t.prototype.greaterThan=function(e){return this.comp(e)>0},t.prototype.gt=function(e){return this.greaterThan(e)},t.prototype.greaterThanOrEqual=function(e){return this.comp(e)>=0},t.prototype.gte=function(e){return this.greaterThanOrEqual(e)},t.prototype.ge=function(e){return this.greaterThanOrEqual(e)},t.prototype.isEven=function(){return(this.low&1)===0},t.prototype.isNegative=function(){return!this.unsigned&&this.high<0},t.prototype.isOdd=function(){return(this.low&1)===1},t.prototype.isPositive=function(){return this.unsigned||this.high>=0},t.prototype.isZero=function(){return this.high===0&&this.low===0},t.prototype.lessThan=function(e){return this.comp(e)<0},t.prototype.lt=function(e){return this.lessThan(e)},t.prototype.lessThanOrEqual=function(e){return this.comp(e)<=0},t.prototype.lte=function(e){return this.lessThanOrEqual(e)},t.prototype.modulo=function(e){if(t.isLong(e)||(e=t.fromValue(e)),Zt){var n=(this.unsigned?Zt.rem_u:Zt.rem_s)(this.low,this.high,e.low,e.high);return t.fromBits(n,Zt.get_high(),this.unsigned)}return this.sub(this.div(e).mul(e))},t.prototype.mod=function(e){return this.modulo(e)},t.prototype.rem=function(e){return this.modulo(e)},t.prototype.multiply=function(e){if(this.isZero())return t.ZERO;if(t.isLong(e)||(e=t.fromValue(e)),Zt){var n=Zt.mul(this.low,this.high,e.low,e.high);return t.fromBits(n,Zt.get_high(),this.unsigned)}if(e.isZero())return t.ZERO;if(this.eq(t.MIN_VALUE))return e.isOdd()?t.MIN_VALUE:t.ZERO;if(e.eq(t.MIN_VALUE))return this.isOdd()?t.MIN_VALUE:t.ZERO;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(t.TWO_PWR_24)&&e.lt(t.TWO_PWR_24))return t.fromNumber(this.toNumber()*e.toNumber(),this.unsigned);var r=this.high>>>16,i=this.high&65535,o=this.low>>>16,s=this.low&65535,c=e.high>>>16,u=e.high&65535,d=e.low>>>16,g=e.low&65535,p=0,E=0,C=0,O=0;return O+=s*g,C+=O>>>16,O&=65535,C+=o*g,E+=C>>>16,C&=65535,C+=s*d,E+=C>>>16,C&=65535,E+=i*g,p+=E>>>16,E&=65535,E+=o*d,p+=E>>>16,E&=65535,E+=s*u,p+=E>>>16,E&=65535,p+=r*g+i*d+o*u+s*c,p&=65535,t.fromBits(C<<16|O,p<<16|E,this.unsigned)},t.prototype.mul=function(e){return this.multiply(e)},t.prototype.negate=function(){return!this.unsigned&&this.eq(t.MIN_VALUE)?t.MIN_VALUE:this.not().add(t.ONE)},t.prototype.neg=function(){return this.negate()},t.prototype.not=function(){return t.fromBits(~this.low,~this.high,this.unsigned)},t.prototype.notEquals=function(e){return!this.equals(e)},t.prototype.neq=function(e){return this.notEquals(e)},t.prototype.ne=function(e){return this.notEquals(e)},t.prototype.or=function(e){return t.isLong(e)||(e=t.fromValue(e)),t.fromBits(this.low|e.low,this.high|e.high,this.unsigned)},t.prototype.shiftLeft=function(e){return t.isLong(e)&&(e=e.toInt()),(e&=63)===0?this:e<32?t.fromBits(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned):t.fromBits(0,this.low<<e-32,this.unsigned)},t.prototype.shl=function(e){return this.shiftLeft(e)},t.prototype.shiftRight=function(e){return t.isLong(e)&&(e=e.toInt()),(e&=63)===0?this:e<32?t.fromBits(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned):t.fromBits(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},t.prototype.shr=function(e){return this.shiftRight(e)},t.prototype.shiftRightUnsigned=function(e){if(t.isLong(e)&&(e=e.toInt()),e&=63,e===0)return this;var n=this.high;if(e<32){var r=this.low;return t.fromBits(r>>>e|n<<32-e,n>>>e,this.unsigned)}else return e===32?t.fromBits(n,0,this.unsigned):t.fromBits(n>>>e-32,0,this.unsigned)},t.prototype.shr_u=function(e){return this.shiftRightUnsigned(e)},t.prototype.shru=function(e){return this.shiftRightUnsigned(e)},t.prototype.subtract=function(e){return t.isLong(e)||(e=t.fromValue(e)),this.add(e.neg())},t.prototype.sub=function(e){return this.subtract(e)},t.prototype.toInt=function(){return this.unsigned?this.low>>>0:this.low},t.prototype.toNumber=function(){return this.unsigned?(this.high>>>0)*Hr+(this.low>>>0):this.high*Hr+(this.low>>>0)},t.prototype.toBigInt=function(){return BigInt(this.toString())},t.prototype.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},t.prototype.toBytesLE=function(){var e=this.high,n=this.low;return[n&255,n>>>8&255,n>>>16&255,n>>>24,e&255,e>>>8&255,e>>>16&255,e>>>24]},t.prototype.toBytesBE=function(){var e=this.high,n=this.low;return[e>>>24,e>>>16&255,e>>>8&255,e&255,n>>>24,n>>>16&255,n>>>8&255,n&255]},t.prototype.toSigned=function(){return this.unsigned?t.fromBits(this.low,this.high,!1):this},t.prototype.toString=function(e){if(e=e||10,e<2||36<e)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(t.MIN_VALUE)){var n=t.fromNumber(e),r=this.div(n),i=r.mul(n).sub(this);return r.toString(e)+i.toInt().toString(e)}else return"-"+this.neg().toString(e);for(var o=t.fromNumber(Math.pow(e,6),this.unsigned),s=this,c="";;){var u=s.div(o),d=s.sub(u.mul(o)).toInt()>>>0,g=d.toString(e);if(s=u,s.isZero())return g+c;for(;g.length<6;)g="0"+g;c=""+g+c}},t.prototype.toUnsigned=function(){return this.unsigned?this:t.fromBits(this.low,this.high,!0)},t.prototype.xor=function(e){return t.isLong(e)||(e=t.fromValue(e)),t.fromBits(this.low^e.low,this.high^e.high,this.unsigned)},t.prototype.eqz=function(){return this.isZero()},t.prototype.le=function(e){return this.lessThanOrEqual(e)},t.prototype.toExtendedJSON=function(e){return e&&e.relaxed?this.toNumber():{$numberLong:this.toString()}},t.fromExtendedJSON=function(e,n){var r=t.fromString(e.$numberLong);return n&&n.relaxed?r.toNumber():r},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return'new Long("'.concat(this.toString(),'"').concat(this.unsigned?", true":"",")")},t.TWO_PWR_24=t.fromInt(py),t.MAX_UNSIGNED_VALUE=t.fromBits(-1,-1,!0),t.ZERO=t.fromInt(0),t.UZERO=t.fromInt(0,!0),t.ONE=t.fromInt(1),t.UONE=t.fromInt(1,!0),t.NEG_ONE=t.fromInt(-1),t.MAX_VALUE=t.fromBits(-1,2147483647,!1),t.MIN_VALUE=t.fromBits(0,-2147483648,!1),t}();Object.defineProperty(le.prototype,"__isLong__",{value:!0});Object.defineProperty(le.prototype,"_bsontype",{value:"Long"});var hy=/^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/,my=/^(\+|-)?(Infinity|inf)$/i,gy=/^(\+|-)?NaN$/i,Ci=6111,Tc=-6176,yf=6176,_y=34,Oc=[124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),vf=[248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Ef=[120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),yy=/^([-+])?(\d+)?$/,vy=31,bf=16383,Ey=30,by=31;function wf(t){return!isNaN(parseInt(t,10))}function wy(t){var e=le.fromNumber(1e9),n=le.fromNumber(0);if(!t.parts[0]&&!t.parts[1]&&!t.parts[2]&&!t.parts[3])return{quotient:t,rem:n};for(var r=0;r<=3;r++)n=n.shiftLeft(32),n=n.add(new le(t.parts[r],0)),t.parts[r]=n.div(e).low,n=n.modulo(e);return{quotient:t,rem:n}}function Cy(t,e){if(!t&&!e)return{high:le.fromNumber(0),low:le.fromNumber(0)};var n=t.shiftRightUnsigned(32),r=new le(t.getLowBits(),0),i=e.shiftRightUnsigned(32),o=new le(e.getLowBits(),0),s=n.multiply(i),c=n.multiply(o),u=r.multiply(i),d=r.multiply(o);return s=s.add(c.shiftRightUnsigned(32)),c=new le(c.getLowBits(),0).add(u).add(d.shiftRightUnsigned(32)),s=s.add(c.shiftRightUnsigned(32)),d=c.shiftLeft(32).add(new le(d.getLowBits(),0)),{high:s,low:d}}function Sy(t,e){var n=t.high>>>0,r=e.high>>>0;if(n<r)return!0;if(n===r){var i=t.low>>>0,o=e.low>>>0;if(i<o)return!0}return!1}function Ur(t,e){throw new Je('"'.concat(t,'" is not a valid Decimal128 string - ').concat(e))}var Mc=function(){function t(e){if(!(this instanceof t))return new t(e);if(typeof e=="string")this.bytes=t.fromString(e).bytes;else if(Rc(e)){if(e.byteLength!==16)throw new Je("Decimal128 must take a Buffer of 16 bytes");this.bytes=e}else throw new Je("Decimal128 must take a Buffer or string")}return t.fromString=function(e){var n=!1,r=!1,i=!1,o=0,s=0,c=0,u=0,d=0,g=[0],p=0,E=0,C=0,O=0,M=0,L=0,H=new le(0,0),Y=new le(0,0),oe=0,z=0;if(e.length>=7e3)throw new Je(""+e+" not a valid Decimal128 string");var ye=e.match(hy),B=e.match(my),fe=e.match(gy);if(!ye&&!B&&!fe||e.length===0)throw new Je(""+e+" not a valid Decimal128 string");if(ye){var te=ye[2],Ee=ye[4],Me=ye[5],xe=ye[6];Ee&&xe===void 0&&Ur(e,"missing exponent power"),Ee&&te===void 0&&Ur(e,"missing exponent base"),Ee===void 0&&(Me||xe)&&Ur(e,"missing e before exponent")}if((e[z]==="+"||e[z]==="-")&&(n=e[z++]==="-"),!wf(e[z])&&e[z]!=="."){if(e[z]==="i"||e[z]==="I")return new t(Re.from(n?vf:Ef));if(e[z]==="N")return new t(Re.from(Oc))}for(;wf(e[z])||e[z]===".";){if(e[z]==="."){r&&Ur(e,"contains multiple periods"),r=!0,z=z+1;continue}p<34&&(e[z]!=="0"||i)&&(i||(d=s),i=!0,g[E++]=parseInt(e[z],10),p=p+1),i&&(c=c+1),r&&(u=u+1),s=s+1,z=z+1}if(r&&!s)throw new Je(""+e+" not a valid Decimal128 string");if(e[z]==="e"||e[z]==="E"){var Oe=e.substr(++z).match(yy);if(!Oe||!Oe[2])return new t(Re.from(Oc));M=parseInt(Oe[0],10),z=z+Oe[0].length}if(e[z])return new t(Re.from(Oc));if(C=0,!p)C=0,O=0,g[0]=0,c=1,p=1,o=0;else if(O=p-1,o=c,o!==1)for(;g[d+o-1]===0;)o=o-1;for(M<=u&&u-M>16384?M=Tc:M=M-u;M>Ci;){if(O=O+1,O-C>_y){var Ge=g.join("");if(Ge.match(/^0+$/)){M=Ci;break}Ur(e,"overflow")}M=M-1}for(;M<Tc||p<c;){if(O===0&&o<p){M=Tc,o=0;break}if(p<c?c=c-1:O=O-1,M<Ci)M=M+1;else{var Ge=g.join("");if(Ge.match(/^0+$/)){M=Ci;break}Ur(e,"overflow")}}if(O-C+1<o){var We=s;r&&(d=d+1,We=We+1),n&&(d=d+1,We=We+1);var ut=parseInt(e[d+O+1],10),A=0;if(ut>=5&&(A=1,ut===5)){for(A=g[O]%2===1?1:0,L=d+O+2;L<We;L++)if(parseInt(e[L],10)){A=1;break}}if(A){for(var T=O;T>=0;T--)if(++g[T]>9&&(g[T]=0,T===0))if(M<Ci)M=M+1,g[T]=1;else return new t(Re.from(n?vf:Ef))}}if(H=le.fromNumber(0),Y=le.fromNumber(0),o===0)H=le.fromNumber(0),Y=le.fromNumber(0);else if(O-C<17){var T=C;for(Y=le.fromNumber(g[T++]),H=new le(0,0);T<=O;T++)Y=Y.multiply(le.fromNumber(10)),Y=Y.add(le.fromNumber(g[T]))}else{var T=C;for(H=le.fromNumber(g[T++]);T<=O-17;T++)H=H.multiply(le.fromNumber(10)),H=H.add(le.fromNumber(g[T]));for(Y=le.fromNumber(g[T++]);T<=O;T++)Y=Y.multiply(le.fromNumber(10)),Y=Y.add(le.fromNumber(g[T]))}var k=Cy(H,le.fromString("100000000000000000"));k.low=k.low.add(Y),Sy(k.low,Y)&&(k.high=k.high.add(le.fromNumber(1))),oe=M+yf;var P={low:le.fromNumber(0),high:le.fromNumber(0)};k.high.shiftRightUnsigned(49).and(le.fromNumber(1)).equals(le.fromNumber(1))?(P.high=P.high.or(le.fromNumber(3).shiftLeft(61)),P.high=P.high.or(le.fromNumber(oe).and(le.fromNumber(16383).shiftLeft(47))),P.high=P.high.or(k.high.and(le.fromNumber(0x7fffffffffff)))):(P.high=P.high.or(le.fromNumber(oe&16383).shiftLeft(49)),P.high=P.high.or(k.high.and(le.fromNumber(562949953421311)))),P.low=k.low,n&&(P.high=P.high.or(le.fromString("9223372036854775808")));var y=Re.alloc(16);return z=0,y[z++]=P.low.low&255,y[z++]=P.low.low>>8&255,y[z++]=P.low.low>>16&255,y[z++]=P.low.low>>24&255,y[z++]=P.low.high&255,y[z++]=P.low.high>>8&255,y[z++]=P.low.high>>16&255,y[z++]=P.low.high>>24&255,y[z++]=P.high.low&255,y[z++]=P.high.low>>8&255,y[z++]=P.high.low>>16&255,y[z++]=P.high.low>>24&255,y[z++]=P.high.high&255,y[z++]=P.high.high>>8&255,y[z++]=P.high.high>>16&255,y[z++]=P.high.high>>24&255,new t(y)},t.prototype.toString=function(){for(var e,n=0,r=new Array(36),i=0;i<r.length;i++)r[i]=0;var o=0,s=!1,c,u={parts:[0,0,0,0]},d,g,p=[];o=0;var E=this.bytes,C=E[o++]|E[o++]<<8|E[o++]<<16|E[o++]<<24,O=E[o++]|E[o++]<<8|E[o++]<<16|E[o++]<<24,M=E[o++]|E[o++]<<8|E[o++]<<16|E[o++]<<24,L=E[o++]|E[o++]<<8|E[o++]<<16|E[o++]<<24;o=0;var H={low:new le(C,O),high:new le(M,L)};H.high.lessThan(le.ZERO)&&p.push("-");var Y=L>>26&vy;if(Y>>3===3){if(Y===Ey)return p.join("")+"Infinity";if(Y===by)return"NaN";e=L>>15&bf,c=8+(L>>14&1)}else c=L>>14&7,e=L>>17&bf;var oe=e-yf;if(u.parts[0]=(L&16383)+((c&15)<<14),u.parts[1]=M,u.parts[2]=O,u.parts[3]=C,u.parts[0]===0&&u.parts[1]===0&&u.parts[2]===0&&u.parts[3]===0)s=!0;else for(g=3;g>=0;g--){var z=0,ye=wy(u);if(u=ye.quotient,z=ye.rem.low,!!z)for(d=8;d>=0;d--)r[g*9+d]=z%10,z=Math.floor(z/10)}if(s)n=1,r[o]=0;else for(n=36;!r[o];)n=n-1,o=o+1;var B=n-1+oe;if(B>=34||B<=-7||oe>0){if(n>34)return p.push("".concat(0)),oe>0?p.push("E+".concat(oe)):oe<0&&p.push("E".concat(oe)),p.join("");p.push("".concat(r[o++])),n=n-1,n&&p.push(".");for(var i=0;i<n;i++)p.push("".concat(r[o++]));p.push("E"),B>0?p.push("+".concat(B)):p.push("".concat(B))}else if(oe>=0)for(var i=0;i<n;i++)p.push("".concat(r[o++]));else{var fe=n+oe;if(fe>0)for(var i=0;i<fe;i++)p.push("".concat(r[o++]));else p.push("0");for(p.push(".");fe++<0;)p.push("0");for(var i=0;i<n-Math.max(fe-1,0);i++)p.push("".concat(r[o++]))}return p.join("")},t.prototype.toJSON=function(){return{$numberDecimal:this.toString()}},t.prototype.toExtendedJSON=function(){return{$numberDecimal:this.toString()}},t.fromExtendedJSON=function(e){return t.fromString(e.$numberDecimal)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return'new Decimal128("'.concat(this.toString(),'")')},t}();Object.defineProperty(Mc.prototype,"_bsontype",{value:"Decimal128"});var Zo=function(){function t(e){if(!(this instanceof t))return new t(e);e instanceof Number&&(e=e.valueOf()),this.value=+e}return t.prototype.valueOf=function(){return this.value},t.prototype.toJSON=function(){return this.value},t.prototype.toString=function(e){return this.value.toString(e)},t.prototype.toExtendedJSON=function(e){return e&&(e.legacy||e.relaxed&&isFinite(this.value))?this.value:Object.is(Math.sign(this.value),-0)?{$numberDouble:"-".concat(this.value.toFixed(1))}:{$numberDouble:Number.isInteger(this.value)?this.value.toFixed(1):this.value.toString()}},t.fromExtendedJSON=function(e,n){var r=parseFloat(e.$numberDouble);return n&&n.relaxed?r:new t(r)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){var e=this.toExtendedJSON();return"new Double(".concat(e.$numberDouble,")")},t}();Object.defineProperty(Zo.prototype,"_bsontype",{value:"Double"});var Jo=function(){function t(e){if(!(this instanceof t))return new t(e);e instanceof Number&&(e=e.valueOf()),this.value=+e|0}return t.prototype.valueOf=function(){return this.value},t.prototype.toString=function(e){return this.value.toString(e)},t.prototype.toJSON=function(){return this.value},t.prototype.toExtendedJSON=function(e){return e&&(e.relaxed||e.legacy)?this.value:{$numberInt:this.value.toString()}},t.fromExtendedJSON=function(e,n){return n&&n.relaxed?parseInt(e.$numberInt,10):new t(e.$numberInt)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return"new Int32(".concat(this.valueOf(),")")},t}();Object.defineProperty(Jo.prototype,"_bsontype",{value:"Int32"});var Pc=function(){function t(){if(!(this instanceof t))return new t}return t.prototype.toExtendedJSON=function(){return{$maxKey:1}},t.fromExtendedJSON=function(){return new t},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return"new MaxKey()"},t}();Object.defineProperty(Pc.prototype,"_bsontype",{value:"MaxKey"});var Lc=function(){function t(){if(!(this instanceof t))return new t}return t.prototype.toExtendedJSON=function(){return{$minKey:1}},t.fromExtendedJSON=function(){return new t},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return"new MinKey()"},t}();Object.defineProperty(Lc.prototype,"_bsontype",{value:"MinKey"});var Iy=new RegExp("^[0-9a-fA-F]{24}$"),lr=null,Cn=Symbol("id"),Nt=function(){function t(e){if(!(this instanceof t))return new t(e);var n;if(typeof e=="object"&&e&&"id"in e){if(typeof e.id!="string"&&!ArrayBuffer.isView(e.id))throw new Je("Argument passed in must have an id that is of type string or Buffer");"toHexString"in e&&typeof e.toHexString=="function"?n=Re.from(e.toHexString(),"hex"):n=e.id}else n=e;if(n==null||typeof n=="number")this[Cn]=t.generate(typeof n=="number"?n:void 0);else if(ArrayBuffer.isView(n)&&n.byteLength===12)this[Cn]=n instanceof Re?n:Yo(n);else if(typeof n=="string")if(n.length===12){var r=Re.from(n);if(r.byteLength===12)this[Cn]=r;else throw new Je("Argument passed in must be a string of 12 bytes")}else if(n.length===24&&Iy.test(n))this[Cn]=Re.from(n,"hex");else throw new Je("Argument passed in must be a string of 12 bytes or a string of 24 hex characters or an integer");else throw new Je("Argument passed in does not match the accepted types");t.cacheHexString&&(this.__id=this.id.toString("hex"))}return Object.defineProperty(t.prototype,"id",{get:function(){return this[Cn]},set:function(e){this[Cn]=e,t.cacheHexString&&(this.__id=e.toString("hex"))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"generationTime",{get:function(){return this.id.readInt32BE(0)},set:function(e){this.id.writeUInt32BE(e,0)},enumerable:!1,configurable:!0}),t.prototype.toHexString=function(){if(t.cacheHexString&&this.__id)return this.__id;var e=this.id.toString("hex");return t.cacheHexString&&!this.__id&&(this.__id=e),e},t.getInc=function(){return t.index=(t.index+1)%16777215},t.generate=function(e){typeof e!="number"&&(e=Math.floor(Date.now()/1e3));var n=t.getInc(),r=Re.alloc(12);return r.writeUInt32BE(e,0),lr===null&&(lr=Df(5)),r[4]=lr[0],r[5]=lr[1],r[6]=lr[2],r[7]=lr[3],r[8]=lr[4],r[11]=n&255,r[10]=n>>8&255,r[9]=n>>16&255,r},t.prototype.toString=function(e){return e?this.id.toString(e):this.toHexString()},t.prototype.toJSON=function(){return this.toHexString()},t.prototype.equals=function(e){if(e==null)return!1;if(e instanceof t)return this[Cn][11]===e[Cn][11]&&this[Cn].equals(e[Cn]);if(typeof e=="string"&&t.isValid(e)&&e.length===12&&Rc(this.id))return e===Re.prototype.toString.call(this.id,"latin1");if(typeof e=="string"&&t.isValid(e)&&e.length===24)return e.toLowerCase()===this.toHexString();if(typeof e=="string"&&t.isValid(e)&&e.length===12)return Re.from(e).equals(this.id);if(typeof e=="object"&&"toHexString"in e&&typeof e.toHexString=="function"){var n=e.toHexString(),r=this.toHexString().toLowerCase();return typeof n=="string"&&n.toLowerCase()===r}return!1},t.prototype.getTimestamp=function(){var e=new Date,n=this.id.readUInt32BE(0);return e.setTime(Math.floor(n)*1e3),e},t.createPk=function(){return new t},t.createFromTime=function(e){var n=Re.from([0,0,0,0,0,0,0,0,0,0,0,0]);return n.writeUInt32BE(e,0),new t(n)},t.createFromHexString=function(e){if(typeof e>"u"||e!=null&&e.length!==24)throw new Je("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");return new t(Re.from(e,"hex"))},t.isValid=function(e){if(e==null)return!1;try{return new t(e),!0}catch{return!1}},t.prototype.toExtendedJSON=function(){return this.toHexString?{$oid:this.toHexString()}:{$oid:this.toString("hex")}},t.fromExtendedJSON=function(e){return new t(e.$oid)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return'new ObjectId("'.concat(this.toHexString(),'")')},t.index=Math.floor(Math.random()*16777215),t}();Object.defineProperty(Nt.prototype,"generate",{value:Xo(function(t){return Nt.generate(t)},"Please use the static `ObjectId.generate(time)` instead")});Object.defineProperty(Nt.prototype,"getInc",{value:Xo(function(){return Nt.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(Nt.prototype,"get_inc",{value:Xo(function(){return Nt.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(Nt,"get_inc",{value:Xo(function(){return Nt.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(Nt.prototype,"_bsontype",{value:"ObjectID"});function xy(t){return t.split("").sort().join("")}var Ii=function(){function t(e,n){if(!(this instanceof t))return new t(e,n);if(this.pattern=e,this.options=xy(n??""),this.pattern.indexOf("\0")!==-1)throw new ur("BSON Regex patterns cannot contain null bytes, found: ".concat(JSON.stringify(this.pattern)));if(this.options.indexOf("\0")!==-1)throw new ur("BSON Regex options cannot contain null bytes, found: ".concat(JSON.stringify(this.options)));for(var r=0;r<this.options.length;r++)if(!(this.options[r]==="i"||this.options[r]==="m"||this.options[r]==="x"||this.options[r]==="l"||this.options[r]==="s"||this.options[r]==="u"))throw new ur("The regular expression option [".concat(this.options[r],"] is not supported"))}return t.parseOptions=function(e){return e?e.split("").sort().join(""):""},t.prototype.toExtendedJSON=function(e){return e=e||{},e.legacy?{$regex:this.pattern,$options:this.options}:{$regularExpression:{pattern:this.pattern,options:this.options}}},t.fromExtendedJSON=function(e){if("$regex"in e)if(typeof e.$regex!="string"){if(e.$regex._bsontype==="BSONRegExp")return e}else return new t(e.$regex,t.parseOptions(e.$options));if("$regularExpression"in e)return new t(e.$regularExpression.pattern,t.parseOptions(e.$regularExpression.options));throw new Je("Unexpected BSONRegExp EJSON object form: ".concat(JSON.stringify(e)))},t}();Object.defineProperty(Ii.prototype,"_bsontype",{value:"BSONRegExp"});var kc=function(){function t(e){if(!(this instanceof t))return new t(e);this.value=e}return t.prototype.valueOf=function(){return this.value},t.prototype.toString=function(){return this.value},t.prototype.inspect=function(){return'new BSONSymbol("'.concat(this.value,'")')},t.prototype.toJSON=function(){return this.value},t.prototype.toExtendedJSON=function(){return{$symbol:this.value}},t.fromExtendedJSON=function(e){return new t(e.$symbol)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t}();Object.defineProperty(kc.prototype,"_bsontype",{value:"Symbol"});var Ty=le,Mf=function(t){Ko(e,t);function e(n,r){var i=this;return i instanceof e?(le.isLong(n)?i=t.call(this,n.low,n.high,!0)||this:xi(n)&&typeof n.t<"u"&&typeof n.i<"u"?i=t.call(this,n.i,n.t,!0)||this:i=t.call(this,n,r,!0)||this,Object.defineProperty(i,"_bsontype",{value:"Timestamp",writable:!1,configurable:!1,enumerable:!1}),i):new e(n,r)}return e.prototype.toJSON=function(){return{$timestamp:this.toString()}},e.fromInt=function(n){return new e(le.fromInt(n,!0))},e.fromNumber=function(n){return new e(le.fromNumber(n,!0))},e.fromBits=function(n,r){return new e(n,r)},e.fromString=function(n,r){return new e(le.fromString(n,!0,r))},e.prototype.toExtendedJSON=function(){return{$timestamp:{t:this.high>>>0,i:this.low>>>0}}},e.fromExtendedJSON=function(n){return new e(n.$timestamp)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return"new Timestamp({ t: ".concat(this.getHighBits(),", i: ").concat(this.getLowBits()," })")},e.MAX_VALUE=le.MAX_UNSIGNED_VALUE,e}(Ty);function Oy(t){return xi(t)&&Reflect.has(t,"_bsontype")&&typeof t._bsontype=="string"}var Pf=2147483647,Lf=-2147483648,kf=9223372036854776e3,Ff=-9223372036854776e3,Dy={$oid:Nt,$binary:dr,$uuid:dr,$symbol:kc,$numberInt:Jo,$numberDecimal:Mc,$numberDouble:Zo,$numberLong:le,$minKey:Lc,$maxKey:Pc,$regex:Ii,$regularExpression:Ii,$timestamp:Mf};function Vf(t,e){if(e===void 0&&(e={}),typeof t=="number"){if(e.relaxed||e.legacy)return t;if(Math.floor(t)===t){if(t>=Lf&&t<=Pf)return new Jo(t);if(t>=Ff&&t<=kf)return le.fromNumber(t)}return new Zo(t)}if(t==null||typeof t!="object")return t;if(t.$undefined)return null;for(var n=Object.keys(t).filter(function(p){return p.startsWith("$")&&t[p]!=null}),r=0;r<n.length;r++){var i=Dy[n[r]];if(i)return i.fromExtendedJSON(t,e)}if(t.$date!=null){var o=t.$date,s=new Date;return e.legacy?typeof o=="number"?s.setTime(o):typeof o=="string"&&s.setTime(Date.parse(o)):typeof o=="string"?s.setTime(Date.parse(o)):le.isLong(o)?s.setTime(o.toNumber()):typeof o=="number"&&e.relaxed&&s.setTime(o),s}if(t.$code!=null){var c=Object.assign({},t);return t.$scope&&(c.$scope=Vf(t.$scope)),qo.fromExtendedJSON(t)}if(fy(t)||t.$dbPointer){var u=t.$ref?t:t.$dbPointer;if(u instanceof Si)return u;var d=Object.keys(u).filter(function(p){return p.startsWith("$")}),g=!0;if(d.forEach(function(p){["$ref","$id","$db"].indexOf(p)===-1&&(g=!1)}),g)return Si.fromExtendedJSON(u)}return t}function Ay(t,e){return t.map(function(n,r){e.seenObjects.push({propertyName:"index ".concat(r),obj:null});try{return Hn(n,e)}finally{e.seenObjects.pop()}})}function Cf(t){var e=t.toISOString();return t.getUTCMilliseconds()!==0?e:e.slice(0,-5)+"Z"}function Hn(t,e){if((typeof t=="object"||typeof t=="function")&&t!==null){var n=e.seenObjects.findIndex(function(H){return H.obj===t});if(n!==-1){var r=e.seenObjects.map(function(H){return H.propertyName}),i=r.slice(0,n).map(function(H){return"".concat(H," -> ")}).join(""),o=r[n],s=" -> "+r.slice(n+1,r.length-1).map(function(H){return"".concat(H," -> ")}).join(""),c=r[r.length-1],u=" ".repeat(i.length+o.length/2),d="-".repeat(s.length+(o.length+c.length)/2-1);throw new Je(`Converting circular structure to EJSON:
33
+ `+" ".concat(i).concat(o).concat(s).concat(c,`
34
+ `)+" ".concat(u,"\\").concat(d,"/"))}e.seenObjects[e.seenObjects.length-1].obj=t}if(Array.isArray(t))return Ay(t,e);if(t===void 0)return null;if(t instanceof Date||cy(t)){var g=t.getTime(),p=g>-1&&g<2534023188e5;return e.legacy?e.relaxed&&p?{$date:t.getTime()}:{$date:Cf(t)}:e.relaxed&&p?{$date:Cf(t)}:{$date:{$numberLong:t.getTime().toString()}}}if(typeof t=="number"&&(!e.relaxed||!isFinite(t))){if(Math.floor(t)===t){var E=t>=Lf&&t<=Pf,C=t>=Ff&&t<=kf;if(E)return{$numberInt:t.toString()};if(C)return{$numberLong:t.toString()}}return{$numberDouble:t.toString()}}if(t instanceof RegExp||ay(t)){var O=t.flags;if(O===void 0){var M=t.toString().match(/[gimuy]*$/);M&&(O=M[0])}var L=new Ii(t.source,O);return L.toExtendedJSON(e)}return t!=null&&typeof t=="object"?Ry(t,e):t}var Ny={Binary:function(t){return new dr(t.value(),t.sub_type)},Code:function(t){return new qo(t.code,t.scope)},DBRef:function(t){return new Si(t.collection||t.namespace,t.oid,t.db,t.fields)},Decimal128:function(t){return new Mc(t.bytes)},Double:function(t){return new Zo(t.value)},Int32:function(t){return new Jo(t.value)},Long:function(t){return le.fromBits(t.low!=null?t.low:t.low_,t.low!=null?t.high:t.high_,t.low!=null?t.unsigned:t.unsigned_)},MaxKey:function(){return new Pc},MinKey:function(){return new Lc},ObjectID:function(t){return new Nt(t)},ObjectId:function(t){return new Nt(t)},BSONRegExp:function(t){return new Ii(t.pattern,t.options)},Symbol:function(t){return new kc(t.value)},Timestamp:function(t){return Mf.fromBits(t.low,t.high)}};function Ry(t,e){if(t==null||typeof t!="object")throw new ur("not an object instance");var n=t._bsontype;if(typeof n>"u"){var r={};for(var i in t){e.seenObjects.push({propertyName:i,obj:null});try{var o=Hn(t[i],e);i==="__proto__"?Object.defineProperty(r,i,{value:o,writable:!0,enumerable:!0,configurable:!0}):r[i]=o}finally{e.seenObjects.pop()}}return r}else if(Oy(t)){var s=t;if(typeof s.toExtendedJSON!="function"){var c=Ny[t._bsontype];if(!c)throw new Je("Unrecognized or invalid _bsontype: "+t._bsontype);s=c(s)}return n==="Code"&&s.scope?s=new qo(s.code,Hn(s.scope,e)):n==="DBRef"&&s.oid&&(s=new Si(Hn(s.collection,e),Hn(s.oid,e),Hn(s.db,e),Hn(s.fields,e))),s.toExtendedJSON(e)}else throw new ur("_bsontype must be a string, but was: "+typeof n)}var Sf;(function(t){function e(o,s){var c=Object.assign({},{relaxed:!0,legacy:!1},s);return typeof c.relaxed=="boolean"&&(c.strict=!c.relaxed),typeof c.strict=="boolean"&&(c.relaxed=!c.strict),JSON.parse(o,function(u,d){if(u.indexOf("\0")!==-1)throw new ur("BSON Document field names cannot contain null bytes, found: ".concat(JSON.stringify(u)));return Vf(d,c)})}t.parse=e;function n(o,s,c,u){c!=null&&typeof c=="object"&&(u=c,c=0),s!=null&&typeof s=="object"&&!Array.isArray(s)&&(u=s,s=void 0,c=0);var d=Object.assign({relaxed:!0,legacy:!1},u,{seenObjects:[{propertyName:"(root)",obj:null}]}),g=Hn(o,d);return JSON.stringify(g,s,c)}t.stringify=n;function r(o,s){return s=s||{},JSON.parse(n(o,s))}t.serialize=r;function i(o,s){return s=s||{},e(JSON.stringify(o),s)}t.deserialize=i})(Sf||(Sf={}));var If,xf=Of();xf.Map?If=xf.Map:If=function(){function t(e){e===void 0&&(e=[]),this._keys=[],this._values={};for(var n=0;n<e.length;n++)if(e[n]!=null){var r=e[n],i=r[0],o=r[1];this._keys.push(i),this._values[i]={v:o,i:this._keys.length-1}}}return t.prototype.clear=function(){this._keys=[],this._values={}},t.prototype.delete=function(e){var n=this._values[e];return n==null?!1:(delete this._values[e],this._keys.splice(n.i,1),!0)},t.prototype.entries=function(){var e=this,n=0;return{next:function(){var r=e._keys[n++];return{value:r!==void 0?[r,e._values[r].v]:void 0,done:r===void 0}}}},t.prototype.forEach=function(e,n){n=n||this;for(var r=0;r<this._keys.length;r++){var i=this._keys[r];e.call(n,this._values[i].v,i,n)}},t.prototype.get=function(e){return this._values[e]?this._values[e].v:void 0},t.prototype.has=function(e){return this._values[e]!=null},t.prototype.keys=function(){var e=this,n=0;return{next:function(){var r=e._keys[n++];return{value:r!==void 0?r:void 0,done:r===void 0}}}},t.prototype.set=function(e,n){return this._values[e]?(this._values[e].v=n,this):(this._keys.push(e),this._values[e]={v:n,i:this._keys.length-1},this)},t.prototype.values=function(){var e=this,n=0;return{next:function(){var r=e._keys[n++];return{value:r!==void 0?e._values[r].v:void 0,done:r===void 0}}}},Object.defineProperty(t.prototype,"size",{get:function(){return this._keys.length},enumerable:!1,configurable:!0}),t}();var PO=le.fromNumber(uy),LO=le.fromNumber(dy);var Dc=new Uint8Array(8),kO=new DataView(Dc.buffer,Dc.byteOffset,Dc.byteLength);var My=1024*1024*17,FO=Re.alloc(My);var Qo=class{triggerID;nudgeID;engagementID;contentID;shortID;contentType;variation;props;objective;onsiteDeliveryType;holdout;constructor(e){e=e||{},this.triggerID=e.id||e.triggerID,this.nudgeID=e.nudgeID,this.shortID=e.shortID,this.contentType=e.contentType,this.engagementID=e.engagementID,this.contentID=e.contentID,this.variation=e.variation,this.props=e.props,this.objective=e.objective,this.onsiteDeliveryType=e.onsiteDeliveryType,this.holdout=e.holdout}};var jr=class{constructor(e,n={},r,i){this.name=e;this.properties=n;this.id=i?new Nt(i):new Nt,this.occurred=new Date,r&&(this.trigger=new Qo(r)),this.newEvent=!i}trigger;items;videos;id;newEvent;cart;currentItem;deviceProps;landingPage;occurred;page;sessionID;sessionNumber;locale};function Py(t,e){t&1&&(Ft(),Se(0,"path",3))}function Ly(t,e){t&1&&(Ft(),Se(0,"path",4))}var $r=class t{muted;videoEl;toggled=new it;toggleMute(e){e.stopPropagation(),e.preventDefault(),this.muted=!this.muted,this.videoEl.muted=this.muted,this.toggled.emit(this.muted),this.muted||this.videoEl.play()}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Fe({type:t,selectors:[["cooee-mute-toggle"]],inputs:{muted:"muted",videoEl:"videoEl"},outputs:{toggled:"toggled"},decls:5,vars:1,consts:[["type","button",1,"lc:bg-black/50",3,"click"],["xmlns","http://www.w3.org/2000/svg","height","24px","viewBox","0 0 24 24","width","24px","fill","#fff"],["d","M0 0h24v24H0V0z","fill","none"],["d","M4.34 2.93L2.93 4.34 7.29 8.7 7 9H3v6h4l5 5v-6.59l4.18 4.18c-.65.49-1.38.88-2.18 1.11v2.06c1.34-.3 2.57-.92 3.61-1.75l2.05 2.05 1.41-1.41L4.34 2.93zM10 15.17L7.83 13H5v-2h2.83l.88-.88L10 11.41v3.76zM19 12c0 .82-.15 1.61-.41 2.34l1.53 1.53c.56-1.17.88-2.48.88-3.87 0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zm-7-8l-1.88 1.88L12 7.76zm4.5 8c0-1.77-1.02-3.29-2.5-4.03v1.79l2.48 2.48c.01-.08.02-.16.02-.24z"],["d","M3 9v6h4l5 5V4L7 9H3zm7-.17v6.34L7.83 13H5v-2h2.83L10 8.83zM16.5 12c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77 0-4.28-2.99-7.86-7-8.77z"]],template:function(n,r){n&1&&(X(0,"button",0),Ne("click",function(o){return r.toggleMute(o)}),Ft(),X(1,"svg",1),Se(2,"path",2),De(3,Py,1,0,":svg:path",3)(4,Ly,1,0,":svg:path",4),q()()),n&2&&(W(3),Ae(r.muted?3:4))},styles:["button[_ngcontent-%COMP%]{width:40px;height:40px;display:flex;justify-content:center;align-items:center;border:none;cursor:pointer;border-radius:100%}"]})};var ky=t=>({"lc:cursor-grab":t}),Fy=(t,e)=>e.url;function Vy(t,e){if(t&1&&Se(0,"source",11),t&2){let n=e.$implicit;Tn("type",n.mimeType),be("src",n.url,ft)}}var es=class t{constructor(e){this.elementRef=e}video;closeClicked=new it;videoClicked=new it;isDragging=!1;ngOnInit(){let e=this.elementRef.nativeElement.parentElement.parentElement;e.style.zIndex="2147483647"}close(){this.closeClicked.emit()}onVideoClick(){if(this.isDragging){this.isDragging=!1;return}this.videoClicked.emit()}static \u0275fac=function(n){return new(n||t)(tn(bt))};static \u0275cmp=Fe({type:t,selectors:[["cooee-draggable-video-popup"]],inputs:{video:"video"},outputs:{closeClicked:"closeClicked",videoClicked:"videoClicked"},decls:14,vars:5,consts:[["role","button","tabindex","0","cdkDrag","",1,"lc-popup-inner","lc:shadow-2xl","lc:rounded-lg","lc:flex","lc:justify-center","lc:items-center",3,"click","keyup","cdkDragMoved","ngClass","cdkDragBoundary"],[1,"lc-close-button","lc:absolute","lc:-top-3.5","lc:-right-3.5","lc:bg-black/50","lc:rounded-full","lc:w-8","lc:h-8","lc:border-none","lc:z-10","lc:flex","lc:justify-center","lc:items-center",3,"click"],["xmlns","http://www.w3.org/2000/svg","height","24px","viewBox","0 0 24 24","width","24px","fill","#fff"],["d","M0 0h24v24H0V0z","fill","none"],["d","M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"],[1,"lc-play-button"],[1,"lc-icon"],["viewBox","0 0 28.31 30"],["d","M19.15,1.29A1.24,1.24,0,0,0,17.82.15a1.36,1.36,0,0,0-.35.07,3.2,3.2,0,0,0-.65.46l-5.06,4.6a1.24,1.24,0,0,0,0,1.75l0,0a1.22,1.22,0,0,0,.89.39,1.25,1.25,0,0,0,.85-.32l3-2.78.17-.13v8l2.44,2.62ZM26.79,26.6l-7.64-7.93-2.5-2.58-6-6.34L8.9,8,5.23,4.15a1.17,1.17,0,0,0-1.66,0h0a1.18,1.18,0,0,0,0,1.66h0L6.1,8.47H3.32a2.94,2.94,0,0,0-2.45,3v7.16a3,3,0,0,0,2.86,3.08H8.07a.44.44,0,0,1,.33.13C9.7,23,11,24.19,12.26,25.36L17,29.7a1.24,1.24,0,0,0,2.17-1V22.21l5.95,6.15a1.2,1.2,0,0,0,1.67,0,1.17,1.17,0,0,0,.08-1.66Zm-10.14-.67-.18-.11L9.75,19.67a1.72,1.72,0,0,0-1.16-.45H4c-.48,0-.59-.11-.59-.61V11.55c0-.49,0-.6.59-.6H8.29l8.29,8.55ZM29.09,15.07A9.9,9.9,0,0,1,26.33,22l-.11.13a1.24,1.24,0,0,1-2-.28,1.29,1.29,0,0,1,.24-1.52h0a6.77,6.77,0,0,0,1.32-1.89,7.41,7.41,0,0,0-1.37-8.55,1.24,1.24,0,0,1-.08-1.75,1.33,1.33,0,0,1,.41-.29,1.19,1.19,0,0,1,1.34.2A8.88,8.88,0,0,1,28,10.36a10,10,0,0,1,1.17,4.17A3.35,3.35,0,0,1,29.09,15.07Z","transform","translate(-0.86 -0.14)","fill","#191919"],[1,"lc-text"],["loop","","preload","auto","playsinline","","autoplay","",1,"lc:rounded-lg","lc:w-full",3,"muted"],[3,"src","type"]],template:function(n,r){n&1&&(X(0,"div",0),Ne("click",function(){return r.onVideoClick()})("keyup",function(){return r.onVideoClick()})("cdkDragMoved",function(){return r.isDragging=!0}),X(1,"button",1),Ne("click",function(o){return o.stopPropagation(),r.close()}),Ft(),X(2,"svg",2),Se(3,"path",3)(4,"path",4),q()(),$n(),X(5,"div",5)(6,"div",6),Ft(),X(7,"svg",7),Se(8,"path",8),q()(),$n(),X(9,"div",9),Te(10,"Tap to unmute"),q()(),X(11,"video",10),qe(12,Vy,1,2,"source",11,Fy),q()()),n&2&&(be("ngClass",Bi(3,ky,r.isDragging))("cdkDragBoundary","body"),W(11),be("muted",!0),W(),Ze(r.video.sources))},dependencies:[Fn,Yl],styles:["[_nghost-%COMP%]{position:fixed;display:block;right:24px;bottom:24px;max-width:150px}.lc-play-button[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%) scale(1);transition:all .1s ease-in-out;z-index:999;flex-wrap:wrap;width:100%;max-width:130px;border-radius:5px;padding:5px 10px;background-color:#97979761;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.lc-play-button[_ngcontent-%COMP%] .lc-icon[_ngcontent-%COMP%]{width:14px;height:14px}.lc-play-button[_ngcontent-%COMP%] path[_ngcontent-%COMP%]{fill:#fff}.lc-play-button[_ngcontent-%COMP%] .lc-text[_ngcontent-%COMP%]{font-size:11px;line-height:1;color:#fff;font-weight:400;margin-left:5px;text-align:center}"]})};var Ti=class{_attachedHost;attach(e){return this._attachedHost=e,e.attach(this)}detach(){let e=this._attachedHost;e!=null&&(this._attachedHost=null,e.detach())}get isAttached(){return this._attachedHost!=null}setAttachedHost(e){this._attachedHost=e}},Gr=class extends Ti{component;viewContainerRef;injector;componentFactoryResolver;projectableNodes;constructor(e,n,r,i,o){super(),this.component=e,this.viewContainerRef=n,this.injector=r,this.projectableNodes=o}},Wr=class extends Ti{templateRef;viewContainerRef;context;injector;constructor(e,n,r,i){super(),this.templateRef=e,this.viewContainerRef=n,this.context=r,this.injector=i}get origin(){return this.templateRef.elementRef}attach(e,n=this.context){return this.context=n,super.attach(e)}detach(){return this.context=void 0,super.detach()}},Fc=class extends Ti{element;constructor(e){super(),this.element=e instanceof bt?e.nativeElement:e}},Yr=class{_attachedPortal;_disposeFn;_isDisposed=!1;hasAttached(){return!!this._attachedPortal}attach(e){if(e instanceof Gr)return this._attachedPortal=e,this.attachComponentPortal(e);if(e instanceof Wr)return this._attachedPortal=e,this.attachTemplatePortal(e);if(this.attachDomPortal&&e instanceof Fc)return this._attachedPortal=e,this.attachDomPortal(e)}attachDomPortal=null;detach(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}dispose(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}setDisposeFn(e){this._disposeFn=e}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}};var ts=class extends Yr{outletElement;_appRef;_defaultInjector;_document;constructor(e,n,r,i,o){super(),this.outletElement=e,this._appRef=r,this._defaultInjector=i,this._document=o}attachComponentPortal(e){let n;if(e.viewContainerRef){let r=e.injector||e.viewContainerRef.injector,i=r.get(Ss,null,{optional:!0})||void 0;n=e.viewContainerRef.createComponent(e.component,{index:e.viewContainerRef.length,injector:r,ngModuleRef:i,projectableNodes:e.projectableNodes||void 0}),this.setDisposeFn(()=>n.destroy())}else{let r=this._appRef,i=e.injector||this._defaultInjector||Rt.NULL,o=i.get(Li,r.injector);n=Ll(e.component,{elementInjector:i,environmentInjector:o,projectableNodes:e.projectableNodes||void 0}),r.attachView(n.hostView),this.setDisposeFn(()=>{r.viewCount>0&&r.detachView(n.hostView),n.destroy()})}return this.outletElement.appendChild(this._getComponentRootNode(n)),this._attachedPortal=e,n}attachTemplatePortal(e){let n=e.viewContainerRef,r=n.createEmbeddedView(e.templateRef,e.context,{injector:e.injector});return r.rootNodes.forEach(i=>this.outletElement.appendChild(i)),r.detectChanges(),this.setDisposeFn(()=>{let i=n.indexOf(r);i!==-1&&n.remove(i)}),this._attachedPortal=e,r}attachDomPortal=e=>{let n=e.element;n.parentNode;let r=this._document.createComment("dom-portal");n.parentNode.insertBefore(r,n),this.outletElement.appendChild(n),this._attachedPortal=e,super.setDisposeFn(()=>{r.parentNode&&r.parentNode.replaceChild(n,r)})};dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(e){return e.hostView.rootNodes[0]}};var Vc=(()=>{class t extends Yr{_moduleRef=K(Ss,{optional:!0});_document=K(It);_viewContainerRef=K(Cs);_isInitialized=!1;_attachedRef;constructor(){super()}get portal(){return this._attachedPortal}set portal(n){this.hasAttached()&&!n&&!this._isInitialized||(this.hasAttached()&&super.detach(),n&&super.attach(n),this._attachedPortal=n||null)}attached=new it;get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedRef=this._attachedPortal=null}attachComponentPortal(n){n.setAttachedHost(this);let r=n.viewContainerRef!=null?n.viewContainerRef:this._viewContainerRef,i=r.createComponent(n.component,{index:r.length,injector:n.injector||r.injector,projectableNodes:n.projectableNodes||void 0,ngModuleRef:this._moduleRef||void 0});return r!==this._viewContainerRef&&this._getRootNode().appendChild(i.hostView.rootNodes[0]),super.setDisposeFn(()=>i.destroy()),this._attachedPortal=n,this._attachedRef=i,this.attached.emit(i),i}attachTemplatePortal(n){n.setAttachedHost(this);let r=this._viewContainerRef.createEmbeddedView(n.templateRef,n.context,{injector:n.injector});return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=n,this._attachedRef=r,this.attached.emit(r),r}attachDomPortal=n=>{let r=n.element;r.parentNode;let i=this._document.createComment("dom-portal");n.setAttachedHost(this),r.parentNode.insertBefore(i,r),this._getRootNode().appendChild(r),this._attachedPortal=n,super.setDisposeFn(()=>{i.parentNode&&i.parentNode.replaceChild(r,i)})};_getRootNode(){let n=this._viewContainerRef.element.nativeElement;return n.nodeType===n.ELEMENT_NODE?n:n.parentNode}static \u0275fac=function(r){return new(r||t)};static \u0275dir=yr({type:t,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:[0,"cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[wt]})}return t})();var Oi;function By(){if(Oi==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>Oi=!0}))}finally{Oi=Oi||!1}return Oi}function Bf(t){return By()?t:!!t.capture}var Uy=new Qt("cdk-input-modality-detector-options"),Hy={ignoreKeys:[18,17,224,91,16]},Uf=650,Bc={passive:!0,capture:!0},jy=(()=>{class t{_platform=K(rn);_listenerCleanups;modalityDetected;modalityChanged;get mostRecentModality(){return this._modality.value}_mostRecentTarget=null;_modality=new ul(null);_options;_lastTouchMs=0;_onKeydown=n=>{this._options?.ignoreKeys?.some(r=>r===n.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=On(n))};_onMousedown=n=>{Date.now()-this._lastTouchMs<Uf||(this._modality.next(jl(n)?"keyboard":"mouse"),this._mostRecentTarget=On(n))};_onTouchstart=n=>{if($l(n)){this._modality.next("keyboard");return}this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=On(n)};constructor(){let n=K(Mt),r=K(It),i=K(Uy,{optional:!0});if(this._options=D(D({},Hy),i),this.modalityDetected=this._modality.pipe(yl(1)),this.modalityChanged=this.modalityDetected.pipe(_l()),this._platform.isBrowser){let o=K(_r).createRenderer(null,null);this._listenerCleanups=n.runOutsideAngular(()=>[Dn(o,r,"keydown",this._onKeydown,Bc),Dn(o,r,"mousedown",this._onMousedown,Bc),Dn(o,r,"touchstart",this._onTouchstart,Bc)])}}ngOnDestroy(){this._modality.complete(),this._listenerCleanups?.forEach(n=>n())}static \u0275fac=function(r){return new(r||t)};static \u0275prov=mt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),rs=function(t){return t[t.IMMEDIATE=0]="IMMEDIATE",t[t.EVENTUAL=1]="EVENTUAL",t}(rs||{}),$y=new Qt("cdk-focus-monitor-default-options"),ns=Bf({passive:!0,capture:!0}),Hf=(()=>{class t{_ngZone=K(Mt);_platform=K(rn);_inputModalityDetector=K(jy);_origin=null;_lastFocusOrigin;_windowFocused=!1;_windowFocusTimeoutId;_originTimeoutId;_originFromTouchInteraction=!1;_elementInfo=new Map;_monitoredElementCount=0;_rootNodeFocusListenerCount=new Map;_detectionMode;_windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=setTimeout(()=>this._windowFocused=!1)};_document=K(It,{optional:!0});_stopInputModalityDetector=new dt;constructor(){let n=K($y,{optional:!0});this._detectionMode=n?.detectionMode||rs.IMMEDIATE}_rootNodeFocusAndBlurListener=n=>{let r=On(n);for(let i=r;i;i=i.parentElement)n.type==="focus"?this._onFocus(n,i):this._onBlur(n,i)};monitor(n,r=!1){let i=ji(n);if(!this._platform.isBrowser||i.nodeType!==1)return Mi();let o=Hl(i)||this._getDocument(),s=this._elementInfo.get(i);if(s)return r&&(s.checkChildren=!0),s.subject;let c={checkChildren:r,subject:new dt,rootNode:o};return this._elementInfo.set(i,c),this._registerGlobalListeners(c),c.subject}stopMonitoring(n){let r=ji(n),i=this._elementInfo.get(r);i&&(i.subject.complete(),this._setClasses(r),this._elementInfo.delete(r),this._removeGlobalListeners(i))}focusVia(n,r,i){let o=ji(n),s=this._getDocument().activeElement;o===s?this._getClosestElementsInfo(o).forEach(([c,u])=>this._originChanged(c,r,u)):(this._setOrigin(r),typeof o.focus=="function"&&o.focus(i))}ngOnDestroy(){this._elementInfo.forEach((n,r)=>this.stopMonitoring(r))}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_getFocusOrigin(n){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(n)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:n&&this._isLastInteractionFromInputLabel(n)?"mouse":"program"}_shouldBeAttributedToTouch(n){return this._detectionMode===rs.EVENTUAL||!!n?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(n,r){n.classList.toggle("cdk-focused",!!r),n.classList.toggle("cdk-touch-focused",r==="touch"),n.classList.toggle("cdk-keyboard-focused",r==="keyboard"),n.classList.toggle("cdk-mouse-focused",r==="mouse"),n.classList.toggle("cdk-program-focused",r==="program")}_setOrigin(n,r=!1){this._ngZone.runOutsideAngular(()=>{if(this._origin=n,this._originFromTouchInteraction=n==="touch"&&r,this._detectionMode===rs.IMMEDIATE){clearTimeout(this._originTimeoutId);let i=this._originFromTouchInteraction?Uf:1;this._originTimeoutId=setTimeout(()=>this._origin=null,i)}})}_onFocus(n,r){let i=this._elementInfo.get(r),o=On(n);!i||!i.checkChildren&&r!==o||this._originChanged(r,this._getFocusOrigin(o),i)}_onBlur(n,r){let i=this._elementInfo.get(r);!i||i.checkChildren&&n.relatedTarget instanceof Node&&r.contains(n.relatedTarget)||(this._setClasses(r),this._emitOrigin(i,null))}_emitOrigin(n,r){n.subject.observers.length&&this._ngZone.run(()=>n.subject.next(r))}_registerGlobalListeners(n){if(!this._platform.isBrowser)return;let r=n.rootNode,i=this._rootNodeFocusListenerCount.get(r)||0;i||this._ngZone.runOutsideAngular(()=>{r.addEventListener("focus",this._rootNodeFocusAndBlurListener,ns),r.addEventListener("blur",this._rootNodeFocusAndBlurListener,ns)}),this._rootNodeFocusListenerCount.set(r,i+1),++this._monitoredElementCount===1&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(mr(this._stopInputModalityDetector)).subscribe(o=>{this._setOrigin(o,!0)}))}_removeGlobalListeners(n){let r=n.rootNode;if(this._rootNodeFocusListenerCount.has(r)){let i=this._rootNodeFocusListenerCount.get(r);i>1?this._rootNodeFocusListenerCount.set(r,i-1):(r.removeEventListener("focus",this._rootNodeFocusAndBlurListener,ns),r.removeEventListener("blur",this._rootNodeFocusAndBlurListener,ns),this._rootNodeFocusListenerCount.delete(r))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(n,r,i){this._setClasses(n,r),this._emitOrigin(i,r),this._lastFocusOrigin=r}_getClosestElementsInfo(n){let r=[];return this._elementInfo.forEach((i,o)=>{(o===n||i.checkChildren&&o.contains(n))&&r.push([o,i])}),r}_isLastInteractionFromInputLabel(n){let{_mostRecentTarget:r,mostRecentModality:i}=this._inputModalityDetector;if(i!=="mouse"||!r||r===n||n.nodeName!=="INPUT"&&n.nodeName!=="TEXTAREA"||n.disabled)return!1;let o=n.labels;if(o){for(let s=0;s<o.length;s++)if(o[s].contains(r))return!0}return!1}static \u0275fac=function(r){return new(r||t)};static \u0275prov=mt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var jf=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Fe({type:t,selectors:[["ng-component"]],exportAs:["cdkVisuallyHidden"],decls:0,vars:0,template:function(r,i){},styles:[`.cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none;left:0}[dir=rtl] .cdk-visually-hidden{left:auto;right:0}
35
+ `],encapsulation:2,changeDetection:0})}return t})();var Hc=(()=>{class t{_platform=K(rn);constructor(){}isDisabled(n){return n.hasAttribute("disabled")}isVisible(n){return Wy(n)&&getComputedStyle(n).visibility==="visible"}isTabbable(n){if(!this._platform.isBrowser)return!1;let r=Gy(Qy(n));if(r&&($f(r)===-1||!this.isVisible(r)))return!1;let i=n.nodeName.toLowerCase(),o=$f(n);return n.hasAttribute("contenteditable")?o!==-1:i==="iframe"||i==="object"||this._platform.WEBKIT&&this._platform.IOS&&!Zy(n)?!1:i==="audio"?n.hasAttribute("controls")?o!==-1:!1:i==="video"?o===-1?!1:o!==null?!0:this._platform.FIREFOX||n.hasAttribute("controls"):n.tabIndex>=0}isFocusable(n,r){return Jy(n)&&!this.isDisabled(n)&&(r?.ignoreVisibility||this.isVisible(n))}static \u0275fac=function(r){return new(r||t)};static \u0275prov=mt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Gy(t){try{return t.frameElement}catch{return null}}function Wy(t){return!!(t.offsetWidth||t.offsetHeight||typeof t.getClientRects=="function"&&t.getClientRects().length)}function Yy(t){let e=t.nodeName.toLowerCase();return e==="input"||e==="select"||e==="button"||e==="textarea"}function zy(t){return Xy(t)&&t.type=="hidden"}function Ky(t){return qy(t)&&t.hasAttribute("href")}function Xy(t){return t.nodeName.toLowerCase()=="input"}function qy(t){return t.nodeName.toLowerCase()=="a"}function Gf(t){if(!t.hasAttribute("tabindex")||t.tabIndex===void 0)return!1;let e=t.getAttribute("tabindex");return!!(e&&!isNaN(parseInt(e,10)))}function $f(t){if(!Gf(t))return null;let e=parseInt(t.getAttribute("tabindex")||"",10);return isNaN(e)?-1:e}function Zy(t){let e=t.nodeName.toLowerCase(),n=e==="input"&&t.type;return n==="text"||n==="password"||e==="select"||e==="textarea"}function Jy(t){return zy(t)?!1:Yy(t)||Ky(t)||t.hasAttribute("contenteditable")||Gf(t)}function Qy(t){return t.ownerDocument&&t.ownerDocument.defaultView||window}var Uc=class{_element;_checker;_ngZone;_document;_injector;_startAnchor;_endAnchor;_hasAttached=!1;startAnchorListener=()=>this.focusLastTabbableElement();endAnchorListener=()=>this.focusFirstTabbableElement();get enabled(){return this._enabled}set enabled(e){this._enabled=e,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(e,this._startAnchor),this._toggleAnchorTabIndex(e,this._endAnchor))}_enabled=!0;constructor(e,n,r,i,o=!1,s){this._element=e,this._checker=n,this._ngZone=r,this._document=i,this._injector=s,o||this.attachAnchors()}destroy(){let e=this._startAnchor,n=this._endAnchor;e&&(e.removeEventListener("focus",this.startAnchorListener),e.remove()),n&&(n.removeEventListener("focus",this.endAnchorListener),n.remove()),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return this._hasAttached?!0:(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(e){return new Promise(n=>{this._executeOnStable(()=>n(this.focusInitialElement(e)))})}focusFirstTabbableElementWhenReady(e){return new Promise(n=>{this._executeOnStable(()=>n(this.focusFirstTabbableElement(e)))})}focusLastTabbableElementWhenReady(e){return new Promise(n=>{this._executeOnStable(()=>n(this.focusLastTabbableElement(e)))})}_getRegionBoundary(e){let n=this._element.querySelectorAll(`[cdk-focus-region-${e}], [cdkFocusRegion${e}], [cdk-focus-${e}]`);return e=="start"?n.length?n[0]:this._getFirstTabbableElement(this._element):n.length?n[n.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(e){let n=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(n){if(!this._checker.isFocusable(n)){let r=this._getFirstTabbableElement(n);return r?.focus(e),!!r}return n.focus(e),!0}return this.focusFirstTabbableElement(e)}focusFirstTabbableElement(e){let n=this._getRegionBoundary("start");return n&&n.focus(e),!!n}focusLastTabbableElement(e){let n=this._getRegionBoundary("end");return n&&n.focus(e),!!n}hasAttached(){return this._hasAttached}_getFirstTabbableElement(e){if(this._checker.isFocusable(e)&&this._checker.isTabbable(e))return e;let n=e.children;for(let r=0;r<n.length;r++){let i=n[r].nodeType===this._document.ELEMENT_NODE?this._getFirstTabbableElement(n[r]):null;if(i)return i}return null}_getLastTabbableElement(e){if(this._checker.isFocusable(e)&&this._checker.isTabbable(e))return e;let n=e.children;for(let r=n.length-1;r>=0;r--){let i=n[r].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(n[r]):null;if(i)return i}return null}_createAnchor(){let e=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,e),e.classList.add("cdk-visually-hidden"),e.classList.add("cdk-focus-trap-anchor"),e.setAttribute("aria-hidden","true"),e}_toggleAnchorTabIndex(e,n){e?n.setAttribute("tabindex","0"):n.removeAttribute("tabindex")}toggleAnchors(e){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(e,this._startAnchor),this._toggleAnchorTabIndex(e,this._endAnchor))}_executeOnStable(e){this._injector?gr(e,{injector:this._injector}):setTimeout(e)}},Wf=(()=>{class t{_checker=K(Hc);_ngZone=K(Mt);_document=K(It);_injector=K(Rt);constructor(){K(ni).load(jf)}create(n,r=!1){return new Uc(n,this._checker,this._ngZone,this._document,r,this._injector)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=mt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function jc(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}function nt(t){return t==null?"":typeof t=="string"?t:`${t}px`}function Yf(t,...e){return e.length?e.some(n=>t[n]):t.altKey||t.shiftKey||t.ctrlKey||t.metaKey}var zf=Gl(),$c=class{_viewportRuler;_previousHTMLStyles={top:"",left:""};_previousScrollPosition;_isEnabled=!1;_document;constructor(e,n){this._viewportRuler=e,this._document=n}attach(){}enable(){if(this._canBeEnabled()){let e=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=e.style.left||"",this._previousHTMLStyles.top=e.style.top||"",e.style.left=nt(-this._previousScrollPosition.left),e.style.top=nt(-this._previousScrollPosition.top),e.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){let e=this._document.documentElement,n=this._document.body,r=e.style,i=n.style,o=r.scrollBehavior||"",s=i.scrollBehavior||"";this._isEnabled=!1,r.left=this._previousHTMLStyles.left,r.top=this._previousHTMLStyles.top,e.classList.remove("cdk-global-scrollblock"),zf&&(r.scrollBehavior=i.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),zf&&(r.scrollBehavior=o,i.scrollBehavior=s)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;let n=this._document.documentElement,r=this._viewportRuler.getViewportSize();return n.scrollHeight>r.height||n.scrollWidth>r.width}};var Gc=class{_scrollDispatcher;_ngZone;_viewportRuler;_config;_scrollSubscription=null;_overlayRef;_initialScrollPosition;constructor(e,n,r,i){this._scrollDispatcher=e,this._ngZone=n,this._viewportRuler=r,this._config=i}attach(e){this._overlayRef,this._overlayRef=e}enable(){if(this._scrollSubscription)return;let e=this._scrollDispatcher.scrolled(0).pipe(gl(n=>!n||!this._overlayRef.overlayElement.contains(n.getElementRef().nativeElement)));this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=e.subscribe(()=>{let n=this._viewportRuler.getViewportScrollPosition().top;Math.abs(n-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=e.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}_detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}},is=class{enable(){}disable(){}attach(){}};function Wc(t,e){return e.some(n=>{let r=t.bottom<n.top,i=t.top>n.bottom,o=t.right<n.left,s=t.left>n.right;return r||i||o||s})}function Kf(t,e){return e.some(n=>{let r=t.top<n.top,i=t.bottom>n.bottom,o=t.left<n.left,s=t.right>n.right;return r||i||o||s})}var Yc=class{_scrollDispatcher;_viewportRuler;_ngZone;_config;_scrollSubscription=null;_overlayRef;constructor(e,n,r,i){this._scrollDispatcher=e,this._viewportRuler=n,this._ngZone=r,this._config=i}attach(e){this._overlayRef,this._overlayRef=e}enable(){if(!this._scrollSubscription){let e=this._config?this._config.scrollThrottle:0;this._scrollSubscription=this._scrollDispatcher.scrolled(e).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){let n=this._overlayRef.overlayElement.getBoundingClientRect(),{width:r,height:i}=this._viewportRuler.getViewportSize();Wc(n,[{width:r,height:i,bottom:i,right:r,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}})}}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}},tv=(()=>{class t{_scrollDispatcher=K(Wl);_viewportRuler=K(Os);_ngZone=K(Mt);_document=K(It);constructor(){}noop=()=>new is;close=n=>new Gc(this._scrollDispatcher,this._ngZone,this._viewportRuler,n);block=()=>new $c(this._viewportRuler,this._document);reposition=n=>new Yc(this._scrollDispatcher,this._viewportRuler,this._ngZone,n);static \u0275fac=function(r){return new(r||t)};static \u0275prov=mt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Di=class{positionStrategy;scrollStrategy=new is;panelClass="";hasBackdrop=!1;backdropClass="cdk-overlay-dark-backdrop";width;height;minWidth;minHeight;maxWidth;maxHeight;direction;disposeOnNavigation=!1;constructor(e){if(e){let n=Object.keys(e);for(let r of n)e[r]!==void 0&&(this[r]=e[r])}}};var zc=class{connectionPair;scrollableViewProperties;constructor(e,n){this.connectionPair=e,this.scrollableViewProperties=n}};var ep=(()=>{class t{_attachedOverlays=[];_document=K(It);_isAttached;constructor(){}ngOnDestroy(){this.detach()}add(n){this.remove(n),this._attachedOverlays.push(n)}remove(n){let r=this._attachedOverlays.indexOf(n);r>-1&&this._attachedOverlays.splice(r,1),this._attachedOverlays.length===0&&this.detach()}static \u0275fac=function(r){return new(r||t)};static \u0275prov=mt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),nv=(()=>{class t extends ep{_ngZone=K(Mt);_renderer=K(_r).createRenderer(null,null);_cleanupKeydown;add(n){super.add(n),this._isAttached||(this._ngZone.runOutsideAngular(()=>{this._cleanupKeydown=this._renderer.listen("body","keydown",this._keydownListener)}),this._isAttached=!0)}detach(){this._isAttached&&(this._cleanupKeydown?.(),this._isAttached=!1)}_keydownListener=n=>{let r=this._attachedOverlays;for(let i=r.length-1;i>-1;i--)if(r[i]._keydownEvents.observers.length>0){this._ngZone.run(()=>r[i]._keydownEvents.next(n));break}};static \u0275fac=(()=>{let n;return function(i){return(n||(n=ei(t)))(i||t)}})();static \u0275prov=mt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),rv=(()=>{class t extends ep{_platform=K(rn);_ngZone=K(Mt);_renderer=K(_r).createRenderer(null,null);_cursorOriginalValue;_cursorStyleIsSet=!1;_pointerDownEventTarget;_cleanups;add(n){if(super.add(n),!this._isAttached){let r=this._document.body,i={capture:!0};this._cleanups=this._ngZone.runOutsideAngular(()=>[Dn(this._renderer,r,"pointerdown",this._pointerDownListener,i),Dn(this._renderer,r,"click",this._clickListener,i),Dn(this._renderer,r,"auxclick",this._clickListener,i),Dn(this._renderer,r,"contextmenu",this._clickListener,i)]),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=r.style.cursor,r.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}detach(){this._isAttached&&(this._cleanups?.forEach(n=>n()),this._cleanups=void 0,this._platform.IOS&&this._cursorStyleIsSet&&(this._document.body.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1)}_pointerDownListener=n=>{this._pointerDownEventTarget=On(n)};_clickListener=n=>{let r=On(n),i=n.type==="click"&&this._pointerDownEventTarget?this._pointerDownEventTarget:r;this._pointerDownEventTarget=null;let o=this._attachedOverlays.slice();for(let s=o.length-1;s>-1;s--){let c=o[s];if(c._outsidePointerEvents.observers.length<1||!c.hasAttached())continue;if(Xf(c.overlayElement,r)||Xf(c.overlayElement,i))break;let u=c._outsidePointerEvents;this._ngZone?this._ngZone.run(()=>u.next(n)):u.next(n)}};static \u0275fac=(()=>{let n;return function(i){return(n||(n=ei(t)))(i||t)}})();static \u0275prov=mt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Xf(t,e){let n=typeof ShadowRoot<"u"&&ShadowRoot,r=e;for(;r;){if(r===t)return!0;r=n&&r instanceof ShadowRoot?r.host:r.parentNode}return!1}var tp=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Fe({type:t,selectors:[["ng-component"]],hostAttrs:["cdk-overlay-style-loader",""],decls:0,vars:0,template:function(r,i){},styles:[`.cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed}@layer cdk-overlay{.cdk-overlay-container{z-index:1000}}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute}@layer cdk-overlay{.cdk-global-overlay-wrapper{z-index:1000}}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;display:flex;max-width:100%;max-height:100%}@layer cdk-overlay{.cdk-overlay-pane{z-index:1000}}.cdk-overlay-backdrop{position:absolute;top:0;bottom:0;left:0;right:0;pointer-events:auto;-webkit-tap-highlight-color:rgba(0,0,0,0);opacity:0}@layer cdk-overlay{.cdk-overlay-backdrop{z-index:1000;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}}@media(prefers-reduced-motion){.cdk-overlay-backdrop{transition-duration:1ms}}.cdk-overlay-backdrop-showing{opacity:1}@media(forced-colors: active){.cdk-overlay-backdrop-showing{opacity:.6}}@layer cdk-overlay{.cdk-overlay-dark-backdrop{background:rgba(0,0,0,.32)}}.cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing,.cdk-high-contrast-active .cdk-overlay-transparent-backdrop{opacity:0;visibility:visible}.cdk-overlay-backdrop-noop-animation{transition:none}.cdk-overlay-connected-position-bounding-box{position:absolute;display:flex;flex-direction:column;min-width:1px;min-height:1px}@layer cdk-overlay{.cdk-overlay-connected-position-bounding-box{z-index:1000}}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}
36
+ `],encapsulation:2,changeDetection:0})}return t})(),os=(()=>{class t{_platform=K(rn);_containerElement;_document=K(It);_styleLoader=K(ni);constructor(){}ngOnDestroy(){this._containerElement?.remove()}getContainerElement(){return this._loadStyles(),this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let n="cdk-overlay-container";if(this._platform.isBrowser||jc()){let i=this._document.querySelectorAll(`.${n}[platform="server"], .${n}[platform="test"]`);for(let o=0;o<i.length;o++)i[o].remove()}let r=this._document.createElement("div");r.classList.add(n),jc()?r.setAttribute("platform","test"):this._platform.isBrowser||r.setAttribute("platform","server"),this._document.body.appendChild(r),this._containerElement=r}_loadStyles(){this._styleLoader.load(tp)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=mt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Kc=class{_renderer;_ngZone;element;_cleanupClick;_cleanupTransitionEnd;_fallbackTimeout;constructor(e,n,r,i){this._renderer=n,this._ngZone=r,this.element=e.createElement("div"),this.element.classList.add("cdk-overlay-backdrop"),this._cleanupClick=n.listen(this.element,"click",i)}detach(){this._ngZone.runOutsideAngular(()=>{let e=this.element;clearTimeout(this._fallbackTimeout),this._cleanupTransitionEnd?.(),this._cleanupTransitionEnd=this._renderer.listen(e,"transitionend",this.dispose),this._fallbackTimeout=setTimeout(this.dispose,500),e.style.pointerEvents="none",e.classList.remove("cdk-overlay-backdrop-showing")})}dispose=()=>{clearTimeout(this._fallbackTimeout),this._cleanupClick?.(),this._cleanupTransitionEnd?.(),this._cleanupClick=this._cleanupTransitionEnd=this._fallbackTimeout=void 0,this.element.remove()}},zr=class{_portalOutlet;_host;_pane;_config;_ngZone;_keyboardDispatcher;_document;_location;_outsideClickDispatcher;_animationsDisabled;_injector;_renderer;_backdropClick=new dt;_attachments=new dt;_detachments=new dt;_positionStrategy;_scrollStrategy;_locationChanges=Qr.EMPTY;_backdropRef=null;_previousHostParent;_keydownEvents=new dt;_outsidePointerEvents=new dt;_renders=new dt;_afterRenderRef;_afterNextRenderRef;constructor(e,n,r,i,o,s,c,u,d,g=!1,p,E){this._portalOutlet=e,this._host=n,this._pane=r,this._config=i,this._ngZone=o,this._keyboardDispatcher=s,this._document=c,this._location=u,this._outsideClickDispatcher=d,this._animationsDisabled=g,this._injector=p,this._renderer=E,i.scrollStrategy&&(this._scrollStrategy=i.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=i.positionStrategy,this._afterRenderRef=xs(()=>Tl(()=>{this._renders.next()},{injector:this._injector}))}get overlayElement(){return this._pane}get backdropElement(){return this._backdropRef?.element||null}get hostElement(){return this._host}attach(e){!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host);let n=this._portalOutlet.attach(e);return this._positionStrategy&&this._positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._afterNextRenderRef?.destroy(),this._afterNextRenderRef=gr(()=>{this.hasAttached()&&this.updatePosition()},{injector:this._injector}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),typeof n?.onDestroy=="function"&&n.onDestroy(()=>{this.hasAttached()&&this._ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>this.detach()))}),n}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();let e=this._portalOutlet.detach();return this._detachments.next(),this._keyboardDispatcher.remove(this),this._detachContentWhenEmpty(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),e}dispose(){let e=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this._backdropRef?.dispose(),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),this._host?.remove(),this._afterNextRenderRef?.destroy(),this._previousHostParent=this._pane=this._host=this._backdropRef=null,e&&this._detachments.next(),this._detachments.complete(),this._afterRenderRef.destroy(),this._renders.complete()}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(e){e!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=e,this.hasAttached()&&(e.attach(this),this.updatePosition()))}updateSize(e){this._config=D(D({},this._config),e),this._updateElementSize()}setDirection(e){this._config=Ie(D({},this._config),{direction:e}),this._updateElementDirection()}addPanelClass(e){this._pane&&this._toggleClasses(this._pane,e,!0)}removePanelClass(e){this._pane&&this._toggleClasses(this._pane,e,!1)}getDirection(){let e=this._config.direction;return e?typeof e=="string"?e:e.value:"ltr"}updateScrollStrategy(e){e!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=e,this.hasAttached()&&(e.attach(this),e.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;let e=this._pane.style;e.width=nt(this._config.width),e.height=nt(this._config.height),e.minWidth=nt(this._config.minWidth),e.minHeight=nt(this._config.minHeight),e.maxWidth=nt(this._config.maxWidth),e.maxHeight=nt(this._config.maxHeight)}_togglePointerEvents(e){this._pane.style.pointerEvents=e?"":"none"}_attachBackdrop(){let e="cdk-overlay-backdrop-showing";this._backdropRef?.dispose(),this._backdropRef=new Kc(this._document,this._renderer,this._ngZone,n=>{this._backdropClick.next(n)}),this._animationsDisabled&&this._backdropRef.element.classList.add("cdk-overlay-backdrop-noop-animation"),this._config.backdropClass&&this._toggleClasses(this._backdropRef.element,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropRef.element,this._host),!this._animationsDisabled&&typeof requestAnimationFrame<"u"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>this._backdropRef?.element.classList.add(e))}):this._backdropRef.element.classList.add(e)}_updateStackingOrder(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){this._animationsDisabled?(this._backdropRef?.dispose(),this._backdropRef=null):this._backdropRef?.detach()}_toggleClasses(e,n,r){let i=Ds(n||[]).filter(o=>!!o);i.length&&(r?e.classList.add(...i):e.classList.remove(...i))}_detachContentWhenEmpty(){this._ngZone.runOutsideAngular(()=>{let e=this._renders.pipe(mr(Pi(this._attachments,this._detachments))).subscribe(()=>{(!this._pane||!this._host||this._pane.children.length===0)&&(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._host.remove()),e.unsubscribe())})})}_disposeScrollStrategy(){let e=this._scrollStrategy;e?.disable(),e?.detach?.()}},qf="cdk-overlay-connected-position-bounding-box",iv=/([A-Za-z%]+)$/,Xc=class{_viewportRuler;_document;_platform;_overlayContainer;_overlayRef;_isInitialRender;_lastBoundingBoxSize={width:0,height:0};_isPushed=!1;_canPush=!0;_growAfterOpen=!1;_hasFlexibleDimensions=!0;_positionLocked=!1;_originRect;_overlayRect;_viewportRect;_containerRect;_viewportMargin=0;_scrollables=[];_preferredPositions=[];_origin;_pane;_isDisposed;_boundingBox;_lastPosition;_lastScrollVisibility;_positionChanges=new dt;_resizeSubscription=Qr.EMPTY;_offsetX=0;_offsetY=0;_transformOriginSelector;_appliedPanelClasses=[];_previousPushAmount;positionChanges=this._positionChanges;get positions(){return this._preferredPositions}constructor(e,n,r,i,o){this._viewportRuler=n,this._document=r,this._platform=i,this._overlayContainer=o,this.setOrigin(e)}attach(e){this._overlayRef&&this._overlayRef,this._validatePositions(),e.hostElement.classList.add(qf),this._overlayRef=e,this._boundingBox=e.hostElement,this._pane=e.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition){this.reapplyLastPosition();return}this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let e=this._originRect,n=this._overlayRect,r=this._viewportRect,i=this._containerRect,o=[],s;for(let c of this._preferredPositions){let u=this._getOriginPoint(e,i,c),d=this._getOverlayPoint(u,n,c),g=this._getOverlayFit(d,n,r,c);if(g.isCompletelyWithinViewport){this._isPushed=!1,this._applyPosition(c,u);return}if(this._canFitWithFlexibleDimensions(g,d,r)){o.push({position:c,origin:u,overlayRect:n,boundingBoxRect:this._calculateBoundingBoxRect(u,c)});continue}(!s||s.overlayFit.visibleArea<g.visibleArea)&&(s={overlayFit:g,overlayPoint:d,originPoint:u,position:c,overlayRect:n})}if(o.length){let c=null,u=-1;for(let d of o){let g=d.boundingBoxRect.width*d.boundingBoxRect.height*(d.position.weight||1);g>u&&(u=g,c=d)}this._isPushed=!1,this._applyPosition(c.position,c.origin);return}if(this._canPush){this._isPushed=!0,this._applyPosition(s.position,s.originPoint);return}this._applyPosition(s.position,s.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&fr(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(qf),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(this._isDisposed||!this._platform.isBrowser)return;let e=this._lastPosition;if(e){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let n=this._getOriginPoint(this._originRect,this._containerRect,e);this._applyPosition(e,n)}else this.apply()}withScrollableContainers(e){return this._scrollables=e,this}withPositions(e){return this._preferredPositions=e,e.indexOf(this._lastPosition)===-1&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(e){return this._viewportMargin=e,this}withFlexibleDimensions(e=!0){return this._hasFlexibleDimensions=e,this}withGrowAfterOpen(e=!0){return this._growAfterOpen=e,this}withPush(e=!0){return this._canPush=e,this}withLockedPosition(e=!0){return this._positionLocked=e,this}setOrigin(e){return this._origin=e,this}withDefaultOffsetX(e){return this._offsetX=e,this}withDefaultOffsetY(e){return this._offsetY=e,this}withTransformOriginOn(e){return this._transformOriginSelector=e,this}_getOriginPoint(e,n,r){let i;if(r.originX=="center")i=e.left+e.width/2;else{let s=this._isRtl()?e.right:e.left,c=this._isRtl()?e.left:e.right;i=r.originX=="start"?s:c}n.left<0&&(i-=n.left);let o;return r.originY=="center"?o=e.top+e.height/2:o=r.originY=="top"?e.top:e.bottom,n.top<0&&(o-=n.top),{x:i,y:o}}_getOverlayPoint(e,n,r){let i;r.overlayX=="center"?i=-n.width/2:r.overlayX==="start"?i=this._isRtl()?-n.width:0:i=this._isRtl()?0:-n.width;let o;return r.overlayY=="center"?o=-n.height/2:o=r.overlayY=="top"?0:-n.height,{x:e.x+i,y:e.y+o}}_getOverlayFit(e,n,r,i){let o=Jf(n),{x:s,y:c}=e,u=this._getOffset(i,"x"),d=this._getOffset(i,"y");u&&(s+=u),d&&(c+=d);let g=0-s,p=s+o.width-r.width,E=0-c,C=c+o.height-r.height,O=this._subtractOverflows(o.width,g,p),M=this._subtractOverflows(o.height,E,C),L=O*M;return{visibleArea:L,isCompletelyWithinViewport:o.width*o.height===L,fitsInViewportVertically:M===o.height,fitsInViewportHorizontally:O==o.width}}_canFitWithFlexibleDimensions(e,n,r){if(this._hasFlexibleDimensions){let i=r.bottom-n.y,o=r.right-n.x,s=Zf(this._overlayRef.getConfig().minHeight),c=Zf(this._overlayRef.getConfig().minWidth),u=e.fitsInViewportVertically||s!=null&&s<=i,d=e.fitsInViewportHorizontally||c!=null&&c<=o;return u&&d}return!1}_pushOverlayOnScreen(e,n,r){if(this._previousPushAmount&&this._positionLocked)return{x:e.x+this._previousPushAmount.x,y:e.y+this._previousPushAmount.y};let i=Jf(n),o=this._viewportRect,s=Math.max(e.x+i.width-o.width,0),c=Math.max(e.y+i.height-o.height,0),u=Math.max(o.top-r.top-e.y,0),d=Math.max(o.left-r.left-e.x,0),g=0,p=0;return i.width<=o.width?g=d||-s:g=e.x<this._viewportMargin?o.left-r.left-e.x:0,i.height<=o.height?p=u||-c:p=e.y<this._viewportMargin?o.top-r.top-e.y:0,this._previousPushAmount={x:g,y:p},{x:e.x+g,y:e.y+p}}_applyPosition(e,n){if(this._setTransformOrigin(e),this._setOverlayElementStyles(n,e),this._setBoundingBoxStyles(n,e),e.panelClass&&this._addPanelClasses(e.panelClass),this._positionChanges.observers.length){let r=this._getScrollVisibility();if(e!==this._lastPosition||!this._lastScrollVisibility||!ov(this._lastScrollVisibility,r)){let i=new zc(e,r);this._positionChanges.next(i)}this._lastScrollVisibility=r}this._lastPosition=e,this._isInitialRender=!1}_setTransformOrigin(e){if(!this._transformOriginSelector)return;let n=this._boundingBox.querySelectorAll(this._transformOriginSelector),r,i=e.overlayY;e.overlayX==="center"?r="center":this._isRtl()?r=e.overlayX==="start"?"right":"left":r=e.overlayX==="start"?"left":"right";for(let o=0;o<n.length;o++)n[o].style.transformOrigin=`${r} ${i}`}_calculateBoundingBoxRect(e,n){let r=this._viewportRect,i=this._isRtl(),o,s,c;if(n.overlayY==="top")s=e.y,o=r.height-s+this._viewportMargin;else if(n.overlayY==="bottom")c=r.height-e.y+this._viewportMargin*2,o=r.height-c+this._viewportMargin;else{let C=Math.min(r.bottom-e.y+r.top,e.y),O=this._lastBoundingBoxSize.height;o=C*2,s=e.y-C,o>O&&!this._isInitialRender&&!this._growAfterOpen&&(s=e.y-O/2)}let u=n.overlayX==="start"&&!i||n.overlayX==="end"&&i,d=n.overlayX==="end"&&!i||n.overlayX==="start"&&i,g,p,E;if(d)E=r.width-e.x+this._viewportMargin*2,g=e.x-this._viewportMargin;else if(u)p=e.x,g=r.right-e.x;else{let C=Math.min(r.right-e.x+r.left,e.x),O=this._lastBoundingBoxSize.width;g=C*2,p=e.x-C,g>O&&!this._isInitialRender&&!this._growAfterOpen&&(p=e.x-O/2)}return{top:s,left:p,bottom:c,right:E,width:g,height:o}}_setBoundingBoxStyles(e,n){let r=this._calculateBoundingBoxRect(e,n);!this._isInitialRender&&!this._growAfterOpen&&(r.height=Math.min(r.height,this._lastBoundingBoxSize.height),r.width=Math.min(r.width,this._lastBoundingBoxSize.width));let i={};if(this._hasExactPosition())i.top=i.left="0",i.bottom=i.right=i.maxHeight=i.maxWidth="",i.width=i.height="100%";else{let o=this._overlayRef.getConfig().maxHeight,s=this._overlayRef.getConfig().maxWidth;i.height=nt(r.height),i.top=nt(r.top),i.bottom=nt(r.bottom),i.width=nt(r.width),i.left=nt(r.left),i.right=nt(r.right),n.overlayX==="center"?i.alignItems="center":i.alignItems=n.overlayX==="end"?"flex-end":"flex-start",n.overlayY==="center"?i.justifyContent="center":i.justifyContent=n.overlayY==="bottom"?"flex-end":"flex-start",o&&(i.maxHeight=nt(o)),s&&(i.maxWidth=nt(s))}this._lastBoundingBoxSize=r,fr(this._boundingBox.style,i)}_resetBoundingBoxStyles(){fr(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){fr(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(e,n){let r={},i=this._hasExactPosition(),o=this._hasFlexibleDimensions,s=this._overlayRef.getConfig();if(i){let g=this._viewportRuler.getViewportScrollPosition();fr(r,this._getExactOverlayY(n,e,g)),fr(r,this._getExactOverlayX(n,e,g))}else r.position="static";let c="",u=this._getOffset(n,"x"),d=this._getOffset(n,"y");u&&(c+=`translateX(${u}px) `),d&&(c+=`translateY(${d}px)`),r.transform=c.trim(),s.maxHeight&&(i?r.maxHeight=nt(s.maxHeight):o&&(r.maxHeight="")),s.maxWidth&&(i?r.maxWidth=nt(s.maxWidth):o&&(r.maxWidth="")),fr(this._pane.style,r)}_getExactOverlayY(e,n,r){let i={top:"",bottom:""},o=this._getOverlayPoint(n,this._overlayRect,e);if(this._isPushed&&(o=this._pushOverlayOnScreen(o,this._overlayRect,r)),e.overlayY==="bottom"){let s=this._document.documentElement.clientHeight;i.bottom=`${s-(o.y+this._overlayRect.height)}px`}else i.top=nt(o.y);return i}_getExactOverlayX(e,n,r){let i={left:"",right:""},o=this._getOverlayPoint(n,this._overlayRect,e);this._isPushed&&(o=this._pushOverlayOnScreen(o,this._overlayRect,r));let s;if(this._isRtl()?s=e.overlayX==="end"?"left":"right":s=e.overlayX==="end"?"right":"left",s==="right"){let c=this._document.documentElement.clientWidth;i.right=`${c-(o.x+this._overlayRect.width)}px`}else i.left=nt(o.x);return i}_getScrollVisibility(){let e=this._getOriginRect(),n=this._pane.getBoundingClientRect(),r=this._scrollables.map(i=>i.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:Kf(e,r),isOriginOutsideView:Wc(e,r),isOverlayClipped:Kf(n,r),isOverlayOutsideView:Wc(n,r)}}_subtractOverflows(e,...n){return n.reduce((r,i)=>r-Math.max(i,0),e)}_getNarrowedViewportRect(){let e=this._document.documentElement.clientWidth,n=this._document.documentElement.clientHeight,r=this._viewportRuler.getViewportScrollPosition();return{top:r.top+this._viewportMargin,left:r.left+this._viewportMargin,right:r.left+e-this._viewportMargin,bottom:r.top+n-this._viewportMargin,width:e-2*this._viewportMargin,height:n-2*this._viewportMargin}}_isRtl(){return this._overlayRef.getDirection()==="rtl"}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(e,n){return n==="x"?e.offsetX==null?this._offsetX:e.offsetX:e.offsetY==null?this._offsetY:e.offsetY}_validatePositions(){}_addPanelClasses(e){this._pane&&Ds(e).forEach(n=>{n!==""&&this._appliedPanelClasses.indexOf(n)===-1&&(this._appliedPanelClasses.push(n),this._pane.classList.add(n))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(e=>{this._pane.classList.remove(e)}),this._appliedPanelClasses=[])}_getOriginRect(){let e=this._origin;if(e instanceof bt)return e.nativeElement.getBoundingClientRect();if(e instanceof Element)return e.getBoundingClientRect();let n=e.width||0,r=e.height||0;return{top:e.y,bottom:e.y+r,left:e.x,right:e.x+n,height:r,width:n}}};function fr(t,e){for(let n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function Zf(t){if(typeof t!="number"&&t!=null){let[e,n]=t.split(iv);return!n||n==="px"?parseFloat(e):null}return t||null}function Jf(t){return{top:Math.floor(t.top),right:Math.floor(t.right),bottom:Math.floor(t.bottom),left:Math.floor(t.left),width:Math.floor(t.width),height:Math.floor(t.height)}}function ov(t,e){return t===e?!0:t.isOriginClipped===e.isOriginClipped&&t.isOriginOutsideView===e.isOriginOutsideView&&t.isOverlayClipped===e.isOverlayClipped&&t.isOverlayOutsideView===e.isOverlayOutsideView}var Qf="cdk-global-overlay-wrapper",qc=class{_overlayRef;_cssPosition="static";_topOffset="";_bottomOffset="";_alignItems="";_xPosition="";_xOffset="";_width="";_height="";_isDisposed=!1;attach(e){let n=e.getConfig();this._overlayRef=e,this._width&&!n.width&&e.updateSize({width:this._width}),this._height&&!n.height&&e.updateSize({height:this._height}),e.hostElement.classList.add(Qf),this._isDisposed=!1}top(e=""){return this._bottomOffset="",this._topOffset=e,this._alignItems="flex-start",this}left(e=""){return this._xOffset=e,this._xPosition="left",this}bottom(e=""){return this._topOffset="",this._bottomOffset=e,this._alignItems="flex-end",this}right(e=""){return this._xOffset=e,this._xPosition="right",this}start(e=""){return this._xOffset=e,this._xPosition="start",this}end(e=""){return this._xOffset=e,this._xPosition="end",this}width(e=""){return this._overlayRef?this._overlayRef.updateSize({width:e}):this._width=e,this}height(e=""){return this._overlayRef?this._overlayRef.updateSize({height:e}):this._height=e,this}centerHorizontally(e=""){return this.left(e),this._xPosition="center",this}centerVertically(e=""){return this.top(e),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;let e=this._overlayRef.overlayElement.style,n=this._overlayRef.hostElement.style,r=this._overlayRef.getConfig(),{width:i,height:o,maxWidth:s,maxHeight:c}=r,u=(i==="100%"||i==="100vw")&&(!s||s==="100%"||s==="100vw"),d=(o==="100%"||o==="100vh")&&(!c||c==="100%"||c==="100vh"),g=this._xPosition,p=this._xOffset,E=this._overlayRef.getConfig().direction==="rtl",C="",O="",M="";u?M="flex-start":g==="center"?(M="center",E?O=p:C=p):E?g==="left"||g==="end"?(M="flex-end",C=p):(g==="right"||g==="start")&&(M="flex-start",O=p):g==="left"||g==="start"?(M="flex-start",C=p):(g==="right"||g==="end")&&(M="flex-end",O=p),e.position=this._cssPosition,e.marginLeft=u?"0":C,e.marginTop=d?"0":this._topOffset,e.marginBottom=this._bottomOffset,e.marginRight=u?"0":O,n.justifyContent=M,n.alignItems=d?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;let e=this._overlayRef.overlayElement.style,n=this._overlayRef.hostElement,r=n.style;n.classList.remove(Qf),r.justifyContent=r.alignItems=e.marginTop=e.marginBottom=e.marginLeft=e.marginRight=e.position="",this._overlayRef=null,this._isDisposed=!0}},sv=(()=>{class t{_viewportRuler=K(Os);_document=K(It);_platform=K(rn);_overlayContainer=K(os);constructor(){}global(){return new qc}flexibleConnectedTo(n){return new Xc(n,this._viewportRuler,this._document,this._platform,this._overlayContainer)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=mt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Zc=(()=>{class t{scrollStrategies=K(tv);_overlayContainer=K(os);_positionBuilder=K(sv);_keyboardDispatcher=K(nv);_injector=K(Rt);_ngZone=K(Mt);_document=K(It);_directionality=K(ri);_location=K(kl);_outsideClickDispatcher=K(rv);_animationsModuleType=K(xl,{optional:!0});_idGenerator=K($i);_renderer=K(_r).createRenderer(null,null);_appRef;_styleLoader=K(ni);constructor(){}create(n){this._styleLoader.load(tp);let r=this._createHostElement(),i=this._createPaneElement(r),o=this._createPortalOutlet(i),s=new Di(n);return s.direction=s.direction||this._directionality.value,new zr(o,r,i,s,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher,this._animationsModuleType==="NoopAnimations",this._injector.get(Li),this._renderer)}position(){return this._positionBuilder}_createPaneElement(n){let r=this._document.createElement("div");return r.id=this._idGenerator.getId("cdk-overlay-"),r.classList.add("cdk-overlay-pane"),n.appendChild(r),r}_createHostElement(){let n=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(n),n}_createPortalOutlet(n){return this._appRef||(this._appRef=this._injector.get(Vi)),new ts(n,null,this._appRef,this._injector,this._document)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=mt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function av(t,e){}var Kr=class{viewContainerRef;injector;id;role="dialog";panelClass="";hasBackdrop=!0;backdropClass="";disableClose=!1;width="";height="";minWidth;minHeight;maxWidth;maxHeight;positionStrategy;data=null;direction;ariaDescribedBy=null;ariaLabelledBy=null;ariaLabel=null;ariaModal=!1;autoFocus="first-tabbable";restoreFocus=!0;scrollStrategy;closeOnNavigation=!0;closeOnDestroy=!0;closeOnOverlayDetachments=!0;componentFactoryResolver;providers;container;templateContext};var cv=(()=>{class t extends Yr{_elementRef=K(bt);_focusTrapFactory=K(Wf);_config;_interactivityChecker=K(Hc);_ngZone=K(Mt);_overlayRef=K(zr);_focusMonitor=K(Hf);_renderer=K(ws);_platform=K(rn);_document=K(It,{optional:!0});_portalOutlet;_focusTrap=null;_elementFocusedBeforeDialogWasOpened=null;_closeInteractionType=null;_ariaLabelledByQueue=[];_changeDetectorRef=K(Xn);_injector=K(Rt);_isDestroyed=!1;constructor(){super(),this._config=K(Kr,{optional:!0})||new Kr,this._config.ariaLabelledBy&&this._ariaLabelledByQueue.push(this._config.ariaLabelledBy)}_addAriaLabelledBy(n){this._ariaLabelledByQueue.push(n),this._changeDetectorRef.markForCheck()}_removeAriaLabelledBy(n){let r=this._ariaLabelledByQueue.indexOf(n);r>-1&&(this._ariaLabelledByQueue.splice(r,1),this._changeDetectorRef.markForCheck())}_contentAttached(){this._initializeFocusTrap(),this._handleBackdropClicks(),this._captureInitialFocus()}_captureInitialFocus(){this._trapFocus()}ngOnDestroy(){this._isDestroyed=!0,this._restoreFocus()}attachComponentPortal(n){this._portalOutlet.hasAttached();let r=this._portalOutlet.attachComponentPortal(n);return this._contentAttached(),r}attachTemplatePortal(n){this._portalOutlet.hasAttached();let r=this._portalOutlet.attachTemplatePortal(n);return this._contentAttached(),r}attachDomPortal=n=>{this._portalOutlet.hasAttached();let r=this._portalOutlet.attachDomPortal(n);return this._contentAttached(),r};_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(n,r){this._interactivityChecker.isFocusable(n)||(n.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{let i=()=>{o(),s(),n.removeAttribute("tabindex")},o=this._renderer.listen(n,"blur",i),s=this._renderer.listen(n,"mousedown",i)})),n.focus(r)}_focusByCssSelector(n,r){let i=this._elementRef.nativeElement.querySelector(n);i&&this._forceFocus(i,r)}_trapFocus(n){this._isDestroyed||gr(()=>{let r=this._elementRef.nativeElement;switch(this._config.autoFocus){case!1:case"dialog":this._containsFocus()||r.focus(n);break;case!0:case"first-tabbable":this._focusTrap?.focusInitialElement(n)||this._focusDialogContainer(n);break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]',n);break;default:this._focusByCssSelector(this._config.autoFocus,n);break}},{injector:this._injector})}_restoreFocus(){let n=this._config.restoreFocus,r=null;if(typeof n=="string"?r=this._document.querySelector(n):typeof n=="boolean"?r=n?this._elementFocusedBeforeDialogWasOpened:null:n&&(r=n),this._config.restoreFocus&&r&&typeof r.focus=="function"){let i=Hi(),o=this._elementRef.nativeElement;(!i||i===this._document.body||i===o||o.contains(i))&&(this._focusMonitor?(this._focusMonitor.focusVia(r,this._closeInteractionType),this._closeInteractionType=null):r.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(n){this._elementRef.nativeElement.focus&&this._elementRef.nativeElement.focus(n)}_containsFocus(){let n=this._elementRef.nativeElement,r=Hi();return n===r||n.contains(r)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=Hi()))}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Fe({type:t,selectors:[["cdk-dialog-container"]],viewQuery:function(r,i){if(r&1&&Yn(Vc,7),r&2){let o;zn(o=Kn())&&(i._portalOutlet=o.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(r,i){r&2&&xn("id",i._config.id||null)("role",i._config.role)("aria-modal",i._config.ariaModal)("aria-labelledby",i._config.ariaLabel?null:i._ariaLabelledByQueue[0])("aria-label",i._config.ariaLabel)("aria-describedby",i._config.ariaDescribedBy||null)},features:[wt],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(r,i){r&1&&De(0,av,0,0,"ng-template",0)},dependencies:[Vc],styles:[`.cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}
37
+ `],encapsulation:2})}return t})(),pr=class{overlayRef;config;componentInstance;componentRef;containerInstance;disableClose;closed=new dt;backdropClick;keydownEvents;outsidePointerEvents;id;_detachSubscription;constructor(e,n){this.overlayRef=e,this.config=n,this.disableClose=n.disableClose,this.backdropClick=e.backdropClick(),this.keydownEvents=e.keydownEvents(),this.outsidePointerEvents=e.outsidePointerEvents(),this.id=n.id,this.keydownEvents.subscribe(r=>{r.keyCode===27&&!this.disableClose&&!Yf(r)&&(r.preventDefault(),this.close(void 0,{focusOrigin:"keyboard"}))}),this.backdropClick.subscribe(()=>{this.disableClose||this.close(void 0,{focusOrigin:"mouse"})}),this._detachSubscription=e.detachments().subscribe(()=>{n.closeOnOverlayDetachments!==!1&&this.close()})}close(e,n){if(this.containerInstance){let r=this.closed;this.containerInstance._closeInteractionType=n?.focusOrigin||"program",this._detachSubscription.unsubscribe(),this.overlayRef.dispose(),r.next(e),r.complete(),this.componentInstance=this.containerInstance=null}}updatePosition(){return this.overlayRef.updatePosition(),this}updateSize(e="",n=""){return this.overlayRef.updateSize({width:e,height:n}),this}addPanelClass(e){return this.overlayRef.addPanelClass(e),this}removePanelClass(e){return this.overlayRef.removePanelClass(e),this}},lv=new Qt("DialogScrollStrategy",{providedIn:"root",factory:()=>{let t=K(Zc);return()=>t.scrollStrategies.block()}}),Qc=new Qt("DialogData"),uv=new Qt("DefaultDialogConfig");var np=(()=>{class t{_overlay=K(Zc);_injector=K(Rt);_defaultOptions=K(uv,{optional:!0});_parentDialog=K(t,{optional:!0,skipSelf:!0});_overlayContainer=K(os);_idGenerator=K($i);_openDialogsAtThisLevel=[];_afterAllClosedAtThisLevel=new dt;_afterOpenedAtThisLevel=new dt;_ariaHiddenElements=new Map;_scrollStrategy=K(lv);get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}afterAllClosed=hl(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(vl(void 0)));constructor(){}open(n,r){let i=this._defaultOptions||new Kr;r=D(D({},i),r),r.id=r.id||this._idGenerator.getId("cdk-dialog-"),r.id&&this.getDialogById(r.id);let o=this._getOverlayConfig(r),s=this._overlay.create(o),c=new pr(s,r),u=this._attachContainer(s,c,r);return c.containerInstance=u,this._attachDialogContent(n,c,u,r),this.openDialogs.length||this._hideNonDialogContentFromAssistiveTechnology(),this.openDialogs.push(c),c.closed.subscribe(()=>this._removeOpenDialog(c,!0)),this.afterOpened.next(c),c}closeAll(){Jc(this.openDialogs,n=>n.close())}getDialogById(n){return this.openDialogs.find(r=>r.id===n)}ngOnDestroy(){Jc(this._openDialogsAtThisLevel,n=>{n.config.closeOnDestroy===!1&&this._removeOpenDialog(n,!1)}),Jc(this._openDialogsAtThisLevel,n=>n.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(n){let r=new Di({positionStrategy:n.positionStrategy||this._overlay.position().global().centerHorizontally().centerVertically(),scrollStrategy:n.scrollStrategy||this._scrollStrategy(),panelClass:n.panelClass,hasBackdrop:n.hasBackdrop,direction:n.direction,minWidth:n.minWidth,minHeight:n.minHeight,maxWidth:n.maxWidth,maxHeight:n.maxHeight,width:n.width,height:n.height,disposeOnNavigation:n.closeOnNavigation});return n.backdropClass&&(r.backdropClass=n.backdropClass),r}_attachContainer(n,r,i){let o=i.injector||i.viewContainerRef?.injector,s=[{provide:Kr,useValue:i},{provide:pr,useValue:r},{provide:zr,useValue:n}],c;i.container?typeof i.container=="function"?c=i.container:(c=i.container.type,s.push(...i.container.providers(i))):c=cv;let u=new Gr(c,i.viewContainerRef,Rt.create({parent:o||this._injector,providers:s}));return n.attach(u).instance}_attachDialogContent(n,r,i,o){if(n instanceof ki){let s=this._createInjector(o,r,i,void 0),c={$implicit:o.data,dialogRef:r};o.templateContext&&(c=D(D({},c),typeof o.templateContext=="function"?o.templateContext():o.templateContext)),i.attachTemplatePortal(new Wr(n,null,c,s))}else{let s=this._createInjector(o,r,i,this._injector),c=i.attachComponentPortal(new Gr(n,o.viewContainerRef,s));r.componentRef=c,r.componentInstance=c.instance}}_createInjector(n,r,i,o){let s=n.injector||n.viewContainerRef?.injector,c=[{provide:Qc,useValue:n.data},{provide:pr,useValue:r}];return n.providers&&(typeof n.providers=="function"?c.push(...n.providers(r,n,i)):c.push(...n.providers)),n.direction&&(!s||!s.get(ri,null,{optional:!0}))&&c.push({provide:ri,useValue:{value:n.direction,change:Mi()}}),Rt.create({parent:s||o,providers:c})}_removeOpenDialog(n,r){let i=this.openDialogs.indexOf(n);i>-1&&(this.openDialogs.splice(i,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((o,s)=>{o?s.setAttribute("aria-hidden",o):s.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),r&&this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(){let n=this._overlayContainer.getContainerElement();if(n.parentElement){let r=n.parentElement.children;for(let i=r.length-1;i>-1;i--){let o=r[i];o!==n&&o.nodeName!=="SCRIPT"&&o.nodeName!=="STYLE"&&!o.hasAttribute("aria-live")&&(this._ariaHiddenElements.set(o,o.getAttribute("aria-hidden")),o.setAttribute("aria-hidden","true"))}}}_getAfterAllClosed(){let n=this._parentDialog;return n?n._getAfterAllClosed():this._afterAllClosedAtThisLevel}static \u0275fac=function(r){return new(r||t)};static \u0275prov=mt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Jc(t,e){let n=t.length;for(;n--;)e(t[n])}var ss=class{lastWidth;lastHeight;resizeTimeout=null;debounceDelay=200;onResizeCallback;constructor(e){this.onResizeCallback=e,this.lastWidth=window.innerWidth,this.lastHeight=window.innerHeight,window.addEventListener("resize",this.debouncedResize),window.addEventListener("orientationchange",this.handleImmediateResize)}destroy(){window.removeEventListener("resize",this.debouncedResize),window.removeEventListener("orientationchange",this.handleImmediateResize)}handleImmediateResize=()=>{this.triggerResize()};debouncedResize=()=>{this.resizeTimeout!==null&&clearTimeout(this.resizeTimeout),this.resizeTimeout=window.setTimeout(()=>{this.triggerResize()},this.debounceDelay)};triggerResize(){let e=window.innerWidth,n=window.innerHeight;(n!==this.lastHeight||e!==this.lastWidth)&&(this.onResizeCallback(),this.lastWidth=e,this.lastHeight=n)}};var dv=wl;function fv(t){return!!t[dv]}var pv=Symbol("__destroy"),ap=Symbol("__decoratorApplied");function cp(t){return typeof t=="string"?Symbol(`__destroy__${t}`):pv}function hv(t){t.prototype[ap]=!0}function lp(t,e){t[e]||(t[e]=new dt)}function up(t,e){t[e]&&(t[e].next(),t[e].complete(),t[e]=null)}function dp(t){t instanceof Qr&&t.unsubscribe()}function mv(t){Array.isArray(t)&&t.forEach(dp)}function fp(t,e){return function(){if(t&&t.call(this),up(this,cp()),e.arrayName&&mv(this[e.arrayName]),e.checkProperties)for(let n in this)e.blackList?.includes(n)||dp(this[n])}}function gv(t,e){t.prototype.ngOnDestroy=fp(t.prototype.ngOnDestroy,e)}function _v(t,e){let n=t.\u0275pipe;n.onDestroy=fp(n.onDestroy,e)}function pp(t={}){return e=>{fv(e)?_v(e,t):gv(e,t),hv(e)}}var ip=7,op=Symbol("CheckerHasBeenSet");function yv(t,e){t[op]||vv()||(sp(()=>pl(Promise.resolve()).pipe(Es(()=>{let n;try{n=Il(t)}catch{n=null}let r=n?.lView;if(r==null)return fl;let i=r[ip]||(r[ip]=[]),o=new dt;return i.push(function(){sp(()=>{o.next(),o.complete()})}),o}),Es(()=>Promise.resolve())).subscribe(()=>{(e.observed??e.observers.length>0)&&console.warn(Ev(t))})),t[op]=!0)}function vv(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha||typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]"}function sp(t){let e=bl.Zone;return!!e&&typeof e.root?.run=="function"?e.root.run(t):t()}function Ev(t){return`
39
38
  The ${t.constructor.name} still has subscriptions that haven't been unsubscribed.
40
39
  This may happen if the class extends another class decorated with @UntilDestroy().
41
40
  The child class implements its own ngOnDestroy() method but doesn't call super.ngOnDestroy().
@@ -72,5 +71,5 @@ Url: ${Bo(t)}`),!0)}function kg(t,e){return t.type||!e||!e.length?!1:Bg(t).some(
72
71
  super.ngOnDestroy();
73
72
  }
74
73
  }
75
- `}var $l=!1;function K0(t,e,n){let r=t[e];if($l&&typeof r!="function")throw new Error(`${t.constructor.name} is using untilDestroyed but doesn't implement ${e}`);pp(t,n),t[e]=function(){r.apply(this,arguments),mp(this,n),t[e]=r}}function yp(t,e){return n=>{let r=hp(e);typeof e=="string"?K0(t,e,r):($l&&X0(t),pp(t,r));let i=t[r];return $l&&W0(t,i),n.pipe(ln(i))}}function X0(t){let e=Object.getPrototypeOf(t);if(!(fp in e))throw new Error("untilDestroyed operator cannot be used inside directives or components or providers that are not decorated with UntilDestroy decorator")}var Ms=class t{engagementTrigger;isMobile=window.CooeeSDK.uaParser.getDevice().type==="mobile";ngOnInit(){this.engagementTrigger=this.triggerContext?.triggerData}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Te({type:t,selectors:[["cooee-base-video"]],inputs:{triggerContext:"triggerContext"},decls:0,vars:0,template:function(n,r){},encapsulation:2})};var q0=t=>({active:t}),Z0=(t,e)=>e.mID;function J0(t,e){if(t&1&&Ie(0,"img",9),t&2){let n=e.$implicit,r=J(2);be("src",n.url,vt)("alt",r.selectedItem.name)}}function Q0(t,e){if(t&1&&et(0,J0,1,2,"img",9,wn),t&2){let n=J();tt(n.selectedItem.imgs)}}function eE(t,e){if(t&1&&Ie(0,"img",9),t&2){let n=J();be("src",n.selectedItem.imageURL,vt)("alt",n.selectedItem.name)}}function tE(t,e){if(t&1){let n=st();X(0,"a",18),Me("click",function(i){let o=$e(n).$implicit;return J(2).changeItem(o),i.stopPropagation(),Ge(i.preventDefault())}),Ie(1,"img",19),q()}if(t&2){let n=e.$implicit,r=J(2);W(),be("src",n.imageURL,vt)("alt",n.name)("ngClass",oo(3,q0,n.mID===r.selectedItem.mID+""))}}function nE(t,e){if(t&1&&(X(0,"span",16),Oe(1,"Selected Product"),q(),X(2,"div",8),et(3,tE,2,5,"a",17,wn),q()),t&2){let n=J();W(3),tt(n.items)}}function rE(t,e){if(t&1){let n=st();X(0,"a",23),Me("click",function(i){let o=$e(n).$implicit,s=J(2);return Ge(s.changeVariant(i,o))}),X(1,"span",24),Oe(2),q()()}if(t&2){let n=e.$implicit,r=J(2);En("lc-selected-variant",(r.selectedVariant==null?null:r.selectedVariant.mID)===n.mID),W(2),Zn(n.name)}}function iE(t,e){if(t&1&&(X(0,"span",20),Oe(1,"Select Variant"),q(),X(2,"div",21),et(3,rE,3,3,"a",22,Z0),q()),t&2){let n=J();W(3),tt(n.selectedItem.vars)}}function oE(t,e){if(t&1&&(X(0,"div",25),Oe(1,"Description"),q(),Ie(2,"div",26),St(3,"safeHtml")),t&2){let n=J();W(2),be("innerHTML",Rt(3,1,n.selectedItem.desc),un)}}function sE(t,e){t&1&&Oe(0," Open Cart ")}function aE(t,e){t&1&&Oe(0," Add To Cart ")}var ks=class t{selectedItem;items;closeModel=new He;performCTA=new He;atcClicked=!1;selectedVariant=null;ClickActionType=Yt;ngOnInit(){this.updateSelectedVariant()}closeDialog(){this.closeModel.emit()}clickAddToCart(e){this.performCTA.emit({item:e,cta:this.atcClicked?Yt.OPEN_CART:Yt.ADD_TO_CART}),this.atcClicked=!0}async changeItem(e){this.selectedItem=e,this.updateSelectedVariant()}changeVariant(e,n){e.stopPropagation(),e.preventDefault(),this.selectedVariant=n,this.selectedItem.selectedOrFirstVariant.value=this.selectedVariant}updateSelectedVariant(){this.selectedVariant=this.selectedItem.selectedOrFirstVariant.value}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Te({type:t,selectors:[["cooee-product-modal"]],inputs:{selectedItem:"selectedItem",items:"items"},outputs:{closeModel:"closeModel",performCTA:"performCTA"},decls:27,vars:11,consts:[[1,"lc-card-wrapper"],[1,"lc-card-header"],[1,"lc-header"],[1,"lc-close-button",3,"click"],["xmlns","http://www.w3.org/2000/svg","height","24px","viewBox","0 0 24 24","fill","#000"],["d","M0 0h24v24H0V0z","fill","none"],["d","M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"],[1,"lc-card-content"],[1,"lc-image-strip"],[1,"w-28","h-28","object-contain",3,"src","alt"],[1,"lc-inner-body"],[1,"lc-item-name"],[1,"lc-item-price",3,"innerHTML"],[1,"lc-card-footer"],[1,"lc-cta-button",3,"click"],[1,"lc-more-info-button",3,"click"],[1,"lc-selected-product-title"],["href","#"],["href","#",3,"click"],[1,"product-selector",3,"src","alt","ngClass"],[1,"lc-selected-variant-title"],[1,"lc-variant-list"],["href","#",1,"lc-variant",3,"lc-selected-variant"],["href","#",1,"lc-variant",3,"click"],[1,"truncate","max-w-[200px]"],[1,"lc-description-title"],[1,"lc-description",3,"innerHTML"]],template:function(n,r){n&1&&(X(0,"div",0)(1,"div",1)(2,"div",2),Oe(3,"Shop Now"),q(),X(4,"button",3),Me("click",function(){return r.closeDialog()}),Gt(),X(5,"svg",4),Ie(6,"path",5)(7,"path",6),q()()(),or(),X(8,"div",7)(9,"div",8),Ae(10,Q0,2,0)(11,eE,1,2,"img",9),q(),X(12,"div",10)(13,"div",11),Oe(14),q(),Ie(15,"span",12),St(16,"cooeeCurrency"),St(17,"safeHtml"),Ae(18,nE,5,0)(19,iE,5,0)(20,oE,4,3),q()(),X(21,"div",13)(22,"button",14),Me("click",function(){return r.clickAddToCart(r.selectedItem)}),Ae(23,sE,1,0)(24,aE,1,0),q(),X(25,"button",15),Me("click",function(){return r.performCTA.emit({item:r.selectedItem,cta:r.ClickActionType.GO_TO_PRODUCT})}),Oe(26," More Info "),q()()()),n&2&&(W(10),Ne(r.selectedItem.imgs!=null&&r.selectedItem.imgs.length?10:11),W(4),Zn(r.selectedItem.name),W(),be("innerHTML",Rt(17,9,Rt(16,7,r.selectedVariant==null||r.selectedVariant.price==null?null:r.selectedVariant.price.d)),un),W(3),Ne(r.items.length>1?18:-1),W(),Ne(r.selectedItem.vars[0]!=null&&r.selectedItem.vars[0].name!=="Default Title"?19:-1),W(),Ne(r.selectedItem.desc?20:-1),W(3),Ne(r.atcClicked?23:24))},dependencies:[Qn,Pn,Jn],styles:["[_nghost-%COMP%]{display:block;background:#fff}.lc-card-wrapper[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;height:100%;overflow:auto}.lc-card-header[_ngcontent-%COMP%]{display:var(--header-display, flex);flex-direction:row;justify-content:space-between;align-items:center;padding:8px 16px;border-bottom:1px solid var(--lc-color-gray-300)}.lc-header[_ngcontent-%COMP%]{font-size:24px;font-weight:500;color:#000}.lc-close-button[_ngcontent-%COMP%]{background:transparent;border:none;width:36px;height:36px}.lc-close-button[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{fill:#000000b3}.lc-card-content[_ngcontent-%COMP%]{flex:1;overflow-y:auto;overscroll-behavior:contain}.lc-inner-body[_ngcontent-%COMP%]{padding:16px;display:flex;flex-direction:column;gap:8px}.lc-image-strip[_ngcontent-%COMP%]{width:100%;display:flex;overflow-x:auto;gap:.5rem;flex-wrap:nowrap}.lc-image-strip[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:auto;height:200px}.lc-image-strip[_ngcontent-%COMP%] .product-selector[_ngcontent-%COMP%]{height:100px;flex-shrink:0;padding:2px}.lc-image-strip[_ngcontent-%COMP%] .product-selector.active[_ngcontent-%COMP%]{border:red solid 1px}.lc-item-name[_ngcontent-%COMP%]{font-size:20px;font-weight:600;line-height:normal;color:#000}.lc-item-price[_ngcontent-%COMP%]{font-size:18px;font-weight:500;color:#000}.lc-variant-list[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.5rem;padding-top:.5rem;width:100%}.lc-variant[_ngcontent-%COMP%]{padding:4px 8px;border-radius:4px;background-color:#f3f4f6;color:#1f2937;font-size:12px;cursor:pointer;border:1px solid #e5e7eb;display:flex;align-items:center;gap:4px;text-decoration:none}.lc-selected-variant[_ngcontent-%COMP%]{border:1px solid black;color:#000}.lc-description-title[_ngcontent-%COMP%], .lc-selected-product-title[_ngcontent-%COMP%], .lc-selected-variant-title[_ngcontent-%COMP%]{font-size:18px;font-weight:600;margin-top:8px;line-height:normal;color:#000}.lc-description[_ngcontent-%COMP%]{line-height:normal;color:#000}.lc-card-footer[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;padding:12px;background-color:#0000004d;box-shadow:0 4px 6px #52525b4d;gap:12px}.lc-cta-button[_ngcontent-%COMP%], .lc-more-info-button[_ngcontent-%COMP%]{width:50%;padding:12px;border:none;border-radius:.5rem;font-weight:600;display:flex;justify-content:center;cursor:pointer;font-size:16px}.lc-cta-button[_ngcontent-%COMP%]{background-color:#000;color:#fff}.lc-more-info-button[_ngcontent-%COMP%]{background-color:#fff;color:#000}"]})};var Ls=class t{width;static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Te({type:t,selectors:[["cooee-video-progress-bar"]],inputs:{width:"width"},decls:5,vars:2,consts:[[1,"lc:absolute","lc:top-1","lc:w-full","lc:z-10"],[1,"lc:px-2"],[1,"lc:h-1","lc:w-full","lc:bg-gray-700","lc:mb-2"],[1,"lc:h-1","lc:bg-pink-500"]],template:function(n,r){n&1&&(X(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),Ie(4,"div"),q()()()()),n&2&&(W(3),Mr("width",r.width,"%"))},encapsulation:2})};function cE(t,e){t&1&&Oe(0," Open Cart ")}function lE(t,e){t&1&&Oe(0," Add To Cart ")}var Fs=class t{item;performCTA=new He;atcClicked=!1;clickAddToCart(e){e.stopPropagation(),this.performCTA.emit({item:this.item,cta:this.atcClicked?Yt.OPEN_CART:Yt.ADD_TO_CART}),this.atcClicked=!0}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Te({type:t,selectors:[["cooee-product-card"]],inputs:{item:"item"},outputs:{performCTA:"performCTA"},decls:13,vars:11,consts:[[1,"lc-item-card"],[1,"lc-card-content"],[1,"lc-item-image",3,"alt","src"],[1,"lc-product-details"],[1,"lc-item-name"],[1,"lc-item-price",3,"innerHTML"],[1,"lc-cta-button",3,"click"]],template:function(n,r){if(n&1){let i=st();X(0,"div",0)(1,"div",1),Ie(2,"img",2),X(3,"div",3)(4,"div",4),Oe(5),q(),Vt(6),Ie(7,"div",5),St(8,"cooeeCurrency"),St(9,"safeHtml"),q()(),X(10,"button",6),Me("click",function(s){return $e(i),Ge(r.clickAddToCart(s))}),Ae(11,cE,1,0)(12,lE,1,0),q()()}if(n&2){W(2),Hn("alt",r.item.name),be("src",r.item.imageURL,vt),W(3),Wt(" ",r.item.name," ");let i=r.item.selectedOrFirstVariant.value.price.d;W(2),be("innerHTML",Rt(9,9,Rt(8,7,i)),un),W(3),En("atc-clicked",r.atcClicked),W(),Ne(r.atcClicked?11:12)}},dependencies:[Pn,Qn],styles:["[_nghost-%COMP%]{display:block;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);background-color:#ffffff80;border-radius:7px;cursor:pointer}.lc-item-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px;padding:8px}.lc-card-content[_ngcontent-%COMP%]{display:flex;gap:8px;width:100%;align-items:start}.lc-item-image[_ngcontent-%COMP%]{width:70px;height:70px;object-fit:cover;box-sizing:border-box;border-radius:7px}.lc-product-details[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:3.5px;font-size:10.5px}.lc-item-name[_ngcontent-%COMP%]{font-weight:600;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:16px;line-height:normal;color:#000}.lc-item-price[_ngcontent-%COMP%]{font-size:16px;line-height:normal;color:#000}.lc-cta-button[_ngcontent-%COMP%]{padding:12px 8px;border:none;border-radius:8px;width:100%;background:#000;text-align:center;font-weight:500;cursor:pointer;color:#fff;font-size:16px}.lc-cta-button.atc-clicked[_ngcontent-%COMP%]{background:#000}"]})};var dE=["swiperContainer"],fE=["videoEl"],hE=(t,e)=>e.url,pE=(t,e)=>e.mID;function mE(t,e){if(t&1&&Ie(0,"source",14),t&2){let n=e.$implicit;Hn("type",n.mimeType),be("src",n.url,vt)}}function gE(t,e){t&1&&Qs(0)}function _E(t,e){if(t&1){let n=st();Ie(0,"cooee-video-progress-bar",17),X(1,"div",18)(2,"cooee-mute-toggle",19),Me("toggled",function(){$e(n);let i=J(2);return Ge(i.toggleMute())}),q(),Ae(3,gE,1,0,"ng-container",10),q()}if(t&2){let n=J().$index,r=fn(4),i=J(),o=fn(11);be("width",i.videoProgress[n]||0),W(2),be("muted",i.muted)("videoEl",r),W(),be("ngTemplateOutlet",o)}}function vE(t,e){if(t&1){let n=st();X(0,"cooee-product-card",22),Me("performCTA",function(i){$e(n);let o=J(2).$implicit,s=J();return Ge(s.performClickToAction(i,o))})("click",function(){let i=$e(n).$implicit,o=J(2).$implicit,s=J();return Ge(s.productCardClicked(i,o))}),q()}if(t&2){let n=e.$implicit;be("item",n)}}function yE(t,e){if(t&1&&(X(0,"div",15)(1,"div",20),et(2,vE,1,1,"cooee-product-card",21,pE),q()()),t&2){let n=J().$implicit;W(2),tt(n.items)}}function EE(t,e){if(t&1){let n=st();X(0,"cooee-product-modal",23),Me("performCTA",function(i){$e(n);let o=J(2);return Ge(o.performClickToAction(i,o.selectedVideo))})("closeModel",function(){$e(n);let i=J(2);return Ge(i.productModalClosed())}),q()}if(t&2){let n=J(2);be("selectedItem",n.selectedItem)("items",n.selectedVideo.items)}}function wE(t,e){if(t&1){let n=st();X(0,"div",6)(1,"div",11)(2,"div",12)(3,"video",13,2),Me("timeupdate",function(i){let o=$e(n).$index,s=J();return Ge(s.updateProgress(i,o))})("click",function(){let i=$e(n).$index,o=J();return Ge(o.currentIndex===i&&o.toggleMute())})("ended",function(){$e(n);let i=fn(4),o=J();return Ge(o.onVideoEnded(i))}),et(5,mE,1,2,"source",14,hE),q(),Ae(7,_E,4,4)(8,yE,4,0,"div",15),q(),Ae(9,EE,1,2,"cooee-product-modal",16),q()()}if(t&2){let n=e.$implicit,r=e.$index,i=J();W(3),be("ngClass",i.viewTemplateClassName)("autoplay",i.currentIndex===r)("muted",i.muted)("poster",n.thumbnail,vt),yn("data-video-id",n.id),W(2),tt(n.sources),W(2),Ne(i.currentIndex===r?7:-1),W(),Ne(n.items.length&&i.currentIndex===r?8:-1),W(),Ne(i.selectedItem&&i.currentIndex===r?9:-1)}}function bE(t,e){t&1&&Qs(0)}function SE(t,e){if(t&1){let n=st();X(0,"button",24),Me("click",function(){$e(n);let i=J();return Ge(i.close())}),Gt(),X(1,"svg",25),Ie(2,"path",26)(3,"path",27),q()()}}var vn=class extends Ms{constructor(n,r,i,o){super();this.cdr=n;this.elementRef=r;this.dialogRef=i;this.data=o;this.videos=o.videos,this.currentIndex=o.currentIndex,this.triggerContext=o.triggerContext}videos=[];currentIndex=0;swiperContainerRef;videoElements;muted=!1;videoProgress=[];selectedItem=null;selectedVideo;swiperInstance;detailPopupTemplate;viewTemplateClassName="lc-video-only-view";resizeDebouncer=new Ps(this.onResize.bind(this));onResize(){this.swiperInstance?.destroy?.(),this.reInitSwiper()}ngOnInit(){super.ngOnInit(),this.detailPopupTemplate=this.engagementTrigger?.content?.videoConfig?.detailPopup.template??"VIDEO_ONLY_VIEW";let n=this.elementRef.nativeElement.shadowRoot,r=Fr.get().website.commonCSS;switch(en.injectRawCSS(r,n),en.injectStylesheet(jn.styleURL,n),en.injectSwiperCSS(n),this.detailPopupTemplate){case"PRODUCT_DETAIL_VIEW":this.selectItemForDetailView(),this.viewTemplateClassName="lc-product-detail-view";break;case"VIDEO_ONLY_VIEW":this.viewTemplateClassName="lc-video-only-view";break}}ngAfterViewInit(){ru(this.getCurrentVideoElement(),"loadeddata").pipe(yp(this)).subscribe(()=>{this.initSwiper()})}ngOnDestroy(){this.swiperInstance?.destroy?.(),this.resizeDebouncer.destroy()}close(n=this.videos[this.currentIndex],r=this.currentIndex){let i=this.getCurrentVideoElement();this.dialogRef.close({lastVideo:n,lastVideoIndex:r,lastVideoDuration:i?.currentTime})}performClickToAction(n,r){this.data.onCTAPerformed({cta:n.cta,item:n.item,video:r})}getCurrentVideoElement(){return this.videoElements.get(this.currentIndex)?.nativeElement}moveToNextVideo(){this.swiperInstance.slideTo(this.currentIndex+1)}productModalClosed(){this.selectedItem=null,this.selectedVideo=void 0,this.swiperInstance.enable()}pauseAll(){this.videoElements.forEach(n=>n.nativeElement.pause())}async toggleMute(){this.muted=!this.muted,this.videoElements.forEach(i=>i.nativeElement.muted=this.muted);let r=[this.muted?qe.EVENT_VIDEO_MUTED:qe.EVENT_VIDEO_UNMUTED,{current:this.currentVideoProps()},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(r),await Kr.set(zr.MUTED,this.muted),this.cdr.detectChanges()}playActiveVideo(){this.pauseAll();let n=this.getCurrentVideoElement();n&&(n.currentTime=1,n.play().then(async()=>{this.muted=await Kr.get(zr.MUTED,!1),n.muted=this.muted}))}onVideoEnded(n){if(this.currentIndex<this.videos.length-1)this.selectedItem?(n.currentTime=0,n.play()):this.moveToNextVideo();else{let r=this.getPreviousVideoDataForEvent(),i=[qe.EVENT_LAST_VIDEO_ENDED,{previous:r},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(i),n.currentTime=0,n.play()}}updateProgress(n,r){let i=n.target;this.videoProgress[r]=i.currentTime/i.duration*100,this.cdr.detectChanges()}onSlideChange(n){let r=this.getPreviousVideoDataForEvent();this.currentIndex=n.realIndex,this.playActiveVideo(),this.detailPopupTemplate==="PRODUCT_DETAIL_VIEW"?this.selectItemForDetailView():(this.selectedItem=null,delete this.selectedVideo);let i=this.currentVideoProps(),o={previous:r,current:i},s=[qe.EVENT_VIDEO_CHANGE,o,{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(s)}productCardClicked(n,r){let i={videoID:r.id,videoIndex:this.currentIndex},o=[qe.EVENT_MORE_ITEM_INFO_CLICKED,{current:i},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(o),this.selectedItem=n,this.selectedVideo=r,this.swiperInstance.disable()}reInitSwiper(){this.initSwiper(),this.selectedItem&&this.swiperInstance.disable()}initSwiper(){let n=this.isMobile?1:"auto",r=0;this.detailPopupTemplate==="PRODUCT_DETAIL_VIEW"&&(n="auto",r=10),this.swiperInstance=new window.CooeeSDK.Swiper(this.swiperContainerRef.nativeElement,{direction:this.isMobile?"vertical":"horizontal",effect:this.isMobile?"slide":"coverflow",slidesPerView:n,initialSlide:this.currentIndex,centeredSlides:!0,spaceBetween:r,coverflowEffect:{rotate:0,stretch:0,depth:400,modifier:1,slideShadows:!1},navigation:{nextEl:this.swiperContainerRef.nativeElement.querySelector(".swiper-button-next"),prevEl:this.swiperContainerRef.nativeElement.querySelector(".swiper-button-prev")}}),this.swiperInstance.on("slideChange",i=>{this.onSlideChange(i),this.cdr.detectChanges()}),this.playActiveVideo()}currentVideoProps(){return{videoID:this.videos[this.currentIndex].id,videoIndex:this.currentIndex}}getPreviousVideoDataForEvent(){let n=this.currentVideoProps(),r=this.videoElements.find(o=>o.nativeElement.dataset.videoId===this.videos[this.currentIndex].id)?.nativeElement;n.playedTillMS=Math.ceil(r?.currentTime*1e3);let i=r?.duration*1e3;return n.playedTillPercent=+(n.playedTillMS/i).toFixed(4),n}selectItemForDetailView(){this.selectedVideo=this.videos[this.currentIndex],this.selectedItem=this.isMobile?null:this.selectedVideo?.items?.[0]??null}};zs(vn,"\u0275fac",function(r){return new(r||vn)(dn(Sn),dn(ut),dn(xr),dn(jl))}),zs(vn,"\u0275cmp",Te({type:vn,selectors:[["cooee-video-swiper-dialog"]],viewQuery:function(r,i){if(r&1&&(Kn(dE,5),Kn(fE,5)),r&2){let o;Xn(o=qn())&&(i.swiperContainerRef=o.first),Xn(o=qn())&&(i.videoElements=o)}},inputs:{videos:"videos",currentIndex:"currentIndex"},features:[bt],decls:12,vars:2,consts:[["swiperContainer",""],["closeButtonTemplate",""],["videoEl",""],[1,"lc-shadow-inner",3,"ngClass"],[1,"swiper-container"],[1,"swiper-wrapper"],[1,"swiper-slide"],[1,"swiper-button-prev"],[1,"swiper-button-next"],[1,"lc-desktop-controls"],[4,"ngTemplateOutlet"],[1,"lc-video-modal-row"],[1,"lc-video-container"],["playsinline","","preload","metadata",1,"lc-video-el",3,"timeupdate","click","ended","ngClass","autoplay","muted","poster"],[3,"src","type"],[1,"lc-card-container"],[3,"selectedItem","items"],[3,"width"],[1,"lc-video-controls"],[3,"toggled","muted","videoEl"],[1,"lc-card-scroll"],[3,"item"],[3,"performCTA","click","item"],[3,"performCTA","closeModel","selectedItem","items"],[1,"lc-close-button",3,"click"],["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 24 24","fill","#fff"],["d","M0 0h24v24H0V0z","fill","none"],["d","M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"]],template:function(r,i){if(r&1&&(X(0,"div",3)(1,"div",4,0)(3,"div",5),et(4,wE,10,8,"div",6,wn),q(),Ie(6,"div",7)(7,"div",8),q(),X(8,"div",9),Ae(9,bE,1,0,"ng-container",10),q()(),Ae(10,SE,4,0,"ng-template",null,1,bu)),r&2){let o=fn(11);be("ngClass",i.viewTemplateClassName),W(4),tt(i.videos),W(5),be("ngTemplateOutlet",o)}},dependencies:[Fs,ks,si,Ls,Du,Jn],styles:[`:host{display:flex}.lc-shadow-inner{position:relative;width:100vw;height:100vh;display:flex}@media (min-width: 768px){.lc-shadow-inner{background-color:color-mix(in oklab,#000 70%,transparent);justify-content:center;align-items:center}}.swiper-container{--swiper-navigation-size: 50px;--swiper-navigation-color: white;width:100dvw;height:100dvh}.lc-product-detail-view .swiper-container{align-items:center}@media (min-width: 768px){.swiper-container{width:100%;height:100%;max-width:90vw;max-height:90vh}}.swiper-wrapper{max-height:100%}.lc-product-detail-view .swiper-wrapper{align-items:center}@media (max-width: 768px){.swiper-button-prev,.swiper-button-next{display:none!important}}.swiper-slide{position:relative;display:flex;align-items:center;visibility:hidden}.lc-product-detail-view .swiper-slide{width:40vw!important;height:70vh!important}@media (min-width: 768px){.lc-product-detail-view .swiper-slide{min-width:650px!important}}@media (max-width: 768px){.lc-product-detail-view .swiper-slide{width:100%!important;height:100%!important}}@media (min-width: 768px){.lc-video-only-view .swiper-slide{width:fit-content!important}}@media (min-width: 768px){.swiper-slide{border-radius:12px;overflow:hidden}}.swiper-slide.swiper-slide-active,.swiper-slide.swiper-slide-prev,.swiper-slide.swiper-slide-next{visibility:visible}video{height:100%}.lc-product-detail-view video{width:100%;object-fit:cover;z-index:-1}.lc-desktop-controls{position:absolute;top:2rem;right:4rem;z-index:10;display:flex;gap:.5rem}@media (max-width: 768px){.lc-desktop-controls{display:none}}.lc-video-controls{position:absolute;top:1rem;z-index:10;right:.5rem;display:flex;gap:.25rem}.lc-video-controls .lc-close-button{display:block}@media (min-width: 768px){.lc-video-controls .lc-close-button{display:none}}.lc-close-button{border:none;display:flex;justify-content:center;align-items:center;width:40px;height:40px;background:#00000080;border-radius:100%}.lc-close-button svg{width:100%;height:100%}@media (min-width: 768px){.lc-close-button{width:48px;height:48px}}.lc-product-detail-view .lc-video-container{height:100%;position:relative}@media (min-width: 768px){.lc-product-detail-view .lc-video-container{width:50%}}.lc-video-only-view .lc-video-container{height:100%}.lc-card-container{position:absolute;bottom:12px;z-index:10;width:100%;padding-inline:12px;box-sizing:border-box}.lc-product-detail-view .lc-card-container{display:none}@media (max-width: 768px){.lc-product-detail-view .lc-card-container{display:block}}.lc-card-scroll{display:flex;overflow-x:auto;gap:12px;width:100%;scrollbar-width:none}.lc-card-scroll::-webkit-scrollbar{display:none}.lc-card-scroll cooee-product-card{flex:0 0 auto;width:80%;max-width:300px}.lc-card-scroll:has(>cooee-product-card:only-child) cooee-product-card{width:100%;max-width:none}.lc-product-detail-view .lc-video-modal-row{display:flex;justify-content:center;height:100%;width:100%}.lc-video-only-view .lc-video-modal-row{display:block;height:100%}.lc-product-detail-view cooee-product-modal{--header-display: none;width:50%;flex:1}@media (max-width: 768px){.lc-product-detail-view cooee-product-modal{--header-display: flex;width:100%;height:70dvh;position:absolute;bottom:0;z-index:2147483646}}.lc-video-only-view cooee-product-modal{width:100%;height:70dvh;z-index:2147483646;bottom:0;position:absolute}
76
- `],encapsulation:3})),vn=Zl([vp()],vn);var CE=["videoEl"],Ep=(t,e)=>e.url;function IE(t,e){if(t&1&&(X(0,"div",1),Oe(1),q()),t&2){let n=J();W(),Wt(" ",n.videoConfig.heading," ")}}function xE(t,e){if(t&1&&Ie(0,"source",7),t&2){let n=e.$implicit;Hn("type",n.mimeType),be("src",n.url,vt)}}function DE(t,e){if(t&1){let n=st();X(0,"cooee-mute-toggle",12),Me("toggled",function(i){$e(n),J();let o=fn(5),s=J(2);return Ge(s.onMuteToggled(i,o))}),q()}if(t&2){J();let n=fn(5);be("muted",n.muted)("videoEl",n)}}function TE(t,e){if(t&1&&Ie(0,"img",13),t&2){J(2);let n=Ot(0);be("src",n.imageURL,vt)("alt",n.name)}}function OE(t,e){if(t&1&&(X(0,"div",10),Ae(1,TE,1,2,"img",13),X(2,"div",14)(3,"span",15),Oe(4),q(),Vt(5),Ie(6,"span",16),St(7,"cooeeCurrency"),St(8,"safeHtml"),q()()),t&2){J();let n=Ot(0),r=J(2);W(),Ne(r.showImage?1:-1),W(3),Wt(" ",n.name," ");let i=n.selectedOrFirstVariant.value.price.d;W(2),be("innerHTML",Rt(8,5,Rt(7,3,i)),un)}}function RE(t,e){if(t&1){let n=st();X(0,"button",17),Me("click",function(){$e(n);let i=J().$implicit,o=Ot(0),s=J(2);return Ge(s.addToCartClicked(i,o))}),Oe(1," Add to cart "),q()}}function AE(t,e){if(t&1){let n=st();Vt(0)(1),X(2,"div",4)(3,"a",5),Me("click",function(i){let o=$e(n),s=o.$implicit,a=o.$index,u=fn(5),d=J(2);return Ge(d.onVideoTap(i,s,a,u))}),X(4,"video",6,0),Me("mouseenter",function(){$e(n);let i=fn(5);J(2);let o=Ot(2);return Ge(o&&i.play())})("mouseleave",function(){$e(n);let i=fn(5);J(2);let o=Ot(2);return Ge(o&&i.pause())}),et(6,xE,1,2,"source",7,Ep),q(),X(8,"div",8),Ae(9,DE,1,2,"cooee-mute-toggle",9),q(),Ae(10,OE,9,7,"div",10),q(),Ae(11,RE,2,0,"button",11),q()}if(t&2){let n=e.$implicit,r=J(2),i=Ot(1),s=bn(n.items[0])&&r.videoConfig.footerContent==r.VideoConfigFooterContent.FIRST_ITEM;W(4),be("poster",n.thumbnail,vt)("muted",!0),yn("autoplay",i||null),W(2),tt(n.sources),W(3),Ne(r.videoConfig.showMuteButton?9:-1),W(),Ne(s?10:-1),W(),Ne(s?11:-1)}}function NE(t,e){if(t&1&&(X(0,"div",2),et(1,AE,12,7,"div",4,wn),q()),t&2){let n=J();W(),tt(n.videos)}}function PE(t,e){if(t&1&&Ie(0,"source",7),t&2){let n=e.$implicit;Hn("type",n.mimeType),be("src",n.url,vt)}}function ME(t,e){if(t&1){let n=st();X(0,"div",18),Gt(),X(1,"svg",19),Ie(2,"circle",20)(3,"circle",21),q(),or(),X(4,"div",22)(5,"video",23),Me("click",function(i){let o=$e(n),s=o.$implicit,a=o.$index,u=J(2);return Ge(u.onVideoTap(i,s,a))}),et(6,PE,1,2,"source",7,Ep),q()()()}if(t&2){let n=e.$implicit;W(5),be("muted",!0),W(),tt(n.sources)}}function kE(t,e){if(t&1&&(X(0,"div",3),et(1,ME,8,1,"div",18,wn),q()),t&2){let n=J();W(),tt(n.videos)}}function LE(t,e){if(t&1){let n=st();X(0,"cooee-draggable-video-popup",25),Me("videoClicked",function(){$e(n),J();let i=Ot(0),o=J();return Ge(o.onPopupVideoClicked(i,0))})("closeClicked",function(){$e(n);let i=J(2);return Ge(i.onPopupVideoClosed())}),q()}if(t&2){J();let n=Ot(0);be("video",n)}}function FE(t,e){if(t&1&&(Vt(0),Ae(1,LE,1,1,"cooee-draggable-video-popup",24)),t&2){let n=J();bn(n.videos[0]),W(),Ne(n.hidePopupVideo?-1:1)}}var Vs=class t extends Cn{constructor(n,r){super();this.dialog=n;this.cdr=r}videoElements;videos;VideoConfigTemplate=Xc;VideoConfigFooterContent=Zc;VideoConfigAutoPlay=qc;isMobile=window.CooeeSDK.uaParser.getDevice().type==="mobile";hidePopupVideo;videoConfig;showImage;dialogRef=null;ngOnInit(){super.ngOnInit(),en.loadSwiperScript(),this.showImage=this.videoConfig.detailPopup.template==="PRODUCT_DETAIL_VIEW"}ngAfterViewInit(){this.playFirstVideo()}engagementTriggerReceived(n){this.videoConfig=n.content?.videoConfig,this.videos=this.videoConfig.videos}sendTriggerClicked(n,r){let i=new oi(qe.EVENT_TRIGGER_CLICKED,{},this.triggerContext?.triggerData);i.videos=[n.id],r&&(i.items=[r]),this.sendEventToRenderer(i)}onVideoTap(n,r,i,o){n?.stopPropagation(),n?.preventDefault();let s=r.items?.[0];if(this.sendTriggerClicked(r,s?.toEmbed()),this.videoConfig.footerContent!=="FIRST_ITEM"){o&&(o.muted=!1,o.play(),this.onMuteToggled(!1,o));return}en.loadSwiperScript().then(()=>this.openDialog(r,i))}async performCTA(n){let r,i=this.triggerContext;if(n.cta===Yt.ADD_TO_CART)r=qe.EVENT_ADD_TO_CART_CLICKED;else if(n.cta===Yt.GO_TO_PRODUCT)r=qe.EVENT_VIEW_ITEM_CLICKED;else if(n.cta===Yt.OPEN_CART)r=qe.EVENT_OPEN_CART_CLICKED,i.triggerData.redirectBehaviour=ca.CART_DRAWER;else{Ct.warn(`Unsupported CTA type: ${n.cta}`);return}let o={at:n.cta},s={videoID:n.video.id};this.sendEvent(r,{current:s},n.video,n.item),this.executeCTAViaRenderer({clickAction:o,embeddedItem:n.item.toEmbed()})}addToCartClicked(n,r){this.performCTA({cta:Yt.ADD_TO_CART,item:r,video:n})}onPopupVideoClicked(n,r){this.hidePopupVideo=!0,this.onVideoTap(null,n,r),this.dialogRef?.closed.subscribe(()=>{this.hidePopupVideo=!1,this.cdr.detectChanges()})}onPopupVideoClosed(){this.hidePopupVideo=!0;let n=(new Date().getTime()-this.triggerContext.startTime.getTime())/1e3;this.sendEvent(qe.EVENT_TRIGGER_CLOSED,{duration:n})}update(){}onMuteToggled(n,r){n||this.videoElements.forEach(i=>{i.nativeElement!==r&&(i.nativeElement.muted=!0,i.nativeElement.pause())})}playFirstVideo(){this.videoConfig.autoPlay==="ON_HOVER"&&this.isMobile&&this.videoElements.first?.nativeElement.play()}sendEvent(n,r,i,o){let s=new oi(n,r,this.engagementTrigger);i&&(s.videos=[i.id]),o&&(s.items=[o.toEmbed()]),this.sendEventToRenderer(s)}openDialog(n,r){let i={videos:this.videos,currentIndex:r,triggerContext:this.triggerContext,onCTAPerformed:s=>this.performCTA(s)};this.dialogRef&&this.dialogRef.close(),this.dialogRef=this.dialog.open(vn,{width:"100vw",height:"100vh",data:i});let o={videoID:n.id,videoIndex:r};this.sendEvent(qe.EVENT_VIDEO_DIALOG_OPENED,{current:o},n),this.dialogRef.closed.subscribe(s=>{if(!s)return;let a=s.lastVideoDuration*1e3,u={videoID:s.lastVideo.id,videoIndex:s.lastVideoIndex,playedTillMS:a,playedTillPercent:a/n.durationMS},d=new oi(qe.EVENT_VIDEO_DIALOG_CLOSED,{current:u},this.triggerContext?.triggerData);d.videos=[s.lastVideo.id],this.sendEventToRenderer(d),this.dialogRef=null})}static \u0275fac=function(r){return new(r||t)(dn(ap),dn(Sn))};static \u0275cmp=Te({type:t,selectors:[["cooee-shoppable-videos"]],viewQuery:function(r,i){if(r&1&&Kn(CE,5),r&2){let o;Xn(o=qn())&&(i.videoElements=o)}},features:[bt],decls:7,vars:4,consts:[["videoEl",""],["id","lc-heading-text",1,"lc-heading-text","lc:mb-2","lc:text-lg","lc:text-center","lc:font-bold"],[1,"lc-video-list"],[1,"lc-video-stories","lc:flex","lc:overflow-auto","lc:m-3","lc:gap-3","lc:justify-center","lc:items-center"],[1,"lc-video-card"],["href","",1,"lc-video-wrapper","lc:rounded-lg",3,"click"],["width","100%","playsinline","","loop","","preload","metadata",1,"lc:rounded-lg","lc:transition-transform","lc:duration-300",3,"mouseenter","mouseleave","poster","muted"],[3,"src","type"],[1,"lc-video-controls"],[3,"muted","videoEl"],["id","lc-single-product",1,"lc-single-product"],["id","lc-cta-button","type","button",1,"lc-cta-button","lc:w-full","lc:h-auto","lc:text-center","lc:z-4","lc:p-4"],[3,"toggled","muted","videoEl"],[1,"lc-item-image",3,"src","alt"],[1,"lc-item-details"],[1,"lc-item-name","lc:line-clamp-1"],[1,"lc-item-price",3,"innerHTML"],["id","lc-cta-button","type","button",1,"lc-cta-button","lc:w-full","lc:h-auto","lc:text-center","lc:z-4","lc:p-4",3,"click"],[1,"lc-video-story","lc:relative","lc:w-20","lc:h-20","lc:cursor-pointer"],["viewBox","0 0 100 100",1,"lc:absolute","lc:top-0","lc:left-0","lc:w-full","lc:h-full"],["cx","50","cy","50","r","48","fill","none","stroke-width","4",1,"lc:stroke-gray-300"],["id","lc-video-story-circle","cx","50","cy","50","r","48","fill","none","stroke-width","4","stroke-linecap","round","stroke-dasharray","301.6","stroke-dashoffset","301.6",1,"lc:stroke-blue-500"],[1,"lc:w-full","lc:h-full","lc:rounded-full","lc:overflow-hidden"],["autoplay","","loop","",1,"lc:w-full","lc:h-full","lc:object-cover","lc:rounded-full",3,"click","muted"],[3,"video"],[3,"videoClicked","closeClicked","video"]],template:function(r,i){if(r&1&&(Vt(0)(1)(2),Ae(3,IE,2,1,"div",1)(4,NE,3,0,"div",2)(5,kE,3,0,"div",3)(6,FE,2,2)),r&2){let o=i.videoConfig.template;W(),bn(!i.videoConfig.autoPlay||i.videoConfig.autoPlay===i.VideoConfigAutoPlay.ON),W(),bn(i.videoConfig.autoPlay===i.VideoConfigAutoPlay.ON_HOVER),W(),Ne(i.videoConfig.heading?3:-1),W(),Ne(o===i.VideoConfigTemplate.SIMPLE||o===i.VideoConfigTemplate.SWIPER?4:o===i.VideoConfigTemplate.STORY?5:o===i.VideoConfigTemplate.FLOATING_POPUP?6:-1)}},dependencies:[Pn,Ds,Qn,si],styles:["[_nghost-%COMP%]{display:block}.lc-video-list[_ngcontent-%COMP%]{display:flex;overflow-x:auto;gap:24px;margin:8px;align-items:center;scroll-snap-type:x mandatory;scroll-behavior:smooth}@media (min-width: 768px){.lc-video-list[_ngcontent-%COMP%]{justify-content:center}}.lc-video-wrapper[_ngcontent-%COMP%]{position:relative}.lc-video-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2.5px;scroll-snap-align:center;min-width:200px;max-width:300px}.lc-video-card[_ngcontent-%COMP%] video[_ngcontent-%COMP%]:hover{scale:1.1}.lc-cta-button[_ngcontent-%COMP%]{cursor:pointer;background:rgb(var(--lc-color-button));color:rgb(var(--lc-color-button-text));border-radius:var(--lc-button-radius)}.lc-video-controls[_ngcontent-%COMP%]{position:absolute;bottom:8px;z-index:10;right:8px;display:flex;gap:8px}.lc-single-product[_ngcontent-%COMP%]{display:flex;margin:.25rem 0;gap:.25rem;align-items:center}.lc-single-product[_ngcontent-%COMP%] .lc-item-image[_ngcontent-%COMP%]{width:50px;height:50px;border-radius:.5rem}.lc-single-product[_ngcontent-%COMP%] .lc-item-details[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:column;gap:.25rem;font-size:14px;line-height:normal}.lc-single-product[_ngcontent-%COMP%] .lc-item-details[_ngcontent-%COMP%] .lc-item-name[_ngcontent-%COMP%]{color:#000;font-weight:600}.lc-single-product[_ngcontent-%COMP%] .lc-item-details[_ngcontent-%COMP%] .lc-item-price[_ngcontent-%COMP%]{color:#000}"]})};ku("CooeeWidgetSDK");(async()=>{let t=await Ru(Fu),e=(n,r)=>{let i=Au(n,{injector:t.injector});customElements.define(r,i)};e(ns,"cooee-sticky-atc"),e(ts,"cooee-progressbar"),e(Vs,"cooee-shoppable-videos"),e(uo,"cooee-product-options-picker"),sessionStorage.cooeeDebug&&import("./chunk-7OOIPWXD.js").then(n=>{e(n.DebuggerComponent,"cooee-debugger")}),pi.filters.define("default",function(n){return n??""}),pi.defaultConfig.defaultFilter="default",pi.defaultConfig.useWith=!0,pi.defaultConfig.autoTrim="slurp"})();
74
+ `}var el=!1;function bv(t,e,n){let r=t[e];if(el&&typeof r!="function")throw new Error(`${t.constructor.name} is using untilDestroyed but doesn't implement ${e}`);lp(t,n),t[e]=function(){r.apply(this,arguments),up(this,n),t[e]=r}}function hp(t,e){return n=>{let r=cp(e);typeof e=="string"?bv(t,e,r):(el&&wv(t),lp(t,r));let i=t[r];return el&&yv(t,i),n.pipe(mr(i))}}function wv(t){let e=Object.getPrototypeOf(t);if(!(ap in e))throw new Error("untilDestroyed operator cannot be used inside directives or components or providers that are not decorated with UntilDestroy decorator")}var as=class t{engagementTrigger;isMobile=window.CooeeSDK.uaParser.getDevice().type==="mobile";ngOnInit(){this.engagementTrigger=this.triggerContext?.triggerData}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Fe({type:t,selectors:[["cooee-base-video"]],inputs:{triggerContext:"triggerContext"},decls:0,vars:0,template:function(n,r){},encapsulation:2})};var Cv=t=>({active:t}),Sv=(t,e)=>e.mID;function Iv(t,e){if(t&1&&Se(0,"img",9),t&2){let n=e.$implicit,r=J(2);be("src",n.url,ft)("alt",r.selectedItem.name)}}function xv(t,e){if(t&1&&qe(0,Iv,1,2,"img",9,dn),t&2){let n=J();Ze(n.selectedItem.imgs)}}function Tv(t,e){if(t&1&&Se(0,"img",9),t&2){let n=J();be("src",n.selectedItem.imageURL,ft)("alt",n.selectedItem.name)}}function Ov(t,e){if(t&1){let n=et();X(0,"a",18),Ne("click",function(i){let o=Ue(n).$implicit;return J(2).changeItem(o),i.stopPropagation(),He(i.preventDefault())}),Se(1,"img",19),q()}if(t&2){let n=e.$implicit,r=J(2);W(),be("src",n.imageURL,ft)("alt",n.name)("ngClass",Bi(3,Cv,n.mID===r.selectedItem.mID+""))}}function Dv(t,e){if(t&1&&(X(0,"span",16),Te(1,"Selected Product"),q(),X(2,"div",8),qe(3,Ov,2,5,"a",17,dn),q()),t&2){let n=J();W(3),Ze(n.items)}}function Av(t,e){if(t&1){let n=et();X(0,"a",23),Ne("click",function(i){let o=Ue(n).$implicit,s=J(2);return He(s.changeVariant(i,o))}),X(1,"span",24),Te(2),q()()}if(t&2){let n=e.$implicit,r=J(2);Wn("lc-selected-variant",(r.selectedVariant==null?null:r.selectedVariant.mID)===n.mID),W(2),kn(n.name)}}function Nv(t,e){if(t&1&&(X(0,"span",20),Te(1,"Select Variant"),q(),X(2,"div",21),qe(3,Av,3,3,"a",22,Sv),q()),t&2){let n=J();W(3),Ze(n.selectedItem.vars)}}function Rv(t,e){if(t&1&&(X(0,"div",25),Te(1,"Description"),q(),Se(2,"div",26),_t(3,"safeHtml")),t&2){let n=J();W(2),be("innerHTML",St(3,1,n.selectedItem.desc),en)}}function Mv(t,e){t&1&&Te(0," Open Cart ")}function Pv(t,e){t&1&&Te(0," Add To Cart ")}var cs=class t{selectedItem;items;closeModel=new it;performCTA=new it;atcClicked=!1;selectedVariant=null;ClickActionType=Ut;ngOnInit(){this.updateSelectedVariant()}closeDialog(){this.closeModel.emit()}clickAddToCart(e){this.performCTA.emit({item:e,cta:this.atcClicked?Ut.OPEN_CART:Ut.ADD_TO_CART}),this.atcClicked=!0}async changeItem(e){this.selectedItem=e,this.updateSelectedVariant()}changeVariant(e,n){e.stopPropagation(),e.preventDefault(),this.selectedVariant=n,this.selectedItem.selectedOrFirstVariant.value=this.selectedVariant}updateSelectedVariant(){this.selectedVariant=this.selectedItem.selectedOrFirstVariant.value}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Fe({type:t,selectors:[["cooee-product-modal"]],inputs:{selectedItem:"selectedItem",items:"items"},outputs:{closeModel:"closeModel",performCTA:"performCTA"},decls:27,vars:11,consts:[[1,"lc-card-wrapper"],[1,"lc-card-header"],[1,"lc-header"],[1,"lc-close-button",3,"click"],["xmlns","http://www.w3.org/2000/svg","height","24px","viewBox","0 0 24 24","fill","#000"],["d","M0 0h24v24H0V0z","fill","none"],["d","M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"],[1,"lc-card-content"],[1,"lc-image-strip"],[1,"w-28","h-28","object-contain",3,"src","alt"],[1,"lc-inner-body"],[1,"lc-item-name"],[1,"lc-item-price",3,"innerHTML"],[1,"lc-card-footer"],[1,"lc-cta-button",3,"click"],[1,"lc-more-info-button",3,"click"],[1,"lc-selected-product-title"],["href","#"],["href","#",3,"click"],[1,"product-selector",3,"src","alt","ngClass"],[1,"lc-selected-variant-title"],[1,"lc-variant-list"],["href","#",1,"lc-variant",3,"lc-selected-variant"],["href","#",1,"lc-variant",3,"click"],[1,"truncate","max-w-[200px]"],[1,"lc-description-title"],[1,"lc-description",3,"innerHTML"]],template:function(n,r){n&1&&(X(0,"div",0)(1,"div",1)(2,"div",2),Te(3,"Shop Now"),q(),X(4,"button",3),Ne("click",function(){return r.closeDialog()}),Ft(),X(5,"svg",4),Se(6,"path",5)(7,"path",6),q()()(),$n(),X(8,"div",7)(9,"div",8),De(10,xv,2,0)(11,Tv,1,2,"img",9),q(),X(12,"div",10)(13,"div",11),Te(14),q(),Se(15,"span",12),_t(16,"cooeeCurrency"),_t(17,"safeHtml"),De(18,Dv,5,0)(19,Nv,5,0)(20,Rv,4,3),q()(),X(21,"div",13)(22,"button",14),Ne("click",function(){return r.clickAddToCart(r.selectedItem)}),De(23,Mv,1,0)(24,Pv,1,0),q(),X(25,"button",15),Ne("click",function(){return r.performCTA.emit({item:r.selectedItem,cta:r.ClickActionType.GO_TO_PRODUCT})}),Te(26," More Info "),q()()()),n&2&&(W(10),Ae(r.selectedItem.imgs!=null&&r.selectedItem.imgs.length?10:11),W(4),kn(r.selectedItem.name),W(),be("innerHTML",St(17,9,St(16,7,r.selectedVariant==null||r.selectedVariant.price==null?null:r.selectedVariant.price.d)),en),W(3),Ae(r.items.length>1?18:-1),W(),Ae(r.selectedItem.vars[0]!=null&&r.selectedItem.vars[0].name!=="Default Title"?19:-1),W(),Ae(r.selectedItem.desc?20:-1),W(3),Ae(r.atcClicked?23:24))},dependencies:[Vn,wn,Fn],styles:["[_nghost-%COMP%]{display:block;background:#fff}.lc-card-wrapper[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;height:100%;overflow:auto}.lc-card-header[_ngcontent-%COMP%]{display:var(--header-display, flex);flex-direction:row;justify-content:space-between;align-items:center;padding:8px 16px;border-bottom:1px solid var(--lc-color-gray-300)}.lc-header[_ngcontent-%COMP%]{font-size:24px;font-weight:500;color:#000}.lc-close-button[_ngcontent-%COMP%]{background:transparent;border:none;width:36px;height:36px}.lc-close-button[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{fill:#000000b3}.lc-card-content[_ngcontent-%COMP%]{flex:1;overflow-y:auto;overscroll-behavior:contain}.lc-inner-body[_ngcontent-%COMP%]{padding:16px;display:flex;flex-direction:column;gap:8px}.lc-image-strip[_ngcontent-%COMP%]{width:100%;display:flex;overflow-x:auto;gap:.5rem;flex-wrap:nowrap}.lc-image-strip[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:auto;height:200px}.lc-image-strip[_ngcontent-%COMP%] .product-selector[_ngcontent-%COMP%]{height:100px;flex-shrink:0;padding:2px}.lc-image-strip[_ngcontent-%COMP%] .product-selector.active[_ngcontent-%COMP%]{border:red solid 1px}.lc-item-name[_ngcontent-%COMP%]{font-size:20px;font-weight:600;line-height:normal;color:#000}.lc-item-price[_ngcontent-%COMP%]{font-size:18px;font-weight:500;color:#000}.lc-variant-list[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.5rem;padding-top:.5rem;width:100%}.lc-variant[_ngcontent-%COMP%]{padding:4px 8px;border-radius:4px;background-color:#f3f4f6;color:#1f2937;font-size:12px;cursor:pointer;border:1px solid #e5e7eb;display:flex;align-items:center;gap:4px;text-decoration:none}.lc-selected-variant[_ngcontent-%COMP%]{border:1px solid black;color:#000}.lc-description-title[_ngcontent-%COMP%], .lc-selected-product-title[_ngcontent-%COMP%], .lc-selected-variant-title[_ngcontent-%COMP%]{font-size:18px;font-weight:600;margin-top:8px;line-height:normal;color:#000}.lc-description[_ngcontent-%COMP%]{line-height:normal;color:#000}.lc-card-footer[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;padding:12px;background-color:#0000004d;box-shadow:0 4px 6px #52525b4d;gap:12px}.lc-cta-button[_ngcontent-%COMP%], .lc-more-info-button[_ngcontent-%COMP%]{width:50%;padding:12px;border:none;border-radius:.5rem;font-weight:600;display:flex;justify-content:center;cursor:pointer;font-size:16px}.lc-cta-button[_ngcontent-%COMP%]{background-color:#000;color:#fff}.lc-more-info-button[_ngcontent-%COMP%]{background-color:#fff;color:#000}"]})};var ls=class t{width;static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Fe({type:t,selectors:[["cooee-video-progress-bar"]],inputs:{width:"width"},decls:5,vars:2,consts:[[1,"lc:absolute","lc:top-1","lc:w-full","lc:z-10"],[1,"lc:px-2"],[1,"lc:h-1","lc:w-full","lc:bg-gray-700","lc:mb-2"],[1,"lc:h-1","lc:bg-pink-500"]],template:function(n,r){n&1&&(X(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),Se(4,"div"),q()()()()),n&2&&(W(3),ti("width",r.width,"%"))},encapsulation:2})};function Lv(t,e){t&1&&Te(0," Open Cart ")}function kv(t,e){t&1&&Te(0," Add To Cart ")}var us=class t{item;performCTA=new it;atcClicked=!1;clickAddToCart(e){e.stopPropagation(),this.performCTA.emit({item:this.item,cta:this.atcClicked?Ut.OPEN_CART:Ut.ADD_TO_CART}),this.atcClicked=!0}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Fe({type:t,selectors:[["cooee-product-card"]],inputs:{item:"item"},outputs:{performCTA:"performCTA"},decls:13,vars:11,consts:[[1,"lc-item-card"],[1,"lc-card-content"],[1,"lc-item-image",3,"alt","src"],[1,"lc-product-details"],[1,"lc-item-name"],[1,"lc-item-price",3,"innerHTML"],[1,"lc-cta-button",3,"click"]],template:function(n,r){if(n&1){let i=et();X(0,"div",0)(1,"div",1),Se(2,"img",2),X(3,"div",3)(4,"div",4),Te(5),q(),Pt(6),Se(7,"div",5),_t(8,"cooeeCurrency"),_t(9,"safeHtml"),q()(),X(10,"button",6),Ne("click",function(s){return Ue(i),He(r.clickAddToCart(s))}),De(11,Lv,1,0)(12,kv,1,0),q()()}if(n&2){W(2),Tn("alt",r.item.name),be("src",r.item.imageURL,ft),W(3),Vt(" ",r.item.name," ");let i=r.item.selectedOrFirstVariant.value.price.d;W(2),be("innerHTML",St(9,9,St(8,7,i)),en),W(3),Wn("atc-clicked",r.atcClicked),W(),Ae(r.atcClicked?11:12)}},dependencies:[wn,Vn],styles:["[_nghost-%COMP%]{display:block;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);background-color:#ffffff80;border-radius:7px;cursor:pointer}.lc-item-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px;padding:8px}.lc-card-content[_ngcontent-%COMP%]{display:flex;gap:8px;width:100%;align-items:start}.lc-item-image[_ngcontent-%COMP%]{width:70px;height:70px;object-fit:cover;box-sizing:border-box;border-radius:7px}.lc-product-details[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:3.5px;font-size:10.5px}.lc-item-name[_ngcontent-%COMP%]{font-weight:600;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:16px;line-height:normal;color:#000}.lc-item-price[_ngcontent-%COMP%]{font-size:16px;line-height:normal;color:#000}.lc-cta-button[_ngcontent-%COMP%]{padding:12px 8px;border:none;border-radius:8px;width:100%;background:#000;text-align:center;font-weight:500;cursor:pointer;color:#fff;font-size:16px}.lc-cta-button.atc-clicked[_ngcontent-%COMP%]{background:#000}"]})};var Vv=["swiperContainer"],Bv=["videoEl"],Uv=(t,e)=>e.url,Hv=(t,e)=>e.mID;function jv(t,e){if(t&1&&Se(0,"source",14),t&2){let n=e.$implicit;Tn("type",n.mimeType),be("src",n.url,ft)}}function $v(t,e){t&1&&Is(0)}function Gv(t,e){if(t&1){let n=et();Se(0,"cooee-video-progress-bar",17),X(1,"div",18)(2,"cooee-mute-toggle",19),Ne("toggled",function(){Ue(n);let i=J(2);return He(i.toggleMute())}),q(),De(3,$v,1,0,"ng-container",10),q()}if(t&2){let n=J().$index,r=nn(4),i=J(),o=nn(11);be("width",i.videoProgress[n]||0),W(2),be("muted",i.muted)("videoEl",r),W(),be("ngTemplateOutlet",o)}}function Wv(t,e){if(t&1){let n=et();X(0,"cooee-product-card",22),Ne("performCTA",function(i){Ue(n);let o=J(2).$implicit,s=J();return He(s.performClickToAction(i,o))})("click",function(){let i=Ue(n).$implicit,o=J(2).$implicit,s=J();return He(s.productCardClicked(i,o))}),q()}if(t&2){let n=e.$implicit;be("item",n)}}function Yv(t,e){if(t&1&&(X(0,"div",15)(1,"div",20),qe(2,Wv,1,1,"cooee-product-card",21,Hv),q()()),t&2){let n=J().$implicit;W(2),Ze(n.items)}}function zv(t,e){if(t&1){let n=et();X(0,"cooee-product-modal",23),Ne("performCTA",function(i){Ue(n);let o=J(2);return He(o.performClickToAction(i,o.selectedVideo))})("closeModel",function(){Ue(n);let i=J(2);return He(i.productModalClosed())}),q()}if(t&2){let n=J(2);be("selectedItem",n.selectedItem)("items",n.selectedVideo.items)}}function Kv(t,e){if(t&1){let n=et();X(0,"div",6)(1,"div",11)(2,"div",12)(3,"video",13,2),Ne("timeupdate",function(i){let o=Ue(n).$index,s=J();return He(s.updateProgress(i,o))})("click",function(){let i=Ue(n).$index,o=J();return He(o.currentIndex===i&&o.toggleMute())})("ended",function(){Ue(n);let i=nn(4),o=J();return He(o.onVideoEnded(i))}),qe(5,jv,1,2,"source",14,Uv),q(),De(7,Gv,4,4)(8,Yv,4,0,"div",15),q(),De(9,zv,1,2,"cooee-product-modal",16),q()()}if(t&2){let n=e.$implicit,r=e.$index,i=J();W(3),be("ngClass",i.viewTemplateClassName)("autoplay",i.currentIndex===r)("muted",i.muted)("poster",n.thumbnail,ft),xn("data-video-id",n.id),W(2),Ze(n.sources),W(2),Ae(i.currentIndex===r?7:-1),W(),Ae(n.items.length&&i.currentIndex===r?8:-1),W(),Ae(i.selectedItem&&i.currentIndex===r?9:-1)}}function Xv(t,e){t&1&&Is(0)}function qv(t,e){if(t&1){let n=et();X(0,"button",24),Ne("click",function(){Ue(n);let i=J();return He(i.close())}),Ft(),X(1,"svg",25),Se(2,"path",26)(3,"path",27),q()()}}var un=class extends as{constructor(n,r,i,o){super();this.cdr=n;this.elementRef=r;this.dialogRef=i;this.data=o;this.videos=o.videos,this.currentIndex=o.currentIndex,this.triggerContext=o.triggerContext}videos=[];currentIndex=0;swiperContainerRef;videoElements;muted=!1;videoProgress=[];selectedItem=null;selectedVideo;swiperInstance;detailPopupTemplate;viewTemplateClassName="lc-video-only-view";resizeDebouncer=new ss(this.onResize.bind(this));onResize(){this.swiperInstance?.destroy?.(),this.reInitSwiper()}ngOnInit(){super.ngOnInit(),this.detailPopupTemplate=this.engagementTrigger?.content?.videoConfig?.detailPopup.template??"VIDEO_ONLY_VIEW";let n=this.elementRef.nativeElement.shadowRoot,r=Er.get().website.commonCSS;switch(Yt.injectRawCSS(r,n),Yt.injectStylesheet(An.styleURL,n),Yt.injectSwiperCSS(n),this.detailPopupTemplate){case"PRODUCT_DETAIL_VIEW":this.selectItemForDetailView(),this.viewTemplateClassName="lc-product-detail-view";break;case"VIDEO_ONLY_VIEW":this.viewTemplateClassName="lc-video-only-view";break}}ngAfterViewInit(){ml(this.getCurrentVideoElement(),"loadeddata").pipe(hp(this)).subscribe(()=>{this.initSwiper()})}ngOnDestroy(){this.swiperInstance?.destroy?.(),this.resizeDebouncer.destroy()}close(n=this.videos[this.currentIndex],r=this.currentIndex){let i=this.getCurrentVideoElement();this.dialogRef.close({lastVideo:n,lastVideoIndex:r,lastVideoDuration:i?.currentTime})}performClickToAction(n,r){this.data.onCTAPerformed({cta:n.cta,item:n.item,video:r})}getCurrentVideoElement(){return this.videoElements.get(this.currentIndex)?.nativeElement}moveToNextVideo(){this.swiperInstance.slideTo(this.currentIndex+1)}productModalClosed(){this.selectedItem=null,this.selectedVideo=void 0,this.swiperInstance.enable()}pauseAll(){this.videoElements.forEach(n=>n.nativeElement.pause())}async toggleMute(){this.muted=!this.muted,this.videoElements.forEach(i=>i.nativeElement.muted=this.muted);let r=[this.muted?Ye.EVENT_VIDEO_MUTED:Ye.EVENT_VIDEO_UNMUTED,{current:this.currentVideoProps()},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(r),await Nr.set(Dr.MUTED,this.muted),this.cdr.detectChanges()}playActiveVideo(){this.pauseAll();let n=this.getCurrentVideoElement();n&&(n.currentTime=1,n.play().then(async()=>{this.muted=await Nr.get(Dr.MUTED,!1),n.muted=this.muted}))}onVideoEnded(n){if(this.currentIndex<this.videos.length-1)this.selectedItem?(n.currentTime=0,n.play()):this.moveToNextVideo();else{let r=this.getPreviousVideoDataForEvent(),i=[Ye.EVENT_LAST_VIDEO_ENDED,{previous:r},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(i),n.currentTime=0,n.play()}}updateProgress(n,r){let i=n.target;this.videoProgress[r]=i.currentTime/i.duration*100,this.cdr.detectChanges()}onSlideChange(n){let r=this.getPreviousVideoDataForEvent();this.currentIndex=n.realIndex,this.playActiveVideo(),this.detailPopupTemplate==="PRODUCT_DETAIL_VIEW"?this.selectItemForDetailView():(this.selectedItem=null,delete this.selectedVideo);let i=this.currentVideoProps(),o={previous:r,current:i},s=[Ye.EVENT_VIDEO_CHANGE,o,{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(s)}productCardClicked(n,r){let i={videoID:r.id,videoIndex:this.currentIndex},o=[Ye.EVENT_MORE_ITEM_INFO_CLICKED,{current:i},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(o),this.selectedItem=n,this.selectedVideo=r,this.swiperInstance.disable()}reInitSwiper(){this.initSwiper(),this.selectedItem&&this.swiperInstance.disable()}initSwiper(){let n=this.isMobile?1:"auto",r=0;this.detailPopupTemplate==="PRODUCT_DETAIL_VIEW"&&(n="auto",r=10),this.swiperInstance=new window.CooeeSDK.Swiper(this.swiperContainerRef.nativeElement,{direction:this.isMobile?"vertical":"horizontal",effect:this.isMobile?"slide":"coverflow",slidesPerView:n,initialSlide:this.currentIndex,centeredSlides:!0,spaceBetween:r,coverflowEffect:{rotate:0,stretch:0,depth:400,modifier:1,slideShadows:!1},navigation:{nextEl:this.swiperContainerRef.nativeElement.querySelector(".swiper-button-next"),prevEl:this.swiperContainerRef.nativeElement.querySelector(".swiper-button-prev")}}),this.swiperInstance.on("slideChange",i=>{this.onSlideChange(i),this.cdr.detectChanges()}),this.playActiveVideo()}currentVideoProps(){return{videoID:this.videos[this.currentIndex].id,videoIndex:this.currentIndex}}getPreviousVideoDataForEvent(){let n=this.currentVideoProps(),r=this.videoElements.find(o=>o.nativeElement.dataset.videoId===this.videos[this.currentIndex].id)?.nativeElement;n.playedTillMS=Math.ceil(r?.currentTime*1e3);let i=r?.duration*1e3;return n.playedTillPercent=+(n.playedTillMS/i).toFixed(4),n}selectItemForDetailView(){this.selectedVideo=this.videos[this.currentIndex],this.selectedItem=this.isMobile?null:this.selectedVideo?.items?.[0]??null}};vs(un,"\u0275fac",function(r){return new(r||un)(tn(Xn),tn(bt),tn(pr),tn(Qc))}),vs(un,"\u0275cmp",Fe({type:un,selectors:[["cooee-video-swiper-dialog"]],viewQuery:function(r,i){if(r&1&&(Yn(Vv,5),Yn(Bv,5)),r&2){let o;zn(o=Kn())&&(i.swiperContainerRef=o.first),zn(o=Kn())&&(i.videoElements=o)}},inputs:{videos:"videos",currentIndex:"currentIndex"},features:[wt],decls:12,vars:2,consts:[["swiperContainer",""],["closeButtonTemplate",""],["videoEl",""],[1,"lc-shadow-inner",3,"ngClass"],[1,"swiper-container"],[1,"swiper-wrapper"],[1,"swiper-slide"],[1,"swiper-button-prev"],[1,"swiper-button-next"],[1,"lc-desktop-controls"],[4,"ngTemplateOutlet"],[1,"lc-video-modal-row"],[1,"lc-video-container"],["playsinline","","preload","metadata",1,"lc-video-el",3,"timeupdate","click","ended","ngClass","autoplay","muted","poster"],[3,"src","type"],[1,"lc-card-container"],[3,"selectedItem","items"],[3,"width"],[1,"lc-video-controls"],[3,"toggled","muted","videoEl"],[1,"lc-card-scroll"],[3,"item"],[3,"performCTA","click","item"],[3,"performCTA","closeModel","selectedItem","items"],[1,"lc-close-button",3,"click"],["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 24 24","fill","#fff"],["d","M0 0h24v24H0V0z","fill","none"],["d","M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"]],template:function(r,i){if(r&1&&(X(0,"div",3)(1,"div",4,0)(3,"div",5),qe(4,Kv,10,8,"div",6,dn),q(),Se(6,"div",7)(7,"div",8),q(),X(8,"div",9),De(9,Xv,1,0,"ng-container",10),q()(),De(10,qv,4,0,"ng-template",null,1,Ml)),r&2){let o=nn(11);be("ngClass",i.viewTemplateClassName),W(4),Ze(i.videos),W(5),be("ngTemplateOutlet",o)}},dependencies:[us,cs,$r,ls,Vl,Fn],styles:[`:host{display:flex}.lc-shadow-inner{position:relative;width:100vw;height:100vh;display:flex}@media (min-width: 768px){.lc-shadow-inner{background-color:color-mix(in oklab,#000 70%,transparent);justify-content:center;align-items:center}}.swiper-container{--swiper-navigation-size: 50px;--swiper-navigation-color: white;width:100dvw;height:100dvh}.lc-product-detail-view .swiper-container{align-items:center}@media (min-width: 768px){.swiper-container{width:100%;height:100%;max-width:90vw;max-height:90vh}}.swiper-wrapper{max-height:100%}.lc-product-detail-view .swiper-wrapper{align-items:center}@media (max-width: 768px){.swiper-button-prev,.swiper-button-next{display:none!important}}.swiper-slide{position:relative;display:flex;align-items:center;visibility:hidden}.lc-product-detail-view .swiper-slide{width:40vw!important;height:70vh!important}@media (min-width: 768px){.lc-product-detail-view .swiper-slide{min-width:650px!important}}@media (max-width: 768px){.lc-product-detail-view .swiper-slide{width:100%!important;height:100%!important}}@media (min-width: 768px){.lc-video-only-view .swiper-slide{width:fit-content!important}}@media (min-width: 768px){.swiper-slide{border-radius:12px;overflow:hidden}}.swiper-slide.swiper-slide-active,.swiper-slide.swiper-slide-prev,.swiper-slide.swiper-slide-next{visibility:visible}video{height:100%}.lc-product-detail-view video{width:100%;object-fit:cover;z-index:-1}.lc-desktop-controls{position:absolute;top:2rem;right:4rem;z-index:10;display:flex;gap:.5rem}@media (max-width: 768px){.lc-desktop-controls{display:none}}.lc-video-controls{position:absolute;top:1rem;z-index:10;right:.5rem;display:flex;gap:.25rem}.lc-video-controls .lc-close-button{display:block}@media (min-width: 768px){.lc-video-controls .lc-close-button{display:none}}.lc-close-button{border:none;display:flex;justify-content:center;align-items:center;width:40px;height:40px;background:#00000080;border-radius:100%}.lc-close-button svg{width:100%;height:100%}@media (min-width: 768px){.lc-close-button{width:48px;height:48px}}.lc-product-detail-view .lc-video-container{height:100%;position:relative}@media (min-width: 768px){.lc-product-detail-view .lc-video-container{width:50%}}.lc-video-only-view .lc-video-container{height:100%}.lc-card-container{position:absolute;bottom:12px;z-index:10;width:100%;padding-inline:12px;box-sizing:border-box}.lc-product-detail-view .lc-card-container{display:none}@media (max-width: 768px){.lc-product-detail-view .lc-card-container{display:block}}.lc-card-scroll{display:flex;overflow-x:auto;gap:12px;width:100%;scrollbar-width:none}.lc-card-scroll::-webkit-scrollbar{display:none}.lc-card-scroll cooee-product-card{flex:0 0 auto;width:80%;max-width:300px}.lc-card-scroll:has(>cooee-product-card:only-child) cooee-product-card{width:100%;max-width:none}.lc-product-detail-view .lc-video-modal-row{display:flex;justify-content:center;height:100%;width:100%}.lc-video-only-view .lc-video-modal-row{display:block;height:100%}.lc-product-detail-view cooee-product-modal{--header-display: none;width:50%;flex:1}@media (max-width: 768px){.lc-product-detail-view cooee-product-modal{--header-display: flex;width:100%;height:70dvh;position:absolute;bottom:0;z-index:2147483646}}.lc-video-only-view cooee-product-modal{width:100%;height:70dvh;z-index:2147483646;bottom:0;position:absolute}
75
+ `],encapsulation:3})),un=cl([pp()],un);var Zv=["videoEl"],mp=(t,e)=>e.url;function Jv(t,e){if(t&1&&(X(0,"div",1),Te(1),q()),t&2){let n=J();W(),Vt(" ",n.videoConfig.heading," ")}}function Qv(t,e){if(t&1&&Se(0,"source",7),t&2){let n=e.$implicit;Tn("type",n.mimeType),be("src",n.url,ft)}}function e0(t,e){if(t&1){let n=et();X(0,"cooee-mute-toggle",12),Ne("toggled",function(i){Ue(n),J();let o=nn(5),s=J(2);return He(s.onMuteToggled(i,o))}),q()}if(t&2){J();let n=nn(5);be("muted",n.muted)("videoEl",n)}}function t0(t,e){if(t&1&&Se(0,"img",13),t&2){J(2);let n=Ct(0);be("src",n.imageURL,ft)("alt",n.name)}}function n0(t,e){if(t&1&&(X(0,"div",10),De(1,t0,1,2,"img",13),X(2,"div",14)(3,"span",15),Te(4),q(),Pt(5),Se(6,"span",16),_t(7,"cooeeCurrency"),_t(8,"safeHtml"),q()()),t&2){J();let n=Ct(0),r=J(2);W(),Ae(r.showImage?1:-1),W(3),Vt(" ",n.name," ");let i=n.selectedOrFirstVariant.value.price.d;W(2),be("innerHTML",St(8,5,St(7,3,i)),en)}}function r0(t,e){if(t&1){let n=et();X(0,"button",17),Ne("click",function(){Ue(n);let i=J().$implicit,o=Ct(0),s=J(2);return He(s.addToCartClicked(i,o))}),Te(1," Add to cart "),q()}}function i0(t,e){if(t&1){let n=et();Pt(0)(1),X(2,"div",4)(3,"a",5),Ne("click",function(i){let o=Ue(n),s=o.$implicit,c=o.$index,u=nn(5),d=J(2);return He(d.onVideoTap(i,s,c,u))}),X(4,"video",6,0),Ne("mouseenter",function(){Ue(n);let i=nn(5);J(2);let o=Ct(2);return He(o&&i.play())})("mouseleave",function(){Ue(n);let i=nn(5);J(2);let o=Ct(2);return He(o&&i.pause())}),qe(6,Qv,1,2,"source",7,mp),q(),X(8,"div",8),De(9,e0,1,2,"cooee-mute-toggle",9),q(),De(10,n0,9,7,"div",10),q(),De(11,r0,2,0,"button",11),q()}if(t&2){let n=e.$implicit,r=J(2),i=Ct(1),s=fn(n.items[0])&&r.videoConfig.footerContent==r.VideoConfigFooterContent.FIRST_ITEM;W(4),be("poster",n.thumbnail,ft)("muted",!0),xn("autoplay",i||null),W(2),Ze(n.sources),W(3),Ae(r.videoConfig.showMuteButton?9:-1),W(),Ae(s?10:-1),W(),Ae(s?11:-1)}}function o0(t,e){if(t&1&&(X(0,"div",2),qe(1,i0,12,7,"div",4,dn),q()),t&2){let n=J();W(),Ze(n.videos)}}function s0(t,e){if(t&1&&Se(0,"source",7),t&2){let n=e.$implicit;Tn("type",n.mimeType),be("src",n.url,ft)}}function a0(t,e){if(t&1){let n=et();X(0,"div",18),Ft(),X(1,"svg",19),Se(2,"circle",20)(3,"circle",21),q(),$n(),X(4,"div",22)(5,"video",23),Ne("click",function(i){let o=Ue(n),s=o.$implicit,c=o.$index,u=J(2);return He(u.onVideoTap(i,s,c))}),qe(6,s0,1,2,"source",7,mp),q()()()}if(t&2){let n=e.$implicit;W(5),be("muted",!0),W(),Ze(n.sources)}}function c0(t,e){if(t&1&&(X(0,"div",3),qe(1,a0,8,1,"div",18,dn),q()),t&2){let n=J();W(),Ze(n.videos)}}function l0(t,e){if(t&1){let n=et();X(0,"cooee-draggable-video-popup",25),Ne("videoClicked",function(){Ue(n),J();let i=Ct(0),o=J();return He(o.onPopupVideoClicked(i,0))})("closeClicked",function(){Ue(n);let i=J(2);return He(i.onPopupVideoClosed())}),q()}if(t&2){J();let n=Ct(0);be("video",n)}}function u0(t,e){if(t&1&&(Pt(0),De(1,l0,1,1,"cooee-draggable-video-popup",24)),t&2){let n=J();fn(n.videos[0]),W(),Ae(n.hidePopupVideo?-1:1)}}var ds=class t extends pn{constructor(n,r){super();this.dialog=n;this.cdr=r}videoElements;videos;VideoConfigTemplate=bc;VideoConfigFooterContent=Cc;VideoConfigAutoPlay=wc;isMobile=window.CooeeSDK.uaParser.getDevice().type==="mobile";hidePopupVideo;videoConfig;showImage;dialogRef=null;ngOnInit(){super.ngOnInit(),Yt.loadSwiperScript(),this.showImage=this.videoConfig.detailPopup.template==="PRODUCT_DETAIL_VIEW"}ngAfterViewInit(){this.playFirstVideo()}engagementTriggerReceived(n){this.videoConfig=n.content?.videoConfig,this.videos=this.videoConfig.videos}sendTriggerClicked(n,r){let i=new jr(Ye.EVENT_TRIGGER_CLICKED,{},this.triggerContext?.triggerData);i.videos=[n.id],r&&(i.items=[r]),this.sendEventToRenderer(i)}onVideoTap(n,r,i,o){n?.stopPropagation(),n?.preventDefault();let s=r.items?.[0];if(this.sendTriggerClicked(r,s?.toEmbed()),this.videoConfig.footerContent!=="FIRST_ITEM"){o&&(o.muted=!1,o.play(),this.onMuteToggled(!1,o));return}Yt.loadSwiperScript().then(()=>this.openDialog(r,i))}async performCTA(n){let r,i=this.triggerContext;if(n.cta===Ut.ADD_TO_CART)r=Ye.EVENT_ADD_TO_CART_CLICKED;else if(n.cta===Ut.GO_TO_PRODUCT)r=Ye.EVENT_VIEW_ITEM_CLICKED;else if(n.cta===Ut.OPEN_CART)r=Ye.EVENT_OPEN_CART_CLICKED,i.triggerData.redirectBehaviour=Ls.CART_DRAWER;else{gt.warn(`Unsupported CTA type: ${n.cta}`);return}let o={at:n.cta},s={videoID:n.video.id};this.sendEvent(r,{current:s},n.video,n.item),this.executeCTAViaRenderer({clickAction:o,embeddedItem:n.item.toEmbed()})}addToCartClicked(n,r){this.performCTA({cta:Ut.ADD_TO_CART,item:r,video:n})}onPopupVideoClicked(n,r){this.hidePopupVideo=!0,this.onVideoTap(null,n,r),this.dialogRef?.closed.subscribe(()=>{this.hidePopupVideo=!1,this.cdr.detectChanges()})}onPopupVideoClosed(){this.hidePopupVideo=!0;let n=(new Date().getTime()-this.triggerContext.startTime.getTime())/1e3;this.sendEvent(Ye.EVENT_TRIGGER_CLOSED,{duration:n})}update(){}onMuteToggled(n,r){n||this.videoElements.forEach(i=>{i.nativeElement!==r&&(i.nativeElement.muted=!0,i.nativeElement.pause())})}playFirstVideo(){this.videoConfig.autoPlay==="ON_HOVER"&&this.isMobile&&this.videoElements.first?.nativeElement.play()}sendEvent(n,r,i,o){let s=new jr(n,r,this.engagementTrigger);i&&(s.videos=[i.id]),o&&(s.items=[o.toEmbed()]),this.sendEventToRenderer(s)}openDialog(n,r){let i={videos:this.videos,currentIndex:r,triggerContext:this.triggerContext,onCTAPerformed:s=>this.performCTA(s)};this.dialogRef&&this.dialogRef.close(),this.dialogRef=this.dialog.open(un,{width:"100vw",height:"100vh",data:i});let o={videoID:n.id,videoIndex:r};this.sendEvent(Ye.EVENT_VIDEO_DIALOG_OPENED,{current:o},n),this.dialogRef.closed.subscribe(s=>{if(!s)return;let c=s.lastVideoDuration*1e3,u={videoID:s.lastVideo.id,videoIndex:s.lastVideoIndex,playedTillMS:c,playedTillPercent:c/n.durationMS},d=new jr(Ye.EVENT_VIDEO_DIALOG_CLOSED,{current:u},this.triggerContext?.triggerData);d.videos=[s.lastVideo.id],this.sendEventToRenderer(d),this.dialogRef=null})}static \u0275fac=function(r){return new(r||t)(tn(np),tn(Xn))};static \u0275cmp=Fe({type:t,selectors:[["cooee-shoppable-videos"]],viewQuery:function(r,i){if(r&1&&Yn(Zv,5),r&2){let o;zn(o=Kn())&&(i.videoElements=o)}},features:[wt],decls:7,vars:4,consts:[["videoEl",""],["id","lc-heading-text",1,"lc-heading-text","lc:mb-2","lc:text-lg","lc:text-center","lc:font-bold"],[1,"lc-video-list"],[1,"lc-video-stories","lc:flex","lc:overflow-auto","lc:m-3","lc:gap-3","lc:justify-center","lc:items-center"],[1,"lc-video-card"],["href","",1,"lc-video-wrapper","lc:rounded-lg",3,"click"],["width","100%","playsinline","","loop","","preload","metadata",1,"lc:rounded-lg","lc:transition-transform","lc:duration-300",3,"mouseenter","mouseleave","poster","muted"],[3,"src","type"],[1,"lc-video-controls"],[3,"muted","videoEl"],["id","lc-single-product",1,"lc-single-product"],["id","lc-cta-button","type","button",1,"lc-cta-button","lc:w-full","lc:h-auto","lc:text-center","lc:z-4","lc:p-4"],[3,"toggled","muted","videoEl"],[1,"lc-item-image",3,"src","alt"],[1,"lc-item-details"],[1,"lc-item-name","lc:line-clamp-1"],[1,"lc-item-price",3,"innerHTML"],["id","lc-cta-button","type","button",1,"lc-cta-button","lc:w-full","lc:h-auto","lc:text-center","lc:z-4","lc:p-4",3,"click"],[1,"lc-video-story","lc:relative","lc:w-20","lc:h-20","lc:cursor-pointer"],["viewBox","0 0 100 100",1,"lc:absolute","lc:top-0","lc:left-0","lc:w-full","lc:h-full"],["cx","50","cy","50","r","48","fill","none","stroke-width","4",1,"lc:stroke-gray-300"],["id","lc-video-story-circle","cx","50","cy","50","r","48","fill","none","stroke-width","4","stroke-linecap","round","stroke-dasharray","301.6","stroke-dashoffset","301.6",1,"lc:stroke-blue-500"],[1,"lc:w-full","lc:h-full","lc:rounded-full","lc:overflow-hidden"],["autoplay","","loop","",1,"lc:w-full","lc:h-full","lc:object-cover","lc:rounded-full",3,"click","muted"],[3,"video"],[3,"videoClicked","closeClicked","video"]],template:function(r,i){if(r&1&&(Pt(0)(1)(2),De(3,Jv,2,1,"div",1)(4,o0,3,0,"div",2)(5,c0,3,0,"div",3)(6,u0,2,2)),r&2){let o=i.videoConfig.template;W(),fn(!i.videoConfig.autoPlay||i.videoConfig.autoPlay===i.VideoConfigAutoPlay.ON),W(),fn(i.videoConfig.autoPlay===i.VideoConfigAutoPlay.ON_HOVER),W(),Ae(i.videoConfig.heading?3:-1),W(),Ae(o===i.VideoConfigTemplate.SIMPLE||o===i.VideoConfigTemplate.SWIPER?4:o===i.VideoConfigTemplate.STORY?5:o===i.VideoConfigTemplate.FLOATING_POPUP?6:-1)}},dependencies:[wn,es,Vn,$r],styles:["[_nghost-%COMP%]{display:block}.lc-video-list[_ngcontent-%COMP%]{display:flex;overflow-x:auto;gap:24px;margin:8px;align-items:center;scroll-snap-type:x mandatory;scroll-behavior:smooth}@media (min-width: 768px){.lc-video-list[_ngcontent-%COMP%]{justify-content:center}}.lc-video-wrapper[_ngcontent-%COMP%]{position:relative}.lc-video-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2.5px;scroll-snap-align:center;min-width:200px;max-width:300px}.lc-video-card[_ngcontent-%COMP%] video[_ngcontent-%COMP%]:hover{scale:1.1}.lc-cta-button[_ngcontent-%COMP%]{cursor:pointer;background:rgb(var(--lc-color-button));color:rgb(var(--lc-color-button-text));border-radius:var(--lc-button-radius)}.lc-video-controls[_ngcontent-%COMP%]{position:absolute;bottom:8px;z-index:10;right:8px;display:flex;gap:8px}.lc-single-product[_ngcontent-%COMP%]{display:flex;margin:.25rem 0;gap:.25rem;align-items:center}.lc-single-product[_ngcontent-%COMP%] .lc-item-image[_ngcontent-%COMP%]{width:50px;height:50px;border-radius:.5rem}.lc-single-product[_ngcontent-%COMP%] .lc-item-details[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:column;gap:.25rem;font-size:14px;line-height:normal}.lc-single-product[_ngcontent-%COMP%] .lc-item-details[_ngcontent-%COMP%] .lc-item-name[_ngcontent-%COMP%]{color:#000;font-weight:600}.lc-single-product[_ngcontent-%COMP%] .lc-item-details[_ngcontent-%COMP%] .lc-item-price[_ngcontent-%COMP%]{color:#000}"]})};Zl("CooeeWidgetSDK");(async()=>{let t=await Ul(Ql),e=(n,r)=>{let i=zl(n,{injector:t.injector});customElements.define(r,i)};e(Vo,"cooee-sticky-atc"),e(Fo,"cooee-progressbar"),e(ds,"cooee-shoppable-videos"),e(Yi,"cooee-product-options-picker"),sessionStorage.cooeeDebug&&import("./chunk-UMNEGOTT.js").then(n=>{e(n.DebuggerComponent,"cooee-debugger")}),Xr.filters.define("default",function(n){return n??""}),Xr.defaultConfig.defaultFilter="default",Xr.defaultConfig.useWith=!0,Xr.defaultConfig.autoTrim="slurp"})();