@letscooee/web-sdk 9.14.4 → 9.15.0
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 +19 -19
- package/dist/widget.min.js +27 -27
- package/package.json +1 -1
package/dist/widget.min.js
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import{$ as Fi,$a as Ns,A as Tl,Aa as W,B as Et,Ba as be,C as zn,Ca as As,D as tn,Da as Ke,E as Il,Ea as Pe,F as z,Fa as K,G as Li,Ga as Sn,H as Ne,Ha as Tn,I as Re,Ia as In,J as Bt,Ja as xn,K as Kn,Ka as Yt,L as ei,La as Oe,M as Mt,Ma as cn,N as xl,Na as It,O as ct,Oa as lt,P as Pt,Pa as vt,Q as Ol,Qa as Xe,R as Xn,Ra as Bi,S as Tt,Sa as Ui,T as Lt,Ta as Je,U as Al,Ua as ot,V as Dl,Va as Pl,W as Nl,Wa as Ll,X as mr,Xa as Fl,Y as bt,Ya as Zn,Z as ut,Za as Ds,_ as L,_a as vr,a as x,aa as ws,ab as kl,b as Ee,ba as gr,bb as xt,c as Jr,ca as Ss,cb as Vl,d as dl,da as nn,db as Bn,e as ys,ea as Ts,eb as Bl,f as Es,fa as Is,fb as Ul,g as fl,ga as xs,h as bs,ha as Me,hb as Hl,i as Qr,ia as qn,ib as jl,j as pl,ja as _r,jb as Un,k as _t,ka as ki,kb as $l,l as hl,la as Ct,lb as Hi,m as ml,mb as On,n as gl,na as xe,nb as Gl,o as _l,oa as Vi,ob as Wl,p as Mi,pa as Cn,pb as ji,q as Cs,qa as le,qb as An,r as vl,ra as ti,rb as ni,s as yl,sa as Os,sb as rn,t as Pi,ta as Rl,tb as ri,u as El,ua as Ml,ub as Yl,v as bl,va as Se,vb as zl,w as Cl,wa as wn,wb as Rs,x as wl,xa as rt,xb as $i,y as Sl,ya as it,yb as Ms,z as hr,za as G,zb as Kl}from"./chunk-RI4HJTAE.js";var Jl=ys((Zl,Gi)=>{"use strict";(function(t){"use strict";var e={};e.VERSION="1.6.1";var n,r={},i=function(d,_){return function(){return _.apply(d,arguments)}},o=function(){var d=arguments,_=d[0],h,E;for(E=1;E<d.length;E++)for(h in d[E])!(h in _)&&d[E].hasOwnProperty(h)&&(_[h]=d[E][h]);return _},s=function(d,_){return{value:d,name:_}};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 _=this.context.filterLevel;return d.value>=_.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,_){n&&this.enabledFor(d)&&n(_,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 _ in r)r.hasOwnProperty(_)&&r[_].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,N){N.name&&C.unshift("["+N.name+"]")};var _={},h=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 N=console.log,V;C.level===e.TIME?(V=(C.name?"["+C.name+"] ":"")+E[0],E[1]==="start"?console.time?console.time(V):_[V]=new Date().getTime():console.timeEnd?console.timeEnd(V):h(N,[V+": "+(new Date().getTime()-_[V])+"ms"])):(C.level===e.WARN&&console.warn?N=console.warn:C.level===e.ERROR&&console.error?N=console.error:C.level===e.INFO&&console.info?N=console.info:C.level===e.DEBUG&&console.debug?N=console.debug:C.level===e.TRACE&&console.trace&&(N=console.trace),d.formatter(E,C),h(N,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)})(Zl)});var au=ys((su,Us)=>{"use strict";(function(t){if(typeof su=="object"&&typeof Us<"u")Us.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(_,h){if(!o[_]){if(!i[_]){var E=typeof Jr=="function"&&Jr;if(!h&&E)return E(_,!0);if(u)return u(_,!0);var C=new Error("Cannot find module '"+_+"'");throw C.code="MODULE_NOT_FOUND",C}var N=o[_]={exports:{}};i[_][0].call(N.exports,function(V){var B=i[_][1][V];return c(B||V)},N,N.exports,r,i,o,s)}return o[_].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,_=new c(V),h=s.document.createTextNode("");_.observe(h,{characterData:!0}),u=function(){h.data=d=++d%2}}else if(!s.setImmediate&&typeof s.MessageChannel<"u"){var E=new s.MessageChannel;E.port1.onmessage=V,u=function(){E.port2.postMessage(0)}}else"document"in s&&"onreadystatechange"in s.document.createElement("script")?u=function(){var X=s.document.createElement("script");X.onreadystatechange=function(){V(),X.onreadystatechange=null,X.parentNode.removeChild(X),X=null},s.document.documentElement.appendChild(X)}:u=function(){setTimeout(V,0)};var C,N=[];function V(){C=!0;for(var X,J,ue=N.length;ue;){for(J=N,N=[],X=-1;++X<ue;)J[X]();ue=N.length}C=!1}i.exports=B;function B(X){N.push(X)===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"],_=["FULFILLED"],h=["PENDING"];i.exports=E;function E(H){if(typeof H!="function")throw new TypeError("resolver must be a function");this.state=h,this.queue=[],this.outcome=void 0,H!==c&&B(this,H)}E.prototype.catch=function(H){return this.then(null,H)},E.prototype.then=function(H,_e){if(typeof H!="function"&&this.state===_||typeof _e!="function"&&this.state===d)return this;var de=new this.constructor(c);if(this.state!==h){var ye=this.state===_?H:_e;N(de,ye,this.outcome)}else this.queue.push(new C(de,H,_e));return de};function C(H,_e,de){this.promise=H,typeof _e=="function"&&(this.onFulfilled=_e,this.callFulfilled=this.otherCallFulfilled),typeof de=="function"&&(this.onRejected=de,this.callRejected=this.otherCallRejected)}C.prototype.callFulfilled=function(H){u.resolve(this.promise,H)},C.prototype.otherCallFulfilled=function(H){N(this.promise,this.onFulfilled,H)},C.prototype.callRejected=function(H){u.reject(this.promise,H)},C.prototype.otherCallRejected=function(H){N(this.promise,this.onRejected,H)};function N(H,_e,de){s(function(){var ye;try{ye=_e(de)}catch(ke){return u.reject(H,ke)}ye===H?u.reject(H,new TypeError("Cannot resolve promise with itself")):u.resolve(H,ye)})}u.resolve=function(H,_e){var de=X(V,_e);if(de.status==="error")return u.reject(H,de.value);var ye=de.value;if(ye)B(H,ye);else{H.state=_,H.outcome=_e;for(var ke=-1,De=H.queue.length;++ke<De;)H.queue[ke].callFulfilled(_e)}return H},u.reject=function(H,_e){H.state=d,H.outcome=_e;for(var de=-1,ye=H.queue.length;++de<ye;)H.queue[de].callRejected(_e);return H};function V(H){var _e=H&&H.then;if(H&&(typeof H=="object"||typeof H=="function")&&typeof _e=="function")return function(){_e.apply(H,arguments)}}function B(H,_e){var de=!1;function ye(Ge){de||(de=!0,u.reject(H,Ge))}function ke(Ge){de||(de=!0,u.resolve(H,Ge))}function De(){_e(ke,ye)}var Le=X(De);Le.status==="error"&&ye(Le.value)}function X(H,_e){var de={};try{de.value=H(_e),de.status="success"}catch(ye){de.status="error",de.value=ye}return de}E.resolve=J;function J(H){return H instanceof this?H:u.resolve(new this(c),H)}E.reject=ue;function ue(H){var _e=new this(c);return u.reject(_e,H)}E.all=q;function q(H){var _e=this;if(Object.prototype.toString.call(H)!=="[object Array]")return this.reject(new TypeError("must be an array"));var de=H.length,ye=!1;if(!de)return this.resolve([]);for(var ke=new Array(de),De=0,Le=-1,Ge=new this(c);++Le<de;)ze(H[Le],Le);return Ge;function ze(gt,A){_e.resolve(gt).then(O,function(P){ye||(ye=!0,u.reject(Ge,P))});function O(P){ke[A]=P,++De===de&&!ye&&(ye=!0,u.resolve(Ge,ke))}}}E.race=Ae;function Ae(H){var _e=this;if(Object.prototype.toString.call(H)!=="[object Array]")return this.reject(new TypeError("must be an array"));var de=H.length,ye=!1;if(!de)return this.resolve([]);for(var ke=-1,De=new this(c);++ke<de;)Le(H[ke]);return De;function Le(Ge){_e.resolve(Ge).then(function(ze){ye||(ye=!0,u.resolve(De,ze))},function(ze){ye||(ye=!0,u.reject(De,ze))})}}},{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 _(){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 h(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,I=0;I<f.length;I+=1)S.append(f[I]);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 N(f,b,m){typeof b=="function"&&f.then(b),typeof m=="function"&&f.catch(m)}function V(f){return typeof f!="string"&&(console.warn(f+" used as a key, but it is not a string."),f=String(f)),f}function B(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var X="local-forage-detect-blob-support",J=void 0,ue={},q=Object.prototype.toString,Ae="readonly",H="readwrite";function _e(f){for(var b=f.length,m=new ArrayBuffer(b),S=new Uint8Array(m),I=0;I<b;I++)S[I]=f.charCodeAt(I);return m}function de(f){return new E(function(b){var m=f.transaction(X,H),S=h([""]);m.objectStore(X).put(S,"key"),m.onabort=function(I){I.preventDefault(),I.stopPropagation(),b(!1)},m.oncomplete=function(){var I=navigator.userAgent.match(/Chrome\/(\d+)/),w=navigator.userAgent.match(/Edge\//);b(w||!I||parseInt(I[1],10)>=43)}}).catch(function(){return!1})}function ye(f){return typeof J=="boolean"?E.resolve(J):de(f).then(function(b){return J=b,J})}function ke(f){var b=ue[f.name],m={};m.promise=new E(function(S,I){m.resolve=S,m.reject=I}),b.deferredOperations.push(m),b.dbReady?b.dbReady=b.dbReady.then(function(){return m.promise}):b.dbReady=m.promise}function De(f){var b=ue[f.name],m=b.deferredOperations.pop();if(m)return m.resolve(),m.promise}function Le(f,b){var m=ue[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(ue[f.name]=ue[f.name]||Z(),f.db)if(b)ke(f),f.db.close();else return m(f.db);var I=[f.name];b&&I.push(f.version);var w=d.open.apply(d,I);b&&(w.onupgradeneeded=function(R){var k=w.result;try{k.createObjectStore(f.storeName),R.oldVersion<=1&&k.createObjectStore(X)}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(k){k.target.close()},m(R),De(f)}})}function ze(f){return Ge(f,!1)}function gt(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,I=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),I||m){if(m){var w=f.db.version+1;w>f.version&&(f.version=w)}return!0}return!1}function O(f){return new E(function(b,m){var S=new FileReader;S.onerror=m,S.onloadend=function(I){var w=btoa(I.target.result||"");b({__local_forage_encoded_blob:!0,data:w,type:f.type})},S.readAsBinaryString(f)})}function P(f){var b=_e(atob(f.data));return h([b],{type:f.type})}function M(f){return f&&f.__local_forage_encoded_blob}function v(f){var b=this,m=b._initReady().then(function(){var S=ue[b._dbInfo.name];if(S&&S.dbReady)return S.dbReady});return N(m,f,f),m}function y(f){ke(f);for(var b=ue[f.name],m=b.forages,S=0;S<m.length;S++){var I=m[S];I._dbInfo.db&&(I._dbInfo.db.close(),I._dbInfo.db=null)}return f.db=null,ze(f).then(function(w){return f.db=w,A(f)?gt(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 Le(f,w),w})}function U(f,b,m,S){S===void 0&&(S=1);try{var I=f.db.transaction(f.storeName,b);m(null,I)}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),gt(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 I=ue[m.name];I||(I=Z(),ue[m.name]=I),I.forages.push(b),b._initReady||(b._initReady=b.ready,b.ready=v);var w=[];function R(){return E.resolve()}for(var k=0;k<I.forages.length;k++){var j=I.forages[k];j!==b&&w.push(j._initReady().catch(R))}var $=I.forages.slice(0);return E.all(w).then(function(){return m.db=I.db,ze(m)}).then(function(Y){return m.db=Y,A(m,b._defaultConfig.version)?gt(m):Y}).then(function(Y){m.db=I.db=Y,b._dbInfo=m;for(var re=0;re<$.length;re++){var Ie=$[re];Ie!==b&&(Ie._dbInfo.db=m.db,Ie._dbInfo.version=m.version)}})}function ie(f,b){var m=this;f=V(f);var S=new E(function(I,w){m.ready().then(function(){U(m._dbInfo,Ae,function(R,k){if(R)return w(R);try{var j=k.objectStore(m._dbInfo.storeName),$=j.get(f);$.onsuccess=function(){var Y=$.result;Y===void 0&&(Y=null),M(Y)&&(Y=P(Y)),I(Y)},$.onerror=function(){w($.error)}}catch(Y){w(Y)}})}).catch(w)});return C(S,b),S}function ce(f,b){var m=this,S=new E(function(I,w){m.ready().then(function(){U(m._dbInfo,Ae,function(R,k){if(R)return w(R);try{var j=k.objectStore(m._dbInfo.storeName),$=j.openCursor(),Y=1;$.onsuccess=function(){var re=$.result;if(re){var Ie=re.value;M(Ie)&&(Ie=P(Ie));var Ue=f(Ie,re.key,Y++);Ue!==void 0?I(Ue):re.continue()}else I()},$.onerror=function(){w($.error)}}catch(re){w(re)}})}).catch(w)});return C(S,b),S}function Q(f,b,m){var S=this;f=V(f);var I=new E(function(w,R){var k;S.ready().then(function(){return k=S._dbInfo,q.call(b)==="[object Blob]"?ye(k.db).then(function(j){return j?b:O(b)}):b}).then(function(j){U(S._dbInfo,H,function($,Y){if($)return R($);try{var re=Y.objectStore(S._dbInfo.storeName);j===null&&(j=void 0);var Ie=re.put(j,f);Y.oncomplete=function(){j===void 0&&(j=null),w(j)},Y.onabort=Y.onerror=function(){var Ue=Ie.error?Ie.error:Ie.transaction.error;R(Ue)}}catch(Ue){R(Ue)}})}).catch(R)});return C(I,m),I}function oe(f,b){var m=this;f=V(f);var S=new E(function(I,w){m.ready().then(function(){U(m._dbInfo,H,function(R,k){if(R)return w(R);try{var j=k.objectStore(m._dbInfo.storeName),$=j.delete(f);k.oncomplete=function(){I()},k.onerror=function(){w($.error)},k.onabort=function(){var Y=$.error?$.error:$.transaction.error;w(Y)}}catch(Y){w(Y)}})}).catch(w)});return C(S,b),S}function ee(f){var b=this,m=new E(function(S,I){b.ready().then(function(){U(b._dbInfo,H,function(w,R){if(w)return I(w);try{var k=R.objectStore(b._dbInfo.storeName),j=k.clear();R.oncomplete=function(){S()},R.onabort=R.onerror=function(){var $=j.error?j.error:j.transaction.error;I($)}}catch($){I($)}})}).catch(I)});return C(m,f),m}function pe(f){var b=this,m=new E(function(S,I){b.ready().then(function(){U(b._dbInfo,Ae,function(w,R){if(w)return I(w);try{var k=R.objectStore(b._dbInfo.storeName),j=k.count();j.onsuccess=function(){S(j.result)},j.onerror=function(){I(j.error)}}catch($){I($)}})}).catch(I)});return C(m,f),m}function se(f,b){var m=this,S=new E(function(I,w){if(f<0){I(null);return}m.ready().then(function(){U(m._dbInfo,Ae,function(R,k){if(R)return w(R);try{var j=k.objectStore(m._dbInfo.storeName),$=!1,Y=j.openKeyCursor();Y.onsuccess=function(){var re=Y.result;if(!re){I(null);return}f===0||$?I(re.key):($=!0,re.advance(f))},Y.onerror=function(){w(Y.error)}}catch(re){w(re)}})}).catch(w)});return C(S,b),S}function he(f){var b=this,m=new E(function(S,I){b.ready().then(function(){U(b._dbInfo,Ae,function(w,R){if(w)return I(w);try{var k=R.objectStore(b._dbInfo.storeName),j=k.openKeyCursor(),$=[];j.onsuccess=function(){var Y=j.result;if(!Y){S($);return}$.push(Y.key),Y.continue()},j.onerror=function(){I(j.error)}}catch(Y){I(Y)}})}).catch(I)});return C(m,f),m}function me(f,b){b=B.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,I;if(!f.name)I=E.reject("Invalid arguments");else{var w=f.name===m.name&&S._dbInfo.db,R=w?E.resolve(S._dbInfo.db):ze(f).then(function(k){var j=ue[f.name],$=j.forages;j.db=k;for(var Y=0;Y<$.length;Y++)$[Y]._dbInfo.db=k;return k});f.storeName?I=R.then(function(k){if(k.objectStoreNames.contains(f.storeName)){var j=k.version+1;ke(f);var $=ue[f.name],Y=$.forages;k.close();for(var re=0;re<Y.length;re++){var Ie=Y[re];Ie._dbInfo.db=null,Ie._dbInfo.version=j}var Ue=new E(function(He,at){var nt=d.open(f.name,j);nt.onerror=function(Wt){var Zr=nt.result;Zr.close(),at(Wt)},nt.onupgradeneeded=function(){var Wt=nt.result;Wt.deleteObjectStore(f.storeName)},nt.onsuccess=function(){var Wt=nt.result;Wt.close(),He(Wt)}});return Ue.then(function(He){$.db=He;for(var at=0;at<Y.length;at++){var nt=Y[at];nt._dbInfo.db=He,De(nt._dbInfo)}}).catch(function(He){throw(Le(f,He)||E.resolve()).catch(function(){}),He})}}):I=R.then(function(k){ke(f);var j=ue[f.name],$=j.forages;k.close();for(var Y=0;Y<$.length;Y++){var re=$[Y];re._dbInfo.db=null}var Ie=new E(function(Ue,He){var at=d.deleteDatabase(f.name);at.onerror=function(){var nt=at.result;nt&&nt.close(),He(at.error)},at.onblocked=function(){console.warn('dropInstance blocked for database "'+f.name+'" until all open connections are closed')},at.onsuccess=function(){var nt=at.result;nt&&nt.close(),Ue(nt)}});return Ie.then(function(Ue){j.db=Ue;for(var He=0;He<$.length;He++){var at=$[He];De(at._dbInfo)}}).catch(function(Ue){throw(Le(f,Ue)||E.resolve()).catch(function(){}),Ue})})}return C(I,b),I}var ge={_driver:"asyncStorage",_initStorage:ne,_support:_(),iterate:ce,getItem:ie,setItem:Q,removeItem:oe,clear:ee,length:pe,key:se,keys:he,dropInstance:me};function p(){return typeof openDatabase=="function"}var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l="~~local_forage_type~",g=/^~~local_forage_type~([^~]+)~/,T="__lfsc__:",D=T.length,F="arbf",ve="blob",Te="si08",Ce="ui08",Ve="uic8",Be="si16",Ze="si32",kt="ur16",Gt="ui32",bn="fl32",St="fl64",Vt=D+F.length,Ni=Object.prototype.toString;function il(f){var b=f.length*.75,m=f.length,S,I=0,w,R,k,j;f[f.length-1]==="="&&(b--,f[f.length-2]==="="&&b--);var $=new ArrayBuffer(b),Y=new Uint8Array($);for(S=0;S<m;S+=4)w=a.indexOf(f[S]),R=a.indexOf(f[S+1]),k=a.indexOf(f[S+2]),j=a.indexOf(f[S+3]),Y[I++]=w<<2|R>>4,Y[I++]=(R&15)<<4|k>>2,Y[I++]=(k&3)<<6|j&63;return $}function ps(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 Hp(f,b){var m="";if(f&&(m=Ni.call(f)),f&&(m==="[object ArrayBuffer]"||f.buffer&&Ni.call(f.buffer)==="[object ArrayBuffer]")){var S,I=T;f instanceof ArrayBuffer?(S=f,I+=F):(S=f.buffer,m==="[object Int8Array]"?I+=Te:m==="[object Uint8Array]"?I+=Ce:m==="[object Uint8ClampedArray]"?I+=Ve:m==="[object Int16Array]"?I+=Be:m==="[object Uint16Array]"?I+=kt:m==="[object Int32Array]"?I+=Ze:m==="[object Uint32Array]"?I+=Gt:m==="[object Float32Array]"?I+=bn:m==="[object Float64Array]"?I+=St:b(new Error("Failed to get type for BinaryArray"))),b(I+ps(S))}else if(m==="[object Blob]"){var w=new FileReader;w.onload=function(){var R=l+f.type+"~"+ps(this.result);b(T+ve+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 jp(f){if(f.substring(0,D)!==T)return JSON.parse(f);var b=f.substring(Vt),m=f.substring(D,Vt),S;if(m===ve&&g.test(b)){var I=b.match(g);S=I[1],b=b.substring(I[0].length)}var w=il(b);switch(m){case F:return w;case ve:return h([w],{type:S});case Te:return new Int8Array(w);case Ce:return new Uint8Array(w);case Ve:return new Uint8ClampedArray(w);case Be:return new Int16Array(w);case kt:return new Uint16Array(w);case Ze:return new Int32Array(w);case Gt:return new Uint32Array(w);case bn:return new Float32Array(w);case St:return new Float64Array(w);default:throw new Error("Unkown type: "+m)}}var hs={serialize:Hp,deserialize:jp,stringToBuffer:il,bufferToString:ps};function ol(f,b,m,S){f.executeSql("CREATE TABLE IF NOT EXISTS "+b.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],m,S)}function $p(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 I=new E(function(w,R){try{m.db=openDatabase(m.name,String(m.version),m.description,m.size)}catch(k){return R(k)}m.db.transaction(function(k){ol(k,m,function(){b._dbInfo=m,w()},function(j,$){R($)})},R)});return m.serializer=hs,I}function Vn(f,b,m,S,I,w){f.executeSql(m,S,I,function(R,k){k.code===k.SYNTAX_ERR?R.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[b.storeName],function(j,$){$.rows.length?w(j,k):ol(j,b,function(){j.executeSql(m,S,I,w)},w)},w):w(R,k)},w)}function Gp(f,b){var m=this;f=V(f);var S=new E(function(I,w){m.ready().then(function(){var R=m._dbInfo;R.db.transaction(function(k){Vn(k,R,"SELECT * FROM "+R.storeName+" WHERE key = ? LIMIT 1",[f],function(j,$){var Y=$.rows.length?$.rows.item(0).value:null;Y&&(Y=R.serializer.deserialize(Y)),I(Y)},function(j,$){w($)})})}).catch(w)});return C(S,b),S}function Wp(f,b){var m=this,S=new E(function(I,w){m.ready().then(function(){var R=m._dbInfo;R.db.transaction(function(k){Vn(k,R,"SELECT * FROM "+R.storeName,[],function(j,$){for(var Y=$.rows,re=Y.length,Ie=0;Ie<re;Ie++){var Ue=Y.item(Ie),He=Ue.value;if(He&&(He=R.serializer.deserialize(He)),He=f(He,Ue.key,Ie+1),He!==void 0){I(He);return}}I()},function(j,$){w($)})})}).catch(w)});return C(S,b),S}function sl(f,b,m,S){var I=this;f=V(f);var w=new E(function(R,k){I.ready().then(function(){b===void 0&&(b=null);var j=b,$=I._dbInfo;$.serializer.serialize(b,function(Y,re){re?k(re):$.db.transaction(function(Ie){Vn(Ie,$,"INSERT OR REPLACE INTO "+$.storeName+" (key, value) VALUES (?, ?)",[f,Y],function(){R(j)},function(Ue,He){k(He)})},function(Ie){if(Ie.code===Ie.QUOTA_ERR){if(S>0){R(sl.apply(I,[f,j,m,S-1]));return}k(Ie)}})})}).catch(k)});return C(w,m),w}function Yp(f,b,m){return sl.apply(this,[f,b,m,1])}function zp(f,b){var m=this;f=V(f);var S=new E(function(I,w){m.ready().then(function(){var R=m._dbInfo;R.db.transaction(function(k){Vn(k,R,"DELETE FROM "+R.storeName+" WHERE key = ?",[f],function(){I()},function(j,$){w($)})})}).catch(w)});return C(S,b),S}function Kp(f){var b=this,m=new E(function(S,I){b.ready().then(function(){var w=b._dbInfo;w.db.transaction(function(R){Vn(R,w,"DELETE FROM "+w.storeName,[],function(){S()},function(k,j){I(j)})})}).catch(I)});return C(m,f),m}function Xp(f){var b=this,m=new E(function(S,I){b.ready().then(function(){var w=b._dbInfo;w.db.transaction(function(R){Vn(R,w,"SELECT COUNT(key) as c FROM "+w.storeName,[],function(k,j){var $=j.rows.item(0).c;S($)},function(k,j){I(j)})})}).catch(I)});return C(m,f),m}function qp(f,b){var m=this,S=new E(function(I,w){m.ready().then(function(){var R=m._dbInfo;R.db.transaction(function(k){Vn(k,R,"SELECT key FROM "+R.storeName+" WHERE id = ? LIMIT 1",[f+1],function(j,$){var Y=$.rows.length?$.rows.item(0).key:null;I(Y)},function(j,$){w($)})})}).catch(w)});return C(S,b),S}function Zp(f){var b=this,m=new E(function(S,I){b.ready().then(function(){var w=b._dbInfo;w.db.transaction(function(R){Vn(R,w,"SELECT key FROM "+w.storeName,[],function(k,j){for(var $=[],Y=0;Y<j.rows.length;Y++)$.push(j.rows.item(Y).key);S($)},function(k,j){I(j)})})}).catch(I)});return C(m,f),m}function Jp(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(I,w){for(var R=[],k=0;k<w.rows.length;k++)R.push(w.rows.item(k).name);b({db:f,storeNames:R})},function(I,w){m(w)})},function(S){m(S)})})}function Qp(f,b){b=B.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,I;return f.name?I=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(Jp(R))}).then(function(w){return new E(function(R,k){w.db.transaction(function(j){function $(Ue){return new E(function(He,at){j.executeSql("DROP TABLE IF EXISTS "+Ue,[],function(){He()},function(nt,Wt){at(Wt)})})}for(var Y=[],re=0,Ie=w.storeNames.length;re<Ie;re++)Y.push($(w.storeNames[re]));E.all(Y).then(function(){R()}).catch(function(Ue){k(Ue)})},function(j){k(j)})})}):I=E.reject("Invalid arguments"),C(I,b),I}var eh={_driver:"webSQLStorage",_initStorage:$p,_support:p(),iterate:Wp,getItem:Gp,setItem:Yp,removeItem:zp,clear:Kp,length:Xp,key:qp,keys:Zp,dropInstance:Qp};function th(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function al(f,b){var m=f.name+"/";return f.storeName!==b.storeName&&(m+=f.storeName+"/"),m}function nh(){var f="_localforage_support_test";try{return localStorage.setItem(f,!0),localStorage.removeItem(f),!1}catch{return!0}}function rh(){return!nh()||localStorage.length>0}function ih(f){var b=this,m={};if(f)for(var S in f)m[S]=f[S];return m.keyPrefix=al(f,b._defaultConfig),rh()?(b._dbInfo=m,m.serializer=hs,E.resolve()):E.reject()}function oh(f){var b=this,m=b.ready().then(function(){for(var S=b._dbInfo.keyPrefix,I=localStorage.length-1;I>=0;I--){var w=localStorage.key(I);w.indexOf(S)===0&&localStorage.removeItem(w)}});return C(m,f),m}function sh(f,b){var m=this;f=V(f);var S=m.ready().then(function(){var I=m._dbInfo,w=localStorage.getItem(I.keyPrefix+f);return w&&(w=I.serializer.deserialize(w)),w});return C(S,b),S}function ah(f,b){var m=this,S=m.ready().then(function(){for(var I=m._dbInfo,w=I.keyPrefix,R=w.length,k=localStorage.length,j=1,$=0;$<k;$++){var Y=localStorage.key($);if(Y.indexOf(w)===0){var re=localStorage.getItem(Y);if(re&&(re=I.serializer.deserialize(re)),re=f(re,Y.substring(R),j++),re!==void 0)return re}}});return C(S,b),S}function ch(f,b){var m=this,S=m.ready().then(function(){var I=m._dbInfo,w;try{w=localStorage.key(f)}catch{w=null}return w&&(w=w.substring(I.keyPrefix.length)),w});return C(S,b),S}function lh(f){var b=this,m=b.ready().then(function(){for(var S=b._dbInfo,I=localStorage.length,w=[],R=0;R<I;R++){var k=localStorage.key(R);k.indexOf(S.keyPrefix)===0&&w.push(k.substring(S.keyPrefix.length))}return w});return C(m,f),m}function uh(f){var b=this,m=b.keys().then(function(S){return S.length});return C(m,f),m}function dh(f,b){var m=this;f=V(f);var S=m.ready().then(function(){var I=m._dbInfo;localStorage.removeItem(I.keyPrefix+f)});return C(S,b),S}function fh(f,b,m){var S=this;f=V(f);var I=S.ready().then(function(){b===void 0&&(b=null);var w=b;return new E(function(R,k){var j=S._dbInfo;j.serializer.serialize(b,function($,Y){if(Y)k(Y);else try{localStorage.setItem(j.keyPrefix+f,$),R(w)}catch(re){(re.name==="QuotaExceededError"||re.name==="NS_ERROR_DOM_QUOTA_REACHED")&&k(re),k(re)}})})});return C(I,m),I}function ph(f,b){if(b=B.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,I;return f.name?I=new E(function(w){f.storeName?w(al(f,S._defaultConfig)):w(f.name+"/")}).then(function(w){for(var R=localStorage.length-1;R>=0;R--){var k=localStorage.key(R);k.indexOf(w)===0&&localStorage.removeItem(k)}}):I=E.reject("Invalid arguments"),C(I,b),I}var hh={_driver:"localStorageWrapper",_initStorage:ih,_support:th(),iterate:ah,getItem:sh,setItem:fh,removeItem:dh,clear:oh,length:uh,key:ch,keys:lh,dropInstance:ph},mh=function(b,m){return b===m||typeof b=="number"&&typeof m=="number"&&isNaN(b)&&isNaN(m)},gh=function(b,m){for(var S=b.length,I=0;I<S;){if(mh(b[I],m))return!0;I++}return!1},cl=Array.isArray||function(f){return Object.prototype.toString.call(f)==="[object Array]"},qr={},ll={},pr={INDEXEDDB:ge,WEBSQL:eh,LOCALSTORAGE:hh},_h=[pr.INDEXEDDB._driver,pr.WEBSQL._driver,pr.LOCALSTORAGE._driver],Ri=["dropInstance"],ms=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(Ri),vh={description:"",driver:_h.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function yh(f,b){f[b]=function(){var m=arguments;return f.ready().then(function(){return f[b].apply(f,m)})}}function gs(){for(var f=1;f<arguments.length;f++){var b=arguments[f];if(b)for(var m in b)b.hasOwnProperty(m)&&(cl(b[m])?arguments[0][m]=b[m].slice():arguments[0][m]=b[m])}return arguments[0]}var Eh=function(){function f(b){c(this,f);for(var m in pr)if(pr.hasOwnProperty(m)){var S=pr[m],I=S._driver;this[m]=I,qr[I]||this.defineDriver(S)}this._defaultConfig=gs({},vh),this._config=gs({},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,I){var w=new E(function(R,k){try{var j=m._driver,$=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!m._driver){k($);return}for(var Y=ms.concat("_initStorage"),re=0,Ie=Y.length;re<Ie;re++){var Ue=Y[re],He=!gh(Ri,Ue);if((He||m[Ue])&&typeof m[Ue]!="function"){k($);return}}var at=function(){for(var Zr=function(wh){return function(){var Sh=new Error("Method "+wh+" is not implemented by the current driver"),ul=E.reject(Sh);return C(ul,arguments[arguments.length-1]),ul}},_s=0,Ch=Ri.length;_s<Ch;_s++){var vs=Ri[_s];m[vs]||(m[vs]=Zr(vs))}};at();var nt=function(Zr){qr[j]&&console.info("Redefining LocalForage driver: "+j),qr[j]=m,ll[j]=Zr,R()};"_support"in m?m._support&&typeof m._support=="function"?m._support().then(nt,k):nt(!!m._support):nt(!0)}catch(Wt){k(Wt)}});return N(w,S,I),w},f.prototype.driver=function(){return this._driver||null},f.prototype.getDriver=function(m,S,I){var w=qr[m]?E.resolve(qr[m]):E.reject(new Error("Driver not found."));return N(w,S,I),w},f.prototype.getSerializer=function(m){var S=E.resolve(hs);return N(S,m),S},f.prototype.ready=function(m){var S=this,I=S._driverSet.then(function(){return S._ready===null&&(S._ready=S._initDriver()),S._ready});return N(I,m,m),I},f.prototype.setDriver=function(m,S,I){var w=this;cl(m)||(m=[m]);var R=this._getSupportedDrivers(m);function k(){w._config.driver=w.driver()}function j(re){return w._extend(re),k(),w._ready=w._initStorage(w._config),w._ready}function $(re){return function(){var Ie=0;function Ue(){for(;Ie<re.length;){var He=re[Ie];return Ie++,w._dbInfo=null,w._ready=null,w.getDriver(He).then(j).catch(Ue)}k();var at=new Error("No available storage method found.");return w._driverSet=E.reject(at),w._driverSet}return Ue()}}var Y=this._driverSet!==null?this._driverSet.catch(function(){return E.resolve()}):E.resolve();return this._driverSet=Y.then(function(){var re=R[0];return w._dbInfo=null,w._ready=null,w.getDriver(re).then(function(Ie){w._driver=Ie._driver,k(),w._wrapLibraryMethodsWithReady(),w._initDriver=$(R)})}).catch(function(){k();var re=new Error("No available storage method found.");return w._driverSet=E.reject(re),w._driverSet}),N(this._driverSet,S,I),this._driverSet},f.prototype.supports=function(m){return!!ll[m]},f.prototype._extend=function(m){gs(this,m)},f.prototype._getSupportedDrivers=function(m){for(var S=[],I=0,w=m.length;I<w;I++){var R=m[I];this.supports(R)&&S.push(R)}return S},f.prototype._wrapLibraryMethodsWithReady=function(){for(var m=0,S=ms.length;m<S;m++)yh(this,ms[m])},f.prototype.createInstance=function(m){return new f(m)},f}(),bh=new Eh;i.exports=bh},{3:3}]},{},[4])(4)})});var ef=ys((Mo,Qd)=>{"use strict";(function(t,e){typeof Mo=="object"&&typeof Qd<"u"?e(Mo):typeof define=="function"&&define.amd?define(["exports"],e):e((t=typeof globalThis<"u"?globalThis:t||self).Sqrl={})})(Mo,function(t){"use strict";function e(A){var O,P,M=new Error(A);return O=M,P=e.prototype,Object.setPrototypeOf?Object.setPrototypeOf(O,P):O.__proto__=P,M}function n(A,O,P){var M=O.slice(0,P).split(/\n/),v=M.length,y=M[v-1].length+1;throw e(A+=" at line "+v+" col "+y+`:
|
|
1
|
+
import{$ as Vi,$a as Rs,A as Tl,Aa as W,B as Et,Ba as be,C as zn,Ca as Ds,D as tn,Da as Ke,E as xl,Ea as Pe,F as z,Fa as K,G as Fi,Ga as Sn,H as Ne,Ha as In,I as Re,Ia as Tn,J as Bt,Ja as xn,K as Kn,Ka as Yt,L as ei,La as Oe,M as Mt,Ma as ln,N as Ol,Na as Tt,O as ct,Oa as lt,P as Pt,Pa as vt,Q as Al,Qa as Xe,R as Xn,Ra as Ui,S as It,Sa as Hi,T as Lt,Ta as Je,U as Dl,Ua as ot,V as Nl,Va as Ll,W as Rl,Wa as Fl,X as gr,Xa as Vl,Y as bt,Ya as Zn,Z as ut,Za as Ns,_ as P,_a as Jn,a as x,aa as Ss,ab as kl,b as Ee,ba as _r,bb as xt,c as Jr,ca as Is,cb as Bl,d as fl,da as nn,db as Bn,e as Es,ea as Ts,eb as Ul,f as bs,fa as xs,fb as Hl,g as pl,ga as Os,h as Cs,ha as Me,hb as jl,i as Qr,ia as qn,ib as $l,j as hl,ja as vr,jb as Un,k as _t,ka as ki,kb as Gl,l as ml,la as Ct,lb as ji,m as gl,mb as On,n as _l,na as xe,nb as Wl,o as vl,oa as Bi,ob as Yl,p as Pi,pa as cn,pb as $i,q as ws,qa as le,qb as An,r as yl,ra as ti,rb as ni,s as El,sa as As,sb as rn,t as Li,ta as Ml,tb as ri,u as bl,ua as Pl,ub as zl,v as Cl,va as Se,vb as Kl,w as wl,wa as wn,wb as Ms,x as Sl,xa as rt,xb as Gi,y as Il,ya as it,yb as Ps,z as mr,za as G,zb as Xl}from"./chunk-RI4HJTAE.js";var Ql=Es((Jl,Wi)=>{"use strict";(function(t){"use strict";var e={};e.VERSION="1.6.1";var n,r={},i=function(d,_){return function(){return _.apply(d,arguments)}},o=function(){var d=arguments,_=d[0],h,E;for(E=1;E<d.length;E++)for(h in d[E])!(h in _)&&d[E].hasOwnProperty(h)&&(_[h]=d[E][h]);return _},s=function(d,_){return{value:d,name:_}};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 _=this.context.filterLevel;return d.value>=_.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,_){n&&this.enabledFor(d)&&n(_,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 _ in r)r.hasOwnProperty(_)&&r[_].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,N){N.name&&C.unshift("["+N.name+"]")};var _={},h=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 N=console.log,k;C.level===e.TIME?(k=(C.name?"["+C.name+"] ":"")+E[0],E[1]==="start"?console.time?console.time(k):_[k]=new Date().getTime():console.timeEnd?console.timeEnd(k):h(N,[k+": "+(new Date().getTime()-_[k])+"ms"])):(C.level===e.WARN&&console.warn?N=console.warn:C.level===e.ERROR&&console.error?N=console.error:C.level===e.INFO&&console.info?N=console.info:C.level===e.DEBUG&&console.debug?N=console.debug:C.level===e.TRACE&&console.trace&&(N=console.trace),d.formatter(E,C),h(N,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 Wi<"u"&&Wi.exports?Wi.exports=e:(e._prevLogger=t.Logger,e.noConflict=function(){return t.Logger=e._prevLogger,e},t.Logger=e)})(Jl)});var cu=Es((au,Hs)=>{"use strict";(function(t){if(typeof au=="object"&&typeof Hs<"u")Hs.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(_,h){if(!o[_]){if(!i[_]){var E=typeof Jr=="function"&&Jr;if(!h&&E)return E(_,!0);if(u)return u(_,!0);var C=new Error("Cannot find module '"+_+"'");throw C.code="MODULE_NOT_FOUND",C}var N=o[_]={exports:{}};i[_][0].call(N.exports,function(k){var B=i[_][1][k];return c(B||k)},N,N.exports,r,i,o,s)}return o[_].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,_=new c(k),h=s.document.createTextNode("");_.observe(h,{characterData:!0}),u=function(){h.data=d=++d%2}}else if(!s.setImmediate&&typeof s.MessageChannel<"u"){var E=new s.MessageChannel;E.port1.onmessage=k,u=function(){E.port2.postMessage(0)}}else"document"in s&&"onreadystatechange"in s.document.createElement("script")?u=function(){var X=s.document.createElement("script");X.onreadystatechange=function(){k(),X.onreadystatechange=null,X.parentNode.removeChild(X),X=null},s.document.documentElement.appendChild(X)}:u=function(){setTimeout(k,0)};var C,N=[];function k(){C=!0;for(var X,J,ue=N.length;ue;){for(J=N,N=[],X=-1;++X<ue;)J[X]();ue=N.length}C=!1}i.exports=B;function B(X){N.push(X)===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"],_=["FULFILLED"],h=["PENDING"];i.exports=E;function E(H){if(typeof H!="function")throw new TypeError("resolver must be a function");this.state=h,this.queue=[],this.outcome=void 0,H!==c&&B(this,H)}E.prototype.catch=function(H){return this.then(null,H)},E.prototype.then=function(H,_e){if(typeof H!="function"&&this.state===_||typeof _e!="function"&&this.state===d)return this;var de=new this.constructor(c);if(this.state!==h){var ye=this.state===_?H:_e;N(de,ye,this.outcome)}else this.queue.push(new C(de,H,_e));return de};function C(H,_e,de){this.promise=H,typeof _e=="function"&&(this.onFulfilled=_e,this.callFulfilled=this.otherCallFulfilled),typeof de=="function"&&(this.onRejected=de,this.callRejected=this.otherCallRejected)}C.prototype.callFulfilled=function(H){u.resolve(this.promise,H)},C.prototype.otherCallFulfilled=function(H){N(this.promise,this.onFulfilled,H)},C.prototype.callRejected=function(H){u.reject(this.promise,H)},C.prototype.otherCallRejected=function(H){N(this.promise,this.onRejected,H)};function N(H,_e,de){s(function(){var ye;try{ye=_e(de)}catch(Ve){return u.reject(H,Ve)}ye===H?u.reject(H,new TypeError("Cannot resolve promise with itself")):u.resolve(H,ye)})}u.resolve=function(H,_e){var de=X(k,_e);if(de.status==="error")return u.reject(H,de.value);var ye=de.value;if(ye)B(H,ye);else{H.state=_,H.outcome=_e;for(var Ve=-1,De=H.queue.length;++Ve<De;)H.queue[Ve].callFulfilled(_e)}return H},u.reject=function(H,_e){H.state=d,H.outcome=_e;for(var de=-1,ye=H.queue.length;++de<ye;)H.queue[de].callRejected(_e);return H};function k(H){var _e=H&&H.then;if(H&&(typeof H=="object"||typeof H=="function")&&typeof _e=="function")return function(){_e.apply(H,arguments)}}function B(H,_e){var de=!1;function ye(Ge){de||(de=!0,u.reject(H,Ge))}function Ve(Ge){de||(de=!0,u.resolve(H,Ge))}function De(){_e(Ve,ye)}var Le=X(De);Le.status==="error"&&ye(Le.value)}function X(H,_e){var de={};try{de.value=H(_e),de.status="success"}catch(ye){de.status="error",de.value=ye}return de}E.resolve=J;function J(H){return H instanceof this?H:u.resolve(new this(c),H)}E.reject=ue;function ue(H){var _e=new this(c);return u.reject(_e,H)}E.all=q;function q(H){var _e=this;if(Object.prototype.toString.call(H)!=="[object Array]")return this.reject(new TypeError("must be an array"));var de=H.length,ye=!1;if(!de)return this.resolve([]);for(var Ve=new Array(de),De=0,Le=-1,Ge=new this(c);++Le<de;)ze(H[Le],Le);return Ge;function ze(gt,A){_e.resolve(gt).then(O,function(L){ye||(ye=!0,u.reject(Ge,L))});function O(L){Ve[A]=L,++De===de&&!ye&&(ye=!0,u.resolve(Ge,Ve))}}}E.race=Ae;function Ae(H){var _e=this;if(Object.prototype.toString.call(H)!=="[object Array]")return this.reject(new TypeError("must be an array"));var de=H.length,ye=!1;if(!de)return this.resolve([]);for(var Ve=-1,De=new this(c);++Ve<de;)Le(H[Ve]);return De;function Le(Ge){_e.resolve(Ge).then(function(ze){ye||(ye=!0,u.resolve(De,ze))},function(ze){ye||(ye=!0,u.reject(De,ze))})}}},{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 _(){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 h(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,T=0;T<f.length;T+=1)S.append(f[T]);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 N(f,b,m){typeof b=="function"&&f.then(b),typeof m=="function"&&f.catch(m)}function k(f){return typeof f!="string"&&(console.warn(f+" used as a key, but it is not a string."),f=String(f)),f}function B(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var X="local-forage-detect-blob-support",J=void 0,ue={},q=Object.prototype.toString,Ae="readonly",H="readwrite";function _e(f){for(var b=f.length,m=new ArrayBuffer(b),S=new Uint8Array(m),T=0;T<b;T++)S[T]=f.charCodeAt(T);return m}function de(f){return new E(function(b){var m=f.transaction(X,H),S=h([""]);m.objectStore(X).put(S,"key"),m.onabort=function(T){T.preventDefault(),T.stopPropagation(),b(!1)},m.oncomplete=function(){var T=navigator.userAgent.match(/Chrome\/(\d+)/),w=navigator.userAgent.match(/Edge\//);b(w||!T||parseInt(T[1],10)>=43)}}).catch(function(){return!1})}function ye(f){return typeof J=="boolean"?E.resolve(J):de(f).then(function(b){return J=b,J})}function Ve(f){var b=ue[f.name],m={};m.promise=new E(function(S,T){m.resolve=S,m.reject=T}),b.deferredOperations.push(m),b.dbReady?b.dbReady=b.dbReady.then(function(){return m.promise}):b.dbReady=m.promise}function De(f){var b=ue[f.name],m=b.deferredOperations.pop();if(m)return m.resolve(),m.promise}function Le(f,b){var m=ue[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(ue[f.name]=ue[f.name]||Z(),f.db)if(b)Ve(f),f.db.close();else return m(f.db);var T=[f.name];b&&T.push(f.version);var w=d.open.apply(d,T);b&&(w.onupgradeneeded=function(R){var V=w.result;try{V.createObjectStore(f.storeName),R.oldVersion<=1&&V.createObjectStore(X)}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),De(f)}})}function ze(f){return Ge(f,!1)}function gt(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,T=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),T||m){if(m){var w=f.db.version+1;w>f.version&&(f.version=w)}return!0}return!1}function O(f){return new E(function(b,m){var S=new FileReader;S.onerror=m,S.onloadend=function(T){var w=btoa(T.target.result||"");b({__local_forage_encoded_blob:!0,data:w,type:f.type})},S.readAsBinaryString(f)})}function L(f){var b=_e(atob(f.data));return h([b],{type:f.type})}function M(f){return f&&f.__local_forage_encoded_blob}function v(f){var b=this,m=b._initReady().then(function(){var S=ue[b._dbInfo.name];if(S&&S.dbReady)return S.dbReady});return N(m,f,f),m}function y(f){Ve(f);for(var b=ue[f.name],m=b.forages,S=0;S<m.length;S++){var T=m[S];T._dbInfo.db&&(T._dbInfo.db.close(),T._dbInfo.db=null)}return f.db=null,ze(f).then(function(w){return f.db=w,A(f)?gt(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 Le(f,w),w})}function U(f,b,m,S){S===void 0&&(S=1);try{var T=f.db.transaction(f.storeName,b);m(null,T)}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),gt(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 T=ue[m.name];T||(T=Z(),ue[m.name]=T),T.forages.push(b),b._initReady||(b._initReady=b.ready,b.ready=v);var w=[];function R(){return E.resolve()}for(var V=0;V<T.forages.length;V++){var j=T.forages[V];j!==b&&w.push(j._initReady().catch(R))}var $=T.forages.slice(0);return E.all(w).then(function(){return m.db=T.db,ze(m)}).then(function(Y){return m.db=Y,A(m,b._defaultConfig.version)?gt(m):Y}).then(function(Y){m.db=T.db=Y,b._dbInfo=m;for(var re=0;re<$.length;re++){var Te=$[re];Te!==b&&(Te._dbInfo.db=m.db,Te._dbInfo.version=m.version)}})}function ie(f,b){var m=this;f=k(f);var S=new E(function(T,w){m.ready().then(function(){U(m._dbInfo,Ae,function(R,V){if(R)return w(R);try{var j=V.objectStore(m._dbInfo.storeName),$=j.get(f);$.onsuccess=function(){var Y=$.result;Y===void 0&&(Y=null),M(Y)&&(Y=L(Y)),T(Y)},$.onerror=function(){w($.error)}}catch(Y){w(Y)}})}).catch(w)});return C(S,b),S}function ce(f,b){var m=this,S=new E(function(T,w){m.ready().then(function(){U(m._dbInfo,Ae,function(R,V){if(R)return w(R);try{var j=V.objectStore(m._dbInfo.storeName),$=j.openCursor(),Y=1;$.onsuccess=function(){var re=$.result;if(re){var Te=re.value;M(Te)&&(Te=L(Te));var Ue=f(Te,re.key,Y++);Ue!==void 0?T(Ue):re.continue()}else T()},$.onerror=function(){w($.error)}}catch(re){w(re)}})}).catch(w)});return C(S,b),S}function Q(f,b,m){var S=this;f=k(f);var T=new E(function(w,R){var V;S.ready().then(function(){return V=S._dbInfo,q.call(b)==="[object Blob]"?ye(V.db).then(function(j){return j?b:O(b)}):b}).then(function(j){U(S._dbInfo,H,function($,Y){if($)return R($);try{var re=Y.objectStore(S._dbInfo.storeName);j===null&&(j=void 0);var Te=re.put(j,f);Y.oncomplete=function(){j===void 0&&(j=null),w(j)},Y.onabort=Y.onerror=function(){var Ue=Te.error?Te.error:Te.transaction.error;R(Ue)}}catch(Ue){R(Ue)}})}).catch(R)});return C(T,m),T}function oe(f,b){var m=this;f=k(f);var S=new E(function(T,w){m.ready().then(function(){U(m._dbInfo,H,function(R,V){if(R)return w(R);try{var j=V.objectStore(m._dbInfo.storeName),$=j.delete(f);V.oncomplete=function(){T()},V.onerror=function(){w($.error)},V.onabort=function(){var Y=$.error?$.error:$.transaction.error;w(Y)}}catch(Y){w(Y)}})}).catch(w)});return C(S,b),S}function ee(f){var b=this,m=new E(function(S,T){b.ready().then(function(){U(b._dbInfo,H,function(w,R){if(w)return T(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;T($)}}catch($){T($)}})}).catch(T)});return C(m,f),m}function pe(f){var b=this,m=new E(function(S,T){b.ready().then(function(){U(b._dbInfo,Ae,function(w,R){if(w)return T(w);try{var V=R.objectStore(b._dbInfo.storeName),j=V.count();j.onsuccess=function(){S(j.result)},j.onerror=function(){T(j.error)}}catch($){T($)}})}).catch(T)});return C(m,f),m}function se(f,b){var m=this,S=new E(function(T,w){if(f<0){T(null);return}m.ready().then(function(){U(m._dbInfo,Ae,function(R,V){if(R)return w(R);try{var j=V.objectStore(m._dbInfo.storeName),$=!1,Y=j.openKeyCursor();Y.onsuccess=function(){var re=Y.result;if(!re){T(null);return}f===0||$?T(re.key):($=!0,re.advance(f))},Y.onerror=function(){w(Y.error)}}catch(re){w(re)}})}).catch(w)});return C(S,b),S}function he(f){var b=this,m=new E(function(S,T){b.ready().then(function(){U(b._dbInfo,Ae,function(w,R){if(w)return T(w);try{var V=R.objectStore(b._dbInfo.storeName),j=V.openKeyCursor(),$=[];j.onsuccess=function(){var Y=j.result;if(!Y){S($);return}$.push(Y.key),Y.continue()},j.onerror=function(){T(j.error)}}catch(Y){T(Y)}})}).catch(T)});return C(m,f),m}function me(f,b){b=B.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,T;if(!f.name)T=E.reject("Invalid arguments");else{var w=f.name===m.name&&S._dbInfo.db,R=w?E.resolve(S._dbInfo.db):ze(f).then(function(V){var j=ue[f.name],$=j.forages;j.db=V;for(var Y=0;Y<$.length;Y++)$[Y]._dbInfo.db=V;return V});f.storeName?T=R.then(function(V){if(V.objectStoreNames.contains(f.storeName)){var j=V.version+1;Ve(f);var $=ue[f.name],Y=$.forages;V.close();for(var re=0;re<Y.length;re++){var Te=Y[re];Te._dbInfo.db=null,Te._dbInfo.version=j}var Ue=new E(function(He,at){var nt=d.open(f.name,j);nt.onerror=function(Wt){var Zr=nt.result;Zr.close(),at(Wt)},nt.onupgradeneeded=function(){var Wt=nt.result;Wt.deleteObjectStore(f.storeName)},nt.onsuccess=function(){var Wt=nt.result;Wt.close(),He(Wt)}});return Ue.then(function(He){$.db=He;for(var at=0;at<Y.length;at++){var nt=Y[at];nt._dbInfo.db=He,De(nt._dbInfo)}}).catch(function(He){throw(Le(f,He)||E.resolve()).catch(function(){}),He})}}):T=R.then(function(V){Ve(f);var j=ue[f.name],$=j.forages;V.close();for(var Y=0;Y<$.length;Y++){var re=$[Y];re._dbInfo.db=null}var Te=new E(function(Ue,He){var at=d.deleteDatabase(f.name);at.onerror=function(){var nt=at.result;nt&&nt.close(),He(at.error)},at.onblocked=function(){console.warn('dropInstance blocked for database "'+f.name+'" until all open connections are closed')},at.onsuccess=function(){var nt=at.result;nt&&nt.close(),Ue(nt)}});return Te.then(function(Ue){j.db=Ue;for(var He=0;He<$.length;He++){var at=$[He];De(at._dbInfo)}}).catch(function(Ue){throw(Le(f,Ue)||E.resolve()).catch(function(){}),Ue})})}return C(T,b),T}var ge={_driver:"asyncStorage",_initStorage:ne,_support:_(),iterate:ce,getItem:ie,setItem:Q,removeItem:oe,clear:ee,length:pe,key:se,keys:he,dropInstance:me};function p(){return typeof openDatabase=="function"}var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l="~~local_forage_type~",g=/^~~local_forage_type~([^~]+)~/,I="__lfsc__:",D=I.length,F="arbf",ve="blob",Ie="si08",Ce="ui08",ke="uic8",Be="si16",Ze="si32",Vt="ur16",Gt="ui32",Cn="fl32",St="fl64",kt=D+F.length,Ri=Object.prototype.toString;function ol(f){var b=f.length*.75,m=f.length,S,T=0,w,R,V,j;f[f.length-1]==="="&&(b--,f[f.length-2]==="="&&b--);var $=new ArrayBuffer(b),Y=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]),Y[T++]=w<<2|R>>4,Y[T++]=(R&15)<<4|V>>2,Y[T++]=(V&3)<<6|j&63;return $}function hs(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 jp(f,b){var m="";if(f&&(m=Ri.call(f)),f&&(m==="[object ArrayBuffer]"||f.buffer&&Ri.call(f.buffer)==="[object ArrayBuffer]")){var S,T=I;f instanceof ArrayBuffer?(S=f,T+=F):(S=f.buffer,m==="[object Int8Array]"?T+=Ie:m==="[object Uint8Array]"?T+=Ce:m==="[object Uint8ClampedArray]"?T+=ke:m==="[object Int16Array]"?T+=Be:m==="[object Uint16Array]"?T+=Vt:m==="[object Int32Array]"?T+=Ze:m==="[object Uint32Array]"?T+=Gt:m==="[object Float32Array]"?T+=Cn:m==="[object Float64Array]"?T+=St:b(new Error("Failed to get type for BinaryArray"))),b(T+hs(S))}else if(m==="[object Blob]"){var w=new FileReader;w.onload=function(){var R=l+f.type+"~"+hs(this.result);b(I+ve+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,D)!==I)return JSON.parse(f);var b=f.substring(kt),m=f.substring(D,kt),S;if(m===ve&&g.test(b)){var T=b.match(g);S=T[1],b=b.substring(T[0].length)}var w=ol(b);switch(m){case F:return w;case ve:return h([w],{type:S});case Ie:return new Int8Array(w);case Ce:return new Uint8Array(w);case ke:return new Uint8ClampedArray(w);case Be:return new Int16Array(w);case Vt:return new Uint16Array(w);case Ze:return new Int32Array(w);case Gt:return new Uint32Array(w);case Cn:return new Float32Array(w);case St:return new Float64Array(w);default:throw new Error("Unkown type: "+m)}}var ms={serialize:jp,deserialize:$p,stringToBuffer:ol,bufferToString:hs};function sl(f,b,m,S){f.executeSql("CREATE TABLE IF NOT EXISTS "+b.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],m,S)}function Gp(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 T=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){sl(V,m,function(){b._dbInfo=m,w()},function(j,$){R($)})},R)});return m.serializer=ms,T}function kn(f,b,m,S,T,w){f.executeSql(m,S,T,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):sl(j,b,function(){j.executeSql(m,S,T,w)},w)},w):w(R,V)},w)}function Wp(f,b){var m=this;f=k(f);var S=new E(function(T,w){m.ready().then(function(){var R=m._dbInfo;R.db.transaction(function(V){kn(V,R,"SELECT * FROM "+R.storeName+" WHERE key = ? LIMIT 1",[f],function(j,$){var Y=$.rows.length?$.rows.item(0).value:null;Y&&(Y=R.serializer.deserialize(Y)),T(Y)},function(j,$){w($)})})}).catch(w)});return C(S,b),S}function Yp(f,b){var m=this,S=new E(function(T,w){m.ready().then(function(){var R=m._dbInfo;R.db.transaction(function(V){kn(V,R,"SELECT * FROM "+R.storeName,[],function(j,$){for(var Y=$.rows,re=Y.length,Te=0;Te<re;Te++){var Ue=Y.item(Te),He=Ue.value;if(He&&(He=R.serializer.deserialize(He)),He=f(He,Ue.key,Te+1),He!==void 0){T(He);return}}T()},function(j,$){w($)})})}).catch(w)});return C(S,b),S}function al(f,b,m,S){var T=this;f=k(f);var w=new E(function(R,V){T.ready().then(function(){b===void 0&&(b=null);var j=b,$=T._dbInfo;$.serializer.serialize(b,function(Y,re){re?V(re):$.db.transaction(function(Te){kn(Te,$,"INSERT OR REPLACE INTO "+$.storeName+" (key, value) VALUES (?, ?)",[f,Y],function(){R(j)},function(Ue,He){V(He)})},function(Te){if(Te.code===Te.QUOTA_ERR){if(S>0){R(al.apply(T,[f,j,m,S-1]));return}V(Te)}})})}).catch(V)});return C(w,m),w}function zp(f,b,m){return al.apply(this,[f,b,m,1])}function Kp(f,b){var m=this;f=k(f);var S=new E(function(T,w){m.ready().then(function(){var R=m._dbInfo;R.db.transaction(function(V){kn(V,R,"DELETE FROM "+R.storeName+" WHERE key = ?",[f],function(){T()},function(j,$){w($)})})}).catch(w)});return C(S,b),S}function Xp(f){var b=this,m=new E(function(S,T){b.ready().then(function(){var w=b._dbInfo;w.db.transaction(function(R){kn(R,w,"DELETE FROM "+w.storeName,[],function(){S()},function(V,j){T(j)})})}).catch(T)});return C(m,f),m}function qp(f){var b=this,m=new E(function(S,T){b.ready().then(function(){var w=b._dbInfo;w.db.transaction(function(R){kn(R,w,"SELECT COUNT(key) as c FROM "+w.storeName,[],function(V,j){var $=j.rows.item(0).c;S($)},function(V,j){T(j)})})}).catch(T)});return C(m,f),m}function Zp(f,b){var m=this,S=new E(function(T,w){m.ready().then(function(){var R=m._dbInfo;R.db.transaction(function(V){kn(V,R,"SELECT key FROM "+R.storeName+" WHERE id = ? LIMIT 1",[f+1],function(j,$){var Y=$.rows.length?$.rows.item(0).key:null;T(Y)},function(j,$){w($)})})}).catch(w)});return C(S,b),S}function Jp(f){var b=this,m=new E(function(S,T){b.ready().then(function(){var w=b._dbInfo;w.db.transaction(function(R){kn(R,w,"SELECT key FROM "+w.storeName,[],function(V,j){for(var $=[],Y=0;Y<j.rows.length;Y++)$.push(j.rows.item(Y).key);S($)},function(V,j){T(j)})})}).catch(T)});return C(m,f),m}function Qp(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(T,w){for(var R=[],V=0;V<w.rows.length;V++)R.push(w.rows.item(V).name);b({db:f,storeNames:R})},function(T,w){m(w)})},function(S){m(S)})})}function eh(f,b){b=B.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,T;return f.name?T=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(Qp(R))}).then(function(w){return new E(function(R,V){w.db.transaction(function(j){function $(Ue){return new E(function(He,at){j.executeSql("DROP TABLE IF EXISTS "+Ue,[],function(){He()},function(nt,Wt){at(Wt)})})}for(var Y=[],re=0,Te=w.storeNames.length;re<Te;re++)Y.push($(w.storeNames[re]));E.all(Y).then(function(){R()}).catch(function(Ue){V(Ue)})},function(j){V(j)})})}):T=E.reject("Invalid arguments"),C(T,b),T}var th={_driver:"webSQLStorage",_initStorage:Gp,_support:p(),iterate:Yp,getItem:Wp,setItem:zp,removeItem:Kp,clear:Xp,length:qp,key:Zp,keys:Jp,dropInstance:eh};function nh(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function cl(f,b){var m=f.name+"/";return f.storeName!==b.storeName&&(m+=f.storeName+"/"),m}function rh(){var f="_localforage_support_test";try{return localStorage.setItem(f,!0),localStorage.removeItem(f),!1}catch{return!0}}function ih(){return!rh()||localStorage.length>0}function oh(f){var b=this,m={};if(f)for(var S in f)m[S]=f[S];return m.keyPrefix=cl(f,b._defaultConfig),ih()?(b._dbInfo=m,m.serializer=ms,E.resolve()):E.reject()}function sh(f){var b=this,m=b.ready().then(function(){for(var S=b._dbInfo.keyPrefix,T=localStorage.length-1;T>=0;T--){var w=localStorage.key(T);w.indexOf(S)===0&&localStorage.removeItem(w)}});return C(m,f),m}function ah(f,b){var m=this;f=k(f);var S=m.ready().then(function(){var T=m._dbInfo,w=localStorage.getItem(T.keyPrefix+f);return w&&(w=T.serializer.deserialize(w)),w});return C(S,b),S}function ch(f,b){var m=this,S=m.ready().then(function(){for(var T=m._dbInfo,w=T.keyPrefix,R=w.length,V=localStorage.length,j=1,$=0;$<V;$++){var Y=localStorage.key($);if(Y.indexOf(w)===0){var re=localStorage.getItem(Y);if(re&&(re=T.serializer.deserialize(re)),re=f(re,Y.substring(R),j++),re!==void 0)return re}}});return C(S,b),S}function lh(f,b){var m=this,S=m.ready().then(function(){var T=m._dbInfo,w;try{w=localStorage.key(f)}catch{w=null}return w&&(w=w.substring(T.keyPrefix.length)),w});return C(S,b),S}function uh(f){var b=this,m=b.ready().then(function(){for(var S=b._dbInfo,T=localStorage.length,w=[],R=0;R<T;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 dh(f){var b=this,m=b.keys().then(function(S){return S.length});return C(m,f),m}function fh(f,b){var m=this;f=k(f);var S=m.ready().then(function(){var T=m._dbInfo;localStorage.removeItem(T.keyPrefix+f)});return C(S,b),S}function ph(f,b,m){var S=this;f=k(f);var T=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($,Y){if(Y)V(Y);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(T,m),T}function hh(f,b){if(b=B.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,T;return f.name?T=new E(function(w){f.storeName?w(cl(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)}}):T=E.reject("Invalid arguments"),C(T,b),T}var mh={_driver:"localStorageWrapper",_initStorage:oh,_support:nh(),iterate:ch,getItem:ah,setItem:ph,removeItem:fh,clear:sh,length:dh,key:lh,keys:uh,dropInstance:hh},gh=function(b,m){return b===m||typeof b=="number"&&typeof m=="number"&&isNaN(b)&&isNaN(m)},_h=function(b,m){for(var S=b.length,T=0;T<S;){if(gh(b[T],m))return!0;T++}return!1},ll=Array.isArray||function(f){return Object.prototype.toString.call(f)==="[object Array]"},qr={},ul={},hr={INDEXEDDB:ge,WEBSQL:th,LOCALSTORAGE:mh},vh=[hr.INDEXEDDB._driver,hr.WEBSQL._driver,hr.LOCALSTORAGE._driver],Mi=["dropInstance"],gs=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(Mi),yh={description:"",driver:vh.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function Eh(f,b){f[b]=function(){var m=arguments;return f.ready().then(function(){return f[b].apply(f,m)})}}function _s(){for(var f=1;f<arguments.length;f++){var b=arguments[f];if(b)for(var m in b)b.hasOwnProperty(m)&&(ll(b[m])?arguments[0][m]=b[m].slice():arguments[0][m]=b[m])}return arguments[0]}var bh=function(){function f(b){c(this,f);for(var m in hr)if(hr.hasOwnProperty(m)){var S=hr[m],T=S._driver;this[m]=T,qr[T]||this.defineDriver(S)}this._defaultConfig=_s({},yh),this._config=_s({},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,T){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 Y=gs.concat("_initStorage"),re=0,Te=Y.length;re<Te;re++){var Ue=Y[re],He=!_h(Mi,Ue);if((He||m[Ue])&&typeof m[Ue]!="function"){V($);return}}var at=function(){for(var Zr=function(Sh){return function(){var Ih=new Error("Method "+Sh+" is not implemented by the current driver"),dl=E.reject(Ih);return C(dl,arguments[arguments.length-1]),dl}},vs=0,wh=Mi.length;vs<wh;vs++){var ys=Mi[vs];m[ys]||(m[ys]=Zr(ys))}};at();var nt=function(Zr){qr[j]&&console.info("Redefining LocalForage driver: "+j),qr[j]=m,ul[j]=Zr,R()};"_support"in m?m._support&&typeof m._support=="function"?m._support().then(nt,V):nt(!!m._support):nt(!0)}catch(Wt){V(Wt)}});return N(w,S,T),w},f.prototype.driver=function(){return this._driver||null},f.prototype.getDriver=function(m,S,T){var w=qr[m]?E.resolve(qr[m]):E.reject(new Error("Driver not found."));return N(w,S,T),w},f.prototype.getSerializer=function(m){var S=E.resolve(ms);return N(S,m),S},f.prototype.ready=function(m){var S=this,T=S._driverSet.then(function(){return S._ready===null&&(S._ready=S._initDriver()),S._ready});return N(T,m,m),T},f.prototype.setDriver=function(m,S,T){var w=this;ll(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 Te=0;function Ue(){for(;Te<re.length;){var He=re[Te];return Te++,w._dbInfo=null,w._ready=null,w.getDriver(He).then(j).catch(Ue)}V();var at=new Error("No available storage method found.");return w._driverSet=E.reject(at),w._driverSet}return Ue()}}var Y=this._driverSet!==null?this._driverSet.catch(function(){return E.resolve()}):E.resolve();return this._driverSet=Y.then(function(){var re=R[0];return w._dbInfo=null,w._ready=null,w.getDriver(re).then(function(Te){w._driver=Te._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}),N(this._driverSet,S,T),this._driverSet},f.prototype.supports=function(m){return!!ul[m]},f.prototype._extend=function(m){_s(this,m)},f.prototype._getSupportedDrivers=function(m){for(var S=[],T=0,w=m.length;T<w;T++){var R=m[T];this.supports(R)&&S.push(R)}return S},f.prototype._wrapLibraryMethodsWithReady=function(){for(var m=0,S=gs.length;m<S;m++)Eh(this,gs[m])},f.prototype.createInstance=function(m){return new f(m)},f}(),Ch=new bh;i.exports=Ch},{3:3}]},{},[4])(4)})});var tf=Es((Po,ef)=>{"use strict";(function(t,e){typeof Po=="object"&&typeof ef<"u"?e(Po):typeof define=="function"&&define.amd?define(["exports"],e):e((t=typeof globalThis<"u"?globalThis:t||self).Sqrl={})})(Po,function(t){"use strict";function e(A){var O,L,M=new Error(A);return O=M,L=e.prototype,Object.setPrototypeOf?Object.setPrototypeOf(O,L):O.__proto__=L,M}function n(A,O,L){var M=O.slice(0,L).split(/\n/),v=M.length,y=M[v-1].length+1;throw e(A+=" at line "+v+" col "+y+`:
|
|
2
2
|
|
|
3
3
|
`+O.split(/\n/)[v-1]+`
|
|
4
|
-
`+Array(y).join(" ")+"^")}e.prototype=Object.create(Error.prototype,{name:{value:"Squirrelly Error",enumerable:!1}});var r=new Function("return this")().Promise,i=!1;try{i=new Function("return (async function(){}).constructor")()}catch(A){if(!(A instanceof SyntaxError))throw A}function o(A,O){return Object.prototype.hasOwnProperty.call(A,O)}function s(A,O,
|
|
5
|
-
`).replace(/^\s+|\s+$/gm,"")),u.lastIndex=0,d.lastIndex=0,_.lastIndex=0;var
|
|
6
|
-
`)}}return v}var q=function(){function A(O){this.cache=O}return A.prototype.define=function(O,
|
|
4
|
+
`+Array(y).join(" ")+"^")}e.prototype=Object.create(Error.prototype,{name:{value:"Squirrelly Error",enumerable:!1}});var r=new Function("return this")().Promise,i=!1;try{i=new Function("return (async function(){}).constructor")()}catch(A){if(!(A instanceof SyntaxError))throw A}function o(A,O){return Object.prototype.hasOwnProperty.call(A,O)}function s(A,O,L){for(var M in O)o(O,M)&&(O[M]==null||typeof O[M]!="object"||M!=="storage"&&M!=="prefixes"||L?A[M]=O[M]:A[M]=s({},O[M]));return A}var c=/^async +/,u=/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})*}|(?!\${)[^\\`])*`/g,d=/'(?:\\[\s\w"'\\`]|[^\n\r'\\])*?'/g,_=/"(?:\\[\s\w"'\\`]|[^\n\r"\\])*?"/g,h=/[.*+\-?^${}()|[\]\\]/g;function E(A){return h.test(A)?A.replace(h,"\\$&"):A}function C(A,O){O.rmWhitespace&&(A=A.replace(/[\r\n]+/g,`
|
|
5
|
+
`).replace(/^\s+|\s+$/gm,"")),u.lastIndex=0,d.lastIndex=0,_.lastIndex=0;var L=O.prefixes,M=[L.h,L.b,L.i,L.r,L.c,L.e].reduce(function(oe,ee){return oe&&ee?oe+"|"+E(ee):ee?E(ee):oe},""),v=new RegExp("([|()]|=>)|('|\"|`|\\/\\*)|\\s*((\\/)?(-|_)?"+E(O.tags[1])+")","g"),y=new RegExp("([^]*?)"+E(O.tags[0])+"(-|_)?\\s*("+M+")?\\s*","g"),U=0,Z=!1;function ne(oe,ee){var pe,se={f:[]},he=0,me="c";function ge(ve){var Ie=A.slice(U,ve),Ce=Ie.trim();if(me==="f")Ce==="safe"?se.raw=!0:O.async&&c.test(Ce)?(Ce=Ce.replace(c,""),se.f.push([Ce,"",!0])):se.f.push([Ce,""]);else if(me==="fp")se.f[se.f.length-1][1]+=Ce;else if(me==="err"){if(Ce){var ke=Ie.search(/\S/);n("invalid syntax",A,U+ke)}}else se[me]=Ce;U=ve+1}for(ee==="h"||ee==="b"||ee==="c"?me="n":ee==="r"&&(se.raw=!0,ee="i"),v.lastIndex=U;(pe=v.exec(A))!==null;){var p=pe[1],a=pe[2],l=pe[3],g=pe[4],I=pe[5],D=pe.index;if(p)p==="("?(he===0&&(me==="n"?(ge(D),me="p"):me==="f"&&(ge(D),me="fp")),he++):p===")"?--he===0&&me!=="c"&&(ge(D),me="err"):he===0&&p==="|"?(ge(D),me="f"):p==="=>"&&(ge(D),U+=1,me="res");else if(a)if(a==="/*"){var F=A.indexOf("*/",v.lastIndex);F===-1&&n("unclosed comment",A,pe.index),v.lastIndex=F+2}else a==="'"?(d.lastIndex=pe.index,d.exec(A)?v.lastIndex=d.lastIndex:n("unclosed string",A,pe.index)):a==='"'?(_.lastIndex=pe.index,_.exec(A)?v.lastIndex=_.lastIndex:n("unclosed string",A,pe.index)):a==="`"&&(u.lastIndex=pe.index,u.exec(A)?v.lastIndex=u.lastIndex:n("unclosed string",A,pe.index));else if(l)return ge(D),U=D+pe[0].length,y.lastIndex=U,Z=I,g&&ee==="h"&&(ee="s"),se.t=ee,se}return n("unclosed tag",A,oe),se}var ie=function oe(ee,pe){ee.b=[],ee.d=[];var se,he=!1,me=[];function ge(ke,Be){ke&&(ke=function(Ze,Vt,Gt,Cn){var St,kt;return typeof Vt.autoTrim=="string"?St=kt=Vt.autoTrim:Array.isArray(Vt.autoTrim)&&(St=Vt.autoTrim[1],kt=Vt.autoTrim[0]),(Gt||Gt===!1)&&(St=Gt),(Cn||Cn===!1)&&(kt=Cn),St==="slurp"&&kt==="slurp"?Ze.trim():(St==="_"||St==="slurp"?Ze=String.prototype.trimLeft?Ze.trimLeft():Ze.replace(/^[\s\uFEFF\xA0]+/,""):St!=="-"&&St!=="nl"||(Ze=Ze.replace(/^(?:\n|\r|\r\n)/,"")),kt==="_"||kt==="slurp"?Ze=String.prototype.trimRight?Ze.trimRight():Ze.replace(/[\s\uFEFF\xA0]+$/,""):kt!=="-"&&kt!=="nl"||(Ze=Ze.replace(/(?:\n|\r|\r\n)$/,"")),Ze)}(ke,O,Z,Be))&&(ke=ke.replace(/\\|'/g,"\\$&").replace(/\r\n|\n|\r/g,"\\n"),me.push(ke))}for(;(se=y.exec(A))!==null;){var p,a=se[1],l=se[2],g=se[3]||"";for(var I in L)if(L[I]===g){p=I;break}ge(a,l),U=se.index+se[0].length,p||n("unrecognized tag type: "+g,A,U);var D=ne(se.index,p),F=D.t;if(F==="h"){var ve=D.n||"";O.async&&c.test(ve)&&(D.a=!0,D.n=ve.replace(c,"")),D=oe(D),me.push(D)}else if(F==="c"){if(ee.n===D.n)return he?(he.d=me,ee.b.push(he)):ee.d=me,ee;n("Helper start and end don't match",A,se.index+se[0].length)}else if(F==="b"){he?(he.d=me,ee.b.push(he)):ee.d=me;var Ie=D.n||"";O.async&&c.test(Ie)&&(D.a=!0,D.n=Ie.replace(c,"")),he=D,me=[]}else if(F==="s"){var Ce=D.n||"";O.async&&c.test(Ce)&&(D.a=!0,D.n=Ce.replace(c,"")),me.push(D)}else me.push(D)}if(!pe)throw e('unclosed helper "'+ee.n+'"');return ge(A.slice(U,A.length),!1),ee.d=me,ee}({f:[]},!0);if(O.plugins)for(var ce=0;ce<O.plugins.length;ce++){var Q=O.plugins[ce];Q.processAST&&(ie.d=Q.processAST(ie.d,O))}return ie.d}function N(A,O){var L=C(A,O),M="var tR='';"+(O.useWith?"with("+O.varName+"||{}){":"")+ue(L,O)+"if(cb){cb(null,tR)} return tR"+(O.useWith?"}":"");if(O.plugins)for(var v=0;v<O.plugins.length;v++){var y=O.plugins[v];y.processFnString&&(M=y.processFnString(M,O))}return M}function k(A,O){for(var L=0;L<O.length;L++){var M=O[L][0],v=O[L][1];A=(O[L][2]?"await ":"")+"c.l('F','"+M+"')("+A,v&&(A+=","+v),A+=")"}return A}function B(A,O,L,M,v,y){var U="{exec:"+(v?"async ":"")+J(L,O,A)+",params:["+M+"]";return y&&(U+=",name:'"+y+"'"),v&&(U+=",async:true"),U+="}"}function X(A,O){for(var L="[",M=0;M<A.length;M++){var v=A[M];L+=B(O,v.res||"",v.d,v.p||"",v.a,v.n),M<A.length&&(L+=",")}return L+="]"}function J(A,O,L){return"function("+O+"){var tR='';"+ue(A,L)+"return tR}"}function ue(A,O){for(var L=0,M=A.length,v="";L<M;L++){var y=A[L];if(typeof y=="string")v+="tR+='"+y+"';";else{var U=y.t,Z=y.c||"",ne=y.f,ie=y.n||"",ce=y.p||"",Q=y.res||"",oe=y.b,ee=!!y.a;if(U==="i"){O.defaultFilter&&(Z="c.l('F','"+O.defaultFilter+"')("+Z+")");var pe=k(Z,ne);!y.raw&&O.autoEscape&&(pe="c.l('F','e')("+pe+")"),v+="tR+="+pe+";"}else if(U==="h")if(O.storage.nativeHelpers.get(ie))v+=O.storage.nativeHelpers.get(ie)(y,O);else{var se=(ee?"await ":"")+"c.l('H','"+ie+"')("+B(O,Q,y.d,ce,ee);se+=oe?","+X(oe,O):",[]",v+="tR+="+k(se+=",c)",ne)+";"}else U==="s"?v+="tR+="+k((ee?"await ":"")+"c.l('H','"+ie+"')({params:["+ce+"]},[],c)",ne)+";":U==="e"&&(v+=Z+`
|
|
6
|
+
`)}}return v}var q=function(){function A(O){this.cache=O}return A.prototype.define=function(O,L){this.cache[O]=L},A.prototype.get=function(O){return this.cache[O]},A.prototype.remove=function(O){delete this.cache[O]},A.prototype.reset=function(){this.cache={}},A.prototype.load=function(O){s(this.cache,O,!0)},A}();function Ae(A,O,L,M){if(O&&O.length>0)throw e((M?"Native":"")+"Helper '"+A+"' doesn't accept blocks");if(L&&L.length>0)throw e((M?"Native":"")+"Helper '"+A+"' doesn't accept filters")}var H={"&":"&","<":"<",">":">",'"':""","'":"'"};function _e(A){return H[A]}var de=new q({}),ye=new q({each:function(A,O){var L="",M=A.params[0];if(Ae("each",O,!1),A.async)return new Promise(function(y){(function U(Z,ne,ie,ce,Q){ie(Z[ne],ne).then(function(oe){ce+=oe,ne===Z.length-1?Q(ce):U(Z,ne+1,ie,ce,Q)})})(M,0,A.exec,L,y)});for(var v=0;v<M.length;v++)L+=A.exec(M[v],v);return L},foreach:function(A,O){var L=A.params[0];if(Ae("foreach",O,!1),A.async)return new Promise(function(y){(function U(Z,ne,ie,ce,Q,oe){ce(ne[ie],Z[ne[ie]]).then(function(ee){Q+=ee,ie===ne.length-1?oe(Q):U(Z,ne,ie+1,ce,Q,oe)})})(L,Object.keys(L),0,A.exec,"",y)});var M="";for(var v in L)o(L,v)&&(M+=A.exec(v,L[v]));return M},include:function(A,O,L){Ae("include",O,!1);var M=L.storage.templates.get(A.params[0]);if(!M)throw e('Could not fetch template "'+A.params[0]+'"');return M(A.params[1],L)},extends:function(A,O,L){var M=A.params[1]||{};M.content=A.exec();for(var v=0;v<O.length;v++){var y=O[v];M[y.name]=y.exec()}var U=L.storage.templates.get(A.params[0]);if(!U)throw e('Could not fetch template "'+A.params[0]+'"');return U(M,L)},useScope:function(A,O){return Ae("useScope",O,!1),A.exec(A.params[0])}}),Ve=new q({if:function(A,O){Ae("if",!1,A.f,!0);var L="if("+A.p+"){"+ue(A.d,O)+"}";if(A.b)for(var M=0;M<A.b.length;M++){var v=A.b[M];v.n==="else"?L+="else{"+ue(v.d,O)+"}":v.n==="elif"&&(L+="else if("+v.p+"){"+ue(v.d,O)+"}")}return L},try:function(A,O){if(Ae("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 L="try{"+ue(A.d,O)+"}",M=A.b[0];return L+="catch"+(M.res?"("+M.res+")":"")+"{"+ue(M.d,O)+"}"},block:function(A,O){return Ae("block",A.b,A.f,!0),"if(!"+O.varName+"["+A.p+"]){tR+=("+J(A.d,"",O)+")()}else{tR+="+O.varName+"["+A.p+"]}"}}),De=new q({e:function(A){var O=String(A);return/[&<>"']/.test(O)?O.replace(/[&<>"']/g,_e):O}}),Le={varName:"it",autoTrim:[!1,"nl"],autoEscape:!0,defaultFilter:!1,tags:["{{","}}"],l:function(A,O){if(A==="H"){var L=this.storage.helpers.get(O);if(L)return L;throw e("Can't find helper '"+O+"'")}if(A==="F"){var M=this.storage.filters.get(O);if(M)return M;throw e("Can't find filter '"+O+"'")}},async:!1,storage:{helpers:ye,nativeHelpers:Ve,filters:De,templates:de},prefixes:{h:"@",b:"#",i:"",r:"*",c:"/",e:"!"},cache:!1,plugins:[],useWith:!1};function Ge(A,O){var L={};return s(L,Le),O&&s(L,O),A&&s(L,A),L.l.bind(L),L}function ze(A,O){var L,M=Ge(O||{}),v=Function;if(M.async){if(!i)throw e("This environment doesn't support async/await");v=i}if(M.varName&&(L=M.varName,/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(L)===!1))throw e("options.varName must be a valid JS identifier");try{return new v(M.varName,"c","cb",N(A,M))}catch(y){throw y instanceof SyntaxError?e(`Bad template syntax
|
|
7
7
|
|
|
8
8
|
`+y.message+`
|
|
9
9
|
`+Array(y.message.length+1).join("=")+`
|
|
10
|
-
`+N(A,M)):y}}function gt(A,O){var P;return O.cache&&O.name&&O.storage.templates.get(O.name)?O.storage.templates.get(O.name):(P=typeof A=="function"?A:ze(A,O),O.cache&&O.name&&O.storage.templates.define(O.name,P),P)}Le.l.bind(Le),t.compile=ze,t.compileScope=ue,t.compileScopeIntoFunction=J,t.compileToString=N,t.defaultConfig=Le,t.filters=De,t.getConfig=Ge,t.helpers=ye,t.nativeHelpers=ke,t.parse=C,t.render=function(A,O,P,M){var v=Ge(P||{});if(!v.async)return gt(A,v)(O,v);if(!M){if(typeof r=="function")return new r(function(y,U){try{y(gt(A,v)(O,v))}catch(Z){U(Z)}});throw e("Please provide a callback function, this env doesn't support Promises")}try{gt(A,v)(O,v,M)}catch(y){return M(y)}},t.templates=de,Object.defineProperty(t,"__esModule",{value:!0})})});var Ih={schedule(t,e){let n=setTimeout(t,e);return()=>clearTimeout(n)}};function xh(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function Oh(t){return!!t&&t.nodeType===Node.ELEMENT_NODE}var Ps;function Ah(t,e){if(!Ps){let n=Element.prototype;Ps=n.matches||n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector}return t.nodeType===Node.ELEMENT_NODE?Ps.call(t,e):!1}function Dh(t){let e={};return t.forEach(({propName:n,templateName:r,transform:i})=>{e[xh(r)]=[n,i]}),e}function Nh(t,e){return e.get(ws).resolveComponentFactory(t).inputs}function Rh(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=Mh(c,e,i);u!==-1&&r[u].push(c)}return r}function Mh(t,e,n){let r=n;return Oh(t)&&e.some((i,o)=>i!=="*"&&Ah(t,i)?(r=o,!0):!1),r}var Ph=10,Ls=class{componentFactory;inputMap=new Map;constructor(e,n){this.componentFactory=n.get(ws).resolveComponentFactory(e);for(let r of this.componentFactory.inputs)this.inputMap.set(r.propName,r.templateName)}create(e){return new Fs(this.componentFactory,e,this.inputMap)}},Fs=class{componentFactory;injector;inputMap;eventEmitters=new ml(1);events=this.eventEmitters.pipe(Sl(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(Pt),this.appRef=this.injector.get(Vi),this.cdScheduler=n.get(xl),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=Ih.schedule(()=>{this.componentRef!==null&&(this.componentRef.destroy(),this.componentRef=null)},Ph))})}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=Mt.create({providers:[],parent:this.injector}),r=Rh(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 pl(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()}},ks=class extends HTMLElement{ngElementEventsSubscription=null};function Xl(t,e){let n=Nh(t,e.injector),r=e.strategyFactory||new Ls(t,e.injector),i=Dh(n);class o extends ks{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 _=this[u];delete this[u],c.setInputValue(u,_,d)})}return this._ngElementStrategy}_ngElementStrategy;constructor(c){super(),this.injector=c}attributeChangedCallback(c,u,d,_){let[h,E]=i[c];this.ngElementStrategy.setInputValue(h,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 ql="9.14.4";var qe=class t{static SDK_VERSION=ql;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 Dn={apiURL:"https://api.sdk.letscooee.com",debug:!1,mode:"production",styleURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${qe.SDK_VERSION}/dist/widget.min.css`,widgetURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${qe.SDK_VERSION}/dist/widget.min.js`};var Ut=Es(Jl());var We=class{static log(...e){Ut.default.info(...e)}static debug(...e){Ut.default.debug(...e)}static error(...e){Ut.default.error(...e)}static warn(...e){Ut.default.warn(...e)}static info(...e){Ut.default.info(...e)}static trace(...e){Ut.default.trace(...e)}};function Ql(t=qe.LOG_PREFIX){Ut.default.useDefaults({formatter:function(n){n.unshift(`${t} (v${qe.SDK_VERSION}):`)}});let e=Fh();(e==="1"||e==="on")&&(localStorage.cooeeLogLevel="TRACE"),localStorage.cooeeLogLevel?Ut.default.setLevel(Ut.default[localStorage.cooeeLogLevel]):Ut.default.setLevel(Dn.debug?Ut.default.TRACE:Ut.default.OFF)}function Fh(){return new URL(location.href).searchParams?.get("cooee-debug")}var eu={providers:[Fl()]};var Vh={"[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"},xE=Ee(x({},Vh),{"[class.ng-submitted]":"isSubmitted"});var Bh=new tn("",{providedIn:"root",factory:()=>ru}),ru="always";var Uh=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=qn({type:t});static \u0275inj=zn({})}return t})();var iu=(()=>{class t{static withConfig(n){return{ngModule:t,providers:[{provide:Bh,useValue:n.callSetDisabledState??ru}]}}static \u0275fac=function(r){return new(r||t)};static \u0275mod=qn({type:t});static \u0275inj=zn({imports:[Uh]})}return t})();var zt=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("/"),_=c.cssText;_=_.replace(/url\s*\(\s*['"]?(?!((\/)|((?:https?:)?\/\/)|(?:data:?:)))([^'")]+)['"]?\s*\)/g,`url("${d}/$4")`);let h=document.createElement("style");h.appendChild(document.createTextNode(_)),document.head.appendChild(h)}}}),n.appendChild(r)}static async loadSwiperScript(){window.CooeeSDK.Swiper||(window.CooeeSDK.Swiper=(await import("https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.mjs")).Swiper)}};var Kt=class t{cooeeEvent=new ct;cooeeCTA=new ct;elementRef=z(Tt);_engagementTrigger=Lt(null);_triggerContext=Lt(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(){We.debug("Init",this.constructor.name);let e=this.elementRef.nativeElement.shadowRoot;e&&(zt.injectStylesheet(Dn.styleURL,e),zt.injectRawCSS(window.CooeeSDK.config.website.commonCSS,e))}ngOnDestroy(){We.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=Me({type:t,selectors:[["ng-component"]],hostVars:2,hostBindings:function(n,r){n&2&&Rl(r.classes)},inputs:{triggerContext:"triggerContext"},outputs:{cooeeEvent:"cooeeEvent",cooeeCTA:"cooeeCTA"},decls:0,vars:0,template:function(n,r){},encapsulation:2})};var Hh=(t,e)=>({"--option-color":t,"background-color":e}),ou=(t,e)=>e.id;function jh(t,e){if(t&1&&(G(0,"span",6),Oe(1),W()),t&2){K();let n=Xe(1);L(),cn(n)}}function $h(t,e){if(t&1){let n=Ke();lt(0)(1)(2),G(3,"button",5),Pe("click",function(){let i=Ne(n).$implicit,o=K().$implicit,s=K();return Re(s.onOptionChange(o,i))}),xe(4,jh,2,1,"span",6),W()}if(t&2){let n,r=e.$implicit,i=K().$implicit,o=Xe(1),s=K(),c=r.name;L();let u=vt(r.displayName||r.name),d=o?(n=r.hexColor)!==null&&n!==void 0?n:c:"";L(2),Os("color-type",o)("selected",s.selectedOptions()[i.name]===c),le("disabled",r.disabled)("title",u)("ngStyle",Ui(10,Hh,d,d)),Cn("data-value",c),L(),Se(o?-1:4)}}function Gh(t,e){if(t&1&&(G(0,"div"),lt(1),G(2,"div",1),Oe(3),W(),G(4,"div",2),Oe(5),W(),G(6,"div",3),rt(7,$h,5,13,"button",4,ou),W()()),t&2){let n=e.$implicit,r=K();Ml("option-group ",n.name.toLowerCase(),""),L(),vt(r.hasHexColors(n)),L(2),It("",n.name,":"),L(2),cn(r.selectedOptions()[n.name]),L(2),it(n.optionValues)}}var yr=class t extends Kt{selectedVariant=new ct;item=Xn.required();selectedOptions=Lt({});options=vr(()=>{let e=this.item();if(!e.options||e.vars.length===1)return[];if(window.cooeeManipulateProduct)try{window.cooeeManipulateProduct(e,this.engagementTrigger)}catch(n){We.error(n)}return e.options});matchedVariant=vr(()=>{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(),Ns(()=>{let n=this.matchedVariant();n&&(this.item().setSelectedVariant(n),this.selectedVariant.emit(n))});let e=Ns(()=>{let n=this.item();if(!n?.options)return;let r=x({},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=x({},this.selectedOptions());r[e.name]=n.name,this.selectedOptions.set(r)}engagementTriggerReceived(){}update(){}hasHexColors(e){return!!e.optionValues[0]?.name.match(/#[a-f0-9]{6}\b/i)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Me({type:t,selectors:[["cooee-item-options-picker"]],inputs:{item:[1,"item"]},outputs:{selectedVariant:"selectedVariant"},features:[Ct],decls:2,vars:0,consts:[[3,"class"],[1,"name"],[1,"selected-value"],[1,"option-values"],[1,"option-value",3,"disabled","color-type","selected","title","ngStyle"],[1,"option-value",3,"click","disabled","title","ngStyle"],[1,"title"]],template:function(n,r){n&1&&rt(0,Gh,9,6,"div",0,ou),n&2&&it(r.options())},dependencies:[Hl,Bl,iu],styles:[`.option-group{display:flex;gap:4px;align-items:center}.option-group+.option-group{margin-top:8px}.option-values{display:flex;flex-wrap:nowrap;overflow-x:auto;padding:6px;gap:4px}.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
|
|
12
|
-
`);for(let c=r;c<s.length;c++){let u=s[c];if(u.length>1024)continue;let d=
|
|
10
|
+
`+N(A,M)):y}}function gt(A,O){var L;return O.cache&&O.name&&O.storage.templates.get(O.name)?O.storage.templates.get(O.name):(L=typeof A=="function"?A:ze(A,O),O.cache&&O.name&&O.storage.templates.define(O.name,L),L)}Le.l.bind(Le),t.compile=ze,t.compileScope=ue,t.compileScopeIntoFunction=J,t.compileToString=N,t.defaultConfig=Le,t.filters=De,t.getConfig=Ge,t.helpers=ye,t.nativeHelpers=Ve,t.parse=C,t.render=function(A,O,L,M){var v=Ge(L||{});if(!v.async)return gt(A,v)(O,v);if(!M){if(typeof r=="function")return new r(function(y,U){try{y(gt(A,v)(O,v))}catch(Z){U(Z)}});throw e("Please provide a callback function, this env doesn't support Promises")}try{gt(A,v)(O,v,M)}catch(y){return M(y)}},t.templates=de,Object.defineProperty(t,"__esModule",{value:!0})})});var xh={schedule(t,e){let n=setTimeout(t,e);return()=>clearTimeout(n)}};function Oh(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function Ah(t){return!!t&&t.nodeType===Node.ELEMENT_NODE}var Ls;function Dh(t,e){if(!Ls){let n=Element.prototype;Ls=n.matches||n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector}return t.nodeType===Node.ELEMENT_NODE?Ls.call(t,e):!1}function Nh(t){let e={};return t.forEach(({propName:n,templateName:r,transform:i})=>{e[Oh(r)]=[n,i]}),e}function Rh(t,e){return e.get(Ss).resolveComponentFactory(t).inputs}function Mh(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=Ph(c,e,i);u!==-1&&r[u].push(c)}return r}function Ph(t,e,n){let r=n;return Ah(t)&&e.some((i,o)=>i!=="*"&&Dh(t,i)?(r=o,!0):!1),r}var Lh=10,Fs=class{componentFactory;inputMap=new Map;constructor(e,n){this.componentFactory=n.get(Ss).resolveComponentFactory(e);for(let r of this.componentFactory.inputs)this.inputMap.set(r.propName,r.templateName)}create(e){return new Vs(this.componentFactory,e,this.inputMap)}},Vs=class{componentFactory;injector;inputMap;eventEmitters=new gl(1);events=this.eventEmitters.pipe(Il(e=>Li(...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(Pt),this.appRef=this.injector.get(Bi),this.cdScheduler=n.get(Ol),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=xh.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=Mt.create({providers:[],parent:this.injector}),r=Mh(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 hl(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()}},ks=class extends HTMLElement{ngElementEventsSubscription=null};function ql(t,e){let n=Rh(t,e.injector),r=e.strategyFactory||new Fs(t,e.injector),i=Nh(n);class o extends ks{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 _=this[u];delete this[u],c.setInputValue(u,_,d)})}return this._ngElementStrategy}_ngElementStrategy;constructor(c){super(),this.injector=c}attributeChangedCallback(c,u,d,_){let[h,E]=i[c];this.ngElementStrategy.setInputValue(h,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 Zl="9.15.0";var qe=class t{static SDK_VERSION=Zl;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 Dn={apiURL:"https://api.sdk.letscooee.com",debug:!1,mode:"production",styleURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${qe.SDK_VERSION}/dist/widget.min.css`,widgetURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${qe.SDK_VERSION}/dist/widget.min.js`};var Ut=bs(Ql());var We=class{static log(...e){Ut.default.info(...e)}static debug(...e){Ut.default.debug(...e)}static error(...e){Ut.default.error(...e)}static warn(...e){Ut.default.warn(...e)}static info(...e){Ut.default.info(...e)}static trace(...e){Ut.default.trace(...e)}};function eu(t=qe.LOG_PREFIX){Ut.default.useDefaults({formatter:function(n){n.unshift(`${t} (v${qe.SDK_VERSION}):`)}});let e=Vh();(e==="1"||e==="on")&&(localStorage.cooeeLogLevel="TRACE"),localStorage.cooeeLogLevel?Ut.default.setLevel(Ut.default[localStorage.cooeeLogLevel]):Ut.default.setLevel(Dn.debug?Ut.default.TRACE:Ut.default.OFF)}function Vh(){return new URL(location.href).searchParams?.get("cooee-debug")}var tu={providers:[Vl()]};var Bh={"[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"},OE=Ee(x({},Bh),{"[class.ng-submitted]":"isSubmitted"});var Uh=new tn("",{providedIn:"root",factory:()=>iu}),iu="always";var Hh=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=qn({type:t});static \u0275inj=zn({})}return t})();var ou=(()=>{class t{static withConfig(n){return{ngModule:t,providers:[{provide:Uh,useValue:n.callSetDisabledState??iu}]}}static \u0275fac=function(r){return new(r||t)};static \u0275mod=qn({type:t});static \u0275inj=zn({imports:[Hh]})}return t})();var zt=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("/"),_=c.cssText;_=_.replace(/url\s*\(\s*['"]?(?!((\/)|((?:https?:)?\/\/)|(?:data:?:)))([^'")]+)['"]?\s*\)/g,`url("${d}/$4")`);let h=document.createElement("style");h.appendChild(document.createTextNode(_)),document.head.appendChild(h)}}}),n.appendChild(r)}static async loadSwiperScript(){window.CooeeSDK.Swiper||(window.CooeeSDK.Swiper=(await import("https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.mjs")).Swiper)}};var Kt=class t{cooeeEvent=new ct;cooeeCTA=new ct;elementRef=z(It);_engagementTrigger=Lt(null);_triggerContext=Lt(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(){We.debug("Init",this.constructor.name);let e=this.elementRef.nativeElement.shadowRoot;e&&(zt.injectStylesheet(Dn.styleURL,e),zt.injectRawCSS(window.CooeeSDK.config.website.commonCSS,e))}ngOnDestroy(){We.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=Me({type:t,selectors:[["ng-component"]],hostVars:2,hostBindings:function(n,r){n&2&&Ml(r.classes)},inputs:{triggerContext:"triggerContext"},outputs:{cooeeEvent:"cooeeEvent",cooeeCTA:"cooeeCTA"},decls:0,vars:0,template:function(n,r){},encapsulation:2})};var jh=(t,e)=>({"--option-color":t,"background-color":e}),su=(t,e)=>e.id;function $h(t,e){if(t&1&&(G(0,"span",6),Oe(1),W()),t&2){K();let n=Xe(1);P(),ln(n)}}function Gh(t,e){if(t&1){let n=Ke();lt(0)(1)(2)(3),G(4,"button",5),Pe("click",function(){let i=Ne(n).$implicit,o=K().$implicit,s=K();return Re(s.onOptionChange(o,i))}),xe(5,$h,2,1,"span",6),W()}if(t&2){let n,r=e.$implicit,i=K().$implicit,o=Xe(1),s=r.name;P();let c=vt(r.displayName||r.name),u=o?(n=r.hexColor)!==null&&n!==void 0?n:s:"",d=K().selectedOptions()[i.name]===s;P(3),As("color-type",o)("selected",d)("disabled",r.disabled),le("title",c)("ngStyle",Hi(14,jh,u,u)),cn("aria-checked",d?"true":"false")("data-value",s)("aria-disabled",r.disabled?"true":null)("aria-label",c),P(),Se(o?-1:5)}}function Wh(t,e){if(t&1&&(G(0,"div"),lt(1),G(2,"div",1),Oe(3),W(),G(4,"div",2),Oe(5),W(),G(6,"div",3),rt(7,Gh,6,17,"button",4,su),W()()),t&2){let n=e.$implicit,r=K();Pl("option-group ",n.name.toLowerCase(),""),P(),vt(r.hasHexColors(n)),P(2),Tt("",n.name,":"),P(2),ln(r.selectedOptions()[n.name]),P(),cn("aria-label",n.name),P(),it(n.optionValues)}}var ii=t=>t.trim().toLowerCase(),yr=class t extends Kt{selectedVariant=new ct;item=Xn.required();selectedOptions=Lt({});options=Jn(()=>{let e=this.item();if(!e.options||e.vars.length===1)return[];if(window.cooeeManipulateProduct)try{window.cooeeManipulateProduct(e,this.engagementTrigger)}catch(n){We.error(n)}return e.options.forEach(n=>{n.optionValues.forEach(r=>{r.disabled=this.isOptionValueDisabledFast(n,r)})}),e.options});matchedVariant=Jn(()=>{let e=this.item(),n=this.selectedOptions();return e.vars.find(r=>e.options.every(i=>{let o=r.selectedOptions.find(s=>s.name===i.name)?.value;return n[i.name]===o}))});availabilityIndex=Jn(()=>{let e=this.item(),n=new Map;return e?.vars?.length&&e.vars.forEach((r,i)=>{if(r.isAvailable)for(let o of r.selectedOptions){let s=ii(o.name),c=o.value,u=n.get(s);u||n.set(s,u=new Map);let d=u.get(c);d||u.set(c,d=new Set),d.add(i)}}),n});constructor(){super(),Rs(()=>{let n=this.matchedVariant();n&&(this.item().setSelectedVariant(n),this.selectedVariant.emit(n))});let e=Rs(()=>{let n=this.item();if(!n?.options)return;let r=x({},this.selectedOptions()),i=n.vars.find(o=>o.isAvailable)??n.vars[0];n.options.forEach(o=>{let s=i?.selectedOptions.find(c=>c.name===o.name)?.value;s&&(r[o.name]=s)}),this.selectedOptions.set(r),e.destroy()})}onOptionChange(e,n){let r=x({},this.selectedOptions());r[e.name]=n.name,this.selectedOptions.set(r)}engagementTriggerReceived(){}update(){}hasHexColors(e){return!!e.optionValues[0]?.name.match(/#[a-f0-9]{6}\b/i)}getCandidateVariantsExcluding(e){let n=this.item(),r=this.availabilityIndex(),i=new Set;n.vars.forEach((s,c)=>{s.isAvailable&&i.add(c)});let o=i;for(let[s,c]of Object.entries(this.selectedOptions())){if(ii(s)===ii(e))continue;let u=r.get(ii(s));if(!u)return new Set;let d=u.get(String(c));if(!d)return new Set;if(o=new Set([...o].filter(_=>d.has(_))),o.size===0)return o}return o}isOptionValueDisabledFast(e,n){let i=this.availabilityIndex().get(ii(e.name));if(!i)return!0;let o=n.name,s=i.get(o);if(!s||s.size===0)return!0;let c=this.getCandidateVariantsExcluding(e.name);if(c.size===0)return!0;for(let u of c)if(s.has(u))return!1;return!0}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Me({type:t,selectors:[["cooee-item-options-picker"]],inputs:{item:[1,"item"]},outputs:{selectedVariant:"selectedVariant"},features:[Ct],decls:2,vars:0,consts:[[3,"class"],[1,"name"],[1,"selected-value"],["role","radiogroup",1,"option-values"],["type","button","role","radio",1,"option-value",3,"color-type","selected","disabled","title","ngStyle"],["type","button","role","radio",1,"option-value",3,"click","title","ngStyle"],[1,"title"]],template:function(n,r){n&1&&rt(0,Wh,9,7,"div",0,su),n&2&&it(r.options())},dependencies:[jl,Ul,ou],styles:[`.option-group{display:flex;gap:4px;align-items:center}.option-group+.option-group{margin-top:8px}.option-values{display:flex;flex-wrap:nowrap;overflow-x:auto;padding:6px;gap:4px}.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}.option-value.disabled{opacity:.5;pointer-events:none}
|
|
11
|
+
`],encapsulation:3})};var Bs=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}(Bs||{});var Xt=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}(Xt||{});var oi=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}(oi||{});var Er=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 Us=(n=>(n.CART_AMOUNT="CART_AMOUNT",n.ITEM_COUNT="ITEM_COUNT",n))(Us||{});var un=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 br=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 js=bs(cu());function Yi(t){return js.default.createInstance({name:"lc",storeName:t,driver:js.default.LOCALSTORAGE})}var Cr=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 $s=class extends Cr{static storeName="ses";static{this.storage=Yi(this.storeName)}};var wr=class extends Cr{static storeName="usr";static{this.storage=Yi(this.storeName)}};var fe=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var we=globalThis;var dn="9.42.0";function Qn(){return er(we),we}function er(t){let e=t.__SENTRY__=t.__SENTRY__||{};return e.version=e.version||dn,e[dn]=e[dn]||{}}function Nn(t,e,n=we){let r=n.__SENTRY__=n.__SENTRY__||{},i=r[dn]=r[dn]||{};return i[t]||(i[t]=e())}var Gs=["debug","info","warn","error","log","assert","trace"],Yh="Sentry Logger ",Sr={};function Hn(t){if(!("console"in we))return t();let e=we.console,n={},r=Object.keys(Sr);r.forEach(i=>{let o=Sr[i];n[i]=e[i],e[i]=o});try{return t()}finally{r.forEach(i=>{e[i]=n[i]})}}function zh(){Ys().enabled=!0}function Kh(){Ys().enabled=!1}function lu(){return Ys().enabled}function Xh(...t){Ws("log",...t)}function qh(...t){Ws("warn",...t)}function Zh(...t){Ws("error",...t)}function Ws(t,...e){fe&&lu()&&Hn(()=>{we.console[t](`${Yh}[${t}]:`,...e)})}function Ys(){return fe?Nn("loggerSettings",()=>({enabled:!1})):{enabled:!1}}var te={enable:zh,disable:Kh,isEnabled:lu,log:Xh,warn:qh,error:Zh};var fn="?",uu=/\(error: (.*)\)/,du=/captureMessage|captureException/;function Ks(...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=uu.test(u)?u.replace(uu,"$1"):u;if(!d.match(/\S*Error: /)){for(let _ of e){let h=_(d);if(h){o.push(h);break}}if(o.length>=50+i)break}}return fu(o.slice(i))}}function fu(t){if(!t.length)return[];let e=Array.from(t);return/sentryWrapped/.test(zi(e).function||"")&&e.pop(),e.reverse(),du.test(zi(e).function||"")&&(e.pop(),du.test(zi(e).function||"")&&e.pop()),e.slice(0,50).map(n=>Ee(x({},n),{filename:n.filename||zi(e).filename,function:n.function||fn}))}function zi(t){return t[t.length-1]||{}}var zs="<anonymous>";function qt(t){try{return!t||typeof t!="function"?zs:t.name||zs}catch{return zs}}function Ki(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 Xi={},pu={};function Ot(t,e){Xi[t]=Xi[t]||[],Xi[t].push(e)}function At(t,e){if(!pu[t]){pu[t]=!0;try{e()}catch(n){fe&&te.error(`Error while instrumenting ${t}`,n)}}}function dt(t,e){let n=t&&Xi[t];if(n)for(let r of n)try{r(e)}catch(i){fe&&te.error(`Error while triggering instrumentation handler.
|
|
13
13
|
Type: ${t}
|
|
14
14
|
Name: ${qt(r)}
|
|
15
|
-
Error:`,i)}}var Ks=null;function Xs(t){let e="error";Ot(e,t),At(e,Zh)}function Zh(){Ks=we.onerror,we.onerror=function(t,e,n,r,i){return dt("error",{column:r,error:i,line:n,msg:t,url:e}),Ks?Ks.apply(this,arguments):!1},we.onerror.__SENTRY_INSTRUMENTED__=!0}var qs=null;function Zs(t){let e="unhandledrejection";Ot(e,t),At(e,Jh)}function Jh(){qs=we.onunhandledrejection,we.onunhandledrejection=function(t){return dt("unhandledrejection",t),qs?qs.apply(this,arguments):!0},we.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}var pu=Object.prototype.toString;function er(t){switch(pu.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return on(t,Error)}}function Tr(t,e){return pu.call(t)===`[object ${e}]`}function Xi(t){return Tr(t,"ErrorEvent")}function qi(t){return Tr(t,"DOMError")}function Js(t){return Tr(t,"DOMException")}function Dt(t){return Tr(t,"String")}function Ir(t){return typeof t=="object"&&t!==null&&"__sentry_template_string__"in t&&"__sentry_template_values__"in t}function tr(t){return t===null||Ir(t)||typeof t!="object"&&typeof t!="function"}function Rn(t){return Tr(t,"Object")}function nr(t){return typeof Event<"u"&&on(t,Event)}function Qs(t){return typeof Element<"u"&&on(t,Element)}function ea(t){return Tr(t,"RegExp")}function Mn(t){return!!(t?.then&&typeof t.then=="function")}function ta(t){return Rn(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function on(t,e){try{return t instanceof e}catch{return!1}}function oi(t){return!!(typeof t=="object"&&t!==null&&(t.__isVue||t._isVue))}function hu(t){return typeof Request<"u"&&on(t,Request)}var na=we,Qh=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,_=Array.isArray(e)?e:e.keyAttrs,h=!Array.isArray(e)&&e.maxStringLength||Qh;for(;n&&o++<r&&(d=em(n,_),!(d==="html"||o>1&&s+i.length*u+d.length>=h));)i.push(d),s+=d.length,n=n.parentNode;return i.reverse().join(c)}catch{return"<unknown>"}}function em(t,e){let n=t,r=[];if(!n?.tagName)return"";if(na.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?.length?e.filter(s=>n.getAttribute(s)).map(s=>[s,n.getAttribute(s)]):null;if(i?.length)i.forEach(s=>{r.push(`[${s[0]}="${s[1]}"]`)});else{n.id&&r.push(`#${n.id}`);let s=n.className;if(s&&Dt(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 ai(){try{return na.document.location.href}catch{return""}}function ra(t){if(!na.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}function jn(t,e=0){return typeof t!="string"||e===0||t.length<=e?t:`${t.slice(0,e)}...`}function Zi(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 mu(t,e,n=!1){return Dt(t)?ea(e)?e.test(t):Dt(e)?n?t===e:t.includes(e):!1:!1}function xr(t,e=[],n=!1){return e.some(r=>mu(t,r,n))}function ft(t,e,n){if(!(e in t))return;let r=t[e];if(typeof r!="function")return;let i=n(r);typeof i=="function"&&Ji(i,r);try{t[e]=i}catch{fe&&te.log(`Failed to replace method "${e}" in object`,t)}}function jt(t,e,n){try{Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}catch{fe&&te.log(`Failed to add non-enumerable property "${e}" to object`,t)}}function Ji(t,e){try{let n=e.prototype||{};t.prototype=e.prototype=n,jt(t,"__sentry_original__",e)}catch{}}function rr(t){return t.__sentry_original__}function Qi(t){if(er(t))return x({message:t.message,name:t.name,stack:t.stack},_u(t));if(nr(t)){let e=x({type:t.type,target:gu(t.target),currentTarget:gu(t.currentTarget)},_u(t));return typeof CustomEvent<"u"&&on(t,CustomEvent)&&(e.detail=t.detail),e}else return t}function gu(t){try{return Qs(t)?si(t):Object.prototype.toString.call(t)}catch{return"<unknown>"}}function _u(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 ia(t,e=40){let n=Object.keys(Qi(t));n.sort();let r=n[0];if(!r)return"[object has no keys]";if(r.length>=e)return jn(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:jn(o,e)}return""}function tm(){let t=we;return t.crypto||t.msCrypto}function pt(t=tm()){let e=()=>Math.random()*16;try{if(t?.randomUUID)return t.randomUUID().replace(/-/g,"");t?.getRandomValues&&(e=()=>{let n=new Uint8Array(1);return t.getRandomValues(n),n[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,n=>(n^(e()&15)>>n/4).toString(16))}function vu(t){return t.exception?.values?.[0]}function fn(t){let{message:e,event_id:n}=t;if(e)return e;let r=vu(t);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Or(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 pn(t,e){let n=vu(t);if(!n)return;let r={type:"generic",handled:!0},i=n.mechanism;if(n.mechanism=x(x(x({},r),i),e),e&&"data"in e){let o=x(x({},i?.data),e.data);n.mechanism.data=o}}function eo(t){if(nm(t))return!0;try{jt(t,"__sentry_captured__",!0)}catch{}return!1}function nm(t){try{return t.__sentry_captured__}catch{}}var Eu=1e3;function hn(){return Date.now()/Eu}function rm(){let{performance:t}=we;if(!t?.now||!t.timeOrigin)return hn;let e=t.timeOrigin;return()=>(e+t.now())/Eu}var yu;function Ft(){return(yu??(yu=rm()))()}function bu(t){let e=Ft(),n={sid:pt(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>im(n)};return t&&Pn(n,t),n}function Pn(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||Ft(),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)}function Cu(t,e){let n={};e?n={status:e}:t.status==="ok"&&(n={status:"exited"}),Pn(t,n)}function im(t){return{sid:`${t.sid}`,init:t.init,started:new Date(t.started*1e3).toISOString(),timestamp:new Date(t.timestamp*1e3).toISOString(),status:t.status,errors:t.errors,did:typeof t.did=="number"||typeof t.did=="string"?`${t.did}`:void 0,duration:t.duration,abnormal_mechanism:t.abnormal_mechanism,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}}}function $n(t,e,n=2){if(!e||typeof e!="object"||n<=0)return e;if(t&&Object.keys(e).length===0)return t;let r=x({},t);for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=$n(r[i],e[i],n-1));return r}function oa(){return pt()}function to(){return pt().substring(16)}var sa="_sentrySpan";function aa(t,e){e?jt(t,sa,e):delete t[sa]}function ca(t){return t[sa]}var om=100,wt=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={traceId:oa(),sampleRand:Math.random()}}clone(){let e=new t;return e._breadcrumbs=[...this._breadcrumbs],e._tags=x({},this._tags),e._extra=x({},this._extra),e._contexts=x({},this._contexts),this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),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._attachments=[...this._attachments],e._sdkProcessingMetadata=x({},this._sdkProcessingMetadata),e._propagationContext=x({},this._propagationContext),e._client=this._client,e._lastEventId=this._lastEventId,aa(e,ca(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&&Pn(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}setTags(e){return this._tags=x(x({},this._tags),e),this._notifyScopeListeners(),this}setTag(e,n){return this._tags=Ee(x({},this._tags),{[e]:n}),this._notifyScopeListeners(),this}setExtras(e){return this._extra=x(x({},this._extra),e),this._notifyScopeListeners(),this}setExtra(e,n){return this._extra=Ee(x({},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=n instanceof t?n.getScopeData():Rn(n)?e:void 0,{tags:i,extra:o,user:s,contexts:c,level:u,fingerprint:d=[],propagationContext:_}=r||{};return this._tags=x(x({},this._tags),i),this._extra=x(x({},this._extra),o),this._contexts=x(x({},this._contexts),c),s&&Object.keys(s).length&&(this._user=s),u&&(this._level=u),d.length&&(this._fingerprint=d),_&&(this._propagationContext=_),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._session=void 0,aa(this,void 0),this._attachments=[],this.setPropagationContext({traceId:oa(),sampleRand:Math.random()}),this._notifyScopeListeners(),this}addBreadcrumb(e,n){let r=typeof n=="number"?n:om;if(r<=0)return this;let i=Ee(x({timestamp:hn()},e),{message:e.message?jn(e.message,2048):e.message});return this._breadcrumbs.push(i),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),this._client?.recordDroppedEvent("buffer_overflow","log_item")),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:ca(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=$n(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,n){let r=n?.event_id||pt();if(!this._client)return fe&&te.warn("No client configured on scope - will not capture exception!"),r;let i=new Error("Sentry syntheticException");return this._client.captureException(e,Ee(x({originalException:e,syntheticException:i},n),{event_id:r}),this),r}captureMessage(e,n,r){let i=r?.event_id||pt();if(!this._client)return fe&&te.warn("No client configured on scope - will not capture message!"),i;let o=new Error(e);return this._client.captureMessage(e,n,Ee(x({originalException:e,syntheticException:o},r),{event_id:i}),this),i}captureEvent(e,n){let r=n?.event_id||pt();return this._client?(this._client.captureEvent(e,Ee(x({},n),{event_id:r}),this),r):(fe&&te.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)}};function wu(){return Nn("defaultCurrentScope",()=>new wt)}function Su(){return Nn("defaultIsolationScope",()=>new wt)}var la=class{constructor(e,n){let r;e?r=e:r=new wt;let i;n?i=n:i=new wt,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 Mn(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 Ar(){let t=Jn(),e=Qn(t);return e.stack=e.stack||new la(wu(),Su())}function sm(t){return Ar().withScope(t)}function am(t,e){let n=Ar();return n.withScope(()=>(n.getStackTop().scope=t,e(t)))}function Tu(t){return Ar().withScope(()=>t(Ar().getIsolationScope()))}function Iu(){return{withIsolationScope:Tu,withScope:sm,withSetScope:am,withSetIsolationScope:(t,e)=>Tu(e),getCurrentScope:()=>Ar().getScope(),getIsolationScope:()=>Ar().getIsolationScope()}}function no(t){let e=Qn(t);return e.acs?e.acs:Iu()}function mn(){let t=Jn();return no(t).getCurrentScope()}function gn(){let t=Jn();return no(t).getIsolationScope()}function ro(){return Nn("globalScope",()=>new wt)}function ci(...t){let e=Jn(),n=no(e);if(t.length===2){let[r,i]=t;return r?n.withSetScope(r,i):n.withScope(i)}return n.withScope(t[0])}function Ye(){return mn().getClient()}function ua(t){let e=t.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:i}=e,o={trace_id:n,span_id:i||to()};return r&&(o.parent_span_id=r),o}var io="sentry.source",da="sentry.sample_rate",xu="sentry.previous_trace_sample_rate",fa="sentry.op",pa="sentry.origin";var ha="sentry.profile_id",ma="sentry.exclusive_time";var cm="_sentryScope",lm="_sentryIsolationScope";function oo(t){return{scope:t[cm],isolationScope:t[lm]}}var um="sentry-",dm=/^sentry-/;function Au(t){let e=fm(t);if(!e)return;let n=Object.entries(e).reduce((r,[i,o])=>{if(i.match(dm)){let s=i.slice(um.length);r[s]=o}return r},{});if(Object.keys(n).length>0)return n}function fm(t){if(!(!t||!Dt(t)&&!Array.isArray(t)))return Array.isArray(t)?t.reduce((e,n)=>{let r=Ou(n);return Object.entries(r).forEach(([i,o])=>{e[i]=o}),e},{}):Ou(t)}function Ou(t){return t.split(",").map(e=>e.split("=").map(n=>{try{return decodeURIComponent(n.trim())}catch{return}})).reduce((e,[n,r])=>(n&&r&&(e[n]=r),e),{})}function Du(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))return e}var Pu=1,Nu=!1;function ga(t){let{spanId:e,traceId:n,isRemote:r}=t.spanContext(),i=r?e:Dr(t).parent_span_id,o=oo(t).scope,s=r?o?.getPropagationContext().propagationSpanId||to():e;return{parent_span_id:i,span_id:s,trace_id:n}}function pm(t){if(t&&t.length>0)return t.map(s=>{var c=s,{context:u}=c,d=u,{spanId:e,traceId:n,traceFlags:r}=d,i=dl(d,["spanId","traceId","traceFlags"]),{attributes:o}=c;return x({span_id:e,trace_id:n,sampled:r===Pu,attributes:o},i)})}function Ru(t){return typeof t=="number"?Mu(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?Mu(t.getTime()):Ft()}function Mu(t){return t>9999999999?t/1e3:t}function Dr(t){if(mm(t))return t.getSpanJSON();let{spanId:e,traceId:n}=t.spanContext();if(hm(t)){let{attributes:r,startTime:i,name:o,endTime:s,status:c,links:u}=t,d="parentSpanId"in t?t.parentSpanId:"parentSpanContext"in t?t.parentSpanContext?.spanId:void 0;return{span_id:e,trace_id:n,data:r,description:o,parent_span_id:d,start_timestamp:Ru(i),timestamp:Ru(s)||void 0,status:gm(c),op:r[fa],origin:r[pa],links:pm(u)}}return{span_id:e,trace_id:n,start_timestamp:0,data:{}}}function hm(t){let e=t;return!!e.attributes&&!!e.startTime&&!!e.name&&!!e.endTime&&!!e.status}function mm(t){return typeof t.getSpanJSON=="function"}function Lu(t){let{traceFlags:e}=t.spanContext();return e===Pu}function gm(t){if(!(!t||t.code===0))return t.code===1?"ok":t.message||"unknown_error"}var _m="_sentryRootSpan";function li(t){return t[_m]||t}function _a(){Nu||(Hn(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly.")}),Nu=!0)}function Fu(t){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;let e=t||Ye()?.getOptions();return!!e&&(e.tracesSampleRate!=null||!!e.tracesSampler)}var Nr="production";var vm=/^o(\d+)\./,ym=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Em(t){return t==="http"||t==="https"}function Gn(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 bm(t){let e=ym.exec(t);if(!e){Hn(()=>{console.error(`Invalid Sentry Dsn: ${t}`)});return}let[n,r,i="",o="",s="",c=""]=e.slice(1),u="",d=c,_=d.split("/");if(_.length>1&&(u=_.slice(0,-1).join("/"),d=_.pop()),d){let h=d.match(/^\d+/);h&&(d=h[0])}return ku({host:o,pass:i,path:u,projectId:d,port:s,protocol:n,publicKey:r})}function ku(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function Cm(t){if(!fe)return!0;let{port:e,projectId:n,protocol:r}=t;return["protocol","publicKey","host","projectId"].find(s=>t[s]?!1:(te.error(`Invalid Sentry Dsn: ${s} missing`),!0))?!1:n.match(/^\d+$/)?Em(r)?e&&isNaN(parseInt(e,10))?(te.error(`Invalid Sentry Dsn: Invalid port ${e}`),!1):!0:(te.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(te.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function Vu(t){return t.match(vm)?.[1]}function Bu(t){let e=typeof t=="string"?bm(t):ku(t);if(!(!e||!Cm(e)))return e}var wm="_frozenDsc";function Uu(t,e){let n=e.getOptions(),{publicKey:r,host:i}=e.getDsn()||{},o;n.orgId?o=String(n.orgId):i&&(o=Vu(i));let s={environment:n.environment||Nr,release:n.release,public_key:r,trace_id:t,org_id:o};return e.emit("createDsc",s),s}function Hu(t,e){let n=e.getPropagationContext();return n.dsc||Uu(n.traceId,t)}function va(t){let e=Ye();if(!e)return{};let n=li(t),r=Dr(n),i=r.data,o=n.spanContext().traceState,s=o?.get("sentry.sample_rate")??i[da]??i[xu];function c(N){return(typeof s=="number"||typeof s=="string")&&(N.sample_rate=`${s}`),N}let u=n[wm];if(u)return c(u);let d=o?.get("sentry.dsc"),_=d&&Au(d);if(_)return c(_);let h=Uu(t.spanContext().traceId,e),E=i[io],C=r.description;return E!=="url"&&C&&(h.transaction=C),Fu()&&(h.sampled=String(Lu(n)),h.sample_rand=o?.get("sentry.sample_rand")??oo(n).scope?.getPropagationContext().sampleRand.toString()),c(h),e.emit("createDsc",h,n),h}function Zt(t,e=100,n=1/0){try{return ya("",t,e,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function so(t,e=3,n=100*1024){let r=Zt(t,e);return xm(r)>n?so(t,e-1,n):r}function ya(t,e,n=1/0,r=1/0,i=Om()){let[o,s]=i;if(e==null||["boolean","string"].includes(typeof e)||typeof e=="number"&&Number.isFinite(e))return e;let c=Sm(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 ya("",C,u-1,r,i)}catch{}let _=Array.isArray(e)?[]:{},h=0,E=Qi(e);for(let C in E){if(!Object.prototype.hasOwnProperty.call(E,C))continue;if(h>=r){_[C]="[MaxProperties ~]";break}let N=E[C];_[C]=ya(C,N,u-1,r,i),h++}return s(e),_}function Sm(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(ta(e))return"[SyntheticEvent]";if(typeof e=="number"&&!Number.isFinite(e))return`[${e}]`;if(typeof e=="function")return`[Function: ${qt(e)}]`;if(typeof e=="symbol")return`[${String(e)}]`;if(typeof e=="bigint")return`[BigInt: ${String(e)}]`;let n=Tm(e);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function Tm(t){let e=Object.getPrototypeOf(t);return e?.constructor?e.constructor.name:"null prototype"}function Im(t){return~-encodeURI(t).split(/%..|./).length}function xm(t){return Im(JSON.stringify(t))}function Om(){let t=new WeakSet;function e(r){return t.has(r)?!0:(t.add(r),!1)}function n(r){t.delete(r)}return[e,n]}function Ln(t,e=[]){return[t,e]}function ju(t,e){let[n,r]=t;return[n,[...r,e]]}function ba(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 Ea(t){let e=Qn(we);return e.encodePolyfill?e.encodePolyfill(t):new TextEncoder().encode(t)}function $u(t){let[e,n]=t,r=JSON.stringify(e);function i(o){typeof r=="string"?r=typeof o=="string"?r+o:[Ea(r),o]:r.push(typeof o=="string"?Ea(o):o)}for(let o of n){let[s,c]=o;if(i(`
|
|
15
|
+
Error:`,i)}}var Xs=null;function qs(t){let e="error";Ot(e,t),At(e,Jh)}function Jh(){Xs=we.onerror,we.onerror=function(t,e,n,r,i){return dt("error",{column:r,error:i,line:n,msg:t,url:e}),Xs?Xs.apply(this,arguments):!1},we.onerror.__SENTRY_INSTRUMENTED__=!0}var Zs=null;function Js(t){let e="unhandledrejection";Ot(e,t),At(e,Qh)}function Qh(){Zs=we.onunhandledrejection,we.onunhandledrejection=function(t){return dt("unhandledrejection",t),Zs?Zs.apply(this,arguments):!0},we.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}var hu=Object.prototype.toString;function tr(t){switch(hu.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return on(t,Error)}}function Ir(t,e){return hu.call(t)===`[object ${e}]`}function qi(t){return Ir(t,"ErrorEvent")}function Zi(t){return Ir(t,"DOMError")}function Qs(t){return Ir(t,"DOMException")}function Dt(t){return Ir(t,"String")}function Tr(t){return typeof t=="object"&&t!==null&&"__sentry_template_string__"in t&&"__sentry_template_values__"in t}function nr(t){return t===null||Tr(t)||typeof t!="object"&&typeof t!="function"}function Rn(t){return Ir(t,"Object")}function rr(t){return typeof Event<"u"&&on(t,Event)}function ea(t){return typeof Element<"u"&&on(t,Element)}function ta(t){return Ir(t,"RegExp")}function Mn(t){return!!(t?.then&&typeof t.then=="function")}function na(t){return Rn(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function on(t,e){try{return t instanceof e}catch{return!1}}function si(t){return!!(typeof t=="object"&&t!==null&&(t.__isVue||t._isVue))}function mu(t){return typeof Request<"u"&&on(t,Request)}var ra=we,em=80;function ai(t,e={}){if(!t)return"<unknown>";try{let n=t,r=5,i=[],o=0,s=0,c=" > ",u=c.length,d,_=Array.isArray(e)?e:e.keyAttrs,h=!Array.isArray(e)&&e.maxStringLength||em;for(;n&&o++<r&&(d=tm(n,_),!(d==="html"||o>1&&s+i.length*u+d.length>=h));)i.push(d),s+=d.length,n=n.parentNode;return i.reverse().join(c)}catch{return"<unknown>"}}function tm(t,e){let n=t,r=[];if(!n?.tagName)return"";if(ra.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?.length?e.filter(s=>n.getAttribute(s)).map(s=>[s,n.getAttribute(s)]):null;if(i?.length)i.forEach(s=>{r.push(`[${s[0]}="${s[1]}"]`)});else{n.id&&r.push(`#${n.id}`);let s=n.className;if(s&&Dt(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 ci(){try{return ra.document.location.href}catch{return""}}function ia(t){if(!ra.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}function jn(t,e=0){return typeof t!="string"||e===0||t.length<=e?t:`${t.slice(0,e)}...`}function Ji(t,e){if(!Array.isArray(t))return"";let n=[];for(let r=0;r<t.length;r++){let i=t[r];try{si(i)?n.push("[VueViewModel]"):n.push(String(i))}catch{n.push("[value cannot be serialized]")}}return n.join(e)}function gu(t,e,n=!1){return Dt(t)?ta(e)?e.test(t):Dt(e)?n?t===e:t.includes(e):!1:!1}function xr(t,e=[],n=!1){return e.some(r=>gu(t,r,n))}function ft(t,e,n){if(!(e in t))return;let r=t[e];if(typeof r!="function")return;let i=n(r);typeof i=="function"&&Qi(i,r);try{t[e]=i}catch{fe&&te.log(`Failed to replace method "${e}" in object`,t)}}function jt(t,e,n){try{Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}catch{fe&&te.log(`Failed to add non-enumerable property "${e}" to object`,t)}}function Qi(t,e){try{let n=e.prototype||{};t.prototype=e.prototype=n,jt(t,"__sentry_original__",e)}catch{}}function ir(t){return t.__sentry_original__}function eo(t){if(tr(t))return x({message:t.message,name:t.name,stack:t.stack},vu(t));if(rr(t)){let e=x({type:t.type,target:_u(t.target),currentTarget:_u(t.currentTarget)},vu(t));return typeof CustomEvent<"u"&&on(t,CustomEvent)&&(e.detail=t.detail),e}else return t}function _u(t){try{return ea(t)?ai(t):Object.prototype.toString.call(t)}catch{return"<unknown>"}}function vu(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 oa(t,e=40){let n=Object.keys(eo(t));n.sort();let r=n[0];if(!r)return"[object has no keys]";if(r.length>=e)return jn(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:jn(o,e)}return""}function nm(){let t=we;return t.crypto||t.msCrypto}function pt(t=nm()){let e=()=>Math.random()*16;try{if(t?.randomUUID)return t.randomUUID().replace(/-/g,"");t?.getRandomValues&&(e=()=>{let n=new Uint8Array(1);return t.getRandomValues(n),n[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,n=>(n^(e()&15)>>n/4).toString(16))}function yu(t){return t.exception?.values?.[0]}function pn(t){let{message:e,event_id:n}=t;if(e)return e;let r=yu(t);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Or(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 hn(t,e){let n=yu(t);if(!n)return;let r={type:"generic",handled:!0},i=n.mechanism;if(n.mechanism=x(x(x({},r),i),e),e&&"data"in e){let o=x(x({},i?.data),e.data);n.mechanism.data=o}}function to(t){if(rm(t))return!0;try{jt(t,"__sentry_captured__",!0)}catch{}return!1}function rm(t){try{return t.__sentry_captured__}catch{}}var bu=1e3;function mn(){return Date.now()/bu}function im(){let{performance:t}=we;if(!t?.now||!t.timeOrigin)return mn;let e=t.timeOrigin;return()=>(e+t.now())/bu}var Eu;function Ft(){return(Eu??(Eu=im()))()}function Cu(t){let e=Ft(),n={sid:pt(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>om(n)};return t&&Pn(n,t),n}function Pn(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||Ft(),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)}function wu(t,e){let n={};e?n={status:e}:t.status==="ok"&&(n={status:"exited"}),Pn(t,n)}function om(t){return{sid:`${t.sid}`,init:t.init,started:new Date(t.started*1e3).toISOString(),timestamp:new Date(t.timestamp*1e3).toISOString(),status:t.status,errors:t.errors,did:typeof t.did=="number"||typeof t.did=="string"?`${t.did}`:void 0,duration:t.duration,abnormal_mechanism:t.abnormal_mechanism,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}}}function $n(t,e,n=2){if(!e||typeof e!="object"||n<=0)return e;if(t&&Object.keys(e).length===0)return t;let r=x({},t);for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=$n(r[i],e[i],n-1));return r}function sa(){return pt()}function no(){return pt().substring(16)}var aa="_sentrySpan";function ca(t,e){e?jt(t,aa,e):delete t[aa]}function la(t){return t[aa]}var sm=100,wt=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={traceId:sa(),sampleRand:Math.random()}}clone(){let e=new t;return e._breadcrumbs=[...this._breadcrumbs],e._tags=x({},this._tags),e._extra=x({},this._extra),e._contexts=x({},this._contexts),this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),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._attachments=[...this._attachments],e._sdkProcessingMetadata=x({},this._sdkProcessingMetadata),e._propagationContext=x({},this._propagationContext),e._client=this._client,e._lastEventId=this._lastEventId,ca(e,la(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&&Pn(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}setTags(e){return this._tags=x(x({},this._tags),e),this._notifyScopeListeners(),this}setTag(e,n){return this._tags=Ee(x({},this._tags),{[e]:n}),this._notifyScopeListeners(),this}setExtras(e){return this._extra=x(x({},this._extra),e),this._notifyScopeListeners(),this}setExtra(e,n){return this._extra=Ee(x({},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=n instanceof t?n.getScopeData():Rn(n)?e:void 0,{tags:i,extra:o,user:s,contexts:c,level:u,fingerprint:d=[],propagationContext:_}=r||{};return this._tags=x(x({},this._tags),i),this._extra=x(x({},this._extra),o),this._contexts=x(x({},this._contexts),c),s&&Object.keys(s).length&&(this._user=s),u&&(this._level=u),d.length&&(this._fingerprint=d),_&&(this._propagationContext=_),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._session=void 0,ca(this,void 0),this._attachments=[],this.setPropagationContext({traceId:sa(),sampleRand:Math.random()}),this._notifyScopeListeners(),this}addBreadcrumb(e,n){let r=typeof n=="number"?n:sm;if(r<=0)return this;let i=Ee(x({timestamp:mn()},e),{message:e.message?jn(e.message,2048):e.message});return this._breadcrumbs.push(i),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),this._client?.recordDroppedEvent("buffer_overflow","log_item")),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:la(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=$n(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,n){let r=n?.event_id||pt();if(!this._client)return fe&&te.warn("No client configured on scope - will not capture exception!"),r;let i=new Error("Sentry syntheticException");return this._client.captureException(e,Ee(x({originalException:e,syntheticException:i},n),{event_id:r}),this),r}captureMessage(e,n,r){let i=r?.event_id||pt();if(!this._client)return fe&&te.warn("No client configured on scope - will not capture message!"),i;let o=new Error(e);return this._client.captureMessage(e,n,Ee(x({originalException:e,syntheticException:o},r),{event_id:i}),this),i}captureEvent(e,n){let r=n?.event_id||pt();return this._client?(this._client.captureEvent(e,Ee(x({},n),{event_id:r}),this),r):(fe&&te.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)}};function Su(){return Nn("defaultCurrentScope",()=>new wt)}function Iu(){return Nn("defaultIsolationScope",()=>new wt)}var ua=class{constructor(e,n){let r;e?r=e:r=new wt;let i;n?i=n:i=new wt,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 Mn(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 Ar(){let t=Qn(),e=er(t);return e.stack=e.stack||new ua(Su(),Iu())}function am(t){return Ar().withScope(t)}function cm(t,e){let n=Ar();return n.withScope(()=>(n.getStackTop().scope=t,e(t)))}function Tu(t){return Ar().withScope(()=>t(Ar().getIsolationScope()))}function xu(){return{withIsolationScope:Tu,withScope:am,withSetScope:cm,withSetIsolationScope:(t,e)=>Tu(e),getCurrentScope:()=>Ar().getScope(),getIsolationScope:()=>Ar().getIsolationScope()}}function ro(t){let e=er(t);return e.acs?e.acs:xu()}function gn(){let t=Qn();return ro(t).getCurrentScope()}function _n(){let t=Qn();return ro(t).getIsolationScope()}function io(){return Nn("globalScope",()=>new wt)}function li(...t){let e=Qn(),n=ro(e);if(t.length===2){let[r,i]=t;return r?n.withSetScope(r,i):n.withScope(i)}return n.withScope(t[0])}function Ye(){return gn().getClient()}function da(t){let e=t.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:i}=e,o={trace_id:n,span_id:i||no()};return r&&(o.parent_span_id=r),o}var oo="sentry.source",fa="sentry.sample_rate",Ou="sentry.previous_trace_sample_rate",pa="sentry.op",ha="sentry.origin";var ma="sentry.profile_id",ga="sentry.exclusive_time";var lm="_sentryScope",um="_sentryIsolationScope";function so(t){return{scope:t[lm],isolationScope:t[um]}}var dm="sentry-",fm=/^sentry-/;function Du(t){let e=pm(t);if(!e)return;let n=Object.entries(e).reduce((r,[i,o])=>{if(i.match(fm)){let s=i.slice(dm.length);r[s]=o}return r},{});if(Object.keys(n).length>0)return n}function pm(t){if(!(!t||!Dt(t)&&!Array.isArray(t)))return Array.isArray(t)?t.reduce((e,n)=>{let r=Au(n);return Object.entries(r).forEach(([i,o])=>{e[i]=o}),e},{}):Au(t)}function Au(t){return t.split(",").map(e=>e.split("=").map(n=>{try{return decodeURIComponent(n.trim())}catch{return}})).reduce((e,[n,r])=>(n&&r&&(e[n]=r),e),{})}function Nu(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))return e}var Lu=1,Ru=!1;function _a(t){let{spanId:e,traceId:n,isRemote:r}=t.spanContext(),i=r?e:Dr(t).parent_span_id,o=so(t).scope,s=r?o?.getPropagationContext().propagationSpanId||no():e;return{parent_span_id:i,span_id:s,trace_id:n}}function hm(t){if(t&&t.length>0)return t.map(s=>{var c=s,{context:u}=c,d=u,{spanId:e,traceId:n,traceFlags:r}=d,i=fl(d,["spanId","traceId","traceFlags"]),{attributes:o}=c;return x({span_id:e,trace_id:n,sampled:r===Lu,attributes:o},i)})}function Mu(t){return typeof t=="number"?Pu(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?Pu(t.getTime()):Ft()}function Pu(t){return t>9999999999?t/1e3:t}function Dr(t){if(gm(t))return t.getSpanJSON();let{spanId:e,traceId:n}=t.spanContext();if(mm(t)){let{attributes:r,startTime:i,name:o,endTime:s,status:c,links:u}=t,d="parentSpanId"in t?t.parentSpanId:"parentSpanContext"in t?t.parentSpanContext?.spanId:void 0;return{span_id:e,trace_id:n,data:r,description:o,parent_span_id:d,start_timestamp:Mu(i),timestamp:Mu(s)||void 0,status:_m(c),op:r[pa],origin:r[ha],links:hm(u)}}return{span_id:e,trace_id:n,start_timestamp:0,data:{}}}function mm(t){let e=t;return!!e.attributes&&!!e.startTime&&!!e.name&&!!e.endTime&&!!e.status}function gm(t){return typeof t.getSpanJSON=="function"}function Fu(t){let{traceFlags:e}=t.spanContext();return e===Lu}function _m(t){if(!(!t||t.code===0))return t.code===1?"ok":t.message||"unknown_error"}var vm="_sentryRootSpan";function ui(t){return t[vm]||t}function va(){Ru||(Hn(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly.")}),Ru=!0)}function Vu(t){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;let e=t||Ye()?.getOptions();return!!e&&(e.tracesSampleRate!=null||!!e.tracesSampler)}var Nr="production";var ym=/^o(\d+)\./,Em=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function bm(t){return t==="http"||t==="https"}function Gn(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 Cm(t){let e=Em.exec(t);if(!e){Hn(()=>{console.error(`Invalid Sentry Dsn: ${t}`)});return}let[n,r,i="",o="",s="",c=""]=e.slice(1),u="",d=c,_=d.split("/");if(_.length>1&&(u=_.slice(0,-1).join("/"),d=_.pop()),d){let h=d.match(/^\d+/);h&&(d=h[0])}return ku({host:o,pass:i,path:u,projectId:d,port:s,protocol:n,publicKey:r})}function ku(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function wm(t){if(!fe)return!0;let{port:e,projectId:n,protocol:r}=t;return["protocol","publicKey","host","projectId"].find(s=>t[s]?!1:(te.error(`Invalid Sentry Dsn: ${s} missing`),!0))?!1:n.match(/^\d+$/)?bm(r)?e&&isNaN(parseInt(e,10))?(te.error(`Invalid Sentry Dsn: Invalid port ${e}`),!1):!0:(te.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(te.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function Bu(t){return t.match(ym)?.[1]}function Uu(t){let e=typeof t=="string"?Cm(t):ku(t);if(!(!e||!wm(e)))return e}var Sm="_frozenDsc";function Hu(t,e){let n=e.getOptions(),{publicKey:r,host:i}=e.getDsn()||{},o;n.orgId?o=String(n.orgId):i&&(o=Bu(i));let s={environment:n.environment||Nr,release:n.release,public_key:r,trace_id:t,org_id:o};return e.emit("createDsc",s),s}function ju(t,e){let n=e.getPropagationContext();return n.dsc||Hu(n.traceId,t)}function ya(t){let e=Ye();if(!e)return{};let n=ui(t),r=Dr(n),i=r.data,o=n.spanContext().traceState,s=o?.get("sentry.sample_rate")??i[fa]??i[Ou];function c(N){return(typeof s=="number"||typeof s=="string")&&(N.sample_rate=`${s}`),N}let u=n[Sm];if(u)return c(u);let d=o?.get("sentry.dsc"),_=d&&Du(d);if(_)return c(_);let h=Hu(t.spanContext().traceId,e),E=i[oo],C=r.description;return E!=="url"&&C&&(h.transaction=C),Vu()&&(h.sampled=String(Fu(n)),h.sample_rand=o?.get("sentry.sample_rand")??so(n).scope?.getPropagationContext().sampleRand.toString()),c(h),e.emit("createDsc",h,n),h}function Zt(t,e=100,n=1/0){try{return Ea("",t,e,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function ao(t,e=3,n=100*1024){let r=Zt(t,e);return Om(r)>n?ao(t,e-1,n):r}function Ea(t,e,n=1/0,r=1/0,i=Am()){let[o,s]=i;if(e==null||["boolean","string"].includes(typeof e)||typeof e=="number"&&Number.isFinite(e))return e;let c=Im(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 Ea("",C,u-1,r,i)}catch{}let _=Array.isArray(e)?[]:{},h=0,E=eo(e);for(let C in E){if(!Object.prototype.hasOwnProperty.call(E,C))continue;if(h>=r){_[C]="[MaxProperties ~]";break}let N=E[C];_[C]=Ea(C,N,u-1,r,i),h++}return s(e),_}function Im(t,e){try{if(t==="domain"&&e&&typeof e=="object"&&e._events)return"[Domain]";if(t==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&e===global)return"[Global]";if(typeof window<"u"&&e===window)return"[Window]";if(typeof document<"u"&&e===document)return"[Document]";if(si(e))return"[VueViewModel]";if(na(e))return"[SyntheticEvent]";if(typeof e=="number"&&!Number.isFinite(e))return`[${e}]`;if(typeof e=="function")return`[Function: ${qt(e)}]`;if(typeof e=="symbol")return`[${String(e)}]`;if(typeof e=="bigint")return`[BigInt: ${String(e)}]`;let n=Tm(e);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function Tm(t){let e=Object.getPrototypeOf(t);return e?.constructor?e.constructor.name:"null prototype"}function xm(t){return~-encodeURI(t).split(/%..|./).length}function Om(t){return xm(JSON.stringify(t))}function Am(){let t=new WeakSet;function e(r){return t.has(r)?!0:(t.add(r),!1)}function n(r){t.delete(r)}return[e,n]}function Ln(t,e=[]){return[t,e]}function $u(t,e){let[n,r]=t;return[n,[...r,e]]}function Ca(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 ba(t){let e=er(we);return e.encodePolyfill?e.encodePolyfill(t):new TextEncoder().encode(t)}function Gu(t){let[e,n]=t,r=JSON.stringify(e);function i(o){typeof r=="string"?r=typeof o=="string"?r+o:[ba(r),o]:r.push(typeof o=="string"?ba(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(Zt(c))}i(u)}}return typeof r=="string"?r:Am(r)}function Am(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 Gu(t){let e=typeof t.data=="string"?Ea(t.data):t.data;return[{type:"attachment",length:e.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType},e]}var Dm={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",raw_security:"security",log:"log_item"};function Ca(t){return Dm[t]}function wa(t){if(!t?.sdk)return;let{name:e,version:n}=t.sdk;return{name:e,version:n}}function Wu(t,e,n,r){let i=t.sdkProcessingMetadata?.dynamicSamplingContext;return x(x(x({event_id:t.event_id,sent_at:new Date().toISOString()},e&&{sdk:e}),!!n&&r&&{dsn:Gn(r)}),i&&{trace:i})}function Nm(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 Yu(t,e,n,r){let i=wa(n),o=x(x({sent_at:new Date().toISOString()},i&&{sdk:i}),!!r&&e&&{dsn:Gn(e)}),s="aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()];return Ln(o,[s])}function zu(t,e,n,r){let i=wa(n),o=t.type&&t.type!=="replay_event"?t.type:"event";Nm(t,n?.sdk);let s=Wu(t,i,r,e);return delete t.sdkProcessingMetadata,Ln(s,[[{type:o},t]])}var Sa=0,Ku=1,Xu=2;function Jt(t){return new sn(e=>{e(t)})}function Wn(t){return new sn((e,n)=>{n(t)})}var sn=class t{constructor(e){this._state=Sa,this._handlers=[],this._runExecutor(e)}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)})})}_executeHandlers(){if(this._state===Sa)return;let e=this._handlers.slice();this._handlers=[],e.forEach(n=>{n[0]||(this._state===Ku&&n[1](this._value),this._state===Xu&&n[2](this._value),n[0]=!0)})}_runExecutor(e){let n=(o,s)=>{if(this._state===Sa){if(Mn(s)){s.then(r,i);return}this._state=o,this._value=s,this._executeHandlers()}},r=o=>{n(Ku,o)},i=o=>{n(Xu,o)};try{e(r,i)}catch(o){i(o)}}};function ao(t,e,n,r=0){return new sn((i,o)=>{let s=t[r];if(e===null||typeof s!="function")i(e);else{let c=s(x({},e),n);fe&&s.id&&c===null&&te.log(`Event processor "${s.id}" dropped event`),Mn(c)?c.then(u=>ao(t,u,n,r+1).then(i)).then(null,o):ao(t,c,n,r+1).then(i).then(null,o)}})}function qu(t,e){let{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:o}=e;Rm(t,e),r&&Lm(t,r),Fm(t,n),Mm(t,i),Pm(t,o)}function Ta(t,e){let{extra:n,tags:r,user:i,contexts:o,level:s,sdkProcessingMetadata:c,breadcrumbs:u,fingerprint:d,eventProcessors:_,attachments:h,propagationContext:E,transactionName:C,span:N}=e;co(t,"extra",n),co(t,"tags",r),co(t,"user",i),co(t,"contexts",o),t.sdkProcessingMetadata=$n(t.sdkProcessingMetadata,c,2),s&&(t.level=s),C&&(t.transactionName=C),N&&(t.span=N),u.length&&(t.breadcrumbs=[...t.breadcrumbs,...u]),d.length&&(t.fingerprint=[...t.fingerprint,...d]),_.length&&(t.eventProcessors=[...t.eventProcessors,..._]),h.length&&(t.attachments=[...t.attachments,...h]),t.propagationContext=x(x({},t.propagationContext),E)}function co(t,e,n){t[e]=$n(t[e],n,1)}function Rm(t,e){let{extra:n,tags:r,user:i,contexts:o,level:s,transactionName:c}=e;Object.keys(n).length&&(t.extra=x(x({},n),t.extra)),Object.keys(r).length&&(t.tags=x(x({},r),t.tags)),Object.keys(i).length&&(t.user=x(x({},i),t.user)),Object.keys(o).length&&(t.contexts=x(x({},o),t.contexts)),s&&(t.level=s),c&&t.type!=="transaction"&&(t.transaction=c)}function Mm(t,e){let n=[...t.breadcrumbs||[],...e];t.breadcrumbs=n.length?n:void 0}function Pm(t,e){t.sdkProcessingMetadata=x(x({},t.sdkProcessingMetadata),e)}function Lm(t,e){t.contexts=x({trace:ga(e)},t.contexts),t.sdkProcessingMetadata=x({dynamicSamplingContext:va(e)},t.sdkProcessingMetadata);let n=li(e),r=Dr(n).description;r&&!t.transaction&&t.type==="transaction"&&(t.transaction=r)}function Fm(t,e){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],e&&(t.fingerprint=t.fingerprint.concat(e)),t.fingerprint.length||delete t.fingerprint}var lo,Zu,uo;function Ju(t){let e=we._sentryDebugIds;if(!e)return{};let n=Object.keys(e);return uo&&n.length===Zu||(Zu=n.length,uo=n.reduce((r,i)=>{lo||(lo={});let o=lo[i];if(o)r[o[0]]=o[1];else{let s=t(i);for(let c=s.length-1;c>=0;c--){let d=s[c]?.filename,_=e[i];if(d&&_){r[d]=_,lo[i]=[d,_];break}}}return r},{})),uo}function Qu(t,e,n,r,i,o){let{normalizeDepth:s=3,normalizeMaxBreadth:c=1e3}=t,u=Ee(x({},e),{event_id:e.event_id||n.event_id||pt(),timestamp:e.timestamp||hn()}),d=n.integrations||t.integrations.map(B=>B.name);km(u,t),Um(u,d),i&&i.emit("applyFrameMetadata",e),e.type===void 0&&Vm(u,t.stackParser);let _=jm(r,n.captureContext);n.mechanism&&pn(u,n.mechanism);let h=i?i.getEventProcessors():[],E=ro().getScopeData();if(o){let B=o.getScopeData();Ta(E,B)}if(_){let B=_.getScopeData();Ta(E,B)}let C=[...n.attachments||[],...E.attachments];C.length&&(n.attachments=C),qu(u,E);let N=[...h,...E.eventProcessors];return ao(N,u,n).then(B=>(B&&Bm(B),typeof s=="number"&&s>0?Hm(B,s,c):B))}function km(t,e){let{environment:n,release:r,dist:i,maxValueLength:o=250}=e;t.environment=t.environment||n||Nr,!t.release&&r&&(t.release=r),!t.dist&&i&&(t.dist=i);let s=t.request;s?.url&&(s.url=jn(s.url,o))}function Vm(t,e){let n=Ju(e);t.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(i=>{i.filename&&(i.debug_id=n[i.filename])})})}function Bm(t){let e={};if(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)})}),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 Hm(t,e,n){if(!t)return null;let r=x(x(x(x(x({},t),t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(i=>x(x({},i),i.data&&{data:Zt(i.data,e,n)}))}),t.user&&{user:Zt(t.user,e,n)}),t.contexts&&{contexts:Zt(t.contexts,e,n)}),t.extra&&{extra:Zt(t.extra,e,n)});return t.contexts?.trace&&r.contexts&&(r.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(r.contexts.trace.data=Zt(t.contexts.trace.data,e,n))),t.spans&&(r.spans=t.spans.map(i=>x(x({},i),i.data&&{data:Zt(i.data,e,n)}))),t.contexts?.flags&&r.contexts&&(r.contexts.flags=Zt(t.contexts.flags,3,n)),r}function jm(t,e){if(!e)return t;let n=t?t.clone():new wt;return n.update(e),n}function ed(t){if(t)return $m(t)?{captureContext:t}:Wm(t)?{captureContext:t}:t}function $m(t){return t instanceof wt||typeof t=="function"}var Gm=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function Wm(t){return Object.keys(t).some(e=>Gm.includes(e))}function fo(t,e){return mn().captureException(t,ed(e))}function ui(t,e){return mn().captureEvent(t,e)}function di(t){let e=gn(),n=mn(),{userAgent:r}=we.navigator||{},i=bu(x(x({user:n.getUser()||e.getUser()},r&&{userAgent:r}),t)),o=e.getSession();return o?.status==="ok"&&Pn(o,{status:"exited"}),po(),e.setSession(i),i}function po(){let t=gn(),n=mn().getSession()||t.getSession();n&&Cu(n),nd(),t.setSession()}function nd(){let t=gn(),e=Ye(),n=t.getSession();n&&e&&e.captureSession(n)}function fi(t=!1){if(t){po();return}nd()}var Ym="7";function zm(t){let e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}function Km(t){return`${zm(t)}${t.projectId}/envelope/`}function Xm(t,e){let n={sentry_version:Ym};return t.publicKey&&(n.sentry_key=t.publicKey),e&&(n.sentry_client=`${e.name}/${e.version}`),new URLSearchParams(n).toString()}function rd(t,e,n){return e||`${Km(t)}?${Xm(t,n)}`}var id=[];function od(t,e){let n={};return e.forEach(r=>{r&&xa(t,r,n)}),n}function Ia(t,e){for(let n of e)n?.afterAllSetup&&n.afterAllSetup(t)}function xa(t,e,n){if(n[e.name]){fe&&te.log(`Integration skipped because it was already installed: ${e.name}`);return}if(n[e.name]=e,id.indexOf(e.name)===-1&&typeof e.setupOnce=="function"&&(e.setupOnce(),id.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)}fe&&te.log(`Integration installed: ${e.name}`)}function sd(t,e,n){let r=[{type:"client_report"},{timestamp:n||hn(),discarded_events:t}];return Ln(e?{dsn:e}:{},[r])}function ho(t){let e=[];t.message&&e.push(t.message);try{let n=t.exception.values[t.exception.values.length-1];n?.value&&(e.push(n.value),n.type&&e.push(`${n.type}: ${n.value}`))}catch{}return e}function ad(t){let{trace_id:e,parent_span_id:n,span_id:r,status:i,origin:o,data:s,op:c}=t.contexts?.trace??{};return{data:s??{},description:t.transaction,op:c,parent_span_id:n,span_id:r??"",start_timestamp:t.start_timestamp??0,status:i,timestamp:t.timestamp,trace_id:e??"",origin:o,profile_id:s?.[ha],exclusive_time:s?.[ma],measurements:t.measurements,is_segment:!0}}function cd(t){return{type:"transaction",timestamp:t.timestamp,start_timestamp:t.start_timestamp,transaction:t.description,contexts:{trace:{trace_id:t.trace_id,span_id:t.span_id,parent_span_id:t.parent_span_id,op:t.op,status:t.status,origin:t.origin,data:x(x(x({},t.data),t.profile_id&&{[ha]:t.profile_id}),t.exclusive_time&&{[ma]:t.exclusive_time})}},measurements:t.measurements}}var ld="Not capturing exception because it's already been captured.",ud="Discarded session because of missing or non-string release",pd=Symbol.for("SentryInternalError"),hd=Symbol.for("SentryDoNotSendEventError");function mo(t){return{message:t,[pd]:!0}}function Oa(t){return{message:t,[hd]:!0}}function dd(t){return!!t&&typeof t=="object"&&pd in t}function fd(t){return!!t&&typeof t=="object"&&hd in t}var pi=class{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=Bu(e.dsn):fe&&te.warn("No DSN provided, client will not send events."),this._dsn){let n=rd(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport(Ee(x({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this)},e.transportOptions),{url:n}))}}captureException(e,n,r){let i=pt();if(eo(e))return fe&&te.log(ld),i;let o=x({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=x({event_id:pt()},r),s=Ir(e)?e:String(e),c=tr(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?.originalException&&eo(n.originalException))return fe&&te.log(ld),i;let o=x({event_id:i},n),s=e.sdkProcessingMetadata||{},c=s.capturedSpanScope,u=s.capturedSpanIsolationScope;return this._process(this._captureEvent(e,o,c||r,u)),o.event_id}captureSession(e){this.sendSession(e),Pn(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))):Jt(!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._options.integrations.some(({name:e})=>e.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){let n=this._integrations[e.name];xa(this,e,this._integrations),n||Ia(this,[e])}sendEvent(e,n={}){this.emit("beforeSendEvent",e,n);let r=zu(e,this._dsn,this._options._metadata,this._options.tunnel);for(let o of n.attachments||[])r=ju(r,Gu(o));let i=this.sendEnvelope(r);i&&i.then(o=>this.emit("afterSendEvent",e,o),null)}sendSession(e){let{release:n,environment:r=Nr}=this._options;if("aggregates"in e){let o=e.attrs||{};if(!o.release&&!n){fe&&te.warn(ud);return}o.release=o.release||n,o.environment=o.environment||r,e.attrs=o}else{if(!e.release&&!n){fe&&te.warn(ud);return}e.release=e.release||n,e.environment=e.environment||r}this.emit("beforeSendSession",e);let i=Yu(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(i)}recordDroppedEvent(e,n,r=1){if(this._options.sendClientReports){let i=`${e}:${n}`;fe&&te.log(`Recording outcome: "${i}"${r>1?` (${r} times)`:""}`),this._outcomes[i]=(this._outcomes[i]||0)+r}}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=>(fe&&te.error("Error while sending envelope:",n),n)):(fe&&te.error("Transport disabled"),Jt({}))}_setupIntegrations(){let{integrations:e}=this._options;this._integrations=od(this,e),Ia(this,e)}_updateSessionFromEvent(e,n){let r=n.level==="fatal",i=!1,o=n.exception?.values;if(o){i=!0;for(let u of o)if(u.mechanism?.handled===!1){r=!0;break}}let s=e.status==="ok";(s&&e.errors===0||s&&r)&&(Pn(e,Ee(x({},r&&{status:"crashed"}),{errors:e.errors||Number(i||r)})),this.captureSession(e))}_isClientDoneProcessing(e){return new sn(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){let o=this.getOptions(),s=Object.keys(this._integrations);return!n.integrations&&s?.length&&(n.integrations=s),this.emit("preprocessEvent",e,n),e.type||i.setLastEventId(e.event_id||n.event_id),Qu(o,e,n,r,this,i).then(c=>{if(c===null)return c;this.emit("postprocessEvent",c,n),c.contexts=x({trace:ua(r)},c.contexts);let u=Hu(this,r);return c.sdkProcessingMetadata=x({dynamicSamplingContext:u},c.sdkProcessingMetadata),c})}_captureEvent(e,n={},r=mn(),i=gn()){return fe&&Aa(e)&&te.log(`Captured error event \`${ho(e)[0]||"<unknown>"}\``),this._processEvent(e,n,r,i).then(o=>o.event_id,o=>{fe&&(fd(o)?te.log(o.message):dd(o)?te.warn(o.message):te.warn(o))})}_processEvent(e,n,r,i){let o=this.getOptions(),{sampleRate:s}=o,c=md(e),u=Aa(e),d=e.type||"error",_=`before send for type \`${d}\``,h=typeof s>"u"?void 0:Du(s);if(u&&typeof h=="number"&&Math.random()>h)return this.recordDroppedEvent("sample_rate","error"),Wn(Oa(`Discarding event because it's not included in the random sample (sampling rate = ${s})`));let E=d==="replay_event"?"replay":d;return this._prepareEvent(e,n,r,i).then(C=>{if(C===null)throw this.recordDroppedEvent("event_processor",E),Oa("An event processor returned `null`, will not send event.");if(n.data&&n.data.__sentry__===!0)return C;let V=Jm(this,o,C,n);return Zm(V,_)}).then(C=>{if(C===null){if(this.recordDroppedEvent("before_send",E),c){let X=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",X)}throw Oa(`${_} returned \`null\`, will not send event.`)}let N=r.getSession()||i.getSession();if(u&&N&&this._updateSessionFromEvent(N,C),c){let B=C.sdkProcessingMetadata?.spanCountBeforeProcessing||0,X=C.spans?C.spans.length:0,J=B-X;J>0&&this.recordDroppedEvent("before_send","span",J)}let V=C.transaction_info;if(c&&V&&C.transaction!==e.transaction){let B="custom";C.transaction_info=Ee(x({},V),{source:B})}return this.sendEvent(C,n),C}).then(null,C=>{throw fd(C)||dd(C)?C:(this.captureException(C,{data:{__sentry__:!0},originalException:C}),mo(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
18
|
-
Reason: ${C}`))})}_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}})}_flushOutcomes(){fe&&te.log("Flushing outcomes...");let e=this._clearOutcomes();if(e.length===0){fe&&te.log("No outcomes to send");return}if(!this._dsn){fe&&te.log("No dsn provided, will not send outcomes");return}fe&&te.log("Sending outcomes:",e);let n=
|
|
19
|
-
Event: ${
|
|
20
|
-
Event: ${
|
|
21
|
-
Event: ${
|
|
22
|
-
Event: ${
|
|
23
|
-
Url: ${
|
|
24
|
-
Event: ${
|
|
25
|
-
Url: ${vo(t)}`),!0}return!1}function ug(t,e){return e?.length?ho(t).some(n=>xr(n,e)):!1}function dg(t,e){if(!e?.length)return!1;let n=t.transaction;return n?xr(n,e):!1}function fg(t,e){if(!e?.length)return!1;let n=vo(t);return n?xr(n,e):!1}function pg(t,e){if(!e?.length)return!0;let n=vo(t);return n?xr(n,e):!0}function hg(t=[]){for(let e=t.length-1;e>=0;e--){let n=t[e];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function vo(t){try{let n=[...t.exception?.values??[]].reverse().find(r=>r.mechanism?.parent_id===void 0&&r.stacktrace?.frames?.length)?.stacktrace?.frames;return n?hg(n):null}catch{return fe&&te.error(`Cannot extract url for event ${fn(t)}`),null}}function mg(t){return t.exception?.values?.length?!t.message&&!t.exception.values.some(e=>e.stacktrace||e.type&&e.type!=="Error"||e.value):!1}function Fa(t,e,n,r,i,o){if(!i.exception?.values||!o||!on(o.originalException,Error))return;let s=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;s&&(i.exception.values=La(t,e,r,o.originalException,n,i.exception.values,s,0))}function La(t,e,n,r,i,o,s,c){if(o.length>=n+1)return o;let u=[...o];if(on(r[i],Error)){Sd(s,c);let d=t(e,r[i]),_=u.length;Td(d,i,_,c),u=La(t,e,n,r[i],i,[d,...u],d,_)}return Array.isArray(r.errors)&&r.errors.forEach((d,_)=>{if(on(d,Error)){Sd(s,c);let h=t(e,d),E=u.length;Td(h,`errors[${_}]`,E,c),u=La(t,e,n,d,i,[h,...u],h,E)}}),u}function Sd(t,e){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism=Ee(x(x({},t.mechanism),t.type==="AggregateError"&&{is_exception_group:!0}),{exception_id:e})}function Td(t,e,n,r){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism=Ee(x({},t.mechanism),{type:"chained",source:e,exception_id:n,parent_id:r})}function ka(t){let e="console";Ot(e,t),At(e,gg)}function gg(){"console"in we&&$s.forEach(function(t){t in we.console&&ft(we.console,t,function(e){return Sr[t]=e,function(...n){dt("console",{args:n,level:t}),Sr[t]?.apply(we.console,n)}})})}function Va(t){return t==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(t)?t:"log"}var _g="Dedupe",vg=()=>{let t;return{name:_g,processEvent(e){if(e.type)return e;try{if(yg(e,t))return fe&&te.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return t=e}}},Eo=vg;function yg(t,e){return e?!!(Eg(t,e)||bg(t,e)):!1}function Eg(t,e){let n=t.message,r=e.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!Od(t,e)||!xd(t,e))}function bg(t,e){let n=Id(e),r=Id(t);return!(!n||!r||n.type!==r.type||n.value!==r.value||!Od(t,e)||!xd(t,e))}function xd(t,e){let n=zi(t),r=zi(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 Od(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 Id(t){return t.exception?.values?.[0]}function mi(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}}function bo(t){if(t!==void 0)return t>=400&&t<500?"warning":t>=500?"error":void 0}var gi=we;function Ba(){return"history"in gi&&!!gi.history}function Cg(){if(!("fetch"in gi))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function _i(t){return t&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function Ua(){if(typeof EdgeRuntime=="string")return!0;if(!Cg())return!1;if(_i(gi.fetch))return!0;let t=!1,e=gi.document;if(e&&typeof e.createElement=="function")try{let n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n),n.contentWindow?.fetch&&(t=_i(n.contentWindow.fetch)),e.head.removeChild(n)}catch(n){fe&&te.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return t}function ja(t,e){let n="fetch";Ot(n,t),At(n,()=>wg(void 0,e))}function wg(t,e=!1){e&&!Ua()||ft(we,"fetch",function(n){return function(...r){let i=new Error,{method:o,url:s}=Sg(r),c={args:r,fetchData:{method:o,url:s},startTimestamp:Ft()*1e3,virtualError:i,headers:Tg(r)};return t||dt("fetch",x({},c)),n.apply(we,r).then(async u=>(t?t(u):dt("fetch",Ee(x({},c),{endTimestamp:Ft()*1e3,response:u})),u),u=>{if(dt("fetch",Ee(x({},c),{endTimestamp:Ft()*1e3,error:u})),er(u)&&u.stack===void 0&&(u.stack=i.stack,jt(u,"framesToPop",1)),u instanceof TypeError&&(u.message==="Failed to fetch"||u.message==="Load failed"||u.message==="NetworkError when attempting to fetch resource."))try{let d=new URL(c.fetchData.url);u.message=`${u.message} (${d.host})`}catch{}throw u})}})}function Ha(t,e){return!!t&&typeof t=="object"&&!!t[e]}function Ad(t){return typeof t=="string"?t:t?Ha(t,"url")?t.url:t.toString?t.toString():"":""}function Sg(t){if(t.length===0)return{method:"GET",url:""};if(t.length===2){let[n,r]=t;return{url:Ad(n),method:Ha(r,"method")?String(r.method).toUpperCase():"GET"}}let e=t[0];return{url:Ad(e),method:Ha(e,"method")?String(e.method).toUpperCase():"GET"}}function Tg(t){let[e,n]=t;try{if(typeof n=="object"&&n!==null&&"headers"in n&&n.headers)return new Headers(n.headers);if(hu(e))return new Headers(e.headers)}catch{}}function $a(){return"npm"}var et=we,Ga=0;function Wa(){return Ga>0}function Ug(){Ga++,setTimeout(()=>{Ga--})}function ir(t,e={}){function n(i){return typeof i=="function"}if(!n(t))return t;try{let i=t.__sentry_wrapped__;if(i)return typeof i=="function"?i:t;if(rr(t))return t}catch{return t}let r=function(...i){try{let o=i.map(s=>ir(s,e));return t.apply(this,o)}catch(o){throw Ug(),ci(s=>{s.addEventProcessor(c=>(e.mechanism&&(Or(c,void 0,void 0),pn(c,e.mechanism)),c.extra=Ee(x({},c.extra),{arguments:i}),c)),fo(o)}),o}};try{for(let i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=t[i])}catch{}Ji(r,t),jt(t,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return t.name}})}catch{}return r}function Dd(){let t=ai(),{referrer:e}=et.document||{},{userAgent:n}=et.navigator||{},r=x(x({},e&&{Referer:e}),n&&{"User-Agent":n});return{url:t,headers:r}}function Co(t,e){let n=Ka(t,e),r={type:Wg(e),value:Yg(e)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function Hg(t,e,n,r){let o=Ye()?.getOptions().normalizeDepth,s=Xg(e),c={__serialized__:so(e,o)};if(s)return{exception:{values:[Co(t,s)]},extra:c};let u={exception:{values:[{type:nr(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:zg(e,{isUnhandledRejection:r})}]},extra:c};if(n){let d=Ka(t,n);d.length&&(u.exception.values[0].stacktrace={frames:d})}return u}function Ya(t,e){return{exception:{values:[Co(t,e)]}}}function Ka(t,e){let n=e.stacktrace||e.stack||"",r=$g(e),i=Gg(e);try{return t(n,r,i)}catch{}return[]}var jg=/Minified React error #\d+;/i;function $g(t){return t&&jg.test(t.message)?1:0}function Gg(t){return typeof t.framesToPop=="number"?t.framesToPop:0}function Nd(t){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?t instanceof WebAssembly.Exception:!1}function Wg(t){let e=t?.name;return!e&&Nd(t)?t.message&&Array.isArray(t.message)&&t.message.length==2?t.message[0]:"WebAssembly.Exception":e}function Yg(t){let e=t?.message;return Nd(t)?Array.isArray(t.message)&&t.message.length==2?t.message[1]:"wasm exception":e?e.error&&typeof e.error.message=="string"?e.error.message:e:"No error message"}function Rd(t,e,n,r){let i=n?.syntheticException||void 0,o=wo(t,e,i,r);return pn(o),o.level="error",n?.event_id&&(o.event_id=n.event_id),Jt(o)}function Md(t,e,n="info",r,i){let o=r?.syntheticException||void 0,s=za(t,e,o,i);return s.level=n,r?.event_id&&(s.event_id=r.event_id),Jt(s)}function wo(t,e,n,r,i){let o;if(Xi(e)&&e.error)return Ya(t,e.error);if(qi(e)||Js(e)){let s=e;if("stack"in e)o=Ya(t,e);else{let c=s.name||(qi(s)?"DOMError":"DOMException"),u=s.message?`${c}: ${s.message}`:c;o=za(t,u,n,r),Or(o,u)}return"code"in s&&(o.tags=Ee(x({},o.tags),{"DOMException.code":`${s.code}`})),o}return er(e)?Ya(t,e):Rn(e)||nr(e)?(o=Hg(t,e,n,i),pn(o,{synthetic:!0}),o):(o=za(t,e,n,r),Or(o,`${e}`,void 0),pn(o,{synthetic:!0}),o)}function za(t,e,n,r){let i={};if(r&&n){let o=Ka(t,n);o.length&&(i.exception={values:[{value:e,stacktrace:{frames:o}}]}),pn(i,{synthetic:!0})}if(Ir(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 zg(t,{isUnhandledRejection:e}){let n=ia(t),r=e?"promise rejection":"exception";return Xi(t)?`Event \`ErrorEvent\` captured as ${r} with message \`${t.message}\``:nr(t)?`Event \`${Kg(t)}\` (type=${t.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function Kg(t){try{let e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch{}}function Xg(t){for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e)){let n=t[e];if(n instanceof Error)return n}}var qg=5e3,vi=class extends pi{constructor(e){let n=Zg(e),r=et.SENTRY_SDK_SOURCE||$a();Ma(n,"browser",["browser"],r),super(n);let{sendDefaultPii:i,sendClientReports:o,enableLogs:s,_experiments:c}=this._options,u=s??c?.enableLogs;et.document&&(o||u)&&et.document.addEventListener("visibilitychange",()=>{et.document.visibilityState==="hidden"&&(o&&this._flushOutcomes(),u&&hi(this))}),u&&(this.on("flush",()=>{hi(this)}),this.on("afterCaptureLog",()=>{this._logFlushIdleTimeout&&clearTimeout(this._logFlushIdleTimeout),this._logFlushIdleTimeout=setTimeout(()=>{hi(this)},qg)})),i&&(this.on("postprocessEvent",Na),this.on("beforeSendSession",Ra))}eventFromException(e,n){return Rd(this._options.stackParser,e,n,this._options.attachStacktrace)}eventFromMessage(e,n="info",r){return Md(this._options.stackParser,e,n,r,this._options.attachStacktrace)}_prepareEvent(e,n,r,i){return e.platform=e.platform||"javascript",super._prepareEvent(e,n,r,i)}};function Zg(t){return x({release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:et.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0},t)}var Pd=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var ht=we;var Jg=1e3,Ld,Xa,qa;function Za(t){let e="dom";Ot(e,t),At(e,Qg)}function Qg(){if(!ht.document)return;let t=dt.bind(null,"dom"),e=Fd(t,!0);ht.document.addEventListener("click",e,!1),ht.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(n=>{let i=ht[n]?.prototype;i?.hasOwnProperty?.("addEventListener")&&(ft(i,"addEventListener",function(o){return function(s,c,u){if(s==="click"||s=="keypress")try{let d=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},_=d[s]=d[s]||{refCount:0};if(!_.handler){let h=Fd(t);_.handler=h,o.call(this,s,h,u)}_.refCount++}catch{}return o.call(this,s,c,u)}}),ft(i,"removeEventListener",function(o){return function(s,c,u){if(s==="click"||s=="keypress")try{let d=this.__sentry_instrumentation_handlers__||{},_=d[s];_&&(_.refCount--,_.refCount<=0&&(o.call(this,s,_.handler,u),_.handler=void 0,delete d[s]),Object.keys(d).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return o.call(this,s,c,u)}}))})}function e_(t){if(t.type!==Xa)return!1;try{if(!t.target||t.target._sentryId!==qa)return!1}catch{}return!0}function t_(t,e){return t!=="keypress"?!1:e?.tagName?!(e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable):!0}function Fd(t,e=!1){return n=>{if(!n||n._sentryCaptured)return;let r=n_(n);if(t_(n.type,r))return;jt(n,"_sentryCaptured",!0),r&&!r._sentryId&&jt(r,"_sentryId",pt());let i=n.type==="keypress"?"input":n.type;e_(n)||(t({event:n,name:i,global:e}),Xa=n.type,qa=r?r._sentryId:void 0),clearTimeout(Ld),Ld=ht.setTimeout(()=>{qa=void 0,Xa=void 0},Jg)}}function n_(t){try{return t.target}catch{return null}}var So;function yi(t){let e="history";Ot(e,t),At(e,r_)}function r_(){if(ht.addEventListener("popstate",()=>{let e=ht.location.href,n=So;if(So=e,n===e)return;dt("history",{from:n,to:e})}),!Ba())return;function t(e){return function(...n){let r=n.length>2?n[2]:void 0;if(r){let i=So,o=i_(String(r));if(So=o,i===o)return e.apply(this,n);dt("history",{from:i,to:o})}return e.apply(this,n)}}ft(ht.history,"pushState",t),ft(ht.history,"replaceState",t)}function i_(t){try{return new URL(t,ht.location.origin).toString()}catch{return t}}var To={};function Ja(t){let e=To[t];if(e)return e;let n=ht[t];if(_i(n))return To[t]=n.bind(ht);let r=ht.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?.[t]&&(n=o[t]),r.head.removeChild(i)}catch(i){Pd&&te.warn(`Could not create sandbox iframe for ${t} check, bailing to window.${t}: `,i)}return n&&(To[t]=n.bind(ht))}function Io(t){To[t]=void 0}var or="__sentry_xhr_v3__";function Qa(t){let e="xhr";Ot(e,t),At(e,o_)}function o_(){if(!ht.XMLHttpRequest)return;let t=XMLHttpRequest.prototype;t.open=new Proxy(t.open,{apply(e,n,r){let i=new Error,o=Ft()*1e3,s=Dt(r[0])?r[0].toUpperCase():void 0,c=s_(r[1]);if(!s||!c)return e.apply(n,r);n[or]={method:s,url:c,request_headers:{}},s==="POST"&&c.match(/sentry_key/)&&(n.__sentry_own_request__=!0);let u=()=>{let d=n[or];if(d&&n.readyState===4){try{d.status_code=n.status}catch{}let _={endTimestamp:Ft()*1e3,startTimestamp:o,xhr:n,virtualError:i};dt("xhr",_)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(d,_,h){return u(),d.apply(_,h)}}):n.addEventListener("readystatechange",u),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(d,_,h){let[E,C]=h,N=_[or];return N&&Dt(E)&&Dt(C)&&(N.request_headers[E.toLowerCase()]=C),d.apply(_,h)}}),e.apply(n,r)}}),t.send=new Proxy(t.send,{apply(e,n,r){let i=n[or];if(!i)return e.apply(n,r);r[0]!==void 0&&(i.body=r[0]);let o={startTimestamp:Ft()*1e3,xhr:n};return dt("xhr",o),e.apply(n,r)}})}function s_(t){if(Dt(t))return t;try{return t.toString()}catch{}}function ec(t,e=Ja("fetch")){let n=0,r=0;function i(o){let s=o.body.length;n+=s,r++;let c=x({body:o.body,method:"POST",referrerPolicy:"strict-origin",headers:t.headers,keepalive:n<=6e4&&r<15},t.fetchOptions);if(!e)return Io("fetch"),Wn("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 Io("fetch"),n-=s,r--,Wn(u)}}return go(t,i)}var a_=30;var c_=50;function tc(t,e,n,r){let i={filename:t,function:e==="<anonymous>"?dn:e,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}var l_=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,u_=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,d_=/\((\S*)(?::(\d+))(?::(\d+))\)/,f_=t=>{let e=l_.exec(t);if(e){let[,r,i,o]=e;return tc(r,dn,+i,+o)}let n=u_.exec(t);if(n){if(n[2]&&n[2].indexOf("eval")===0){let s=d_.exec(n[2]);s&&(n[2]=s[1],n[3]=s[2],n[4]=s[3])}let[i,o]=Ud(n[1]||dn,n[2]);return tc(o,i,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},kd=[a_,f_],p_=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,h_=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,m_=t=>{let e=p_.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){let o=h_.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]||dn;return[i,r]=Ud(i,r),tc(r,i,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}},Vd=[c_,m_];var Bd=[kd,Vd],nc=zs(...Bd),Ud=(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]:dn,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]};var Rr=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var xo=1024,g_="Breadcrumbs",__=(t={})=>{let e=x({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},t);return{name:g_,setup(n){e.console&&ka(E_(n)),e.dom&&Za(y_(n,e.dom)),e.xhr&&Qa(b_(n)),e.fetch&&ja(C_(n)),e.history&&yi(w_(n)),e.sentry&&n.on("beforeSendEvent",v_(n))}}},Hd=__;function v_(t){return function(n){Ye()===t&&_n({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:fn(n)},{event:n})}}function y_(t,e){return function(r){if(Ye()!==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>xo&&(Rr&&te.warn(`\`dom.maxStringLength\` cannot exceed ${xo}, but a value of ${c} was configured. Sentry will use ${xo} instead.`),c=xo),typeof s=="string"&&(s=[s]);try{let d=r.event,_=S_(d)?d.target:d;i=si(_,{keyAttrs:s,maxStringLength:c}),o=ra(_)}catch{i="<unknown>"}if(i.length===0)return;let u={category:`ui.${r.name}`,message:i};o&&(u.data={"ui.component_name":o}),_n(u,{event:r.event,name:r.name,global:r.global})}}function E_(t){return function(n){if(Ye()!==t)return;let r={category:"console",data:{arguments:n.args,logger:"console"},level:Va(n.level),message:Zi(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${Zi(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;_n(r,{input:n.args,level:n.level})}}function b_(t){return function(n){if(Ye()!==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,_={method:s,url:c,status_code:u},h={xhr:n.xhr,input:d,startTimestamp:r,endTimestamp:i},E={category:"xhr",data:_,type:"http",level:bo(u)};t.emit("beforeOutgoingRequestBreadcrumb",E,h),_n(E,h)}}function C_(t){return function(n){if(Ye()!==t)return;let{startTimestamp:r,endTimestamp:i}=n;if(i&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.fetchData.method,n.fetchData.url,n.error){let o=n.fetchData,s={data:n.error,input:n.args,startTimestamp:r,endTimestamp:i},c={category:"fetch",data:o,level:"error",type:"http"};t.emit("beforeOutgoingRequestBreadcrumb",c,s),_n(c,s)}else{let o=n.response,s=Ee(x({},n.fetchData),{status_code:o?.status});n.fetchData.request_body_size,n.fetchData.response_body_size,o?.status;let c={input:n.args,response:o,startTimestamp:r,endTimestamp:i},u={category:"fetch",data:s,type:"http",level:bo(s.status_code)};t.emit("beforeOutgoingRequestBreadcrumb",u,c),_n(u,c)}}}function w_(t){return function(n){if(Ye()!==t)return;let r=n.from,i=n.to,o=mi(et.location.href),s=r?mi(r):void 0,c=mi(i);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),_n({category:"navigation",data:{from:r,to:i}})}}function S_(t){return!!t&&!!t.target}var T_=["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"],I_="BrowserApiErrors",x_=(t={})=>{let e=x({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1},t);return{name:I_,setupOnce(){e.setTimeout&&ft(et,"setTimeout",jd),e.setInterval&&ft(et,"setInterval",jd),e.requestAnimationFrame&&ft(et,"requestAnimationFrame",O_),e.XMLHttpRequest&&"XMLHttpRequest"in et&&ft(XMLHttpRequest.prototype,"send",A_);let n=e.eventTarget;n&&(Array.isArray(n)?n:T_).forEach(i=>D_(i,e))}}},$d=x_;function jd(t){return function(...e){let n=e[0];return e[0]=ir(n,{mechanism:{data:{function:qt(t)},handled:!1,type:"instrument"}}),t.apply(this,e)}}function O_(t){return function(e){return t.apply(this,[ir(e,{mechanism:{data:{function:"requestAnimationFrame",handler:qt(t)},handled:!1,type:"instrument"}})])}}function A_(t){return function(...e){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(i=>{i in n&&typeof n[i]=="function"&&ft(n,i,function(o){let s={mechanism:{data:{function:i,handler:qt(o)},handled:!1,type:"instrument"}},c=rr(o);return c&&(s.mechanism.data.handler=qt(c)),ir(o,s)})}),t.apply(this,e)}}function D_(t,e){let r=et[t]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(ft(r,"addEventListener",function(i){return function(o,s,c){try{N_(s)&&(s.handleEvent=ir(s.handleEvent,{mechanism:{data:{function:"handleEvent",handler:qt(s),target:t},handled:!1,type:"instrument"}}))}catch{}return e.unregisterOriginalCallbacks&&R_(this,o,s),i.apply(this,[o,ir(s,{mechanism:{data:{function:"addEventListener",handler:qt(s),target:t},handled:!1,type:"instrument"}}),c])}}),ft(r,"removeEventListener",function(i){return function(o,s,c){try{let u=s.__sentry_wrapped__;u&&i.call(this,o,u,c)}catch{}return i.call(this,o,s,c)}}))}function N_(t){return typeof t.handleEvent=="function"}function R_(t,e,n){t&&typeof t=="object"&&"removeEventListener"in t&&typeof t.removeEventListener=="function"&&t.removeEventListener(e,n)}var Gd=()=>({name:"BrowserSession",setupOnce(){if(typeof et.document>"u"){Rr&&te.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}di({ignoreDuration:!0}),fi(),yi(({from:t,to:e})=>{t!==void 0&&t!==e&&(di({ignoreDuration:!0}),fi())})}});var M_="GlobalHandlers",P_=(t={})=>{let e=x({onerror:!0,onunhandledrejection:!0},t);return{name:M_,setupOnce(){Error.stackTraceLimit=50},setup(n){e.onerror&&(L_(n),Wd("onerror")),e.onunhandledrejection&&(F_(n),Wd("onunhandledrejection"))}}},Yd=P_;function L_(t){Xs(e=>{let{stackParser:n,attachStacktrace:r}=zd();if(Ye()!==t||Wa())return;let{msg:i,url:o,line:s,column:c,error:u}=e,d=B_(wo(n,u||i,void 0,r,!1),o,s,c);d.level="error",ui(d,{originalException:u,mechanism:{handled:!1,type:"onerror"}})})}function F_(t){Zs(e=>{let{stackParser:n,attachStacktrace:r}=zd();if(Ye()!==t||Wa())return;let i=k_(e),o=tr(i)?V_(i):wo(n,i,void 0,r,!0);o.level="error",ui(o,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function k_(t){if(tr(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 V_(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}function B_(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=r,_=n,h=Dt(e)&&e.length>0?e:ai();return u.length===0&&u.push({colno:d,filename:h,function:dn,in_app:!0,lineno:_}),t}function Wd(t){Rr&&te.log(`Global Handler attached: ${t}`)}function zd(){return Ye()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}var Kd=()=>({name:"HttpContext",preprocessEvent(t){if(!et.navigator&&!et.location&&!et.document)return;let e=Dd(),n=x(x({},e.headers),t.request?.headers);t.request=Ee(x(x({},e),t.request),{headers:n})}});var U_="cause",H_=5,j_="LinkedErrors",$_=(t={})=>{let e=t.limit||H_,n=t.key||U_;return{name:j_,preprocessEvent(r,i,o){let s=o.getOptions();Fa(Co,s.stackParser,n,e,r,i)}}},Xd=$_;function rc(t){return[yo(),_o(),$d(),Hd(),Yd(),Xd(),Eo(),Kd(),Gd()]}var qd={},Zd,ic,G_;(()=>{let t=rc({}).filter(e=>!["BrowserApiErrors","Breadcrumbs","GlobalHandlers"].includes(e.name));ic=new vi({dsn:"https://1bc3dda4c861f60cd6be1b67584f4bc6@o559187.ingest.us.sentry.io/4507626484203520",transport:ec,stackParser:nc,integrations:t,environment:Dn.mode,release:`web-sdk@${qe.SDK_VERSION}`,debug:Dn.debug}),ic.init()})();function Ao(t,e,n){We.error(`${e}:`,t);let r=W_(n);r.setTag("operation",e),r.captureException(t)}function W_(t){t??={};let{extra:e,tags:n}=t,r=new wt;if(r.setClient(ic),r.setUser(G_),t.triggerContext&&!t.engagementTrigger&&(t.engagementTrigger=t.triggerContext.triggerData),t.engagementTrigger){let i=t.engagementTrigger;r.setTags({"engagement.id":i.engagementID,"engagement.short_id":i.shortID,"engagement.objective":i.objective,"engagement.delivery_type":i.onsiteDeliveryType,"engagement.content_id":i.contentID,"engagement.variation":i.variation,"engagement.currency":i.currency})}return e&&r.setExtras(e),n&&r.setTags(n),Zd&&r.setTags(Zd),Object.keys(qd).forEach(i=>{r.setContext(i,qd[i])}),r.setTag("language",navigator.language),r.setTag("timezone",Jd()),Y_(r),r}function Y_(t){window.Shopify&&(t.setTag("shopify.shop",window.Shopify.shop),t.setTag("shopify.currency",window.Shopify.currency?.active),t.setTag("shopify.locale",window.Shopify.locale),t.setTag("theme.schema_name",window.Shopify.theme?.schema_name),t.setTag("theme.schema_version",window.Shopify.theme?.schema_version))}var Do=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 No=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 Er(e)}};function oc(t,e,n){return{[t]:Fn(e,n),[t+"_wo_currency"]:e}}function Fn(t,e){if(t==0&&e)return"Free";let n=No.get(),r=ln.get(),i=n.shopCurrencyCode||r.currency,o=n.currencyCode;o||We.warn("Currency code is not set in RuntimeData");let s=r.money?.format??n.moneyFormat,c;if(s&&i===o)c=Do.format(t*100,s);else{let u;try{u=new Intl.NumberFormat(z_(),{style:"currency",currency:o||i,minimumFractionDigits:0,maximumFractionDigits:2})}catch(d){return Ao(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 z_(){return navigator.languages!==void 0?navigator.languages[0].split("-")[0]:navigator.language??"en"}var Ro;function Jd(){if(Ro)return Ro;try{return Ro=Intl.DateTimeFormat().resolvedOptions().timeZone,Ro}catch{return""}}var vn=class t{transform(e){return e==null?null:Fn(e)}static \u0275fac=function(n){return new(n||t)};static \u0275pipe=ki({name:"cooeeCurrency",type:t,pure:!0})};var Nt=Es(ef());Nt.filters.define("default",function(t){return typeof t>"u"||t==null?"":X_(t)});+Nt.filters.define("max",(t,e)=>{let n=Number(t),r=Number(e);return isNaN(n)||isNaN(r)?t:n>r?e:t});Nt.filters.define("min",(t,e)=>{let n=Number(t),r=Number(e);return isNaN(n)||isNaN(r)?t:n<r?e:t});Nt.filters.define("fallback",(t,e)=>t==null||t===""?e:t);Nt.filters.define("manipulate_quantity",(t,e,n)=>{if(e??=1,n??=100,e>n)return We.error("Invalid range: min should be less than or equal to max."),t;if(t>=e&&t<=n)return t;let r=t%n;return r<e?e:r});Nt.filters.define("apply_discount_perc",(t,e,n=1/0)=>{if(t=+t,isNaN(t))return We.error("Need value as a number for `apply_discount_perc` filter"),NaN;if(e<0||e>100)return We.error("Invalid percent value for `apply_discount_perc` filter. Must be between 0 and 100."),NaN;let r=t*e/100;return t-Math.min(n,r)});Nt.filters.define("apply_discount_fixed",(t,e)=>(t=+t,isNaN(t)?(We.error("Need value as a number for `apply_discount_fixed` filter"),NaN):Math.max(0,t-e)));Nt.filters.define("currency",t=>(t=+t,isNaN(t)?(We.error("Need value as a number for `currency` filter"),NaN):Fn(t)));Nt.defaultConfig.defaultFilter="default";Nt.defaultConfig.useWith=!0;Nt.defaultConfig.autoEscape=!1;var K_={'"':""","\\":"\","\n":"\\n"};function X_(t){return String(t).replace(/["\\\n]/g,e=>K_[e])}function q_(t){if(!t)return"";let e=/({{{\s*([^}]+?)\s*}}}|{{\s*&\s*([^}]+?)\s*}})/g;return t.replace(e,(n,r,i,o)=>`{{ ${(i||o||"").trim()} }}`)}var Mr=(t,e,n)=>{e=x({discount:{},cart:{},product:{},bundle:{},variant:{},customer:{},svg:{},form:{},amount_left:null},e);try{return Nt.render(q_(t),e)}catch(r){throw Ao(r,"squirrelly-render",{extra:{template:t,values:e},triggerContext:n}),r}};var Po=class t{transform(e,n){return e?Mr(e,x({},n)):null}static \u0275fac=function(n){return new(n||t)};static \u0275pipe=ki({name:"cooeeDynamicVariables",type:t,pure:!0})};var sc={};(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 v=new OffscreenCanvas(1,1),y=v.getContext("2d");y.fillRect(0,0,1,1);var U=v.transferToImageBitmap();try{y.createPattern(U,"no-repeat")}catch{return!1}return!0}();function u(){}function d(v){var y=n.exports.Promise,U=y!==void 0?y:e.Promise;return typeof U=="function"?new U(v):(v(u,u),null)}var _=function(v,y){return{transform:function(U){if(v)return U;if(y.has(U))return y.get(U);var Z=new OffscreenCanvas(U.width,U.height),ne=Z.getContext("2d");return ne.drawImage(U,0,0),y.set(U,Z),Z},clear:function(){y.clear()}}}(c,new Map),h=function(){var v=Math.floor(16.666666666666668),y,U,Z={},ne=0;return typeof requestAnimationFrame=="function"&&typeof cancelAnimationFrame=="function"?(y=function(ie){var ce=Math.random();return Z[ce]=requestAnimationFrame(function Q(oe){ne===oe||ne+v-1<oe?(ne=oe,delete Z[ce],ie()):Z[ce]=requestAnimationFrame(Q)}),ce},U=function(ie){Z[ie]&&cancelAnimationFrame(Z[ie])}):(y=function(ie){return setTimeout(ie,v)},U=function(ie){return clearTimeout(ie)}),{frame:y,cancel:U}}(),E=function(){var v,y,U={};function Z(ne){function ie(ce,Q){ne.postMessage({options:ce||{},callback:Q})}ne.init=function(Q){var oe=Q.transferControlToOffscreen();ne.postMessage({canvas:oe},[oe])},ne.fire=function(Q,oe,ee){if(y)return ie(Q,null),y;var pe=Math.random().toString(36).slice(2);return y=d(function(se){function he(me){me.data.callback===pe&&(delete U[pe],ne.removeEventListener("message",he),y=null,_.clear(),ee(),se())}ne.addEventListener("message",he),ie(Q,pe),U[pe]=he.bind(null,{data:{callback:pe}})}),y},ne.reset=function(){ne.postMessage({reset:!0});for(var Q in U)U[Q](),delete U[Q]}}return function(){if(v)return v;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(`
|
|
26
|
-
`);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 N(v,y){return y?y(v):v}function V(v){return v!=null}function B(v,y,U){return N(v&&V(v[y])?v[y]:C[y],U)}function X(v){return v<0?0:Math.floor(v)}function J(v,y){return Math.floor(Math.random()*(y-v))+v}function ue(v){return parseInt(v,16)}function q(v){return v.map(Ae)}function Ae(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:ue(y.substring(0,2)),g:ue(y.substring(2,4)),b:ue(y.substring(4,6))}}function H(v){var y=B(v,"origin",Object);return y.x=B(y,"x",Number),y.y=B(y,"y",Number),y}function _e(v){v.width=document.documentElement.clientWidth,v.height=document.documentElement.clientHeight}function de(v){var y=v.getBoundingClientRect();v.width=y.width,v.height=y.height}function ye(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 ke(v,y,U,Z,ne,ie,ce,Q,oe){v.save(),v.translate(y,U),v.rotate(ie),v.scale(Z,ne),v.arc(0,0,1,ce,Q,oe),v.restore()}function De(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 Le(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,ce=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(O(y.shape.path,y.shape.matrix,y.x,y.y,Math.abs(ie-Z)*.1,Math.abs(ce-ne)*.1,Math.PI/10*y.wobble));else if(y.shape.type==="bitmap"){var Q=Math.PI/10*y.wobble,oe=Math.abs(ie-Z)*.1,ee=Math.abs(ce-ne)*.1,pe=y.shape.bitmap.width*y.scalar,se=y.shape.bitmap.height*y.scalar,he=new DOMMatrix([Math.cos(Q)*oe,Math.sin(Q)*oe,-Math.sin(Q)*ee,Math.cos(Q)*ee,y.x,y.y]);he.multiplySelf(new DOMMatrix(y.shape.matrix));var me=v.createPattern(_.transform(y.shape.bitmap),"no-repeat");me.setTransform(he),v.globalAlpha=1-U,v.fillStyle=me,v.fillRect(y.x-pe/2,y.y-se/2,pe,se),v.globalAlpha=1}else if(y.shape==="circle")v.ellipse?v.ellipse(y.x,y.y,Math.abs(ie-Z)*y.ovalScalar,Math.abs(ce-ne)*y.ovalScalar,Math.PI/10*y.wobble,0,2*Math.PI):ke(v,y.x,y.y,Math.abs(ie-Z)*y.ovalScalar,Math.abs(ce-ne)*y.ovalScalar,Math.PI/10*y.wobble,0,2*Math.PI);else if(y.shape==="star")for(var ge=Math.PI/2*3,p=4*y.scalar,a=8*y.scalar,l=y.x,g=y.y,T=5,D=Math.PI/T;T--;)l=y.x+Math.cos(ge)*a,g=y.y+Math.sin(ge)*a,v.lineTo(l,g),ge+=D,l=y.x+Math.cos(ge)*p,g=y.y+Math.sin(ge)*p,v.lineTo(l,g),ge+=D;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(ce)),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(),ce=v.getContext("2d"),Q,oe,ee=d(function(pe){function se(){Q=oe=null,ce.clearRect(0,0,Z.width,Z.height),_.clear(),ne(),pe()}function he(){r&&!(Z.width===i.width&&Z.height===i.height)&&(Z.width=v.width=i.width,Z.height=v.height=i.height),!Z.width&&!Z.height&&(U(v),Z.width=v.width,Z.height=v.height),ce.clearRect(0,0,Z.width,Z.height),ie=ie.filter(function(me){return Le(ce,me)}),ie.length?Q=h.frame(he):se()}Q=h.frame(he),oe=se});return{addFettis:function(pe){return ie=ie.concat(pe),ee},canvas:v,promise:ee,reset:function(){Q&&h.cancel(Q),oe&&oe()}}}function ze(v,y){var U=!v,Z=!!B(y||{},"resize"),ne=!1,ie=B(y,"disableForReducedMotion",Boolean),ce=o&&!!B(y||{},"useWorker"),Q=ce?E():null,oe=U?_e:de,ee=v&&Q?!!v.__confetti_initialized:!1,pe=typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion)").matches,se;function he(ge,p,a){for(var l=B(ge,"particleCount",X),g=B(ge,"angle",Number),T=B(ge,"spread",Number),D=B(ge,"startVelocity",Number),F=B(ge,"decay",Number),ve=B(ge,"gravity",Number),Te=B(ge,"drift",Number),Ce=B(ge,"colors",q),Ve=B(ge,"ticks",Number),Be=B(ge,"shapes"),Ze=B(ge,"scalar"),kt=!!B(ge,"flat"),Gt=H(ge),bn=l,St=[],Vt=v.width*Gt.x,Ni=v.height*Gt.y;bn--;)St.push(De({x:Vt,y:Ni,angle:g,spread:T,startVelocity:D,color:Ce[bn%Ce.length],shape:Be[J(0,Be.length)],ticks:Ve,decay:F,gravity:ve,drift:Te,scalar:Ze,flat:kt}));return se?se.addFettis(St):(se=Ge(v,St,oe,p,a),se.promise)}function me(ge){var p=ie||B(ge,"disableForReducedMotion",Boolean),a=B(ge,"zIndex",Number);if(p&&pe)return d(function(D){D()});U&&se?v=se.canvas:U&&!v&&(v=ye(a),document.body.appendChild(v)),Z&&!ee&&oe(v);var l={width:v.width,height:v.height};Q&&!ee&&Q.init(v),ee=!0,Q&&(v.__confetti_initialized=!0);function g(){if(Q){var D={getBoundingClientRect:function(){if(!U)return v.getBoundingClientRect()}};oe(D),Q.postMessage({resize:{width:D.width,height:D.height}});return}l.width=l.height=null}function T(){se=null,Z&&(ne=!1,e.removeEventListener("resize",g)),U&&v&&(document.body.contains(v)&&document.body.removeChild(v),v=null,ee=!1)}return Z&&!ne&&(ne=!0,e.addEventListener("resize",g,!1)),Q?Q.fire(ge,l,T):he(ge,l,T)}return me.reset=function(){Q&&Q.reset(),se&&se.reset()},me}var gt;function A(){return gt||(gt=ze(null,{useWorker:!0,resize:!0})),gt}function O(v,y,U,Z,ne,ie,ce){var Q=new Path2D(v),oe=new Path2D;oe.addPath(Q,new DOMMatrix(y));var ee=new Path2D;return ee.addPath(oe,new DOMMatrix([Math.cos(ce)*ne,Math.sin(ce)*ne,-Math.sin(ce)*ie,Math.cos(ce)*ie,U,Z])),ee}function P(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 ce=1e3,Q=ce,oe=ce,ee=0,pe=0,se,he,me=0;me<ce;me+=2)for(var ge=0;ge<ce;ge+=2)ie.isPointInPath(Z,me,ge,"nonzero")&&(Q=Math.min(Q,me),oe=Math.min(oe,ge),ee=Math.max(ee,me),pe=Math.max(pe,ge));se=ee-Q,he=pe-oe;var p=10,a=Math.min(p/se,p/he);U=[a,0,0,a,-Math.round(se/2+Q)*a,-Math.round(he/2+oe)*a]}return{type:"path",path:y,matrix:U}}function M(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,ce=""+ie+"px "+ne,Q=new OffscreenCanvas(ie,ie),oe=Q.getContext("2d");oe.font=ce;var ee=oe.measureText(y),pe=Math.ceil(ee.actualBoundingBoxRight+ee.actualBoundingBoxLeft),se=Math.ceil(ee.actualBoundingBoxAscent+ee.actualBoundingBoxDescent),he=2,me=ee.actualBoundingBoxLeft+he,ge=ee.actualBoundingBoxAscent+he;pe+=he+he,se+=he+he,Q=new OffscreenCanvas(pe,se),oe=Q.getContext("2d"),oe.font=ce,oe.fillStyle=Z,oe.fillText(y,me,ge);var p=1/U;return{type:"bitmap",bitmap:Q.transferToImageBitmap(),matrix:[p,0,0,p,-pe*p/2,-se*p/2]}}n.exports=function(){return A().apply(this,arguments)},n.exports.reset=function(){A().reset()},n.exports.create=ze,n.exports.shapeFromPath=P,n.exports.shapeFromText=M})(function(){return typeof window<"u"?window:typeof self<"u"?self:this||{}}(),sc,!1);var tf=sc.exports,ZO=sc.exports.create;var Lo=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 tf(e)}static async realisticFire(e,n){let i={origin:{y:.7}};await this.fire(Object.assign({},i,n,{particleCount:Math.floor(200*e)}))}};var Z_=(t,e)=>e.minValue;function J_(t,e){if(t&1&&(be(0,"div",7),Je(1,"safeHtml")),t&2){let n=K().$implicit;le("innerHTML",ot(1,1,n.minValue+" Products"),bt)}}function Q_(t,e){if(t&1&&(be(0,"div",7),Je(1,"cooeeCurrency"),Je(2,"safeHtml")),t&2){let n=K().$implicit;le("innerHTML",ot(2,3,ot(1,1,n.minValue)),bt)}}function ev(t,e){if(t&1&&(G(0,"li",6)(1,"div"),xe(2,J_,2,3,"div",7)(3,Q_,3,5,"div",7),be(4,"img",8),G(5,"div",9),Oe(6),W()()()),t&2){let n=e.$implicit,r=K(2);ti("left",n.calculatedAlignment+"%"),L(2),Se((r.progressBarConfig==null?null:r.progressBarConfig.rewardBasis)===r.RewardBasis.ITEM_COUNT?2:3),L(2),le("src",r.getIconURL(n),ut),L(2),cn(n.label)}}function tv(t,e){if(t&1&&(lt(0)(1),be(2,"div",0),Je(3,"cooeeDynamicVariables"),Je(4,"safeHtml"),G(5,"div",1)(6,"ul",2)(7,"div",3),be(8,"div",4),W(),rt(9,ev,7,5,"li",5,Z_),W()()),t&2){let n=K(),r=n.calculatedState(),i=r.nextMilestone?r.nextMilestone.reachingText:r.lastMilestone.reachedText;L(2),le("innerHTML",ot(4,6,Pl(3,3,i,n.localDynamicVariables())),bt),L(6),ti("width",r.cartValuePercentage+"%"),L(),it(r.milestones)}}var Fo=class t extends Kt{cart;localDynamicVariables=Lt({});calculatedState=Lt({});progressBarConfig;RewardBasis=Bs;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=>We.error(e))}async calculateMilestones(){let e=this.engagementTrigger,n=this.progressBarConfig;if(!n?.milestones?.length){We.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;We.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=Fn(u.minValue-o);if(n.rewardBasis==="ITEM_COUNT"){let _=u.minValue-o;d=`${_} ${_===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||Lo.realistic())}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Me({type:t,selectors:[["cooee-progressbar"]],inputs:{cart:"cart"},features:[Ct],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&&xe(0,tv,11,8),n&2&&Se(r.calculatedState().milestonesReady?0:-1)},dependencies:[Po,Un,vn],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))}
|
|
27
|
-
`],encapsulation:3})};var
|
|
28
|
-
`],encapsulation:3})};var
|
|
29
|
-
`),n=e.length===1?null:setInterval(()=>{this.featureSlider.update(r=>Ee(x({},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?Mr(e,this.currentItem.getTemplateVariables(),this.triggerContext):""}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Me({type:t,selectors:[["cooee-sticky-atc"]],features:[Ct],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=Ke();G(0,"div",0),xe(1,sv,5,3,"div",1),G(2,"div",2)(3,"button",3),Pe("click",function(){return Ne(i),Re(r.addToCart())}),Oe(4,"Add To Cart"),W(),lt(5),xe(6,cv,3,0,"div",4),W()()}if(n&2){L(),Se(r.selectedVariant()&&r.stickyATCConfig.showProductInfo?1:-1),L(4);let i=vt(r.featureSlider());L(),Se(i.features.length?6:-1)}},dependencies:[Bn],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 af,je,cf,dc,sr,nf,lf,uf,df,fc,cc,lc,lv,uc={},ff=[],uv=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Ho=Array.isArray;function kn(t,e){for(var n in e)t[n]=e[n];return t}function pc(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function ac(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??++cf,__i:-1,__u:0};return i==null&&je.vnode!=null&&je.vnode(o),o}function hc(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 pf(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 pf(t)}}function rf(t){(!t.__d&&(t.__d=!0)&&sr.push(t)&&!Uo.__r++||nf!=je.debounceRendering)&&((nf=je.debounceRendering)||lf)(Uo)}function Uo(){for(var t,e,n,r,i,o,s,c=1;sr.length;)sr.length>c&&sr.sort(uf),t=sr.shift(),c=sr.length,t.__d&&(n=void 0,i=(r=(e=t).__v).__e,o=[],s=[],e.__P&&((n=kn({},r)).__v=r.__v+1,je.vnode&&je.vnode(n),gf(e.__P,n,r,e.__n,e.__P.namespaceURI,32&r.__u?[i]:null,o,i??Lr(r),!!(32&r.__u),s),n.__v=r.__v,n.__.__k[n.__i]=n,pv(o,n,s),n.__e!=i&&pf(n)));Uo.__r=0}function hf(t,e,n,r,i,o,s,c,u,d,_){var h,E,C,N,V,B,X=r&&r.__k||ff,J=e.length;for(u=dv(n,e,X,u,J),h=0;h<J;h++)(C=n.__k[h])!=null&&(E=C.__i==-1?uc:X[C.__i]||uc,C.__i=h,B=gf(t,C,E,i,o,s,c,u,d,_),N=C.__e,C.ref&&E.ref!=C.ref&&(E.ref&&mc(E.ref,null,C),_.push(C.ref,C.__c||N,C)),V==null&&N!=null&&(V=N),4&C.__u||E.__k===C.__k?u=mf(C,u,t):typeof C.type=="function"&&B!==void 0?u=B:N&&(u=N.nextSibling),C.__u&=-7);return n.__e=V,u}function dv(t,e,n,r,i){var o,s,c,u,d,_=n.length,h=_,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?ac(null,s,null,null,null):Ho(s)?ac(hc,{children:s},null,null,null):s.constructor==null&&s.__b>0?ac(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=fv(s,n,u,h))!=-1&&(h--,(c=n[d])&&(c.__u|=2)),c==null||c.__v==null?(d==-1&&(i>_?E--:i<_&&E++),typeof s.type!="function"&&(s.__u|=4)):d!=u&&(d==u-1?E--:d==u+1?E++:(d>u?E--:E++,s.__u|=4))):t.__k[o]=null;if(h)for(o=0;o<_;o++)(c=n[o])!=null&&(2&c.__u)==0&&(c.__e==r&&(r=Lr(c)),vf(c,c));return r}function mf(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=mf(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 fv(t,e,n,r){var i,o,s=t.key,c=t.type,u=e[n];if(u===null&&t.key==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 of(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||uv.test(e)?n:n+"px"}function Bo(t,e,n,r,i){var o,s;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||of(t.style,e,"");if(n)for(e in n)r&&n[e]==r[e]||of(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")o=e!=(e=e.replace(df,"$1")),s=e.toLowerCase(),e=s in t||e=="onFocusOut"||e=="onFocusIn"?s.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+o]=n,n?r?n.u=r.u:(n.u=fc,t.addEventListener(e,o?lc:cc,o)):t.removeEventListener(e,o?lc:cc,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 sf(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=fc++;else if(e.t<n.u)return;return n(je.event?je.event(e):e)}}}function gf(t,e,n,r,i,o,s,c,u,d){var _,h,E,C,N,V,B,X,J,ue,q,Ae,H,_e,de,ye,ke,De=e.type;if(e.constructor!=null)return null;128&n.__u&&(u=!!(32&n.__u),o=[c=e.__e=n.__e]),(_=je.__b)&&_(e);e:if(typeof De=="function")try{if(X=e.props,J="prototype"in De&&De.prototype.render,ue=(_=De.contextType)&&r[_.__c],q=_?ue?ue.props.value:_.__:r,n.__c?B=(h=e.__c=n.__c).__=h.__E:(J?e.__c=h=new De(X,q):(e.__c=h=new Pr(X,q),h.constructor=De,h.render=mv),ue&&ue.sub(h),h.props=X,h.state||(h.state={}),h.context=q,h.__n=r,E=h.__d=!0,h.__h=[],h._sb=[]),J&&h.__s==null&&(h.__s=h.state),J&&De.getDerivedStateFromProps!=null&&(h.__s==h.state&&(h.__s=kn({},h.__s)),kn(h.__s,De.getDerivedStateFromProps(X,h.__s))),C=h.props,N=h.state,h.__v=e,E)J&&De.getDerivedStateFromProps==null&&h.componentWillMount!=null&&h.componentWillMount(),J&&h.componentDidMount!=null&&h.__h.push(h.componentDidMount);else{if(J&&De.getDerivedStateFromProps==null&&X!==C&&h.componentWillReceiveProps!=null&&h.componentWillReceiveProps(X,q),!h.__e&&h.shouldComponentUpdate!=null&&h.shouldComponentUpdate(X,h.__s,q)===!1||e.__v==n.__v){for(e.__v!=n.__v&&(h.props=X,h.state=h.__s,h.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(Le){Le&&(Le.__=e)}),Ae=0;Ae<h._sb.length;Ae++)h.__h.push(h._sb[Ae]);h._sb=[],h.__h.length&&s.push(h);break e}h.componentWillUpdate!=null&&h.componentWillUpdate(X,h.__s,q),J&&h.componentDidUpdate!=null&&h.__h.push(function(){h.componentDidUpdate(C,N,V)})}if(h.context=q,h.props=X,h.__P=t,h.__e=!1,H=je.__r,_e=0,J){for(h.state=h.__s,h.__d=!1,H&&H(e),_=h.render(h.props,h.state,h.context),de=0;de<h._sb.length;de++)h.__h.push(h._sb[de]);h._sb=[]}else do h.__d=!1,H&&H(e),_=h.render(h.props,h.state,h.context),h.state=h.__s;while(h.__d&&++_e<25);h.state=h.__s,h.getChildContext!=null&&(r=kn(kn({},r),h.getChildContext())),J&&!E&&h.getSnapshotBeforeUpdate!=null&&(V=h.getSnapshotBeforeUpdate(C,N)),ye=_,_!=null&&_.type===hc&&_.key==null&&(ye=_f(_.props.children)),c=hf(t,Ho(ye)?ye:[ye],e,n,r,i,o,s,c,u,d),h.base=e.__e,e.__u&=-161,h.__h.length&&s.push(h),B&&(h.__E=h.__=null)}catch(Le){if(e.__v=null,u||o!=null)if(Le.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(ke=o.length;ke--;)pc(o[ke]);else e.__e=n.__e,e.__k=n.__k;je.__e(Le,e,n)}else o==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):c=e.__e=hv(n.__e,e,n,r,i,o,s,u,d);return(_=je.diffed)&&_(e),128&e.__u?void 0:c}function pv(t,e,n){for(var r=0;r<n.length;r++)mc(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 _f(t){return typeof t!="object"||t==null||t.__b&&t.__b>0?t:Ho(t)?t.map(_f):kn({},t)}function hv(t,e,n,r,i,o,s,c,u){var d,_,h,E,C,N,V,B=n.props,X=e.props,J=e.type;if(J=="svg"?i="http://www.w3.org/2000/svg":J=="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==!!J&&(J?C.localName==J:C.nodeType==3)){t=C,o[d]=null;break}}if(t==null){if(J==null)return document.createTextNode(X);t=document.createElementNS(i,J,X.is&&X),c&&(je.__m&&je.__m(e,o),c=!1),o=null}if(J==null)B===X||c&&t.data==X||(t.data=X);else{if(o=o&&af.call(t.childNodes),B=n.props||uc,!c&&o!=null)for(B={},d=0;d<t.attributes.length;d++)B[(C=t.attributes[d]).name]=C.value;for(d in B)if(C=B[d],d!="children"){if(d=="dangerouslySetInnerHTML")h=C;else if(!(d in X)){if(d=="value"&&"defaultValue"in X||d=="checked"&&"defaultChecked"in X)continue;Bo(t,d,null,C,i)}}for(d in X)C=X[d],d=="children"?E=C:d=="dangerouslySetInnerHTML"?_=C:d=="value"?N=C:d=="checked"?V=C:c&&typeof C!="function"||B[d]===C||Bo(t,d,C,B[d],i);if(_)c||h&&(_.__html==h.__html||_.__html==t.innerHTML)||(t.innerHTML=_.__html),e.__k=[];else if(h&&(t.innerHTML=""),hf(e.type=="template"?t.content:t,Ho(E)?E:[E],e,n,r,J=="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--;)pc(o[d]);c||(d="value",J=="progress"&&N==null?t.removeAttribute("value"):N!=null&&(N!==t[d]||J=="progress"&&!N||J=="option"&&N!=B[d])&&Bo(t,d,N,B[d],i),d="checked",V!=null&&V!=t[d]&&Bo(t,d,V,B[d],i))}return t}function mc(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 vf(t,e,n){var r,i;if(je.unmount&&je.unmount(t),(r=t.ref)&&(r.current&&r.current!=t.__e||mc(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]&&vf(r[i],e,n||typeof t.type!="function");n||pc(t.__e),t.__c=t.__=t.__e=void 0}function mv(t,e,n){return this.constructor(t,n)}af=ff.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}},cf=0,dc=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=kn({},this.state),typeof t=="function"&&(t=t(kn({},n),this.props)),t&&kn(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),rf(this))},Pr.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),rf(this))},Pr.prototype.render=hc,sr=[],lf=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,uf=function(t,e){return t.__v.__b-e.__v.__b},Uo.__r=0,df=/(PointerCapture)$|Capture$/i,fc=0,cc=sf(!1),lc=sf(!0),lv=0;var _c,$t,gc,yf,Ef=0,Of=[],mt=je,bf=mt.__b,Cf=mt.__r,wf=mt.diffed,Sf=mt.__c,Tf=mt.unmount,If=mt.__;function gv(t,e){mt.__h&&mt.__h($t,t,Ef||e),Ef=0;var n=$t.__H||($t.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function yc(t,e){var n=gv(_c++,7);return yv(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function _v(){for(var t;t=Of.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(jo),t.__H.__h.forEach(vc),t.__H.__h=[]}catch(e){t.__H.__h=[],mt.__e(e,t.__v)}}mt.__b=function(t){$t=null,bf&&bf(t)},mt.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),If&&If(t,e)},mt.__r=function(t){Cf&&Cf(t),_c=0;var e=($t=t.__c).__H;e&&(gc===$t?(e.__h=[],$t.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(e.__h.forEach(jo),e.__h.forEach(vc),e.__h=[],_c=0)),gc=$t},mt.diffed=function(t){wf&&wf(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(Of.push(e)!==1&&yf===mt.requestAnimationFrame||((yf=mt.requestAnimationFrame)||vv)(_v)),e.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),gc=$t=null},mt.__c=function(t,e){e.some(function(n){try{n.__h.forEach(jo),n.__h=n.__h.filter(function(r){return!r.__||vc(r)})}catch(r){e.some(function(i){i.__h&&(i.__h=[])}),e=[],mt.__e(r,n.__v)}}),Sf&&Sf(t,e)},mt.unmount=function(t){Tf&&Tf(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{jo(r)}catch(i){e=i}}),n.__H=void 0,e&&mt.__e(e,n.__v))};var xf=typeof requestAnimationFrame=="function";function vv(t){var e,n=function(){clearTimeout(r),xf&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,35);xf&&(e=requestAnimationFrame(n))}function jo(t){var e=$t,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),$t=e}function vc(t){var e=$t;t.__c=t.__(),$t=e}function yv(t,e){return!t||t.length!==e.length||e.some(function(n,r){return n!==t[r]})}var Ev=Symbol.for("preact-signals");function bc(){if(Fr>1)Fr--;else{for(var t,e=!1;Ei!==void 0;){var n=Ei;for(Ei=void 0,Ec++;n!==void 0;){var r=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&Df(n))try{n.c()}catch(i){e||(t=i,e=!0)}n=r}}if(Ec=0,Fr--,e)throw t}}var $e=void 0;var Ei=void 0,Fr=0,Ec=0,$o=0;function Af(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 yt(t){this.v=t,this.i=0,this.n=void 0,this.t=void 0}yt.prototype.brand=Ev;yt.prototype.h=function(){return!0};yt.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)};yt.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)}};yt.prototype.subscribe=function(t){var e=this;return Go(function(){var n=e.value,r=$e;$e=void 0;try{t(n)}finally{$e=r}})};yt.prototype.valueOf=function(){return this.value};yt.prototype.toString=function(){return this.value+""};yt.prototype.toJSON=function(){return this.value};yt.prototype.peek=function(){var t=$e;$e=void 0;try{return this.value}finally{$e=t}};Object.defineProperty(yt.prototype,"value",{get:function(){var t=Af(this);return t!==void 0&&(t.i=this.i),this.v},set:function(t){if(t!==this.v){if(Ec>100)throw new Error("Cycle detected");this.v=t,this.i++,$o++,Fr++;try{for(var e=this.t;e!==void 0;e=e.x)e.t.N()}finally{bc()}}}});function bi(t){return new yt(t)}function Df(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 Nf(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 Rf(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 kr(t){yt.call(this,void 0),this.x=t,this.s=void 0,this.g=$o-1,this.f=4}(kr.prototype=new yt).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===$o))return!0;if(this.g=$o,this.f|=1,this.i>0&&!Df(this))return this.f&=-2,!0;var t=$e;try{Nf(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,Rf(this),this.f&=-2,!0};kr.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)}yt.prototype.S.call(this,t)};kr.prototype.U=function(t){if(this.t!==void 0&&(yt.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)}};kr.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(kr.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var t=Af(this);if(this.h(),t!==void 0&&(t.i=this.i),16&this.f)throw this.v;return this.v}});function Mf(t){return new kr(t)}function Pf(t){var e=t.u;if(t.u=void 0,typeof e=="function"){Fr++;var n=$e;$e=void 0;try{e()}catch(r){throw t.f&=-2,t.f|=8,Cc(t),r}finally{$e=n,bc()}}}function Cc(t){for(var e=t.s;e!==void 0;e=e.n)e.S.U(e);t.x=void 0,t.s=void 0,Pf(t)}function bv(t){if($e!==this)throw new Error("Out-of-order effect");Rf(this),$e=t,this.f&=-2,8&this.f&&Cc(this),bc()}function Ci(t){this.x=t,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}Ci.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()}};Ci.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,Pf(this),Nf(this),Fr++;var t=$e;return $e=this,bv.bind(this,t)};Ci.prototype.N=function(){2&this.f||(this.f|=2,this.o=Ei,Ei=this)};Ci.prototype.d=function(){this.f|=8,1&this.f||Cc(this)};function Go(t){var e=new Ci(t);try{e.c()}catch(n){throw e.d(),n}return e.d.bind(e)}var Sc,wc;function Vr(t,e){je[t]=e.bind(null,je[t]||function(){})}function Wo(t){wc&&wc(),wc=t&&t.S()}function Lf(t){var e=this,n=t.data,r=wv(n);r.value=n;var i=yc(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(),dc(u)||((s=e.base)==null?void 0:s.nodeType)!==3?(e.__$f|=1,e.setState({})):e.base.data=u},Mf(function(){var s=r.value.value;return s===0?0:s===!0?"":s||""})},[]);return i.value}Lf.displayName="_st";Object.defineProperties(yt.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:Lf},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 yt&&(n||(e.__np=n={}),n[i]=o,r[i]=o.peek())}}t(e)});Vr("__r",function(t,e){Wo();var n,r=e.__c;r&&(r.__$f&=-2,(n=r.__$u)===void 0&&(r.__$u=n=function(i){var o;return Go(function(){o=this}),o.c=function(){r.__$f|=1,r.setState({})},o}())),Sc=r,Wo(n),t(e)});Vr("__e",function(t,e,n,r){Wo(),Sc=void 0,t(e,n,r)});Vr("diffed",function(t,e){Wo(),Sc=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],_=r[u];d===void 0?(d=Cv(n,u,_,i),o[u]=d):d.o(_,i)}}}t(e)});function Cv(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:Go(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 wv(t){return yc(function(){return bi(t)},[])}var Tc=(i=>(i.SIMPLE="SIMPLE",i.SWIPER="SWIPER",i.STORY="STORY",i.FLOATING_POPUP="FLOATING_POPUP",i))(Tc||{}),Ic=(r=>(r.ON="ON",r.OFF="OFF",r.ON_HOVER="ON_HOVER",r))(Ic||{}),wi=(r=>(r.FIRST_ITEM="FIRST_ITEM",r.CARD="CARD",r.NONE="NONE",r))(wi||{});function Sv(t,e){return e={exports:{}},t(e,e.exports),e.exports}var Tv=Av,Iv=Nv,xv=Pv,En=[],en=[],Ov=typeof Uint8Array<"u"?Uint8Array:Array,xc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(ar=0,Ff=xc.length;ar<Ff;++ar)En[ar]=xc[ar],en[xc.charCodeAt(ar)]=ar;var ar,Ff;en[45]=62;en[95]=63;function Jf(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 Av(t){var e=Jf(t),n=e[0],r=e[1];return(n+r)*3/4-r}function Dv(t,e,n){return(e+n)*3/4-n}function Nv(t){var e,n=Jf(t),r=n[0],i=n[1],o=new Ov(Dv(t,r,i)),s=0,c=i>0?r-4:r,u;for(u=0;u<c;u+=4)e=en[t.charCodeAt(u)]<<18|en[t.charCodeAt(u+1)]<<12|en[t.charCodeAt(u+2)]<<6|en[t.charCodeAt(u+3)],o[s++]=e>>16&255,o[s++]=e>>8&255,o[s++]=e&255;return i===2&&(e=en[t.charCodeAt(u)]<<2|en[t.charCodeAt(u+1)]>>4,o[s++]=e&255),i===1&&(e=en[t.charCodeAt(u)]<<10|en[t.charCodeAt(u+1)]<<4|en[t.charCodeAt(u+2)]>>2,o[s++]=e>>8&255,o[s++]=e&255),o}function Rv(t){return En[t>>18&63]+En[t>>12&63]+En[t>>6&63]+En[t&63]}function Mv(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(Rv(r));return i.join("")}function Pv(t){for(var e,n=t.length,r=n%3,i=[],o=16383,s=0,c=n-r;s<c;s+=o)i.push(Mv(t,s,s+o>c?c:s+o));return r===1?(e=t[n-1],i.push(En[e>>2]+En[e<<4&63]+"==")):r===2&&(e=(t[n-2]<<8)+t[n-1],i.push(En[e>>10]+En[e>>4&63]+En[e<<2&63]+"=")),i.join("")}var Oc={byteLength:Tv,toByteArray:Iv,fromByteArray:xv};var Lv=function(e,n,r,i,o){var s,c,u=o*8-i-1,d=(1<<u)-1,_=d>>1,h=-7,E=r?o-1:0,C=r?-1:1,N=e[n+E];for(E+=C,s=N&(1<<-h)-1,N>>=-h,h+=u;h>0;s=s*256+e[n+E],E+=C,h-=8);for(c=s&(1<<-h)-1,s>>=-h,h+=i;h>0;c=c*256+e[n+E],E+=C,h-=8);if(s===0)s=1-_;else{if(s===d)return c?NaN:(N?-1:1)*(1/0);c=c+Math.pow(2,i),s=s-_}return(N?-1:1)*c*Math.pow(2,s-i)},Fv=function(e,n,r,i,o,s){var c,u,d,_=s*8-o-1,h=(1<<_)-1,E=h>>1,C=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,N=i?0:s-1,V=i?1:-1,B=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=h):(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>=h?(u=0,c=h):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+N]=u&255,N+=V,u/=256,o-=8);for(c=c<<o|u,_+=o;_>0;e[r+N]=c&255,N+=V,c/=256,_-=8);e[r+N-V]|=B*128},Br={read:Lv,write:Fv},Ko=Sv(function(t,e){var n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=s,e.SlowBuffer=X,e.INSPECT_MAX_BYTES=50;var r=2147483647;e.kMaxLength=r,s.TYPED_ARRAY_SUPPORT=i(),!s.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function i(){try{var p=new Uint8Array(1),a={foo:function(){return 42}};return Object.setPrototypeOf(a,Uint8Array.prototype),Object.setPrototypeOf(p,a),p.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function o(p){if(p>r)throw new RangeError('The value "'+p+'" is invalid for option "size"');var a=new Uint8Array(p);return Object.setPrototypeOf(a,s.prototype),a}function s(p,a,l){if(typeof p=="number"){if(typeof a=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return _(p)}return c(p,a,l)}s.poolSize=8192;function c(p,a,l){if(typeof p=="string")return h(p,a);if(ArrayBuffer.isView(p))return C(p);if(p==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(p));if(he(p,ArrayBuffer)||p&&he(p.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(he(p,SharedArrayBuffer)||p&&he(p.buffer,SharedArrayBuffer)))return N(p,a,l);if(typeof p=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var g=p.valueOf&&p.valueOf();if(g!=null&&g!==p)return s.from(g,a,l);var T=V(p);if(T)return T;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof p[Symbol.toPrimitive]=="function")return s.from(p[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(p))}s.from=function(p,a,l){return c(p,a,l)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function u(p){if(typeof p!="number")throw new TypeError('"size" argument must be of type number');if(p<0)throw new RangeError('The value "'+p+'" is invalid for option "size"')}function d(p,a,l){return u(p),p<=0?o(p):a!==void 0?typeof l=="string"?o(p).fill(a,l):o(p).fill(a):o(p)}s.alloc=function(p,a,l){return d(p,a,l)};function _(p){return u(p),o(p<0?0:B(p)|0)}s.allocUnsafe=function(p){return _(p)},s.allocUnsafeSlow=function(p){return _(p)};function h(p,a){if((typeof a!="string"||a==="")&&(a="utf8"),!s.isEncoding(a))throw new TypeError("Unknown encoding: "+a);var l=J(p,a)|0,g=o(l),T=g.write(p,a);return T!==l&&(g=g.slice(0,T)),g}function E(p){for(var a=p.length<0?0:B(p.length)|0,l=o(a),g=0;g<a;g+=1)l[g]=p[g]&255;return l}function C(p){if(he(p,Uint8Array)){var a=new Uint8Array(p);return N(a.buffer,a.byteOffset,a.byteLength)}return E(p)}function N(p,a,l){if(a<0||p.byteLength<a)throw new RangeError('"offset" is outside of buffer bounds');if(p.byteLength<a+(l||0))throw new RangeError('"length" is outside of buffer bounds');var g;return a===void 0&&l===void 0?g=new Uint8Array(p):l===void 0?g=new Uint8Array(p,a):g=new Uint8Array(p,a,l),Object.setPrototypeOf(g,s.prototype),g}function V(p){if(s.isBuffer(p)){var a=B(p.length)|0,l=o(a);return l.length===0||p.copy(l,0,0,a),l}if(p.length!==void 0)return typeof p.length!="number"||me(p.length)?o(0):E(p);if(p.type==="Buffer"&&Array.isArray(p.data))return E(p.data)}function B(p){if(p>=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return p|0}function X(p){return+p!=p&&(p=0),s.alloc(+p)}s.isBuffer=function(a){return a!=null&&a._isBuffer===!0&&a!==s.prototype},s.compare=function(a,l){if(he(a,Uint8Array)&&(a=s.from(a,a.offset,a.byteLength)),he(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 g=a.length,T=l.length,D=0,F=Math.min(g,T);D<F;++D)if(a[D]!==l[D]){g=a[D],T=l[D];break}return g<T?-1:T<g?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 g;if(l===void 0)for(l=0,g=0;g<a.length;++g)l+=a[g].length;var T=s.allocUnsafe(l),D=0;for(g=0;g<a.length;++g){var F=a[g];if(he(F,Uint8Array))D+F.length>T.length?s.from(F).copy(T,D):Uint8Array.prototype.set.call(T,F,D);else if(s.isBuffer(F))F.copy(T,D);else throw new TypeError('"list" argument must be an Array of Buffers');D+=F.length}return T};function J(p,a){if(s.isBuffer(p))return p.length;if(ArrayBuffer.isView(p)||he(p,ArrayBuffer))return p.byteLength;if(typeof p!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+babelHelpers.typeof(p));var l=p.length,g=arguments.length>2&&arguments[2]===!0;if(!g&&l===0)return 0;for(var T=!1;;)switch(a){case"ascii":case"latin1":case"binary":return l;case"utf8":case"utf-8":return Q(p).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return l*2;case"hex":return l>>>1;case"base64":return pe(p).length;default:if(T)return g?-1:Q(p).length;a=(""+a).toLowerCase(),T=!0}}s.byteLength=J;function ue(p,a,l){var g=!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(p||(p="utf8");;)switch(p){case"hex":return P(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 O(this,a,l);case"base64":return Le(this,a,l);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,a,l);default:if(g)throw new TypeError("Unknown encoding: "+p);p=(p+"").toLowerCase(),g=!0}}s.prototype._isBuffer=!0;function q(p,a,l){var g=p[a];p[a]=p[l],p[l]=g}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)q(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)q(this,l,l+3),q(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)q(this,l,l+7),q(this,l+1,l+6),q(this,l+2,l+5),q(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):ue.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,g,T,D){if(he(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),g===void 0&&(g=a?a.length:0),T===void 0&&(T=0),D===void 0&&(D=this.length),l<0||g>a.length||T<0||D>this.length)throw new RangeError("out of range index");if(T>=D&&l>=g)return 0;if(T>=D)return-1;if(l>=g)return 1;if(l>>>=0,g>>>=0,T>>>=0,D>>>=0,this===a)return 0;for(var F=D-T,ve=g-l,Te=Math.min(F,ve),Ce=this.slice(T,D),Ve=a.slice(l,g),Be=0;Be<Te;++Be)if(Ce[Be]!==Ve[Be]){F=Ce[Be],ve=Ve[Be];break}return F<ve?-1:ve<F?1:0};function Ae(p,a,l,g,T){if(p.length===0)return-1;if(typeof l=="string"?(g=l,l=0):l>2147483647?l=2147483647:l<-2147483648&&(l=-2147483648),l=+l,me(l)&&(l=T?0:p.length-1),l<0&&(l=p.length+l),l>=p.length){if(T)return-1;l=p.length-1}else if(l<0)if(T)l=0;else return-1;if(typeof a=="string"&&(a=s.from(a,g)),s.isBuffer(a))return a.length===0?-1:H(p,a,l,g,T);if(typeof a=="number")return a=a&255,typeof Uint8Array.prototype.indexOf=="function"?T?Uint8Array.prototype.indexOf.call(p,a,l):Uint8Array.prototype.lastIndexOf.call(p,a,l):H(p,[a],l,g,T);throw new TypeError("val must be string, number or Buffer")}function H(p,a,l,g,T){var D=1,F=p.length,ve=a.length;if(g!==void 0&&(g=String(g).toLowerCase(),g==="ucs2"||g==="ucs-2"||g==="utf16le"||g==="utf-16le")){if(p.length<2||a.length<2)return-1;D=2,F/=2,ve/=2,l/=2}function Te(kt,Gt){return D===1?kt[Gt]:kt.readUInt16BE(Gt*D)}var Ce;if(T){var Ve=-1;for(Ce=l;Ce<F;Ce++)if(Te(p,Ce)===Te(a,Ve===-1?0:Ce-Ve)){if(Ve===-1&&(Ve=Ce),Ce-Ve+1===ve)return Ve*D}else Ve!==-1&&(Ce-=Ce-Ve),Ve=-1}else for(l+ve>F&&(l=F-ve),Ce=l;Ce>=0;Ce--){for(var Be=!0,Ze=0;Ze<ve;Ze++)if(Te(p,Ce+Ze)!==Te(a,Ze)){Be=!1;break}if(Be)return Ce}return-1}s.prototype.includes=function(a,l,g){return this.indexOf(a,l,g)!==-1},s.prototype.indexOf=function(a,l,g){return Ae(this,a,l,g,!0)},s.prototype.lastIndexOf=function(a,l,g){return Ae(this,a,l,g,!1)};function _e(p,a,l,g){l=Number(l)||0;var T=p.length-l;g?(g=Number(g),g>T&&(g=T)):g=T;var D=a.length;g>D/2&&(g=D/2);for(var F=0;F<g;++F){var ve=parseInt(a.substr(F*2,2),16);if(me(ve))return F;p[l+F]=ve}return F}function de(p,a,l,g){return se(Q(a,p.length-l),p,l,g)}function ye(p,a,l,g){return se(oe(a),p,l,g)}function ke(p,a,l,g){return se(pe(a),p,l,g)}function De(p,a,l,g){return se(ee(a,p.length-l),p,l,g)}s.prototype.write=function(a,l,g,T){if(l===void 0)T="utf8",g=this.length,l=0;else if(g===void 0&&typeof l=="string")T=l,g=this.length,l=0;else if(isFinite(l))l=l>>>0,isFinite(g)?(g=g>>>0,T===void 0&&(T="utf8")):(T=g,g=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var D=this.length-l;if((g===void 0||g>D)&&(g=D),a.length>0&&(g<0||l<0)||l>this.length)throw new RangeError("Attempt to write outside buffer bounds");T||(T="utf8");for(var F=!1;;)switch(T){case"hex":return _e(this,a,l,g);case"utf8":case"utf-8":return de(this,a,l,g);case"ascii":case"latin1":case"binary":return ye(this,a,l,g);case"base64":return ke(this,a,l,g);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return De(this,a,l,g);default:if(F)throw new TypeError("Unknown encoding: "+T);T=(""+T).toLowerCase(),F=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Le(p,a,l){return a===0&&l===p.length?Oc.fromByteArray(p):Oc.fromByteArray(p.slice(a,l))}function Ge(p,a,l){l=Math.min(p.length,l);for(var g=[],T=a;T<l;){var D=p[T],F=null,ve=D>239?4:D>223?3:D>191?2:1;if(T+ve<=l){var Te,Ce,Ve,Be;switch(ve){case 1:D<128&&(F=D);break;case 2:Te=p[T+1],(Te&192)===128&&(Be=(D&31)<<6|Te&63,Be>127&&(F=Be));break;case 3:Te=p[T+1],Ce=p[T+2],(Te&192)===128&&(Ce&192)===128&&(Be=(D&15)<<12|(Te&63)<<6|Ce&63,Be>2047&&(Be<55296||Be>57343)&&(F=Be));break;case 4:Te=p[T+1],Ce=p[T+2],Ve=p[T+3],(Te&192)===128&&(Ce&192)===128&&(Ve&192)===128&&(Be=(D&15)<<18|(Te&63)<<12|(Ce&63)<<6|Ve&63,Be>65535&&Be<1114112&&(F=Be))}}F===null?(F=65533,ve=1):F>65535&&(F-=65536,g.push(F>>>10&1023|55296),F=56320|F&1023),g.push(F),T+=ve}return gt(g)}var ze=4096;function gt(p){var a=p.length;if(a<=ze)return String.fromCharCode.apply(String,p);for(var l="",g=0;g<a;)l+=String.fromCharCode.apply(String,p.slice(g,g+=ze));return l}function A(p,a,l){var g="";l=Math.min(p.length,l);for(var T=a;T<l;++T)g+=String.fromCharCode(p[T]&127);return g}function O(p,a,l){var g="";l=Math.min(p.length,l);for(var T=a;T<l;++T)g+=String.fromCharCode(p[T]);return g}function P(p,a,l){var g=p.length;(!a||a<0)&&(a=0),(!l||l<0||l>g)&&(l=g);for(var T="",D=a;D<l;++D)T+=ge[p[D]];return T}function M(p,a,l){for(var g=p.slice(a,l),T="",D=0;D<g.length-1;D+=2)T+=String.fromCharCode(g[D]+g[D+1]*256);return T}s.prototype.slice=function(a,l){var g=this.length;a=~~a,l=l===void 0?g:~~l,a<0?(a+=g,a<0&&(a=0)):a>g&&(a=g),l<0?(l+=g,l<0&&(l=0)):l>g&&(l=g),l<a&&(l=a);var T=this.subarray(a,l);return Object.setPrototypeOf(T,s.prototype),T};function v(p,a,l){if(p%1!==0||p<0)throw new RangeError("offset is not uint");if(p+a>l)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(a,l,g){a=a>>>0,l=l>>>0,g||v(a,l,this.length);for(var T=this[a],D=1,F=0;++F<l&&(D*=256);)T+=this[a+F]*D;return T},s.prototype.readUintBE=s.prototype.readUIntBE=function(a,l,g){a=a>>>0,l=l>>>0,g||v(a,l,this.length);for(var T=this[a+--l],D=1;l>0&&(D*=256);)T+=this[a+--l]*D;return T},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,g){a=a>>>0,l=l>>>0,g||v(a,l,this.length);for(var T=this[a],D=1,F=0;++F<l&&(D*=256);)T+=this[a+F]*D;return D*=128,T>=D&&(T-=Math.pow(2,8*l)),T},s.prototype.readIntBE=function(a,l,g){a=a>>>0,l=l>>>0,g||v(a,l,this.length);for(var T=l,D=1,F=this[a+--T];T>0&&(D*=256);)F+=this[a+--T]*D;return D*=128,F>=D&&(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 g=this[a]|this[a+1]<<8;return g&32768?g|4294901760:g},s.prototype.readInt16BE=function(a,l){a=a>>>0,l||v(a,2,this.length);var g=this[a+1]|this[a]<<8;return g&32768?g|4294901760:g},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(p,a,l,g,T,D){if(!s.isBuffer(p))throw new TypeError('"buffer" argument must be a Buffer instance');if(a>T||a<D)throw new RangeError('"value" argument is out of bounds');if(l+g>p.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(a,l,g,T){if(a=+a,l=l>>>0,g=g>>>0,!T){var D=Math.pow(2,8*g)-1;y(this,a,l,g,D,0)}var F=1,ve=0;for(this[l]=a&255;++ve<g&&(F*=256);)this[l+ve]=a/F&255;return l+g},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(a,l,g,T){if(a=+a,l=l>>>0,g=g>>>0,!T){var D=Math.pow(2,8*g)-1;y(this,a,l,g,D,0)}var F=g-1,ve=1;for(this[l+F]=a&255;--F>=0&&(ve*=256);)this[l+F]=a/ve&255;return l+g},s.prototype.writeUint8=s.prototype.writeUInt8=function(a,l,g){return a=+a,l=l>>>0,g||y(this,a,l,1,255,0),this[l]=a&255,l+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(a,l,g){return a=+a,l=l>>>0,g||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,g){return a=+a,l=l>>>0,g||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,g){return a=+a,l=l>>>0,g||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,g){return a=+a,l=l>>>0,g||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,g,T){if(a=+a,l=l>>>0,!T){var D=Math.pow(2,8*g-1);y(this,a,l,g,D-1,-D)}var F=0,ve=1,Te=0;for(this[l]=a&255;++F<g&&(ve*=256);)a<0&&Te===0&&this[l+F-1]!==0&&(Te=1),this[l+F]=(a/ve>>0)-Te&255;return l+g},s.prototype.writeIntBE=function(a,l,g,T){if(a=+a,l=l>>>0,!T){var D=Math.pow(2,8*g-1);y(this,a,l,g,D-1,-D)}var F=g-1,ve=1,Te=0;for(this[l+F]=a&255;--F>=0&&(ve*=256);)a<0&&Te===0&&this[l+F+1]!==0&&(Te=1),this[l+F]=(a/ve>>0)-Te&255;return l+g},s.prototype.writeInt8=function(a,l,g){return a=+a,l=l>>>0,g||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,g){return a=+a,l=l>>>0,g||y(this,a,l,2,32767,-32768),this[l]=a&255,this[l+1]=a>>>8,l+2},s.prototype.writeInt16BE=function(a,l,g){return a=+a,l=l>>>0,g||y(this,a,l,2,32767,-32768),this[l]=a>>>8,this[l+1]=a&255,l+2},s.prototype.writeInt32LE=function(a,l,g){return a=+a,l=l>>>0,g||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,g){return a=+a,l=l>>>0,g||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(p,a,l,g,T,D){if(l+g>p.length)throw new RangeError("Index out of range");if(l<0)throw new RangeError("Index out of range")}function Z(p,a,l,g,T){return a=+a,l=l>>>0,T||U(p,a,l,4),Br.write(p,a,l,g,23,4),l+4}s.prototype.writeFloatLE=function(a,l,g){return Z(this,a,l,!0,g)},s.prototype.writeFloatBE=function(a,l,g){return Z(this,a,l,!1,g)};function ne(p,a,l,g,T){return a=+a,l=l>>>0,T||U(p,a,l,8),Br.write(p,a,l,g,52,8),l+8}s.prototype.writeDoubleLE=function(a,l,g){return ne(this,a,l,!0,g)},s.prototype.writeDoubleBE=function(a,l,g){return ne(this,a,l,!1,g)},s.prototype.copy=function(a,l,g,T){if(!s.isBuffer(a))throw new TypeError("argument should be a Buffer");if(g||(g=0),!T&&T!==0&&(T=this.length),l>=a.length&&(l=a.length),l||(l=0),T>0&&T<g&&(T=g),T===g||a.length===0||this.length===0)return 0;if(l<0)throw new RangeError("targetStart out of bounds");if(g<0||g>=this.length)throw new RangeError("Index out of range");if(T<0)throw new RangeError("sourceEnd out of bounds");T>this.length&&(T=this.length),a.length-l<T-g&&(T=a.length-l+g);var D=T-g;return this===a&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(l,g,T):Uint8Array.prototype.set.call(a,this.subarray(g,T),l),D},s.prototype.fill=function(a,l,g,T){if(typeof a=="string"){if(typeof l=="string"?(T=l,l=0,g=this.length):typeof g=="string"&&(T=g,g=this.length),T!==void 0&&typeof T!="string")throw new TypeError("encoding must be a string");if(typeof T=="string"&&!s.isEncoding(T))throw new TypeError("Unknown encoding: "+T);if(a.length===1){var D=a.charCodeAt(0);(T==="utf8"&&D<128||T==="latin1")&&(a=D)}}else typeof a=="number"?a=a&255:typeof a=="boolean"&&(a=Number(a));if(l<0||this.length<l||this.length<g)throw new RangeError("Out of range index");if(g<=l)return this;l=l>>>0,g=g===void 0?this.length:g>>>0,a||(a=0);var F;if(typeof a=="number")for(F=l;F<g;++F)this[F]=a;else{var ve=s.isBuffer(a)?a:s.from(a,T),Te=ve.length;if(Te===0)throw new TypeError('The value "'+a+'" is invalid for argument "value"');for(F=0;F<g-l;++F)this[F+l]=ve[F%Te]}return this};var ie=/[^+/0-9A-Za-z-_]/g;function ce(p){if(p=p.split("=")[0],p=p.trim().replace(ie,""),p.length<2)return"";for(;p.length%4!==0;)p=p+"=";return p}function Q(p,a){a=a||1/0;for(var l,g=p.length,T=null,D=[],F=0;F<g;++F){if(l=p.charCodeAt(F),l>55295&&l<57344){if(!T){if(l>56319){(a-=3)>-1&&D.push(239,191,189);continue}else if(F+1===g){(a-=3)>-1&&D.push(239,191,189);continue}T=l;continue}if(l<56320){(a-=3)>-1&&D.push(239,191,189),T=l;continue}l=(T-55296<<10|l-56320)+65536}else T&&(a-=3)>-1&&D.push(239,191,189);if(T=null,l<128){if((a-=1)<0)break;D.push(l)}else if(l<2048){if((a-=2)<0)break;D.push(l>>6|192,l&63|128)}else if(l<65536){if((a-=3)<0)break;D.push(l>>12|224,l>>6&63|128,l&63|128)}else if(l<1114112){if((a-=4)<0)break;D.push(l>>18|240,l>>12&63|128,l>>6&63|128,l&63|128)}else throw new Error("Invalid code point")}return D}function oe(p){for(var a=[],l=0;l<p.length;++l)a.push(p.charCodeAt(l)&255);return a}function ee(p,a){for(var l,g,T,D=[],F=0;F<p.length&&!((a-=2)<0);++F)l=p.charCodeAt(F),g=l>>8,T=l%256,D.push(T),D.push(g);return D}function pe(p){return Oc.toByteArray(ce(p))}function se(p,a,l,g){for(var T=0;T<g&&!(T+l>=a.length||T>=p.length);++T)a[T+l]=p[T];return T}function he(p,a){return p instanceof a||p!=null&&p.constructor!=null&&p.constructor.name!=null&&p.constructor.name===a.name}function me(p){return p!==p}var ge=function(){for(var p="0123456789abcdef",a=new Array(256),l=0;l<16;++l)for(var g=l*16,T=0;T<16;++T)a[g+T]=p[l]+p[T];return a}()}),Fe=Ko.Buffer;Ko.SlowBuffer;Ko.INSPECT_MAX_BYTES;Ko.kMaxLength;var Mc=function(e,n){return Mc=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])},Mc(e,n)};function Xo(t,e){Mc(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var lr=function(t){Xo(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),tt=function(t){Xo(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 Yo(t){return t&&t.Math==Math&&t}function Qf(){return Yo(typeof globalThis=="object"&&globalThis)||Yo(typeof window=="object"&&window)||Yo(typeof self=="object"&&self)||Yo(typeof global=="object"&&global)||Function("return this")()}function kv(){var t=Qf();return typeof t.navigator=="object"&&t.navigator.product==="ReactNative"}var Vv=function(e){var n=kv()?"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=Fe.alloc(e),i=0;i<e;++i)r[i]=Math.floor(Math.random()*256);return r},Bv=function(){{if(typeof window<"u"){var t=window.crypto||window.msCrypto;if(t&&t.getRandomValues)return function(e){return t.getRandomValues(Fe.alloc(e))}}return typeof global<"u"&&global.crypto&&global.crypto.getRandomValues?function(e){return global.crypto.getRandomValues(Fe.alloc(e))}:Vv}},ep=Bv();function Uv(t){return["[object ArrayBuffer]","[object SharedArrayBuffer]"].includes(Object.prototype.toString.call(t))}function Lc(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}function Hv(t){return Object.prototype.toString.call(t)==="[object RegExp]"}function jv(t){return xi(t)&&Object.prototype.toString.call(t)==="[object Date]"}function xi(t){return typeof t=="object"&&t!==null}function qo(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 zo(t){if(ArrayBuffer.isView(t))return Fe.from(t.buffer,t.byteOffset,t.byteLength);if(Uv(t))return Fe.from(t);throw new tt("Must use either Buffer or TypedArray")}var $v=/^(?:[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,tp=function(t){return typeof t=="string"&&$v.test(t)},Pc=function(t){if(!tp(t))throw new tt('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 Fe.from(e,"hex")},kf=function(t,e){return e===void 0&&(e=!0),e?t.toString("hex",0,4)+"-"+t.toString("hex",4,6)+"-"+t.toString("hex",6,8)+"-"+t.toString("hex",8,10)+"-"+t.toString("hex",10,16):t.toString("hex")};var ID=Math.pow(2,63)-1,xD=-Math.pow(2,63),Gv=Math.pow(2,53),Wv=-Math.pow(2,53);var np=4;var ur=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 tt("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=Fe.alloc(t.BUFFER_SIZE),this.position=0):(typeof e=="string"?this.buffer=Fe.from(e,"binary"):Array.isArray(e)?this.buffer=Fe.from(e):this.buffer=zo(e),this.position=this.buffer.byteLength)}return t.prototype.put=function(e){if(typeof e=="string"&&e.length!==1)throw new tt("only accepts single character String");if(typeof e!="number"&&e.length!==1)throw new tt("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 tt("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=Fe.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=Fe.alloc(this.buffer.length+e.length);this.buffer.copy(r,0,0,this.buffer.length),this.buffer=r}ArrayBuffer.isView(e)?(this.buffer.set(zo(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 Vf(this.buffer.slice(0,this.position));throw new lr('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=Fe.from(e.$binary,"base64")):typeof e.$binary!="string"&&(i=e.$binary.subType?parseInt(e.$binary.subType,16):0,r=Fe.from(e.$binary.base64,"base64")):"$uuid"in e&&(i=4,r=Pc(e.$uuid)),!r)throw new tt("Unexpected Binary Extended JSON format ".concat(JSON.stringify(e)));return i===np?new Vf(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(ur.prototype,"_bsontype",{value:"Binary"});var Ac=16,Vf=function(t){Xo(e,t);function e(n){var r=this,i,o;if(n==null)i=e.generate();else if(n instanceof e)i=Fe.from(n.buffer),o=n.__id;else if(ArrayBuffer.isView(n)&&n.byteLength===Ac)i=zo(n);else if(typeof n=="string")i=Pc(n);else throw new tt("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,np)||this,r.__id=o,r}return Object.defineProperty(e.prototype,"id",{get:function(){return this.buffer},set:function(n){this.buffer=n,e.cacheHexString&&(this.__id=kf(n))},enumerable:!1,configurable:!0}),e.prototype.toHexString=function(n){if(n===void 0&&(n=!0),e.cacheHexString&&this.__id)return this.__id;var r=kf(this.id,n);return e.cacheHexString&&(this.__id=r),r},e.prototype.toString=function(n){return n?this.id.toString(n):this.toHexString()},e.prototype.toJSON=function(){return this.toHexString()},e.prototype.equals=function(n){if(!n)return!1;if(n instanceof e)return n.id.equals(this.id);try{return new e(n).id.equals(this.id)}catch{return!1}},e.prototype.toBinary=function(){return new ur(this.id,ur.SUBTYPE_UUID)},e.generate=function(){var n=ep(Ac);return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Fe.from(n)},e.isValid=function(n){return n?n instanceof e?!0:typeof n=="string"?tp(n):Lc(n)?n.length!==Ac?!1:(n[6]&240)===64&&(n[8]&128)===128:!1:!1},e.createFromHexString=function(n){var r=Pc(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}(ur),Zo=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(Zo.prototype,"_bsontype",{value:"Code"});function Yv(t){return xi(t)&&t.$id!=null&&typeof t.$ref=="string"&&(t.$db==null||typeof t.$db=="string")}var Ti=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(Ti.prototype,"_bsontype",{value:"DBRef"});var Qt=void 0;try{Qt=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 Bf=65536,zv=1<<24,Hr=Bf*Bf,rp=Hr*Hr,Uf=rp/2,Hf={},jf={},ae=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=jf[e],i)?i:(r=t.fromBits(e,(e|0)<0?-1:0,!0),o&&(jf[e]=r),r)):(e|=0,(o=-128<=e&&e<128)&&(i=Hf[e],i)?i:(r=t.fromBits(e,e<0?-1:0,!1),o&&(Hf[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>=rp)return t.MAX_UNSIGNED_VALUE}else{if(e<=-Uf)return t.MIN_VALUE;if(e+1>=Uf)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 _=t.fromNumber(Math.pow(r,u));s=s.mul(_).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,_=0,h=0,E=0,C=0;return C+=o+d,E+=C>>>16,C&=65535,E+=i+u,h+=E>>>16,E&=65535,h+=r+c,_+=h>>>16,h&=65535,_+=n+s,_&=65535,t.fromBits(E<<16|C,_<<16|h,this.unsigned)},t.prototype.and=function(e){return t.isLong(e)||(e=t.fromValue(e)),t.fromBits(this.low&e.low,this.high&e.high,this.unsigned)},t.prototype.compare=function(e){if(t.isLong(e)||(e=t.fromValue(e)),this.eq(e))return 0;var n=this.isNegative(),r=e.isNegative();return n&&!r?-1:!n&&r?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},t.prototype.comp=function(e){return this.compare(e)},t.prototype.divide=function(e){if(t.isLong(e)||(e=t.fromValue(e)),e.isZero())throw Error("division by zero");if(Qt){if(!this.unsigned&&this.high===-2147483648&&e.low===-1&&e.high===-1)return this;var n=(this.unsigned?Qt.div_u:Qt.div_s)(this.low,this.high,e.low,e.high);return t.fromBits(n,Qt.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),_=d.mul(e);_.isNegative()||_.gt(i);)r-=u,d=t.fromNumber(r,this.unsigned),_=d.mul(e);d.isZero()&&(d=t.ONE),o=o.add(d),i=i.sub(_)}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)),Qt){var n=(this.unsigned?Qt.rem_u:Qt.rem_s)(this.low,this.high,e.low,e.high);return t.fromBits(n,Qt.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)),Qt){var n=Qt.mul(this.low,this.high,e.low,e.high);return t.fromBits(n,Qt.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,_=e.low&65535,h=0,E=0,C=0,N=0;return N+=s*_,C+=N>>>16,N&=65535,C+=o*_,E+=C>>>16,C&=65535,C+=s*d,E+=C>>>16,C&=65535,E+=i*_,h+=E>>>16,E&=65535,E+=o*d,h+=E>>>16,E&=65535,E+=s*u,h+=E>>>16,E&=65535,h+=r*_+i*d+o*u+s*c,h&=65535,t.fromBits(C<<16|N,h<<16|E,this.unsigned)},t.prototype.mul=function(e){return this.multiply(e)},t.prototype.negate=function(){return!this.unsigned&&this.eq(t.MIN_VALUE)?t.MIN_VALUE:this.not().add(t.ONE)},t.prototype.neg=function(){return this.negate()},t.prototype.not=function(){return t.fromBits(~this.low,~this.high,this.unsigned)},t.prototype.notEquals=function(e){return!this.equals(e)},t.prototype.neq=function(e){return this.notEquals(e)},t.prototype.ne=function(e){return this.notEquals(e)},t.prototype.or=function(e){return t.isLong(e)||(e=t.fromValue(e)),t.fromBits(this.low|e.low,this.high|e.high,this.unsigned)},t.prototype.shiftLeft=function(e){return t.isLong(e)&&(e=e.toInt()),(e&=63)===0?this:e<32?t.fromBits(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned):t.fromBits(0,this.low<<e-32,this.unsigned)},t.prototype.shl=function(e){return this.shiftLeft(e)},t.prototype.shiftRight=function(e){return t.isLong(e)&&(e=e.toInt()),(e&=63)===0?this:e<32?t.fromBits(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned):t.fromBits(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},t.prototype.shr=function(e){return this.shiftRight(e)},t.prototype.shiftRightUnsigned=function(e){if(t.isLong(e)&&(e=e.toInt()),e&=63,e===0)return this;var n=this.high;if(e<32){var r=this.low;return t.fromBits(r>>>e|n<<32-e,n>>>e,this.unsigned)}else return e===32?t.fromBits(n,0,this.unsigned):t.fromBits(n>>>e-32,0,this.unsigned)},t.prototype.shr_u=function(e){return this.shiftRightUnsigned(e)},t.prototype.shru=function(e){return this.shiftRightUnsigned(e)},t.prototype.subtract=function(e){return t.isLong(e)||(e=t.fromValue(e)),this.add(e.neg())},t.prototype.sub=function(e){return this.subtract(e)},t.prototype.toInt=function(){return this.unsigned?this.low>>>0:this.low},t.prototype.toNumber=function(){return this.unsigned?(this.high>>>0)*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,_=d.toString(e);if(s=u,s.isZero())return _+c;for(;_.length<6;)_="0"+_;c=""+_+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(zv),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(ae.prototype,"__isLong__",{value:!0});Object.defineProperty(ae.prototype,"_bsontype",{value:"Long"});var Kv=/^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/,Xv=/^(\+|-)?(Infinity|inf)$/i,qv=/^(\+|-)?NaN$/i,Si=6111,Dc=-6176,$f=6176,Zv=34,Nc=[124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Gf=[248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Wf=[120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Jv=/^([-+])?(\d+)?$/,Qv=31,Yf=16383,ey=30,ty=31;function zf(t){return!isNaN(parseInt(t,10))}function ny(t){var e=ae.fromNumber(1e9),n=ae.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 ae(t.parts[r],0)),t.parts[r]=n.div(e).low,n=n.modulo(e);return{quotient:t,rem:n}}function ry(t,e){if(!t&&!e)return{high:ae.fromNumber(0),low:ae.fromNumber(0)};var n=t.shiftRightUnsigned(32),r=new ae(t.getLowBits(),0),i=e.shiftRightUnsigned(32),o=new ae(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 ae(c.getLowBits(),0).add(u).add(d.shiftRightUnsigned(32)),s=s.add(c.shiftRightUnsigned(32)),d=c.shiftLeft(32).add(new ae(d.getLowBits(),0)),{high:s,low:d}}function iy(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 tt('"'.concat(t,'" is not a valid Decimal128 string - ').concat(e))}var Fc=function(){function t(e){if(!(this instanceof t))return new t(e);if(typeof e=="string")this.bytes=t.fromString(e).bytes;else if(Lc(e)){if(e.byteLength!==16)throw new tt("Decimal128 must take a Buffer of 16 bytes");this.bytes=e}else throw new tt("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,_=[0],h=0,E=0,C=0,N=0,V=0,B=0,X=new ae(0,0),J=new ae(0,0),ue=0,q=0;if(e.length>=7e3)throw new tt(""+e+" not a valid Decimal128 string");var Ae=e.match(Kv),H=e.match(Xv),_e=e.match(qv);if(!Ae&&!H&&!_e||e.length===0)throw new tt(""+e+" not a valid Decimal128 string");if(Ae){var de=Ae[2],ye=Ae[4],ke=Ae[5],De=Ae[6];ye&&De===void 0&&Ur(e,"missing exponent power"),ye&&de===void 0&&Ur(e,"missing exponent base"),ye===void 0&&(ke||De)&&Ur(e,"missing e before exponent")}if((e[q]==="+"||e[q]==="-")&&(n=e[q++]==="-"),!zf(e[q])&&e[q]!=="."){if(e[q]==="i"||e[q]==="I")return new t(Fe.from(n?Gf:Wf));if(e[q]==="N")return new t(Fe.from(Nc))}for(;zf(e[q])||e[q]===".";){if(e[q]==="."){r&&Ur(e,"contains multiple periods"),r=!0,q=q+1;continue}h<34&&(e[q]!=="0"||i)&&(i||(d=s),i=!0,_[E++]=parseInt(e[q],10),h=h+1),i&&(c=c+1),r&&(u=u+1),s=s+1,q=q+1}if(r&&!s)throw new tt(""+e+" not a valid Decimal128 string");if(e[q]==="e"||e[q]==="E"){var Le=e.substr(++q).match(Jv);if(!Le||!Le[2])return new t(Fe.from(Nc));V=parseInt(Le[0],10),q=q+Le[0].length}if(e[q])return new t(Fe.from(Nc));if(C=0,!h)C=0,N=0,_[0]=0,c=1,h=1,o=0;else if(N=h-1,o=c,o!==1)for(;_[d+o-1]===0;)o=o-1;for(V<=u&&u-V>16384?V=Dc:V=V-u;V>Si;){if(N=N+1,N-C>Zv){var Ge=_.join("");if(Ge.match(/^0+$/)){V=Si;break}Ur(e,"overflow")}V=V-1}for(;V<Dc||h<c;){if(N===0&&o<h){V=Dc,o=0;break}if(h<c?c=c-1:N=N-1,V<Si)V=V+1;else{var Ge=_.join("");if(Ge.match(/^0+$/)){V=Si;break}Ur(e,"overflow")}}if(N-C+1<o){var ze=s;r&&(d=d+1,ze=ze+1),n&&(d=d+1,ze=ze+1);var gt=parseInt(e[d+N+1],10),A=0;if(gt>=5&&(A=1,gt===5)){for(A=_[N]%2===1?1:0,B=d+N+2;B<ze;B++)if(parseInt(e[B],10)){A=1;break}}if(A){for(var O=N;O>=0;O--)if(++_[O]>9&&(_[O]=0,O===0))if(V<Si)V=V+1,_[O]=1;else return new t(Fe.from(n?Gf:Wf))}}if(X=ae.fromNumber(0),J=ae.fromNumber(0),o===0)X=ae.fromNumber(0),J=ae.fromNumber(0);else if(N-C<17){var O=C;for(J=ae.fromNumber(_[O++]),X=new ae(0,0);O<=N;O++)J=J.multiply(ae.fromNumber(10)),J=J.add(ae.fromNumber(_[O]))}else{var O=C;for(X=ae.fromNumber(_[O++]);O<=N-17;O++)X=X.multiply(ae.fromNumber(10)),X=X.add(ae.fromNumber(_[O]));for(J=ae.fromNumber(_[O++]);O<=N;O++)J=J.multiply(ae.fromNumber(10)),J=J.add(ae.fromNumber(_[O]))}var P=ry(X,ae.fromString("100000000000000000"));P.low=P.low.add(J),iy(P.low,J)&&(P.high=P.high.add(ae.fromNumber(1))),ue=V+$f;var M={low:ae.fromNumber(0),high:ae.fromNumber(0)};P.high.shiftRightUnsigned(49).and(ae.fromNumber(1)).equals(ae.fromNumber(1))?(M.high=M.high.or(ae.fromNumber(3).shiftLeft(61)),M.high=M.high.or(ae.fromNumber(ue).and(ae.fromNumber(16383).shiftLeft(47))),M.high=M.high.or(P.high.and(ae.fromNumber(0x7fffffffffff)))):(M.high=M.high.or(ae.fromNumber(ue&16383).shiftLeft(49)),M.high=M.high.or(P.high.and(ae.fromNumber(562949953421311)))),M.low=P.low,n&&(M.high=M.high.or(ae.fromString("9223372036854775808")));var v=Fe.alloc(16);return q=0,v[q++]=M.low.low&255,v[q++]=M.low.low>>8&255,v[q++]=M.low.low>>16&255,v[q++]=M.low.low>>24&255,v[q++]=M.low.high&255,v[q++]=M.low.high>>8&255,v[q++]=M.low.high>>16&255,v[q++]=M.low.high>>24&255,v[q++]=M.high.low&255,v[q++]=M.high.low>>8&255,v[q++]=M.high.low>>16&255,v[q++]=M.high.low>>24&255,v[q++]=M.high.high&255,v[q++]=M.high.high>>8&255,v[q++]=M.high.high>>16&255,v[q++]=M.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,_,h=[];o=0;var E=this.bytes,C=E[o++]|E[o++]<<8|E[o++]<<16|E[o++]<<24,N=E[o++]|E[o++]<<8|E[o++]<<16|E[o++]<<24,V=E[o++]|E[o++]<<8|E[o++]<<16|E[o++]<<24,B=E[o++]|E[o++]<<8|E[o++]<<16|E[o++]<<24;o=0;var X={low:new ae(C,N),high:new ae(V,B)};X.high.lessThan(ae.ZERO)&&h.push("-");var J=B>>26&Qv;if(J>>3===3){if(J===ey)return h.join("")+"Infinity";if(J===ty)return"NaN";e=B>>15&Yf,c=8+(B>>14&1)}else c=B>>14&7,e=B>>17&Yf;var ue=e-$f;if(u.parts[0]=(B&16383)+((c&15)<<14),u.parts[1]=V,u.parts[2]=N,u.parts[3]=C,u.parts[0]===0&&u.parts[1]===0&&u.parts[2]===0&&u.parts[3]===0)s=!0;else for(_=3;_>=0;_--){var q=0,Ae=ny(u);if(u=Ae.quotient,q=Ae.rem.low,!!q)for(d=8;d>=0;d--)r[_*9+d]=q%10,q=Math.floor(q/10)}if(s)n=1,r[o]=0;else for(n=36;!r[o];)n=n-1,o=o+1;var H=n-1+ue;if(H>=34||H<=-7||ue>0){if(n>34)return h.push("".concat(0)),ue>0?h.push("E+".concat(ue)):ue<0&&h.push("E".concat(ue)),h.join("");h.push("".concat(r[o++])),n=n-1,n&&h.push(".");for(var i=0;i<n;i++)h.push("".concat(r[o++]));h.push("E"),H>0?h.push("+".concat(H)):h.push("".concat(H))}else if(ue>=0)for(var i=0;i<n;i++)h.push("".concat(r[o++]));else{var _e=n+ue;if(_e>0)for(var i=0;i<_e;i++)h.push("".concat(r[o++]));else h.push("0");for(h.push(".");_e++<0;)h.push("0");for(var i=0;i<n-Math.max(_e-1,0);i++)h.push("".concat(r[o++]))}return h.join("")},t.prototype.toJSON=function(){return{$numberDecimal:this.toString()}},t.prototype.toExtendedJSON=function(){return{$numberDecimal:this.toString()}},t.fromExtendedJSON=function(e){return t.fromString(e.$numberDecimal)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return'new Decimal128("'.concat(this.toString(),'")')},t}();Object.defineProperty(Fc.prototype,"_bsontype",{value:"Decimal128"});var Jo=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(Jo.prototype,"_bsontype",{value:"Double"});var Qo=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(Qo.prototype,"_bsontype",{value:"Int32"});var kc=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(kc.prototype,"_bsontype",{value:"MaxKey"});var Vc=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(Vc.prototype,"_bsontype",{value:"MinKey"});var oy=new RegExp("^[0-9a-fA-F]{24}$"),cr=null,yn=Symbol("id"),Rt=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 tt("Argument passed in must have an id that is of type string or Buffer");"toHexString"in e&&typeof e.toHexString=="function"?n=Fe.from(e.toHexString(),"hex"):n=e.id}else n=e;if(n==null||typeof n=="number")this[yn]=t.generate(typeof n=="number"?n:void 0);else if(ArrayBuffer.isView(n)&&n.byteLength===12)this[yn]=n instanceof Fe?n:zo(n);else if(typeof n=="string")if(n.length===12){var r=Fe.from(n);if(r.byteLength===12)this[yn]=r;else throw new tt("Argument passed in must be a string of 12 bytes")}else if(n.length===24&&oy.test(n))this[yn]=Fe.from(n,"hex");else throw new tt("Argument passed in must be a string of 12 bytes or a string of 24 hex characters or an integer");else throw new tt("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[yn]},set:function(e){this[yn]=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=Fe.alloc(12);return r.writeUInt32BE(e,0),cr===null&&(cr=ep(5)),r[4]=cr[0],r[5]=cr[1],r[6]=cr[2],r[7]=cr[3],r[8]=cr[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[yn][11]===e[yn][11]&&this[yn].equals(e[yn]);if(typeof e=="string"&&t.isValid(e)&&e.length===12&&Lc(this.id))return e===Fe.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 Fe.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=Fe.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 tt("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");return new t(Fe.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(Rt.prototype,"generate",{value:qo(function(t){return Rt.generate(t)},"Please use the static `ObjectId.generate(time)` instead")});Object.defineProperty(Rt.prototype,"getInc",{value:qo(function(){return Rt.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(Rt.prototype,"get_inc",{value:qo(function(){return Rt.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(Rt,"get_inc",{value:qo(function(){return Rt.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(Rt.prototype,"_bsontype",{value:"ObjectID"});function sy(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=sy(n??""),this.pattern.indexOf("\0")!==-1)throw new lr("BSON Regex patterns cannot contain null bytes, found: ".concat(JSON.stringify(this.pattern)));if(this.options.indexOf("\0")!==-1)throw new lr("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 lr("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 tt("Unexpected BSONRegExp EJSON object form: ".concat(JSON.stringify(e)))},t}();Object.defineProperty(Ii.prototype,"_bsontype",{value:"BSONRegExp"});var Bc=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(Bc.prototype,"_bsontype",{value:"Symbol"});var ay=ae,ip=function(t){Xo(e,t);function e(n,r){var i=this;return i instanceof e?(ae.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(ae.fromInt(n,!0))},e.fromNumber=function(n){return new e(ae.fromNumber(n,!0))},e.fromBits=function(n,r){return new e(n,r)},e.fromString=function(n,r){return new e(ae.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=ae.MAX_UNSIGNED_VALUE,e}(ay);function cy(t){return xi(t)&&Reflect.has(t,"_bsontype")&&typeof t._bsontype=="string"}var op=2147483647,sp=-2147483648,ap=9223372036854776e3,cp=-9223372036854776e3,ly={$oid:Rt,$binary:ur,$uuid:ur,$symbol:Bc,$numberInt:Qo,$numberDecimal:Fc,$numberDouble:Jo,$numberLong:ae,$minKey:Vc,$maxKey:kc,$regex:Ii,$regularExpression:Ii,$timestamp:ip};function lp(t,e){if(e===void 0&&(e={}),typeof t=="number"){if(e.relaxed||e.legacy)return t;if(Math.floor(t)===t){if(t>=sp&&t<=op)return new Qo(t);if(t>=cp&&t<=ap)return ae.fromNumber(t)}return new Jo(t)}if(t==null||typeof t!="object")return t;if(t.$undefined)return null;for(var n=Object.keys(t).filter(function(h){return h.startsWith("$")&&t[h]!=null}),r=0;r<n.length;r++){var i=ly[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)):ae.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=lp(t.$scope)),Zo.fromExtendedJSON(t)}if(Yv(t)||t.$dbPointer){var u=t.$ref?t:t.$dbPointer;if(u instanceof Ti)return u;var d=Object.keys(u).filter(function(h){return h.startsWith("$")}),_=!0;if(d.forEach(function(h){["$ref","$id","$db"].indexOf(h)===-1&&(_=!1)}),_)return Ti.fromExtendedJSON(u)}return t}function uy(t,e){return t.map(function(n,r){e.seenObjects.push({propertyName:"index ".concat(r),obj:null});try{return Yn(n,e)}finally{e.seenObjects.pop()}})}function Kf(t){var e=t.toISOString();return t.getUTCMilliseconds()!==0?e:e.slice(0,-5)+"Z"}function Yn(t,e){if((typeof t=="object"||typeof t=="function")&&t!==null){var n=e.seenObjects.findIndex(function(X){return X.obj===t});if(n!==-1){var r=e.seenObjects.map(function(X){return X.propertyName}),i=r.slice(0,n).map(function(X){return"".concat(X," -> ")}).join(""),o=r[n],s=" -> "+r.slice(n+1,r.length-1).map(function(X){return"".concat(X," -> ")}).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 tt(`Converting circular structure to EJSON:
|
|
17
|
+
`),typeof c=="string"||c instanceof Uint8Array)i(c);else{let u;try{u=JSON.stringify(c)}catch{u=JSON.stringify(Zt(c))}i(u)}}return typeof r=="string"?r:Dm(r)}function Dm(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 Wu(t){let e=typeof t.data=="string"?ba(t.data):t.data;return[{type:"attachment",length:e.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType},e]}var Nm={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",raw_security:"security",log:"log_item"};function wa(t){return Nm[t]}function Sa(t){if(!t?.sdk)return;let{name:e,version:n}=t.sdk;return{name:e,version:n}}function Yu(t,e,n,r){let i=t.sdkProcessingMetadata?.dynamicSamplingContext;return x(x(x({event_id:t.event_id,sent_at:new Date().toISOString()},e&&{sdk:e}),!!n&&r&&{dsn:Gn(r)}),i&&{trace:i})}function Rm(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 zu(t,e,n,r){let i=Sa(n),o=x(x({sent_at:new Date().toISOString()},i&&{sdk:i}),!!r&&e&&{dsn:Gn(e)}),s="aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()];return Ln(o,[s])}function Ku(t,e,n,r){let i=Sa(n),o=t.type&&t.type!=="replay_event"?t.type:"event";Rm(t,n?.sdk);let s=Yu(t,i,r,e);return delete t.sdkProcessingMetadata,Ln(s,[[{type:o},t]])}var Ia=0,Xu=1,qu=2;function Jt(t){return new sn(e=>{e(t)})}function Wn(t){return new sn((e,n)=>{n(t)})}var sn=class t{constructor(e){this._state=Ia,this._handlers=[],this._runExecutor(e)}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)})})}_executeHandlers(){if(this._state===Ia)return;let e=this._handlers.slice();this._handlers=[],e.forEach(n=>{n[0]||(this._state===Xu&&n[1](this._value),this._state===qu&&n[2](this._value),n[0]=!0)})}_runExecutor(e){let n=(o,s)=>{if(this._state===Ia){if(Mn(s)){s.then(r,i);return}this._state=o,this._value=s,this._executeHandlers()}},r=o=>{n(Xu,o)},i=o=>{n(qu,o)};try{e(r,i)}catch(o){i(o)}}};function co(t,e,n,r=0){return new sn((i,o)=>{let s=t[r];if(e===null||typeof s!="function")i(e);else{let c=s(x({},e),n);fe&&s.id&&c===null&&te.log(`Event processor "${s.id}" dropped event`),Mn(c)?c.then(u=>co(t,u,n,r+1).then(i)).then(null,o):co(t,c,n,r+1).then(i).then(null,o)}})}function Zu(t,e){let{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:o}=e;Mm(t,e),r&&Fm(t,r),Vm(t,n),Pm(t,i),Lm(t,o)}function Ta(t,e){let{extra:n,tags:r,user:i,contexts:o,level:s,sdkProcessingMetadata:c,breadcrumbs:u,fingerprint:d,eventProcessors:_,attachments:h,propagationContext:E,transactionName:C,span:N}=e;lo(t,"extra",n),lo(t,"tags",r),lo(t,"user",i),lo(t,"contexts",o),t.sdkProcessingMetadata=$n(t.sdkProcessingMetadata,c,2),s&&(t.level=s),C&&(t.transactionName=C),N&&(t.span=N),u.length&&(t.breadcrumbs=[...t.breadcrumbs,...u]),d.length&&(t.fingerprint=[...t.fingerprint,...d]),_.length&&(t.eventProcessors=[...t.eventProcessors,..._]),h.length&&(t.attachments=[...t.attachments,...h]),t.propagationContext=x(x({},t.propagationContext),E)}function lo(t,e,n){t[e]=$n(t[e],n,1)}function Mm(t,e){let{extra:n,tags:r,user:i,contexts:o,level:s,transactionName:c}=e;Object.keys(n).length&&(t.extra=x(x({},n),t.extra)),Object.keys(r).length&&(t.tags=x(x({},r),t.tags)),Object.keys(i).length&&(t.user=x(x({},i),t.user)),Object.keys(o).length&&(t.contexts=x(x({},o),t.contexts)),s&&(t.level=s),c&&t.type!=="transaction"&&(t.transaction=c)}function Pm(t,e){let n=[...t.breadcrumbs||[],...e];t.breadcrumbs=n.length?n:void 0}function Lm(t,e){t.sdkProcessingMetadata=x(x({},t.sdkProcessingMetadata),e)}function Fm(t,e){t.contexts=x({trace:_a(e)},t.contexts),t.sdkProcessingMetadata=x({dynamicSamplingContext:ya(e)},t.sdkProcessingMetadata);let n=ui(e),r=Dr(n).description;r&&!t.transaction&&t.type==="transaction"&&(t.transaction=r)}function Vm(t,e){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],e&&(t.fingerprint=t.fingerprint.concat(e)),t.fingerprint.length||delete t.fingerprint}var uo,Ju,fo;function Qu(t){let e=we._sentryDebugIds;if(!e)return{};let n=Object.keys(e);return fo&&n.length===Ju||(Ju=n.length,fo=n.reduce((r,i)=>{uo||(uo={});let o=uo[i];if(o)r[o[0]]=o[1];else{let s=t(i);for(let c=s.length-1;c>=0;c--){let d=s[c]?.filename,_=e[i];if(d&&_){r[d]=_,uo[i]=[d,_];break}}}return r},{})),fo}function ed(t,e,n,r,i,o){let{normalizeDepth:s=3,normalizeMaxBreadth:c=1e3}=t,u=Ee(x({},e),{event_id:e.event_id||n.event_id||pt(),timestamp:e.timestamp||mn()}),d=n.integrations||t.integrations.map(B=>B.name);km(u,t),Hm(u,d),i&&i.emit("applyFrameMetadata",e),e.type===void 0&&Bm(u,t.stackParser);let _=$m(r,n.captureContext);n.mechanism&&hn(u,n.mechanism);let h=i?i.getEventProcessors():[],E=io().getScopeData();if(o){let B=o.getScopeData();Ta(E,B)}if(_){let B=_.getScopeData();Ta(E,B)}let C=[...n.attachments||[],...E.attachments];C.length&&(n.attachments=C),Zu(u,E);let N=[...h,...E.eventProcessors];return co(N,u,n).then(B=>(B&&Um(B),typeof s=="number"&&s>0?jm(B,s,c):B))}function km(t,e){let{environment:n,release:r,dist:i,maxValueLength:o=250}=e;t.environment=t.environment||n||Nr,!t.release&&r&&(t.release=r),!t.dist&&i&&(t.dist=i);let s=t.request;s?.url&&(s.url=jn(s.url,o))}function Bm(t,e){let n=Qu(e);t.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(i=>{i.filename&&(i.debug_id=n[i.filename])})})}function Um(t){let e={};if(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)})}),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 Hm(t,e){e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}function jm(t,e,n){if(!t)return null;let r=x(x(x(x(x({},t),t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(i=>x(x({},i),i.data&&{data:Zt(i.data,e,n)}))}),t.user&&{user:Zt(t.user,e,n)}),t.contexts&&{contexts:Zt(t.contexts,e,n)}),t.extra&&{extra:Zt(t.extra,e,n)});return t.contexts?.trace&&r.contexts&&(r.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(r.contexts.trace.data=Zt(t.contexts.trace.data,e,n))),t.spans&&(r.spans=t.spans.map(i=>x(x({},i),i.data&&{data:Zt(i.data,e,n)}))),t.contexts?.flags&&r.contexts&&(r.contexts.flags=Zt(t.contexts.flags,3,n)),r}function $m(t,e){if(!e)return t;let n=t?t.clone():new wt;return n.update(e),n}function td(t){if(t)return Gm(t)?{captureContext:t}:Ym(t)?{captureContext:t}:t}function Gm(t){return t instanceof wt||typeof t=="function"}var Wm=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function Ym(t){return Object.keys(t).some(e=>Wm.includes(e))}function po(t,e){return gn().captureException(t,td(e))}function di(t,e){return gn().captureEvent(t,e)}function fi(t){let e=_n(),n=gn(),{userAgent:r}=we.navigator||{},i=Cu(x(x({user:n.getUser()||e.getUser()},r&&{userAgent:r}),t)),o=e.getSession();return o?.status==="ok"&&Pn(o,{status:"exited"}),ho(),e.setSession(i),i}function ho(){let t=_n(),n=gn().getSession()||t.getSession();n&&wu(n),rd(),t.setSession()}function rd(){let t=_n(),e=Ye(),n=t.getSession();n&&e&&e.captureSession(n)}function pi(t=!1){if(t){ho();return}rd()}var zm="7";function Km(t){let e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}function Xm(t){return`${Km(t)}${t.projectId}/envelope/`}function qm(t,e){let n={sentry_version:zm};return t.publicKey&&(n.sentry_key=t.publicKey),e&&(n.sentry_client=`${e.name}/${e.version}`),new URLSearchParams(n).toString()}function id(t,e,n){return e||`${Xm(t)}?${qm(t,n)}`}var od=[];function sd(t,e){let n={};return e.forEach(r=>{r&&Oa(t,r,n)}),n}function xa(t,e){for(let n of e)n?.afterAllSetup&&n.afterAllSetup(t)}function Oa(t,e,n){if(n[e.name]){fe&&te.log(`Integration skipped because it was already installed: ${e.name}`);return}if(n[e.name]=e,od.indexOf(e.name)===-1&&typeof e.setupOnce=="function"&&(e.setupOnce(),od.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)}fe&&te.log(`Integration installed: ${e.name}`)}function ad(t,e,n){let r=[{type:"client_report"},{timestamp:n||mn(),discarded_events:t}];return Ln(e?{dsn:e}:{},[r])}function mo(t){let e=[];t.message&&e.push(t.message);try{let n=t.exception.values[t.exception.values.length-1];n?.value&&(e.push(n.value),n.type&&e.push(`${n.type}: ${n.value}`))}catch{}return e}function cd(t){let{trace_id:e,parent_span_id:n,span_id:r,status:i,origin:o,data:s,op:c}=t.contexts?.trace??{};return{data:s??{},description:t.transaction,op:c,parent_span_id:n,span_id:r??"",start_timestamp:t.start_timestamp??0,status:i,timestamp:t.timestamp,trace_id:e??"",origin:o,profile_id:s?.[ma],exclusive_time:s?.[ga],measurements:t.measurements,is_segment:!0}}function ld(t){return{type:"transaction",timestamp:t.timestamp,start_timestamp:t.start_timestamp,transaction:t.description,contexts:{trace:{trace_id:t.trace_id,span_id:t.span_id,parent_span_id:t.parent_span_id,op:t.op,status:t.status,origin:t.origin,data:x(x(x({},t.data),t.profile_id&&{[ma]:t.profile_id}),t.exclusive_time&&{[ga]:t.exclusive_time})}},measurements:t.measurements}}var ud="Not capturing exception because it's already been captured.",dd="Discarded session because of missing or non-string release",hd=Symbol.for("SentryInternalError"),md=Symbol.for("SentryDoNotSendEventError");function go(t){return{message:t,[hd]:!0}}function Aa(t){return{message:t,[md]:!0}}function fd(t){return!!t&&typeof t=="object"&&hd in t}function pd(t){return!!t&&typeof t=="object"&&md in t}var hi=class{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=Uu(e.dsn):fe&&te.warn("No DSN provided, client will not send events."),this._dsn){let n=id(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport(Ee(x({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this)},e.transportOptions),{url:n}))}}captureException(e,n,r){let i=pt();if(to(e))return fe&&te.log(ud),i;let o=x({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=x({event_id:pt()},r),s=Tr(e)?e:String(e),c=nr(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?.originalException&&to(n.originalException))return fe&&te.log(ud),i;let o=x({event_id:i},n),s=e.sdkProcessingMetadata||{},c=s.capturedSpanScope,u=s.capturedSpanIsolationScope;return this._process(this._captureEvent(e,o,c||r,u)),o.event_id}captureSession(e){this.sendSession(e),Pn(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))):Jt(!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._options.integrations.some(({name:e})=>e.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){let n=this._integrations[e.name];Oa(this,e,this._integrations),n||xa(this,[e])}sendEvent(e,n={}){this.emit("beforeSendEvent",e,n);let r=Ku(e,this._dsn,this._options._metadata,this._options.tunnel);for(let o of n.attachments||[])r=$u(r,Wu(o));let i=this.sendEnvelope(r);i&&i.then(o=>this.emit("afterSendEvent",e,o),null)}sendSession(e){let{release:n,environment:r=Nr}=this._options;if("aggregates"in e){let o=e.attrs||{};if(!o.release&&!n){fe&&te.warn(dd);return}o.release=o.release||n,o.environment=o.environment||r,e.attrs=o}else{if(!e.release&&!n){fe&&te.warn(dd);return}e.release=e.release||n,e.environment=e.environment||r}this.emit("beforeSendSession",e);let i=zu(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(i)}recordDroppedEvent(e,n,r=1){if(this._options.sendClientReports){let i=`${e}:${n}`;fe&&te.log(`Recording outcome: "${i}"${r>1?` (${r} times)`:""}`),this._outcomes[i]=(this._outcomes[i]||0)+r}}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=>(fe&&te.error("Error while sending envelope:",n),n)):(fe&&te.error("Transport disabled"),Jt({}))}_setupIntegrations(){let{integrations:e}=this._options;this._integrations=sd(this,e),xa(this,e)}_updateSessionFromEvent(e,n){let r=n.level==="fatal",i=!1,o=n.exception?.values;if(o){i=!0;for(let u of o)if(u.mechanism?.handled===!1){r=!0;break}}let s=e.status==="ok";(s&&e.errors===0||s&&r)&&(Pn(e,Ee(x({},r&&{status:"crashed"}),{errors:e.errors||Number(i||r)})),this.captureSession(e))}_isClientDoneProcessing(e){return new sn(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){let o=this.getOptions(),s=Object.keys(this._integrations);return!n.integrations&&s?.length&&(n.integrations=s),this.emit("preprocessEvent",e,n),e.type||i.setLastEventId(e.event_id||n.event_id),ed(o,e,n,r,this,i).then(c=>{if(c===null)return c;this.emit("postprocessEvent",c,n),c.contexts=x({trace:da(r)},c.contexts);let u=ju(this,r);return c.sdkProcessingMetadata=x({dynamicSamplingContext:u},c.sdkProcessingMetadata),c})}_captureEvent(e,n={},r=gn(),i=_n()){return fe&&Da(e)&&te.log(`Captured error event \`${mo(e)[0]||"<unknown>"}\``),this._processEvent(e,n,r,i).then(o=>o.event_id,o=>{fe&&(pd(o)?te.log(o.message):fd(o)?te.warn(o.message):te.warn(o))})}_processEvent(e,n,r,i){let o=this.getOptions(),{sampleRate:s}=o,c=gd(e),u=Da(e),d=e.type||"error",_=`before send for type \`${d}\``,h=typeof s>"u"?void 0:Nu(s);if(u&&typeof h=="number"&&Math.random()>h)return this.recordDroppedEvent("sample_rate","error"),Wn(Aa(`Discarding event because it's not included in the random sample (sampling rate = ${s})`));let E=d==="replay_event"?"replay":d;return this._prepareEvent(e,n,r,i).then(C=>{if(C===null)throw this.recordDroppedEvent("event_processor",E),Aa("An event processor returned `null`, will not send event.");if(n.data&&n.data.__sentry__===!0)return C;let k=Qm(this,o,C,n);return Jm(k,_)}).then(C=>{if(C===null){if(this.recordDroppedEvent("before_send",E),c){let X=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",X)}throw Aa(`${_} returned \`null\`, will not send event.`)}let N=r.getSession()||i.getSession();if(u&&N&&this._updateSessionFromEvent(N,C),c){let B=C.sdkProcessingMetadata?.spanCountBeforeProcessing||0,X=C.spans?C.spans.length:0,J=B-X;J>0&&this.recordDroppedEvent("before_send","span",J)}let k=C.transaction_info;if(c&&k&&C.transaction!==e.transaction){let B="custom";C.transaction_info=Ee(x({},k),{source:B})}return this.sendEvent(C,n),C}).then(null,C=>{throw pd(C)||fd(C)?C:(this.captureException(C,{data:{__sentry__:!0},originalException:C}),go(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
18
|
+
Reason: ${C}`))})}_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}})}_flushOutcomes(){fe&&te.log("Flushing outcomes...");let e=this._clearOutcomes();if(e.length===0){fe&&te.log("No outcomes to send");return}if(!this._dsn){fe&&te.log("No dsn provided, will not send outcomes");return}fe&&te.log("Sending outcomes:",e);let n=ad(e,this._options.tunnel&&Gn(this._dsn));this.sendEnvelope(n)}};function Jm(t,e){let n=`${e} must return \`null\` or a valid event.`;if(Mn(t))return t.then(r=>{if(!Rn(r)&&r!==null)throw go(n);return r},r=>{throw go(`${e} rejected with ${r}`)});if(!Rn(t)&&t!==null)throw go(n);return t}function Qm(t,e,n,r){let{beforeSend:i,beforeSendTransaction:o,beforeSendSpan:s}=e,c=n;if(Da(c)&&i)return i(c,r);if(gd(c)){if(s){let u=s(cd(c));if(u?c=$n(n,ld(u)):va(),c.spans){let d=[];for(let _ of c.spans){let h=s(_);h?d.push(h):(va(),d.push(_))}c.spans=d}}if(o){if(c.spans){let u=c.spans.length;c.sdkProcessingMetadata=Ee(x({},n.sdkProcessingMetadata),{spanCountBeforeProcessing:u})}return o(c,r)}}return c}function Da(t){return t.type===void 0}function gd(t){return t.type==="transaction"}function eg(t){return[{type:"log",item_count:t.length,content_type:"application/vnd.sentry.items.log+json"},{items:t}]}function _d(t,e,n,r){let i={};return e?.sdk&&(i.sdk={name:e.sdk.name,version:e.sdk.version}),n&&r&&(i.dsn=Gn(r)),Ln(i,[eg(t)])}function mi(t,e){let n=e??tg(t)??[];if(n.length===0)return;let r=t.getOptions(),i=_d(n,r._metadata,r.tunnel,t.getDsn());vd().set(t,[]),t.emit("flushLogs"),t.sendEnvelope(i)}function tg(t){return vd().get(t)}function vd(){return Nn("clientToLogBufferMap",()=>new WeakMap)}var Na=Symbol.for("SentryBufferFullError");function yd(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 Wn(Na);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 sn((c,u)=>{let d=e.length;if(!d)return c(!0);let _=setTimeout(()=>{s&&s>0&&c(!1)},s);e.forEach(h=>{Jt(h).then(()=>{--d||(clearTimeout(_),c(!0))},u)})})}return{$:e,add:i,drain:o}}function ng(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 rg(t,e){return t[e]||t.all||0}function Ed(t,e,n=Date.now()){return rg(t,e)>n}function bd(t,{statusCode:e,headers:n},r=Date.now()){let i=x({},t),o=n?.["x-sentry-rate-limits"],s=n?.["retry-after"];if(o)for(let c of o.trim().split(",")){let[u,d,,,_]=c.split(":",5),h=parseInt(u,10),E=(isNaN(h)?60:h)*1e3;if(!d)i.all=r+E;else for(let C of d.split(";"))C==="metric_bucket"?(!_||_.split(";").includes("custom"))&&(i[C]=r+E):i[C]=r+E}else s?i.all=r+ng(s,r):e===429&&(i.all=r+60*1e3);return i}var ig=64;function _o(t,e,n=yd(t.bufferSize||ig)){let r={},i=s=>n.drain(s);function o(s){let c=[];if(Ca(s,(h,E)=>{let C=wa(E);Ed(r,C)?t.recordDroppedEvent("ratelimit_backoff",C):c.push(h)}),c.length===0)return Jt({});let u=Ln(s[0],c),d=h=>{Ca(u,(E,C)=>{t.recordDroppedEvent(h,wa(C))})},_=()=>e({body:Gu(u)}).then(h=>(h.statusCode!==void 0&&(h.statusCode<200||h.statusCode>=300)&&fe&&te.warn(`Sentry responded with status code ${h.statusCode} to sent event.`),r=bd(r,h),h),h=>{throw d("network_error"),fe&&te.error("Encountered error running transport request:",h),h});return n.add(_).then(h=>h,h=>{if(h===Na)return fe&&te.error("Skipped sending event because buffer is full."),d("queue_overflow"),Jt({});throw h})}return{send:o,flush:i}}function Ra(t){t.user?.ip_address===void 0&&(t.user=Ee(x({},t.user),{ip_address:"{{auto}}"}))}function Ma(t){"aggregates"in t?t.attrs?.ip_address===void 0&&(t.attrs=Ee(x({},t.attrs),{ip_address:"{{auto}}"})):t.ipAddress===void 0&&(t.ipAddress="{{auto}}")}function Pa(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:dn})),version:dn}),t._metadata=i}var og=100;function vn(t,e){let n=Ye(),r=_n();if(!n)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:o=og}=n.getOptions();if(o<=0)return;let s=mn(),c=x({timestamp:s},t),u=i?Hn(()=>i(c,e)):c;u!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",u,e),r.addBreadcrumb(u,o))}var Cd,sg="FunctionToString",wd=new WeakMap,ag=()=>({name:sg,setupOnce(){Cd=Function.prototype.toString;try{Function.prototype.toString=function(...t){let e=ir(this),n=wd.has(Ye())&&e!==void 0?e:this;return Cd.apply(n,t)}}catch{}},setup(t){wd.set(t,!0)}}),vo=ag;var cg=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,`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",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/],lg="EventFilters",La=(t={})=>{let e;return{name:lg,setup(n){let r=n.getOptions();e=Sd(t,r)},processEvent(n,r,i){if(!e){let o=i.getOptions();e=Sd(t,o)}return ug(n,e)?null:n}}},Eo=(t={})=>Ee(x({},La(t)),{name:"InboundFilters"});function Sd(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...t.disableErrorDefaults?[]:cg],ignoreTransactions:[...t.ignoreTransactions||[],...e.ignoreTransactions||[]]}}function ug(t,e){if(t.type){if(t.type==="transaction"&&fg(t,e.ignoreTransactions))return fe&&te.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
|
|
19
|
+
Event: ${pn(t)}`),!0}else{if(dg(t,e.ignoreErrors))return fe&&te.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
|
|
20
|
+
Event: ${pn(t)}`),!0;if(gg(t))return fe&&te.warn(`Event dropped due to not having an error message, error type or stacktrace.
|
|
21
|
+
Event: ${pn(t)}`),!0;if(pg(t,e.denyUrls))return fe&&te.warn(`Event dropped due to being matched by \`denyUrls\` option.
|
|
22
|
+
Event: ${pn(t)}.
|
|
23
|
+
Url: ${yo(t)}`),!0;if(!hg(t,e.allowUrls))return fe&&te.warn(`Event dropped due to not being matched by \`allowUrls\` option.
|
|
24
|
+
Event: ${pn(t)}.
|
|
25
|
+
Url: ${yo(t)}`),!0}return!1}function dg(t,e){return e?.length?mo(t).some(n=>xr(n,e)):!1}function fg(t,e){if(!e?.length)return!1;let n=t.transaction;return n?xr(n,e):!1}function pg(t,e){if(!e?.length)return!1;let n=yo(t);return n?xr(n,e):!1}function hg(t,e){if(!e?.length)return!0;let n=yo(t);return n?xr(n,e):!0}function mg(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 yo(t){try{let n=[...t.exception?.values??[]].reverse().find(r=>r.mechanism?.parent_id===void 0&&r.stacktrace?.frames?.length)?.stacktrace?.frames;return n?mg(n):null}catch{return fe&&te.error(`Cannot extract url for event ${pn(t)}`),null}}function gg(t){return t.exception?.values?.length?!t.message&&!t.exception.values.some(e=>e.stacktrace||e.type&&e.type!=="Error"||e.value):!1}function Va(t,e,n,r,i,o){if(!i.exception?.values||!o||!on(o.originalException,Error))return;let s=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;s&&(i.exception.values=Fa(t,e,r,o.originalException,n,i.exception.values,s,0))}function Fa(t,e,n,r,i,o,s,c){if(o.length>=n+1)return o;let u=[...o];if(on(r[i],Error)){Id(s,c);let d=t(e,r[i]),_=u.length;Td(d,i,_,c),u=Fa(t,e,n,r[i],i,[d,...u],d,_)}return Array.isArray(r.errors)&&r.errors.forEach((d,_)=>{if(on(d,Error)){Id(s,c);let h=t(e,d),E=u.length;Td(h,`errors[${_}]`,E,c),u=Fa(t,e,n,d,i,[h,...u],h,E)}}),u}function Id(t,e){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism=Ee(x(x({},t.mechanism),t.type==="AggregateError"&&{is_exception_group:!0}),{exception_id:e})}function Td(t,e,n,r){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism=Ee(x({},t.mechanism),{type:"chained",source:e,exception_id:n,parent_id:r})}function ka(t){let e="console";Ot(e,t),At(e,_g)}function _g(){"console"in we&&Gs.forEach(function(t){t in we.console&&ft(we.console,t,function(e){return Sr[t]=e,function(...n){dt("console",{args:n,level:t}),Sr[t]?.apply(we.console,n)}})})}function Ba(t){return t==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(t)?t:"log"}var vg="Dedupe",yg=()=>{let t;return{name:vg,processEvent(e){if(e.type)return e;try{if(Eg(e,t))return fe&&te.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return t=e}}},bo=yg;function Eg(t,e){return e?!!(bg(t,e)||Cg(t,e)):!1}function bg(t,e){let n=t.message,r=e.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!Ad(t,e)||!Od(t,e))}function Cg(t,e){let n=xd(e),r=xd(t);return!(!n||!r||n.type!==r.type||n.value!==r.value||!Ad(t,e)||!Od(t,e))}function Od(t,e){let n=Ki(t),r=Ki(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 Ad(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 xd(t){return t.exception?.values?.[0]}function gi(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}}function Co(t){if(t!==void 0)return t>=400&&t<500?"warning":t>=500?"error":void 0}var _i=we;function Ua(){return"history"in _i&&!!_i.history}function wg(){if(!("fetch"in _i))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function vi(t){return t&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function Ha(){if(typeof EdgeRuntime=="string")return!0;if(!wg())return!1;if(vi(_i.fetch))return!0;let t=!1,e=_i.document;if(e&&typeof e.createElement=="function")try{let n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n),n.contentWindow?.fetch&&(t=vi(n.contentWindow.fetch)),e.head.removeChild(n)}catch(n){fe&&te.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return t}function $a(t,e){let n="fetch";Ot(n,t),At(n,()=>Sg(void 0,e))}function Sg(t,e=!1){e&&!Ha()||ft(we,"fetch",function(n){return function(...r){let i=new Error,{method:o,url:s}=Ig(r),c={args:r,fetchData:{method:o,url:s},startTimestamp:Ft()*1e3,virtualError:i,headers:Tg(r)};return t||dt("fetch",x({},c)),n.apply(we,r).then(async u=>(t?t(u):dt("fetch",Ee(x({},c),{endTimestamp:Ft()*1e3,response:u})),u),u=>{if(dt("fetch",Ee(x({},c),{endTimestamp:Ft()*1e3,error:u})),tr(u)&&u.stack===void 0&&(u.stack=i.stack,jt(u,"framesToPop",1)),u instanceof TypeError&&(u.message==="Failed to fetch"||u.message==="Load failed"||u.message==="NetworkError when attempting to fetch resource."))try{let d=new URL(c.fetchData.url);u.message=`${u.message} (${d.host})`}catch{}throw u})}})}function ja(t,e){return!!t&&typeof t=="object"&&!!t[e]}function Dd(t){return typeof t=="string"?t:t?ja(t,"url")?t.url:t.toString?t.toString():"":""}function Ig(t){if(t.length===0)return{method:"GET",url:""};if(t.length===2){let[n,r]=t;return{url:Dd(n),method:ja(r,"method")?String(r.method).toUpperCase():"GET"}}let e=t[0];return{url:Dd(e),method:ja(e,"method")?String(e.method).toUpperCase():"GET"}}function Tg(t){let[e,n]=t;try{if(typeof n=="object"&&n!==null&&"headers"in n&&n.headers)return new Headers(n.headers);if(mu(e))return new Headers(e.headers)}catch{}}function Ga(){return"npm"}var et=we,Wa=0;function Ya(){return Wa>0}function Hg(){Wa++,setTimeout(()=>{Wa--})}function or(t,e={}){function n(i){return typeof i=="function"}if(!n(t))return t;try{let i=t.__sentry_wrapped__;if(i)return typeof i=="function"?i:t;if(ir(t))return t}catch{return t}let r=function(...i){try{let o=i.map(s=>or(s,e));return t.apply(this,o)}catch(o){throw Hg(),li(s=>{s.addEventProcessor(c=>(e.mechanism&&(Or(c,void 0,void 0),hn(c,e.mechanism)),c.extra=Ee(x({},c.extra),{arguments:i}),c)),po(o)}),o}};try{for(let i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=t[i])}catch{}Qi(r,t),jt(t,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return t.name}})}catch{}return r}function Nd(){let t=ci(),{referrer:e}=et.document||{},{userAgent:n}=et.navigator||{},r=x(x({},e&&{Referer:e}),n&&{"User-Agent":n});return{url:t,headers:r}}function wo(t,e){let n=Xa(t,e),r={type:Yg(e),value:zg(e)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function jg(t,e,n,r){let o=Ye()?.getOptions().normalizeDepth,s=qg(e),c={__serialized__:ao(e,o)};if(s)return{exception:{values:[wo(t,s)]},extra:c};let u={exception:{values:[{type:rr(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:Kg(e,{isUnhandledRejection:r})}]},extra:c};if(n){let d=Xa(t,n);d.length&&(u.exception.values[0].stacktrace={frames:d})}return u}function za(t,e){return{exception:{values:[wo(t,e)]}}}function Xa(t,e){let n=e.stacktrace||e.stack||"",r=Gg(e),i=Wg(e);try{return t(n,r,i)}catch{}return[]}var $g=/Minified React error #\d+;/i;function Gg(t){return t&&$g.test(t.message)?1:0}function Wg(t){return typeof t.framesToPop=="number"?t.framesToPop:0}function Rd(t){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?t instanceof WebAssembly.Exception:!1}function Yg(t){let e=t?.name;return!e&&Rd(t)?t.message&&Array.isArray(t.message)&&t.message.length==2?t.message[0]:"WebAssembly.Exception":e}function zg(t){let e=t?.message;return Rd(t)?Array.isArray(t.message)&&t.message.length==2?t.message[1]:"wasm exception":e?e.error&&typeof e.error.message=="string"?e.error.message:e:"No error message"}function Md(t,e,n,r){let i=n?.syntheticException||void 0,o=So(t,e,i,r);return hn(o),o.level="error",n?.event_id&&(o.event_id=n.event_id),Jt(o)}function Pd(t,e,n="info",r,i){let o=r?.syntheticException||void 0,s=Ka(t,e,o,i);return s.level=n,r?.event_id&&(s.event_id=r.event_id),Jt(s)}function So(t,e,n,r,i){let o;if(qi(e)&&e.error)return za(t,e.error);if(Zi(e)||Qs(e)){let s=e;if("stack"in e)o=za(t,e);else{let c=s.name||(Zi(s)?"DOMError":"DOMException"),u=s.message?`${c}: ${s.message}`:c;o=Ka(t,u,n,r),Or(o,u)}return"code"in s&&(o.tags=Ee(x({},o.tags),{"DOMException.code":`${s.code}`})),o}return tr(e)?za(t,e):Rn(e)||rr(e)?(o=jg(t,e,n,i),hn(o,{synthetic:!0}),o):(o=Ka(t,e,n,r),Or(o,`${e}`,void 0),hn(o,{synthetic:!0}),o)}function Ka(t,e,n,r){let i={};if(r&&n){let o=Xa(t,n);o.length&&(i.exception={values:[{value:e,stacktrace:{frames:o}}]}),hn(i,{synthetic:!0})}if(Tr(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 Kg(t,{isUnhandledRejection:e}){let n=oa(t),r=e?"promise rejection":"exception";return qi(t)?`Event \`ErrorEvent\` captured as ${r} with message \`${t.message}\``:rr(t)?`Event \`${Xg(t)}\` (type=${t.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function Xg(t){try{let e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch{}}function qg(t){for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e)){let n=t[e];if(n instanceof Error)return n}}var Zg=5e3,yi=class extends hi{constructor(e){let n=Jg(e),r=et.SENTRY_SDK_SOURCE||Ga();Pa(n,"browser",["browser"],r),super(n);let{sendDefaultPii:i,sendClientReports:o,enableLogs:s,_experiments:c}=this._options,u=s??c?.enableLogs;et.document&&(o||u)&&et.document.addEventListener("visibilitychange",()=>{et.document.visibilityState==="hidden"&&(o&&this._flushOutcomes(),u&&mi(this))}),u&&(this.on("flush",()=>{mi(this)}),this.on("afterCaptureLog",()=>{this._logFlushIdleTimeout&&clearTimeout(this._logFlushIdleTimeout),this._logFlushIdleTimeout=setTimeout(()=>{mi(this)},Zg)})),i&&(this.on("postprocessEvent",Ra),this.on("beforeSendSession",Ma))}eventFromException(e,n){return Md(this._options.stackParser,e,n,this._options.attachStacktrace)}eventFromMessage(e,n="info",r){return Pd(this._options.stackParser,e,n,r,this._options.attachStacktrace)}_prepareEvent(e,n,r,i){return e.platform=e.platform||"javascript",super._prepareEvent(e,n,r,i)}};function Jg(t){return x({release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:et.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0},t)}var Ld=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var ht=we;var Qg=1e3,Fd,qa,Za;function Ja(t){let e="dom";Ot(e,t),At(e,e_)}function e_(){if(!ht.document)return;let t=dt.bind(null,"dom"),e=Vd(t,!0);ht.document.addEventListener("click",e,!1),ht.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(n=>{let i=ht[n]?.prototype;i?.hasOwnProperty?.("addEventListener")&&(ft(i,"addEventListener",function(o){return function(s,c,u){if(s==="click"||s=="keypress")try{let d=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},_=d[s]=d[s]||{refCount:0};if(!_.handler){let h=Vd(t);_.handler=h,o.call(this,s,h,u)}_.refCount++}catch{}return o.call(this,s,c,u)}}),ft(i,"removeEventListener",function(o){return function(s,c,u){if(s==="click"||s=="keypress")try{let d=this.__sentry_instrumentation_handlers__||{},_=d[s];_&&(_.refCount--,_.refCount<=0&&(o.call(this,s,_.handler,u),_.handler=void 0,delete d[s]),Object.keys(d).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return o.call(this,s,c,u)}}))})}function t_(t){if(t.type!==qa)return!1;try{if(!t.target||t.target._sentryId!==Za)return!1}catch{}return!0}function n_(t,e){return t!=="keypress"?!1:e?.tagName?!(e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable):!0}function Vd(t,e=!1){return n=>{if(!n||n._sentryCaptured)return;let r=r_(n);if(n_(n.type,r))return;jt(n,"_sentryCaptured",!0),r&&!r._sentryId&&jt(r,"_sentryId",pt());let i=n.type==="keypress"?"input":n.type;t_(n)||(t({event:n,name:i,global:e}),qa=n.type,Za=r?r._sentryId:void 0),clearTimeout(Fd),Fd=ht.setTimeout(()=>{Za=void 0,qa=void 0},Qg)}}function r_(t){try{return t.target}catch{return null}}var Io;function Ei(t){let e="history";Ot(e,t),At(e,i_)}function i_(){if(ht.addEventListener("popstate",()=>{let e=ht.location.href,n=Io;if(Io=e,n===e)return;dt("history",{from:n,to:e})}),!Ua())return;function t(e){return function(...n){let r=n.length>2?n[2]:void 0;if(r){let i=Io,o=o_(String(r));if(Io=o,i===o)return e.apply(this,n);dt("history",{from:i,to:o})}return e.apply(this,n)}}ft(ht.history,"pushState",t),ft(ht.history,"replaceState",t)}function o_(t){try{return new URL(t,ht.location.origin).toString()}catch{return t}}var To={};function Qa(t){let e=To[t];if(e)return e;let n=ht[t];if(vi(n))return To[t]=n.bind(ht);let r=ht.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?.[t]&&(n=o[t]),r.head.removeChild(i)}catch(i){Ld&&te.warn(`Could not create sandbox iframe for ${t} check, bailing to window.${t}: `,i)}return n&&(To[t]=n.bind(ht))}function xo(t){To[t]=void 0}var sr="__sentry_xhr_v3__";function ec(t){let e="xhr";Ot(e,t),At(e,s_)}function s_(){if(!ht.XMLHttpRequest)return;let t=XMLHttpRequest.prototype;t.open=new Proxy(t.open,{apply(e,n,r){let i=new Error,o=Ft()*1e3,s=Dt(r[0])?r[0].toUpperCase():void 0,c=a_(r[1]);if(!s||!c)return e.apply(n,r);n[sr]={method:s,url:c,request_headers:{}},s==="POST"&&c.match(/sentry_key/)&&(n.__sentry_own_request__=!0);let u=()=>{let d=n[sr];if(d&&n.readyState===4){try{d.status_code=n.status}catch{}let _={endTimestamp:Ft()*1e3,startTimestamp:o,xhr:n,virtualError:i};dt("xhr",_)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(d,_,h){return u(),d.apply(_,h)}}):n.addEventListener("readystatechange",u),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(d,_,h){let[E,C]=h,N=_[sr];return N&&Dt(E)&&Dt(C)&&(N.request_headers[E.toLowerCase()]=C),d.apply(_,h)}}),e.apply(n,r)}}),t.send=new Proxy(t.send,{apply(e,n,r){let i=n[sr];if(!i)return e.apply(n,r);r[0]!==void 0&&(i.body=r[0]);let o={startTimestamp:Ft()*1e3,xhr:n};return dt("xhr",o),e.apply(n,r)}})}function a_(t){if(Dt(t))return t;try{return t.toString()}catch{}}function tc(t,e=Qa("fetch")){let n=0,r=0;function i(o){let s=o.body.length;n+=s,r++;let c=x({body:o.body,method:"POST",referrerPolicy:"strict-origin",headers:t.headers,keepalive:n<=6e4&&r<15},t.fetchOptions);if(!e)return xo("fetch"),Wn("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 xo("fetch"),n-=s,r--,Wn(u)}}return _o(t,i)}var c_=30;var l_=50;function nc(t,e,n,r){let i={filename:t,function:e==="<anonymous>"?fn:e,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}var u_=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,d_=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,f_=/\((\S*)(?::(\d+))(?::(\d+))\)/,p_=t=>{let e=u_.exec(t);if(e){let[,r,i,o]=e;return nc(r,fn,+i,+o)}let n=d_.exec(t);if(n){if(n[2]&&n[2].indexOf("eval")===0){let s=f_.exec(n[2]);s&&(n[2]=s[1],n[3]=s[2],n[4]=s[3])}let[i,o]=Hd(n[1]||fn,n[2]);return nc(o,i,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},kd=[c_,p_],h_=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,m_=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,g_=t=>{let e=h_.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){let o=m_.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]||fn;return[i,r]=Hd(i,r),nc(r,i,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}},Bd=[l_,g_];var Ud=[kd,Bd],rc=Ks(...Ud),Hd=(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]:fn,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]};var Rr=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var Oo=1024,__="Breadcrumbs",v_=(t={})=>{let e=x({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},t);return{name:__,setup(n){e.console&&ka(b_(n)),e.dom&&Ja(E_(n,e.dom)),e.xhr&&ec(C_(n)),e.fetch&&$a(w_(n)),e.history&&Ei(S_(n)),e.sentry&&n.on("beforeSendEvent",y_(n))}}},jd=v_;function y_(t){return function(n){Ye()===t&&vn({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:pn(n)},{event:n})}}function E_(t,e){return function(r){if(Ye()!==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>Oo&&(Rr&&te.warn(`\`dom.maxStringLength\` cannot exceed ${Oo}, but a value of ${c} was configured. Sentry will use ${Oo} instead.`),c=Oo),typeof s=="string"&&(s=[s]);try{let d=r.event,_=I_(d)?d.target:d;i=ai(_,{keyAttrs:s,maxStringLength:c}),o=ia(_)}catch{i="<unknown>"}if(i.length===0)return;let u={category:`ui.${r.name}`,message:i};o&&(u.data={"ui.component_name":o}),vn(u,{event:r.event,name:r.name,global:r.global})}}function b_(t){return function(n){if(Ye()!==t)return;let r={category:"console",data:{arguments:n.args,logger:"console"},level:Ba(n.level),message:Ji(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${Ji(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;vn(r,{input:n.args,level:n.level})}}function C_(t){return function(n){if(Ye()!==t)return;let{startTimestamp:r,endTimestamp:i}=n,o=n.xhr[sr];if(!r||!i||!o)return;let{method:s,url:c,status_code:u,body:d}=o,_={method:s,url:c,status_code:u},h={xhr:n.xhr,input:d,startTimestamp:r,endTimestamp:i},E={category:"xhr",data:_,type:"http",level:Co(u)};t.emit("beforeOutgoingRequestBreadcrumb",E,h),vn(E,h)}}function w_(t){return function(n){if(Ye()!==t)return;let{startTimestamp:r,endTimestamp:i}=n;if(i&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.fetchData.method,n.fetchData.url,n.error){let o=n.fetchData,s={data:n.error,input:n.args,startTimestamp:r,endTimestamp:i},c={category:"fetch",data:o,level:"error",type:"http"};t.emit("beforeOutgoingRequestBreadcrumb",c,s),vn(c,s)}else{let o=n.response,s=Ee(x({},n.fetchData),{status_code:o?.status});n.fetchData.request_body_size,n.fetchData.response_body_size,o?.status;let c={input:n.args,response:o,startTimestamp:r,endTimestamp:i},u={category:"fetch",data:s,type:"http",level:Co(s.status_code)};t.emit("beforeOutgoingRequestBreadcrumb",u,c),vn(u,c)}}}function S_(t){return function(n){if(Ye()!==t)return;let r=n.from,i=n.to,o=gi(et.location.href),s=r?gi(r):void 0,c=gi(i);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),vn({category:"navigation",data:{from:r,to:i}})}}function I_(t){return!!t&&!!t.target}var T_=["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"],x_="BrowserApiErrors",O_=(t={})=>{let e=x({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1},t);return{name:x_,setupOnce(){e.setTimeout&&ft(et,"setTimeout",$d),e.setInterval&&ft(et,"setInterval",$d),e.requestAnimationFrame&&ft(et,"requestAnimationFrame",A_),e.XMLHttpRequest&&"XMLHttpRequest"in et&&ft(XMLHttpRequest.prototype,"send",D_);let n=e.eventTarget;n&&(Array.isArray(n)?n:T_).forEach(i=>N_(i,e))}}},Gd=O_;function $d(t){return function(...e){let n=e[0];return e[0]=or(n,{mechanism:{data:{function:qt(t)},handled:!1,type:"instrument"}}),t.apply(this,e)}}function A_(t){return function(e){return t.apply(this,[or(e,{mechanism:{data:{function:"requestAnimationFrame",handler:qt(t)},handled:!1,type:"instrument"}})])}}function D_(t){return function(...e){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(i=>{i in n&&typeof n[i]=="function"&&ft(n,i,function(o){let s={mechanism:{data:{function:i,handler:qt(o)},handled:!1,type:"instrument"}},c=ir(o);return c&&(s.mechanism.data.handler=qt(c)),or(o,s)})}),t.apply(this,e)}}function N_(t,e){let r=et[t]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(ft(r,"addEventListener",function(i){return function(o,s,c){try{R_(s)&&(s.handleEvent=or(s.handleEvent,{mechanism:{data:{function:"handleEvent",handler:qt(s),target:t},handled:!1,type:"instrument"}}))}catch{}return e.unregisterOriginalCallbacks&&M_(this,o,s),i.apply(this,[o,or(s,{mechanism:{data:{function:"addEventListener",handler:qt(s),target:t},handled:!1,type:"instrument"}}),c])}}),ft(r,"removeEventListener",function(i){return function(o,s,c){try{let u=s.__sentry_wrapped__;u&&i.call(this,o,u,c)}catch{}return i.call(this,o,s,c)}}))}function R_(t){return typeof t.handleEvent=="function"}function M_(t,e,n){t&&typeof t=="object"&&"removeEventListener"in t&&typeof t.removeEventListener=="function"&&t.removeEventListener(e,n)}var Wd=()=>({name:"BrowserSession",setupOnce(){if(typeof et.document>"u"){Rr&&te.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}fi({ignoreDuration:!0}),pi(),Ei(({from:t,to:e})=>{t!==void 0&&t!==e&&(fi({ignoreDuration:!0}),pi())})}});var P_="GlobalHandlers",L_=(t={})=>{let e=x({onerror:!0,onunhandledrejection:!0},t);return{name:P_,setupOnce(){Error.stackTraceLimit=50},setup(n){e.onerror&&(F_(n),Yd("onerror")),e.onunhandledrejection&&(V_(n),Yd("onunhandledrejection"))}}},zd=L_;function F_(t){qs(e=>{let{stackParser:n,attachStacktrace:r}=Kd();if(Ye()!==t||Ya())return;let{msg:i,url:o,line:s,column:c,error:u}=e,d=U_(So(n,u||i,void 0,r,!1),o,s,c);d.level="error",di(d,{originalException:u,mechanism:{handled:!1,type:"onerror"}})})}function V_(t){Js(e=>{let{stackParser:n,attachStacktrace:r}=Kd();if(Ye()!==t||Ya())return;let i=k_(e),o=nr(i)?B_(i):So(n,i,void 0,r,!0);o.level="error",di(o,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function k_(t){if(nr(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 B_(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}function U_(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=r,_=n,h=Dt(e)&&e.length>0?e:ci();return u.length===0&&u.push({colno:d,filename:h,function:fn,in_app:!0,lineno:_}),t}function Yd(t){Rr&&te.log(`Global Handler attached: ${t}`)}function Kd(){return Ye()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}var Xd=()=>({name:"HttpContext",preprocessEvent(t){if(!et.navigator&&!et.location&&!et.document)return;let e=Nd(),n=x(x({},e.headers),t.request?.headers);t.request=Ee(x(x({},e),t.request),{headers:n})}});var H_="cause",j_=5,$_="LinkedErrors",G_=(t={})=>{let e=t.limit||j_,n=t.key||H_;return{name:$_,preprocessEvent(r,i,o){let s=o.getOptions();Va(wo,s.stackParser,n,e,r,i)}}},qd=G_;function ic(t){return[Eo(),vo(),Gd(),jd(),zd(),qd(),bo(),Xd(),Wd()]}var Zd={},Jd,oc,W_;(()=>{let t=ic({}).filter(e=>!["BrowserApiErrors","Breadcrumbs","GlobalHandlers"].includes(e.name));oc=new yi({dsn:"https://1bc3dda4c861f60cd6be1b67584f4bc6@o559187.ingest.us.sentry.io/4507626484203520",transport:tc,stackParser:rc,integrations:t,environment:Dn.mode,release:`web-sdk@${qe.SDK_VERSION}`,debug:Dn.debug}),oc.init()})();function Do(t,e,n){We.error(`${e}:`,t);let r=Y_(n);r.setTag("operation",e),r.captureException(t)}function Y_(t){t??={};let{extra:e,tags:n}=t,r=new wt;if(r.setClient(oc),r.setUser(W_),t.triggerContext&&!t.engagementTrigger&&(t.engagementTrigger=t.triggerContext.triggerData),t.engagementTrigger){let i=t.engagementTrigger;r.setTags({"engagement.id":i.engagementID,"engagement.short_id":i.shortID,"engagement.objective":i.objective,"engagement.delivery_type":i.onsiteDeliveryType,"engagement.content_id":i.contentID,"engagement.variation":i.variation,"engagement.currency":i.currency})}return e&&r.setExtras(e),n&&r.setTags(n),Jd&&r.setTags(Jd),Object.keys(Zd).forEach(i=>{r.setContext(i,Zd[i])}),r.setTag("language",navigator.language),r.setTag("timezone",Qd()),z_(r),r}function z_(t){window.Shopify&&(t.setTag("shopify.shop",window.Shopify.shop),t.setTag("shopify.currency",window.Shopify.currency?.active),t.setTag("shopify.locale",window.Shopify.locale),t.setTag("theme.schema_name",window.Shopify.theme?.schema_name),t.setTag("theme.schema_version",window.Shopify.theme?.schema_version))}var No=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 Ro=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 Er(e)}};function sc(t,e,n){return{[t]:Fn(e,n),[t+"_wo_currency"]:e}}function Fn(t,e){if(t==0&&e)return"Free";let n=Ro.get(),r=un.get(),i=n.shopCurrencyCode||r.currency,o=n.currencyCode;o||We.warn("Currency code is not set in RuntimeData");let s=r.money?.format??n.moneyFormat,c;if(s&&i===o)c=No.format(t*100,s);else{let u;try{u=new Intl.NumberFormat(K_(),{style:"currency",currency:o||i,minimumFractionDigits:0,maximumFractionDigits:2})}catch(d){return Do(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 K_(){return navigator.languages!==void 0?navigator.languages[0].split("-")[0]:navigator.language??"en"}var Mo;function Qd(){if(Mo)return Mo;try{return Mo=Intl.DateTimeFormat().resolvedOptions().timeZone,Mo}catch{return""}}var yn=class t{transform(e){return e==null?null:Fn(e)}static \u0275fac=function(n){return new(n||t)};static \u0275pipe=ki({name:"cooeeCurrency",type:t,pure:!0})};var Nt=bs(tf());Nt.filters.define("default",function(t){return typeof t>"u"||t==null?"":q_(t)});+Nt.filters.define("max",(t,e)=>{let n=Number(t),r=Number(e);return isNaN(n)||isNaN(r)?t:n>r?e:t});Nt.filters.define("min",(t,e)=>{let n=Number(t),r=Number(e);return isNaN(n)||isNaN(r)?t:n<r?e:t});Nt.filters.define("fallback",(t,e)=>t==null||t===""?e:t);Nt.filters.define("manipulate_quantity",(t,e,n)=>{if(e??=1,n??=100,e>n)return We.error("Invalid range: min should be less than or equal to max."),t;if(t>=e&&t<=n)return t;let r=t%n;return r<e?e:r});Nt.filters.define("apply_discount_perc",(t,e,n=1/0)=>{if(t=+t,isNaN(t))return We.error("Need value as a number for `apply_discount_perc` filter"),NaN;if(e<0||e>100)return We.error("Invalid percent value for `apply_discount_perc` filter. Must be between 0 and 100."),NaN;let r=t*e/100;return t-Math.min(n,r)});Nt.filters.define("apply_discount_fixed",(t,e)=>(t=+t,isNaN(t)?(We.error("Need value as a number for `apply_discount_fixed` filter"),NaN):Math.max(0,t-e)));Nt.filters.define("currency",t=>(t=+t,isNaN(t)?(We.error("Need value as a number for `currency` filter"),NaN):Fn(t)));Nt.defaultConfig.defaultFilter="default";Nt.defaultConfig.useWith=!0;Nt.defaultConfig.autoEscape=!1;var X_={'"':""","\\":"\","\n":"\\n"};function q_(t){return String(t).replace(/["\\\n]/g,e=>X_[e])}function Z_(t){if(!t)return"";let e=/({{{\s*([^}]+?)\s*}}}|{{\s*&\s*([^}]+?)\s*}})/g;return t.replace(e,(n,r,i,o)=>`{{ ${(i||o||"").trim()} }}`)}var Mr=(t,e,n)=>{e=x({discount:{},cart:{},product:{},bundle:{},variant:{},customer:{},svg:{},form:{},amount_left:null},e);try{return Nt.render(Z_(t),e)}catch(r){throw Do(r,"squirrelly-render",{extra:{template:t,values:e},triggerContext:n}),r}};var Lo=class t{transform(e,n){return e?Mr(e,x({},n)):null}static \u0275fac=function(n){return new(n||t)};static \u0275pipe=ki({name:"cooeeDynamicVariables",type:t,pure:!0})};var ac={};(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 v=new OffscreenCanvas(1,1),y=v.getContext("2d");y.fillRect(0,0,1,1);var U=v.transferToImageBitmap();try{y.createPattern(U,"no-repeat")}catch{return!1}return!0}();function u(){}function d(v){var y=n.exports.Promise,U=y!==void 0?y:e.Promise;return typeof U=="function"?new U(v):(v(u,u),null)}var _=function(v,y){return{transform:function(U){if(v)return U;if(y.has(U))return y.get(U);var Z=new OffscreenCanvas(U.width,U.height),ne=Z.getContext("2d");return ne.drawImage(U,0,0),y.set(U,Z),Z},clear:function(){y.clear()}}}(c,new Map),h=function(){var v=Math.floor(16.666666666666668),y,U,Z={},ne=0;return typeof requestAnimationFrame=="function"&&typeof cancelAnimationFrame=="function"?(y=function(ie){var ce=Math.random();return Z[ce]=requestAnimationFrame(function Q(oe){ne===oe||ne+v-1<oe?(ne=oe,delete Z[ce],ie()):Z[ce]=requestAnimationFrame(Q)}),ce},U=function(ie){Z[ie]&&cancelAnimationFrame(Z[ie])}):(y=function(ie){return setTimeout(ie,v)},U=function(ie){return clearTimeout(ie)}),{frame:y,cancel:U}}(),E=function(){var v,y,U={};function Z(ne){function ie(ce,Q){ne.postMessage({options:ce||{},callback:Q})}ne.init=function(Q){var oe=Q.transferControlToOffscreen();ne.postMessage({canvas:oe},[oe])},ne.fire=function(Q,oe,ee){if(y)return ie(Q,null),y;var pe=Math.random().toString(36).slice(2);return y=d(function(se){function he(me){me.data.callback===pe&&(delete U[pe],ne.removeEventListener("message",he),y=null,_.clear(),ee(),se())}ne.addEventListener("message",he),ie(Q,pe),U[pe]=he.bind(null,{data:{callback:pe}})}),y},ne.reset=function(){ne.postMessage({reset:!0});for(var Q in U)U[Q](),delete U[Q]}}return function(){if(v)return v;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(`
|
|
26
|
+
`);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 N(v,y){return y?y(v):v}function k(v){return v!=null}function B(v,y,U){return N(v&&k(v[y])?v[y]:C[y],U)}function X(v){return v<0?0:Math.floor(v)}function J(v,y){return Math.floor(Math.random()*(y-v))+v}function ue(v){return parseInt(v,16)}function q(v){return v.map(Ae)}function Ae(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:ue(y.substring(0,2)),g:ue(y.substring(2,4)),b:ue(y.substring(4,6))}}function H(v){var y=B(v,"origin",Object);return y.x=B(y,"x",Number),y.y=B(y,"y",Number),y}function _e(v){v.width=document.documentElement.clientWidth,v.height=document.documentElement.clientHeight}function de(v){var y=v.getBoundingClientRect();v.width=y.width,v.height=y.height}function ye(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 Ve(v,y,U,Z,ne,ie,ce,Q,oe){v.save(),v.translate(y,U),v.rotate(ie),v.scale(Z,ne),v.arc(0,0,1,ce,Q,oe),v.restore()}function De(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 Le(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,ce=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(O(y.shape.path,y.shape.matrix,y.x,y.y,Math.abs(ie-Z)*.1,Math.abs(ce-ne)*.1,Math.PI/10*y.wobble));else if(y.shape.type==="bitmap"){var Q=Math.PI/10*y.wobble,oe=Math.abs(ie-Z)*.1,ee=Math.abs(ce-ne)*.1,pe=y.shape.bitmap.width*y.scalar,se=y.shape.bitmap.height*y.scalar,he=new DOMMatrix([Math.cos(Q)*oe,Math.sin(Q)*oe,-Math.sin(Q)*ee,Math.cos(Q)*ee,y.x,y.y]);he.multiplySelf(new DOMMatrix(y.shape.matrix));var me=v.createPattern(_.transform(y.shape.bitmap),"no-repeat");me.setTransform(he),v.globalAlpha=1-U,v.fillStyle=me,v.fillRect(y.x-pe/2,y.y-se/2,pe,se),v.globalAlpha=1}else if(y.shape==="circle")v.ellipse?v.ellipse(y.x,y.y,Math.abs(ie-Z)*y.ovalScalar,Math.abs(ce-ne)*y.ovalScalar,Math.PI/10*y.wobble,0,2*Math.PI):Ve(v,y.x,y.y,Math.abs(ie-Z)*y.ovalScalar,Math.abs(ce-ne)*y.ovalScalar,Math.PI/10*y.wobble,0,2*Math.PI);else if(y.shape==="star")for(var ge=Math.PI/2*3,p=4*y.scalar,a=8*y.scalar,l=y.x,g=y.y,I=5,D=Math.PI/I;I--;)l=y.x+Math.cos(ge)*a,g=y.y+Math.sin(ge)*a,v.lineTo(l,g),ge+=D,l=y.x+Math.cos(ge)*p,g=y.y+Math.sin(ge)*p,v.lineTo(l,g),ge+=D;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(ce)),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(),ce=v.getContext("2d"),Q,oe,ee=d(function(pe){function se(){Q=oe=null,ce.clearRect(0,0,Z.width,Z.height),_.clear(),ne(),pe()}function he(){r&&!(Z.width===i.width&&Z.height===i.height)&&(Z.width=v.width=i.width,Z.height=v.height=i.height),!Z.width&&!Z.height&&(U(v),Z.width=v.width,Z.height=v.height),ce.clearRect(0,0,Z.width,Z.height),ie=ie.filter(function(me){return Le(ce,me)}),ie.length?Q=h.frame(he):se()}Q=h.frame(he),oe=se});return{addFettis:function(pe){return ie=ie.concat(pe),ee},canvas:v,promise:ee,reset:function(){Q&&h.cancel(Q),oe&&oe()}}}function ze(v,y){var U=!v,Z=!!B(y||{},"resize"),ne=!1,ie=B(y,"disableForReducedMotion",Boolean),ce=o&&!!B(y||{},"useWorker"),Q=ce?E():null,oe=U?_e:de,ee=v&&Q?!!v.__confetti_initialized:!1,pe=typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion)").matches,se;function he(ge,p,a){for(var l=B(ge,"particleCount",X),g=B(ge,"angle",Number),I=B(ge,"spread",Number),D=B(ge,"startVelocity",Number),F=B(ge,"decay",Number),ve=B(ge,"gravity",Number),Ie=B(ge,"drift",Number),Ce=B(ge,"colors",q),ke=B(ge,"ticks",Number),Be=B(ge,"shapes"),Ze=B(ge,"scalar"),Vt=!!B(ge,"flat"),Gt=H(ge),Cn=l,St=[],kt=v.width*Gt.x,Ri=v.height*Gt.y;Cn--;)St.push(De({x:kt,y:Ri,angle:g,spread:I,startVelocity:D,color:Ce[Cn%Ce.length],shape:Be[J(0,Be.length)],ticks:ke,decay:F,gravity:ve,drift:Ie,scalar:Ze,flat:Vt}));return se?se.addFettis(St):(se=Ge(v,St,oe,p,a),se.promise)}function me(ge){var p=ie||B(ge,"disableForReducedMotion",Boolean),a=B(ge,"zIndex",Number);if(p&&pe)return d(function(D){D()});U&&se?v=se.canvas:U&&!v&&(v=ye(a),document.body.appendChild(v)),Z&&!ee&&oe(v);var l={width:v.width,height:v.height};Q&&!ee&&Q.init(v),ee=!0,Q&&(v.__confetti_initialized=!0);function g(){if(Q){var D={getBoundingClientRect:function(){if(!U)return v.getBoundingClientRect()}};oe(D),Q.postMessage({resize:{width:D.width,height:D.height}});return}l.width=l.height=null}function I(){se=null,Z&&(ne=!1,e.removeEventListener("resize",g)),U&&v&&(document.body.contains(v)&&document.body.removeChild(v),v=null,ee=!1)}return Z&&!ne&&(ne=!0,e.addEventListener("resize",g,!1)),Q?Q.fire(ge,l,I):he(ge,l,I)}return me.reset=function(){Q&&Q.reset(),se&&se.reset()},me}var gt;function A(){return gt||(gt=ze(null,{useWorker:!0,resize:!0})),gt}function O(v,y,U,Z,ne,ie,ce){var Q=new Path2D(v),oe=new Path2D;oe.addPath(Q,new DOMMatrix(y));var ee=new Path2D;return ee.addPath(oe,new DOMMatrix([Math.cos(ce)*ne,Math.sin(ce)*ne,-Math.sin(ce)*ie,Math.cos(ce)*ie,U,Z])),ee}function L(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 ce=1e3,Q=ce,oe=ce,ee=0,pe=0,se,he,me=0;me<ce;me+=2)for(var ge=0;ge<ce;ge+=2)ie.isPointInPath(Z,me,ge,"nonzero")&&(Q=Math.min(Q,me),oe=Math.min(oe,ge),ee=Math.max(ee,me),pe=Math.max(pe,ge));se=ee-Q,he=pe-oe;var p=10,a=Math.min(p/se,p/he);U=[a,0,0,a,-Math.round(se/2+Q)*a,-Math.round(he/2+oe)*a]}return{type:"path",path:y,matrix:U}}function M(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,ce=""+ie+"px "+ne,Q=new OffscreenCanvas(ie,ie),oe=Q.getContext("2d");oe.font=ce;var ee=oe.measureText(y),pe=Math.ceil(ee.actualBoundingBoxRight+ee.actualBoundingBoxLeft),se=Math.ceil(ee.actualBoundingBoxAscent+ee.actualBoundingBoxDescent),he=2,me=ee.actualBoundingBoxLeft+he,ge=ee.actualBoundingBoxAscent+he;pe+=he+he,se+=he+he,Q=new OffscreenCanvas(pe,se),oe=Q.getContext("2d"),oe.font=ce,oe.fillStyle=Z,oe.fillText(y,me,ge);var p=1/U;return{type:"bitmap",bitmap:Q.transferToImageBitmap(),matrix:[p,0,0,p,-pe*p/2,-se*p/2]}}n.exports=function(){return A().apply(this,arguments)},n.exports.reset=function(){A().reset()},n.exports.create=ze,n.exports.shapeFromPath=L,n.exports.shapeFromText=M})(function(){return typeof window<"u"?window:typeof self<"u"?self:this||{}}(),ac,!1);var nf=ac.exports,JO=ac.exports.create;var Fo=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 nf(e)}static async realisticFire(e,n){let i={origin:{y:.7}};await this.fire(Object.assign({},i,n,{particleCount:Math.floor(200*e)}))}};var J_=(t,e)=>e.minValue;function Q_(t,e){if(t&1&&(be(0,"div",7),Je(1,"safeHtml")),t&2){let n=K().$implicit;le("innerHTML",ot(1,1,n.minValue+" Products"),bt)}}function ev(t,e){if(t&1&&(be(0,"div",7),Je(1,"cooeeCurrency"),Je(2,"safeHtml")),t&2){let n=K().$implicit;le("innerHTML",ot(2,3,ot(1,1,n.minValue)),bt)}}function tv(t,e){if(t&1&&(G(0,"li",6)(1,"div"),xe(2,Q_,2,3,"div",7)(3,ev,3,5,"div",7),be(4,"img",8),G(5,"div",9),Oe(6),W()()()),t&2){let n=e.$implicit,r=K(2);ti("left",n.calculatedAlignment+"%"),P(2),Se((r.progressBarConfig==null?null:r.progressBarConfig.rewardBasis)===r.RewardBasis.ITEM_COUNT?2:3),P(2),le("src",r.getIconURL(n),ut),P(2),ln(n.label)}}function nv(t,e){if(t&1&&(lt(0)(1),be(2,"div",0),Je(3,"cooeeDynamicVariables"),Je(4,"safeHtml"),G(5,"div",1)(6,"ul",2)(7,"div",3),be(8,"div",4),W(),rt(9,tv,7,5,"li",5,J_),W()()),t&2){let n=K(),r=n.calculatedState(),i=r.nextMilestone?r.nextMilestone.reachingText:r.lastMilestone.reachedText;P(2),le("innerHTML",ot(4,6,Ll(3,3,i,n.localDynamicVariables())),bt),P(6),ti("width",r.cartValuePercentage+"%"),P(),it(r.milestones)}}var Vo=class t extends Kt{cart;localDynamicVariables=Lt({});calculatedState=Lt({});progressBarConfig;RewardBasis=Us;constructor(){super()}engagementTriggerReceived(e){this.progressBarConfig=e.progressBarConfig}ngOnInit(){super.ngOnInit(),this.calculateMilestonesSilently()}update(){this.calculateMilestonesSilently()}getIconURL(e){return e.rewardType===oi.FREE_SHIPPING?"https://img.icons8.com/ios-filled/50/FFFFFF/free-shipping.png":e.rewardType===oi.DISCOUNT?"https://img.icons8.com/ios-glyphs/30/FFFFFF/sale-price-tag.png":e.rewardType===oi.FREE_AUTO_GIFT?"https://img.icons8.com/ios-filled/50/FFFFFF/gift--v1.png":""}calculateMilestonesSilently(){this.calculateMilestones().catch(e=>We.error(e))}async calculateMilestones(){let e=this.engagementTrigger,n=this.progressBarConfig;if(!n?.milestones?.length){We.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;We.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=Fn(u.minValue-o);if(n.rewardBasis==="ITEM_COUNT"){let _=u.minValue-o;d=`${_} ${_===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||Fo.realistic())}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Me({type:t,selectors:[["cooee-progressbar"]],inputs:{cart:"cart"},features:[Ct],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&&xe(0,nv,11,8),n&2&&Se(r.calculatedState().milestonesReady?0:-1)},dependencies:[Lo,Un,yn],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))}
|
|
27
|
+
`],encapsulation:3})};var rv=["numberVariable"],ko=class t extends Kt{numberSlot;savingsBarConfig;textParts=Lt({start:"",end:""});globalIntervals=[];constructor(){super()}ngAfterViewInit(){this.updateUIVars()}engagementTriggerReceived(e){this.savingsBarConfig=e.content.savingsBarConfig,this.elementRef.nativeElement.classList.add("lc_"+e.entryAnimation?.toLowerCase()),this.savingsBarConfig.iconURL&&this.elementRef.nativeElement.style.setProperty("--lc-discount-icon",this.savingsBarConfig.iconURL)}update(){this.updateUIVars()}updateUIVars(){let e=x(x({},this.engagementTrigger.getCartMagicVariables()),sc("total_savings",this.savingsBarConfig.totalSavings)),n=Mr(this.savingsBarConfig.text,{cart:e},this.triggerContext),r=n.match(/[\d.,]+/)?.[0];if(!r){We.error("No amount found in text",n);return}let[i,o]=n.split(r);this.textParts.set({start:i,end:o}),this.savingsBarConfig.animateNumber?this.runAnimation(r):this.numberSlot.nativeElement.innerHTML=r}runSlotMachineAnimation(e="0"){let n=this.numberSlot.nativeElement;n.innerHTML="";let r=this.savingsBarConfig.animationDuration/e.length;this.clearPreviousIntervals();for(let i=0;i<e.length;i++){let o=document.createElement("div");o.className="digit",o.style.display="inline-block",n.appendChild(o);let s=setInterval(()=>{let c=Math.floor(Math.random()*10);o.innerHTML=`<div>${c}</div>`},50);this.globalIntervals.push(s),setTimeout(()=>{clearInterval(s);let c=e?.[i]??Math.floor(Math.random()*10);o.innerHTML=`${c}`},(i+1)*r)}}clearPreviousIntervals(){this.globalIntervals.forEach(clearInterval),this.globalIntervals=[]}runIncrementalAnimation(e){let n=performance.now(),r=i=>{let o=Math.min((i-n)/this.savingsBarConfig.animationDuration,1);this.numberSlot.nativeElement.innerHTML=Math.floor(e*o).toString(),o<1&&requestAnimationFrame(r)};requestAnimationFrame(r)}runAnimation(e){this.savingsBarConfig.animation==="SLOT_MACHINE"?this.runSlotMachineAnimation(e):this.savingsBarConfig.animation==="INCREMENTAL"&&this.runIncrementalAnimation(Number(e))}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Me({type:t,selectors:[["cooee-savings-bar"]],viewQuery:function(n,r){if(n&1&&In(rv,5),n&2){let i;Tn(i=xn())&&(r.numberSlot=i.first)}},features:[Ct],decls:6,vars:2,consts:[["numberVariable",""],[1,"container"],[1,"icon"],[1,"primary-text",3,"innerHTML"],[1,"counter-text"],[1,"final-text",3,"innerHTML"]],template:function(n,r){n&1&&(G(0,"div",1),be(1,"div",2)(2,"div",3)(3,"div",4,0)(5,"div",5),W()),n&2&&(P(2),le("innerHTML",r.textParts().start,bt),P(3),le("innerHTML",r.textParts().end,bt))},styles:[`:host{display:block}.container{white-space:pre;display:flex;justify-content:center;align-items:center;background-color:rgb(var(--lc-color-button, 0 162 81));color:rgb(var(--lc-color-button-text, 255 255 255));padding:8px;border-radius:4px 4px 0 0;overflow:hidden}.container .icon{background-image:var(--lc-discount-icon, url(https://img.icons8.com/ios-glyphs/30/FFFFFF/discount--v1.png));background-position:center;background-size:cover;height:20px;width:20px;margin-right:2px}
|
|
28
|
+
`],encapsulation:3})};var iv=(t,e)=>({enter:t,exit:e});function ov(t,e){if(t&1&&(G(0,"div",7),Oe(1),W(),G(2,"div",8),Oe(3),W()),t&2){let n=K(2);P(),Tt(" ",n.getCurrency(n.selectedVariant().price.cmp)," "),P(2),Tt(" ",n.getDiscountPercentage(n.selectedVariant().price),"% off ")}}function sv(t,e){if(t&1&&(G(0,"div",6),Oe(1),W()),t&2){let n=K(2);P(),Tt(" ",n.stickyATCConfig.leftText," ")}}function av(t,e){if(t&1&&(G(0,"div",1)(1,"div",5),Oe(2),W(),xe(3,ov,4,2)(4,sv,2,1,"div",6),W()),t&2){let n=K();P(2),Tt(" ",n.getCurrency(n.selectedVariant().price.d)," "),P(),Se(n.selectedVariant().price.cmp?3:-1),P(),Se(n.stickyATCConfig.leftText?4:-1)}}function cv(t,e){if(t&1&&(G(0,"div",9),Oe(1),W()),t&2){let n=e.$implicit,r=e.$index;K(2);let i=Xe(5);le("ngClass",Hi(2,iv,r===i.currentIndex,r===i.previousIndex)),P(),Tt(" ",n," ")}}function lv(t,e){if(t&1&&(G(0,"div",4),rt(1,cv,2,5,"div",9,wn),W()),t&2){K();let n=Xe(5);P(),it(n.features)}}var Bo=class t extends Kt{currentItem;stickyATCConfig;selectedVariant=Lt(void 0);featureSlider=Lt({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 Fn(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(`
|
|
29
|
+
`),n=e.length===1?null:setInterval(()=>{this.featureSlider.update(r=>Ee(x({},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?Mr(e,this.currentItem.getTemplateVariables(),this.triggerContext):""}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Me({type:t,selectors:[["cooee-sticky-atc"]],features:[Ct],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=Ke();G(0,"div",0),xe(1,av,5,3,"div",1),G(2,"div",2)(3,"button",3),Pe("click",function(){return Ne(i),Re(r.addToCart())}),Oe(4,"Add To Cart"),W(),lt(5),xe(6,lv,3,0,"div",4),W()()}if(n&2){P(),Se(r.selectedVariant()&&r.stickyATCConfig.showProductInfo?1:-1),P(4);let i=vt(r.featureSlider());P(),Se(i.features.length?6:-1)}},dependencies:[Bn],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 cf,je,lf,fc,ar,rf,uf,df,ff,pc,lc,uc,uv,dc={},pf=[],dv=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,jo=Array.isArray;function Vn(t,e){for(var n in e)t[n]=e[n];return t}function hc(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function cc(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??++lf,__i:-1,__u:0};return i==null&&je.vnode!=null&&je.vnode(o),o}function mc(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 hf(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 hf(t)}}function of(t){(!t.__d&&(t.__d=!0)&&ar.push(t)&&!Ho.__r++||rf!=je.debounceRendering)&&((rf=je.debounceRendering)||uf)(Ho)}function Ho(){for(var t,e,n,r,i,o,s,c=1;ar.length;)ar.length>c&&ar.sort(df),t=ar.shift(),c=ar.length,t.__d&&(n=void 0,i=(r=(e=t).__v).__e,o=[],s=[],e.__P&&((n=Vn({},r)).__v=r.__v+1,je.vnode&&je.vnode(n),_f(e.__P,n,r,e.__n,e.__P.namespaceURI,32&r.__u?[i]:null,o,i??Lr(r),!!(32&r.__u),s),n.__v=r.__v,n.__.__k[n.__i]=n,hv(o,n,s),n.__e!=i&&hf(n)));Ho.__r=0}function mf(t,e,n,r,i,o,s,c,u,d,_){var h,E,C,N,k,B,X=r&&r.__k||pf,J=e.length;for(u=fv(n,e,X,u,J),h=0;h<J;h++)(C=n.__k[h])!=null&&(E=C.__i==-1?dc:X[C.__i]||dc,C.__i=h,B=_f(t,C,E,i,o,s,c,u,d,_),N=C.__e,C.ref&&E.ref!=C.ref&&(E.ref&&gc(E.ref,null,C),_.push(C.ref,C.__c||N,C)),k==null&&N!=null&&(k=N),4&C.__u||E.__k===C.__k?u=gf(C,u,t):typeof C.type=="function"&&B!==void 0?u=B:N&&(u=N.nextSibling),C.__u&=-7);return n.__e=k,u}function fv(t,e,n,r,i){var o,s,c,u,d,_=n.length,h=_,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?cc(null,s,null,null,null):jo(s)?cc(mc,{children:s},null,null,null):s.constructor==null&&s.__b>0?cc(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=pv(s,n,u,h))!=-1&&(h--,(c=n[d])&&(c.__u|=2)),c==null||c.__v==null?(d==-1&&(i>_?E--:i<_&&E++),typeof s.type!="function"&&(s.__u|=4)):d!=u&&(d==u-1?E--:d==u+1?E++:(d>u?E--:E++,s.__u|=4))):t.__k[o]=null;if(h)for(o=0;o<_;o++)(c=n[o])!=null&&(2&c.__u)==0&&(c.__e==r&&(r=Lr(c)),yf(c,c));return r}function gf(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=gf(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 pv(t,e,n,r){var i,o,s=t.key,c=t.type,u=e[n];if(u===null&&t.key==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 sf(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||dv.test(e)?n:n+"px"}function Uo(t,e,n,r,i){var o,s;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||sf(t.style,e,"");if(n)for(e in n)r&&n[e]==r[e]||sf(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")o=e!=(e=e.replace(ff,"$1")),s=e.toLowerCase(),e=s in t||e=="onFocusOut"||e=="onFocusIn"?s.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+o]=n,n?r?n.u=r.u:(n.u=pc,t.addEventListener(e,o?uc:lc,o)):t.removeEventListener(e,o?uc:lc,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 af(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=pc++;else if(e.t<n.u)return;return n(je.event?je.event(e):e)}}}function _f(t,e,n,r,i,o,s,c,u,d){var _,h,E,C,N,k,B,X,J,ue,q,Ae,H,_e,de,ye,Ve,De=e.type;if(e.constructor!=null)return null;128&n.__u&&(u=!!(32&n.__u),o=[c=e.__e=n.__e]),(_=je.__b)&&_(e);e:if(typeof De=="function")try{if(X=e.props,J="prototype"in De&&De.prototype.render,ue=(_=De.contextType)&&r[_.__c],q=_?ue?ue.props.value:_.__:r,n.__c?B=(h=e.__c=n.__c).__=h.__E:(J?e.__c=h=new De(X,q):(e.__c=h=new Pr(X,q),h.constructor=De,h.render=gv),ue&&ue.sub(h),h.props=X,h.state||(h.state={}),h.context=q,h.__n=r,E=h.__d=!0,h.__h=[],h._sb=[]),J&&h.__s==null&&(h.__s=h.state),J&&De.getDerivedStateFromProps!=null&&(h.__s==h.state&&(h.__s=Vn({},h.__s)),Vn(h.__s,De.getDerivedStateFromProps(X,h.__s))),C=h.props,N=h.state,h.__v=e,E)J&&De.getDerivedStateFromProps==null&&h.componentWillMount!=null&&h.componentWillMount(),J&&h.componentDidMount!=null&&h.__h.push(h.componentDidMount);else{if(J&&De.getDerivedStateFromProps==null&&X!==C&&h.componentWillReceiveProps!=null&&h.componentWillReceiveProps(X,q),!h.__e&&h.shouldComponentUpdate!=null&&h.shouldComponentUpdate(X,h.__s,q)===!1||e.__v==n.__v){for(e.__v!=n.__v&&(h.props=X,h.state=h.__s,h.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(Le){Le&&(Le.__=e)}),Ae=0;Ae<h._sb.length;Ae++)h.__h.push(h._sb[Ae]);h._sb=[],h.__h.length&&s.push(h);break e}h.componentWillUpdate!=null&&h.componentWillUpdate(X,h.__s,q),J&&h.componentDidUpdate!=null&&h.__h.push(function(){h.componentDidUpdate(C,N,k)})}if(h.context=q,h.props=X,h.__P=t,h.__e=!1,H=je.__r,_e=0,J){for(h.state=h.__s,h.__d=!1,H&&H(e),_=h.render(h.props,h.state,h.context),de=0;de<h._sb.length;de++)h.__h.push(h._sb[de]);h._sb=[]}else do h.__d=!1,H&&H(e),_=h.render(h.props,h.state,h.context),h.state=h.__s;while(h.__d&&++_e<25);h.state=h.__s,h.getChildContext!=null&&(r=Vn(Vn({},r),h.getChildContext())),J&&!E&&h.getSnapshotBeforeUpdate!=null&&(k=h.getSnapshotBeforeUpdate(C,N)),ye=_,_!=null&&_.type===mc&&_.key==null&&(ye=vf(_.props.children)),c=mf(t,jo(ye)?ye:[ye],e,n,r,i,o,s,c,u,d),h.base=e.__e,e.__u&=-161,h.__h.length&&s.push(h),B&&(h.__E=h.__=null)}catch(Le){if(e.__v=null,u||o!=null)if(Le.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(Ve=o.length;Ve--;)hc(o[Ve]);else e.__e=n.__e,e.__k=n.__k;je.__e(Le,e,n)}else o==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):c=e.__e=mv(n.__e,e,n,r,i,o,s,u,d);return(_=je.diffed)&&_(e),128&e.__u?void 0:c}function hv(t,e,n){for(var r=0;r<n.length;r++)gc(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 vf(t){return typeof t!="object"||t==null||t.__b&&t.__b>0?t:jo(t)?t.map(vf):Vn({},t)}function mv(t,e,n,r,i,o,s,c,u){var d,_,h,E,C,N,k,B=n.props,X=e.props,J=e.type;if(J=="svg"?i="http://www.w3.org/2000/svg":J=="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==!!J&&(J?C.localName==J:C.nodeType==3)){t=C,o[d]=null;break}}if(t==null){if(J==null)return document.createTextNode(X);t=document.createElementNS(i,J,X.is&&X),c&&(je.__m&&je.__m(e,o),c=!1),o=null}if(J==null)B===X||c&&t.data==X||(t.data=X);else{if(o=o&&cf.call(t.childNodes),B=n.props||dc,!c&&o!=null)for(B={},d=0;d<t.attributes.length;d++)B[(C=t.attributes[d]).name]=C.value;for(d in B)if(C=B[d],d!="children"){if(d=="dangerouslySetInnerHTML")h=C;else if(!(d in X)){if(d=="value"&&"defaultValue"in X||d=="checked"&&"defaultChecked"in X)continue;Uo(t,d,null,C,i)}}for(d in X)C=X[d],d=="children"?E=C:d=="dangerouslySetInnerHTML"?_=C:d=="value"?N=C:d=="checked"?k=C:c&&typeof C!="function"||B[d]===C||Uo(t,d,C,B[d],i);if(_)c||h&&(_.__html==h.__html||_.__html==t.innerHTML)||(t.innerHTML=_.__html),e.__k=[];else if(h&&(t.innerHTML=""),mf(e.type=="template"?t.content:t,jo(E)?E:[E],e,n,r,J=="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--;)hc(o[d]);c||(d="value",J=="progress"&&N==null?t.removeAttribute("value"):N!=null&&(N!==t[d]||J=="progress"&&!N||J=="option"&&N!=B[d])&&Uo(t,d,N,B[d],i),d="checked",k!=null&&k!=t[d]&&Uo(t,d,k,B[d],i))}return t}function gc(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 yf(t,e,n){var r,i;if(je.unmount&&je.unmount(t),(r=t.ref)&&(r.current&&r.current!=t.__e||gc(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]&&yf(r[i],e,n||typeof t.type!="function");n||hc(t.__e),t.__c=t.__=t.__e=void 0}function gv(t,e,n){return this.constructor(t,n)}cf=pf.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}},lf=0,fc=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=Vn({},this.state),typeof t=="function"&&(t=t(Vn({},n),this.props)),t&&Vn(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),of(this))},Pr.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),of(this))},Pr.prototype.render=mc,ar=[],uf=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,df=function(t,e){return t.__v.__b-e.__v.__b},Ho.__r=0,ff=/(PointerCapture)$|Capture$/i,pc=0,lc=af(!1),uc=af(!0),uv=0;var vc,$t,_c,Ef,bf=0,Af=[],mt=je,Cf=mt.__b,wf=mt.__r,Sf=mt.diffed,If=mt.__c,Tf=mt.unmount,xf=mt.__;function _v(t,e){mt.__h&&mt.__h($t,t,bf||e),bf=0;var n=$t.__H||($t.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function Ec(t,e){var n=_v(vc++,7);return Ev(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function vv(){for(var t;t=Af.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach($o),t.__H.__h.forEach(yc),t.__H.__h=[]}catch(e){t.__H.__h=[],mt.__e(e,t.__v)}}mt.__b=function(t){$t=null,Cf&&Cf(t)},mt.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),xf&&xf(t,e)},mt.__r=function(t){wf&&wf(t),vc=0;var e=($t=t.__c).__H;e&&(_c===$t?(e.__h=[],$t.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(e.__h.forEach($o),e.__h.forEach(yc),e.__h=[],vc=0)),_c=$t},mt.diffed=function(t){Sf&&Sf(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(Af.push(e)!==1&&Ef===mt.requestAnimationFrame||((Ef=mt.requestAnimationFrame)||yv)(vv)),e.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),_c=$t=null},mt.__c=function(t,e){e.some(function(n){try{n.__h.forEach($o),n.__h=n.__h.filter(function(r){return!r.__||yc(r)})}catch(r){e.some(function(i){i.__h&&(i.__h=[])}),e=[],mt.__e(r,n.__v)}}),If&&If(t,e)},mt.unmount=function(t){Tf&&Tf(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{$o(r)}catch(i){e=i}}),n.__H=void 0,e&&mt.__e(e,n.__v))};var Of=typeof requestAnimationFrame=="function";function yv(t){var e,n=function(){clearTimeout(r),Of&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,35);Of&&(e=requestAnimationFrame(n))}function $o(t){var e=$t,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),$t=e}function yc(t){var e=$t;t.__c=t.__(),$t=e}function Ev(t,e){return!t||t.length!==e.length||e.some(function(n,r){return n!==t[r]})}var bv=Symbol.for("preact-signals");function Cc(){if(Fr>1)Fr--;else{for(var t,e=!1;bi!==void 0;){var n=bi;for(bi=void 0,bc++;n!==void 0;){var r=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&Nf(n))try{n.c()}catch(i){e||(t=i,e=!0)}n=r}}if(bc=0,Fr--,e)throw t}}var $e=void 0;var bi=void 0,Fr=0,bc=0,Go=0;function Df(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 yt(t){this.v=t,this.i=0,this.n=void 0,this.t=void 0}yt.prototype.brand=bv;yt.prototype.h=function(){return!0};yt.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)};yt.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)}};yt.prototype.subscribe=function(t){var e=this;return Wo(function(){var n=e.value,r=$e;$e=void 0;try{t(n)}finally{$e=r}})};yt.prototype.valueOf=function(){return this.value};yt.prototype.toString=function(){return this.value+""};yt.prototype.toJSON=function(){return this.value};yt.prototype.peek=function(){var t=$e;$e=void 0;try{return this.value}finally{$e=t}};Object.defineProperty(yt.prototype,"value",{get:function(){var t=Df(this);return t!==void 0&&(t.i=this.i),this.v},set:function(t){if(t!==this.v){if(bc>100)throw new Error("Cycle detected");this.v=t,this.i++,Go++,Fr++;try{for(var e=this.t;e!==void 0;e=e.x)e.t.N()}finally{Cc()}}}});function Ci(t){return new yt(t)}function Nf(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 Rf(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 Mf(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 Vr(t){yt.call(this,void 0),this.x=t,this.s=void 0,this.g=Go-1,this.f=4}(Vr.prototype=new yt).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Go))return!0;if(this.g=Go,this.f|=1,this.i>0&&!Nf(this))return this.f&=-2,!0;var t=$e;try{Rf(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,Mf(this),this.f&=-2,!0};Vr.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)}yt.prototype.S.call(this,t)};Vr.prototype.U=function(t){if(this.t!==void 0&&(yt.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)}};Vr.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(Vr.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var t=Df(this);if(this.h(),t!==void 0&&(t.i=this.i),16&this.f)throw this.v;return this.v}});function Pf(t){return new Vr(t)}function Lf(t){var e=t.u;if(t.u=void 0,typeof e=="function"){Fr++;var n=$e;$e=void 0;try{e()}catch(r){throw t.f&=-2,t.f|=8,wc(t),r}finally{$e=n,Cc()}}}function wc(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 Cv(t){if($e!==this)throw new Error("Out-of-order effect");Mf(this),$e=t,this.f&=-2,8&this.f&&wc(this),Cc()}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),Rf(this),Fr++;var t=$e;return $e=this,Cv.bind(this,t)};wi.prototype.N=function(){2&this.f||(this.f|=2,this.o=bi,bi=this)};wi.prototype.d=function(){this.f|=8,1&this.f||wc(this)};function Wo(t){var e=new wi(t);try{e.c()}catch(n){throw e.d(),n}return e.d.bind(e)}var Ic,Sc;function kr(t,e){je[t]=e.bind(null,je[t]||function(){})}function Yo(t){Sc&&Sc(),Sc=t&&t.S()}function Ff(t){var e=this,n=t.data,r=Sv(n);r.value=n;var i=Ec(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(),fc(u)||((s=e.base)==null?void 0:s.nodeType)!==3?(e.__$f|=1,e.setState({})):e.base.data=u},Pf(function(){var s=r.value.value;return s===0?0:s===!0?"":s||""})},[]);return i.value}Ff.displayName="_st";Object.defineProperties(yt.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:Ff},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}});kr("__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 yt&&(n||(e.__np=n={}),n[i]=o,r[i]=o.peek())}}t(e)});kr("__r",function(t,e){Yo();var n,r=e.__c;r&&(r.__$f&=-2,(n=r.__$u)===void 0&&(r.__$u=n=function(i){var o;return Wo(function(){o=this}),o.c=function(){r.__$f|=1,r.setState({})},o}())),Ic=r,Yo(n),t(e)});kr("__e",function(t,e,n,r){Yo(),Ic=void 0,t(e,n,r)});kr("diffed",function(t,e){Yo(),Ic=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],_=r[u];d===void 0?(d=wv(n,u,_,i),o[u]=d):d.o(_,i)}}}t(e)});function wv(t,e,n,r){var i=e in t&&t.ownerSVGElement===void 0,o=Ci(n);return{o:function(s,c){o.value=s,r=c},d:Wo(function(){var s=o.value.value;r[e]!==s&&(r[e]=s,i?t[e]=s:s?t.setAttribute(e,s):t.removeAttribute(e))})}}kr("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)});kr("__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 Sv(t){return Ec(function(){return Ci(t)},[])}var Tc=(i=>(i.SIMPLE="SIMPLE",i.SWIPER="SWIPER",i.STORY="STORY",i.FLOATING_POPUP="FLOATING_POPUP",i))(Tc||{}),xc=(r=>(r.ON="ON",r.OFF="OFF",r.ON_HOVER="ON_HOVER",r))(xc||{}),Si=(r=>(r.FIRST_ITEM="FIRST_ITEM",r.CARD="CARD",r.NONE="NONE",r))(Si||{});function Iv(t,e){return e={exports:{}},t(e,e.exports),e.exports}var Tv=Dv,xv=Rv,Ov=Lv,bn=[],en=[],Av=typeof Uint8Array<"u"?Uint8Array:Array,Oc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(cr=0,Vf=Oc.length;cr<Vf;++cr)bn[cr]=Oc[cr],en[Oc.charCodeAt(cr)]=cr;var cr,Vf;en[45]=62;en[95]=63;function Qf(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 Dv(t){var e=Qf(t),n=e[0],r=e[1];return(n+r)*3/4-r}function Nv(t,e,n){return(e+n)*3/4-n}function Rv(t){var e,n=Qf(t),r=n[0],i=n[1],o=new Av(Nv(t,r,i)),s=0,c=i>0?r-4:r,u;for(u=0;u<c;u+=4)e=en[t.charCodeAt(u)]<<18|en[t.charCodeAt(u+1)]<<12|en[t.charCodeAt(u+2)]<<6|en[t.charCodeAt(u+3)],o[s++]=e>>16&255,o[s++]=e>>8&255,o[s++]=e&255;return i===2&&(e=en[t.charCodeAt(u)]<<2|en[t.charCodeAt(u+1)]>>4,o[s++]=e&255),i===1&&(e=en[t.charCodeAt(u)]<<10|en[t.charCodeAt(u+1)]<<4|en[t.charCodeAt(u+2)]>>2,o[s++]=e>>8&255,o[s++]=e&255),o}function Mv(t){return bn[t>>18&63]+bn[t>>12&63]+bn[t>>6&63]+bn[t&63]}function Pv(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(Mv(r));return i.join("")}function Lv(t){for(var e,n=t.length,r=n%3,i=[],o=16383,s=0,c=n-r;s<c;s+=o)i.push(Pv(t,s,s+o>c?c:s+o));return r===1?(e=t[n-1],i.push(bn[e>>2]+bn[e<<4&63]+"==")):r===2&&(e=(t[n-2]<<8)+t[n-1],i.push(bn[e>>10]+bn[e>>4&63]+bn[e<<2&63]+"=")),i.join("")}var Ac={byteLength:Tv,toByteArray:xv,fromByteArray:Ov};var Fv=function(e,n,r,i,o){var s,c,u=o*8-i-1,d=(1<<u)-1,_=d>>1,h=-7,E=r?o-1:0,C=r?-1:1,N=e[n+E];for(E+=C,s=N&(1<<-h)-1,N>>=-h,h+=u;h>0;s=s*256+e[n+E],E+=C,h-=8);for(c=s&(1<<-h)-1,s>>=-h,h+=i;h>0;c=c*256+e[n+E],E+=C,h-=8);if(s===0)s=1-_;else{if(s===d)return c?NaN:(N?-1:1)*(1/0);c=c+Math.pow(2,i),s=s-_}return(N?-1:1)*c*Math.pow(2,s-i)},Vv=function(e,n,r,i,o,s){var c,u,d,_=s*8-o-1,h=(1<<_)-1,E=h>>1,C=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,N=i?0:s-1,k=i?1:-1,B=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=h):(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>=h?(u=0,c=h):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+N]=u&255,N+=k,u/=256,o-=8);for(c=c<<o|u,_+=o;_>0;e[r+N]=c&255,N+=k,c/=256,_-=8);e[r+N-k]|=B*128},Br={read:Fv,write:Vv},Xo=Iv(function(t,e){var n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=s,e.SlowBuffer=X,e.INSPECT_MAX_BYTES=50;var r=2147483647;e.kMaxLength=r,s.TYPED_ARRAY_SUPPORT=i(),!s.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function i(){try{var p=new Uint8Array(1),a={foo:function(){return 42}};return Object.setPrototypeOf(a,Uint8Array.prototype),Object.setPrototypeOf(p,a),p.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function o(p){if(p>r)throw new RangeError('The value "'+p+'" is invalid for option "size"');var a=new Uint8Array(p);return Object.setPrototypeOf(a,s.prototype),a}function s(p,a,l){if(typeof p=="number"){if(typeof a=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return _(p)}return c(p,a,l)}s.poolSize=8192;function c(p,a,l){if(typeof p=="string")return h(p,a);if(ArrayBuffer.isView(p))return C(p);if(p==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(p));if(he(p,ArrayBuffer)||p&&he(p.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(he(p,SharedArrayBuffer)||p&&he(p.buffer,SharedArrayBuffer)))return N(p,a,l);if(typeof p=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var g=p.valueOf&&p.valueOf();if(g!=null&&g!==p)return s.from(g,a,l);var I=k(p);if(I)return I;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof p[Symbol.toPrimitive]=="function")return s.from(p[Symbol.toPrimitive]("string"),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(p))}s.from=function(p,a,l){return c(p,a,l)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function u(p){if(typeof p!="number")throw new TypeError('"size" argument must be of type number');if(p<0)throw new RangeError('The value "'+p+'" is invalid for option "size"')}function d(p,a,l){return u(p),p<=0?o(p):a!==void 0?typeof l=="string"?o(p).fill(a,l):o(p).fill(a):o(p)}s.alloc=function(p,a,l){return d(p,a,l)};function _(p){return u(p),o(p<0?0:B(p)|0)}s.allocUnsafe=function(p){return _(p)},s.allocUnsafeSlow=function(p){return _(p)};function h(p,a){if((typeof a!="string"||a==="")&&(a="utf8"),!s.isEncoding(a))throw new TypeError("Unknown encoding: "+a);var l=J(p,a)|0,g=o(l),I=g.write(p,a);return I!==l&&(g=g.slice(0,I)),g}function E(p){for(var a=p.length<0?0:B(p.length)|0,l=o(a),g=0;g<a;g+=1)l[g]=p[g]&255;return l}function C(p){if(he(p,Uint8Array)){var a=new Uint8Array(p);return N(a.buffer,a.byteOffset,a.byteLength)}return E(p)}function N(p,a,l){if(a<0||p.byteLength<a)throw new RangeError('"offset" is outside of buffer bounds');if(p.byteLength<a+(l||0))throw new RangeError('"length" is outside of buffer bounds');var g;return a===void 0&&l===void 0?g=new Uint8Array(p):l===void 0?g=new Uint8Array(p,a):g=new Uint8Array(p,a,l),Object.setPrototypeOf(g,s.prototype),g}function k(p){if(s.isBuffer(p)){var a=B(p.length)|0,l=o(a);return l.length===0||p.copy(l,0,0,a),l}if(p.length!==void 0)return typeof p.length!="number"||me(p.length)?o(0):E(p);if(p.type==="Buffer"&&Array.isArray(p.data))return E(p.data)}function B(p){if(p>=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return p|0}function X(p){return+p!=p&&(p=0),s.alloc(+p)}s.isBuffer=function(a){return a!=null&&a._isBuffer===!0&&a!==s.prototype},s.compare=function(a,l){if(he(a,Uint8Array)&&(a=s.from(a,a.offset,a.byteLength)),he(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 g=a.length,I=l.length,D=0,F=Math.min(g,I);D<F;++D)if(a[D]!==l[D]){g=a[D],I=l[D];break}return g<I?-1:I<g?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 g;if(l===void 0)for(l=0,g=0;g<a.length;++g)l+=a[g].length;var I=s.allocUnsafe(l),D=0;for(g=0;g<a.length;++g){var F=a[g];if(he(F,Uint8Array))D+F.length>I.length?s.from(F).copy(I,D):Uint8Array.prototype.set.call(I,F,D);else if(s.isBuffer(F))F.copy(I,D);else throw new TypeError('"list" argument must be an Array of Buffers');D+=F.length}return I};function J(p,a){if(s.isBuffer(p))return p.length;if(ArrayBuffer.isView(p)||he(p,ArrayBuffer))return p.byteLength;if(typeof p!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+babelHelpers.typeof(p));var l=p.length,g=arguments.length>2&&arguments[2]===!0;if(!g&&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(p).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return l*2;case"hex":return l>>>1;case"base64":return pe(p).length;default:if(I)return g?-1:Q(p).length;a=(""+a).toLowerCase(),I=!0}}s.byteLength=J;function ue(p,a,l){var g=!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(p||(p="utf8");;)switch(p){case"hex":return L(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 O(this,a,l);case"base64":return Le(this,a,l);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,a,l);default:if(g)throw new TypeError("Unknown encoding: "+p);p=(p+"").toLowerCase(),g=!0}}s.prototype._isBuffer=!0;function q(p,a,l){var g=p[a];p[a]=p[l],p[l]=g}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)q(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)q(this,l,l+3),q(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)q(this,l,l+7),q(this,l+1,l+6),q(this,l+2,l+5),q(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):ue.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,g,I,D){if(he(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),g===void 0&&(g=a?a.length:0),I===void 0&&(I=0),D===void 0&&(D=this.length),l<0||g>a.length||I<0||D>this.length)throw new RangeError("out of range index");if(I>=D&&l>=g)return 0;if(I>=D)return-1;if(l>=g)return 1;if(l>>>=0,g>>>=0,I>>>=0,D>>>=0,this===a)return 0;for(var F=D-I,ve=g-l,Ie=Math.min(F,ve),Ce=this.slice(I,D),ke=a.slice(l,g),Be=0;Be<Ie;++Be)if(Ce[Be]!==ke[Be]){F=Ce[Be],ve=ke[Be];break}return F<ve?-1:ve<F?1:0};function Ae(p,a,l,g,I){if(p.length===0)return-1;if(typeof l=="string"?(g=l,l=0):l>2147483647?l=2147483647:l<-2147483648&&(l=-2147483648),l=+l,me(l)&&(l=I?0:p.length-1),l<0&&(l=p.length+l),l>=p.length){if(I)return-1;l=p.length-1}else if(l<0)if(I)l=0;else return-1;if(typeof a=="string"&&(a=s.from(a,g)),s.isBuffer(a))return a.length===0?-1:H(p,a,l,g,I);if(typeof a=="number")return a=a&255,typeof Uint8Array.prototype.indexOf=="function"?I?Uint8Array.prototype.indexOf.call(p,a,l):Uint8Array.prototype.lastIndexOf.call(p,a,l):H(p,[a],l,g,I);throw new TypeError("val must be string, number or Buffer")}function H(p,a,l,g,I){var D=1,F=p.length,ve=a.length;if(g!==void 0&&(g=String(g).toLowerCase(),g==="ucs2"||g==="ucs-2"||g==="utf16le"||g==="utf-16le")){if(p.length<2||a.length<2)return-1;D=2,F/=2,ve/=2,l/=2}function Ie(Vt,Gt){return D===1?Vt[Gt]:Vt.readUInt16BE(Gt*D)}var Ce;if(I){var ke=-1;for(Ce=l;Ce<F;Ce++)if(Ie(p,Ce)===Ie(a,ke===-1?0:Ce-ke)){if(ke===-1&&(ke=Ce),Ce-ke+1===ve)return ke*D}else ke!==-1&&(Ce-=Ce-ke),ke=-1}else for(l+ve>F&&(l=F-ve),Ce=l;Ce>=0;Ce--){for(var Be=!0,Ze=0;Ze<ve;Ze++)if(Ie(p,Ce+Ze)!==Ie(a,Ze)){Be=!1;break}if(Be)return Ce}return-1}s.prototype.includes=function(a,l,g){return this.indexOf(a,l,g)!==-1},s.prototype.indexOf=function(a,l,g){return Ae(this,a,l,g,!0)},s.prototype.lastIndexOf=function(a,l,g){return Ae(this,a,l,g,!1)};function _e(p,a,l,g){l=Number(l)||0;var I=p.length-l;g?(g=Number(g),g>I&&(g=I)):g=I;var D=a.length;g>D/2&&(g=D/2);for(var F=0;F<g;++F){var ve=parseInt(a.substr(F*2,2),16);if(me(ve))return F;p[l+F]=ve}return F}function de(p,a,l,g){return se(Q(a,p.length-l),p,l,g)}function ye(p,a,l,g){return se(oe(a),p,l,g)}function Ve(p,a,l,g){return se(pe(a),p,l,g)}function De(p,a,l,g){return se(ee(a,p.length-l),p,l,g)}s.prototype.write=function(a,l,g,I){if(l===void 0)I="utf8",g=this.length,l=0;else if(g===void 0&&typeof l=="string")I=l,g=this.length,l=0;else if(isFinite(l))l=l>>>0,isFinite(g)?(g=g>>>0,I===void 0&&(I="utf8")):(I=g,g=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var D=this.length-l;if((g===void 0||g>D)&&(g=D),a.length>0&&(g<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 _e(this,a,l,g);case"utf8":case"utf-8":return de(this,a,l,g);case"ascii":case"latin1":case"binary":return ye(this,a,l,g);case"base64":return Ve(this,a,l,g);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return De(this,a,l,g);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 Le(p,a,l){return a===0&&l===p.length?Ac.fromByteArray(p):Ac.fromByteArray(p.slice(a,l))}function Ge(p,a,l){l=Math.min(p.length,l);for(var g=[],I=a;I<l;){var D=p[I],F=null,ve=D>239?4:D>223?3:D>191?2:1;if(I+ve<=l){var Ie,Ce,ke,Be;switch(ve){case 1:D<128&&(F=D);break;case 2:Ie=p[I+1],(Ie&192)===128&&(Be=(D&31)<<6|Ie&63,Be>127&&(F=Be));break;case 3:Ie=p[I+1],Ce=p[I+2],(Ie&192)===128&&(Ce&192)===128&&(Be=(D&15)<<12|(Ie&63)<<6|Ce&63,Be>2047&&(Be<55296||Be>57343)&&(F=Be));break;case 4:Ie=p[I+1],Ce=p[I+2],ke=p[I+3],(Ie&192)===128&&(Ce&192)===128&&(ke&192)===128&&(Be=(D&15)<<18|(Ie&63)<<12|(Ce&63)<<6|ke&63,Be>65535&&Be<1114112&&(F=Be))}}F===null?(F=65533,ve=1):F>65535&&(F-=65536,g.push(F>>>10&1023|55296),F=56320|F&1023),g.push(F),I+=ve}return gt(g)}var ze=4096;function gt(p){var a=p.length;if(a<=ze)return String.fromCharCode.apply(String,p);for(var l="",g=0;g<a;)l+=String.fromCharCode.apply(String,p.slice(g,g+=ze));return l}function A(p,a,l){var g="";l=Math.min(p.length,l);for(var I=a;I<l;++I)g+=String.fromCharCode(p[I]&127);return g}function O(p,a,l){var g="";l=Math.min(p.length,l);for(var I=a;I<l;++I)g+=String.fromCharCode(p[I]);return g}function L(p,a,l){var g=p.length;(!a||a<0)&&(a=0),(!l||l<0||l>g)&&(l=g);for(var I="",D=a;D<l;++D)I+=ge[p[D]];return I}function M(p,a,l){for(var g=p.slice(a,l),I="",D=0;D<g.length-1;D+=2)I+=String.fromCharCode(g[D]+g[D+1]*256);return I}s.prototype.slice=function(a,l){var g=this.length;a=~~a,l=l===void 0?g:~~l,a<0?(a+=g,a<0&&(a=0)):a>g&&(a=g),l<0?(l+=g,l<0&&(l=0)):l>g&&(l=g),l<a&&(l=a);var I=this.subarray(a,l);return Object.setPrototypeOf(I,s.prototype),I};function v(p,a,l){if(p%1!==0||p<0)throw new RangeError("offset is not uint");if(p+a>l)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(a,l,g){a=a>>>0,l=l>>>0,g||v(a,l,this.length);for(var I=this[a],D=1,F=0;++F<l&&(D*=256);)I+=this[a+F]*D;return I},s.prototype.readUintBE=s.prototype.readUIntBE=function(a,l,g){a=a>>>0,l=l>>>0,g||v(a,l,this.length);for(var I=this[a+--l],D=1;l>0&&(D*=256);)I+=this[a+--l]*D;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,g){a=a>>>0,l=l>>>0,g||v(a,l,this.length);for(var I=this[a],D=1,F=0;++F<l&&(D*=256);)I+=this[a+F]*D;return D*=128,I>=D&&(I-=Math.pow(2,8*l)),I},s.prototype.readIntBE=function(a,l,g){a=a>>>0,l=l>>>0,g||v(a,l,this.length);for(var I=l,D=1,F=this[a+--I];I>0&&(D*=256);)F+=this[a+--I]*D;return D*=128,F>=D&&(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 g=this[a]|this[a+1]<<8;return g&32768?g|4294901760:g},s.prototype.readInt16BE=function(a,l){a=a>>>0,l||v(a,2,this.length);var g=this[a+1]|this[a]<<8;return g&32768?g|4294901760:g},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(p,a,l,g,I,D){if(!s.isBuffer(p))throw new TypeError('"buffer" argument must be a Buffer instance');if(a>I||a<D)throw new RangeError('"value" argument is out of bounds');if(l+g>p.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(a,l,g,I){if(a=+a,l=l>>>0,g=g>>>0,!I){var D=Math.pow(2,8*g)-1;y(this,a,l,g,D,0)}var F=1,ve=0;for(this[l]=a&255;++ve<g&&(F*=256);)this[l+ve]=a/F&255;return l+g},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(a,l,g,I){if(a=+a,l=l>>>0,g=g>>>0,!I){var D=Math.pow(2,8*g)-1;y(this,a,l,g,D,0)}var F=g-1,ve=1;for(this[l+F]=a&255;--F>=0&&(ve*=256);)this[l+F]=a/ve&255;return l+g},s.prototype.writeUint8=s.prototype.writeUInt8=function(a,l,g){return a=+a,l=l>>>0,g||y(this,a,l,1,255,0),this[l]=a&255,l+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(a,l,g){return a=+a,l=l>>>0,g||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,g){return a=+a,l=l>>>0,g||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,g){return a=+a,l=l>>>0,g||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,g){return a=+a,l=l>>>0,g||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,g,I){if(a=+a,l=l>>>0,!I){var D=Math.pow(2,8*g-1);y(this,a,l,g,D-1,-D)}var F=0,ve=1,Ie=0;for(this[l]=a&255;++F<g&&(ve*=256);)a<0&&Ie===0&&this[l+F-1]!==0&&(Ie=1),this[l+F]=(a/ve>>0)-Ie&255;return l+g},s.prototype.writeIntBE=function(a,l,g,I){if(a=+a,l=l>>>0,!I){var D=Math.pow(2,8*g-1);y(this,a,l,g,D-1,-D)}var F=g-1,ve=1,Ie=0;for(this[l+F]=a&255;--F>=0&&(ve*=256);)a<0&&Ie===0&&this[l+F+1]!==0&&(Ie=1),this[l+F]=(a/ve>>0)-Ie&255;return l+g},s.prototype.writeInt8=function(a,l,g){return a=+a,l=l>>>0,g||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,g){return a=+a,l=l>>>0,g||y(this,a,l,2,32767,-32768),this[l]=a&255,this[l+1]=a>>>8,l+2},s.prototype.writeInt16BE=function(a,l,g){return a=+a,l=l>>>0,g||y(this,a,l,2,32767,-32768),this[l]=a>>>8,this[l+1]=a&255,l+2},s.prototype.writeInt32LE=function(a,l,g){return a=+a,l=l>>>0,g||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,g){return a=+a,l=l>>>0,g||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(p,a,l,g,I,D){if(l+g>p.length)throw new RangeError("Index out of range");if(l<0)throw new RangeError("Index out of range")}function Z(p,a,l,g,I){return a=+a,l=l>>>0,I||U(p,a,l,4),Br.write(p,a,l,g,23,4),l+4}s.prototype.writeFloatLE=function(a,l,g){return Z(this,a,l,!0,g)},s.prototype.writeFloatBE=function(a,l,g){return Z(this,a,l,!1,g)};function ne(p,a,l,g,I){return a=+a,l=l>>>0,I||U(p,a,l,8),Br.write(p,a,l,g,52,8),l+8}s.prototype.writeDoubleLE=function(a,l,g){return ne(this,a,l,!0,g)},s.prototype.writeDoubleBE=function(a,l,g){return ne(this,a,l,!1,g)},s.prototype.copy=function(a,l,g,I){if(!s.isBuffer(a))throw new TypeError("argument should be a Buffer");if(g||(g=0),!I&&I!==0&&(I=this.length),l>=a.length&&(l=a.length),l||(l=0),I>0&&I<g&&(I=g),I===g||a.length===0||this.length===0)return 0;if(l<0)throw new RangeError("targetStart out of bounds");if(g<0||g>=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-g&&(I=a.length-l+g);var D=I-g;return this===a&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(l,g,I):Uint8Array.prototype.set.call(a,this.subarray(g,I),l),D},s.prototype.fill=function(a,l,g,I){if(typeof a=="string"){if(typeof l=="string"?(I=l,l=0,g=this.length):typeof g=="string"&&(I=g,g=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 D=a.charCodeAt(0);(I==="utf8"&&D<128||I==="latin1")&&(a=D)}}else typeof a=="number"?a=a&255:typeof a=="boolean"&&(a=Number(a));if(l<0||this.length<l||this.length<g)throw new RangeError("Out of range index");if(g<=l)return this;l=l>>>0,g=g===void 0?this.length:g>>>0,a||(a=0);var F;if(typeof a=="number")for(F=l;F<g;++F)this[F]=a;else{var ve=s.isBuffer(a)?a:s.from(a,I),Ie=ve.length;if(Ie===0)throw new TypeError('The value "'+a+'" is invalid for argument "value"');for(F=0;F<g-l;++F)this[F+l]=ve[F%Ie]}return this};var ie=/[^+/0-9A-Za-z-_]/g;function ce(p){if(p=p.split("=")[0],p=p.trim().replace(ie,""),p.length<2)return"";for(;p.length%4!==0;)p=p+"=";return p}function Q(p,a){a=a||1/0;for(var l,g=p.length,I=null,D=[],F=0;F<g;++F){if(l=p.charCodeAt(F),l>55295&&l<57344){if(!I){if(l>56319){(a-=3)>-1&&D.push(239,191,189);continue}else if(F+1===g){(a-=3)>-1&&D.push(239,191,189);continue}I=l;continue}if(l<56320){(a-=3)>-1&&D.push(239,191,189),I=l;continue}l=(I-55296<<10|l-56320)+65536}else I&&(a-=3)>-1&&D.push(239,191,189);if(I=null,l<128){if((a-=1)<0)break;D.push(l)}else if(l<2048){if((a-=2)<0)break;D.push(l>>6|192,l&63|128)}else if(l<65536){if((a-=3)<0)break;D.push(l>>12|224,l>>6&63|128,l&63|128)}else if(l<1114112){if((a-=4)<0)break;D.push(l>>18|240,l>>12&63|128,l>>6&63|128,l&63|128)}else throw new Error("Invalid code point")}return D}function oe(p){for(var a=[],l=0;l<p.length;++l)a.push(p.charCodeAt(l)&255);return a}function ee(p,a){for(var l,g,I,D=[],F=0;F<p.length&&!((a-=2)<0);++F)l=p.charCodeAt(F),g=l>>8,I=l%256,D.push(I),D.push(g);return D}function pe(p){return Ac.toByteArray(ce(p))}function se(p,a,l,g){for(var I=0;I<g&&!(I+l>=a.length||I>=p.length);++I)a[I+l]=p[I];return I}function he(p,a){return p instanceof a||p!=null&&p.constructor!=null&&p.constructor.name!=null&&p.constructor.name===a.name}function me(p){return p!==p}var ge=function(){for(var p="0123456789abcdef",a=new Array(256),l=0;l<16;++l)for(var g=l*16,I=0;I<16;++I)a[g+I]=p[l]+p[I];return a}()}),Fe=Xo.Buffer;Xo.SlowBuffer;Xo.INSPECT_MAX_BYTES;Xo.kMaxLength;var Pc=function(e,n){return Pc=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])},Pc(e,n)};function qo(t,e){Pc(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var ur=function(t){qo(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),tt=function(t){qo(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 zo(t){return t&&t.Math==Math&&t}function ep(){return zo(typeof globalThis=="object"&&globalThis)||zo(typeof window=="object"&&window)||zo(typeof self=="object"&&self)||zo(typeof global=="object"&&global)||Function("return this")()}function kv(){var t=ep();return typeof t.navigator=="object"&&t.navigator.product==="ReactNative"}var Bv=function(e){var n=kv()?"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=Fe.alloc(e),i=0;i<e;++i)r[i]=Math.floor(Math.random()*256);return r},Uv=function(){{if(typeof window<"u"){var t=window.crypto||window.msCrypto;if(t&&t.getRandomValues)return function(e){return t.getRandomValues(Fe.alloc(e))}}return typeof global<"u"&&global.crypto&&global.crypto.getRandomValues?function(e){return global.crypto.getRandomValues(Fe.alloc(e))}:Bv}},tp=Uv();function Hv(t){return["[object ArrayBuffer]","[object SharedArrayBuffer]"].includes(Object.prototype.toString.call(t))}function Fc(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}function jv(t){return Object.prototype.toString.call(t)==="[object RegExp]"}function $v(t){return Oi(t)&&Object.prototype.toString.call(t)==="[object Date]"}function Oi(t){return typeof t=="object"&&t!==null}function Zo(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 Ko(t){if(ArrayBuffer.isView(t))return Fe.from(t.buffer,t.byteOffset,t.byteLength);if(Hv(t))return Fe.from(t);throw new tt("Must use either Buffer or TypedArray")}var Gv=/^(?:[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,np=function(t){return typeof t=="string"&&Gv.test(t)},Lc=function(t){if(!np(t))throw new tt('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 Fe.from(e,"hex")},kf=function(t,e){return e===void 0&&(e=!0),e?t.toString("hex",0,4)+"-"+t.toString("hex",4,6)+"-"+t.toString("hex",6,8)+"-"+t.toString("hex",8,10)+"-"+t.toString("hex",10,16):t.toString("hex")};var xD=Math.pow(2,63)-1,OD=-Math.pow(2,63),Wv=Math.pow(2,53),Yv=-Math.pow(2,53);var rp=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 tt("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=Fe.alloc(t.BUFFER_SIZE),this.position=0):(typeof e=="string"?this.buffer=Fe.from(e,"binary"):Array.isArray(e)?this.buffer=Fe.from(e):this.buffer=Ko(e),this.position=this.buffer.byteLength)}return t.prototype.put=function(e){if(typeof e=="string"&&e.length!==1)throw new tt("only accepts single character String");if(typeof e!="number"&&e.length!==1)throw new tt("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 tt("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=Fe.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=Fe.alloc(this.buffer.length+e.length);this.buffer.copy(r,0,0,this.buffer.length),this.buffer=r}ArrayBuffer.isView(e)?(this.buffer.set(Ko(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 Bf(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=Fe.from(e.$binary,"base64")):typeof e.$binary!="string"&&(i=e.$binary.subType?parseInt(e.$binary.subType,16):0,r=Fe.from(e.$binary.base64,"base64")):"$uuid"in e&&(i=4,r=Lc(e.$uuid)),!r)throw new tt("Unexpected Binary Extended JSON format ".concat(JSON.stringify(e)));return i===rp?new Bf(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 Dc=16,Bf=function(t){qo(e,t);function e(n){var r=this,i,o;if(n==null)i=e.generate();else if(n instanceof e)i=Fe.from(n.buffer),o=n.__id;else if(ArrayBuffer.isView(n)&&n.byteLength===Dc)i=Ko(n);else if(typeof n=="string")i=Lc(n);else throw new tt("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,rp)||this,r.__id=o,r}return Object.defineProperty(e.prototype,"id",{get:function(){return this.buffer},set:function(n){this.buffer=n,e.cacheHexString&&(this.__id=kf(n))},enumerable:!1,configurable:!0}),e.prototype.toHexString=function(n){if(n===void 0&&(n=!0),e.cacheHexString&&this.__id)return this.__id;var r=kf(this.id,n);return e.cacheHexString&&(this.__id=r),r},e.prototype.toString=function(n){return n?this.id.toString(n):this.toHexString()},e.prototype.toJSON=function(){return this.toHexString()},e.prototype.equals=function(n){if(!n)return!1;if(n instanceof e)return n.id.equals(this.id);try{return new e(n).id.equals(this.id)}catch{return!1}},e.prototype.toBinary=function(){return new dr(this.id,dr.SUBTYPE_UUID)},e.generate=function(){var n=tp(Dc);return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Fe.from(n)},e.isValid=function(n){return n?n instanceof e?!0:typeof n=="string"?np(n):Fc(n)?n.length!==Dc?!1:(n[6]&240)===64&&(n[8]&128)===128:!1:!1},e.createFromHexString=function(n){var r=Lc(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),Jo=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(Jo.prototype,"_bsontype",{value:"Code"});function zv(t){return Oi(t)&&t.$id!=null&&typeof t.$ref=="string"&&(t.$db==null||typeof t.$db=="string")}var Ti=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(Ti.prototype,"_bsontype",{value:"DBRef"});var Qt=void 0;try{Qt=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 Uf=65536,Kv=1<<24,Hr=Uf*Uf,ip=Hr*Hr,Hf=ip/2,jf={},$f={},ae=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=jf[e],i)?i:(r=t.fromBits(e,e<0?-1:0,!1),o&&(jf[e]=r),r))},t.fromNumber=function(e,n){if(isNaN(e))return n?t.UZERO:t.ZERO;if(n){if(e<0)return t.UZERO;if(e>=ip)return t.MAX_UNSIGNED_VALUE}else{if(e<=-Hf)return t.MIN_VALUE;if(e+1>=Hf)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 _=t.fromNumber(Math.pow(r,u));s=s.mul(_).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 Oi(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,_=0,h=0,E=0,C=0;return C+=o+d,E+=C>>>16,C&=65535,E+=i+u,h+=E>>>16,E&=65535,h+=r+c,_+=h>>>16,h&=65535,_+=n+s,_&=65535,t.fromBits(E<<16|C,_<<16|h,this.unsigned)},t.prototype.and=function(e){return t.isLong(e)||(e=t.fromValue(e)),t.fromBits(this.low&e.low,this.high&e.high,this.unsigned)},t.prototype.compare=function(e){if(t.isLong(e)||(e=t.fromValue(e)),this.eq(e))return 0;var n=this.isNegative(),r=e.isNegative();return n&&!r?-1:!n&&r?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},t.prototype.comp=function(e){return this.compare(e)},t.prototype.divide=function(e){if(t.isLong(e)||(e=t.fromValue(e)),e.isZero())throw Error("division by zero");if(Qt){if(!this.unsigned&&this.high===-2147483648&&e.low===-1&&e.high===-1)return this;var n=(this.unsigned?Qt.div_u:Qt.div_s)(this.low,this.high,e.low,e.high);return t.fromBits(n,Qt.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),_=d.mul(e);_.isNegative()||_.gt(i);)r-=u,d=t.fromNumber(r,this.unsigned),_=d.mul(e);d.isZero()&&(d=t.ONE),o=o.add(d),i=i.sub(_)}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)),Qt){var n=(this.unsigned?Qt.rem_u:Qt.rem_s)(this.low,this.high,e.low,e.high);return t.fromBits(n,Qt.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)),Qt){var n=Qt.mul(this.low,this.high,e.low,e.high);return t.fromBits(n,Qt.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,_=e.low&65535,h=0,E=0,C=0,N=0;return N+=s*_,C+=N>>>16,N&=65535,C+=o*_,E+=C>>>16,C&=65535,C+=s*d,E+=C>>>16,C&=65535,E+=i*_,h+=E>>>16,E&=65535,E+=o*d,h+=E>>>16,E&=65535,E+=s*u,h+=E>>>16,E&=65535,h+=r*_+i*d+o*u+s*c,h&=65535,t.fromBits(C<<16|N,h<<16|E,this.unsigned)},t.prototype.mul=function(e){return this.multiply(e)},t.prototype.negate=function(){return!this.unsigned&&this.eq(t.MIN_VALUE)?t.MIN_VALUE:this.not().add(t.ONE)},t.prototype.neg=function(){return this.negate()},t.prototype.not=function(){return t.fromBits(~this.low,~this.high,this.unsigned)},t.prototype.notEquals=function(e){return!this.equals(e)},t.prototype.neq=function(e){return this.notEquals(e)},t.prototype.ne=function(e){return this.notEquals(e)},t.prototype.or=function(e){return t.isLong(e)||(e=t.fromValue(e)),t.fromBits(this.low|e.low,this.high|e.high,this.unsigned)},t.prototype.shiftLeft=function(e){return t.isLong(e)&&(e=e.toInt()),(e&=63)===0?this:e<32?t.fromBits(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned):t.fromBits(0,this.low<<e-32,this.unsigned)},t.prototype.shl=function(e){return this.shiftLeft(e)},t.prototype.shiftRight=function(e){return t.isLong(e)&&(e=e.toInt()),(e&=63)===0?this:e<32?t.fromBits(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned):t.fromBits(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},t.prototype.shr=function(e){return this.shiftRight(e)},t.prototype.shiftRightUnsigned=function(e){if(t.isLong(e)&&(e=e.toInt()),e&=63,e===0)return this;var n=this.high;if(e<32){var r=this.low;return t.fromBits(r>>>e|n<<32-e,n>>>e,this.unsigned)}else return e===32?t.fromBits(n,0,this.unsigned):t.fromBits(n>>>e-32,0,this.unsigned)},t.prototype.shr_u=function(e){return this.shiftRightUnsigned(e)},t.prototype.shru=function(e){return this.shiftRightUnsigned(e)},t.prototype.subtract=function(e){return t.isLong(e)||(e=t.fromValue(e)),this.add(e.neg())},t.prototype.sub=function(e){return this.subtract(e)},t.prototype.toInt=function(){return this.unsigned?this.low>>>0:this.low},t.prototype.toNumber=function(){return this.unsigned?(this.high>>>0)*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,_=d.toString(e);if(s=u,s.isZero())return _+c;for(;_.length<6;)_="0"+_;c=""+_+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(Kv),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(ae.prototype,"__isLong__",{value:!0});Object.defineProperty(ae.prototype,"_bsontype",{value:"Long"});var Xv=/^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/,qv=/^(\+|-)?(Infinity|inf)$/i,Zv=/^(\+|-)?NaN$/i,Ii=6111,Nc=-6176,Gf=6176,Jv=34,Rc=[124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Wf=[248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Yf=[120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Qv=/^([-+])?(\d+)?$/,ey=31,zf=16383,ty=30,ny=31;function Kf(t){return!isNaN(parseInt(t,10))}function ry(t){var e=ae.fromNumber(1e9),n=ae.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 ae(t.parts[r],0)),t.parts[r]=n.div(e).low,n=n.modulo(e);return{quotient:t,rem:n}}function iy(t,e){if(!t&&!e)return{high:ae.fromNumber(0),low:ae.fromNumber(0)};var n=t.shiftRightUnsigned(32),r=new ae(t.getLowBits(),0),i=e.shiftRightUnsigned(32),o=new ae(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 ae(c.getLowBits(),0).add(u).add(d.shiftRightUnsigned(32)),s=s.add(c.shiftRightUnsigned(32)),d=c.shiftLeft(32).add(new ae(d.getLowBits(),0)),{high:s,low:d}}function oy(t,e){var n=t.high>>>0,r=e.high>>>0;if(n<r)return!0;if(n===r){var i=t.low>>>0,o=e.low>>>0;if(i<o)return!0}return!1}function Ur(t,e){throw new tt('"'.concat(t,'" is not a valid Decimal128 string - ').concat(e))}var Vc=function(){function t(e){if(!(this instanceof t))return new t(e);if(typeof e=="string")this.bytes=t.fromString(e).bytes;else if(Fc(e)){if(e.byteLength!==16)throw new tt("Decimal128 must take a Buffer of 16 bytes");this.bytes=e}else throw new tt("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,_=[0],h=0,E=0,C=0,N=0,k=0,B=0,X=new ae(0,0),J=new ae(0,0),ue=0,q=0;if(e.length>=7e3)throw new tt(""+e+" not a valid Decimal128 string");var Ae=e.match(Xv),H=e.match(qv),_e=e.match(Zv);if(!Ae&&!H&&!_e||e.length===0)throw new tt(""+e+" not a valid Decimal128 string");if(Ae){var de=Ae[2],ye=Ae[4],Ve=Ae[5],De=Ae[6];ye&&De===void 0&&Ur(e,"missing exponent power"),ye&&de===void 0&&Ur(e,"missing exponent base"),ye===void 0&&(Ve||De)&&Ur(e,"missing e before exponent")}if((e[q]==="+"||e[q]==="-")&&(n=e[q++]==="-"),!Kf(e[q])&&e[q]!=="."){if(e[q]==="i"||e[q]==="I")return new t(Fe.from(n?Wf:Yf));if(e[q]==="N")return new t(Fe.from(Rc))}for(;Kf(e[q])||e[q]===".";){if(e[q]==="."){r&&Ur(e,"contains multiple periods"),r=!0,q=q+1;continue}h<34&&(e[q]!=="0"||i)&&(i||(d=s),i=!0,_[E++]=parseInt(e[q],10),h=h+1),i&&(c=c+1),r&&(u=u+1),s=s+1,q=q+1}if(r&&!s)throw new tt(""+e+" not a valid Decimal128 string");if(e[q]==="e"||e[q]==="E"){var Le=e.substr(++q).match(Qv);if(!Le||!Le[2])return new t(Fe.from(Rc));k=parseInt(Le[0],10),q=q+Le[0].length}if(e[q])return new t(Fe.from(Rc));if(C=0,!h)C=0,N=0,_[0]=0,c=1,h=1,o=0;else if(N=h-1,o=c,o!==1)for(;_[d+o-1]===0;)o=o-1;for(k<=u&&u-k>16384?k=Nc:k=k-u;k>Ii;){if(N=N+1,N-C>Jv){var Ge=_.join("");if(Ge.match(/^0+$/)){k=Ii;break}Ur(e,"overflow")}k=k-1}for(;k<Nc||h<c;){if(N===0&&o<h){k=Nc,o=0;break}if(h<c?c=c-1:N=N-1,k<Ii)k=k+1;else{var Ge=_.join("");if(Ge.match(/^0+$/)){k=Ii;break}Ur(e,"overflow")}}if(N-C+1<o){var ze=s;r&&(d=d+1,ze=ze+1),n&&(d=d+1,ze=ze+1);var gt=parseInt(e[d+N+1],10),A=0;if(gt>=5&&(A=1,gt===5)){for(A=_[N]%2===1?1:0,B=d+N+2;B<ze;B++)if(parseInt(e[B],10)){A=1;break}}if(A){for(var O=N;O>=0;O--)if(++_[O]>9&&(_[O]=0,O===0))if(k<Ii)k=k+1,_[O]=1;else return new t(Fe.from(n?Wf:Yf))}}if(X=ae.fromNumber(0),J=ae.fromNumber(0),o===0)X=ae.fromNumber(0),J=ae.fromNumber(0);else if(N-C<17){var O=C;for(J=ae.fromNumber(_[O++]),X=new ae(0,0);O<=N;O++)J=J.multiply(ae.fromNumber(10)),J=J.add(ae.fromNumber(_[O]))}else{var O=C;for(X=ae.fromNumber(_[O++]);O<=N-17;O++)X=X.multiply(ae.fromNumber(10)),X=X.add(ae.fromNumber(_[O]));for(J=ae.fromNumber(_[O++]);O<=N;O++)J=J.multiply(ae.fromNumber(10)),J=J.add(ae.fromNumber(_[O]))}var L=iy(X,ae.fromString("100000000000000000"));L.low=L.low.add(J),oy(L.low,J)&&(L.high=L.high.add(ae.fromNumber(1))),ue=k+Gf;var M={low:ae.fromNumber(0),high:ae.fromNumber(0)};L.high.shiftRightUnsigned(49).and(ae.fromNumber(1)).equals(ae.fromNumber(1))?(M.high=M.high.or(ae.fromNumber(3).shiftLeft(61)),M.high=M.high.or(ae.fromNumber(ue).and(ae.fromNumber(16383).shiftLeft(47))),M.high=M.high.or(L.high.and(ae.fromNumber(0x7fffffffffff)))):(M.high=M.high.or(ae.fromNumber(ue&16383).shiftLeft(49)),M.high=M.high.or(L.high.and(ae.fromNumber(562949953421311)))),M.low=L.low,n&&(M.high=M.high.or(ae.fromString("9223372036854775808")));var v=Fe.alloc(16);return q=0,v[q++]=M.low.low&255,v[q++]=M.low.low>>8&255,v[q++]=M.low.low>>16&255,v[q++]=M.low.low>>24&255,v[q++]=M.low.high&255,v[q++]=M.low.high>>8&255,v[q++]=M.low.high>>16&255,v[q++]=M.low.high>>24&255,v[q++]=M.high.low&255,v[q++]=M.high.low>>8&255,v[q++]=M.high.low>>16&255,v[q++]=M.high.low>>24&255,v[q++]=M.high.high&255,v[q++]=M.high.high>>8&255,v[q++]=M.high.high>>16&255,v[q++]=M.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,_,h=[];o=0;var E=this.bytes,C=E[o++]|E[o++]<<8|E[o++]<<16|E[o++]<<24,N=E[o++]|E[o++]<<8|E[o++]<<16|E[o++]<<24,k=E[o++]|E[o++]<<8|E[o++]<<16|E[o++]<<24,B=E[o++]|E[o++]<<8|E[o++]<<16|E[o++]<<24;o=0;var X={low:new ae(C,N),high:new ae(k,B)};X.high.lessThan(ae.ZERO)&&h.push("-");var J=B>>26&ey;if(J>>3===3){if(J===ty)return h.join("")+"Infinity";if(J===ny)return"NaN";e=B>>15&zf,c=8+(B>>14&1)}else c=B>>14&7,e=B>>17&zf;var ue=e-Gf;if(u.parts[0]=(B&16383)+((c&15)<<14),u.parts[1]=k,u.parts[2]=N,u.parts[3]=C,u.parts[0]===0&&u.parts[1]===0&&u.parts[2]===0&&u.parts[3]===0)s=!0;else for(_=3;_>=0;_--){var q=0,Ae=ry(u);if(u=Ae.quotient,q=Ae.rem.low,!!q)for(d=8;d>=0;d--)r[_*9+d]=q%10,q=Math.floor(q/10)}if(s)n=1,r[o]=0;else for(n=36;!r[o];)n=n-1,o=o+1;var H=n-1+ue;if(H>=34||H<=-7||ue>0){if(n>34)return h.push("".concat(0)),ue>0?h.push("E+".concat(ue)):ue<0&&h.push("E".concat(ue)),h.join("");h.push("".concat(r[o++])),n=n-1,n&&h.push(".");for(var i=0;i<n;i++)h.push("".concat(r[o++]));h.push("E"),H>0?h.push("+".concat(H)):h.push("".concat(H))}else if(ue>=0)for(var i=0;i<n;i++)h.push("".concat(r[o++]));else{var _e=n+ue;if(_e>0)for(var i=0;i<_e;i++)h.push("".concat(r[o++]));else h.push("0");for(h.push(".");_e++<0;)h.push("0");for(var i=0;i<n-Math.max(_e-1,0);i++)h.push("".concat(r[o++]))}return h.join("")},t.prototype.toJSON=function(){return{$numberDecimal:this.toString()}},t.prototype.toExtendedJSON=function(){return{$numberDecimal:this.toString()}},t.fromExtendedJSON=function(e){return t.fromString(e.$numberDecimal)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return'new Decimal128("'.concat(this.toString(),'")')},t}();Object.defineProperty(Vc.prototype,"_bsontype",{value:"Decimal128"});var Qo=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(Qo.prototype,"_bsontype",{value:"Double"});var es=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(es.prototype,"_bsontype",{value:"Int32"});var kc=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(kc.prototype,"_bsontype",{value:"MaxKey"});var Bc=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(Bc.prototype,"_bsontype",{value:"MinKey"});var sy=new RegExp("^[0-9a-fA-F]{24}$"),lr=null,En=Symbol("id"),Rt=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 tt("Argument passed in must have an id that is of type string or Buffer");"toHexString"in e&&typeof e.toHexString=="function"?n=Fe.from(e.toHexString(),"hex"):n=e.id}else n=e;if(n==null||typeof n=="number")this[En]=t.generate(typeof n=="number"?n:void 0);else if(ArrayBuffer.isView(n)&&n.byteLength===12)this[En]=n instanceof Fe?n:Ko(n);else if(typeof n=="string")if(n.length===12){var r=Fe.from(n);if(r.byteLength===12)this[En]=r;else throw new tt("Argument passed in must be a string of 12 bytes")}else if(n.length===24&&sy.test(n))this[En]=Fe.from(n,"hex");else throw new tt("Argument passed in must be a string of 12 bytes or a string of 24 hex characters or an integer");else throw new tt("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[En]},set:function(e){this[En]=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=Fe.alloc(12);return r.writeUInt32BE(e,0),lr===null&&(lr=tp(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[En][11]===e[En][11]&&this[En].equals(e[En]);if(typeof e=="string"&&t.isValid(e)&&e.length===12&&Fc(this.id))return e===Fe.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 Fe.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=Fe.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 tt("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");return new t(Fe.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(Rt.prototype,"generate",{value:Zo(function(t){return Rt.generate(t)},"Please use the static `ObjectId.generate(time)` instead")});Object.defineProperty(Rt.prototype,"getInc",{value:Zo(function(){return Rt.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(Rt.prototype,"get_inc",{value:Zo(function(){return Rt.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(Rt,"get_inc",{value:Zo(function(){return Rt.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(Rt.prototype,"_bsontype",{value:"ObjectID"});function ay(t){return t.split("").sort().join("")}var xi=function(){function t(e,n){if(!(this instanceof t))return new t(e,n);if(this.pattern=e,this.options=ay(n??""),this.pattern.indexOf("\0")!==-1)throw new 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 tt("Unexpected BSONRegExp EJSON object form: ".concat(JSON.stringify(e)))},t}();Object.defineProperty(xi.prototype,"_bsontype",{value:"BSONRegExp"});var Uc=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(Uc.prototype,"_bsontype",{value:"Symbol"});var cy=ae,op=function(t){qo(e,t);function e(n,r){var i=this;return i instanceof e?(ae.isLong(n)?i=t.call(this,n.low,n.high,!0)||this:Oi(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(ae.fromInt(n,!0))},e.fromNumber=function(n){return new e(ae.fromNumber(n,!0))},e.fromBits=function(n,r){return new e(n,r)},e.fromString=function(n,r){return new e(ae.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=ae.MAX_UNSIGNED_VALUE,e}(cy);function ly(t){return Oi(t)&&Reflect.has(t,"_bsontype")&&typeof t._bsontype=="string"}var sp=2147483647,ap=-2147483648,cp=9223372036854776e3,lp=-9223372036854776e3,uy={$oid:Rt,$binary:dr,$uuid:dr,$symbol:Uc,$numberInt:es,$numberDecimal:Vc,$numberDouble:Qo,$numberLong:ae,$minKey:Bc,$maxKey:kc,$regex:xi,$regularExpression:xi,$timestamp:op};function up(t,e){if(e===void 0&&(e={}),typeof t=="number"){if(e.relaxed||e.legacy)return t;if(Math.floor(t)===t){if(t>=ap&&t<=sp)return new es(t);if(t>=lp&&t<=cp)return ae.fromNumber(t)}return new Qo(t)}if(t==null||typeof t!="object")return t;if(t.$undefined)return null;for(var n=Object.keys(t).filter(function(h){return h.startsWith("$")&&t[h]!=null}),r=0;r<n.length;r++){var i=uy[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)):ae.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=up(t.$scope)),Jo.fromExtendedJSON(t)}if(zv(t)||t.$dbPointer){var u=t.$ref?t:t.$dbPointer;if(u instanceof Ti)return u;var d=Object.keys(u).filter(function(h){return h.startsWith("$")}),_=!0;if(d.forEach(function(h){["$ref","$id","$db"].indexOf(h)===-1&&(_=!1)}),_)return Ti.fromExtendedJSON(u)}return t}function dy(t,e){return t.map(function(n,r){e.seenObjects.push({propertyName:"index ".concat(r),obj:null});try{return Yn(n,e)}finally{e.seenObjects.pop()}})}function Xf(t){var e=t.toISOString();return t.getUTCMilliseconds()!==0?e:e.slice(0,-5)+"Z"}function Yn(t,e){if((typeof t=="object"||typeof t=="function")&&t!==null){var n=e.seenObjects.findIndex(function(X){return X.obj===t});if(n!==-1){var r=e.seenObjects.map(function(X){return X.propertyName}),i=r.slice(0,n).map(function(X){return"".concat(X," -> ")}).join(""),o=r[n],s=" -> "+r.slice(n+1,r.length-1).map(function(X){return"".concat(X," -> ")}).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 tt(`Converting circular structure to EJSON:
|
|
30
30
|
`+" ".concat(i).concat(o).concat(s).concat(c,`
|
|
31
|
-
`)+" ".concat(u,"\\").concat(d,"/"))}e.seenObjects[e.seenObjects.length-1].obj=t}if(Array.isArray(t))return uy(t,e);if(t===void 0)return null;if(t instanceof Date||jv(t)){var _=t.getTime(),h=_>-1&&_<2534023188e5;return e.legacy?e.relaxed&&h?{$date:t.getTime()}:{$date:Kf(t)}:e.relaxed&&h?{$date:Kf(t)}:{$date:{$numberLong:t.getTime().toString()}}}if(typeof t=="number"&&(!e.relaxed||!isFinite(t))){if(Math.floor(t)===t){var E=t>=sp&&t<=op,C=t>=cp&&t<=ap;if(E)return{$numberInt:t.toString()};if(C)return{$numberLong:t.toString()}}return{$numberDouble:t.toString()}}if(t instanceof RegExp||Hv(t)){var N=t.flags;if(N===void 0){var V=t.toString().match(/[gimuy]*$/);V&&(N=V[0])}var B=new Ii(t.source,N);return B.toExtendedJSON(e)}return t!=null&&typeof t=="object"?fy(t,e):t}var dy={Binary:function(t){return new ur(t.value(),t.sub_type)},Code:function(t){return new Zo(t.code,t.scope)},DBRef:function(t){return new Ti(t.collection||t.namespace,t.oid,t.db,t.fields)},Decimal128:function(t){return new Fc(t.bytes)},Double:function(t){return new Jo(t.value)},Int32:function(t){return new Qo(t.value)},Long:function(t){return ae.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 kc},MinKey:function(){return new Vc},ObjectID:function(t){return new Rt(t)},ObjectId:function(t){return new Rt(t)},BSONRegExp:function(t){return new Ii(t.pattern,t.options)},Symbol:function(t){return new Bc(t.value)},Timestamp:function(t){return ip.fromBits(t.low,t.high)}};function fy(t,e){if(t==null||typeof t!="object")throw new lr("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=Yn(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(cy(t)){var s=t;if(typeof s.toExtendedJSON!="function"){var c=dy[t._bsontype];if(!c)throw new tt("Unrecognized or invalid _bsontype: "+t._bsontype);s=c(s)}return n==="Code"&&s.scope?s=new Zo(s.code,Yn(s.scope,e)):n==="DBRef"&&s.oid&&(s=new Ti(Yn(s.collection,e),Yn(s.oid,e),Yn(s.db,e),Yn(s.fields,e))),s.toExtendedJSON(e)}else throw new lr("_bsontype must be a string, but was: "+typeof n)}var Xf;(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 lr("BSON Document field names cannot contain null bytes, found: ".concat(JSON.stringify(u)));return lp(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}]}),_=Yn(o,d);return JSON.stringify(_,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})(Xf||(Xf={}));var qf,Zf=Qf();Zf.Map?qf=Zf.Map:qf=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 OD=ae.fromNumber(Gv),AD=ae.fromNumber(Wv);var Rc=new Uint8Array(8),DD=new DataView(Rc.buffer,Rc.byteOffset,Rc.byteLength);var py=1024*1024*17,ND=Fe.alloc(py);var es=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 Rt(i):new Rt,this.occurred=new Date,r&&(this.trigger=new es(r)),this.newEvent=!i}trigger;items;videos;id;newEvent;cart;currentItem;deviceProps;landingPage;occurred;page;sessionID;sessionNumber;locale};function hy(t,e){if(t&1&&(G(0,"span",1),Oe(1),W()),t&2){K();let n=Xe(0);L(),cn(n.heading)}}function my(t,e){if(t&1&&(G(0,"span",2),Oe(1),W()),t&2){K();let n=Xe(0);L(),cn(n.subHeading)}}var $r=class t{card=Xn.required();linkClicked=Ol();linkAfterSanity(){return this.card()?.buttonLink?.startsWith("https")?this.card().buttonLink:null}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Me({type:t,selectors:[["cooee-video-card"]],inputs:{card:[1,"card"]},outputs:{linkClicked:"linkClicked"},decls:6,vars:6,consts:[[1,"video-card-details"],[1,"heading"],[1,"subheading"],["rel","noopener noreferrer",1,"cta-button",3,"click","href","target"]],template:function(n,r){if(n&1){let i=Ke();lt(0),G(1,"div",0),xe(2,hy,2,1,"span",1)(3,my,2,1,"span",2),G(4,"a",3),Pe("click",function(){return Ne(i),Re(r.linkClicked.emit())}),Oe(5),W()()}if(n&2){let i=vt(r.card());L(2),Se(i!=null&&i.heading?2:-1),L(),Se(i!=null&&i.subHeading?3:-1),L(),le("href",r.linkAfterSanity(),ut)("target",i.newTab?"_blank":"_self"),L(),It(" ",i==null?null:i.buttonTitle," ")}},styles:["[_nghost-%COMP%]{display:block}.video-card-details[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:3.75px;font-size:14px;line-height:normal}.video-card-details[_ngcontent-%COMP%] .cta-button[_ngcontent-%COMP%]{text-align:center;background-color:#fff;border-radius:var(--lc-button-radius);padding:7.5px 15px;font-weight:500;cursor:pointer;color:var(--lc-color-button);font-size:12px;border:0;text-decoration:none}.video-card-details[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%], .video-card-details[_ngcontent-%COMP%] .subheading[_ngcontent-%COMP%]{text-align:start;color:#000;font-weight:600;overflow:hidden}.video-card-details[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%]{font-size:18px}.video-card-details[_ngcontent-%COMP%] .subheading[_ngcontent-%COMP%]{font-size:16px}"],changeDetection:0})};function gy(t,e){t&1&&(Bt(),be(0,"path",3))}function _y(t,e){t&1&&(Bt(),be(0,"path",4))}var Gr=class t{muted;videoEl;toggled=new ct;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=Me({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&&(G(0,"button",0),Pe("click",function(o){return r.toggleMute(o)}),Bt(),G(1,"svg",1),be(2,"path",2),xe(3,gy,1,0,":svg:path",3)(4,_y,1,0,":svg:path",4),W()()),n&2&&(L(3),Se(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 vy=t=>({"lc:cursor-grab":t}),yy=(t,e)=>e.url;function Ey(t,e){if(t&1&&be(0,"source",11),t&2){let n=e.$implicit;Sn("type",n.mimeType),le("src",n.url,ut)}}var ts=class t{constructor(e){this.elementRef=e}video;closeClicked=new ct;videoClicked=new ct;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)(nn(Tt))};static \u0275cmp=Me({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&&(G(0,"div",0),Pe("click",function(){return r.onVideoClick()})("keyup",function(){return r.onVideoClick()})("cdkDragMoved",function(){return r.isDragging=!0}),G(1,"button",1),Pe("click",function(o){return o.stopPropagation(),r.close()}),Bt(),G(2,"svg",2),be(3,"path",3)(4,"path",4),W()(),Kn(),G(5,"div",5)(6,"div",6),Bt(),G(7,"svg",7),be(8,"path",8),W()(),Kn(),G(9,"div",9),Oe(10,"Tap to unmute"),W()(),G(11,"video",10),rt(12,Ey,1,2,"source",11,yy),W()()),n&2&&(le("ngClass",Bi(3,vy,r.isDragging))("cdkDragBoundary","body"),L(11),le("muted",!0),L(),it(r.video.sources))},dependencies:[Bn,Kl],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 Oi=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}},Wr=class extends Oi{component;viewContainerRef;injector;componentFactoryResolver;projectableNodes;constructor(e,n,r,i,o){super(),this.component=e,this.viewContainerRef=n,this.injector=r,this.projectableNodes=o}},Yr=class extends Oi{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()}},Uc=class extends Oi{element;constructor(e){super(),this.element=e instanceof Tt?e.nativeElement:e}},zr=class{_attachedPortal;_disposeFn;_isDisposed=!1;hasAttached(){return!!this._attachedPortal}attach(e){if(e instanceof Wr)return this._attachedPortal=e,this.attachComponentPortal(e);if(e instanceof Yr)return this._attachedPortal=e,this.attachTemplatePortal(e);if(this.attachDomPortal&&e instanceof Uc)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 ns=class extends zr{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(xs,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||Mt.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 Hc=(()=>{class t extends zr{_moduleRef=z(xs,{optional:!0});_document=z(xt);_viewContainerRef=z(Ts);_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 ct;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=_r({type:t,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:[0,"cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[Ct]})}return t})();var Ai;function by(){if(Ai==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>Ai=!0}))}finally{Ai=Ai||!1}return Ai}function up(t){return by()?t:!!t.capture}var Cy=new tn("cdk-input-modality-detector-options"),wy={ignoreKeys:[18,17,224,91,16]},dp=650,jc={passive:!0,capture:!0},Sy=(()=>{class t{_platform=z(rn);_listenerCleanups;modalityDetected;modalityChanged;get mostRecentModality(){return this._modality.value}_mostRecentTarget=null;_modality=new hl(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<dp||(this._modality.next(Gl(n)?"keyboard":"mouse"),this._mostRecentTarget=On(n))};_onTouchstart=n=>{if(Wl(n)){this._modality.next("keyboard");return}this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=On(n)};constructor(){let n=z(Pt),r=z(xt),i=z(Cy,{optional:!0});if(this._options=x(x({},wy),i),this.modalityDetected=this._modality.pipe(Cl(1)),this.modalityChanged=this.modalityDetected.pipe(bl()),this._platform.isBrowser){let o=z(gr).createRenderer(null,null);this._listenerCleanups=n.runOutsideAngular(()=>[An(o,r,"keydown",this._onKeydown,jc),An(o,r,"mousedown",this._onMousedown,jc),An(o,r,"touchstart",this._onTouchstart,jc)])}}ngOnDestroy(){this._modality.complete(),this._listenerCleanups?.forEach(n=>n())}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),is=function(t){return t[t.IMMEDIATE=0]="IMMEDIATE",t[t.EVENTUAL=1]="EVENTUAL",t}(is||{}),Ty=new tn("cdk-focus-monitor-default-options"),rs=up({passive:!0,capture:!0}),fp=(()=>{class t{_ngZone=z(Pt);_platform=z(rn);_inputModalityDetector=z(Sy);_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=z(xt,{optional:!0});_stopInputModalityDetector=new _t;constructor(){let n=z(Ty,{optional:!0});this._detectionMode=n?.detectionMode||is.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=$l(i)||this._getDocument(),s=this._elementInfo.get(i);if(s)return r&&(s.checkChildren=!0),s.subject;let c={checkChildren:r,subject:new _t,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===is.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===is.IMMEDIATE){clearTimeout(this._originTimeoutId);let i=this._originFromTouchInteraction?dp: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,rs),r.addEventListener("blur",this._rootNodeFocusAndBlurListener,rs)}),this._rootNodeFocusListenerCount.set(r,i+1),++this._monitoredElementCount===1&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(hr(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,rs),r.removeEventListener("blur",this._rootNodeFocusAndBlurListener,rs),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=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var pp=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Me({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}
|
|
32
|
-
`],encapsulation:2,changeDetection:0})}return t})();var Gc=(()=>{class t{_platform=z(rn);constructor(){}isDisabled(n){return n.hasAttribute("disabled")}isVisible(n){return xy(n)&&getComputedStyle(n).visibility==="visible"}isTabbable(n){if(!this._platform.isBrowser)return!1;let r=Iy(Ly(n));if(r&&(hp(r)===-1||!this.isVisible(r)))return!1;let i=n.nodeName.toLowerCase(),o=hp(n);return n.hasAttribute("contenteditable")?o!==-1:i==="iframe"||i==="object"||this._platform.WEBKIT&&this._platform.IOS&&!My(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 Py(n)&&!this.isDisabled(n)&&(r?.ignoreVisibility||this.isVisible(n))}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Iy(t){try{return t.frameElement}catch{return null}}function xy(t){return!!(t.offsetWidth||t.offsetHeight||typeof t.getClientRects=="function"&&t.getClientRects().length)}function Oy(t){let e=t.nodeName.toLowerCase();return e==="input"||e==="select"||e==="button"||e==="textarea"}function Ay(t){return Ny(t)&&t.type=="hidden"}function Dy(t){return Ry(t)&&t.hasAttribute("href")}function Ny(t){return t.nodeName.toLowerCase()=="input"}function Ry(t){return t.nodeName.toLowerCase()=="a"}function mp(t){if(!t.hasAttribute("tabindex")||t.tabIndex===void 0)return!1;let e=t.getAttribute("tabindex");return!!(e&&!isNaN(parseInt(e,10)))}function hp(t){if(!mp(t))return null;let e=parseInt(t.getAttribute("tabindex")||"",10);return isNaN(e)?-1:e}function My(t){let e=t.nodeName.toLowerCase(),n=e==="input"&&t.type;return n==="text"||n==="password"||e==="select"||e==="textarea"}function Py(t){return Ay(t)?!1:Oy(t)||Dy(t)||t.hasAttribute("contenteditable")||mp(t)}function Ly(t){return t.ownerDocument&&t.ownerDocument.defaultView||window}var $c=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?mr(e,{injector:this._injector}):setTimeout(e)}},gp=(()=>{class t{_checker=z(Gc);_ngZone=z(Pt);_document=z(xt);_injector=z(Mt);constructor(){z(ni).load(pp)}create(n,r=!1){return new $c(n,this._checker,this._ngZone,this._document,r,this._injector)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Wc(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}function st(t){return t==null?"":typeof t=="string"?t:`${t}px`}function _p(t,...e){return e.length?e.some(n=>t[n]):t.altKey||t.shiftKey||t.ctrlKey||t.metaKey}var vp=Yl(),Yc=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=st(-this._previousScrollPosition.left),e.style.top=st(-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"),vp&&(r.scrollBehavior=i.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),vp&&(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 zc=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(El(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())}},os=class{enable(){}disable(){}attach(){}};function Kc(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 yp(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 Xc=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();Kc(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}},ky=(()=>{class t{_scrollDispatcher=z(zl);_viewportRuler=z(Rs);_ngZone=z(Pt);_document=z(xt);constructor(){}noop=()=>new os;close=n=>new zc(this._scrollDispatcher,this._ngZone,this._viewportRuler,n);block=()=>new Yc(this._viewportRuler,this._document);reposition=n=>new Xc(this._scrollDispatcher,this._viewportRuler,this._ngZone,n);static \u0275fac=function(r){return new(r||t)};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Di=class{positionStrategy;scrollStrategy=new os;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 qc=class{connectionPair;scrollableViewProperties;constructor(e,n){this.connectionPair=e,this.scrollableViewProperties=n}};var Tp=(()=>{class t{_attachedOverlays=[];_document=z(xt);_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=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Vy=(()=>{class t extends Tp{_ngZone=z(Pt);_renderer=z(gr).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=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),By=(()=>{class t extends Tp{_platform=z(rn);_ngZone=z(Pt);_renderer=z(gr).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(()=>[An(this._renderer,r,"pointerdown",this._pointerDownListener,i),An(this._renderer,r,"click",this._clickListener,i),An(this._renderer,r,"auxclick",this._clickListener,i),An(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(Ep(c.overlayElement,r)||Ep(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=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Ep(t,e){let n=typeof ShadowRoot<"u"&&ShadowRoot,r=e;for(;r;){if(r===t)return!0;r=n&&r instanceof ShadowRoot?r.host:r.parentNode}return!1}var Ip=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Me({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}
|
|
33
|
-
`],encapsulation:2,changeDetection:0})}return t})(),ss=(()=>{class t{_platform=z(rn);_containerElement;_document=z(xt);_styleLoader=z(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||Wc()){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),Wc()?r.setAttribute("platform","test"):this._platform.isBrowser||r.setAttribute("platform","server"),this._document.body.appendChild(r),this._containerElement=r}_loadStyles(){this._styleLoader.load(Ip)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Zc=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()}},Kr=class{_portalOutlet;_host;_pane;_config;_ngZone;_keyboardDispatcher;_document;_location;_outsideClickDispatcher;_animationsDisabled;_injector;_renderer;_backdropClick=new _t;_attachments=new _t;_detachments=new _t;_positionStrategy;_scrollStrategy;_locationChanges=Qr.EMPTY;_backdropRef=null;_previousHostParent;_keydownEvents=new _t;_outsidePointerEvents=new _t;_renders=new _t;_afterRenderRef;_afterNextRenderRef;constructor(e,n,r,i,o,s,c,u,d,_=!1,h,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=_,this._injector=h,this._renderer=E,i.scrollStrategy&&(this._scrollStrategy=i.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=i.positionStrategy,this._afterRenderRef=Ds(()=>Nl(()=>{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=mr(()=>{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=x(x({},this._config),e),this._updateElementSize()}setDirection(e){this._config=Ee(x({},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=st(this._config.width),e.height=st(this._config.height),e.minWidth=st(this._config.minWidth),e.minHeight=st(this._config.minHeight),e.maxWidth=st(this._config.maxWidth),e.maxHeight=st(this._config.maxHeight)}_togglePointerEvents(e){this._pane.style.pointerEvents=e?"":"none"}_attachBackdrop(){let e="cdk-overlay-backdrop-showing";this._backdropRef?.dispose(),this._backdropRef=new Zc(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=Ms(n||[]).filter(o=>!!o);i.length&&(r?e.classList.add(...i):e.classList.remove(...i))}_detachContentWhenEmpty(){this._ngZone.runOutsideAngular(()=>{let e=this._renders.pipe(hr(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?.()}},bp="cdk-overlay-connected-position-bounding-box",Uy=/([A-Za-z%]+)$/,Jc=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 _t;_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(bp),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),_=this._getOverlayFit(d,n,r,c);if(_.isCompletelyWithinViewport){this._isPushed=!1,this._applyPosition(c,u);return}if(this._canFitWithFlexibleDimensions(_,d,r)){o.push({position:c,origin:u,overlayRect:n,boundingBoxRect:this._calculateBoundingBoxRect(u,c)});continue}(!s||s.overlayFit.visibleArea<_.visibleArea)&&(s={overlayFit:_,overlayPoint:d,originPoint:u,position:c,overlayRect:n})}if(o.length){let c=null,u=-1;for(let d of o){let _=d.boundingBoxRect.width*d.boundingBoxRect.height*(d.position.weight||1);_>u&&(u=_,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&&dr(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(bp),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=wp(n),{x:s,y:c}=e,u=this._getOffset(i,"x"),d=this._getOffset(i,"y");u&&(s+=u),d&&(c+=d);let _=0-s,h=s+o.width-r.width,E=0-c,C=c+o.height-r.height,N=this._subtractOverflows(o.width,_,h),V=this._subtractOverflows(o.height,E,C),B=N*V;return{visibleArea:B,isCompletelyWithinViewport:o.width*o.height===B,fitsInViewportVertically:V===o.height,fitsInViewportHorizontally:N==o.width}}_canFitWithFlexibleDimensions(e,n,r){if(this._hasFlexibleDimensions){let i=r.bottom-n.y,o=r.right-n.x,s=Cp(this._overlayRef.getConfig().minHeight),c=Cp(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=wp(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),_=0,h=0;return i.width<=o.width?_=d||-s:_=e.x<this._viewportMargin?o.left-r.left-e.x:0,i.height<=o.height?h=u||-c:h=e.y<this._viewportMargin?o.top-r.top-e.y:0,this._previousPushAmount={x:_,y:h},{x:e.x+_,y:e.y+h}}_applyPosition(e,n){if(this._setTransformOrigin(e),this._setOverlayElementStyles(n,e),this._setBoundingBoxStyles(n,e),e.panelClass&&this._addPanelClasses(e.panelClass),this._positionChanges.observers.length){let r=this._getScrollVisibility();if(e!==this._lastPosition||!this._lastScrollVisibility||!Hy(this._lastScrollVisibility,r)){let i=new qc(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),N=this._lastBoundingBoxSize.height;o=C*2,s=e.y-C,o>N&&!this._isInitialRender&&!this._growAfterOpen&&(s=e.y-N/2)}let u=n.overlayX==="start"&&!i||n.overlayX==="end"&&i,d=n.overlayX==="end"&&!i||n.overlayX==="start"&&i,_,h,E;if(d)E=r.width-e.x+this._viewportMargin*2,_=e.x-this._viewportMargin;else if(u)h=e.x,_=r.right-e.x;else{let C=Math.min(r.right-e.x+r.left,e.x),N=this._lastBoundingBoxSize.width;_=C*2,h=e.x-C,_>N&&!this._isInitialRender&&!this._growAfterOpen&&(h=e.x-N/2)}return{top:s,left:h,bottom:c,right:E,width:_,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=st(r.height),i.top=st(r.top),i.bottom=st(r.bottom),i.width=st(r.width),i.left=st(r.left),i.right=st(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=st(o)),s&&(i.maxWidth=st(s))}this._lastBoundingBoxSize=r,dr(this._boundingBox.style,i)}_resetBoundingBoxStyles(){dr(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){dr(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 _=this._viewportRuler.getViewportScrollPosition();dr(r,this._getExactOverlayY(n,e,_)),dr(r,this._getExactOverlayX(n,e,_))}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=st(s.maxHeight):o&&(r.maxHeight="")),s.maxWidth&&(i?r.maxWidth=st(s.maxWidth):o&&(r.maxWidth="")),dr(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=st(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=st(o.x);return i}_getScrollVisibility(){let e=this._getOriginRect(),n=this._pane.getBoundingClientRect(),r=this._scrollables.map(i=>i.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:yp(e,r),isOriginOutsideView:Kc(e,r),isOverlayClipped:yp(n,r),isOverlayOutsideView:Kc(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&&Ms(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 Tt)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 dr(t,e){for(let n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function Cp(t){if(typeof t!="number"&&t!=null){let[e,n]=t.split(Uy);return!n||n==="px"?parseFloat(e):null}return t||null}function wp(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 Hy(t,e){return t===e?!0:t.isOriginClipped===e.isOriginClipped&&t.isOriginOutsideView===e.isOriginOutsideView&&t.isOverlayClipped===e.isOverlayClipped&&t.isOverlayOutsideView===e.isOverlayOutsideView}var Sp="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(Sp),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"),_=this._xPosition,h=this._xOffset,E=this._overlayRef.getConfig().direction==="rtl",C="",N="",V="";u?V="flex-start":_==="center"?(V="center",E?N=h:C=h):E?_==="left"||_==="end"?(V="flex-end",C=h):(_==="right"||_==="start")&&(V="flex-start",N=h):_==="left"||_==="start"?(V="flex-start",C=h):(_==="right"||_==="end")&&(V="flex-end",N=h),e.position=this._cssPosition,e.marginLeft=u?"0":C,e.marginTop=d?"0":this._topOffset,e.marginBottom=this._bottomOffset,e.marginRight=u?"0":N,n.justifyContent=V,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(Sp),r.justifyContent=r.alignItems=e.marginTop=e.marginBottom=e.marginLeft=e.marginRight=e.position="",this._overlayRef=null,this._isDisposed=!0}},jy=(()=>{class t{_viewportRuler=z(Rs);_document=z(xt);_platform=z(rn);_overlayContainer=z(ss);constructor(){}global(){return new Qc}flexibleConnectedTo(n){return new Jc(n,this._viewportRuler,this._document,this._platform,this._overlayContainer)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),el=(()=>{class t{scrollStrategies=z(ky);_overlayContainer=z(ss);_positionBuilder=z(jy);_keyboardDispatcher=z(Vy);_injector=z(Mt);_ngZone=z(Pt);_document=z(xt);_directionality=z(ri);_location=z(Vl);_outsideClickDispatcher=z(By);_animationsModuleType=z(Dl,{optional:!0});_idGenerator=z($i);_renderer=z(gr).createRenderer(null,null);_appRef;_styleLoader=z(ni);constructor(){}create(n){this._styleLoader.load(Ip);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 Kr(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 ns(n,null,this._appRef,this._injector,this._document)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function $y(t,e){}var Xr=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 Gy=(()=>{class t extends zr{_elementRef=z(Tt);_focusTrapFactory=z(gp);_config;_interactivityChecker=z(Gc);_ngZone=z(Pt);_overlayRef=z(Kr);_focusMonitor=z(fp);_renderer=z(Ss);_platform=z(rn);_document=z(xt,{optional:!0});_portalOutlet;_focusTrap=null;_elementFocusedBeforeDialogWasOpened=null;_closeInteractionType=null;_ariaLabelledByQueue=[];_changeDetectorRef=z(Zn);_injector=z(Mt);_isDestroyed=!1;constructor(){super(),this._config=z(Xr,{optional:!0})||new Xr,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||mr(()=>{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=Me({type:t,selectors:[["cdk-dialog-container"]],viewQuery:function(r,i){if(r&1&&Tn(Hc,7),r&2){let o;In(o=xn())&&(i._portalOutlet=o.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(r,i){r&2&&Cn("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:[Ct],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(r,i){r&1&&xe(0,$y,0,0,"ng-template",0)},dependencies:[Hc],styles:[`.cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}
|
|
34
|
-
`],encapsulation:2})}return t})(),
|
|
31
|
+
`)+" ".concat(u,"\\").concat(d,"/"))}e.seenObjects[e.seenObjects.length-1].obj=t}if(Array.isArray(t))return dy(t,e);if(t===void 0)return null;if(t instanceof Date||$v(t)){var _=t.getTime(),h=_>-1&&_<2534023188e5;return e.legacy?e.relaxed&&h?{$date:t.getTime()}:{$date:Xf(t)}:e.relaxed&&h?{$date:Xf(t)}:{$date:{$numberLong:t.getTime().toString()}}}if(typeof t=="number"&&(!e.relaxed||!isFinite(t))){if(Math.floor(t)===t){var E=t>=ap&&t<=sp,C=t>=lp&&t<=cp;if(E)return{$numberInt:t.toString()};if(C)return{$numberLong:t.toString()}}return{$numberDouble:t.toString()}}if(t instanceof RegExp||jv(t)){var N=t.flags;if(N===void 0){var k=t.toString().match(/[gimuy]*$/);k&&(N=k[0])}var B=new xi(t.source,N);return B.toExtendedJSON(e)}return t!=null&&typeof t=="object"?py(t,e):t}var fy={Binary:function(t){return new dr(t.value(),t.sub_type)},Code:function(t){return new Jo(t.code,t.scope)},DBRef:function(t){return new Ti(t.collection||t.namespace,t.oid,t.db,t.fields)},Decimal128:function(t){return new Vc(t.bytes)},Double:function(t){return new Qo(t.value)},Int32:function(t){return new es(t.value)},Long:function(t){return ae.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 kc},MinKey:function(){return new Bc},ObjectID:function(t){return new Rt(t)},ObjectId:function(t){return new Rt(t)},BSONRegExp:function(t){return new xi(t.pattern,t.options)},Symbol:function(t){return new Uc(t.value)},Timestamp:function(t){return op.fromBits(t.low,t.high)}};function py(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=Yn(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(ly(t)){var s=t;if(typeof s.toExtendedJSON!="function"){var c=fy[t._bsontype];if(!c)throw new tt("Unrecognized or invalid _bsontype: "+t._bsontype);s=c(s)}return n==="Code"&&s.scope?s=new Jo(s.code,Yn(s.scope,e)):n==="DBRef"&&s.oid&&(s=new Ti(Yn(s.collection,e),Yn(s.oid,e),Yn(s.db,e),Yn(s.fields,e))),s.toExtendedJSON(e)}else throw new ur("_bsontype must be a string, but was: "+typeof n)}var qf;(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 up(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}]}),_=Yn(o,d);return JSON.stringify(_,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})(qf||(qf={}));var Zf,Jf=ep();Jf.Map?Zf=Jf.Map:Zf=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 AD=ae.fromNumber(Wv),DD=ae.fromNumber(Yv);var Mc=new Uint8Array(8),ND=new DataView(Mc.buffer,Mc.byteOffset,Mc.byteLength);var hy=1024*1024*17,RD=Fe.alloc(hy);var ts=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 Rt(i):new Rt,this.occurred=new Date,r&&(this.trigger=new ts(r)),this.newEvent=!i}trigger;items;videos;id;newEvent;cart;currentItem;deviceProps;landingPage;occurred;page;sessionID;sessionNumber;locale};function my(t,e){if(t&1&&(G(0,"span",1),Oe(1),W()),t&2){K();let n=Xe(0);P(),ln(n.heading)}}function gy(t,e){if(t&1&&(G(0,"span",2),Oe(1),W()),t&2){K();let n=Xe(0);P(),ln(n.subHeading)}}var $r=class t{card=Xn.required();linkClicked=Al();linkAfterSanity(){return this.card()?.buttonLink?.startsWith("https")?this.card().buttonLink:null}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Me({type:t,selectors:[["cooee-video-card"]],inputs:{card:[1,"card"]},outputs:{linkClicked:"linkClicked"},decls:6,vars:6,consts:[[1,"video-card-details"],[1,"heading"],[1,"subheading"],["rel","noopener noreferrer",1,"cta-button",3,"click","href","target"]],template:function(n,r){if(n&1){let i=Ke();lt(0),G(1,"div",0),xe(2,my,2,1,"span",1)(3,gy,2,1,"span",2),G(4,"a",3),Pe("click",function(){return Ne(i),Re(r.linkClicked.emit())}),Oe(5),W()()}if(n&2){let i=vt(r.card());P(2),Se(i!=null&&i.heading?2:-1),P(),Se(i!=null&&i.subHeading?3:-1),P(),le("href",r.linkAfterSanity(),ut)("target",i.newTab?"_blank":"_self"),P(),Tt(" ",i==null?null:i.buttonTitle," ")}},styles:["[_nghost-%COMP%]{display:block}.video-card-details[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:3.75px;font-size:14px;line-height:normal}.video-card-details[_ngcontent-%COMP%] .cta-button[_ngcontent-%COMP%]{text-align:center;background-color:#fff;border-radius:var(--lc-button-radius);padding:7.5px 15px;font-weight:500;cursor:pointer;color:var(--lc-color-button);font-size:12px;border:0;text-decoration:none}.video-card-details[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%], .video-card-details[_ngcontent-%COMP%] .subheading[_ngcontent-%COMP%]{text-align:start;color:#000;font-weight:600;overflow:hidden}.video-card-details[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%]{font-size:18px}.video-card-details[_ngcontent-%COMP%] .subheading[_ngcontent-%COMP%]{font-size:16px}"],changeDetection:0})};function _y(t,e){t&1&&(Bt(),be(0,"path",3))}function vy(t,e){t&1&&(Bt(),be(0,"path",4))}var Gr=class t{muted;videoEl;toggled=new ct;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=Me({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&&(G(0,"button",0),Pe("click",function(o){return r.toggleMute(o)}),Bt(),G(1,"svg",1),be(2,"path",2),xe(3,_y,1,0,":svg:path",3)(4,vy,1,0,":svg:path",4),W()()),n&2&&(P(3),Se(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 yy=t=>({"lc:cursor-grab":t}),Ey=(t,e)=>e.url;function by(t,e){if(t&1&&be(0,"source",11),t&2){let n=e.$implicit;Sn("type",n.mimeType),le("src",n.url,ut)}}var ns=class t{constructor(e){this.elementRef=e}video;closeClicked=new ct;videoClicked=new ct;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)(nn(It))};static \u0275cmp=Me({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"],["type","button",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&&(G(0,"div",0),Pe("click",function(){return r.onVideoClick()})("keyup",function(){return r.onVideoClick()})("cdkDragMoved",function(){return r.isDragging=!0}),G(1,"button",1),Pe("click",function(o){return o.stopPropagation(),r.close()}),Bt(),G(2,"svg",2),be(3,"path",3)(4,"path",4),W()(),Kn(),G(5,"div",5)(6,"div",6),Bt(),G(7,"svg",7),be(8,"path",8),W()(),Kn(),G(9,"div",9),Oe(10,"Tap to unmute"),W()(),G(11,"video",10),rt(12,by,1,2,"source",11,Ey),W()()),n&2&&(le("ngClass",Ui(3,yy,r.isDragging))("cdkDragBoundary","body"),P(11),le("muted",!0),P(),it(r.video.sources))},dependencies:[Bn,Xl],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 Ai=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}},Wr=class extends Ai{component;viewContainerRef;injector;componentFactoryResolver;projectableNodes;constructor(e,n,r,i,o){super(),this.component=e,this.viewContainerRef=n,this.injector=r,this.projectableNodes=o}},Yr=class extends Ai{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()}},Hc=class extends Ai{element;constructor(e){super(),this.element=e instanceof It?e.nativeElement:e}},zr=class{_attachedPortal;_disposeFn;_isDisposed=!1;hasAttached(){return!!this._attachedPortal}attach(e){if(e instanceof Wr)return this._attachedPortal=e,this.attachComponentPortal(e);if(e instanceof Yr)return this._attachedPortal=e,this.attachTemplatePortal(e);if(this.attachDomPortal&&e instanceof Hc)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 rs=class extends zr{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(Os,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||Mt.NULL,o=i.get(Fi,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 jc=(()=>{class t extends zr{_moduleRef=z(Os,{optional:!0});_document=z(xt);_viewContainerRef=z(Ts);_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 ct;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:[Ct]})}return t})();var Di;function Cy(){if(Di==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>Di=!0}))}finally{Di=Di||!1}return Di}function dp(t){return Cy()?t:!!t.capture}var wy=new tn("cdk-input-modality-detector-options"),Sy={ignoreKeys:[18,17,224,91,16]},fp=650,$c={passive:!0,capture:!0},Iy=(()=>{class t{_platform=z(rn);_listenerCleanups;modalityDetected;modalityChanged;get mostRecentModality(){return this._modality.value}_mostRecentTarget=null;_modality=new ml(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<fp||(this._modality.next(Wl(n)?"keyboard":"mouse"),this._mostRecentTarget=On(n))};_onTouchstart=n=>{if(Yl(n)){this._modality.next("keyboard");return}this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=On(n)};constructor(){let n=z(Pt),r=z(xt),i=z(wy,{optional:!0});if(this._options=x(x({},Sy),i),this.modalityDetected=this._modality.pipe(wl(1)),this.modalityChanged=this.modalityDetected.pipe(Cl()),this._platform.isBrowser){let o=z(_r).createRenderer(null,null);this._listenerCleanups=n.runOutsideAngular(()=>[An(o,r,"keydown",this._onKeydown,$c),An(o,r,"mousedown",this._onMousedown,$c),An(o,r,"touchstart",this._onTouchstart,$c)])}}ngOnDestroy(){this._modality.complete(),this._listenerCleanups?.forEach(n=>n())}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),os=function(t){return t[t.IMMEDIATE=0]="IMMEDIATE",t[t.EVENTUAL=1]="EVENTUAL",t}(os||{}),Ty=new tn("cdk-focus-monitor-default-options"),is=dp({passive:!0,capture:!0}),pp=(()=>{class t{_ngZone=z(Pt);_platform=z(rn);_inputModalityDetector=z(Iy);_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=z(xt,{optional:!0});_stopInputModalityDetector=new _t;constructor(){let n=z(Ty,{optional:!0});this._detectionMode=n?.detectionMode||os.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=$i(n);if(!this._platform.isBrowser||i.nodeType!==1)return Pi();let o=Gl(i)||this._getDocument(),s=this._elementInfo.get(i);if(s)return r&&(s.checkChildren=!0),s.subject;let c={checkChildren:r,subject:new _t,rootNode:o};return this._elementInfo.set(i,c),this._registerGlobalListeners(c),c.subject}stopMonitoring(n){let r=$i(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=$i(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===os.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===os.IMMEDIATE){clearTimeout(this._originTimeoutId);let i=this._originFromTouchInteraction?fp: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,is),r.addEventListener("blur",this._rootNodeFocusAndBlurListener,is)}),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,is),r.removeEventListener("blur",this._rootNodeFocusAndBlurListener,is),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=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var hp=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Me({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}
|
|
32
|
+
`],encapsulation:2,changeDetection:0})}return t})();var Wc=(()=>{class t{_platform=z(rn);constructor(){}isDisabled(n){return n.hasAttribute("disabled")}isVisible(n){return Oy(n)&&getComputedStyle(n).visibility==="visible"}isTabbable(n){if(!this._platform.isBrowser)return!1;let r=xy(Fy(n));if(r&&(mp(r)===-1||!this.isVisible(r)))return!1;let i=n.nodeName.toLowerCase(),o=mp(n);return n.hasAttribute("contenteditable")?o!==-1:i==="iframe"||i==="object"||this._platform.WEBKIT&&this._platform.IOS&&!Py(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 Ly(n)&&!this.isDisabled(n)&&(r?.ignoreVisibility||this.isVisible(n))}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function xy(t){try{return t.frameElement}catch{return null}}function Oy(t){return!!(t.offsetWidth||t.offsetHeight||typeof t.getClientRects=="function"&&t.getClientRects().length)}function Ay(t){let e=t.nodeName.toLowerCase();return e==="input"||e==="select"||e==="button"||e==="textarea"}function Dy(t){return Ry(t)&&t.type=="hidden"}function Ny(t){return My(t)&&t.hasAttribute("href")}function Ry(t){return t.nodeName.toLowerCase()=="input"}function My(t){return t.nodeName.toLowerCase()=="a"}function gp(t){if(!t.hasAttribute("tabindex")||t.tabIndex===void 0)return!1;let e=t.getAttribute("tabindex");return!!(e&&!isNaN(parseInt(e,10)))}function mp(t){if(!gp(t))return null;let e=parseInt(t.getAttribute("tabindex")||"",10);return isNaN(e)?-1:e}function Py(t){let e=t.nodeName.toLowerCase(),n=e==="input"&&t.type;return n==="text"||n==="password"||e==="select"||e==="textarea"}function Ly(t){return Dy(t)?!1:Ay(t)||Ny(t)||t.hasAttribute("contenteditable")||gp(t)}function Fy(t){return t.ownerDocument&&t.ownerDocument.defaultView||window}var Gc=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)}},_p=(()=>{class t{_checker=z(Wc);_ngZone=z(Pt);_document=z(xt);_injector=z(Mt);constructor(){z(ni).load(hp)}create(n,r=!1){return new Gc(n,this._checker,this._ngZone,this._document,r,this._injector)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Yc(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}function st(t){return t==null?"":typeof t=="string"?t:`${t}px`}function vp(t,...e){return e.length?e.some(n=>t[n]):t.altKey||t.shiftKey||t.ctrlKey||t.metaKey}var yp=zl(),zc=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=st(-this._previousScrollPosition.left),e.style.top=st(-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"),yp&&(r.scrollBehavior=i.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),yp&&(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 Kc=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(bl(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())}},ss=class{enable(){}disable(){}attach(){}};function Xc(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 Ep(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 qc=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();Xc(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}},ky=(()=>{class t{_scrollDispatcher=z(Kl);_viewportRuler=z(Ms);_ngZone=z(Pt);_document=z(xt);constructor(){}noop=()=>new ss;close=n=>new Kc(this._scrollDispatcher,this._ngZone,this._viewportRuler,n);block=()=>new zc(this._viewportRuler,this._document);reposition=n=>new qc(this._scrollDispatcher,this._viewportRuler,this._ngZone,n);static \u0275fac=function(r){return new(r||t)};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Ni=class{positionStrategy;scrollStrategy=new ss;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 Tp=(()=>{class t{_attachedOverlays=[];_document=z(xt);_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=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),By=(()=>{class t extends Tp{_ngZone=z(Pt);_renderer=z(_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=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Uy=(()=>{class t extends Tp{_platform=z(rn);_ngZone=z(Pt);_renderer=z(_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(()=>[An(this._renderer,r,"pointerdown",this._pointerDownListener,i),An(this._renderer,r,"click",this._clickListener,i),An(this._renderer,r,"auxclick",this._clickListener,i),An(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(bp(c.overlayElement,r)||bp(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=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function bp(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 xp=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Me({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}
|
|
33
|
+
`],encapsulation:2,changeDetection:0})}return t})(),as=(()=>{class t{_platform=z(rn);_containerElement;_document=z(xt);_styleLoader=z(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||Yc()){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),Yc()?r.setAttribute("platform","test"):this._platform.isBrowser||r.setAttribute("platform","server"),this._document.body.appendChild(r),this._containerElement=r}_loadStyles(){this._styleLoader.load(xp)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Jc=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()}},Kr=class{_portalOutlet;_host;_pane;_config;_ngZone;_keyboardDispatcher;_document;_location;_outsideClickDispatcher;_animationsDisabled;_injector;_renderer;_backdropClick=new _t;_attachments=new _t;_detachments=new _t;_positionStrategy;_scrollStrategy;_locationChanges=Qr.EMPTY;_backdropRef=null;_previousHostParent;_keydownEvents=new _t;_outsidePointerEvents=new _t;_renders=new _t;_afterRenderRef;_afterNextRenderRef;constructor(e,n,r,i,o,s,c,u,d,_=!1,h,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=_,this._injector=h,this._renderer=E,i.scrollStrategy&&(this._scrollStrategy=i.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=i.positionStrategy,this._afterRenderRef=Ns(()=>Rl(()=>{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=x(x({},this._config),e),this._updateElementSize()}setDirection(e){this._config=Ee(x({},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=st(this._config.width),e.height=st(this._config.height),e.minWidth=st(this._config.minWidth),e.minHeight=st(this._config.minHeight),e.maxWidth=st(this._config.maxWidth),e.maxHeight=st(this._config.maxHeight)}_togglePointerEvents(e){this._pane.style.pointerEvents=e?"":"none"}_attachBackdrop(){let e="cdk-overlay-backdrop-showing";this._backdropRef?.dispose(),this._backdropRef=new Jc(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=Ps(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(Li(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?.()}},Cp="cdk-overlay-connected-position-bounding-box",Hy=/([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 _t;_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(Cp),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),_=this._getOverlayFit(d,n,r,c);if(_.isCompletelyWithinViewport){this._isPushed=!1,this._applyPosition(c,u);return}if(this._canFitWithFlexibleDimensions(_,d,r)){o.push({position:c,origin:u,overlayRect:n,boundingBoxRect:this._calculateBoundingBoxRect(u,c)});continue}(!s||s.overlayFit.visibleArea<_.visibleArea)&&(s={overlayFit:_,overlayPoint:d,originPoint:u,position:c,overlayRect:n})}if(o.length){let c=null,u=-1;for(let d of o){let _=d.boundingBoxRect.width*d.boundingBoxRect.height*(d.position.weight||1);_>u&&(u=_,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(Cp),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=Sp(n),{x:s,y:c}=e,u=this._getOffset(i,"x"),d=this._getOffset(i,"y");u&&(s+=u),d&&(c+=d);let _=0-s,h=s+o.width-r.width,E=0-c,C=c+o.height-r.height,N=this._subtractOverflows(o.width,_,h),k=this._subtractOverflows(o.height,E,C),B=N*k;return{visibleArea:B,isCompletelyWithinViewport:o.width*o.height===B,fitsInViewportVertically:k===o.height,fitsInViewportHorizontally:N==o.width}}_canFitWithFlexibleDimensions(e,n,r){if(this._hasFlexibleDimensions){let i=r.bottom-n.y,o=r.right-n.x,s=wp(this._overlayRef.getConfig().minHeight),c=wp(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=Sp(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),_=0,h=0;return i.width<=o.width?_=d||-s:_=e.x<this._viewportMargin?o.left-r.left-e.x:0,i.height<=o.height?h=u||-c:h=e.y<this._viewportMargin?o.top-r.top-e.y:0,this._previousPushAmount={x:_,y:h},{x:e.x+_,y:e.y+h}}_applyPosition(e,n){if(this._setTransformOrigin(e),this._setOverlayElementStyles(n,e),this._setBoundingBoxStyles(n,e),e.panelClass&&this._addPanelClasses(e.panelClass),this._positionChanges.observers.length){let r=this._getScrollVisibility();if(e!==this._lastPosition||!this._lastScrollVisibility||!jy(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),N=this._lastBoundingBoxSize.height;o=C*2,s=e.y-C,o>N&&!this._isInitialRender&&!this._growAfterOpen&&(s=e.y-N/2)}let u=n.overlayX==="start"&&!i||n.overlayX==="end"&&i,d=n.overlayX==="end"&&!i||n.overlayX==="start"&&i,_,h,E;if(d)E=r.width-e.x+this._viewportMargin*2,_=e.x-this._viewportMargin;else if(u)h=e.x,_=r.right-e.x;else{let C=Math.min(r.right-e.x+r.left,e.x),N=this._lastBoundingBoxSize.width;_=C*2,h=e.x-C,_>N&&!this._isInitialRender&&!this._growAfterOpen&&(h=e.x-N/2)}return{top:s,left:h,bottom:c,right:E,width:_,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=st(r.height),i.top=st(r.top),i.bottom=st(r.bottom),i.width=st(r.width),i.left=st(r.left),i.right=st(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=st(o)),s&&(i.maxWidth=st(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 _=this._viewportRuler.getViewportScrollPosition();fr(r,this._getExactOverlayY(n,e,_)),fr(r,this._getExactOverlayX(n,e,_))}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=st(s.maxHeight):o&&(r.maxHeight="")),s.maxWidth&&(i?r.maxWidth=st(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=st(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=st(o.x);return i}_getScrollVisibility(){let e=this._getOriginRect(),n=this._pane.getBoundingClientRect(),r=this._scrollables.map(i=>i.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:Ep(e,r),isOriginOutsideView:Xc(e,r),isOverlayClipped:Ep(n,r),isOverlayOutsideView:Xc(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&&Ps(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 It)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 wp(t){if(typeof t!="number"&&t!=null){let[e,n]=t.split(Hy);return!n||n==="px"?parseFloat(e):null}return t||null}function Sp(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 jy(t,e){return t===e?!0:t.isOriginClipped===e.isOriginClipped&&t.isOriginOutsideView===e.isOriginOutsideView&&t.isOverlayClipped===e.isOverlayClipped&&t.isOverlayOutsideView===e.isOverlayOutsideView}var Ip="cdk-global-overlay-wrapper",el=class{_overlayRef;_cssPosition="static";_topOffset="";_bottomOffset="";_alignItems="";_xPosition="";_xOffset="";_width="";_height="";_isDisposed=!1;attach(e){let n=e.getConfig();this._overlayRef=e,this._width&&!n.width&&e.updateSize({width:this._width}),this._height&&!n.height&&e.updateSize({height:this._height}),e.hostElement.classList.add(Ip),this._isDisposed=!1}top(e=""){return this._bottomOffset="",this._topOffset=e,this._alignItems="flex-start",this}left(e=""){return this._xOffset=e,this._xPosition="left",this}bottom(e=""){return this._topOffset="",this._bottomOffset=e,this._alignItems="flex-end",this}right(e=""){return this._xOffset=e,this._xPosition="right",this}start(e=""){return this._xOffset=e,this._xPosition="start",this}end(e=""){return this._xOffset=e,this._xPosition="end",this}width(e=""){return this._overlayRef?this._overlayRef.updateSize({width:e}):this._width=e,this}height(e=""){return this._overlayRef?this._overlayRef.updateSize({height:e}):this._height=e,this}centerHorizontally(e=""){return this.left(e),this._xPosition="center",this}centerVertically(e=""){return this.top(e),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;let e=this._overlayRef.overlayElement.style,n=this._overlayRef.hostElement.style,r=this._overlayRef.getConfig(),{width:i,height:o,maxWidth:s,maxHeight:c}=r,u=(i==="100%"||i==="100vw")&&(!s||s==="100%"||s==="100vw"),d=(o==="100%"||o==="100vh")&&(!c||c==="100%"||c==="100vh"),_=this._xPosition,h=this._xOffset,E=this._overlayRef.getConfig().direction==="rtl",C="",N="",k="";u?k="flex-start":_==="center"?(k="center",E?N=h:C=h):E?_==="left"||_==="end"?(k="flex-end",C=h):(_==="right"||_==="start")&&(k="flex-start",N=h):_==="left"||_==="start"?(k="flex-start",C=h):(_==="right"||_==="end")&&(k="flex-end",N=h),e.position=this._cssPosition,e.marginLeft=u?"0":C,e.marginTop=d?"0":this._topOffset,e.marginBottom=this._bottomOffset,e.marginRight=u?"0":N,n.justifyContent=k,n.alignItems=d?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;let e=this._overlayRef.overlayElement.style,n=this._overlayRef.hostElement,r=n.style;n.classList.remove(Ip),r.justifyContent=r.alignItems=e.marginTop=e.marginBottom=e.marginLeft=e.marginRight=e.position="",this._overlayRef=null,this._isDisposed=!0}},$y=(()=>{class t{_viewportRuler=z(Ms);_document=z(xt);_platform=z(rn);_overlayContainer=z(as);constructor(){}global(){return new el}flexibleConnectedTo(n){return new Qc(n,this._viewportRuler,this._document,this._platform,this._overlayContainer)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),tl=(()=>{class t{scrollStrategies=z(ky);_overlayContainer=z(as);_positionBuilder=z($y);_keyboardDispatcher=z(By);_injector=z(Mt);_ngZone=z(Pt);_document=z(xt);_directionality=z(ri);_location=z(Bl);_outsideClickDispatcher=z(Uy);_animationsModuleType=z(Nl,{optional:!0});_idGenerator=z(Gi);_renderer=z(_r).createRenderer(null,null);_appRef;_styleLoader=z(ni);constructor(){}create(n){this._styleLoader.load(xp);let r=this._createHostElement(),i=this._createPaneElement(r),o=this._createPortalOutlet(i),s=new Ni(n);return s.direction=s.direction||this._directionality.value,new Kr(o,r,i,s,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher,this._animationsModuleType==="NoopAnimations",this._injector.get(Fi),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(Bi)),new rs(n,null,this._appRef,this._injector,this._document)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Gy(t,e){}var Xr=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 Wy=(()=>{class t extends zr{_elementRef=z(It);_focusTrapFactory=z(_p);_config;_interactivityChecker=z(Wc);_ngZone=z(Pt);_overlayRef=z(Kr);_focusMonitor=z(pp);_renderer=z(Is);_platform=z(rn);_document=z(xt,{optional:!0});_portalOutlet;_focusTrap=null;_elementFocusedBeforeDialogWasOpened=null;_closeInteractionType=null;_ariaLabelledByQueue=[];_changeDetectorRef=z(Zn);_injector=z(Mt);_isDestroyed=!1;constructor(){super(),this._config=z(Xr,{optional:!0})||new Xr,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=ji(),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=ji();return n===r||n.contains(r)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=ji()))}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Me({type:t,selectors:[["cdk-dialog-container"]],viewQuery:function(r,i){if(r&1&&In(jc,7),r&2){let o;Tn(o=xn())&&(i._portalOutlet=o.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(r,i){r&2&&cn("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:[Ct],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(r,i){r&1&&xe(0,Gy,0,0,"ng-template",0)},dependencies:[jc],styles:[`.cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}
|
|
34
|
+
`],encapsulation:2})}return t})(),pr=class{overlayRef;config;componentInstance;componentRef;containerInstance;disableClose;closed=new _t;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&&!vp(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}},Yy=new tn("DialogScrollStrategy",{providedIn:"root",factory:()=>{let t=z(tl);return()=>t.scrollStrategies.block()}}),rl=new tn("DialogData"),zy=new tn("DefaultDialogConfig");var Op=(()=>{class t{_overlay=z(tl);_injector=z(Mt);_defaultOptions=z(zy,{optional:!0});_parentDialog=z(t,{optional:!0,skipSelf:!0});_overlayContainer=z(as);_idGenerator=z(Gi);_openDialogsAtThisLevel=[];_afterAllClosedAtThisLevel=new _t;_afterOpenedAtThisLevel=new _t;_ariaHiddenElements=new Map;_scrollStrategy=z(Yy);get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}afterAllClosed=yl(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Sl(void 0)));constructor(){}open(n,r){let i=this._defaultOptions||new Xr;r=x(x({},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(){nl(this.openDialogs,n=>n.close())}getDialogById(n){return this.openDialogs.find(r=>r.id===n)}ngOnDestroy(){nl(this._openDialogsAtThisLevel,n=>{n.config.closeOnDestroy===!1&&this._removeOpenDialog(n,!1)}),nl(this._openDialogsAtThisLevel,n=>n.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(n){let r=new Ni({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:Xr,useValue:i},{provide:pr,useValue:r},{provide:Kr,useValue:n}],c;i.container?typeof i.container=="function"?c=i.container:(c=i.container.type,s.push(...i.container.providers(i))):c=Wy;let u=new Wr(c,i.viewContainerRef,Mt.create({parent:o||this._injector,providers:s}));return n.attach(u).instance}_attachDialogContent(n,r,i,o){if(n instanceof Vi){let s=this._createInjector(o,r,i,void 0),c={$implicit:o.data,dialogRef:r};o.templateContext&&(c=x(x({},c),typeof o.templateContext=="function"?o.templateContext():o.templateContext)),i.attachTemplatePortal(new Yr(n,null,c,s))}else{let s=this._createInjector(o,r,i,this._injector),c=i.attachComponentPortal(new Wr(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:rl,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:Pi()}}),Mt.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=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function nl(t,e){let n=t.length;for(;n--;)e(t[n])}var cs=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 Ky=xl;function Xy(t){return!!t[Ky]}var qy=Symbol("__destroy"),Mp=Symbol("__decoratorApplied");function Pp(t){return typeof t=="string"?Symbol(`__destroy__${t}`):qy}function Zy(t){t.prototype[Mp]=!0}function Lp(t,e){t[e]||(t[e]=new _t)}function Fp(t,e){t[e]&&(t[e].next(),t[e].complete(),t[e]=null)}function Vp(t){t instanceof Qr&&t.unsubscribe()}function Jy(t){Array.isArray(t)&&t.forEach(Vp)}function kp(t,e){return function(){if(t&&t.call(this),Fp(this,Pp()),e.arrayName&&Jy(this[e.arrayName]),e.checkProperties)for(let n in this)e.blackList?.includes(n)||Vp(this[n])}}function Qy(t,e){t.prototype.ngOnDestroy=kp(t.prototype.ngOnDestroy,e)}function e0(t,e){let n=t.\u0275pipe;n.onDestroy=kp(n.onDestroy,e)}function Bp(t={}){return e=>{Xy(e)?e0(e,t):Qy(e,t),Zy(e)}}var Dp=7,Np=Symbol("CheckerHasBeenSet");function t0(t,e){t[Np]||n0()||(Rp(()=>vl(Promise.resolve()).pipe(ws(()=>{let n;try{n=Dl(t)}catch{n=null}let r=n?.lView;if(r==null)return _l;let i=r[Dp]||(r[Dp]=[]),o=new _t;return i.push(function(){Rp(()=>{o.next(),o.complete()})}),o}),ws(()=>Promise.resolve())).subscribe(()=>{(e.observed??e.observers.length>0)&&console.warn(r0(t))})),t[Np]=!0)}function n0(){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 Rp(t){let e=Tl.Zone;return!!e&&typeof e.root?.run=="function"?e.root.run(t):t()}function r0(t){return`
|
|
35
35
|
The ${t.constructor.name} still has subscriptions that haven't been unsubscribed.
|
|
36
36
|
This may happen if the class extends another class decorated with @UntilDestroy().
|
|
37
37
|
The child class implements its own ngOnDestroy() method but doesn't call super.ngOnDestroy().
|
|
@@ -68,5 +68,5 @@ Url: ${vo(t)}`),!0}return!1}function ug(t,e){return e?.length?ho(t).some(n=>xr(n
|
|
|
68
68
|
super.ngOnDestroy();
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
`}var rl=!1;function r0(t,e,n){let r=t[e];if(rl&&typeof r!="function")throw new Error(`${t.constructor.name} is using untilDestroyed but doesn't implement ${e}`);Pp(t,n),t[e]=function(){r.apply(this,arguments),Lp(this,n),t[e]=r}}function Bp(t,e){return n=>{let r=Mp(e);typeof e=="string"?r0(t,e,r):(rl&&i0(t),Pp(t,r));let i=t[r];return rl&&e0(t,i),n.pipe(hr(i))}}function i0(t){let e=Object.getPrototypeOf(t);if(!(Rp in e))throw new Error("untilDestroyed operator cannot be used inside directives or components or providers that are not decorated with UntilDestroy decorator")}var cs=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=Me({type:t,selectors:[["cooee-base-video"]],inputs:{triggerContext:"triggerContext"},decls:0,vars:0,template:function(n,r){},encapsulation:2})};var o0=t=>({active:t}),s0=(t,e)=>e.mID;function a0(t,e){if(t&1&&be(0,"img",9),t&2){let n=e.$implicit,r=K();le("src",n.url,ut)("alt",r.item().name)}}function c0(t,e){if(t&1&&(be(0,"span",18),Je(1,"cooeeCurrency"),Je(2,"safeHtml")),t&2){K(2);let n=Xe(16);le("innerHTML",ot(2,3,ot(1,1,n.d)),bt)}}function l0(t,e){if(t&1&&(be(0,"span",19),Je(1,"cooeeCurrency"),Je(2,"safeHtml")),t&2){K(2);let n=Xe(16);le("innerHTML",ot(2,3,ot(1,1,n.cmp)),bt)}}function u0(t,e){if(t&1&&(G(0,"div",12),xe(1,c0,3,5,"span",18)(2,l0,3,5,"span",19),W()),t&2){K();let n=Xe(16);L(),Se(n.d?1:-1),L(),Se(n.cmp?2:-1)}}function d0(t,e){if(t&1){let n=Ke();G(0,"a",22),Pe("click",function(i){let o=Ne(n).$implicit,s=K(2);return Re(s.changeItem(i,o))}),be(1,"img",23),W()}if(t&2){let n=e.$implicit,r=K(2);L(),le("src",n.firstImageURL,ut)("alt",r.item().name)("ngClass",Bi(3,o0,n.mID===r.item().mID+""))}}function f0(t,e){if(t&1&&(G(0,"span",20),Oe(1,"Select product"),W(),G(2,"div",8),rt(3,d0,2,5,"a",21,s0),W()),t&2){let n=K();L(3),it(n.similarItems())}}function p0(t,e){if(t&1&&(G(0,"span",24),Oe(1,"Select variant"),W(),be(2,"cooee-item-options-picker",25)),t&2){let n=K();L(2),le("item",n.item())}}function h0(t,e){if(t&1&&(G(0,"div",26),Oe(1,"Description"),W(),be(2,"div",27),Je(3,"safeHtml")),t&2){let n=K();L(2),le("innerHTML",ot(3,1,n.item().desc),bt)}}function m0(t,e){t&1&&Oe(0," Add To Cart ")}function g0(t,e){t&1&&Oe(0," Out of stock ")}var ls=class t{closeModel=new ct;performCTA=new ct;item=Is.required();similarItems=Is.required();closeDialog(){this.closeModel.emit()}clickAddToCart(){this.performCTA.emit({item:this.item(),cta:Xt.ADD_TO_CART})}openCart(){this.performCTA.emit({item:this.item(),cta:Xt.OPEN_CART})}changeItem(e,n){e.stopPropagation(),e.preventDefault(),this.item.set(n)}goToPDP(){this.performCTA.emit({item:this.item(),cta:Xt.GO_TO_PRODUCT})}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Me({type:t,selectors:[["cooee-product-modal"]],inputs:{item:[1,"item"],similarItems:[1,"similarItems"]},outputs:{closeModel:"closeModel",performCTA:"performCTA",item:"itemChange",similarItems:"similarItemsChange"},decls:29,vars:8,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-prices"],[1,"lc-card-footer"],[1,"lc-cta-button",3,"click","disabled"],[1,"lc-more-info-button",3,"click"],["title","View Cart",1,"view-cart-button",3,"click"],["width","32","height","32","src","https://img.icons8.com/material-sharp/48/shopping-cart.png","alt","shopping-cart"],[1,"lc-item-price",3,"innerHTML"],[1,"lc-item-cmp-price",3,"innerHTML"],[1,"lc-selected-product-title"],["href","#"],["href","#",3,"click"],[1,"product-selector",3,"src","alt","ngClass"],[1,"lc-selected-variant-title"],[3,"item"],[1,"lc-description-title"],[1,"lc-description",3,"innerHTML"]],template:function(n,r){if(n&1){let i=Ke();G(0,"div",0)(1,"div",1)(2,"div",2),Oe(3,"Shop Now"),W(),G(4,"button",3),Pe("click",function(){return Ne(i),Re(r.closeDialog())}),Bt(),G(5,"svg",4),be(6,"path",5)(7,"path",6),W()()(),lt(8),Kn(),G(9,"div",7)(10,"div",8),rt(11,a0,1,2,"img",9,wn),W(),G(13,"div",10)(14,"div",11),Oe(15),W(),lt(16),xe(17,u0,3,2,"div",12)(18,f0,5,0)(19,p0,3,1)(20,h0,4,3),W()(),G(21,"div",13)(22,"button",14),Pe("click",function(){return Ne(i),Re(r.clickAddToCart())}),xe(23,m0,1,0)(24,g0,1,0),W(),G(25,"button",15),Pe("click",function(){return Ne(i),Re(r.goToPDP())}),Oe(26," More Info "),W(),G(27,"button",16),Pe("click",function(){return Ne(i),Re(r.openCart())}),be(28,"img",17),W()()()}if(n&2){let i=r.item().selectedOrFirstVariant.value;L(11),it(r.item().imgs),L(4),cn(r.item().name),L();let o=vt(i==null?null:i.price);L(),Se(o?17:-1),L(),Se(r.similarItems().length>1?18:-1),L(),Se(r.item().hasVariants()?19:-1),L(),Se(r.item().desc?20:-1),L(2),le("disabled",!i.isAvailable),L(),Se(i.isAvailable?23:24)}},dependencies:[Un,vn,Bn,yr],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;cursor:pointer}.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:rgb(var(--lc-color-text))}.lc-item-price[_ngcontent-%COMP%]{font-size:18px;font-weight:500;color:rgb(var(--lc-color-text))}.lc-item-cmp-price[_ngcontent-%COMP%]{font-size:18px;font-weight:500;color:rgba(var(--lc-color-text),.75);margin-left:10px;text-decoration:line-through;display:none}.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-cta-button[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.lc-more-info-button[_ngcontent-%COMP%]{background-color:#fff;color:#000}.view-cart-button[_ngcontent-%COMP%]{background:transparent;border:none;cursor:pointer}"]})};var us=class t{width;static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Me({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&&(G(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),be(4,"div"),W()()()()),n&2&&(L(3),ti("width",r.width,"%"))},encapsulation:2})};function _0(t,e){if(t&1&&(be(0,"span",7),Je(1,"cooeeCurrency"),Je(2,"safeHtml")),t&2){K();let n=Xe(8);le("innerHTML",ot(2,3,ot(1,1,n.cmp)),bt)}}function v0(t,e){t&1&&Oe(0," Out of Stock ")}function y0(t,e){t&1&&Oe(0," Add To Cart ")}var ds=class t{performCTA=new ct;item=Xn.required();similarItems=Xn.required();isButtonDisabled=vr(()=>{let e=this.item();return e.hasVariants()?!e.vars.some(n=>n.isAvailable):!e.selectedOrFirstVariant.value.isAvailable});clickAddToCart(e){let n=ln.get().website?.canChangeVariantInCart;this.similarItems()?.length>1||this.item().hasVariants()&&!n||(e.stopPropagation(),this.performCTA.emit({item:this.item(),cta:Xt.ADD_TO_CART}))}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Me({type:t,selectors:[["cooee-product-card"]],inputs:{item:[1,"item"],similarItems:[1,"similarItems"]},outputs:{performCTA:"performCTA"},decls:16,vars:12,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-prices"],[1,"lc-item-price",3,"innerHTML"],[1,"lc-item-cmp-price",3,"innerHTML"],[1,"lc-cta-button",3,"click","disabled"]],template:function(n,r){if(n&1){let i=Ke();lt(0),G(1,"div",0)(2,"div",1),be(3,"img",2),G(4,"div",3)(5,"div",4),Oe(6),W(),G(7,"div",5),lt(8),be(9,"span",6),Je(10,"cooeeCurrency"),Je(11,"safeHtml"),xe(12,_0,3,5,"span",7),W()()(),G(13,"button",8),Pe("click",function(s){return Ne(i),Re(r.clickAddToCart(s))}),xe(14,v0,1,0)(15,y0,1,0),W()()}if(n&2){let i=r.item().selectedOrFirstVariant.value;L(3),Sn("alt",r.item().name),le("src",r.item().firstImageURL,ut),L(3),It(" ",r.item().name," "),L(2);let o=vt(i.price);L(),le("innerHTML",ot(11,10,ot(10,8,o.d)),bt),L(3),Se(o.cmp?12:-1),L(),le("disabled",r.isButtonDisabled()),L(),Se(r.isButtonDisabled()?14:15)}},dependencies:[vn,Un],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:rgb(var(--lc-color-text))}.lc-item-price[_ngcontent-%COMP%]{font-size:16px;line-height:normal;color:rgb(var(--lc-color-text))}.lc-item-cmp-price[_ngcontent-%COMP%]{font-size:16px;line-height:normal;color:rgba(var(--lc-color-text),.75);margin-left:10px;text-decoration:line-through;display:none}.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 E0=["swiperContainer"],b0=["videoEl"],C0=(t,e)=>e.url,w0=(t,e)=>e.mID;function S0(t,e){if(t&1&&be(0,"source",14),t&2){let n=e.$implicit;Sn("type",n.mimeType),le("src",n.url,ut)}}function T0(t,e){t&1&&As(0)}function I0(t,e){if(t&1){let n=Ke();be(0,"cooee-video-progress-bar",17),G(1,"div",18)(2,"cooee-mute-toggle",19),Pe("toggled",function(){Ne(n);let i=K(2);return Re(i.toggleMute())}),W(),xe(3,T0,1,0,"ng-container",10),W()}if(t&2){let n=K().$index,r=Yt(4),i=K(),o=Yt(11);le("width",i.videoProgress[n]||0),L(2),le("muted",i.muted)("videoEl",r),L(),le("ngTemplateOutlet",o)}}function x0(t,e){if(t&1){let n=Ke();G(0,"cooee-product-card",22),Pe("performCTA",function(i){Ne(n);let o=K(3).$implicit,s=K();return Re(s.performClickToAction(i,o))})("click",function(){let i=Ne(n).$implicit,o=K(3).$implicit,s=K();return Re(s.productCardClicked(i,o))}),W()}if(t&2){let n=e.$implicit,r=K(3).$implicit;le("item",n)("similarItems",r.items)}}function O0(t,e){if(t&1&&(G(0,"div",20),rt(1,x0,1,2,"cooee-product-card",16,w0),W()),t&2){let n=K(2).$implicit;L(),it(n.items)}}function A0(t,e){if(t&1&&be(0,"cooee-video-card",21),t&2){let n=K(2).$implicit;le("card",n.card)}}function D0(t,e){if(t&1&&(G(0,"div",15),xe(1,O0,3,0,"div",20)(2,A0,1,1,"cooee-video-card",21),W()),t&2){let n=K().$implicit,r=K();L(),Se(n.items.length&&r.footerContent===r.VideoConfigFooterContent.FIRST_ITEM?1:n.card&&r.footerContent===r.VideoConfigFooterContent.CARD?2:-1)}}function N0(t,e){if(t&1){let n=Ke();G(0,"cooee-product-modal",23),Pe("performCTA",function(i){Ne(n);let o=K(2);return Re(o.performClickToAction(i,o.selectedVideo))})("closeModel",function(){Ne(n);let i=K(2);return Re(i.productModalClosed())}),W()}if(t&2){let n=K(2);le("item",n.selectedItem)("similarItems",n.selectedVideo.items)}}function R0(t,e){if(t&1){let n=Ke();G(0,"div",6)(1,"div",11)(2,"div",12)(3,"video",13,2),Pe("timeupdate",function(i){let o=Ne(n).$index,s=K();return Re(s.updateProgress(i,o))})("click",function(){let i=Ne(n).$index,o=K();return Re(o.currentIndex===i&&o.toggleMute())})("ended",function(){Ne(n);let i=Yt(4),o=K();return Re(o.onVideoEnded(i))}),rt(5,S0,1,2,"source",14,C0),W(),xe(7,I0,4,4)(8,D0,3,1,"div",15),W(),xe(9,N0,1,2,"cooee-product-modal",16),W()()}if(t&2){let n=e.$implicit,r=e.$index,i=K();L(3),le("ngClass",i.viewTemplateClassName)("autoplay",i.currentIndex===r)("muted",i.muted)("poster",n.thumbnail,ut),Cn("data-video-id",n.id),L(2),it(n.sources),L(2),Se(i.currentIndex===r?7:-1),L(),Se(i.currentIndex===r?8:-1),L(),Se(i.selectedItem&&i.currentIndex===r?9:-1)}}function M0(t,e){t&1&&As(0)}function P0(t,e){if(t&1){let n=Ke();G(0,"button",24),Pe("click",function(){Ne(n);let i=K();return Re(i.close())}),Bt(),G(1,"svg",25),be(2,"path",26)(3,"path",27),W()()}}var an=class extends cs{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;VideoConfigFooterContent=wi;muted=!1;videoProgress=[];selectedItem=null;selectedVideo;swiperInstance;detailPopupTemplate;footerContent;viewTemplateClassName="lc-video-only-view";resizeDebouncer=new as(this.onResize.bind(this));onResize(){this.swiperInstance?.destroy?.(),this.reInitSwiper()}ngOnInit(){super.ngOnInit();let n=this.engagementTrigger?.content?.videoConfig;this.detailPopupTemplate=n?.detailPopup.template??"VIDEO_ONLY_VIEW",this.footerContent=n?.footerContent??"FIRST_ITEM";let r=this.elementRef.nativeElement.shadowRoot,i=ln.get().website.commonCSS;switch(zt.injectRawCSS(i,r),zt.injectStylesheet(Dn.styleURL,r),zt.injectSwiperCSS(r),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(){yl(this.getCurrentVideoElement(),"loadeddata").pipe(Bp(this)).subscribe(()=>{this.initSwiper()})}ngOnDestroy(){this.swiperInstance?.destroy?.(),this.resizeDebouncer.destroy()}close(n=this.videos[this.currentIndex],r=this.currentIndex){let i=this.getCurrentVideoElement();this.dialogRef.close({lastVideo:n,lastVideoIndex:r,lastVideoDuration:i?.currentTime})}performClickToAction(n,r){this.data.onCTAPerformed({cta:n.cta,item:n.item,video:r})}getCurrentVideoElement(){return this.videoElements.get(this.currentIndex)?.nativeElement}moveToNextVideo(){this.swiperInstance.slideTo(this.currentIndex+1)}productModalClosed(){this.selectedItem=null,this.selectedVideo=void 0,this.swiperInstance.enable()}pauseAll(){this.videoElements.forEach(n=>n.nativeElement.pause())}async toggleMute(){this.muted=!this.muted,this.videoElements.forEach(i=>i.nativeElement.muted=this.muted);let r=[this.muted?qe.EVENT_VIDEO_MUTED:qe.EVENT_VIDEO_UNMUTED,{current:this.currentVideoProps()},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(r),await wr.set(br.MUTED,this.muted),this.cdr.detectChanges()}playActiveVideo(){this.pauseAll();let n=this.getCurrentVideoElement();n&&(n.currentTime=1,n.play().then(async()=>{this.muted=await wr.get(br.MUTED,!1),n.muted=this.muted}))}onVideoEnded(n){if(this.currentIndex<this.videos.length-1)this.selectedItem?(n.currentTime=0,n.play()):this.moveToNextVideo();else{let r=this.getPreviousVideoDataForEvent(),i=[qe.EVENT_LAST_VIDEO_ENDED,{previous:r},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(i),n.currentTime=0,n.play()}}updateProgress(n,r){let i=n.target;this.videoProgress[r]=i.currentTime/i.duration*100,this.cdr.detectChanges()}onSlideChange(n){let r=this.getPreviousVideoDataForEvent();this.currentIndex=n.realIndex,this.playActiveVideo(),this.detailPopupTemplate==="PRODUCT_DETAIL_VIEW"?this.selectItemForDetailView():(this.selectedItem=null,delete this.selectedVideo);let i=this.currentVideoProps(),o={previous:r,current:i},s=[qe.EVENT_VIDEO_CHANGE,o,{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(s)}productCardClicked(n,r){let i={videoID:r.id,videoIndex:this.currentIndex},o=[qe.EVENT_MORE_ITEM_INFO_CLICKED,{current:i},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(o),this.selectedItem=n,this.selectedVideo=r,this.swiperInstance.disable()}reInitSwiper(){this.initSwiper(),this.selectedItem&&this.swiperInstance.disable()}initSwiper(){let n=this.isMobile?1:"auto",r=0;this.detailPopupTemplate==="PRODUCT_DETAIL_VIEW"&&(n="auto",r=10),this.swiperInstance=new window.CooeeSDK.Swiper(this.swiperContainerRef.nativeElement,{direction:this.isMobile?"vertical":"horizontal",effect:this.isMobile?"slide":"coverflow",slidesPerView:n,initialSlide:this.currentIndex,centeredSlides:!0,spaceBetween:r,coverflowEffect:{rotate:0,stretch:0,depth:400,modifier:1,slideShadows:!1},navigation:{nextEl:this.swiperContainerRef.nativeElement.querySelector(".swiper-button-next"),prevEl:this.swiperContainerRef.nativeElement.querySelector(".swiper-button-prev")}}),this.swiperInstance.on("slideChange",i=>{this.onSlideChange(i),this.cdr.detectChanges()}),this.playActiveVideo()}currentVideoProps(){return{videoID:this.videos[this.currentIndex].id,videoIndex:this.currentIndex}}getPreviousVideoDataForEvent(){let n=this.currentVideoProps(),r=this.videoElements.find(o=>o.nativeElement.dataset.videoId===this.videos[this.currentIndex].id)?.nativeElement;n.playedTillMS=Math.ceil(r?.currentTime*1e3);let i=r?.duration*1e3;return n.playedTillPercent=+(n.playedTillMS/i).toFixed(4),n}selectItemForDetailView(){this.selectedVideo=this.videos[this.currentIndex],this.selectedItem=this.isMobile?null:this.selectedVideo?.items?.[0]??null}};bs(an,"\u0275fac",function(r){return new(r||an)(nn(Zn),nn(Tt),nn(fr),nn(nl))}),bs(an,"\u0275cmp",Me({type:an,selectors:[["cooee-video-swiper-dialog"]],viewQuery:function(r,i){if(r&1&&(Tn(E0,5),Tn(b0,5)),r&2){let o;In(o=xn())&&(i.swiperContainerRef=o.first),In(o=xn())&&(i.videoElements=o)}},inputs:{videos:"videos",currentIndex:"currentIndex"},features:[Ct],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,"item","similarItems"],[3,"width"],[1,"lc-video-controls"],[3,"toggled","muted","videoEl"],[1,"lc-card-scroll"],[3,"card"],[3,"performCTA","click","item","similarItems"],[3,"performCTA","closeModel","item","similarItems"],[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&&(G(0,"div",3)(1,"div",4,0)(3,"div",5),rt(4,R0,10,8,"div",6,wn),W(),be(6,"div",7)(7,"div",8),W(),G(8,"div",9),xe(9,M0,1,0,"ng-container",10),W()(),xe(10,P0,4,0,"ng-template",null,1,Ll)),r&2){let o=Yt(11);le("ngClass",i.viewTemplateClassName),L(4),it(i.videos),L(5),le("ngTemplateOutlet",o)}},dependencies:[ds,ls,Gr,us,Ul,Bn,$r],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}
|
|
72
|
-
`],encapsulation:3})),an=fl([Vp()],an);var L0=["videoEl"],Up=(t,e)=>e.url;function F0(t,e){if(t&1&&(G(0,"div",1),Oe(1),W()),t&2){let n=K();L(),It(" ",n.videoConfig.heading," ")}}function k0(t,e){if(t&1&&be(0,"source",7),t&2){let n=e.$implicit;Sn("type",n.mimeType),le("src",n.url,ut)}}function V0(t,e){if(t&1){let n=Ke();G(0,"cooee-mute-toggle",13),Pe("toggled",function(i){Ne(n),K();let o=Yt(7),s=K(2);return Re(s.onMuteToggled(i,o))}),W()}if(t&2){K();let n=Yt(7);le("muted",n.muted)("videoEl",n)}}function B0(t,e){if(t&1&&(be(0,"span",19),Je(1,"cooeeCurrency"),Je(2,"safeHtml")),t&2){K();let n=Xe(6);le("innerHTML",ot(2,3,ot(1,1,n.cmp)),bt)}}function U0(t,e){if(t&1&&(G(0,"div",10),be(1,"img",14),G(2,"div",15)(3,"span",16),Oe(4),W(),G(5,"div",17),lt(6),be(7,"span",18),Je(8,"cooeeCurrency"),Je(9,"safeHtml"),xe(10,B0,3,5,"span",19),W()()()),t&2){K();let n=Xe(0);L(),le("src",n.firstImageURL,ut)("alt",n.name),L(3),It(" ",n.name," "),L(2);let r=vt(n.selectedOrFirstVariant.value.price);L(),le("innerHTML",ot(9,8,ot(8,6,r.d)),bt),L(3),Se(r.cmp?10:-1)}}function H0(t,e){if(t&1){let n=Ke();G(0,"button",20),Pe("click",function(i){Ne(n);let o=K(),s=o.$implicit,c=o.$index,u=Yt(7),d=K(2);return Re(d.addToCartClicked(i,s,c,u))}),Oe(1," Add to cart "),W()}}function j0(t,e){if(t&1){let n=Ke();G(0,"cooee-video-card",21),Pe("linkClicked",function(){Ne(n);let i=K().$implicit,o=K(2);return Re(o.sendTriggerClicked(i))}),W()}if(t&2){K();let n=Xe(1);le("card",n)}}function $0(t,e){if(t&1){let n=Ke();lt(0)(1)(2)(3),G(4,"div",4)(5,"a",5),Pe("click",function(i){let o=Ne(n),s=o.$implicit,c=o.$index,u=Yt(7),d=K(2);return Re(d.onVideoTap(i,s,c,u))}),G(6,"video",6,0),Pe("mouseenter",function(){Ne(n);let i=Yt(7);K(2);let o=Xe(2);return Re(o&&i.play())})("mouseleave",function(){Ne(n);let i=Yt(7);K(2);let o=Xe(2);return Re(o&&i.pause())}),rt(8,k0,1,2,"source",7,Up),W(),G(10,"div",8),xe(11,V0,1,2,"cooee-mute-toggle",9),W(),xe(12,U0,11,10,"div",10),W(),xe(13,H0,2,0,"button",11)(14,j0,1,1,"cooee-video-card",12),W()}if(t&2){let n=e.$implicit,r=K(2),i=Xe(1),o=vt(n.items[0]);L();let s=vt(n.card),c=o&&r.videoConfig.footerContent==r.VideoConfigFooterContent.FIRST_ITEM,u=s&&r.videoConfig.footerContent==r.VideoConfigFooterContent.CARD;L(5),le("poster",n.thumbnail,ut)("muted",!0),Cn("autoplay",i||null),L(2),it(n.sources),L(3),Se(r.videoConfig.showMuteButton?11:-1),L(),Se(c?12:-1),L(),Se(c?13:u?14:-1)}}function G0(t,e){if(t&1&&(G(0,"div",2),rt(1,$0,15,8,"div",4,wn),W()),t&2){let n=K();L(),it(n.videos)}}function W0(t,e){if(t&1&&be(0,"source",7),t&2){let n=e.$implicit;Sn("type",n.mimeType),le("src",n.url,ut)}}function Y0(t,e){if(t&1){let n=Ke();G(0,"div",22),Bt(),G(1,"svg",23),be(2,"circle",24)(3,"circle",25),W(),Kn(),G(4,"div",26)(5,"video",27),Pe("click",function(i){let o=Ne(n),s=o.$implicit,c=o.$index,u=K(2);return Re(u.onVideoTap(i,s,c))}),rt(6,W0,1,2,"source",7,Up),W()()()}if(t&2){let n=e.$implicit;L(5),le("muted",!0),L(),it(n.sources)}}function z0(t,e){if(t&1&&(G(0,"div",3),rt(1,Y0,8,1,"div",22,wn),W()),t&2){let n=K();L(),it(n.videos)}}function K0(t,e){if(t&1){let n=Ke();G(0,"cooee-draggable-video-popup",29),Pe("videoClicked",function(){Ne(n),K();let i=Xe(0),o=K();return Re(o.onPopupVideoClicked(i,0))})("closeClicked",function(){Ne(n);let i=K(2);return Re(i.onPopupVideoClosed())}),W()}if(t&2){K();let n=Xe(0);le("video",n)}}function X0(t,e){if(t&1&&(lt(0),xe(1,K0,1,1,"cooee-draggable-video-popup",28)),t&2){let n=K();vt(n.videos[0]),L(),Se(n.hidePopupVideo?-1:1)}}var fs=class t extends Kt{constructor(n,r){super();this.dialog=n;this.cdr=r}videoElements;videos;VideoConfigTemplate=Tc;VideoConfigFooterContent=wi;VideoConfigAutoPlay=Ic;isMobile=window.CooeeSDK.uaParser.getDevice().type==="mobile";hidePopupVideo;videoConfig;dialogRef=null;ngOnInit(){super.ngOnInit(),zt.loadSwiperScript()}ngAfterViewInit(){this.playFirstVideo()}engagementTriggerReceived(n){this.videoConfig=n.content?.videoConfig,this.videos=this.videoConfig.videos}sendTriggerClicked(n,r){let i=new jr(qe.EVENT_TRIGGER_CLICKED,{},this.triggerContext?.triggerData);i.videos=[n.id],r&&(i.items=[r]),this.sendEventToRenderer(i)}onVideoTap(n,r,i,o){n?.stopPropagation(),n?.preventDefault();let s=r.items?.[0];if(this.sendTriggerClicked(r,s?.toEmbed()),this.videoConfig.footerContent==="NONE"){o&&(o.muted=!1,o.play(),this.onMuteToggled(!1,o));return}zt.loadSwiperScript().then(()=>this.openDialog(r,i))}async performCTA(n){let r,i=this.triggerContext;if(n.cta===Xt.ADD_TO_CART)r=qe.EVENT_ADD_TO_CART_CLICKED;else if(n.cta===Xt.GO_TO_PRODUCT)r=qe.EVENT_VIEW_ITEM_CLICKED;else if(n.cta===Xt.OPEN_CART)r=qe.EVENT_OPEN_CART_CLICKED,i.triggerData.redirectBehaviour=Vs.CART_DRAWER;else{We.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,i,o){let s=r.items?.[0],c=ln.get().website?.canChangeVariantInCart;if(r.items?.length>1||s?.hasVariants()&&!c){this.onVideoTap(n,r,i,o);return}this.performCTA({cta:Xt.ADD_TO_CART,item:s,video:r})}onPopupVideoClicked(n,r){this.hidePopupVideo=!0,this.onVideoTap(null,n,r),this.dialogRef?.closed.subscribe(()=>{this.hidePopupVideo=!1,this.cdr.detectChanges()})}onPopupVideoClosed(){this.hidePopupVideo=!0;let n=(new Date().getTime()-this.triggerContext.startTime.getTime())/1e3;this.sendEvent(qe.EVENT_TRIGGER_CLOSED,{duration:n})}update(){}onMuteToggled(n,r){n||this.videoElements.forEach(i=>{i.nativeElement!==r&&(i.nativeElement.muted=!0,i.nativeElement.pause())})}playFirstVideo(){this.videoConfig.autoPlay==="ON_HOVER"&&this.isMobile&&this.videoElements.first?.nativeElement.play()}sendEvent(n,r,i,o){let s=new 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(an,{width:"100vw",height:"100vh",data:i});let o={videoID:n.id,videoIndex:r};this.sendEvent(qe.EVENT_VIDEO_DIALOG_OPENED,{current:o},n),this.dialogRef.closed.subscribe(s=>{if(!s)return;let c=s.lastVideoDuration*1e3,u={videoID:s.lastVideo.id,videoIndex:s.lastVideoIndex,playedTillMS:c,playedTillPercent:c/n.durationMS},d=new jr(qe.EVENT_VIDEO_DIALOG_CLOSED,{current:u},this.triggerContext?.triggerData);d.videos=[s.lastVideo.id],this.sendEventToRenderer(d),this.dialogRef=null})}static \u0275fac=function(r){return new(r||t)(nn(xp),nn(Zn))};static \u0275cmp=Me({type:t,selectors:[["cooee-shoppable-videos"]],viewQuery:function(r,i){if(r&1&&Tn(L0,5),r&2){let o;In(o=xn())&&(i.videoElements=o)}},features:[Ct],decls:7,vars:4,consts:[["videoEl",""],["id","lc-heading-text",1,"lc-heading-text"],[1,"lc-video-list"],[1,"lc-video-stories"],[1,"lc-video-card"],["href","",1,"lc-video-wrapper",3,"click"],["width","100%","playsinline","","loop","","preload","metadata",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"],[3,"card"],[3,"toggled","muted","videoEl"],[1,"lc-item-image",3,"src","alt"],[1,"lc-item-details"],[1,"lc-item-name"],[1,"lc-prices"],[1,"lc-item-price",3,"innerHTML"],[1,"lc-item-cmp-price",3,"innerHTML"],["id","lc-cta-button","type","button",1,"lc-cta-button",3,"click"],[3,"linkClicked","card"],[1,"lc-video-story"],["viewBox","0 0 100 100"],["cx","50","cy","50","r","48","fill","none","stroke-width","4"],["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,"story-video-container"],["autoplay","","loop","",3,"click","muted"],[3,"video"],[3,"videoClicked","closeClicked","video"]],template:function(r,i){if(r&1&&(lt(0)(1)(2),xe(3,F0,2,1,"div",1)(4,G0,3,0,"div",2)(5,z0,3,0,"div",3)(6,X0,2,2)),r&2){let o=i.videoConfig.template;L(),vt(!i.videoConfig.autoPlay||i.videoConfig.autoPlay===i.VideoConfigAutoPlay.ON),L(),vt(i.videoConfig.autoPlay===i.VideoConfigAutoPlay.ON_HOVER),L(),Se(i.videoConfig.heading?3:-1),L(),Se(o===i.VideoConfigTemplate.SIMPLE||o===i.VideoConfigTemplate.SWIPER?4:o===i.VideoConfigTemplate.STORY?5:o===i.VideoConfigTemplate.FLOATING_POPUP?6:-1)}},dependencies:[vn,ts,Un,Gr,$r],styles:["[_nghost-%COMP%]{display:block}.lc-heading-text[_ngcontent-%COMP%]{margin-bottom:.5rem;font-size:1.125rem;text-align:center;font-weight:700}.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;border-radius:.5rem}.lc-video-wrapper[_ngcontent-%COMP%] video[_ngcontent-%COMP%]{border-radius:.5rem;transition:transform .3s}.lc-video-wrapper[_ngcontent-%COMP%] video[_ngcontent-%COMP%]:hover{transform:scale(1.1)}.lc-video-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2.5px;scroll-snap-align:center;min-width:200px;max-width:300px}.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);width:100%;height:auto;text-align:center;z-index:4;padding:1rem}.lc-video-stories[_ngcontent-%COMP%]{display:flex;overflow:auto;margin:.75rem;gap:.75rem;justify-content:center;align-items:center}.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;display:none}.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:rgb(var(--lc-color-text));font-weight:600;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}.lc-single-product[_ngcontent-%COMP%] .lc-item-details[_ngcontent-%COMP%] .lc-item-price[_ngcontent-%COMP%]{color:rgb(var(--lc-color-text))}.lc-single-product[_ngcontent-%COMP%] .lc-item-details[_ngcontent-%COMP%] .lc-item-cmp-price[_ngcontent-%COMP%]{color:rgba(var(--lc-color-text),.75);text-decoration:line-through;margin-left:10px;display:none}.lc-video-story[_ngcontent-%COMP%]{position:relative;width:5rem;height:5rem;cursor:pointer}.lc-video-story[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}.lc-video-story[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] circle[_ngcontent-%COMP%]:first-child{stroke:#d1d5db}.lc-video-story[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] circle[_ngcontent-%COMP%]:last-child{stroke:#3b82f6}.lc-video-story[_ngcontent-%COMP%] .story-video-container[_ngcontent-%COMP%]{width:100%;height:100%;border-radius:9999px;overflow:hidden}.lc-video-story[_ngcontent-%COMP%] .story-video-container[_ngcontent-%COMP%] video[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover;border-radius:9999px}"]})};Ql("CooeeWidgetSDK");(async()=>{let t=await jl(eu),e=(n,r)=>{let i=Xl(n,{injector:t.injector});customElements.define(r,i)};e(Vo,"cooee-sticky-atc"),e(ko,"cooee-savings-bar"),e(Fo,"cooee-progressbar"),e(fs,"cooee-shoppable-videos"),e(yr,"cooee-product-options-picker"),sessionStorage.cooeeDebug&&import("./chunk-WROWVGDC.js").then(n=>{e(n.DebuggerComponent,"cooee-debugger")})})();
|
|
71
|
+
`}var il=!1;function i0(t,e,n){let r=t[e];if(il&&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),Fp(this,n),t[e]=r}}function Up(t,e){return n=>{let r=Pp(e);typeof e=="string"?i0(t,e,r):(il&&o0(t),Lp(t,r));let i=t[r];return il&&t0(t,i),n.pipe(mr(i))}}function o0(t){let e=Object.getPrototypeOf(t);if(!(Mp in e))throw new Error("untilDestroyed operator cannot be used inside directives or components or providers that are not decorated with UntilDestroy decorator")}var ls=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=Me({type:t,selectors:[["cooee-base-video"]],inputs:{triggerContext:"triggerContext"},decls:0,vars:0,template:function(n,r){},encapsulation:2})};var s0=t=>({active:t}),a0=(t,e)=>e.mID;function c0(t,e){if(t&1&&be(0,"img",9),t&2){let n=e.$implicit,r=K();le("src",n.url,ut)("alt",r.item().name)}}function l0(t,e){if(t&1&&(be(0,"span",18),Je(1,"cooeeCurrency"),Je(2,"safeHtml")),t&2){K(2);let n=Xe(16);le("innerHTML",ot(2,3,ot(1,1,n.d)),bt)}}function u0(t,e){if(t&1&&(be(0,"span",19),Je(1,"cooeeCurrency"),Je(2,"safeHtml")),t&2){K(2);let n=Xe(16);le("innerHTML",ot(2,3,ot(1,1,n.cmp)),bt)}}function d0(t,e){if(t&1&&(G(0,"div",12),xe(1,l0,3,5,"span",18)(2,u0,3,5,"span",19),W()),t&2){K();let n=Xe(16);P(),Se(n.d?1:-1),P(),Se(n.cmp?2:-1)}}function f0(t,e){if(t&1){let n=Ke();G(0,"a",22),Pe("click",function(i){let o=Ne(n).$implicit,s=K(2);return Re(s.changeItem(i,o))}),be(1,"img",23),W()}if(t&2){let n=e.$implicit,r=K(2);P(),le("src",n.firstImageURL,ut)("alt",r.item().name)("ngClass",Ui(3,s0,n.mID===r.item().mID+""))}}function p0(t,e){if(t&1&&(G(0,"span",20),Oe(1,"Select product"),W(),G(2,"div",8),rt(3,f0,2,5,"a",21,a0),W()),t&2){let n=K();P(3),it(n.similarItems())}}function h0(t,e){if(t&1&&(G(0,"span",24),Oe(1,"Select variant"),W(),be(2,"cooee-item-options-picker",25)),t&2){let n=K();P(2),le("item",n.item())}}function m0(t,e){if(t&1&&(G(0,"div",26),Oe(1,"Description"),W(),be(2,"div",27),Je(3,"safeHtml")),t&2){let n=K();P(2),le("innerHTML",ot(3,1,n.item().desc),bt)}}function g0(t,e){t&1&&Oe(0," Add To Cart ")}function _0(t,e){t&1&&Oe(0," Out of stock ")}var us=class t{closeModel=new ct;performCTA=new ct;item=xs.required();similarItems=xs.required();closeDialog(){this.closeModel.emit()}clickAddToCart(){this.performCTA.emit({item:this.item(),cta:Xt.ADD_TO_CART})}openCart(){this.performCTA.emit({item:this.item(),cta:Xt.OPEN_CART})}changeItem(e,n){e.stopPropagation(),e.preventDefault(),this.item.set(n)}goToPDP(){this.performCTA.emit({item:this.item(),cta:Xt.GO_TO_PRODUCT})}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Me({type:t,selectors:[["cooee-product-modal"]],inputs:{item:[1,"item"],similarItems:[1,"similarItems"]},outputs:{closeModel:"closeModel",performCTA:"performCTA",item:"itemChange",similarItems:"similarItemsChange"},decls:29,vars:8,consts:[[1,"lc-card-wrapper"],[1,"lc-card-header"],[1,"lc-header"],["type","button",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-prices"],[1,"lc-card-footer"],["type","button",1,"lc-cta-button",3,"click","disabled"],["type","button",1,"lc-more-info-button",3,"click"],["type","button","title","View Cart",1,"view-cart-button",3,"click"],["width","32","height","32","src","https://img.icons8.com/material-sharp/48/shopping-cart.png","alt","shopping-cart"],[1,"lc-item-price",3,"innerHTML"],[1,"lc-item-cmp-price",3,"innerHTML"],[1,"lc-selected-product-title"],["href","#"],["href","#",3,"click"],[1,"product-selector",3,"src","alt","ngClass"],[1,"lc-selected-variant-title"],[3,"item"],[1,"lc-description-title"],[1,"lc-description",3,"innerHTML"]],template:function(n,r){if(n&1){let i=Ke();G(0,"div",0)(1,"div",1)(2,"div",2),Oe(3,"Shop Now"),W(),G(4,"button",3),Pe("click",function(){return Ne(i),Re(r.closeDialog())}),Bt(),G(5,"svg",4),be(6,"path",5)(7,"path",6),W()()(),lt(8),Kn(),G(9,"div",7)(10,"div",8),rt(11,c0,1,2,"img",9,wn),W(),G(13,"div",10)(14,"div",11),Oe(15),W(),lt(16),xe(17,d0,3,2,"div",12)(18,p0,5,0)(19,h0,3,1)(20,m0,4,3),W()(),G(21,"div",13)(22,"button",14),Pe("click",function(){return Ne(i),Re(r.clickAddToCart())}),xe(23,g0,1,0)(24,_0,1,0),W(),G(25,"button",15),Pe("click",function(){return Ne(i),Re(r.goToPDP())}),Oe(26," More Info "),W(),G(27,"button",16),Pe("click",function(){return Ne(i),Re(r.openCart())}),be(28,"img",17),W()()()}if(n&2){let i=r.item().selectedOrFirstVariant.value;P(11),it(r.item().imgs),P(4),ln(r.item().name),P();let o=vt(i==null?null:i.price);P(),Se(o?17:-1),P(),Se(r.similarItems().length>1?18:-1),P(),Se(r.item().hasVariants()?19:-1),P(),Se(r.item().desc?20:-1),P(2),le("disabled",!i.isAvailable),P(),Se(i.isAvailable?23:24)}},dependencies:[Un,yn,Bn,yr],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;cursor:pointer}.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:rgb(var(--lc-color-text))}.lc-item-price[_ngcontent-%COMP%]{font-size:18px;font-weight:500;color:rgb(var(--lc-color-text))}.lc-item-cmp-price[_ngcontent-%COMP%]{font-size:18px;font-weight:500;color:rgba(var(--lc-color-text),.75);margin-left:10px;text-decoration:line-through;display:none}.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-cta-button[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.lc-more-info-button[_ngcontent-%COMP%]{background-color:#fff;color:#000}.view-cart-button[_ngcontent-%COMP%]{background:transparent;border:none;cursor:pointer}"]})};var ds=class t{width;static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Me({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&&(G(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),be(4,"div"),W()()()()),n&2&&(P(3),ti("width",r.width,"%"))},encapsulation:2})};function v0(t,e){if(t&1&&(be(0,"span",7),Je(1,"cooeeCurrency"),Je(2,"safeHtml")),t&2){K();let n=Xe(8);le("innerHTML",ot(2,3,ot(1,1,n.cmp)),bt)}}function y0(t,e){t&1&&Oe(0," Out of Stock ")}function E0(t,e){t&1&&Oe(0," Add To Cart ")}var fs=class t{performCTA=new ct;item=Xn.required();similarItems=Xn.required();isButtonDisabled=Jn(()=>{let e=this.item();return e.hasVariants()?!e.vars.some(n=>n.isAvailable):!e.selectedOrFirstVariant.value.isAvailable});clickAddToCart(e){let n=un.get().website?.canChangeVariantInCart;this.similarItems()?.length>1||this.item().hasVariants()&&!n||(e.stopPropagation(),this.performCTA.emit({item:this.item(),cta:Xt.ADD_TO_CART}))}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Me({type:t,selectors:[["cooee-product-card"]],inputs:{item:[1,"item"],similarItems:[1,"similarItems"]},outputs:{performCTA:"performCTA"},decls:16,vars:12,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-prices"],[1,"lc-item-price",3,"innerHTML"],[1,"lc-item-cmp-price",3,"innerHTML"],["type","button",1,"lc-cta-button",3,"click","disabled"]],template:function(n,r){if(n&1){let i=Ke();lt(0),G(1,"div",0)(2,"div",1),be(3,"img",2),G(4,"div",3)(5,"div",4),Oe(6),W(),G(7,"div",5),lt(8),be(9,"span",6),Je(10,"cooeeCurrency"),Je(11,"safeHtml"),xe(12,v0,3,5,"span",7),W()()(),G(13,"button",8),Pe("click",function(s){return Ne(i),Re(r.clickAddToCart(s))}),xe(14,y0,1,0)(15,E0,1,0),W()()}if(n&2){let i=r.item().selectedOrFirstVariant.value;P(3),Sn("alt",r.item().name),le("src",r.item().firstImageURL,ut),P(3),Tt(" ",r.item().name," "),P(2);let o=vt(i.price);P(),le("innerHTML",ot(11,10,ot(10,8,o.d)),bt),P(3),Se(o.cmp?12:-1),P(),le("disabled",r.isButtonDisabled()),P(),Se(r.isButtonDisabled()?14:15)}},dependencies:[yn,Un],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:rgb(var(--lc-color-text))}.lc-item-price[_ngcontent-%COMP%]{font-size:16px;line-height:normal;color:rgb(var(--lc-color-text))}.lc-item-cmp-price[_ngcontent-%COMP%]{font-size:16px;line-height:normal;color:rgba(var(--lc-color-text),.75);margin-left:10px;text-decoration:line-through;display:none}.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 b0=["swiperContainer"],C0=["videoEl"],w0=(t,e)=>e.url,S0=(t,e)=>e.mID;function I0(t,e){if(t&1&&be(0,"source",14),t&2){let n=e.$implicit;Sn("type",n.mimeType),le("src",n.url,ut)}}function T0(t,e){t&1&&Ds(0)}function x0(t,e){if(t&1){let n=Ke();be(0,"cooee-video-progress-bar",17),G(1,"div",18)(2,"cooee-mute-toggle",19),Pe("toggled",function(){Ne(n);let i=K(2);return Re(i.toggleMute())}),W(),xe(3,T0,1,0,"ng-container",10),W()}if(t&2){let n=K().$index,r=Yt(4),i=K(),o=Yt(11);le("width",i.videoProgress[n]||0),P(2),le("muted",i.muted)("videoEl",r),P(),le("ngTemplateOutlet",o)}}function O0(t,e){if(t&1){let n=Ke();G(0,"cooee-product-card",22),Pe("performCTA",function(i){Ne(n);let o=K(3).$implicit,s=K();return Re(s.performClickToAction(i,o))})("click",function(){let i=Ne(n).$implicit,o=K(3).$implicit,s=K();return Re(s.productCardClicked(i,o))}),W()}if(t&2){let n=e.$implicit,r=K(3).$implicit;le("item",n)("similarItems",r.items)}}function A0(t,e){if(t&1&&(G(0,"div",20),rt(1,O0,1,2,"cooee-product-card",16,S0),W()),t&2){let n=K(2).$implicit;P(),it(n.items)}}function D0(t,e){if(t&1&&be(0,"cooee-video-card",21),t&2){let n=K(2).$implicit;le("card",n.card)}}function N0(t,e){if(t&1&&(G(0,"div",15),xe(1,A0,3,0,"div",20)(2,D0,1,1,"cooee-video-card",21),W()),t&2){let n=K().$implicit,r=K();P(),Se(n.items.length&&r.footerContent===r.VideoConfigFooterContent.FIRST_ITEM?1:n.card&&r.footerContent===r.VideoConfigFooterContent.CARD?2:-1)}}function R0(t,e){if(t&1){let n=Ke();G(0,"cooee-product-modal",23),Pe("performCTA",function(i){Ne(n);let o=K(2);return Re(o.performClickToAction(i,o.selectedVideo))})("closeModel",function(){Ne(n);let i=K(2);return Re(i.productModalClosed())}),W()}if(t&2){let n=K(2);le("item",n.selectedItem)("similarItems",n.selectedVideo.items)}}function M0(t,e){if(t&1){let n=Ke();G(0,"div",6)(1,"div",11)(2,"div",12)(3,"video",13,2),Pe("timeupdate",function(i){let o=Ne(n).$index,s=K();return Re(s.updateProgress(i,o))})("click",function(){let i=Ne(n).$index,o=K();return Re(o.currentIndex===i&&o.toggleMute())})("ended",function(){Ne(n);let i=Yt(4),o=K();return Re(o.onVideoEnded(i))}),rt(5,I0,1,2,"source",14,w0),W(),xe(7,x0,4,4)(8,N0,3,1,"div",15),W(),xe(9,R0,1,2,"cooee-product-modal",16),W()()}if(t&2){let n=e.$implicit,r=e.$index,i=K();P(3),le("ngClass",i.viewTemplateClassName)("autoplay",i.currentIndex===r)("muted",i.muted)("poster",n.thumbnail,ut),cn("data-video-id",n.id),P(2),it(n.sources),P(2),Se(i.currentIndex===r?7:-1),P(),Se(i.currentIndex===r?8:-1),P(),Se(i.selectedItem&&i.currentIndex===r?9:-1)}}function P0(t,e){t&1&&Ds(0)}function L0(t,e){if(t&1){let n=Ke();G(0,"button",24),Pe("click",function(){Ne(n);let i=K();return Re(i.close())}),Bt(),G(1,"svg",25),be(2,"path",26)(3,"path",27),W()()}}var an=class extends ls{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;VideoConfigFooterContent=Si;muted=!1;videoProgress=[];selectedItem=null;selectedVideo;swiperInstance;detailPopupTemplate;footerContent;viewTemplateClassName="lc-video-only-view";resizeDebouncer=new cs(this.onResize.bind(this));onResize(){this.swiperInstance?.destroy?.(),this.reInitSwiper()}ngOnInit(){super.ngOnInit();let n=this.engagementTrigger?.content?.videoConfig;this.detailPopupTemplate=n?.detailPopup.template??"VIDEO_ONLY_VIEW",this.footerContent=n?.footerContent??"FIRST_ITEM";let r=this.elementRef.nativeElement.shadowRoot,i=un.get().website.commonCSS;switch(zt.injectRawCSS(i,r),zt.injectStylesheet(Dn.styleURL,r),zt.injectSwiperCSS(r),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(){El(this.getCurrentVideoElement(),"loadeddata").pipe(Up(this)).subscribe(()=>{this.initSwiper()})}ngOnDestroy(){this.swiperInstance?.destroy?.(),this.resizeDebouncer.destroy()}close(n=this.videos[this.currentIndex],r=this.currentIndex){let i=this.getCurrentVideoElement();this.dialogRef.close({lastVideo:n,lastVideoIndex:r,lastVideoDuration:i?.currentTime})}performClickToAction(n,r){this.data.onCTAPerformed({cta:n.cta,item:n.item,video:r})}getCurrentVideoElement(){return this.videoElements.get(this.currentIndex)?.nativeElement}moveToNextVideo(){this.swiperInstance.slideTo(this.currentIndex+1)}productModalClosed(){this.selectedItem=null,this.selectedVideo=void 0,this.swiperInstance.enable()}pauseAll(){this.videoElements.forEach(n=>n.nativeElement.pause())}async toggleMute(){this.muted=!this.muted,this.videoElements.forEach(i=>i.nativeElement.muted=this.muted);let r=[this.muted?qe.EVENT_VIDEO_MUTED:qe.EVENT_VIDEO_UNMUTED,{current:this.currentVideoProps()},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(r),await wr.set(br.MUTED,this.muted),this.cdr.detectChanges()}playActiveVideo(){this.pauseAll();let n=this.getCurrentVideoElement();n&&(n.currentTime=1,n.play().then(async()=>{this.muted=await wr.get(br.MUTED,!1),n.muted=this.muted}))}onVideoEnded(n){if(this.currentIndex<this.videos.length-1)this.selectedItem?(n.currentTime=0,n.play()):this.moveToNextVideo();else{let r=this.getPreviousVideoDataForEvent(),i=[qe.EVENT_LAST_VIDEO_ENDED,{previous:r},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(i),n.currentTime=0,n.play()}}updateProgress(n,r){let i=n.target;this.videoProgress[r]=i.currentTime/i.duration*100,this.cdr.detectChanges()}onSlideChange(n){let r=this.getPreviousVideoDataForEvent();this.currentIndex=n.realIndex,this.playActiveVideo(),this.detailPopupTemplate==="PRODUCT_DETAIL_VIEW"?this.selectItemForDetailView():(this.selectedItem=null,delete this.selectedVideo);let i=this.currentVideoProps(),o={previous:r,current:i},s=[qe.EVENT_VIDEO_CHANGE,o,{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(s)}productCardClicked(n,r){let i={videoID:r.id,videoIndex:this.currentIndex},o=[qe.EVENT_MORE_ITEM_INFO_CLICKED,{current:i},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(o),this.selectedItem=n,this.selectedVideo=r,this.swiperInstance.disable()}reInitSwiper(){this.initSwiper(),this.selectedItem&&this.swiperInstance.disable()}initSwiper(){let n=this.isMobile?1:"auto",r=0;this.detailPopupTemplate==="PRODUCT_DETAIL_VIEW"&&(n="auto",r=10),this.swiperInstance=new window.CooeeSDK.Swiper(this.swiperContainerRef.nativeElement,{direction:this.isMobile?"vertical":"horizontal",effect:this.isMobile?"slide":"coverflow",slidesPerView:n,initialSlide:this.currentIndex,centeredSlides:!0,spaceBetween:r,coverflowEffect:{rotate:0,stretch:0,depth:400,modifier:1,slideShadows:!1},navigation:{nextEl:this.swiperContainerRef.nativeElement.querySelector(".swiper-button-next"),prevEl:this.swiperContainerRef.nativeElement.querySelector(".swiper-button-prev")}}),this.swiperInstance.on("slideChange",i=>{this.onSlideChange(i),this.cdr.detectChanges()}),this.playActiveVideo()}currentVideoProps(){return{videoID:this.videos[this.currentIndex].id,videoIndex:this.currentIndex}}getPreviousVideoDataForEvent(){let n=this.currentVideoProps(),r=this.videoElements.find(o=>o.nativeElement.dataset.videoId===this.videos[this.currentIndex].id)?.nativeElement;n.playedTillMS=Math.ceil(r?.currentTime*1e3);let i=r?.duration*1e3;return n.playedTillPercent=+(n.playedTillMS/i).toFixed(4),n}selectItemForDetailView(){this.selectedVideo=this.videos[this.currentIndex],this.selectedItem=this.isMobile?null:this.selectedVideo?.items?.[0]??null}};Cs(an,"\u0275fac",function(r){return new(r||an)(nn(Zn),nn(It),nn(pr),nn(rl))}),Cs(an,"\u0275cmp",Me({type:an,selectors:[["cooee-video-swiper-dialog"]],viewQuery:function(r,i){if(r&1&&(In(b0,5),In(C0,5)),r&2){let o;Tn(o=xn())&&(i.swiperContainerRef=o.first),Tn(o=xn())&&(i.videoElements=o)}},inputs:{videos:"videos",currentIndex:"currentIndex"},features:[Ct],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,"item","similarItems"],[3,"width"],[1,"lc-video-controls"],[3,"toggled","muted","videoEl"],[1,"lc-card-scroll"],[3,"card"],[3,"performCTA","click","item","similarItems"],[3,"performCTA","closeModel","item","similarItems"],["type","button",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&&(G(0,"div",3)(1,"div",4,0)(3,"div",5),rt(4,M0,10,8,"div",6,wn),W(),be(6,"div",7)(7,"div",8),W(),G(8,"div",9),xe(9,P0,1,0,"ng-container",10),W()(),xe(10,L0,4,0,"ng-template",null,1,Fl)),r&2){let o=Yt(11);le("ngClass",i.viewTemplateClassName),P(4),it(i.videos),P(5),le("ngTemplateOutlet",o)}},dependencies:[fs,us,Gr,ds,Hl,Bn,$r],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}
|
|
72
|
+
`],encapsulation:3})),an=pl([Bp()],an);var F0=["videoEl"],Hp=(t,e)=>e.url;function V0(t,e){if(t&1&&(G(0,"div",1),Oe(1),W()),t&2){let n=K();P(),Tt(" ",n.videoConfig.heading," ")}}function k0(t,e){if(t&1&&be(0,"source",7),t&2){let n=e.$implicit;Sn("type",n.mimeType),le("src",n.url,ut)}}function B0(t,e){if(t&1){let n=Ke();G(0,"cooee-mute-toggle",13),Pe("toggled",function(i){Ne(n),K();let o=Yt(7),s=K(2);return Re(s.onMuteToggled(i,o))}),W()}if(t&2){K();let n=Yt(7);le("muted",n.muted)("videoEl",n)}}function U0(t,e){if(t&1&&(be(0,"span",19),Je(1,"cooeeCurrency"),Je(2,"safeHtml")),t&2){K();let n=Xe(6);le("innerHTML",ot(2,3,ot(1,1,n.cmp)),bt)}}function H0(t,e){if(t&1&&(G(0,"div",10),be(1,"img",14),G(2,"div",15)(3,"span",16),Oe(4),W(),G(5,"div",17),lt(6),be(7,"span",18),Je(8,"cooeeCurrency"),Je(9,"safeHtml"),xe(10,U0,3,5,"span",19),W()()()),t&2){K();let n=Xe(0);P(),le("src",n.firstImageURL,ut)("alt",n.name),P(3),Tt(" ",n.name," "),P(2);let r=vt(n.selectedOrFirstVariant.value.price);P(),le("innerHTML",ot(9,8,ot(8,6,r.d)),bt),P(3),Se(r.cmp?10:-1)}}function j0(t,e){if(t&1){let n=Ke();G(0,"button",20),Pe("click",function(i){Ne(n);let o=K(),s=o.$implicit,c=o.$index,u=Yt(7),d=K(2);return Re(d.addToCartClicked(i,s,c,u))}),Oe(1," Add to cart "),W()}}function $0(t,e){if(t&1){let n=Ke();G(0,"cooee-video-card",21),Pe("linkClicked",function(){Ne(n);let i=K().$implicit,o=K(2);return Re(o.sendTriggerClicked(i))}),W()}if(t&2){K();let n=Xe(1);le("card",n)}}function G0(t,e){if(t&1){let n=Ke();lt(0)(1)(2)(3),G(4,"div",4)(5,"a",5),Pe("click",function(i){let o=Ne(n),s=o.$implicit,c=o.$index,u=Yt(7),d=K(2);return Re(d.onVideoTap(i,s,c,u))}),G(6,"video",6,0),Pe("mouseenter",function(){Ne(n);let i=Yt(7);K(2);let o=Xe(2);return Re(o&&i.play())})("mouseleave",function(){Ne(n);let i=Yt(7);K(2);let o=Xe(2);return Re(o&&i.pause())}),rt(8,k0,1,2,"source",7,Hp),W(),G(10,"div",8),xe(11,B0,1,2,"cooee-mute-toggle",9),W(),xe(12,H0,11,10,"div",10),W(),xe(13,j0,2,0,"button",11)(14,$0,1,1,"cooee-video-card",12),W()}if(t&2){let n=e.$implicit,r=K(2),i=Xe(1),o=vt(n.items[0]);P();let s=vt(n.card),c=o&&r.videoConfig.footerContent==r.VideoConfigFooterContent.FIRST_ITEM,u=s&&r.videoConfig.footerContent==r.VideoConfigFooterContent.CARD;P(5),le("poster",n.thumbnail,ut)("muted",!0),cn("autoplay",i||null),P(2),it(n.sources),P(3),Se(r.videoConfig.showMuteButton?11:-1),P(),Se(c?12:-1),P(),Se(c?13:u?14:-1)}}function W0(t,e){if(t&1&&(G(0,"div",2),rt(1,G0,15,8,"div",4,wn),W()),t&2){let n=K();P(),it(n.videos)}}function Y0(t,e){if(t&1&&be(0,"source",7),t&2){let n=e.$implicit;Sn("type",n.mimeType),le("src",n.url,ut)}}function z0(t,e){if(t&1){let n=Ke();G(0,"div",22),Bt(),G(1,"svg",23),be(2,"circle",24)(3,"circle",25),W(),Kn(),G(4,"div",26)(5,"video",27),Pe("click",function(i){let o=Ne(n),s=o.$implicit,c=o.$index,u=K(2);return Re(u.onVideoTap(i,s,c))}),rt(6,Y0,1,2,"source",7,Hp),W()()()}if(t&2){let n=e.$implicit;P(5),le("muted",!0),P(),it(n.sources)}}function K0(t,e){if(t&1&&(G(0,"div",3),rt(1,z0,8,1,"div",22,wn),W()),t&2){let n=K();P(),it(n.videos)}}function X0(t,e){if(t&1){let n=Ke();G(0,"cooee-draggable-video-popup",29),Pe("videoClicked",function(){Ne(n),K();let i=Xe(0),o=K();return Re(o.onPopupVideoClicked(i,0))})("closeClicked",function(){Ne(n);let i=K(2);return Re(i.onPopupVideoClosed())}),W()}if(t&2){K();let n=Xe(0);le("video",n)}}function q0(t,e){if(t&1&&(lt(0),xe(1,X0,1,1,"cooee-draggable-video-popup",28)),t&2){let n=K();vt(n.videos[0]),P(),Se(n.hidePopupVideo?-1:1)}}var ps=class t extends Kt{constructor(n,r){super();this.dialog=n;this.cdr=r}videoElements;videos;VideoConfigTemplate=Tc;VideoConfigFooterContent=Si;VideoConfigAutoPlay=xc;isMobile=window.CooeeSDK.uaParser.getDevice().type==="mobile";hidePopupVideo;videoConfig;dialogRef=null;ngOnInit(){super.ngOnInit(),zt.loadSwiperScript()}ngAfterViewInit(){this.playFirstVideo()}engagementTriggerReceived(n){this.videoConfig=n.content?.videoConfig,this.videos=this.videoConfig.videos}sendTriggerClicked(n,r){let i=new jr(qe.EVENT_TRIGGER_CLICKED,{},this.triggerContext?.triggerData);i.videos=[n.id],r&&(i.items=[r]),this.sendEventToRenderer(i)}onVideoTap(n,r,i,o){n?.stopPropagation(),n?.preventDefault();let s=r.items?.[0];if(this.sendTriggerClicked(r,s?.toEmbed()),this.videoConfig.footerContent==="NONE"){o&&(o.muted=!1,o.play(),this.onMuteToggled(!1,o));return}zt.loadSwiperScript().then(()=>this.openDialog(r,i))}async performCTA(n){let r,i=this.triggerContext;if(n.cta===Xt.ADD_TO_CART)r=qe.EVENT_ADD_TO_CART_CLICKED;else if(n.cta===Xt.GO_TO_PRODUCT)r=qe.EVENT_VIEW_ITEM_CLICKED;else if(n.cta===Xt.OPEN_CART)r=qe.EVENT_OPEN_CART_CLICKED,i.triggerData.redirectBehaviour=Bs.CART_DRAWER;else{We.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,i,o){let s=r.items?.[0],c=un.get().website?.canChangeVariantInCart;if(r.items?.length>1||s?.hasVariants()&&!c){this.onVideoTap(n,r,i,o);return}this.performCTA({cta:Xt.ADD_TO_CART,item:s,video:r})}onPopupVideoClicked(n,r){this.hidePopupVideo=!0,this.onVideoTap(null,n,r),this.dialogRef?.closed.subscribe(()=>{this.hidePopupVideo=!1,this.cdr.detectChanges()})}onPopupVideoClosed(){this.hidePopupVideo=!0;let n=(new Date().getTime()-this.triggerContext.startTime.getTime())/1e3;this.sendEvent(qe.EVENT_TRIGGER_CLOSED,{duration:n})}update(){}onMuteToggled(n,r){n||this.videoElements.forEach(i=>{i.nativeElement!==r&&(i.nativeElement.muted=!0,i.nativeElement.pause())})}playFirstVideo(){this.videoConfig.autoPlay==="ON_HOVER"&&this.isMobile&&this.videoElements.first?.nativeElement.play()}sendEvent(n,r,i,o){let s=new 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(an,{width:"100vw",height:"100vh",data:i});let o={videoID:n.id,videoIndex:r};this.sendEvent(qe.EVENT_VIDEO_DIALOG_OPENED,{current:o},n),this.dialogRef.closed.subscribe(s=>{if(!s)return;let c=s.lastVideoDuration*1e3,u={videoID:s.lastVideo.id,videoIndex:s.lastVideoIndex,playedTillMS:c,playedTillPercent:c/n.durationMS},d=new jr(qe.EVENT_VIDEO_DIALOG_CLOSED,{current:u},this.triggerContext?.triggerData);d.videos=[s.lastVideo.id],this.sendEventToRenderer(d),this.dialogRef=null})}static \u0275fac=function(r){return new(r||t)(nn(Op),nn(Zn))};static \u0275cmp=Me({type:t,selectors:[["cooee-shoppable-videos"]],viewQuery:function(r,i){if(r&1&&In(F0,5),r&2){let o;Tn(o=xn())&&(i.videoElements=o)}},features:[Ct],decls:7,vars:4,consts:[["videoEl",""],["id","lc-heading-text",1,"lc-heading-text"],[1,"lc-video-list"],[1,"lc-video-stories"],[1,"lc-video-card"],["href","",1,"lc-video-wrapper",3,"click"],["width","100%","playsinline","","loop","","preload","metadata",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"],[3,"card"],[3,"toggled","muted","videoEl"],[1,"lc-item-image",3,"src","alt"],[1,"lc-item-details"],[1,"lc-item-name"],[1,"lc-prices"],[1,"lc-item-price",3,"innerHTML"],[1,"lc-item-cmp-price",3,"innerHTML"],["id","lc-cta-button","type","button",1,"lc-cta-button",3,"click"],[3,"linkClicked","card"],[1,"lc-video-story"],["viewBox","0 0 100 100"],["cx","50","cy","50","r","48","fill","none","stroke-width","4"],["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,"story-video-container"],["autoplay","","loop","",3,"click","muted"],[3,"video"],[3,"videoClicked","closeClicked","video"]],template:function(r,i){if(r&1&&(lt(0)(1)(2),xe(3,V0,2,1,"div",1)(4,W0,3,0,"div",2)(5,K0,3,0,"div",3)(6,q0,2,2)),r&2){let o=i.videoConfig.template;P(),vt(!i.videoConfig.autoPlay||i.videoConfig.autoPlay===i.VideoConfigAutoPlay.ON),P(),vt(i.videoConfig.autoPlay===i.VideoConfigAutoPlay.ON_HOVER),P(),Se(i.videoConfig.heading?3:-1),P(),Se(o===i.VideoConfigTemplate.SIMPLE||o===i.VideoConfigTemplate.SWIPER?4:o===i.VideoConfigTemplate.STORY?5:o===i.VideoConfigTemplate.FLOATING_POPUP?6:-1)}},dependencies:[yn,ns,Un,Gr,$r],styles:["[_nghost-%COMP%]{display:block}.lc-heading-text[_ngcontent-%COMP%]{margin-bottom:.5rem;font-size:1.125rem;text-align:center;font-weight:700}.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;border-radius:.5rem}.lc-video-wrapper[_ngcontent-%COMP%] video[_ngcontent-%COMP%]{border-radius:.5rem;transition:transform .3s}.lc-video-wrapper[_ngcontent-%COMP%] video[_ngcontent-%COMP%]:hover{transform:scale(1.1)}.lc-video-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2.5px;scroll-snap-align:center;min-width:200px;max-width:300px}.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);width:100%;height:auto;text-align:center;z-index:4;padding:1rem}.lc-video-stories[_ngcontent-%COMP%]{display:flex;overflow:auto;margin:.75rem;gap:.75rem;justify-content:center;align-items:center}.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;display:none}.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:rgb(var(--lc-color-text));font-weight:600;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}.lc-single-product[_ngcontent-%COMP%] .lc-item-details[_ngcontent-%COMP%] .lc-item-price[_ngcontent-%COMP%]{color:rgb(var(--lc-color-text))}.lc-single-product[_ngcontent-%COMP%] .lc-item-details[_ngcontent-%COMP%] .lc-item-cmp-price[_ngcontent-%COMP%]{color:rgba(var(--lc-color-text),.75);text-decoration:line-through;margin-left:10px;display:none}.lc-video-story[_ngcontent-%COMP%]{position:relative;width:5rem;height:5rem;cursor:pointer}.lc-video-story[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}.lc-video-story[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] circle[_ngcontent-%COMP%]:first-child{stroke:#d1d5db}.lc-video-story[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] circle[_ngcontent-%COMP%]:last-child{stroke:#3b82f6}.lc-video-story[_ngcontent-%COMP%] .story-video-container[_ngcontent-%COMP%]{width:100%;height:100%;border-radius:9999px;overflow:hidden}.lc-video-story[_ngcontent-%COMP%] .story-video-container[_ngcontent-%COMP%] video[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover;border-radius:9999px}"]})};eu("CooeeWidgetSDK");(async()=>{let t=await $l(tu),e=(n,r)=>{let i=ql(n,{injector:t.injector});customElements.define(r,i)};e(Bo,"cooee-sticky-atc"),e(ko,"cooee-savings-bar"),e(Vo,"cooee-progressbar"),e(ps,"cooee-shoppable-videos"),e(yr,"cooee-product-options-picker"),sessionStorage.cooeeDebug&&import("./chunk-WROWVGDC.js").then(n=>{e(n.DebuggerComponent,"cooee-debugger")})})();
|