@letscooee/web-sdk 9.12.5 → 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.
- package/dist/main.min.js +20 -20
- package/dist/widget.min.js +30 -30
- package/package.json +1 -1
package/dist/widget.min.js
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
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
|
|
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
|
-
`+T.split(/\n/)[
|
|
4
|
-
`+Array(
|
|
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},""),
|
|
6
|
-
`)}}return
|
|
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={"&":"&","<":"<",">":">",'"':""","'":"'"};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
|
-
`+
|
|
9
|
-
`+Array(
|
|
10
|
-
`+O(A,P)):y}}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 v=Ge(k||{});if(!v.async)return ut(A,v)(T,v);if(!P){if(typeof r=="function")return new r(function(y,U){try{y(ut(A,v)(T,v))}catch(Z){U(Z)}});throw e("Please provide a callback function, this env doesn't support Promises")}try{ut(A,v)(T,v,P)}catch(y){return P(y)}},t.templates=te,Object.defineProperty(t,"__esModule",{value:!0})})});var Od=vs((Td,Xa)=>{"use strict";(function(t){if(typeof Td=="object"&&typeof Xa<"u")Xa.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=ve;function ve(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,ve="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 v(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 y(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 y(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=v);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,ve,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,ve,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,ve,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,ve,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,ve,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",ye="ui08",Pe="uic8",Le="si16",Xe="si32",Lt="ur16",$t="ui32",In="fl32",Et="fl64",kt=N+F.length,Ai=Object.prototype.toString;function nl(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 _p(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+=ye: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 vp(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=nl(b);switch(m){case F:return w;case _e:return p([w],{type:S});case we:return new Int8Array(w);case ye: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:_p,deserialize:vp,stringToBuffer:nl,bufferToString:fs};function rl(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){rl(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):rl(j,b,function(){j.executeSql(m,S,x,w)},w)},w):w(R,V)},w)}function Ep(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 bp(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 il(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(il.apply(x,[f,j,m,S-1]));return}V(Ce)}})})}).catch(V)});return C(w,m),w}function wp(f,b,m){return il.apply(this,[f,b,m,1])}function Cp(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 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,"DELETE FROM "+w.storeName,[],function(){S()},function(V,j){x(j)})})}).catch(x)});return C(m,f),m}function Ip(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 xp(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 Tp(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 Op(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 Dp(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(Op(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 Ap={_driver:"webSQLStorage",_initStorage:yp,_support:h(),iterate:bp,getItem:Ep,setItem:wp,removeItem:Cp,clear:Sp,length:Ip,key:xp,keys:Tp,dropInstance:Dp};function Np(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function ol(f,b){var m=f.name+"/";return f.storeName!==b.storeName&&(m+=f.storeName+"/"),m}function Rp(){var f="_localforage_support_test";try{return localStorage.setItem(f,!0),localStorage.removeItem(f),!1}catch{return!0}}function Mp(){return!Rp()||localStorage.length>0}function Pp(f){var b=this,m={};if(f)for(var S in f)m[S]=f[S];return m.keyPrefix=ol(f,b._defaultConfig),Mp()?(b._dbInfo=m,m.serializer=ps,E.resolve()):E.reject()}function Lp(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 kp(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 Fp(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 Vp(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 Bp(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 Up(f){var b=this,m=b.keys().then(function(S){return S.length});return C(m,f),m}function Hp(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 jp(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 $p(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(ol(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 Gp={_driver:"localStorageWrapper",_initStorage:Pp,_support:Np(),iterate:Fp,getItem:kp,setItem:jp,removeItem:Hp,clear:Lp,length:Up,key:Vp,keys:Bp,dropInstance:$p},Wp=function(b,m){return b===m||typeof b=="number"&&typeof m=="number"&&isNaN(b)&&isNaN(m)},Yp=function(b,m){for(var S=b.length,x=0;x<S;){if(Wp(b[x],m))return!0;x++}return!1},sl=Array.isArray||function(f){return Object.prototype.toString.call(f)==="[object Array]"},qr={},al={},hr={INDEXEDDB:me,WEBSQL:Ap,LOCALSTORAGE:Gp},zp=[hr.INDEXEDDB._driver,hr.WEBSQL._driver,hr.LOCALSTORAGE._driver],Ni=["dropInstance"],hs=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(Ni),Kp={description:"",driver:zp.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function Xp(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)&&(sl(b[m])?arguments[0][m]=b[m].slice():arguments[0][m]=b[m])}return arguments[0]}var qp=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({},Kp),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=!Yp(Ni,ke);if((Ve||m[ke])&&typeof m[ke]!="function"){V($);return}}var rt=function(){for(var Zr=function(Qp){return function(){var eh=new Error("Method "+Qp+" is not implemented by the current driver"),cl=E.reject(eh);return C(cl,arguments[arguments.length-1]),cl}},gs=0,Jp=Ni.length;gs<Jp;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,al[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;sl(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!!al[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++)Xp(this,hs[m])},f.prototype.createInstance=function(m){return new f(m)},f}(),Zp=new qp;i.exports=Zp},{3:3}]},{},[4])(4)})});var nh={schedule(t,e){let n=setTimeout(t,e);return()=>clearTimeout(n)}};function rh(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function ih(t){return!!t&&t.nodeType===Node.ELEMENT_NODE}var As;function oh(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 sh(t){let e={};return t.forEach(({propName:n,templateName:r,transform:i})=>{e[rh(r)]=[n,i]}),e}function ah(t,e){return e.get(bs).resolveComponentFactory(t).inputs}function ch(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=lh(c,e,i);u!==-1&&r[u].push(c)}return r}function lh(t,e,n){let r=n;return ih(t)&&e.some((i,o)=>i!=="*"&&oh(t,i)?(r=o,!0):!1),r}var uh=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 fl(1);events=this.eventEmitters.pipe(bl(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(Sl),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=nh.schedule(()=>{this.componentRef!==null&&(this.componentRef.destroy(),this.componentRef=null)},uh))})}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=ch(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 ul(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 Kl(t,e){let n=ah(t,e.injector),r=e.strategyFactory||new Ns(t,e.injector),i=sh(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 Xl="9.12.5";var Ye=class t{static SDK_VERSION=Xl;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(Zl());var _t=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 Jl(t=Ye.LOG_PREFIX){Bt.default.useDefaults({formatter:function(n){n.unshift(`${t} (v${Ye.SDK_VERSION}):`)}});let e=fh();(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 fh(){return new URL(location.href).searchParams?.get("cooee-debug")}var Xr=Ri(Ps());var eu={providers:[Ll()]};var hh={"[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"},$0=Ie(D({},hh),{"[class.ng-submitted]":"isSubmitted"});var mh=new Qt("",{providedIn:"root",factory:()=>ru}),ru="always";var gh=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=Gn({type:t});static \u0275inj=jn({})}return t})();var iu=(()=>{class t{static withConfig(n){return{ngModule:t,providers:[{provide:mh,useValue:n.callSetDisabledState??ru}]}}static \u0275fac=function(r){return new(r||t)};static \u0275mod=Gn({type:t});static \u0275inj=jn({imports:[gh]})}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(){_t.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(){_t.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&&Dl(r.classes)},inputs:{triggerContext:"triggerContext"},outputs:{cooeeEvent:"cooeeEvent",cooeeCTA:"cooeeCTA"},decls:0,vars:0,template:function(n,r){},encapsulation:2})};var _h=(t,e,n)=>({"--option-color":t,"background-color":e,color:n}),ou=(t,e)=>e.id;function vh(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,vh,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",Rl(9,_h,i?s:"",i?s:"",i?"transparent":"")),xn("data-value",s),W(),Ae(i?-1:2)}}function Eh(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,ou),q()()),t&2){let n=e.$implicit,r=J();Al("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=Il.required();selectedOptions=Wt({});options=Ui(()=>{let e=this.item();return!e.options||e.vars.length===1?[]: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,Eh,9,6,"div",0,ou),n&2&&Ze(r.options())},dependencies:[Ul,Vl,iu],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 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
|
|
12
|
-
`);for(let c=r;c<s.length;c++){let u=s[c];if(u.length>1024)continue;let d=
|
|
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
14
|
Name: ${Kt(r)}
|
|
15
|
-
Error:`,i)}}function Zs(t){let e="console";Ot(e,t),Dt(e,
|
|
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 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:Hh(r)}function Hh(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 jh={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 jh[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||yn(),discarded_events:t}];return En(e?{dsn:e}:{},[r])}function Ou(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 Du(t,e){return t[e]||t.all||0}function ma(t,e,n=Date.now()){return Du(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+Ou(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 va="_sentrySpan";function ya(t,e){e?Tt(t,va,e):delete t[va]}function Ea(t){return t[va]}var Wh=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,ya(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 yt?[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,ya(this,void 0),this._attachments=[],this._propagationContext=uo(),this._notifyScopeListeners(),this}addBreadcrumb(e,n){let r=typeof n=="number"?n:Wh;if(r<=0)return this;let i=D({timestamp:yn()},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)}},yt=ba;function Au(){return Sr("defaultCurrentScope",()=>new yt)}function Nu(){return Sr("defaultIsolationScope",()=>new yt)}var wa=class{constructor(e,n){let r;e?r=e:r=new yt;let i;n?i=n:i=new yt,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(Au(),Nu())}function Yh(t){return Or().withScope(t)}function zh(t,e){let n=Or();return n.withScope(()=>(n.getStackTop().scope=t,e(t)))}function Ru(t){return Or().withScope(()=>t(Or().getIsolationScope()))}function Mu(){return{withIsolationScope:Ru,withScope:Yh,withSetScope:zh,withSetIsolationScope:(t,e)=>Ru(e),getCurrentScope:()=>Or().getScope(),getIsolationScope:()=>Or().getIsolationScope()}}function po(t){let e=di(t);return e.acs?e.acs:Mu()}function tr(){let t=er();return po(t).getCurrentScope()}function nr(){let t=er();return po(t).getIsolationScope()}function ho(){return Sr("globalScope",()=>new yt)}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 Kh="_sentryMetrics";function Pu(t){let e=t[Kh];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 Xh=1;function Fu(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 Lu(t){return typeof t=="number"?ku(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?ku(t.getTime()):Ht()}function ku(t){return t>9999999999?t/1e3:t}function rr(t){if(Zh(t))return t.getSpanJSON();try{let{spanId:e,traceId:n}=t.spanContext();if(qh(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:Lu(i),timestamp:Lu(s)||void 0,status:Jh(u),op:r[Ia],origin:r[xa],_metrics_summary:Pu(t)})}return{span_id:e,trace_id:n}}catch{return{}}}function qh(t){let e=t;return!!e.attributes&&!!e.startTime&&!!e.name&&!!e.endTime&&!!e.status}function Zh(t){return typeof t.getSpanJSON=="function"}function Vu(t){let{traceFlags:e}=t.spanContext();return e===Xh}function Jh(t){if(!(!t||t.code===0))return t.code===1?"ok":t.message||"unknown_error"}var Qh="_sentryRootSpan";function pi(t){return t[Qh]||t}var go="production";var em="_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 Bu(t){let e=Ke();if(!e)return{};let n=Ta(rr(t).trace_id||"",e),r=pi(t),i=r[em];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(Vu(r)),e.emit("createDsc",n,r),n}function Uu(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 tm(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 Hu(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 ju(t,e,n,r){let i=lo(n),o=t.type&&t.type!=="replay_event"?t.type:"event";tm(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 $u(t,e){let{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:o}=e;nm(t,e),r&&om(t,r),sm(t,n),rm(t,i),im(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 nm(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 rm(t,e){let n=[...t.breadcrumbs||[],...e];t.breadcrumbs=n.length?n:void 0}function im(t,e){t.sdkProcessingMetadata=D(D({},t.sdkProcessingMetadata),e)}function om(t,e){t.contexts=D({trace:Fu(e)},t.contexts),t.sdkProcessingMetadata=D({dynamicSamplingContext:Bu(e)},t.sdkProcessingMetadata);let n=pi(e),r=rr(n).description;r&&!t.transaction&&t.type==="transaction"&&(t.transaction=r)}function sm(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 Wu(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||yn()}),d=n.integrations||t.integrations.map(L=>L.name);am(u,t),um(u,d),i&&i.emit("applyFrameMetadata",e),e.type===void 0&&cm(u,t.stackParser);let g=fm(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),$u(u,E);let O=[...p,...E.eventProcessors];return _o(O,u,n).then(L=>(L&&lm(L),typeof s=="number"&&s>0?dm(L,s,c):L))}function am(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 Gu=new WeakMap;function cm(t,e){let n=ge._sentryDebugIds;if(!n)return;let r,i=Gu.get(e);i?r=i:(r=new Map,Gu.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 lm(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 um(t,e){e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}function dm(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 fm(t,e){if(!e)return t;let n=t?t.clone():new yt;return n.update(e),n}function Yu(t){if(t)return pm(t)?{captureContext:t}:mm(t)?{captureContext:t}:t}function pm(t){return t instanceof yt||typeof t=="function"}var hm=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function mm(t){return Object.keys(t).some(e=>hm.includes(e))}function vo(t,e){return tr().captureException(t,Yu(e))}function mi(t,e){return tr().captureEvent(t,e)}var gm="7";function _m(t){let e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}function vm(t){return`${_m(t)}${t.projectId}/envelope/`}function ym(t,e){return zs(D({sentry_key:t.publicKey,sentry_version:gm},e&&{sentry_client:`${e.name}/${e.version}`}))}function Ku(t,e,n){return e||`${vm(t)}?${ym(t,n)}`}var Xu=[];function qu(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,Xu.indexOf(e.name)===-1&&typeof e.setupOnce=="function"&&(e.setupOnce(),Xu.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 Zu="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=Ku(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(Zu),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(Zu),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=ju(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=Hu(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=qu(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),Wu(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=Ju(e),u=e.type||"error",d=`before send for type \`${u}\``,g=typeof o>"u"?void 0:Uu(o);if(c&&typeof g=="number"&&Math.random()>g)return this.recordDroppedEvent("sample_rate","error",e),Bn(new vt(`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 vt("An event processor returned `null`, will not send event.","log");if(n.data&&n.data.__sentry__===!0)return O;let L=bm(this,i,O,n);return Em(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 vt(`${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 vt?O:(this.captureException(O,{data:{__sentry__:!0},originalException:O}),new vt(`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
|
|
19
|
-
Event: ${an(t)}`),!0):
|
|
20
|
-
Event: ${an(t)}`),!0):
|
|
21
|
-
Event: ${an(t)}`),!0):
|
|
22
|
-
Event: ${an(t)}`),!0):
|
|
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
23
|
Event: ${an(t)}.
|
|
24
|
-
Url: ${bo(t)}`),!0):
|
|
24
|
+
Url: ${bo(t)}`),!0):Mm(t,e.allowUrls)?!1:(Be&&se.warn(`Event dropped due to not being matched by \`allowUrls\` option.
|
|
25
25
|
Event: ${an(t)}.
|
|
26
|
-
Url: ${bo(t)}`),!0)}function Nm(t,e){return t.type||!e||!e.length?!1:Lm(t).some(n=>Cr(n,e))}function Rm(t,e){if(t.type!=="transaction"||!e||!e.length)return!1;let n=t.transaction;return n?Cr(n,e):!1}function Mm(t,e){if(!e||!e.length)return!1;let n=bo(t);return n?Cr(n,e):!1}function Pm(t,e){if(!e||!e.length)return!0;let n=bo(t);return n?Cr(n,e):!0}function Lm(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 km(t){try{return t.exception.values[0].type==="SentryError"}catch{}return!1}function Fm(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?Fm(e):null}catch{return Be&&se.error(`Cannot extract url for event ${an(t)}`),null}}function Vm(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 Bm="Dedupe",Um=()=>{let t;return{name:Bm,processEvent(e){if(e.type)return e;try{if(Hm(e,t))return Be&&se.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return t=e}}},Co=Um;function Hm(t,e){return e?!!(jm(t,e)||$m(t,e)):!1}function jm(t,e){let n=t.message,r=e.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!id(t,e)||!rd(t,e))}function $m(t,e){let n=nd(e),r=nd(t);return!(!n||!r||n.type!==r.type||n.value!==r.value||!id(t,e)||!rd(t,e))}function rd(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 id(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 nd(t){return t.exception&&t.exception.values&&t.exception.values[0]}var tt=ge,Ma=0;function Pa(){return Ma>0}function ng(){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 ng(),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)),vo(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:ag(e)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function rg(t,e,n,r){let i=Ke(),o=i&&i.getOptions().normalizeDepth,s=ug(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:cg(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=og(e),i=sg(e);try{return t(n,r,i)}catch{}return[]}var ig=/Minified React error #\d+;/i;function og(t){return t&&ig.test(t.message)?1:0}function sg(t){return typeof t.framesToPop=="number"?t.framesToPop:0}function ag(t){let e=t&&t.message;return e?e.error&&typeof e.error.message=="string"?e.error.message:e:"No error message"}function cd(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 ld(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=rg(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 cg(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 \`${lg(t)}\` (type=${t.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function lg(t){try{let e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch{}}function ug(t){for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e)){let n=t[e];if(n instanceof Error)return n}}function ud(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=dg(t);return En(i,[o])}function dg(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 cd(this._options.stackParser,e,n,this._options.attachStacktrace)}eventFromMessage(e,n="info",r){return ld(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=ud(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 dd=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var st=ge;var fg=1e3,fd,Va,Ba;function Ua(t){let e="dom";Ot(e,t),Dt(e,pg)}function pg(){if(!st.document)return;let t=ct.bind(null,"dom"),e=pd(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=pd(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 hg(t){if(t.type!==Va)return!1;try{if(!t.target||t.target._sentryId!==Ba)return!1}catch{}return!0}function mg(t,e){return t!=="keypress"?!1:!e||!e.tagName?!0:!(e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable)}function pd(t,e=!1){return n=>{if(!n||n._sentryCaptured)return;let r=gg(n);if(mg(n.type,r))return;Tt(n,"_sentryCaptured",!0),r&&!r._sentryId&&Tt(r,"_sentryId",pt());let i=n.type==="keypress"?"input":n.type;hg(n)||(t({event:n,name:i,global:e}),Va=n.type,Ba=r?r._sentryId:void 0),clearTimeout(fd),fd=st.setTimeout(()=>{Ba=void 0,Va=void 0},fg)}}function gg(t){try{return t.target}catch{return null}}var xo;function Ha(t){let e="history";Ot(e,t),Dt(e,_g)}function _g(){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){dd&&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,vg)}function vg(){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 yo(t,i)}var Eg=30;var bg=50;function Wa(t,e,n,r){let i={filename:t,function:e==="<anonymous>"?vn:e,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}var wg=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Cg=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Sg=/\((\S*)(?::(\d+))(?::(\d+))\)/,Ig=t=>{let e=wg.exec(t);if(e){let[,r,i,o]=e;return Wa(r,vn,+i,+o)}let n=Cg.exec(t);if(n){if(n[2]&&n[2].indexOf("eval")===0){let s=Sg.exec(n[2]);s&&(n[2]=s[1],n[3]=s[2],n[4]=s[3])}let[i,o]=_d(n[1]||vn,n[2]);return Wa(o,i,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},hd=[Eg,Ig],xg=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Tg=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Og=t=>{let e=xg.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){let o=Tg.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]||vn;return[i,r]=_d(i,r),Wa(r,i,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}},md=[bg,Og];var gd=[hd,md],Ya=qs(...gd),_d=(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]:vn,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]};var Do=1024,Ag="Breadcrumbs",Ng=(t={})=>{let e=D({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},t);return{name:Ag,setup(n){e.console&&Zs(Pg(n)),e.dom&&Ua(Mg(n,e.dom)),e.xhr&&$a(Lg(n)),e.fetch&&ta(kg(n)),e.history&&Ha(Fg(n)),e.sentry&&n.on("beforeSendEvent",Rg(n))}}},vd=Ng;function Rg(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 Mg(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=Vg(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 Pg(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 Lg(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 kg(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 Fg(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 Vg(t){return!!t&&!!t.target}var Bg=["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"],Ug="BrowserApiErrors",Hg=(t={})=>{let e=D({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},t);return{name:Ug,setupOnce(){e.setTimeout&&ze(tt,"setTimeout",yd),e.setInterval&&ze(tt,"setInterval",yd),e.requestAnimationFrame&&ze(tt,"requestAnimationFrame",jg),e.XMLHttpRequest&&"XMLHttpRequest"in tt&&ze(XMLHttpRequest.prototype,"send",$g);let n=e.eventTarget;n&&(Array.isArray(n)?n:Bg).forEach(Gg)}}},Ed=Hg;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 jg(t){return function(e){return t.apply(this,[ir(e,{mechanism:{data:{function:"requestAnimationFrame",handler:Kt(t)},handled:!1,type:"instrument"}})])}}function $g(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 Gg(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 Wg="GlobalHandlers",Yg=(t={})=>{let e=D({onerror:!0,onunhandledrejection:!0},t);return{name:Wg,setupOnce(){Error.stackTraceLimit=50},setup(n){e.onerror&&(zg(n),bd("onerror")),e.onunhandledrejection&&(Kg(n),bd("onunhandledrejection"))}}},wd=Yg;function zg(t){na(e=>{let{stackParser:n,attachStacktrace:r}=Cd();if(Ke()!==t||Pa())return;let{msg:i,url:o,line:s,column:c,error:u}=e,d=Zg(Io(n,u||i,void 0,r,!1),o,s,c);d.level="error",mi(d,{originalException:u,mechanism:{handled:!1,type:"onerror"}})})}function Kg(t){ra(e=>{let{stackParser:n,attachStacktrace:r}=Cd();if(Ke()!==t||Pa())return;let i=Xg(e),o=Zn(i)?qg(i):Io(n,i,void 0,r,!0);o.level="error",mi(o,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function Xg(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 qg(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}function Zg(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:vn,in_app:!0,lineno:g}),t}function bd(t){Pn&&se.log(`Global Handler attached: ${t}`)}function Cd(){let t=Ke();return t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}var Sd=()=>({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 Jg="cause",Qg=5,e_="LinkedErrors",t_=(t={})=>{let e=t.limit||Qg,n=t.key||Jg;return{name:e_,preprocessEvent(r,i,o){let s=o.getOptions();js(So,s.stackParser,s.maxValueLength,n,e,r,i)}}},Id=t_;function za(t){return[wo(),Eo(),Ed(),vd(),wd(),Id(),Co(),Sd()]}var Ka=class extends Error{cause;constructor(e,n){super(e),this.cause=n}},Ao=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){_t.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){_t.error(e,n);let o=this.getNewScope(r,i),s=new Ka(e,n);o.captureException(s)}setGlobalContext(e,n){this.contexts[e]=D({context:n},this.contexts[e])}setUser(e){this.user=e}setTags(e){this.tags=e}getNewScope(e,n){let r=new yt;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",xd()),r}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 qa=Ri(Od());function No(t){return qa.default.createInstance({name:"lc",storeName:t,driver:qa.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 Za=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 yr(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||_t.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(n_(),{style:"currency",currency:o||i,minimumFractionDigits:0,maximumFractionDigits:2})}catch(d){return Ao.getInstance().captureException(d,{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 n_(){return navigator.languages!==void 0?navigator.languages[0].split("-")[0]:navigator.language??"en"}var Po;function xd(){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 Dd=(()=>{class t{static entityMap={'"':"""};static escapeHtml(n){return String(n).replace(/"/g,r=>t.entityMap[r])}}return t})();var r_=Object.prototype.toString,Mr=Array.isArray||function(e){return r_.call(e)==="[object Array]"};function Qa(t){return typeof t=="function"}function i_(t){return Mr(t)?"array":typeof t}function Ja(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Ad(t,e){return t!=null&&typeof t=="object"&&e in t}function o_(t,e){return t!=null&&typeof t!="object"&&t.hasOwnProperty&&t.hasOwnProperty(e)}var s_=RegExp.prototype.test;function a_(t,e){return s_.call(t,e)}var c_=/\S/;function l_(t){return!a_(c_,t)}var u_={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};function d_(t){return String(t).replace(/[&<>"'`=\/]/g,function(n){return u_[n]})}var f_=/\s*/,p_=/\s+/,Nd=/\s*=/,h_=/\s*\}/,m_=/#|\^|\/|>|\{|&|=|!/;function g_(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(p_,2)),!Mr(te)||te.length!==2)throw new Error("Invalid tags: "+te);p=new RegExp(Ja(te[0])+"\\s*"),E=new RegExp("\\s*"+Ja(te[1])),C=new RegExp("\\s*"+Ja("}"+te[1]))}O(e||qt.tags);for(var M=new yi(t),L,H,Y,oe,z,ve;!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),l_(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(
|
|
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={'"':"""};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_={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};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
|
-
`)};At.prototype.renderPartial=function(e,n,r,i){if(r){var o=this.getConfigTags(i),s=
|
|
30
|
-
`);try{v=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(v)}return v}}(),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(v,y){return y?y(v):v}function M(v){return v!=null}function L(v,y,U){return O(v&&M(v[y])?v[y]:C[y],U)}function H(v){return v<0?0:Math.floor(v)}function Y(v,y){return Math.floor(Math.random()*(y-v))+v}function oe(v){return parseInt(v,16)}function z(v){return v.map(ve)}function ve(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:oe(y.substring(0,2)),g:oe(y.substring(2,4)),b:oe(y.substring(4,6))}}function B(v){var y=L(v,"origin",Object);return y.x=L(y,"x",Number),y.y=L(y,"y",Number),y}function fe(v){v.width=document.documentElement.clientWidth,v.height=document.documentElement.clientHeight}function te(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 Me(v,y,U,Z,ne,ie,ue,Q,ae){v.save(),v.translate(y,U),v.rotate(ie),v.scale(Z,ne),v.arc(0,0,1,ue,Q,ae),v.restore()}function xe(v){var y=v.angle*(Math.PI/180),U=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*U-Math.random()*U),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 Oe(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 U=y.tick++/y.totalTicks,Z=y.x+y.random*y.tiltCos,ne=y.y+y.random*y.tiltSin,ie=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-U)+")",v.beginPath(),s&&y.shape.type==="path"&&typeof y.shape.path=="string"&&Array.isArray(y.shape.matrix))v.fill(T(y.shape.path,y.shape.matrix,y.x,y.y,Math.abs(ie-Z)*.1,Math.abs(ue-ne)*.1,Math.PI/10*y.wobble));else if(y.shape.type==="bitmap"){var Q=Math.PI/10*y.wobble,ae=Math.abs(ie-Z)*.1,ee=Math.abs(ue-ne)*.1,de=y.shape.bitmap.width*y.scalar,ce=y.shape.bitmap.height*y.scalar,pe=new DOMMatrix([Math.cos(Q)*ae,Math.sin(Q)*ae,-Math.sin(Q)*ee,Math.cos(Q)*ee,y.x,y.y]);pe.multiplySelf(new DOMMatrix(y.shape.matrix));var he=v.createPattern(g.transform(y.shape.bitmap),"no-repeat");he.setTransform(pe),v.globalAlpha=1-U,v.fillStyle=he,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(ie-Z)*y.ovalScalar,Math.abs(ue-ne)*y.ovalScalar,Math.PI/10*y.wobble,0,2*Math.PI):Me(v,y.x,y.y,Math.abs(ie-Z)*y.ovalScalar,Math.abs(ue-ne)*y.ovalScalar,Math.PI/10*y.wobble,0,2*Math.PI);else if(y.shape==="star")for(var me=Math.PI/2*3,h=4*y.scalar,a=8*y.scalar,l=y.x,_=y.y,I=5,N=Math.PI/I;I--;)l=y.x+Math.cos(me)*a,_=y.y+Math.sin(me)*a,v.lineTo(l,_),me+=N,l=y.x+Math.cos(me)*h,_=y.y+Math.sin(me)*h,v.lineTo(l,_),me+=N;else v.moveTo(Math.floor(y.x),Math.floor(y.y)),v.lineTo(Math.floor(y.wobbleX),Math.floor(ne)),v.lineTo(Math.floor(ie),Math.floor(ue)),v.lineTo(Math.floor(Z),Math.floor(y.wobbleY));return v.closePath(),v.fill(),y.tick<y.totalTicks}function Ge(v,y,U,Z,ne){var ie=y.slice(),ue=v.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=v.width=i.width,Z.height=v.height=i.height),!Z.width&&!Z.height&&(U(v),Z.width=v.width,Z.height=v.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:v,promise:ee,reset:function(){Q&&p.cancel(Q),ae&&ae()}}}function We(v,y){var U=!v,Z=!!L(y||{},"resize"),ne=!1,ie=L(y,"disableForReducedMotion",Boolean),ue=o&&!!L(y||{},"useWorker"),Q=ue?E():null,ae=U?fe:te,ee=v&&Q?!!v.__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),ye=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=v.width*$t.x,Ai=v.height*$t.y;In--;)Et.push(xe({x:kt,y:Ai,angle:_,spread:I,startVelocity:N,color:ye[In%ye.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(v,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?v=ce.canvas:U&&!v&&(v=Ee(a),document.body.appendChild(v)),Z&&!ee&&ae(v);var l={width:v.width,height:v.height};Q&&!ee&&Q.init(v),ee=!0,Q&&(v.__confetti_initialized=!0);function _(){if(Q){var N={getBoundingClientRect:function(){if(!U)return v.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&&v&&(document.body.contains(v)&&document.body.removeChild(v),v=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(v,y,U,Z,ne,ie,ue){var Q=new Path2D(v),ae=new Path2D;ae.addPath(Q,new DOMMatrix(y));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(v){if(!s)throw new Error("path confetti are not supported in this browser");var y,U;typeof v=="string"?y=v:(y=v.path,U=v.matrix);var Z=new Path2D(y),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:y,matrix:U}}function P(v){var y,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 v=="string"?y=v:(y=v.text,U="scalar"in v?v.scalar:U,ne="fontFamily"in v?v.fontFamily:ne,Z="color"in v?v.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(y),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(y,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||{}}(),tc,!1);var Rd=tc.exports,bT=tc.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 Rd(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 E_(t,e){if(t&1&&(Se(0,"div",7),gt(1,"safeHtml")),t&2){let n=J().$implicit;be("innerHTML",St(1,1,n.minValue+" Products"),en)}}function b_(t,e){if(t&1&&(Se(0,"div",7),gt(1,"cooeeCurrency"),gt(2,"safeHtml")),t&2){let n=J().$implicit;be("innerHTML",St(2,3,St(1,1,n.minValue)),en)}}function w_(t,e){if(t&1&&(X(0,"li",6)(1,"div"),De(2,E_,2,3,"div",7)(3,b_,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 C_(t,e){if(t&1&&(Pt(0)(1),Se(2,"div",0),gt(3,"cooeeDynamicVariables"),gt(4,"safeHtml"),X(5,"div",1)(6,"ul",2)(7,"div",3),Se(8,"div",4),q(),qe(9,w_,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,Ml(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=>_t.error(e))}async calculateMilestones(){let e=this.engagementTrigger,n=this.progressBarConfig;if(!n?.milestones?.length){_t.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;_t.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,C_,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
|
|
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,Md.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,T_,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,D_,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 Vd,je,Bd,ac,ar,Pd,Ud,rc,Hd,cc,ic,oc,A_,sc={},jd=[],N_=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,lc=Array.isArray;function Un(t,e){for(var n in e)t[n]=e[n];return t}function uc(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function nc(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??++Bd,__i:-1,__u:0};return i==null&&je.vnode!=null&&je.vnode(o),o}function dc(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 $d(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 $d(t)}}function Ld(t){(!t.__d&&(t.__d=!0)&&ar.push(t)&&!Uo.__r++||Pd!==je.debounceRendering)&&((Pd=je.debounceRendering)||Ud)(Uo)}function Uo(){var t,e,n,r,i,o,s,c;for(ar.sort(rc);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),Yd(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,P_(s,r,c),r.__e!=o&&$d(r)),ar.length>e&&ar.sort(rc));Uo.__r=0}function Gd(t,e,n,r,i,o,s,c,u,d,g){var p,E,C,O,M,L,H=r&&r.__k||jd,Y=e.length;for(u=R_(n,e,H,u,Y),p=0;p<Y;p++)(C=n.__k[p])!=null&&(E=C.__i===-1?sc:H[C.__i]||sc,C.__i=p,L=Yd(t,C,E,i,o,s,c,u,d,g),O=C.__e,C.ref&&E.ref!=C.ref&&(E.ref&&fc(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=Wd(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 R_(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?nc(null,s,null,null,null):lc(s)?nc(dc,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?nc(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=M_(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)),zd(c,c));return r}function Wd(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=Wd(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 M_(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 kd(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||N_.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||kd(t.style,e,"");if(n)for(e in n)r&&n[e]===r[e]||kd(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")o=e!=(e=e.replace(Hd,"$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=cc,t.addEventListener(e,o?oc:ic,o)):t.removeEventListener(e,o?oc:ic,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 Fd(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=cc++;else if(e.t<n.u)return;return n(je.event?je.event(e):e)}}}function Yd(t,e,n,r,i,o,s,c,u,d){var g,p,E,C,O,M,L,H,Y,oe,z,ve,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=k_),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)}),ve=0;ve<p._sb.length;ve++)p.__h.push(p._sb[ve]);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=Gd(t,lc(Ee=g!=null&&g.type===dc&&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--;)uc(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=L_(n.__e,e,n,r,i,o,s,u,d);return(g=je.diffed)&&g(e),128&e.__u?void 0:c}function P_(t,e,n){for(var r=0;r<n.length;r++)fc(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 L_(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&&Vd.call(t.childNodes),L=n.props||sc,!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=""),Gd(t,lc(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--;)uc(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 fc(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 zd(t,e,n){var r,i;if(je.unmount&&je.unmount(t),(r=t.ref)&&(r.current&&r.current!==t.__e||fc(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]&&zd(r[i],e,n||typeof t.type!="function");n||uc(t.__e),t.__c=t.__=t.__e=void 0}function k_(t,e,n){return this.constructor(t,n)}Vd=jd.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}},Bd=0,ac=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),Ld(this))},Pr.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),Ld(this))},Pr.prototype.render=dc,ar=[],Ud=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,rc=function(t,e){return t.__v.__b-e.__v.__b},Uo.__r=0,Hd=/(PointerCapture)$|Capture$/i,cc=0,ic=Fd(!1),oc=Fd(!0),A_=0;var hc,jt,pc,Kd,Xd=0,rf=[],lt=je,qd=lt.__b,Zd=lt.__r,Jd=lt.diffed,Qd=lt.__c,ef=lt.unmount,tf=lt.__;function F_(t,e){lt.__h&<.__h(jt,t,Xd||e),Xd=0;var n=jt.__H||(jt.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function gc(t,e){var n=F_(hc++,7);return U_(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function V_(){for(var t;t=rf.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(Ho),t.__H.__h.forEach(mc),t.__H.__h=[]}catch(e){t.__H.__h=[],lt.__e(e,t.__v)}}lt.__b=function(t){jt=null,qd&&qd(t)},lt.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),tf&&tf(t,e)},lt.__r=function(t){Zd&&Zd(t),hc=0;var e=(jt=t.__c).__H;e&&(pc===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(mc),e.__h=[],hc=0)),pc=jt},lt.diffed=function(t){Jd&&Jd(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(rf.push(e)!==1&&Kd===lt.requestAnimationFrame||((Kd=lt.requestAnimationFrame)||B_)(V_)),e.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.i=void 0})),pc=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.__||mc(r)})}catch(r){e.some(function(i){i.__h&&(i.__h=[])}),e=[],lt.__e(r,n.__v)}}),Qd&&Qd(t,e)},lt.unmount=function(t){ef&&ef(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&<.__e(e,n.__v))};var nf=typeof requestAnimationFrame=="function";function B_(t){var e,n=function(){clearTimeout(r),nf&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);nf&&(e=requestAnimationFrame(n))}function Ho(t){var e=jt,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),jt=e}function mc(t){var e=jt;t.__c=t.__(),jt=e}function U_(t,e){return!t||t.length!==e.length||e.some(function(n,r){return n!==t[r]})}var H_=Symbol.for("preact-signals");function vc(){if(kr>1)kr--;else{for(var t,e=!1;Ei!==void 0;){var n=Ei;for(Ei=void 0,_c++;n!==void 0;){var r=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&sf(n))try{n.c()}catch(i){e||(t=i,e=!0)}n=r}}if(_c=0,kr--,e)throw t}}var $e=void 0;var Ei=void 0,kr=0,_c=0,jo=0;function of(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=H_;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=of(this);return t!==void 0&&(t.i=this.i),this.v},set:function(t){if(t!==this.v){if(_c>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{vc()}}}});function bi(t){return new ht(t)}function sf(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 af(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 cf(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&&!sf(this))return this.f&=-2,!0;var t=$e;try{af(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,cf(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=of(this);if(this.h(),t!==void 0&&(t.i=this.i),16&this.f)throw this.v;return this.v}});function lf(t){return new Fr(t)}function uf(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,vc()}}}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,uf(t)}function j_(t){if($e!==this)throw new Error("Out-of-order effect");cf(this),$e=t,this.f&=-2,8&this.f&&yc(this),vc()}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,uf(this),af(this),kr++;var t=$e;return $e=this,j_.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 bc,Ec;function Vr(t,e){je[t]=e.bind(null,je[t]||function(){})}function Go(t){Ec&&Ec(),Ec=t&&t.S()}function df(t){var e=this,n=t.data,r=G_(n);r.value=n;var i=gc(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(),ac(u)||((s=e.base)==null?void 0:s.nodeType)!==3?(e.__$f|=1,e.setState({})):e.base.data=u},lf(function(){var s=r.value.value;return s===0?0:s===!0?"":s||""})},[]);return i.value}df.displayName="_st";Object.defineProperties(ht.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:df},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}())),bc=r,Go(n),t(e)});Vr("__e",function(t,e,n,r){Go(),bc=void 0,t(e,n,r)});Vr("diffed",function(t,e){Go(),bc=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=$_(n,u,g,i),o[u]=d):d.o(g,i)}}}t(e)});function $_(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 G_(t){return gc(function(){return bi(t)},[])}var wc=(i=>(i.SIMPLE="SIMPLE",i.SWIPER="SWIPER",i.STORY="STORY",i.FLOATING_POPUP="FLOATING_POPUP",i))(wc||{}),Cc=(r=>(r.ON="ON",r.OFF="OFF",r.ON_HOVER="ON_HOVER",r))(Cc||{}),Sc=(r=>(r.FIRST_ITEM="FIRST_ITEM",r.BADGE="BADGE",r.NONE="NONE",r))(Sc||{});function W_(t,e){return e={exports:{}},t(e,e.exports),e.exports}var Y_=q_,z_=J_,K_=tv,Sn=[],Jt=[],X_=typeof Uint8Array<"u"?Uint8Array:Array,Ic="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(cr=0,ff=Ic.length;cr<ff;++cr)Sn[cr]=Ic[cr],Jt[Ic.charCodeAt(cr)]=cr;var cr,ff;Jt[45]=62;Jt[95]=63;function Of(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 q_(t){var e=Of(t),n=e[0],r=e[1];return(n+r)*3/4-r}function Z_(t,e,n){return(e+n)*3/4-n}function J_(t){var e,n=Of(t),r=n[0],i=n[1],o=new X_(Z_(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 Q_(t){return Sn[t>>18&63]+Sn[t>>12&63]+Sn[t>>6&63]+Sn[t&63]}function ev(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(Q_(r));return i.join("")}function tv(t){for(var e,n=t.length,r=n%3,i=[],o=16383,s=0,c=n-r;s<c;s+=o)i.push(ev(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 xc={byteLength:Y_,toByteArray:z_,fromByteArray:K_};var nv=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)},rv=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:nv,write:rv},zo=W_(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),ye=this.slice(I,N),Pe=a.slice(l,_),Le=0;Le<we;++Le)if(ye[Le]!==Pe[Le]){F=ye[Le],_e=Pe[Le];break}return F<_e?-1:_e<F?1:0};function ve(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 ye;if(I){var Pe=-1;for(ye=l;ye<F;ye++)if(we(h,ye)===we(a,Pe===-1?0:ye-Pe)){if(Pe===-1&&(Pe=ye),ye-Pe+1===_e)return Pe*N}else Pe!==-1&&(ye-=ye-Pe),Pe=-1}else for(l+_e>F&&(l=F-_e),ye=l;ye>=0;ye--){for(var Le=!0,Xe=0;Xe<_e;Xe++)if(we(h,ye+Xe)!==we(a,Xe)){Le=!1;break}if(Le)return ye}return-1}s.prototype.includes=function(a,l,_){return this.indexOf(a,l,_)!==-1},s.prototype.indexOf=function(a,l,_){return ve(this,a,l,_,!0)},s.prototype.lastIndexOf=function(a,l,_){return ve(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?xc.fromByteArray(h):xc.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,ye,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],ye=h[I+2],(we&192)===128&&(ye&192)===128&&(Le=(N&15)<<12|(we&63)<<6|ye&63,Le>2047&&(Le<55296||Le>57343)&&(F=Le));break;case 4:we=h[I+1],ye=h[I+2],Pe=h[I+3],(we&192)===128&&(ye&192)===128&&(Pe&192)===128&&(Le=(N&15)<<18|(we&63)<<12|(ye&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 v(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,_||v(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,_||v(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||v(a,1,this.length),this[a]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(a,l){return a=a>>>0,l||v(a,2,this.length),this[a]|this[a+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(a,l){return a=a>>>0,l||v(a,2,this.length),this[a]<<8|this[a+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(a,l){return a=a>>>0,l||v(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||v(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,_||v(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,_||v(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||v(a,1,this.length),this[a]&128?(255-this[a]+1)*-1:this[a]},s.prototype.readInt16LE=function(a,l){a=a>>>0,l||v(a,2,this.length);var _=this[a]|this[a+1]<<8;return _&32768?_|4294901760:_},s.prototype.readInt16BE=function(a,l){a=a>>>0,l||v(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||v(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||v(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||v(a,4,this.length),Br.read(this,a,!0,23,4)},s.prototype.readFloatBE=function(a,l){return a=a>>>0,l||v(a,4,this.length),Br.read(this,a,!1,23,4)},s.prototype.readDoubleLE=function(a,l){return a=a>>>0,l||v(a,8,this.length),Br.read(this,a,!0,52,8)},s.prototype.readDoubleBE=function(a,l){return a=a>>>0,l||v(a,8,this.length),Br.read(this,a,!1,52,8)};function y(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;y(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;y(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,_||y(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,_||y(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,_||y(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,_||y(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,_||y(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);y(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);y(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,_||y(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,_||y(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,_||y(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,_||y(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,_||y(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 xc.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 Nc=function(e,n){return Nc=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])},Nc(e,n)};function Ko(t,e){Nc(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 Df(){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 iv(){var t=Df();return typeof t.navigator=="object"&&t.navigator.product==="ReactNative"}var ov=function(e){var n=iv()?"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},sv=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))}:ov}},Af=sv();function av(t){return["[object ArrayBuffer]","[object SharedArrayBuffer]"].includes(Object.prototype.toString.call(t))}function Mc(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}function cv(t){return Object.prototype.toString.call(t)==="[object RegExp]"}function lv(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(av(t))return Re.from(t);throw new Je("Must use either Buffer or TypedArray")}var uv=/^(?:[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,Nf=function(t){return typeof t=="string"&&uv.test(t)},Rc=function(t){if(!Nf(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")},pf=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),dv=Math.pow(2,53),fv=-Math.pow(2,53);var Rf=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 hf(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=Rc(e.$uuid)),!r)throw new Je("Unexpected Binary Extended JSON format ".concat(JSON.stringify(e)));return i===Rf?new hf(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 Tc=16,hf=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===Tc)i=Yo(n);else if(typeof n=="string")i=Rc(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,Rf)||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=pf(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=pf(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=Af(Tc);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"?Nf(n):Mc(n)?n.length!==Tc?!1:(n[6]&240)===64&&(n[8]&128)===128:!1:!1},e.createFromHexString=function(n){var r=Rc(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 pv(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 mf=65536,hv=1<<24,Hr=mf*mf,Mf=Hr*Hr,gf=Mf/2,_f={},vf={},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=vf[e],i)?i:(r=t.fromBits(e,(e|0)<0?-1:0,!0),o&&(vf[e]=r),r)):(e|=0,(o=-128<=e&&e<128)&&(i=_f[e],i)?i:(r=t.fromBits(e,e<0?-1:0,!1),o&&(_f[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>=Mf)return t.MAX_UNSIGNED_VALUE}else{if(e<=-gf)return t.MIN_VALUE;if(e+1>=gf)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(hv),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 mv=/^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/,gv=/^(\+|-)?(Infinity|inf)$/i,_v=/^(\+|-)?NaN$/i,Ci=6111,Oc=-6176,yf=6176,vv=34,Dc=[124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Ef=[248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),bf=[120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),yv=/^([-+])?(\d+)?$/,Ev=31,wf=16383,bv=30,wv=31;function Cf(t){return!isNaN(parseInt(t,10))}function Cv(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 Sv(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 Iv(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 Pc=function(){function t(e){if(!(this instanceof t))return new t(e);if(typeof e=="string")this.bytes=t.fromString(e).bytes;else if(Mc(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 ve=e.match(mv),B=e.match(gv),fe=e.match(_v);if(!ve&&!B&&!fe||e.length===0)throw new Je(""+e+" not a valid Decimal128 string");if(ve){var te=ve[2],Ee=ve[4],Me=ve[5],xe=ve[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++]==="-"),!Cf(e[z])&&e[z]!=="."){if(e[z]==="i"||e[z]==="I")return new t(Re.from(n?Ef:bf));if(e[z]==="N")return new t(Re.from(Dc))}for(;Cf(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(yv);if(!Oe||!Oe[2])return new t(Re.from(Dc));M=parseInt(Oe[0],10),z=z+Oe[0].length}if(e[z])return new t(Re.from(Dc));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=Oc:M=M-u;M>Ci;){if(O=O+1,O-C>vv){var Ge=g.join("");if(Ge.match(/^0+$/)){M=Ci;break}Ur(e,"overflow")}M=M-1}for(;M<Oc||p<c;){if(O===0&&o<p){M=Oc,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?Ef:bf))}}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=Sv(H,le.fromString("100000000000000000"));k.low=k.low.add(Y),Iv(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 v=Re.alloc(16);return z=0,v[z++]=P.low.low&255,v[z++]=P.low.low>>8&255,v[z++]=P.low.low>>16&255,v[z++]=P.low.low>>24&255,v[z++]=P.low.high&255,v[z++]=P.low.high>>8&255,v[z++]=P.low.high>>16&255,v[z++]=P.low.high>>24&255,v[z++]=P.high.low&255,v[z++]=P.high.low>>8&255,v[z++]=P.high.low>>16&255,v[z++]=P.high.low>>24&255,v[z++]=P.high.high&255,v[z++]=P.high.high>>8&255,v[z++]=P.high.high>>16&255,v[z++]=P.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,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&Ev;if(Y>>3===3){if(Y===bv)return p.join("")+"Infinity";if(Y===wv)return"NaN";e=L>>15&wf,c=8+(L>>14&1)}else c=L>>14&7,e=L>>17&wf;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,ve=Cv(u);if(u=ve.quotient,z=ve.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(Pc.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 Lc=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(Lc.prototype,"_bsontype",{value:"MaxKey"});var kc=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(kc.prototype,"_bsontype",{value:"MinKey"});var xv=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&&xv.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=Af(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&&Mc(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 Tv(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=Tv(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 Fc=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(Fc.prototype,"_bsontype",{value:"Symbol"});var Ov=le,Pf=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}(Ov);function Dv(t){return xi(t)&&Reflect.has(t,"_bsontype")&&typeof t._bsontype=="string"}var Lf=2147483647,kf=-2147483648,Ff=9223372036854776e3,Vf=-9223372036854776e3,Av={$oid:Nt,$binary:dr,$uuid:dr,$symbol:Fc,$numberInt:Jo,$numberDecimal:Pc,$numberDouble:Zo,$numberLong:le,$minKey:kc,$maxKey:Lc,$regex:Ii,$regularExpression:Ii,$timestamp:Pf};function Bf(t,e){if(e===void 0&&(e={}),typeof t=="number"){if(e.relaxed||e.legacy)return t;if(Math.floor(t)===t){if(t>=kf&&t<=Lf)return new Jo(t);if(t>=Vf&&t<=Ff)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=Av[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=Bf(t.$scope)),qo.fromExtendedJSON(t)}if(pv(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 Nv(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 Sf(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:
|
|
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&<.__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&<.__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
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 Nv(t,e);if(t===void 0)return null;if(t instanceof Date||lv(t)){var g=t.getTime(),p=g>-1&&g<2534023188e5;return e.legacy?e.relaxed&&p?{$date:t.getTime()}:{$date:Sf(t)}:e.relaxed&&p?{$date:Sf(t)}:{$date:{$numberLong:t.getTime().toString()}}}if(typeof t=="number"&&(!e.relaxed||!isFinite(t))){if(Math.floor(t)===t){var E=t>=kf&&t<=Lf,C=t>=Vf&&t<=Ff;if(E)return{$numberInt:t.toString()};if(C)return{$numberLong:t.toString()}}return{$numberDouble:t.toString()}}if(t instanceof RegExp||cv(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"?Mv(t,e):t}var Rv={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 Pc(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 Lc},MinKey:function(){return new kc},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 Fc(t.value)},Timestamp:function(t){return Pf.fromBits(t.low,t.high)}};function Mv(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(Dv(t)){var s=t;if(typeof s.toExtendedJSON!="function"){var c=Rv[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 If;(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 Bf(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})(If||(If={}));var xf,Tf=Df();Tf.Map?xf=Tf.Map:xf=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(dv),LO=le.fromNumber(fv);var Ac=new Uint8Array(8),kO=new DataView(Ac.buffer,Ac.byteOffset,Ac.byteLength);var Pv=1024*1024*17,FO=Re.alloc(Pv);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 Lv(t,e){t&1&&(Ft(),Se(0,"path",3))}function kv(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,Lv,1,0,":svg:path",3)(4,kv,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 Fv=t=>({"lc:cursor-grab":t}),Vv=(t,e)=>e.url;function Bv(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,Bv,1,2,"source",11,Vv),q()()),n&2&&(be("ngClass",Bi(3,Fv,r.isDragging))("cdkDragBoundary","body"),W(11),be("muted",!0),W(),Ze(r.video.sources))},dependencies:[Fn,zl],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()}},Vc=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 Vc)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=kl(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 Bc=(()=>{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=vr({type:t,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:[0,"cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[wt]})}return t})();var Oi;function Uv(){if(Oi==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>Oi=!0}))}finally{Oi=Oi||!1}return Oi}function Uf(t){return Uv()?t:!!t.capture}var Hv=new Qt("cdk-input-modality-detector-options"),jv={ignoreKeys:[18,17,224,91,16]},Hf=650,Uc={passive:!0,capture:!0},$v=(()=>{class t{_platform=K(rn);_listenerCleanups;modalityDetected;modalityChanged;get mostRecentModality(){return this._modality.value}_mostRecentTarget=null;_modality=new dl(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<Hf||(this._modality.next($l(n)?"keyboard":"mouse"),this._mostRecentTarget=On(n))};_onTouchstart=n=>{if(Gl(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(Hv,{optional:!0});if(this._options=D(D({},jv),i),this.modalityDetected=this._modality.pipe(yl(1)),this.modalityChanged=this.modalityDetected.pipe(vl()),this._platform.isBrowser){let o=K(_r).createRenderer(null,null);this._listenerCleanups=n.runOutsideAngular(()=>[Dn(o,r,"keydown",this._onKeydown,Uc),Dn(o,r,"mousedown",this._onMousedown,Uc),Dn(o,r,"touchstart",this._onTouchstart,Uc)])}}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||{}),Gv=new Qt("cdk-focus-monitor-default-options"),ns=Uf({passive:!0,capture:!0}),jf=(()=>{class t{_ngZone=K(Mt);_platform=K(rn);_inputModalityDetector=K($v);_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(Gv,{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=jl(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?Hf: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 $f=(()=>{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 jc=(()=>{class t{_platform=K(rn);constructor(){}isDisabled(n){return n.hasAttribute("disabled")}isVisible(n){return Yv(n)&&getComputedStyle(n).visibility==="visible"}isTabbable(n){if(!this._platform.isBrowser)return!1;let r=Wv(ey(n));if(r&&(Gf(r)===-1||!this.isVisible(r)))return!1;let i=n.nodeName.toLowerCase(),o=Gf(n);return n.hasAttribute("contenteditable")?o!==-1:i==="iframe"||i==="object"||this._platform.WEBKIT&&this._platform.IOS&&!Jv(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 Qv(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 Wv(t){try{return t.frameElement}catch{return null}}function Yv(t){return!!(t.offsetWidth||t.offsetHeight||typeof t.getClientRects=="function"&&t.getClientRects().length)}function zv(t){let e=t.nodeName.toLowerCase();return e==="input"||e==="select"||e==="button"||e==="textarea"}function Kv(t){return qv(t)&&t.type=="hidden"}function Xv(t){return Zv(t)&&t.hasAttribute("href")}function qv(t){return t.nodeName.toLowerCase()=="input"}function Zv(t){return t.nodeName.toLowerCase()=="a"}function Wf(t){if(!t.hasAttribute("tabindex")||t.tabIndex===void 0)return!1;let e=t.getAttribute("tabindex");return!!(e&&!isNaN(parseInt(e,10)))}function Gf(t){if(!Wf(t))return null;let e=parseInt(t.getAttribute("tabindex")||"",10);return isNaN(e)?-1:e}function Jv(t){let e=t.nodeName.toLowerCase(),n=e==="input"&&t.type;return n==="text"||n==="password"||e==="select"||e==="textarea"}function Qv(t){return Kv(t)?!1:zv(t)||Xv(t)||t.hasAttribute("contenteditable")||Wf(t)}function ey(t){return t.ownerDocument&&t.ownerDocument.defaultView||window}var Hc=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)}},Yf=(()=>{class t{_checker=K(jc);_ngZone=K(Mt);_document=K(It);_injector=K(Rt);constructor(){K(ni).load($f)}create(n,r=!1){return new Hc(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 $c(){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 zf(t,...e){return e.length?e.some(n=>t[n]):t.altKey||t.shiftKey||t.ctrlKey||t.metaKey}var Kf=Wl(),Gc=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"),Kf&&(r.scrollBehavior=i.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),Kf&&(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 Wc=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(_l(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 Yc(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 Xf(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 zc=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();Yc(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}},ny=(()=>{class t{_scrollDispatcher=K(Yl);_viewportRuler=K(Os);_ngZone=K(Mt);_document=K(It);constructor(){}noop=()=>new is;close=n=>new Wc(this._scrollDispatcher,this._ngZone,this._viewportRuler,n);block=()=>new Gc(this._viewportRuler,this._document);reposition=n=>new zc(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 Kc=class{connectionPair;scrollableViewProperties;constructor(e,n){this.connectionPair=e,this.scrollableViewProperties=n}};var tp=(()=>{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})(),ry=(()=>{class t extends tp{_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})(),iy=(()=>{class t extends tp{_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(qf(c.overlayElement,r)||qf(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 qf(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 np=(()=>{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||$c()){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),$c()?r.setAttribute("platform","test"):this._platform.isBrowser||r.setAttribute("platform","server"),this._document.body.appendChild(r),this._containerElement=r}_loadStyles(){this._styleLoader.load(np)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=mt({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Xc=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(()=>Ol(()=>{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 Xc(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?.()}},Zf="cdk-overlay-connected-position-bounding-box",oy=/([A-Za-z%]+)$/,qc=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(Zf),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(Zf),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=Qf(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=Jf(this._overlayRef.getConfig().minHeight),c=Jf(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=Qf(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||!sy(this._lastScrollVisibility,r)){let i=new Kc(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:Xf(e,r),isOriginOutsideView:Yc(e,r),isOverlayClipped:Xf(n,r),isOverlayOutsideView:Yc(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 Jf(t){if(typeof t!="number"&&t!=null){let[e,n]=t.split(oy);return!n||n==="px"?parseFloat(e):null}return t||null}function Qf(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 sy(t,e){return t===e?!0:t.isOriginClipped===e.isOriginClipped&&t.isOriginOutsideView===e.isOriginOutsideView&&t.isOverlayClipped===e.isOverlayClipped&&t.isOverlayOutsideView===e.isOverlayOutsideView}var ep="cdk-global-overlay-wrapper",Zc=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(ep),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(ep),r.justifyContent=r.alignItems=e.marginTop=e.marginBottom=e.marginLeft=e.marginRight=e.position="",this._overlayRef=null,this._isDisposed=!0}},ay=(()=>{class t{_viewportRuler=K(Os);_document=K(It);_platform=K(rn);_overlayContainer=K(os);constructor(){}global(){return new Zc}flexibleConnectedTo(n){return new qc(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})(),Jc=(()=>{class t{scrollStrategies=K(ny);_overlayContainer=K(os);_positionBuilder=K(ay);_keyboardDispatcher=K(ry);_injector=K(Rt);_ngZone=K(Mt);_document=K(It);_directionality=K(ri);_location=K(Fl);_outsideClickDispatcher=K(iy);_animationsModuleType=K(Tl,{optional:!0});_idGenerator=K($i);_renderer=K(_r).createRenderer(null,null);_appRef;_styleLoader=K(ni);constructor(){}create(n){this._styleLoader.load(np);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 cy(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 ly=(()=>{class t extends Yr{_elementRef=K(bt);_focusTrapFactory=K(Yf);_config;_interactivityChecker=K(jc);_ngZone=K(Mt);_overlayRef=K(zr);_focusMonitor=K(jf);_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(Bc,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,cy,0,0,"ng-template",0)},dependencies:[Bc],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&&!
|
|
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`
|
|
38
38
|
The ${t.constructor.name} still has subscriptions that haven't been unsubscribed.
|
|
39
39
|
This may happen if the class extends another class decorated with @UntilDestroy().
|
|
40
40
|
The child class implements its own ngOnDestroy() method but doesn't call super.ngOnDestroy().
|
|
@@ -71,5 +71,5 @@ Url: ${bo(t)}`),!0)}function Nm(t,e){return t.type||!e||!e.length?!1:Lm(t).some(
|
|
|
71
71
|
super.ngOnDestroy();
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
`}var tl=!1;function wy(t,e,n){let r=t[e];if(tl&&typeof r!="function")throw new Error(`${t.constructor.name} is using untilDestroyed but doesn't implement ${e}`);up(t,n),t[e]=function(){r.apply(this,arguments),dp(this,n),t[e]=r}}function mp(t,e){return n=>{let r=lp(e);typeof e=="string"?wy(t,e,r):(tl&&Cy(t),up(t,r));let i=t[r];return tl&&yy(t,i),n.pipe(mr(i))}}function Cy(t){let e=Object.getPrototypeOf(t);if(!(cp 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 Sy=t=>({active:t}),Iy=(t,e)=>e.mID;function xy(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 Ty(t,e){if(t&1&&qe(0,xy,1,2,"img",9,dn),t&2){let n=J();Ze(n.selectedItem.imgs)}}function Oy(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 Dy(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,Sy,n.mID===r.selectedItem.mID+""))}}function Ay(t,e){if(t&1&&(X(0,"span",16),Te(1,"Selected Product"),q(),X(2,"div",8),qe(3,Dy,2,5,"a",17,dn),q()),t&2){let n=J();W(3),Ze(n.items)}}function Ny(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 Ry(t,e){if(t&1&&(X(0,"span",20),Te(1,"Select Variant"),q(),X(2,"div",21),qe(3,Ny,3,3,"a",22,Iy),q()),t&2){let n=J();W(3),Ze(n.selectedItem.vars)}}function My(t,e){if(t&1&&(X(0,"div",25),Te(1,"Description"),q(),Se(2,"div",26),gt(3,"safeHtml")),t&2){let n=J();W(2),be("innerHTML",St(3,1,n.selectedItem.desc),en)}}function Py(t,e){t&1&&Te(0," Open Cart ")}function Ly(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,Ty,2,0)(11,Oy,1,2,"img",9),q(),X(12,"div",10)(13,"div",11),Te(14),q(),Se(15,"span",12),gt(16,"cooeeCurrency"),gt(17,"safeHtml"),De(18,Ay,5,0)(19,Ry,5,0)(20,My,4,3),q()(),X(21,"div",13)(22,"button",14),Ne("click",function(){return r.clickAddToCart(r.selectedItem)}),De(23,Py,1,0)(24,Ly,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 ky(t,e){t&1&&Te(0," Open Cart ")}function Fy(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),gt(8,"cooeeCurrency"),gt(9,"safeHtml"),q()(),X(10,"button",6),Ne("click",function(s){return Ue(i),He(r.clickAddToCart(s))}),De(11,ky,1,0)(12,Fy,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 By=["swiperContainer"],Uy=["videoEl"],Hy=(t,e)=>e.url,jy=(t,e)=>e.mID;function $y(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 Gy(t,e){t&1&&Is(0)}function Wy(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,Gy,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 Yy(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 zy(t,e){if(t&1&&(X(0,"div",15)(1,"div",20),qe(2,Yy,1,1,"cooee-product-card",21,jy),q()()),t&2){let n=J().$implicit;W(2),Ze(n.items)}}function Ky(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 Xy(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,$y,1,2,"source",14,Hy),q(),De(7,Wy,4,4)(8,zy,4,0,"div",15),q(),De(9,Ky,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 qy(t,e){t&1&&Is(0)}function Zy(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(){gl(this.getCurrentVideoElement(),"loadeddata").pipe(mp(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}};ys(un,"\u0275fac",function(r){return new(r||un)(tn(Xn),tn(bt),tn(pr),tn(el))}),ys(un,"\u0275cmp",Fe({type:un,selectors:[["cooee-video-swiper-dialog"]],viewQuery:function(r,i){if(r&1&&(Yn(By,5),Yn(Uy,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,Xy,10,8,"div",6,dn),q(),Se(6,"div",7)(7,"div",8),q(),X(8,"div",9),De(9,qy,1,0,"ng-container",10),q()(),De(10,Zy,4,0,"ng-template",null,1,Pl)),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,Bl,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=ll([hp()],un);var Jy=["videoEl"],gp=(t,e)=>e.url;function Qy(t,e){if(t&1&&(X(0,"div",1),Te(1),q()),t&2){let n=J();W(),Vt(" ",n.videoConfig.heading," ")}}function e0(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 t0(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 n0(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 r0(t,e){if(t&1&&(X(0,"div",10),De(1,n0,1,2,"img",13),X(2,"div",14)(3,"span",15),Te(4),q(),Pt(5),Se(6,"span",16),gt(7,"cooeeCurrency"),gt(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 i0(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 o0(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,e0,1,2,"source",7,gp),q(),X(8,"div",8),De(9,t0,1,2,"cooee-mute-toggle",9),q(),De(10,r0,9,7,"div",10),q(),De(11,i0,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 s0(t,e){if(t&1&&(X(0,"div",2),qe(1,o0,12,7,"div",4,dn),q()),t&2){let n=J();W(),Ze(n.videos)}}function a0(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 c0(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,a0,1,2,"source",7,gp),q()()()}if(t&2){let n=e.$implicit;W(5),be("muted",!0),W(),Ze(n.sources)}}function l0(t,e){if(t&1&&(X(0,"div",3),qe(1,c0,8,1,"div",18,dn),q()),t&2){let n=J();W(),Ze(n.videos)}}function u0(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 d0(t,e){if(t&1&&(Pt(0),De(1,u0,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=wc;VideoConfigFooterContent=Sc;VideoConfigAutoPlay=Cc;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{_t.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(rp),tn(Xn))};static \u0275cmp=Fe({type:t,selectors:[["cooee-shoppable-videos"]],viewQuery:function(r,i){if(r&1&&Yn(Jy,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,Qy,2,1,"div",1)(4,s0,3,0,"div",2)(5,l0,3,0,"div",3)(6,d0,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}"]})};Jl("CooeeWidgetSDK");(async()=>{let t=await Hl(eu),e=(n,r)=>{let i=Kl(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"})();
|
|
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"})();
|