@letscooee/web-sdk 13.1.6 → 13.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +0,0 @@
1
- import{$ as Gt,Aa as _i,Ab as Ci,B as G,Bb as Ee,C as W,E as zt,Eb as Bi,Fb as Di,Ga as yi,Gb as xi,H as Zt,Ha as mi,Hb as Ii,I as ht,Ia as vi,Ib as Qt,J as ui,Jb as nt,K as pi,Kb as et,Mb as te,Nb as It,Ob as Ri,Pb as Rt,Qb as Ti,R as Jt,Rb as Pi,Sb as ee,T as wt,U as Kt,V as we,W as be,X as ct,Z as xt,a as ri,ba as di,c as Y,ca as bt,d as ni,da as q,ea as ft,fa as gi,g as oi,ha as qt,hb as wi,i as si,ib as bi,kb as Ei,l as ai,m as ci,n as li,nb as Oi,o as hi,q as fi,qb as Si,rb as Ai,s as j,u as z,v as E,w as Xt,yb as Ni}from"./chunk-BMEFEXWO.js";import{a as U,b as ii,e as Mr,f as Lr}from"./chunk-V7UGKYBN.js";var Cr=Mr(ge=>{"use strict";Object.defineProperty(ge,"__esModule",{value:!0});ge.URLBuilder=void 0;var to=(function(){function e(t){try{this.base=new URL(t),this.params=new URLSearchParams(this.base.search.slice(1))}catch(i){console.error("Un-parsable URL",i)}}return e.prototype.appendQueryParam=function(t,i){this.params.append(t,i?i.toString():"")},e.prototype.clearQueryParams=function(){return this.params=new URLSearchParams,this},e.prototype.deleteQueryParam=function(t){this.params.delete(t)},e.prototype.getBase=function(){return this.base},e.prototype.getPath=function(){return this.base.pathname},e.prototype.getHostname=function(){return this.base.hostname},e.prototype.getParams=function(){return this.params},e.prototype.getQueryParam=function(t){if(!this.params)return"";var i=this.params.get(t);return!i||i==="undefined"||i==="null"?void 0:i},e.prototype.getQueryString=function(){return this.params.toString()},e.prototype.setPath=function(t){return this.base.pathname=t,this},e.prototype.setQueryParam=function(t,i){return this.params.set(t,i?i.toString():""),this},e.prototype.setQueryString=function(t){if(t)return t[0]==="?"&&(t=t.slice(1)),this.params=new URLSearchParams(t),this},e.prototype.toString=function(){var t=this.params.toString();return t===""?this.base.search="":this.base.search="?"+t,this.base.toString()},e})();ge.URLBuilder=to});var oo=new z("EngagementContext"),so=new z("EventData");function kr(e,t){return t={exports:{}},e(t,t.exports),t.exports}var Fr=$r,Ur=Yr,jr=zr,rt=[],J=[],Hr=typeof Uint8Array<"u"?Uint8Array:Array,Oe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(ut=0,Mi=Oe.length;ut<Mi;++ut)rt[ut]=Oe[ut],J[Oe.charCodeAt(ut)]=ut;var ut,Mi;J[45]=62;J[95]=63;function Gi(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var i=e.indexOf("=");i===-1&&(i=t);var r=i===t?0:4-i%4;return[i,r]}function $r(e){var t=Gi(e),i=t[0],r=t[1];return(i+r)*3/4-r}function Vr(e,t,i){return(t+i)*3/4-i}function Yr(e){var t,i=Gi(e),r=i[0],s=i[1],h=new Hr(Vr(e,r,s)),c=0,u=s>0?r-4:r,d;for(d=0;d<u;d+=4)t=J[e.charCodeAt(d)]<<18|J[e.charCodeAt(d+1)]<<12|J[e.charCodeAt(d+2)]<<6|J[e.charCodeAt(d+3)],h[c++]=t>>16&255,h[c++]=t>>8&255,h[c++]=t&255;return s===2&&(t=J[e.charCodeAt(d)]<<2|J[e.charCodeAt(d+1)]>>4,h[c++]=t&255),s===1&&(t=J[e.charCodeAt(d)]<<10|J[e.charCodeAt(d+1)]<<4|J[e.charCodeAt(d+2)]>>2,h[c++]=t>>8&255,h[c++]=t&255),h}function Wr(e){return rt[e>>18&63]+rt[e>>12&63]+rt[e>>6&63]+rt[e&63]}function Xr(e,t,i){for(var r,s=[],h=t;h<i;h+=3)r=(e[h]<<16&16711680)+(e[h+1]<<8&65280)+(e[h+2]&255),s.push(Wr(r));return s.join("")}function zr(e){for(var t,i=e.length,r=i%3,s=[],h=16383,c=0,u=i-r;c<u;c+=h)s.push(Xr(e,c,c+h>u?u:c+h));return r===1?(t=e[i-1],s.push(rt[t>>2]+rt[t<<4&63]+"==")):r===2&&(t=(e[i-2]<<8)+e[i-1],s.push(rt[t>>10]+rt[t>>4&63]+rt[t<<2&63]+"=")),s.join("")}var Se={byteLength:Fr,toByteArray:Ur,fromByteArray:jr};var Zr=function(t,i,r,s,h){var c,u,d=h*8-s-1,m=(1<<d)-1,y=m>>1,_=-7,v=r?h-1:0,S=r?-1:1,O=t[i+v];for(v+=S,c=O&(1<<-_)-1,O>>=-_,_+=d;_>0;c=c*256+t[i+v],v+=S,_-=8);for(u=c&(1<<-_)-1,c>>=-_,_+=s;_>0;u=u*256+t[i+v],v+=S,_-=8);if(c===0)c=1-y;else{if(c===m)return u?NaN:(O?-1:1)*(1/0);u=u+Math.pow(2,s),c=c-y}return(O?-1:1)*u*Math.pow(2,c-s)},Jr=function(t,i,r,s,h,c){var u,d,m,y=c*8-h-1,_=(1<<y)-1,v=_>>1,S=h===23?Math.pow(2,-24)-Math.pow(2,-77):0,O=s?0:c-1,A=s?1:-1,k=i<0||i===0&&1/i<0?1:0;for(i=Math.abs(i),isNaN(i)||i===1/0?(d=isNaN(i)?1:0,u=_):(u=Math.floor(Math.log(i)/Math.LN2),i*(m=Math.pow(2,-u))<1&&(u--,m*=2),u+v>=1?i+=S/m:i+=S*Math.pow(2,1-v),i*m>=2&&(u++,m/=2),u+v>=_?(d=0,u=_):u+v>=1?(d=(i*m-1)*Math.pow(2,h),u=u+v):(d=i*Math.pow(2,v-1)*Math.pow(2,h),u=0));h>=8;t[r+O]=d&255,O+=A,d/=256,h-=8);for(u=u<<h|d,y+=h;y>0;t[r+O]=u&255,O+=A,u/=256,y-=8);t[r+O-A]|=k*128},Et={read:Zr,write:Jr},ne=kr(function(e,t){var i=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=c,t.SlowBuffer=M,t.INSPECT_MAX_BYTES=50;var r=2147483647;t.kMaxLength=r,c.TYPED_ARRAY_SUPPORT=s(),!c.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 s(){try{var a=new Uint8Array(1),n={foo:function(){return 42}};return Object.setPrototypeOf(n,Uint8Array.prototype),Object.setPrototypeOf(a,n),a.foo()===42}catch{return!1}}Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}});function h(a){if(a>r)throw new RangeError('The value "'+a+'" is invalid for option "size"');var n=new Uint8Array(a);return Object.setPrototypeOf(n,c.prototype),n}function c(a,n,o){if(typeof a=="number"){if(typeof n=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return y(a)}return u(a,n,o)}c.poolSize=8192;function u(a,n,o){if(typeof a=="string")return _(a,n);if(ArrayBuffer.isView(a))return S(a);if(a==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(a));if(tt(a,ArrayBuffer)||a&&tt(a.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(tt(a,SharedArrayBuffer)||a&&tt(a.buffer,SharedArrayBuffer)))return O(a,n,o);if(typeof a=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var l=a.valueOf&&a.valueOf();if(l!=null&&l!==a)return c.from(l,n,o);var f=A(a);if(f)return f;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof a[Symbol.toPrimitive]=="function")return c.from(a[Symbol.toPrimitive]("string"),n,o);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(a))}c.from=function(a,n,o){return u(a,n,o)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array);function d(a){if(typeof a!="number")throw new TypeError('"size" argument must be of type number');if(a<0)throw new RangeError('The value "'+a+'" is invalid for option "size"')}function m(a,n,o){return d(a),a<=0?h(a):n!==void 0?typeof o=="string"?h(a).fill(n,o):h(a).fill(n):h(a)}c.alloc=function(a,n,o){return m(a,n,o)};function y(a){return d(a),h(a<0?0:k(a)|0)}c.allocUnsafe=function(a){return y(a)},c.allocUnsafeSlow=function(a){return y(a)};function _(a,n){if((typeof n!="string"||n==="")&&(n="utf8"),!c.isEncoding(n))throw new TypeError("Unknown encoding: "+n);var o=L(a,n)|0,l=h(o),f=l.write(a,n);return f!==o&&(l=l.slice(0,f)),l}function v(a){for(var n=a.length<0?0:k(a.length)|0,o=h(n),l=0;l<n;l+=1)o[l]=a[l]&255;return o}function S(a){if(tt(a,Uint8Array)){var n=new Uint8Array(a);return O(n.buffer,n.byteOffset,n.byteLength)}return v(a)}function O(a,n,o){if(n<0||a.byteLength<n)throw new RangeError('"offset" is outside of buffer bounds');if(a.byteLength<n+(o||0))throw new RangeError('"length" is outside of buffer bounds');var l;return n===void 0&&o===void 0?l=new Uint8Array(a):o===void 0?l=new Uint8Array(a,n):l=new Uint8Array(a,n,o),Object.setPrototypeOf(l,c.prototype),l}function A(a){if(c.isBuffer(a)){var n=k(a.length)|0,o=h(n);return o.length===0||a.copy(o,0,0,n),o}if(a.length!==void 0)return typeof a.length!="number"||ve(a.length)?h(0):v(a);if(a.type==="Buffer"&&Array.isArray(a.data))return v(a.data)}function k(a){if(a>=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return a|0}function M(a){return+a!=a&&(a=0),c.alloc(+a)}c.isBuffer=function(n){return n!=null&&n._isBuffer===!0&&n!==c.prototype},c.compare=function(n,o){if(tt(n,Uint8Array)&&(n=c.from(n,n.offset,n.byteLength)),tt(o,Uint8Array)&&(o=c.from(o,o.offset,o.byteLength)),!c.isBuffer(n)||!c.isBuffer(o))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(n===o)return 0;for(var l=n.length,f=o.length,p=0,g=Math.min(l,f);p<g;++p)if(n[p]!==o[p]){l=n[p],f=o[p];break}return l<f?-1:f<l?1:0},c.isEncoding=function(n){switch(String(n).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}},c.concat=function(n,o){if(!Array.isArray(n))throw new TypeError('"list" argument must be an Array of Buffers');if(n.length===0)return c.alloc(0);var l;if(o===void 0)for(o=0,l=0;l<n.length;++l)o+=n[l].length;var f=c.allocUnsafe(o),p=0;for(l=0;l<n.length;++l){var g=n[l];if(tt(g,Uint8Array))p+g.length>f.length?c.from(g).copy(f,p):Uint8Array.prototype.set.call(f,g,p);else if(c.isBuffer(g))g.copy(f,p);else throw new TypeError('"list" argument must be an Array of Buffers');p+=g.length}return f};function L(a,n){if(c.isBuffer(a))return a.length;if(ArrayBuffer.isView(a)||tt(a,ArrayBuffer))return a.byteLength;if(typeof a!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+babelHelpers.typeof(a));var o=a.length,l=arguments.length>2&&arguments[2]===!0;if(!l&&o===0)return 0;for(var f=!1;;)switch(n){case"ascii":case"latin1":case"binary":return o;case"utf8":case"utf-8":return me(a).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return o*2;case"hex":return o>>>1;case"base64":return Qe(a).length;default:if(f)return l?-1:me(a).length;n=(""+n).toLowerCase(),f=!0}}c.byteLength=L;function $(a,n,o){var l=!1;if((n===void 0||n<0)&&(n=0),n>this.length||((o===void 0||o>this.length)&&(o=this.length),o<=0)||(o>>>=0,n>>>=0,o<=n))return"";for(a||(a="utf8");;)switch(a){case"hex":return K(this,n,o);case"utf8":case"utf-8":return mt(this,n,o);case"ascii":return vt(this,n,o);case"latin1":case"binary":return R(this,n,o);case"base64":return yt(this,n,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,n,o);default:if(l)throw new TypeError("Unknown encoding: "+a);a=(a+"").toLowerCase(),l=!0}}c.prototype._isBuffer=!0;function b(a,n,o){var l=a[n];a[n]=a[o],a[o]=l}c.prototype.swap16=function(){var n=this.length;if(n%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var o=0;o<n;o+=2)b(this,o,o+1);return this},c.prototype.swap32=function(){var n=this.length;if(n%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var o=0;o<n;o+=4)b(this,o,o+3),b(this,o+1,o+2);return this},c.prototype.swap64=function(){var n=this.length;if(n%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var o=0;o<n;o+=8)b(this,o,o+7),b(this,o+1,o+6),b(this,o+2,o+5),b(this,o+3,o+4);return this},c.prototype.toString=function(){var n=this.length;return n===0?"":arguments.length===0?mt(this,0,n):$.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(n){if(!c.isBuffer(n))throw new TypeError("Argument must be a Buffer");return this===n?!0:c.compare(this,n)===0},c.prototype.inspect=function(){var n="",o=t.INSPECT_MAX_BYTES;return n=this.toString("hex",0,o).replace(/(.{2})/g,"$1 ").trim(),this.length>o&&(n+=" ... "),"<Buffer "+n+">"},i&&(c.prototype[i]=c.prototype.inspect),c.prototype.compare=function(n,o,l,f,p){if(tt(n,Uint8Array)&&(n=c.from(n,n.offset,n.byteLength)),!c.isBuffer(n))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+babelHelpers.typeof(n));if(o===void 0&&(o=0),l===void 0&&(l=n?n.length:0),f===void 0&&(f=0),p===void 0&&(p=this.length),o<0||l>n.length||f<0||p>this.length)throw new RangeError("out of range index");if(f>=p&&o>=l)return 0;if(f>=p)return-1;if(o>=l)return 1;if(o>>>=0,l>>>=0,f>>>=0,p>>>=0,this===n)return 0;for(var g=p-f,C=l-o,x=Math.min(g,C),I=this.slice(f,p),F=n.slice(o,l),T=0;T<x;++T)if(I[T]!==F[T]){g=I[T],C=F[T];break}return g<C?-1:C<g?1:0};function X(a,n,o,l,f){if(a.length===0)return-1;if(typeof o=="string"?(l=o,o=0):o>2147483647?o=2147483647:o<-2147483648&&(o=-2147483648),o=+o,ve(o)&&(o=f?0:a.length-1),o<0&&(o=a.length+o),o>=a.length){if(f)return-1;o=a.length-1}else if(o<0)if(f)o=0;else return-1;if(typeof n=="string"&&(n=c.from(n,l)),c.isBuffer(n))return n.length===0?-1:Q(a,n,o,l,f);if(typeof n=="number")return n=n&255,typeof Uint8Array.prototype.indexOf=="function"?f?Uint8Array.prototype.indexOf.call(a,n,o):Uint8Array.prototype.lastIndexOf.call(a,n,o):Q(a,[n],o,l,f);throw new TypeError("val must be string, number or Buffer")}function Q(a,n,o,l,f){var p=1,g=a.length,C=n.length;if(l!==void 0&&(l=String(l).toLowerCase(),l==="ucs2"||l==="ucs-2"||l==="utf16le"||l==="utf-16le")){if(a.length<2||n.length<2)return-1;p=2,g/=2,C/=2,o/=2}function x(ti,ei){return p===1?ti[ei]:ti.readUInt16BE(ei*p)}var I;if(f){var F=-1;for(I=o;I<g;I++)if(x(a,I)===x(n,F===-1?0:I-F)){if(F===-1&&(F=I),I-F+1===C)return F*p}else F!==-1&&(I-=I-F),F=-1}else for(o+C>g&&(o=g-C),I=o;I>=0;I--){for(var T=!0,Wt=0;Wt<C;Wt++)if(x(a,I+Wt)!==x(n,Wt)){T=!1;break}if(T)return I}return-1}c.prototype.includes=function(n,o,l){return this.indexOf(n,o,l)!==-1},c.prototype.indexOf=function(n,o,l){return X(this,n,o,l,!0)},c.prototype.lastIndexOf=function(n,o,l){return X(this,n,o,l,!1)};function st(a,n,o,l){o=Number(o)||0;var f=a.length-o;l?(l=Number(l),l>f&&(l=f)):l=f;var p=n.length;l>p/2&&(l=p/2);for(var g=0;g<l;++g){var C=parseInt(n.substr(g*2,2),16);if(ve(C))return g;a[o+g]=C}return g}function _e(a,n,o,l){return Yt(me(n,a.length-o),a,o,l)}function Dt(a,n,o,l){return Yt(Rr(n),a,o,l)}function ye(a,n,o,l){return Yt(Qe(n),a,o,l)}function $t(a,n,o,l){return Yt(Tr(n,a.length-o),a,o,l)}c.prototype.write=function(n,o,l,f){if(o===void 0)f="utf8",l=this.length,o=0;else if(l===void 0&&typeof o=="string")f=o,l=this.length,o=0;else if(isFinite(o))o=o>>>0,isFinite(l)?(l=l>>>0,f===void 0&&(f="utf8")):(f=l,l=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var p=this.length-o;if((l===void 0||l>p)&&(l=p),n.length>0&&(l<0||o<0)||o>this.length)throw new RangeError("Attempt to write outside buffer bounds");f||(f="utf8");for(var g=!1;;)switch(f){case"hex":return st(this,n,o,l);case"utf8":case"utf-8":return _e(this,n,o,l);case"ascii":case"latin1":case"binary":return Dt(this,n,o,l);case"base64":return ye(this,n,o,l);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $t(this,n,o,l);default:if(g)throw new TypeError("Unknown encoding: "+f);f=(""+f).toLowerCase(),g=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function yt(a,n,o){return n===0&&o===a.length?Se.fromByteArray(a):Se.fromByteArray(a.slice(n,o))}function mt(a,n,o){o=Math.min(a.length,o);for(var l=[],f=n;f<o;){var p=a[f],g=null,C=p>239?4:p>223?3:p>191?2:1;if(f+C<=o){var x,I,F,T;switch(C){case 1:p<128&&(g=p);break;case 2:x=a[f+1],(x&192)===128&&(T=(p&31)<<6|x&63,T>127&&(g=T));break;case 3:x=a[f+1],I=a[f+2],(x&192)===128&&(I&192)===128&&(T=(p&15)<<12|(x&63)<<6|I&63,T>2047&&(T<55296||T>57343)&&(g=T));break;case 4:x=a[f+1],I=a[f+2],F=a[f+3],(x&192)===128&&(I&192)===128&&(F&192)===128&&(T=(p&15)<<18|(x&63)<<12|(I&63)<<6|F&63,T>65535&&T<1114112&&(g=T))}}g===null?(g=65533,C=1):g>65535&&(g-=65536,l.push(g>>>10&1023|55296),g=56320|g&1023),l.push(g),f+=C}return Vt(l)}var at=4096;function Vt(a){var n=a.length;if(n<=at)return String.fromCharCode.apply(String,a);for(var o="",l=0;l<n;)o+=String.fromCharCode.apply(String,a.slice(l,l+=at));return o}function vt(a,n,o){var l="";o=Math.min(a.length,o);for(var f=n;f<o;++f)l+=String.fromCharCode(a[f]&127);return l}function R(a,n,o){var l="";o=Math.min(a.length,o);for(var f=n;f<o;++f)l+=String.fromCharCode(a[f]);return l}function K(a,n,o){var l=a.length;(!n||n<0)&&(n=0),(!o||o<0||o>l)&&(o=l);for(var f="",p=n;p<o;++p)f+=Pr[a[p]];return f}function B(a,n,o){for(var l=a.slice(n,o),f="",p=0;p<l.length-1;p+=2)f+=String.fromCharCode(l[p]+l[p+1]*256);return f}c.prototype.slice=function(n,o){var l=this.length;n=~~n,o=o===void 0?l:~~o,n<0?(n+=l,n<0&&(n=0)):n>l&&(n=l),o<0?(o+=l,o<0&&(o=0)):o>l&&(o=l),o<n&&(o=n);var f=this.subarray(n,o);return Object.setPrototypeOf(f,c.prototype),f};function N(a,n,o){if(a%1!==0||a<0)throw new RangeError("offset is not uint");if(a+n>o)throw new RangeError("Trying to access beyond buffer length")}c.prototype.readUintLE=c.prototype.readUIntLE=function(n,o,l){n=n>>>0,o=o>>>0,l||N(n,o,this.length);for(var f=this[n],p=1,g=0;++g<o&&(p*=256);)f+=this[n+g]*p;return f},c.prototype.readUintBE=c.prototype.readUIntBE=function(n,o,l){n=n>>>0,o=o>>>0,l||N(n,o,this.length);for(var f=this[n+--o],p=1;o>0&&(p*=256);)f+=this[n+--o]*p;return f},c.prototype.readUint8=c.prototype.readUInt8=function(n,o){return n=n>>>0,o||N(n,1,this.length),this[n]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(n,o){return n=n>>>0,o||N(n,2,this.length),this[n]|this[n+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(n,o){return n=n>>>0,o||N(n,2,this.length),this[n]<<8|this[n+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(n,o){return n=n>>>0,o||N(n,4,this.length),(this[n]|this[n+1]<<8|this[n+2]<<16)+this[n+3]*16777216},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(n,o){return n=n>>>0,o||N(n,4,this.length),this[n]*16777216+(this[n+1]<<16|this[n+2]<<8|this[n+3])},c.prototype.readIntLE=function(n,o,l){n=n>>>0,o=o>>>0,l||N(n,o,this.length);for(var f=this[n],p=1,g=0;++g<o&&(p*=256);)f+=this[n+g]*p;return p*=128,f>=p&&(f-=Math.pow(2,8*o)),f},c.prototype.readIntBE=function(n,o,l){n=n>>>0,o=o>>>0,l||N(n,o,this.length);for(var f=o,p=1,g=this[n+--f];f>0&&(p*=256);)g+=this[n+--f]*p;return p*=128,g>=p&&(g-=Math.pow(2,8*o)),g},c.prototype.readInt8=function(n,o){return n=n>>>0,o||N(n,1,this.length),this[n]&128?(255-this[n]+1)*-1:this[n]},c.prototype.readInt16LE=function(n,o){n=n>>>0,o||N(n,2,this.length);var l=this[n]|this[n+1]<<8;return l&32768?l|4294901760:l},c.prototype.readInt16BE=function(n,o){n=n>>>0,o||N(n,2,this.length);var l=this[n+1]|this[n]<<8;return l&32768?l|4294901760:l},c.prototype.readInt32LE=function(n,o){return n=n>>>0,o||N(n,4,this.length),this[n]|this[n+1]<<8|this[n+2]<<16|this[n+3]<<24},c.prototype.readInt32BE=function(n,o){return n=n>>>0,o||N(n,4,this.length),this[n]<<24|this[n+1]<<16|this[n+2]<<8|this[n+3]},c.prototype.readFloatLE=function(n,o){return n=n>>>0,o||N(n,4,this.length),Et.read(this,n,!0,23,4)},c.prototype.readFloatBE=function(n,o){return n=n>>>0,o||N(n,4,this.length),Et.read(this,n,!1,23,4)},c.prototype.readDoubleLE=function(n,o){return n=n>>>0,o||N(n,8,this.length),Et.read(this,n,!0,52,8)},c.prototype.readDoubleBE=function(n,o){return n=n>>>0,o||N(n,8,this.length),Et.read(this,n,!1,52,8)};function V(a,n,o,l,f,p){if(!c.isBuffer(a))throw new TypeError('"buffer" argument must be a Buffer instance');if(n>f||n<p)throw new RangeError('"value" argument is out of bounds');if(o+l>a.length)throw new RangeError("Index out of range")}c.prototype.writeUintLE=c.prototype.writeUIntLE=function(n,o,l,f){if(n=+n,o=o>>>0,l=l>>>0,!f){var p=Math.pow(2,8*l)-1;V(this,n,o,l,p,0)}var g=1,C=0;for(this[o]=n&255;++C<l&&(g*=256);)this[o+C]=n/g&255;return o+l},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(n,o,l,f){if(n=+n,o=o>>>0,l=l>>>0,!f){var p=Math.pow(2,8*l)-1;V(this,n,o,l,p,0)}var g=l-1,C=1;for(this[o+g]=n&255;--g>=0&&(C*=256);)this[o+g]=n/C&255;return o+l},c.prototype.writeUint8=c.prototype.writeUInt8=function(n,o,l){return n=+n,o=o>>>0,l||V(this,n,o,1,255,0),this[o]=n&255,o+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(n,o,l){return n=+n,o=o>>>0,l||V(this,n,o,2,65535,0),this[o]=n&255,this[o+1]=n>>>8,o+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(n,o,l){return n=+n,o=o>>>0,l||V(this,n,o,2,65535,0),this[o]=n>>>8,this[o+1]=n&255,o+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(n,o,l){return n=+n,o=o>>>0,l||V(this,n,o,4,4294967295,0),this[o+3]=n>>>24,this[o+2]=n>>>16,this[o+1]=n>>>8,this[o]=n&255,o+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(n,o,l){return n=+n,o=o>>>0,l||V(this,n,o,4,4294967295,0),this[o]=n>>>24,this[o+1]=n>>>16,this[o+2]=n>>>8,this[o+3]=n&255,o+4},c.prototype.writeIntLE=function(n,o,l,f){if(n=+n,o=o>>>0,!f){var p=Math.pow(2,8*l-1);V(this,n,o,l,p-1,-p)}var g=0,C=1,x=0;for(this[o]=n&255;++g<l&&(C*=256);)n<0&&x===0&&this[o+g-1]!==0&&(x=1),this[o+g]=(n/C>>0)-x&255;return o+l},c.prototype.writeIntBE=function(n,o,l,f){if(n=+n,o=o>>>0,!f){var p=Math.pow(2,8*l-1);V(this,n,o,l,p-1,-p)}var g=l-1,C=1,x=0;for(this[o+g]=n&255;--g>=0&&(C*=256);)n<0&&x===0&&this[o+g+1]!==0&&(x=1),this[o+g]=(n/C>>0)-x&255;return o+l},c.prototype.writeInt8=function(n,o,l){return n=+n,o=o>>>0,l||V(this,n,o,1,127,-128),n<0&&(n=255+n+1),this[o]=n&255,o+1},c.prototype.writeInt16LE=function(n,o,l){return n=+n,o=o>>>0,l||V(this,n,o,2,32767,-32768),this[o]=n&255,this[o+1]=n>>>8,o+2},c.prototype.writeInt16BE=function(n,o,l){return n=+n,o=o>>>0,l||V(this,n,o,2,32767,-32768),this[o]=n>>>8,this[o+1]=n&255,o+2},c.prototype.writeInt32LE=function(n,o,l){return n=+n,o=o>>>0,l||V(this,n,o,4,2147483647,-2147483648),this[o]=n&255,this[o+1]=n>>>8,this[o+2]=n>>>16,this[o+3]=n>>>24,o+4},c.prototype.writeInt32BE=function(n,o,l){return n=+n,o=o>>>0,l||V(this,n,o,4,2147483647,-2147483648),n<0&&(n=4294967295+n+1),this[o]=n>>>24,this[o+1]=n>>>16,this[o+2]=n>>>8,this[o+3]=n&255,o+4};function Ke(a,n,o,l,f,p){if(o+l>a.length)throw new RangeError("Index out of range");if(o<0)throw new RangeError("Index out of range")}function Ge(a,n,o,l,f){return n=+n,o=o>>>0,f||Ke(a,n,o,4),Et.write(a,n,o,l,23,4),o+4}c.prototype.writeFloatLE=function(n,o,l){return Ge(this,n,o,!0,l)},c.prototype.writeFloatBE=function(n,o,l){return Ge(this,n,o,!1,l)};function qe(a,n,o,l,f){return n=+n,o=o>>>0,f||Ke(a,n,o,8),Et.write(a,n,o,l,52,8),o+8}c.prototype.writeDoubleLE=function(n,o,l){return qe(this,n,o,!0,l)},c.prototype.writeDoubleBE=function(n,o,l){return qe(this,n,o,!1,l)},c.prototype.copy=function(n,o,l,f){if(!c.isBuffer(n))throw new TypeError("argument should be a Buffer");if(l||(l=0),!f&&f!==0&&(f=this.length),o>=n.length&&(o=n.length),o||(o=0),f>0&&f<l&&(f=l),f===l||n.length===0||this.length===0)return 0;if(o<0)throw new RangeError("targetStart out of bounds");if(l<0||l>=this.length)throw new RangeError("Index out of range");if(f<0)throw new RangeError("sourceEnd out of bounds");f>this.length&&(f=this.length),n.length-o<f-l&&(f=n.length-o+l);var p=f-l;return this===n&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(o,l,f):Uint8Array.prototype.set.call(n,this.subarray(l,f),o),p},c.prototype.fill=function(n,o,l,f){if(typeof n=="string"){if(typeof o=="string"?(f=o,o=0,l=this.length):typeof l=="string"&&(f=l,l=this.length),f!==void 0&&typeof f!="string")throw new TypeError("encoding must be a string");if(typeof f=="string"&&!c.isEncoding(f))throw new TypeError("Unknown encoding: "+f);if(n.length===1){var p=n.charCodeAt(0);(f==="utf8"&&p<128||f==="latin1")&&(n=p)}}else typeof n=="number"?n=n&255:typeof n=="boolean"&&(n=Number(n));if(o<0||this.length<o||this.length<l)throw new RangeError("Out of range index");if(l<=o)return this;o=o>>>0,l=l===void 0?this.length:l>>>0,n||(n=0);var g;if(typeof n=="number")for(g=o;g<l;++g)this[g]=n;else{var C=c.isBuffer(n)?n:c.from(n,f),x=C.length;if(x===0)throw new TypeError('The value "'+n+'" is invalid for argument "value"');for(g=0;g<l-o;++g)this[g+o]=C[g%x]}return this};var xr=/[^+/0-9A-Za-z-_]/g;function Ir(a){if(a=a.split("=")[0],a=a.trim().replace(xr,""),a.length<2)return"";for(;a.length%4!==0;)a=a+"=";return a}function me(a,n){n=n||1/0;for(var o,l=a.length,f=null,p=[],g=0;g<l;++g){if(o=a.charCodeAt(g),o>55295&&o<57344){if(!f){if(o>56319){(n-=3)>-1&&p.push(239,191,189);continue}else if(g+1===l){(n-=3)>-1&&p.push(239,191,189);continue}f=o;continue}if(o<56320){(n-=3)>-1&&p.push(239,191,189),f=o;continue}o=(f-55296<<10|o-56320)+65536}else f&&(n-=3)>-1&&p.push(239,191,189);if(f=null,o<128){if((n-=1)<0)break;p.push(o)}else if(o<2048){if((n-=2)<0)break;p.push(o>>6|192,o&63|128)}else if(o<65536){if((n-=3)<0)break;p.push(o>>12|224,o>>6&63|128,o&63|128)}else if(o<1114112){if((n-=4)<0)break;p.push(o>>18|240,o>>12&63|128,o>>6&63|128,o&63|128)}else throw new Error("Invalid code point")}return p}function Rr(a){for(var n=[],o=0;o<a.length;++o)n.push(a.charCodeAt(o)&255);return n}function Tr(a,n){for(var o,l,f,p=[],g=0;g<a.length&&!((n-=2)<0);++g)o=a.charCodeAt(g),l=o>>8,f=o%256,p.push(f),p.push(l);return p}function Qe(a){return Se.toByteArray(Ir(a))}function Yt(a,n,o,l){for(var f=0;f<l&&!(f+o>=n.length||f>=a.length);++f)n[f+o]=a[f];return f}function tt(a,n){return a instanceof n||a!=null&&a.constructor!=null&&a.constructor.name!=null&&a.constructor.name===n.name}function ve(a){return a!==a}var Pr=(function(){for(var a="0123456789abcdef",n=new Array(256),o=0;o<16;++o)for(var l=o*16,f=0;f<16;++f)n[l+f]=a[o]+a[f];return n})()}),D=ne.Buffer;ne.SlowBuffer;ne.INSPECT_MAX_BYTES;ne.kMaxLength;var De=function(t,i){return De=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var h in s)s.hasOwnProperty(h)&&(r[h]=s[h])},De(t,i)};function oe(e,t){De(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}var dt=(function(e){oe(t,e);function t(i){var r=e.call(this,i)||this;return Object.setPrototypeOf(r,t.prototype),r}return Object.defineProperty(t.prototype,"name",{get:function(){return"BSONError"},enumerable:!1,configurable:!0}),t})(Error),P=(function(e){oe(t,e);function t(i){var r=e.call(this,i)||this;return Object.setPrototypeOf(r,t.prototype),r}return Object.defineProperty(t.prototype,"name",{get:function(){return"BSONTypeError"},enumerable:!1,configurable:!0}),t})(TypeError);function ie(e){return e&&e.Math==Math&&e}function qi(){return ie(typeof globalThis=="object"&&globalThis)||ie(typeof window=="object"&&window)||ie(typeof self=="object"&&self)||ie(typeof global=="object"&&global)||Function("return this")()}function Kr(){var e=qi();return typeof e.navigator=="object"&&e.navigator.product==="ReactNative"}var Gr=function(t){var i=Kr()?"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(i);for(var r=D.alloc(t),s=0;s<t;++s)r[s]=Math.floor(Math.random()*256);return r},qr=function(){{if(typeof window<"u"){var e=window.crypto||window.msCrypto;if(e&&e.getRandomValues)return function(t){return e.getRandomValues(D.alloc(t))}}return typeof global<"u"&&global.crypto&&global.crypto.getRandomValues?function(t){return global.crypto.getRandomValues(D.alloc(t))}:Gr}},Qi=qr();function Qr(e){return["[object ArrayBuffer]","[object SharedArrayBuffer]"].includes(Object.prototype.toString.call(e))}function Ie(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}function tn(e){return Object.prototype.toString.call(e)==="[object RegExp]"}function en(e){return Lt(e)&&Object.prototype.toString.call(e)==="[object Date]"}function Lt(e){return typeof e=="object"&&e!==null}function se(e,t){var i=!1;function r(){for(var s=[],h=0;h<arguments.length;h++)s[h]=arguments[h];return i||(console.warn(t),i=!0),e.apply(this,s)}return r}function re(e){if(ArrayBuffer.isView(e))return D.from(e.buffer,e.byteOffset,e.byteLength);if(Qr(e))return D.from(e);throw new P("Must use either Buffer or TypedArray")}var rn=/^(?:[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,tr=function(e){return typeof e=="string"&&rn.test(e)},xe=function(e){if(!tr(e))throw new P('UUID string representations must be a 32 or 36 character hex string (dashes excluded/included). Format: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" or "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx".');var t=e.replace(/-/g,"");return D.from(t,"hex")},Li=function(e,t){return t===void 0&&(t=!0),t?e.toString("hex",0,4)+"-"+e.toString("hex",4,6)+"-"+e.toString("hex",6,8)+"-"+e.toString("hex",8,10)+"-"+e.toString("hex",10,16):e.toString("hex")};var co=Math.pow(2,63)-1,lo=-Math.pow(2,63),nn=Math.pow(2,53),on=-Math.pow(2,53);var er=4;var gt=(function(){function e(t,i){if(!(this instanceof e))return new e(t,i);if(t!=null&&typeof t!="string"&&!ArrayBuffer.isView(t)&&!(t instanceof ArrayBuffer)&&!Array.isArray(t))throw new P("Binary can only be constructed from string, Buffer, TypedArray, or Array<number>");this.sub_type=i??e.BSON_BINARY_SUBTYPE_DEFAULT,t==null?(this.buffer=D.alloc(e.BUFFER_SIZE),this.position=0):(typeof t=="string"?this.buffer=D.from(t,"binary"):Array.isArray(t)?this.buffer=D.from(t):this.buffer=re(t),this.position=this.buffer.byteLength)}return e.prototype.put=function(t){if(typeof t=="string"&&t.length!==1)throw new P("only accepts single character String");if(typeof t!="number"&&t.length!==1)throw new P("only accepts single character Uint8Array or Array");var i;if(typeof t=="string"?i=t.charCodeAt(0):typeof t=="number"?i=t:i=t[0],i<0||i>255)throw new P("only accepts number in a valid unsigned byte range 0-255");if(this.buffer.length>this.position)this.buffer[this.position++]=i;else{var r=D.alloc(e.BUFFER_SIZE+this.buffer.length);this.buffer.copy(r,0,0,this.buffer.length),this.buffer=r,this.buffer[this.position++]=i}},e.prototype.write=function(t,i){if(i=typeof i=="number"?i:this.position,this.buffer.length<i+t.length){var r=D.alloc(this.buffer.length+t.length);this.buffer.copy(r,0,0,this.buffer.length),this.buffer=r}ArrayBuffer.isView(t)?(this.buffer.set(re(t),i),this.position=i+t.byteLength>this.position?i+t.length:this.position):typeof t=="string"&&(this.buffer.write(t,i,t.length,"binary"),this.position=i+t.length>this.position?i+t.length:this.position)},e.prototype.read=function(t,i){return i=i&&i>0?i:this.position,this.buffer.slice(t,t+i)},e.prototype.value=function(t){return t=!!t,t&&this.buffer.length===this.position?this.buffer:t?this.buffer.slice(0,this.position):this.buffer.toString("binary",0,this.position)},e.prototype.length=function(){return this.position},e.prototype.toJSON=function(){return this.buffer.toString("base64")},e.prototype.toString=function(t){return this.buffer.toString(t)},e.prototype.toExtendedJSON=function(t){t=t||{};var i=this.buffer.toString("base64"),r=Number(this.sub_type).toString(16);return t.legacy?{$binary:i,$type:r.length===1?"0"+r:r}:{$binary:{base64:i,subType:r.length===1?"0"+r:r}}},e.prototype.toUUID=function(){if(this.sub_type===e.SUBTYPE_UUID)return new ki(this.buffer.slice(0,this.position));throw new dt('Binary sub_type "'.concat(this.sub_type,'" is not supported for converting to UUID. Only "').concat(e.SUBTYPE_UUID,'" is currently supported.'))},e.fromExtendedJSON=function(t,i){i=i||{};var r,s;if("$binary"in t?i.legacy&&typeof t.$binary=="string"&&"$type"in t?(s=t.$type?parseInt(t.$type,16):0,r=D.from(t.$binary,"base64")):typeof t.$binary!="string"&&(s=t.$binary.subType?parseInt(t.$binary.subType,16):0,r=D.from(t.$binary.base64,"base64")):"$uuid"in t&&(s=4,r=xe(t.$uuid)),!r)throw new P("Unexpected Binary Extended JSON format ".concat(JSON.stringify(t)));return s===er?new ki(r):new e(r,s)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var t=this.value(!0);return'new Binary(Buffer.from("'.concat(t.toString("hex"),'", "hex"), ').concat(this.sub_type,")")},e.BSON_BINARY_SUBTYPE_DEFAULT=0,e.BUFFER_SIZE=256,e.SUBTYPE_DEFAULT=0,e.SUBTYPE_FUNCTION=1,e.SUBTYPE_BYTE_ARRAY=2,e.SUBTYPE_UUID_OLD=3,e.SUBTYPE_UUID=4,e.SUBTYPE_MD5=5,e.SUBTYPE_ENCRYPTED=6,e.SUBTYPE_COLUMN=7,e.SUBTYPE_USER_DEFINED=128,e})();Object.defineProperty(gt.prototype,"_bsontype",{value:"Binary"});var Ae=16,ki=(function(e){oe(t,e);function t(i){var r=this,s,h;if(i==null)s=t.generate();else if(i instanceof t)s=D.from(i.buffer),h=i.__id;else if(ArrayBuffer.isView(i)&&i.byteLength===Ae)s=re(i);else if(typeof i=="string")s=xe(i);else throw new P("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=e.call(this,s,er)||this,r.__id=h,r}return Object.defineProperty(t.prototype,"id",{get:function(){return this.buffer},set:function(i){this.buffer=i,t.cacheHexString&&(this.__id=Li(i))},enumerable:!1,configurable:!0}),t.prototype.toHexString=function(i){if(i===void 0&&(i=!0),t.cacheHexString&&this.__id)return this.__id;var r=Li(this.id,i);return t.cacheHexString&&(this.__id=r),r},t.prototype.toString=function(i){return i?this.id.toString(i):this.toHexString()},t.prototype.toJSON=function(){return this.toHexString()},t.prototype.equals=function(i){if(!i)return!1;if(i instanceof t)return i.id.equals(this.id);try{return new t(i).id.equals(this.id)}catch{return!1}},t.prototype.toBinary=function(){return new gt(this.id,gt.SUBTYPE_UUID)},t.generate=function(){var i=Qi(Ae);return i[6]=i[6]&15|64,i[8]=i[8]&63|128,D.from(i)},t.isValid=function(i){return i?i instanceof t?!0:typeof i=="string"?tr(i):Ie(i)?i.length!==Ae?!1:(i[6]&240)===64&&(i[8]&128)===128:!1:!1},t.createFromHexString=function(i){var r=xe(i);return new t(r)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return'new UUID("'.concat(this.toHexString(),'")')},t})(gt),ae=(function(){function e(t,i){if(!(this instanceof e))return new e(t,i);this.code=t,this.scope=i}return e.prototype.toJSON=function(){return{code:this.code,scope:this.scope}},e.prototype.toExtendedJSON=function(){return this.scope?{$code:this.code,$scope:this.scope}:{$code:this.code}},e.fromExtendedJSON=function(t){return new e(t.$code,t.$scope)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var t=this.toJSON();return'new Code("'.concat(String(t.code),'"').concat(t.scope?", ".concat(JSON.stringify(t.scope)):"",")")},e})();Object.defineProperty(ae.prototype,"_bsontype",{value:"Code"});function sn(e){return Lt(e)&&e.$id!=null&&typeof e.$ref=="string"&&(e.$db==null||typeof e.$db=="string")}var Pt=(function(){function e(t,i,r,s){if(!(this instanceof e))return new e(t,i,r,s);var h=t.split(".");h.length===2&&(r=h.shift(),t=h.shift()),this.collection=t,this.oid=i,this.db=r,this.fields=s||{}}return Object.defineProperty(e.prototype,"namespace",{get:function(){return this.collection},set:function(t){this.collection=t},enumerable:!1,configurable:!0}),e.prototype.toJSON=function(){var t=Object.assign({$ref:this.collection,$id:this.oid},this.fields);return this.db!=null&&(t.$db=this.db),t},e.prototype.toExtendedJSON=function(t){t=t||{};var i={$ref:this.collection,$id:this.oid};return t.legacy||(this.db&&(i.$db=this.db),i=Object.assign(i,this.fields)),i},e.fromExtendedJSON=function(t){var i=Object.assign({},t);return delete i.$ref,delete i.$id,delete i.$db,new e(t.$ref,t.$id,t.$db,i)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var t=this.oid===void 0||this.oid.toString===void 0?this.oid:this.oid.toString();return'new DBRef("'.concat(this.namespace,'", new ObjectId("').concat(String(t),'")').concat(this.db?', "'.concat(this.db,'"'):"",")")},e})();Object.defineProperty(Pt.prototype,"_bsontype",{value:"DBRef"});var Z=void 0;try{Z=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 Fi=65536,an=1<<24,St=Fi*Fi,ir=St*St,Ui=ir/2,ji={},Hi={},w=(function(){function e(t,i,r){if(t===void 0&&(t=0),!(this instanceof e))return new e(t,i,r);typeof t=="bigint"?Object.assign(this,e.fromBigInt(t,!!i)):typeof t=="string"?Object.assign(this,e.fromString(t,!!i)):(this.low=t|0,this.high=i|0,this.unsigned=!!r),Object.defineProperty(this,"__isLong__",{value:!0,configurable:!1,writable:!1,enumerable:!1})}return e.fromBits=function(t,i,r){return new e(t,i,r)},e.fromInt=function(t,i){var r,s,h;return i?(t>>>=0,(h=0<=t&&t<256)&&(s=Hi[t],s)?s:(r=e.fromBits(t,(t|0)<0?-1:0,!0),h&&(Hi[t]=r),r)):(t|=0,(h=-128<=t&&t<128)&&(s=ji[t],s)?s:(r=e.fromBits(t,t<0?-1:0,!1),h&&(ji[t]=r),r))},e.fromNumber=function(t,i){if(isNaN(t))return i?e.UZERO:e.ZERO;if(i){if(t<0)return e.UZERO;if(t>=ir)return e.MAX_UNSIGNED_VALUE}else{if(t<=-Ui)return e.MIN_VALUE;if(t+1>=Ui)return e.MAX_VALUE}return t<0?e.fromNumber(-t,i).neg():e.fromBits(t%St|0,t/St|0,i)},e.fromBigInt=function(t,i){return e.fromString(t.toString(),i)},e.fromString=function(t,i,r){if(t.length===0)throw Error("empty string");if(t==="NaN"||t==="Infinity"||t==="+Infinity"||t==="-Infinity")return e.ZERO;if(typeof i=="number"?(r=i,i=!1):i=!!i,r=r||10,r<2||36<r)throw RangeError("radix");var s;if((s=t.indexOf("-"))>0)throw Error("interior hyphen");if(s===0)return e.fromString(t.substring(1),i,r).neg();for(var h=e.fromNumber(Math.pow(r,8)),c=e.ZERO,u=0;u<t.length;u+=8){var d=Math.min(8,t.length-u),m=parseInt(t.substring(u,u+d),r);if(d<8){var y=e.fromNumber(Math.pow(r,d));c=c.mul(y).add(e.fromNumber(m))}else c=c.mul(h),c=c.add(e.fromNumber(m))}return c.unsigned=i,c},e.fromBytes=function(t,i,r){return r?e.fromBytesLE(t,i):e.fromBytesBE(t,i)},e.fromBytesLE=function(t,i){return new e(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,i)},e.fromBytesBE=function(t,i){return new e(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],i)},e.isLong=function(t){return Lt(t)&&t.__isLong__===!0},e.fromValue=function(t,i){return typeof t=="number"?e.fromNumber(t,i):typeof t=="string"?e.fromString(t,i):e.fromBits(t.low,t.high,typeof i=="boolean"?i:t.unsigned)},e.prototype.add=function(t){e.isLong(t)||(t=e.fromValue(t));var i=this.high>>>16,r=this.high&65535,s=this.low>>>16,h=this.low&65535,c=t.high>>>16,u=t.high&65535,d=t.low>>>16,m=t.low&65535,y=0,_=0,v=0,S=0;return S+=h+m,v+=S>>>16,S&=65535,v+=s+d,_+=v>>>16,v&=65535,_+=r+u,y+=_>>>16,_&=65535,y+=i+c,y&=65535,e.fromBits(v<<16|S,y<<16|_,this.unsigned)},e.prototype.and=function(t){return e.isLong(t)||(t=e.fromValue(t)),e.fromBits(this.low&t.low,this.high&t.high,this.unsigned)},e.prototype.compare=function(t){if(e.isLong(t)||(t=e.fromValue(t)),this.eq(t))return 0;var i=this.isNegative(),r=t.isNegative();return i&&!r?-1:!i&&r?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},e.prototype.comp=function(t){return this.compare(t)},e.prototype.divide=function(t){if(e.isLong(t)||(t=e.fromValue(t)),t.isZero())throw Error("division by zero");if(Z){if(!this.unsigned&&this.high===-2147483648&&t.low===-1&&t.high===-1)return this;var i=(this.unsigned?Z.div_u:Z.div_s)(this.low,this.high,t.low,t.high);return e.fromBits(i,Z.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?e.UZERO:e.ZERO;var r,s,h;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return e.UZERO;if(t.gt(this.shru(1)))return e.UONE;h=e.UZERO}else{if(this.eq(e.MIN_VALUE)){if(t.eq(e.ONE)||t.eq(e.NEG_ONE))return e.MIN_VALUE;if(t.eq(e.MIN_VALUE))return e.ONE;var c=this.shr(1);return r=c.div(t).shl(1),r.eq(e.ZERO)?t.isNegative()?e.ONE:e.NEG_ONE:(s=this.sub(t.mul(r)),h=r.add(s.div(t)),h)}else if(t.eq(e.MIN_VALUE))return this.unsigned?e.UZERO:e.ZERO;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();h=e.ZERO}for(s=this;s.gte(t);){r=Math.max(1,Math.floor(s.toNumber()/t.toNumber()));for(var u=Math.ceil(Math.log(r)/Math.LN2),d=u<=48?1:Math.pow(2,u-48),m=e.fromNumber(r),y=m.mul(t);y.isNegative()||y.gt(s);)r-=d,m=e.fromNumber(r,this.unsigned),y=m.mul(t);m.isZero()&&(m=e.ONE),h=h.add(m),s=s.sub(y)}return h},e.prototype.div=function(t){return this.divide(t)},e.prototype.equals=function(t){return e.isLong(t)||(t=e.fromValue(t)),this.unsigned!==t.unsigned&&this.high>>>31===1&&t.high>>>31===1?!1:this.high===t.high&&this.low===t.low},e.prototype.eq=function(t){return this.equals(t)},e.prototype.getHighBits=function(){return this.high},e.prototype.getHighBitsUnsigned=function(){return this.high>>>0},e.prototype.getLowBits=function(){return this.low},e.prototype.getLowBitsUnsigned=function(){return this.low>>>0},e.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.eq(e.MIN_VALUE)?64:this.neg().getNumBitsAbs();var t=this.high!==0?this.high:this.low,i;for(i=31;i>0&&(t&1<<i)===0;i--);return this.high!==0?i+33:i+1},e.prototype.greaterThan=function(t){return this.comp(t)>0},e.prototype.gt=function(t){return this.greaterThan(t)},e.prototype.greaterThanOrEqual=function(t){return this.comp(t)>=0},e.prototype.gte=function(t){return this.greaterThanOrEqual(t)},e.prototype.ge=function(t){return this.greaterThanOrEqual(t)},e.prototype.isEven=function(){return(this.low&1)===0},e.prototype.isNegative=function(){return!this.unsigned&&this.high<0},e.prototype.isOdd=function(){return(this.low&1)===1},e.prototype.isPositive=function(){return this.unsigned||this.high>=0},e.prototype.isZero=function(){return this.high===0&&this.low===0},e.prototype.lessThan=function(t){return this.comp(t)<0},e.prototype.lt=function(t){return this.lessThan(t)},e.prototype.lessThanOrEqual=function(t){return this.comp(t)<=0},e.prototype.lte=function(t){return this.lessThanOrEqual(t)},e.prototype.modulo=function(t){if(e.isLong(t)||(t=e.fromValue(t)),Z){var i=(this.unsigned?Z.rem_u:Z.rem_s)(this.low,this.high,t.low,t.high);return e.fromBits(i,Z.get_high(),this.unsigned)}return this.sub(this.div(t).mul(t))},e.prototype.mod=function(t){return this.modulo(t)},e.prototype.rem=function(t){return this.modulo(t)},e.prototype.multiply=function(t){if(this.isZero())return e.ZERO;if(e.isLong(t)||(t=e.fromValue(t)),Z){var i=Z.mul(this.low,this.high,t.low,t.high);return e.fromBits(i,Z.get_high(),this.unsigned)}if(t.isZero())return e.ZERO;if(this.eq(e.MIN_VALUE))return t.isOdd()?e.MIN_VALUE:e.ZERO;if(t.eq(e.MIN_VALUE))return this.isOdd()?e.MIN_VALUE:e.ZERO;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(e.TWO_PWR_24)&&t.lt(e.TWO_PWR_24))return e.fromNumber(this.toNumber()*t.toNumber(),this.unsigned);var r=this.high>>>16,s=this.high&65535,h=this.low>>>16,c=this.low&65535,u=t.high>>>16,d=t.high&65535,m=t.low>>>16,y=t.low&65535,_=0,v=0,S=0,O=0;return O+=c*y,S+=O>>>16,O&=65535,S+=h*y,v+=S>>>16,S&=65535,S+=c*m,v+=S>>>16,S&=65535,v+=s*y,_+=v>>>16,v&=65535,v+=h*m,_+=v>>>16,v&=65535,v+=c*d,_+=v>>>16,v&=65535,_+=r*y+s*m+h*d+c*u,_&=65535,e.fromBits(S<<16|O,_<<16|v,this.unsigned)},e.prototype.mul=function(t){return this.multiply(t)},e.prototype.negate=function(){return!this.unsigned&&this.eq(e.MIN_VALUE)?e.MIN_VALUE:this.not().add(e.ONE)},e.prototype.neg=function(){return this.negate()},e.prototype.not=function(){return e.fromBits(~this.low,~this.high,this.unsigned)},e.prototype.notEquals=function(t){return!this.equals(t)},e.prototype.neq=function(t){return this.notEquals(t)},e.prototype.ne=function(t){return this.notEquals(t)},e.prototype.or=function(t){return e.isLong(t)||(t=e.fromValue(t)),e.fromBits(this.low|t.low,this.high|t.high,this.unsigned)},e.prototype.shiftLeft=function(t){return e.isLong(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?e.fromBits(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):e.fromBits(0,this.low<<t-32,this.unsigned)},e.prototype.shl=function(t){return this.shiftLeft(t)},e.prototype.shiftRight=function(t){return e.isLong(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?e.fromBits(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):e.fromBits(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},e.prototype.shr=function(t){return this.shiftRight(t)},e.prototype.shiftRightUnsigned=function(t){if(e.isLong(t)&&(t=t.toInt()),t&=63,t===0)return this;var i=this.high;if(t<32){var r=this.low;return e.fromBits(r>>>t|i<<32-t,i>>>t,this.unsigned)}else return t===32?e.fromBits(i,0,this.unsigned):e.fromBits(i>>>t-32,0,this.unsigned)},e.prototype.shr_u=function(t){return this.shiftRightUnsigned(t)},e.prototype.shru=function(t){return this.shiftRightUnsigned(t)},e.prototype.subtract=function(t){return e.isLong(t)||(t=e.fromValue(t)),this.add(t.neg())},e.prototype.sub=function(t){return this.subtract(t)},e.prototype.toInt=function(){return this.unsigned?this.low>>>0:this.low},e.prototype.toNumber=function(){return this.unsigned?(this.high>>>0)*St+(this.low>>>0):this.high*St+(this.low>>>0)},e.prototype.toBigInt=function(){return BigInt(this.toString())},e.prototype.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},e.prototype.toBytesLE=function(){var t=this.high,i=this.low;return[i&255,i>>>8&255,i>>>16&255,i>>>24,t&255,t>>>8&255,t>>>16&255,t>>>24]},e.prototype.toBytesBE=function(){var t=this.high,i=this.low;return[t>>>24,t>>>16&255,t>>>8&255,t&255,i>>>24,i>>>16&255,i>>>8&255,i&255]},e.prototype.toSigned=function(){return this.unsigned?e.fromBits(this.low,this.high,!1):this},e.prototype.toString=function(t){if(t=t||10,t<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(e.MIN_VALUE)){var i=e.fromNumber(t),r=this.div(i),s=r.mul(i).sub(this);return r.toString(t)+s.toInt().toString(t)}else return"-"+this.neg().toString(t);for(var h=e.fromNumber(Math.pow(t,6),this.unsigned),c=this,u="";;){var d=c.div(h),m=c.sub(d.mul(h)).toInt()>>>0,y=m.toString(t);if(c=d,c.isZero())return y+u;for(;y.length<6;)y="0"+y;u=""+y+u}},e.prototype.toUnsigned=function(){return this.unsigned?this:e.fromBits(this.low,this.high,!0)},e.prototype.xor=function(t){return e.isLong(t)||(t=e.fromValue(t)),e.fromBits(this.low^t.low,this.high^t.high,this.unsigned)},e.prototype.eqz=function(){return this.isZero()},e.prototype.le=function(t){return this.lessThanOrEqual(t)},e.prototype.toExtendedJSON=function(t){return t&&t.relaxed?this.toNumber():{$numberLong:this.toString()}},e.fromExtendedJSON=function(t,i){var r=e.fromString(t.$numberLong);return i&&i.relaxed?r.toNumber():r},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new Long("'.concat(this.toString(),'"').concat(this.unsigned?", true":"",")")},e.TWO_PWR_24=e.fromInt(an),e.MAX_UNSIGNED_VALUE=e.fromBits(-1,-1,!0),e.ZERO=e.fromInt(0),e.UZERO=e.fromInt(0,!0),e.ONE=e.fromInt(1),e.UONE=e.fromInt(1,!0),e.NEG_ONE=e.fromInt(-1),e.MAX_VALUE=e.fromBits(-1,2147483647,!1),e.MIN_VALUE=e.fromBits(0,-2147483648,!1),e})();Object.defineProperty(w.prototype,"__isLong__",{value:!0});Object.defineProperty(w.prototype,"_bsontype",{value:"Long"});var cn=/^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/,ln=/^(\+|-)?(Infinity|inf)$/i,hn=/^(\+|-)?NaN$/i,Tt=6111,Ne=-6176,$i=6176,fn=34,Ce=[124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Vi=[248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Yi=[120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),un=/^([-+])?(\d+)?$/,pn=31,Wi=16383,dn=30,gn=31;function Xi(e){return!isNaN(parseInt(e,10))}function _n(e){var t=w.fromNumber(1e9),i=w.fromNumber(0);if(!e.parts[0]&&!e.parts[1]&&!e.parts[2]&&!e.parts[3])return{quotient:e,rem:i};for(var r=0;r<=3;r++)i=i.shiftLeft(32),i=i.add(new w(e.parts[r],0)),e.parts[r]=i.div(t).low,i=i.modulo(t);return{quotient:e,rem:i}}function yn(e,t){if(!e&&!t)return{high:w.fromNumber(0),low:w.fromNumber(0)};var i=e.shiftRightUnsigned(32),r=new w(e.getLowBits(),0),s=t.shiftRightUnsigned(32),h=new w(t.getLowBits(),0),c=i.multiply(s),u=i.multiply(h),d=r.multiply(s),m=r.multiply(h);return c=c.add(u.shiftRightUnsigned(32)),u=new w(u.getLowBits(),0).add(d).add(m.shiftRightUnsigned(32)),c=c.add(u.shiftRightUnsigned(32)),m=u.shiftLeft(32).add(new w(m.getLowBits(),0)),{high:c,low:m}}function mn(e,t){var i=e.high>>>0,r=t.high>>>0;if(i<r)return!0;if(i===r){var s=e.low>>>0,h=t.low>>>0;if(s<h)return!0}return!1}function Ot(e,t){throw new P('"'.concat(e,'" is not a valid Decimal128 string - ').concat(t))}var Re=(function(){function e(t){if(!(this instanceof e))return new e(t);if(typeof t=="string")this.bytes=e.fromString(t).bytes;else if(Ie(t)){if(t.byteLength!==16)throw new P("Decimal128 must take a Buffer of 16 bytes");this.bytes=t}else throw new P("Decimal128 must take a Buffer or string")}return e.fromString=function(t){var i=!1,r=!1,s=!1,h=0,c=0,u=0,d=0,m=0,y=[0],_=0,v=0,S=0,O=0,A=0,k=0,M=new w(0,0),L=new w(0,0),$=0,b=0;if(t.length>=7e3)throw new P(""+t+" not a valid Decimal128 string");var X=t.match(cn),Q=t.match(ln),st=t.match(hn);if(!X&&!Q&&!st||t.length===0)throw new P(""+t+" not a valid Decimal128 string");if(X){var _e=X[2],Dt=X[4],ye=X[5],$t=X[6];Dt&&$t===void 0&&Ot(t,"missing exponent power"),Dt&&_e===void 0&&Ot(t,"missing exponent base"),Dt===void 0&&(ye||$t)&&Ot(t,"missing e before exponent")}if((t[b]==="+"||t[b]==="-")&&(i=t[b++]==="-"),!Xi(t[b])&&t[b]!=="."){if(t[b]==="i"||t[b]==="I")return new e(D.from(i?Vi:Yi));if(t[b]==="N")return new e(D.from(Ce))}for(;Xi(t[b])||t[b]===".";){if(t[b]==="."){r&&Ot(t,"contains multiple periods"),r=!0,b=b+1;continue}_<34&&(t[b]!=="0"||s)&&(s||(m=c),s=!0,y[v++]=parseInt(t[b],10),_=_+1),s&&(u=u+1),r&&(d=d+1),c=c+1,b=b+1}if(r&&!c)throw new P(""+t+" not a valid Decimal128 string");if(t[b]==="e"||t[b]==="E"){var yt=t.substr(++b).match(un);if(!yt||!yt[2])return new e(D.from(Ce));A=parseInt(yt[0],10),b=b+yt[0].length}if(t[b])return new e(D.from(Ce));if(S=0,!_)S=0,O=0,y[0]=0,u=1,_=1,h=0;else if(O=_-1,h=u,h!==1)for(;y[m+h-1]===0;)h=h-1;for(A<=d&&d-A>16384?A=Ne:A=A-d;A>Tt;){if(O=O+1,O-S>fn){var mt=y.join("");if(mt.match(/^0+$/)){A=Tt;break}Ot(t,"overflow")}A=A-1}for(;A<Ne||_<u;){if(O===0&&h<_){A=Ne,h=0;break}if(_<u?u=u-1:O=O-1,A<Tt)A=A+1;else{var mt=y.join("");if(mt.match(/^0+$/)){A=Tt;break}Ot(t,"overflow")}}if(O-S+1<h){var at=c;r&&(m=m+1,at=at+1),i&&(m=m+1,at=at+1);var Vt=parseInt(t[m+O+1],10),vt=0;if(Vt>=5&&(vt=1,Vt===5)){for(vt=y[O]%2===1?1:0,k=m+O+2;k<at;k++)if(parseInt(t[k],10)){vt=1;break}}if(vt){for(var R=O;R>=0;R--)if(++y[R]>9&&(y[R]=0,R===0))if(A<Tt)A=A+1,y[R]=1;else return new e(D.from(i?Vi:Yi))}}if(M=w.fromNumber(0),L=w.fromNumber(0),h===0)M=w.fromNumber(0),L=w.fromNumber(0);else if(O-S<17){var R=S;for(L=w.fromNumber(y[R++]),M=new w(0,0);R<=O;R++)L=L.multiply(w.fromNumber(10)),L=L.add(w.fromNumber(y[R]))}else{var R=S;for(M=w.fromNumber(y[R++]);R<=O-17;R++)M=M.multiply(w.fromNumber(10)),M=M.add(w.fromNumber(y[R]));for(L=w.fromNumber(y[R++]);R<=O;R++)L=L.multiply(w.fromNumber(10)),L=L.add(w.fromNumber(y[R]))}var K=yn(M,w.fromString("100000000000000000"));K.low=K.low.add(L),mn(K.low,L)&&(K.high=K.high.add(w.fromNumber(1))),$=A+$i;var B={low:w.fromNumber(0),high:w.fromNumber(0)};K.high.shiftRightUnsigned(49).and(w.fromNumber(1)).equals(w.fromNumber(1))?(B.high=B.high.or(w.fromNumber(3).shiftLeft(61)),B.high=B.high.or(w.fromNumber($).and(w.fromNumber(16383).shiftLeft(47))),B.high=B.high.or(K.high.and(w.fromNumber(0x7fffffffffff)))):(B.high=B.high.or(w.fromNumber($&16383).shiftLeft(49)),B.high=B.high.or(K.high.and(w.fromNumber(562949953421311)))),B.low=K.low,i&&(B.high=B.high.or(w.fromString("9223372036854775808")));var N=D.alloc(16);return b=0,N[b++]=B.low.low&255,N[b++]=B.low.low>>8&255,N[b++]=B.low.low>>16&255,N[b++]=B.low.low>>24&255,N[b++]=B.low.high&255,N[b++]=B.low.high>>8&255,N[b++]=B.low.high>>16&255,N[b++]=B.low.high>>24&255,N[b++]=B.high.low&255,N[b++]=B.high.low>>8&255,N[b++]=B.high.low>>16&255,N[b++]=B.high.low>>24&255,N[b++]=B.high.high&255,N[b++]=B.high.high>>8&255,N[b++]=B.high.high>>16&255,N[b++]=B.high.high>>24&255,new e(N)},e.prototype.toString=function(){for(var t,i=0,r=new Array(36),s=0;s<r.length;s++)r[s]=0;var h=0,c=!1,u,d={parts:[0,0,0,0]},m,y,_=[];h=0;var v=this.bytes,S=v[h++]|v[h++]<<8|v[h++]<<16|v[h++]<<24,O=v[h++]|v[h++]<<8|v[h++]<<16|v[h++]<<24,A=v[h++]|v[h++]<<8|v[h++]<<16|v[h++]<<24,k=v[h++]|v[h++]<<8|v[h++]<<16|v[h++]<<24;h=0;var M={low:new w(S,O),high:new w(A,k)};M.high.lessThan(w.ZERO)&&_.push("-");var L=k>>26&pn;if(L>>3===3){if(L===dn)return _.join("")+"Infinity";if(L===gn)return"NaN";t=k>>15&Wi,u=8+(k>>14&1)}else u=k>>14&7,t=k>>17&Wi;var $=t-$i;if(d.parts[0]=(k&16383)+((u&15)<<14),d.parts[1]=A,d.parts[2]=O,d.parts[3]=S,d.parts[0]===0&&d.parts[1]===0&&d.parts[2]===0&&d.parts[3]===0)c=!0;else for(y=3;y>=0;y--){var b=0,X=_n(d);if(d=X.quotient,b=X.rem.low,!!b)for(m=8;m>=0;m--)r[y*9+m]=b%10,b=Math.floor(b/10)}if(c)i=1,r[h]=0;else for(i=36;!r[h];)i=i-1,h=h+1;var Q=i-1+$;if(Q>=34||Q<=-7||$>0){if(i>34)return _.push("".concat(0)),$>0?_.push("E+".concat($)):$<0&&_.push("E".concat($)),_.join("");_.push("".concat(r[h++])),i=i-1,i&&_.push(".");for(var s=0;s<i;s++)_.push("".concat(r[h++]));_.push("E"),Q>0?_.push("+".concat(Q)):_.push("".concat(Q))}else if($>=0)for(var s=0;s<i;s++)_.push("".concat(r[h++]));else{var st=i+$;if(st>0)for(var s=0;s<st;s++)_.push("".concat(r[h++]));else _.push("0");for(_.push(".");st++<0;)_.push("0");for(var s=0;s<i-Math.max(st-1,0);s++)_.push("".concat(r[h++]))}return _.join("")},e.prototype.toJSON=function(){return{$numberDecimal:this.toString()}},e.prototype.toExtendedJSON=function(){return{$numberDecimal:this.toString()}},e.fromExtendedJSON=function(t){return e.fromString(t.$numberDecimal)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new Decimal128("'.concat(this.toString(),'")')},e})();Object.defineProperty(Re.prototype,"_bsontype",{value:"Decimal128"});var ce=(function(){function e(t){if(!(this instanceof e))return new e(t);t instanceof Number&&(t=t.valueOf()),this.value=+t}return e.prototype.valueOf=function(){return this.value},e.prototype.toJSON=function(){return this.value},e.prototype.toString=function(t){return this.value.toString(t)},e.prototype.toExtendedJSON=function(t){return t&&(t.legacy||t.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()}},e.fromExtendedJSON=function(t,i){var r=parseFloat(t.$numberDouble);return i&&i.relaxed?r:new e(r)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var t=this.toExtendedJSON();return"new Double(".concat(t.$numberDouble,")")},e})();Object.defineProperty(ce.prototype,"_bsontype",{value:"Double"});var le=(function(){function e(t){if(!(this instanceof e))return new e(t);t instanceof Number&&(t=t.valueOf()),this.value=+t|0}return e.prototype.valueOf=function(){return this.value},e.prototype.toString=function(t){return this.value.toString(t)},e.prototype.toJSON=function(){return this.value},e.prototype.toExtendedJSON=function(t){return t&&(t.relaxed||t.legacy)?this.value:{$numberInt:this.value.toString()}},e.fromExtendedJSON=function(t,i){return i&&i.relaxed?parseInt(t.$numberInt,10):new e(t.$numberInt)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return"new Int32(".concat(this.valueOf(),")")},e})();Object.defineProperty(le.prototype,"_bsontype",{value:"Int32"});var Te=(function(){function e(){if(!(this instanceof e))return new e}return e.prototype.toExtendedJSON=function(){return{$maxKey:1}},e.fromExtendedJSON=function(){return new e},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return"new MaxKey()"},e})();Object.defineProperty(Te.prototype,"_bsontype",{value:"MaxKey"});var Pe=(function(){function e(){if(!(this instanceof e))return new e}return e.prototype.toExtendedJSON=function(){return{$minKey:1}},e.fromExtendedJSON=function(){return new e},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return"new MinKey()"},e})();Object.defineProperty(Pe.prototype,"_bsontype",{value:"MinKey"});var vn=new RegExp("^[0-9a-fA-F]{24}$"),pt=null,it=Symbol("id"),H=(function(){function e(t){if(!(this instanceof e))return new e(t);var i;if(typeof t=="object"&&t&&"id"in t){if(typeof t.id!="string"&&!ArrayBuffer.isView(t.id))throw new P("Argument passed in must have an id that is of type string or Buffer");"toHexString"in t&&typeof t.toHexString=="function"?i=D.from(t.toHexString(),"hex"):i=t.id}else i=t;if(i==null||typeof i=="number")this[it]=e.generate(typeof i=="number"?i:void 0);else if(ArrayBuffer.isView(i)&&i.byteLength===12)this[it]=i instanceof D?i:re(i);else if(typeof i=="string")if(i.length===12){var r=D.from(i);if(r.byteLength===12)this[it]=r;else throw new P("Argument passed in must be a string of 12 bytes")}else if(i.length===24&&vn.test(i))this[it]=D.from(i,"hex");else throw new P("Argument passed in must be a string of 12 bytes or a string of 24 hex characters or an integer");else throw new P("Argument passed in does not match the accepted types");e.cacheHexString&&(this.__id=this.id.toString("hex"))}return Object.defineProperty(e.prototype,"id",{get:function(){return this[it]},set:function(t){this[it]=t,e.cacheHexString&&(this.__id=t.toString("hex"))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"generationTime",{get:function(){return this.id.readInt32BE(0)},set:function(t){this.id.writeUInt32BE(t,0)},enumerable:!1,configurable:!0}),e.prototype.toHexString=function(){if(e.cacheHexString&&this.__id)return this.__id;var t=this.id.toString("hex");return e.cacheHexString&&!this.__id&&(this.__id=t),t},e.getInc=function(){return e.index=(e.index+1)%16777215},e.generate=function(t){typeof t!="number"&&(t=Math.floor(Date.now()/1e3));var i=e.getInc(),r=D.alloc(12);return r.writeUInt32BE(t,0),pt===null&&(pt=Qi(5)),r[4]=pt[0],r[5]=pt[1],r[6]=pt[2],r[7]=pt[3],r[8]=pt[4],r[11]=i&255,r[10]=i>>8&255,r[9]=i>>16&255,r},e.prototype.toString=function(t){return t?this.id.toString(t):this.toHexString()},e.prototype.toJSON=function(){return this.toHexString()},e.prototype.equals=function(t){if(t==null)return!1;if(t instanceof e)return this[it][11]===t[it][11]&&this[it].equals(t[it]);if(typeof t=="string"&&e.isValid(t)&&t.length===12&&Ie(this.id))return t===D.prototype.toString.call(this.id,"latin1");if(typeof t=="string"&&e.isValid(t)&&t.length===24)return t.toLowerCase()===this.toHexString();if(typeof t=="string"&&e.isValid(t)&&t.length===12)return D.from(t).equals(this.id);if(typeof t=="object"&&"toHexString"in t&&typeof t.toHexString=="function"){var i=t.toHexString(),r=this.toHexString().toLowerCase();return typeof i=="string"&&i.toLowerCase()===r}return!1},e.prototype.getTimestamp=function(){var t=new Date,i=this.id.readUInt32BE(0);return t.setTime(Math.floor(i)*1e3),t},e.createPk=function(){return new e},e.createFromTime=function(t){var i=D.from([0,0,0,0,0,0,0,0,0,0,0,0]);return i.writeUInt32BE(t,0),new e(i)},e.createFromHexString=function(t){if(typeof t>"u"||t!=null&&t.length!==24)throw new P("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");return new e(D.from(t,"hex"))},e.isValid=function(t){if(t==null)return!1;try{return new e(t),!0}catch{return!1}},e.prototype.toExtendedJSON=function(){return this.toHexString?{$oid:this.toHexString()}:{$oid:this.toString("hex")}},e.fromExtendedJSON=function(t){return new e(t.$oid)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new ObjectId("'.concat(this.toHexString(),'")')},e.index=Math.floor(Math.random()*16777215),e})();Object.defineProperty(H.prototype,"generate",{value:se(function(e){return H.generate(e)},"Please use the static `ObjectId.generate(time)` instead")});Object.defineProperty(H.prototype,"getInc",{value:se(function(){return H.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(H.prototype,"get_inc",{value:se(function(){return H.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(H,"get_inc",{value:se(function(){return H.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(H.prototype,"_bsontype",{value:"ObjectID"});function wn(e){return e.split("").sort().join("")}var Mt=(function(){function e(t,i){if(!(this instanceof e))return new e(t,i);if(this.pattern=t,this.options=wn(i??""),this.pattern.indexOf("\0")!==-1)throw new dt("BSON Regex patterns cannot contain null bytes, found: ".concat(JSON.stringify(this.pattern)));if(this.options.indexOf("\0")!==-1)throw new dt("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 dt("The regular expression option [".concat(this.options[r],"] is not supported"))}return e.parseOptions=function(t){return t?t.split("").sort().join(""):""},e.prototype.toExtendedJSON=function(t){return t=t||{},t.legacy?{$regex:this.pattern,$options:this.options}:{$regularExpression:{pattern:this.pattern,options:this.options}}},e.fromExtendedJSON=function(t){if("$regex"in t)if(typeof t.$regex!="string"){if(t.$regex._bsontype==="BSONRegExp")return t}else return new e(t.$regex,e.parseOptions(t.$options));if("$regularExpression"in t)return new e(t.$regularExpression.pattern,e.parseOptions(t.$regularExpression.options));throw new P("Unexpected BSONRegExp EJSON object form: ".concat(JSON.stringify(t)))},e})();Object.defineProperty(Mt.prototype,"_bsontype",{value:"BSONRegExp"});var Me=(function(){function e(t){if(!(this instanceof e))return new e(t);this.value=t}return e.prototype.valueOf=function(){return this.value},e.prototype.toString=function(){return this.value},e.prototype.inspect=function(){return'new BSONSymbol("'.concat(this.value,'")')},e.prototype.toJSON=function(){return this.value},e.prototype.toExtendedJSON=function(){return{$symbol:this.value}},e.fromExtendedJSON=function(t){return new e(t.$symbol)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e})();Object.defineProperty(Me.prototype,"_bsontype",{value:"Symbol"});var bn=w,rr=(function(e){oe(t,e);function t(i,r){var s=this;return s instanceof t?(w.isLong(i)?s=e.call(this,i.low,i.high,!0)||this:Lt(i)&&typeof i.t<"u"&&typeof i.i<"u"?s=e.call(this,i.i,i.t,!0)||this:s=e.call(this,i,r,!0)||this,Object.defineProperty(s,"_bsontype",{value:"Timestamp",writable:!1,configurable:!1,enumerable:!1}),s):new t(i,r)}return t.prototype.toJSON=function(){return{$timestamp:this.toString()}},t.fromInt=function(i){return new t(w.fromInt(i,!0))},t.fromNumber=function(i){return new t(w.fromNumber(i,!0))},t.fromBits=function(i,r){return new t(i,r)},t.fromString=function(i,r){return new t(w.fromString(i,!0,r))},t.prototype.toExtendedJSON=function(){return{$timestamp:{t:this.high>>>0,i:this.low>>>0}}},t.fromExtendedJSON=function(i){return new t(i.$timestamp)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return"new Timestamp({ t: ".concat(this.getHighBits(),", i: ").concat(this.getLowBits()," })")},t.MAX_VALUE=w.MAX_UNSIGNED_VALUE,t})(bn);function En(e){return Lt(e)&&Reflect.has(e,"_bsontype")&&typeof e._bsontype=="string"}var nr=2147483647,or=-2147483648,sr=9223372036854776e3,ar=-9223372036854776e3,On={$oid:H,$binary:gt,$uuid:gt,$symbol:Me,$numberInt:le,$numberDecimal:Re,$numberDouble:ce,$numberLong:w,$minKey:Pe,$maxKey:Te,$regex:Mt,$regularExpression:Mt,$timestamp:rr};function cr(e,t){if(t===void 0&&(t={}),typeof e=="number"){if(t.relaxed||t.legacy)return e;if(Math.floor(e)===e){if(e>=or&&e<=nr)return new le(e);if(e>=ar&&e<=sr)return w.fromNumber(e)}return new ce(e)}if(e==null||typeof e!="object")return e;if(e.$undefined)return null;for(var i=Object.keys(e).filter(function(_){return _.startsWith("$")&&e[_]!=null}),r=0;r<i.length;r++){var s=On[i[r]];if(s)return s.fromExtendedJSON(e,t)}if(e.$date!=null){var h=e.$date,c=new Date;return t.legacy?typeof h=="number"?c.setTime(h):typeof h=="string"&&c.setTime(Date.parse(h)):typeof h=="string"?c.setTime(Date.parse(h)):w.isLong(h)?c.setTime(h.toNumber()):typeof h=="number"&&t.relaxed&&c.setTime(h),c}if(e.$code!=null){var u=Object.assign({},e);return e.$scope&&(u.$scope=cr(e.$scope)),ae.fromExtendedJSON(e)}if(sn(e)||e.$dbPointer){var d=e.$ref?e:e.$dbPointer;if(d instanceof Pt)return d;var m=Object.keys(d).filter(function(_){return _.startsWith("$")}),y=!0;if(m.forEach(function(_){["$ref","$id","$db"].indexOf(_)===-1&&(y=!1)}),y)return Pt.fromExtendedJSON(d)}return e}function Sn(e,t){return e.map(function(i,r){t.seenObjects.push({propertyName:"index ".concat(r),obj:null});try{return lt(i,t)}finally{t.seenObjects.pop()}})}function zi(e){var t=e.toISOString();return e.getUTCMilliseconds()!==0?t:t.slice(0,-5)+"Z"}function lt(e,t){if((typeof e=="object"||typeof e=="function")&&e!==null){var i=t.seenObjects.findIndex(function(M){return M.obj===e});if(i!==-1){var r=t.seenObjects.map(function(M){return M.propertyName}),s=r.slice(0,i).map(function(M){return"".concat(M," -> ")}).join(""),h=r[i],c=" -> "+r.slice(i+1,r.length-1).map(function(M){return"".concat(M," -> ")}).join(""),u=r[r.length-1],d=" ".repeat(s.length+h.length/2),m="-".repeat(c.length+(h.length+u.length)/2-1);throw new P(`Converting circular structure to EJSON:
2
- `+" ".concat(s).concat(h).concat(c).concat(u,`
3
- `)+" ".concat(d,"\\").concat(m,"/"))}t.seenObjects[t.seenObjects.length-1].obj=e}if(Array.isArray(e))return Sn(e,t);if(e===void 0)return null;if(e instanceof Date||en(e)){var y=e.getTime(),_=y>-1&&y<2534023188e5;return t.legacy?t.relaxed&&_?{$date:e.getTime()}:{$date:zi(e)}:t.relaxed&&_?{$date:zi(e)}:{$date:{$numberLong:e.getTime().toString()}}}if(typeof e=="number"&&(!t.relaxed||!isFinite(e))){if(Math.floor(e)===e){var v=e>=or&&e<=nr,S=e>=ar&&e<=sr;if(v)return{$numberInt:e.toString()};if(S)return{$numberLong:e.toString()}}return{$numberDouble:e.toString()}}if(e instanceof RegExp||tn(e)){var O=e.flags;if(O===void 0){var A=e.toString().match(/[gimuy]*$/);A&&(O=A[0])}var k=new Mt(e.source,O);return k.toExtendedJSON(t)}return e!=null&&typeof e=="object"?Nn(e,t):e}var An={Binary:function(e){return new gt(e.value(),e.sub_type)},Code:function(e){return new ae(e.code,e.scope)},DBRef:function(e){return new Pt(e.collection||e.namespace,e.oid,e.db,e.fields)},Decimal128:function(e){return new Re(e.bytes)},Double:function(e){return new ce(e.value)},Int32:function(e){return new le(e.value)},Long:function(e){return w.fromBits(e.low!=null?e.low:e.low_,e.low!=null?e.high:e.high_,e.low!=null?e.unsigned:e.unsigned_)},MaxKey:function(){return new Te},MinKey:function(){return new Pe},ObjectID:function(e){return new H(e)},ObjectId:function(e){return new H(e)},BSONRegExp:function(e){return new Mt(e.pattern,e.options)},Symbol:function(e){return new Me(e.value)},Timestamp:function(e){return rr.fromBits(e.low,e.high)}};function Nn(e,t){if(e==null||typeof e!="object")throw new dt("not an object instance");var i=e._bsontype;if(typeof i>"u"){var r={};for(var s in e){t.seenObjects.push({propertyName:s,obj:null});try{var h=lt(e[s],t);s==="__proto__"?Object.defineProperty(r,s,{value:h,writable:!0,enumerable:!0,configurable:!0}):r[s]=h}finally{t.seenObjects.pop()}}return r}else if(En(e)){var c=e;if(typeof c.toExtendedJSON!="function"){var u=An[e._bsontype];if(!u)throw new P("Unrecognized or invalid _bsontype: "+e._bsontype);c=u(c)}return i==="Code"&&c.scope?c=new ae(c.code,lt(c.scope,t)):i==="DBRef"&&c.oid&&(c=new Pt(lt(c.collection,t),lt(c.oid,t),lt(c.db,t),lt(c.fields,t))),c.toExtendedJSON(t)}else throw new dt("_bsontype must be a string, but was: "+typeof i)}var Zi;(function(e){function t(h,c){var u=Object.assign({},{relaxed:!0,legacy:!1},c);return typeof u.relaxed=="boolean"&&(u.strict=!u.relaxed),typeof u.strict=="boolean"&&(u.relaxed=!u.strict),JSON.parse(h,function(d,m){if(d.indexOf("\0")!==-1)throw new dt("BSON Document field names cannot contain null bytes, found: ".concat(JSON.stringify(d)));return cr(m,u)})}e.parse=t;function i(h,c,u,d){u!=null&&typeof u=="object"&&(d=u,u=0),c!=null&&typeof c=="object"&&!Array.isArray(c)&&(d=c,c=void 0,u=0);var m=Object.assign({relaxed:!0,legacy:!1},d,{seenObjects:[{propertyName:"(root)",obj:null}]}),y=lt(h,m);return JSON.stringify(y,c,u)}e.stringify=i;function r(h,c){return c=c||{},JSON.parse(i(h,c))}e.serialize=r;function s(h,c){return c=c||{},t(JSON.stringify(h),c)}e.deserialize=s})(Zi||(Zi={}));var Ji,Ki=qi();Ki.Map?Ji=Ki.Map:Ji=(function(){function e(t){t===void 0&&(t=[]),this._keys=[],this._values={};for(var i=0;i<t.length;i++)if(t[i]!=null){var r=t[i],s=r[0],h=r[1];this._keys.push(s),this._values[s]={v:h,i:this._keys.length-1}}}return e.prototype.clear=function(){this._keys=[],this._values={}},e.prototype.delete=function(t){var i=this._values[t];return i==null?!1:(delete this._values[t],this._keys.splice(i.i,1),!0)},e.prototype.entries=function(){var t=this,i=0;return{next:function(){var r=t._keys[i++];return{value:r!==void 0?[r,t._values[r].v]:void 0,done:r===void 0}}}},e.prototype.forEach=function(t,i){i=i||this;for(var r=0;r<this._keys.length;r++){var s=this._keys[r];t.call(i,this._values[s].v,s,i)}},e.prototype.get=function(t){return this._values[t]?this._values[t].v:void 0},e.prototype.has=function(t){return this._values[t]!=null},e.prototype.keys=function(){var t=this,i=0;return{next:function(){var r=t._keys[i++];return{value:r!==void 0?r:void 0,done:r===void 0}}}},e.prototype.set=function(t,i){return this._values[t]?(this._values[t].v=i,this):(this._keys.push(t),this._values[t]={v:i,i:this._keys.length-1},this)},e.prototype.values=function(){var t=this,i=0;return{next:function(){var r=t._keys[i++];return{value:r!==void 0?t._values[r].v:void 0,done:r===void 0}}}},Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!1,configurable:!0}),e})();var ho=w.fromNumber(nn),fo=w.fromNumber(on);var Be=new Uint8Array(8),uo=new DataView(Be.buffer,Be.byteOffset,Be.byteLength);var Cn=1024*1024*17,po=D.alloc(Cn);var he=class{triggerID;nudgeID;engagementID;contentID;shortID;contentType;variation;props;objective;onsiteDeliveryType;holdout;constructor(t){t=t||{},this.triggerID=t.id||t.triggerID,this.nudgeID=t.nudgeID,this.shortID=t.shortID,this.contentType=t.contentType,this.engagementID=t.engagementID,this.contentID=t.contentID,this.variation=t.variation,this.props=t.props,this.objective=t.objective,this.onsiteDeliveryType=t.onsiteDeliveryType,this.holdout=t.holdout}};var lr=class{constructor(t,i={},r,s){this.name=t;this.properties=i;this.id=s?new H(s):new H,this.occurred=new Date,r&&(this.trigger=new he(r)),this.newEvent=!s}trigger;items;videos;id;newEvent;cart;currentItem;deviceProps;landingPage;occurred;page;sessionID;sessionNumber;locale;setVideos(t){t&&(this.videos=[t.id],this.properties.current??={videoID:t.id})}};var kt=class{_attachedHost;attach(t){return this._attachedHost=t,t.attach(this)}detach(){let t=this._attachedHost;t!=null&&(this._attachedHost=null,t.detach())}get isAttached(){return this._attachedHost!=null}setAttachedHost(t){this._attachedHost=t}},At=class extends kt{component;viewContainerRef;injector;projectableNodes;constructor(t,i,r,s){super(),this.component=t,this.viewContainerRef=i,this.injector=r,this.projectableNodes=s}},Nt=class extends kt{templateRef;viewContainerRef;context;injector;constructor(t,i,r,s){super(),this.templateRef=t,this.viewContainerRef=i,this.context=r,this.injector=s}get origin(){return this.templateRef.elementRef}attach(t,i=this.context){return this.context=i,super.attach(t)}detach(){return this.context=void 0,super.detach()}},Le=class extends kt{element;constructor(t){super(),this.element=t instanceof ht?t.nativeElement:t}},Ct=class{_attachedPortal;_disposeFn;_isDisposed=!1;hasAttached(){return!!this._attachedPortal}attach(t){if(t instanceof At)return this._attachedPortal=t,this.attachComponentPortal(t);if(t instanceof Nt)return this._attachedPortal=t,this.attachTemplatePortal(t);if(this.attachDomPortal&&t instanceof Le)return this._attachedPortal=t,this.attachDomPortal(t)}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(t){this._disposeFn=t}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}},fe=class extends Ct{outletElement;_appRef;_defaultInjector;constructor(t,i,r){super(),this.outletElement=t,this._appRef=i,this._defaultInjector=r}attachComponentPortal(t){let i;if(t.viewContainerRef){let r=t.injector||t.viewContainerRef.injector,s=r.get(be,null,{optional:!0})||void 0;i=t.viewContainerRef.createComponent(t.component,{index:t.viewContainerRef.length,injector:r,ngModuleRef:s,projectableNodes:t.projectableNodes||void 0}),this.setDisposeFn(()=>i.destroy())}else{let r=this._appRef,s=t.injector||this._defaultInjector||G.NULL,h=s.get(Xt,r.injector);i=Si(t.component,{elementInjector:s,environmentInjector:h,projectableNodes:t.projectableNodes||void 0}),r.attachView(i.hostView),this.setDisposeFn(()=>{r.viewCount>0&&r.detachView(i.hostView),i.destroy()})}return this.outletElement.appendChild(this._getComponentRootNode(i)),this._attachedPortal=t,i}attachTemplatePortal(t){let i=t.viewContainerRef,r=i.createEmbeddedView(t.templateRef,t.context,{injector:t.injector});return r.rootNodes.forEach(s=>this.outletElement.appendChild(s)),r.detectChanges(),this.setDisposeFn(()=>{let s=i.indexOf(r);s!==-1&&i.remove(s)}),this._attachedPortal=t,r}attachDomPortal=t=>{let i=t.element;i.parentNode;let r=this.outletElement.ownerDocument.createComment("dom-portal");i.parentNode.insertBefore(r,i),this.outletElement.appendChild(i),this._attachedPortal=t,super.setDisposeFn(()=>{r.parentNode&&r.parentNode.replaceChild(i,r)})};dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(t){return t.hostView.rootNodes[0]}};var Ue=(()=>{class e extends Ct{_moduleRef=E(be,{optional:!0});_document=E(W);_viewContainerRef=E(we);_isInitialized=!1;_attachedRef;constructor(){super()}get portal(){return this._attachedPortal}set portal(i){this.hasAttached()&&!i&&!this._isInitialized||(this.hasAttached()&&super.detach(),i&&super.attach(i),this._attachedPortal=i||null)}attached=new bt;get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedRef=this._attachedPortal=null}attachComponentPortal(i){i.setAttachedHost(this);let r=i.viewContainerRef!=null?i.viewContainerRef:this._viewContainerRef,s=r.createComponent(i.component,{index:r.length,injector:i.injector||r.injector,projectableNodes:i.projectableNodes||void 0,ngModuleRef:this._moduleRef||void 0});return r!==this._viewContainerRef&&this._getRootNode().appendChild(s.hostView.rootNodes[0]),super.setDisposeFn(()=>s.destroy()),this._attachedPortal=i,this._attachedRef=s,this.attached.emit(s),s}attachTemplatePortal(i){i.setAttachedHost(this);let r=this._viewContainerRef.createEmbeddedView(i.templateRef,i.context,{injector:i.injector});return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=i,this._attachedRef=r,this.attached.emit(r),r}attachDomPortal=i=>{let r=i.element;r.parentNode;let s=this._document.createComment("dom-portal");i.setAttachedHost(this),r.parentNode.insertBefore(s,r),this._getRootNode().appendChild(r),this._attachedPortal=i,super.setDisposeFn(()=>{s.parentNode&&s.parentNode.replaceChild(r,s)})};_getRootNode(){let i=this._viewContainerRef.element.nativeElement;return i.nodeType===i.ELEMENT_NODE?i:i.parentNode}static \u0275fac=function(r){return new(r||e)};static \u0275dir=xt({type:e,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:[0,"cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[Gt]})}return e})();var Ft;function Bn(){if(Ft==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>Ft=!0}))}finally{Ft=Ft||!1}return Ft}function hr(e){return Bn()?e:!!e.capture}var Dn=new z("cdk-input-modality-detector-options"),xn={ignoreKeys:[18,17,224,91,16]},fr=650,je={passive:!0,capture:!0},In=(()=>{class e{_platform=E(et);_listenerCleanups;modalityDetected;modalityChanged;get mostRecentModality(){return this._modality.value}_mostRecentTarget=null;_modality=new ni(null);_options;_lastTouchMs=0;_onKeydown=i=>{this._options?.ignoreKeys?.some(r=>r===i.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=nt(i))};_onMousedown=i=>{Date.now()-this._lastTouchMs<fr||(this._modality.next(Di(i)?"keyboard":"mouse"),this._mostRecentTarget=nt(i))};_onTouchstart=i=>{if(xi(i)){this._modality.next("keyboard");return}this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=nt(i)};constructor(){let i=E(q),r=E(W),s=E(Dn,{optional:!0});if(this._options=U(U({},xn),s),this.modalityDetected=this._modality.pipe(li(1)),this.modalityChanged=this.modalityDetected.pipe(ci()),this._platform.isBrowser){let h=E(wt).createRenderer(null,null);this._listenerCleanups=i.runOutsideAngular(()=>[h.listen(r,"keydown",this._onKeydown,je),h.listen(r,"mousedown",this._onMousedown,je),h.listen(r,"touchstart",this._onTouchstart,je)])}}ngOnDestroy(){this._modality.complete(),this._listenerCleanups?.forEach(i=>i())}static \u0275fac=function(r){return new(r||e)};static \u0275prov=j({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),pe=(function(e){return e[e.IMMEDIATE=0]="IMMEDIATE",e[e.EVENTUAL=1]="EVENTUAL",e})(pe||{}),Rn=new z("cdk-focus-monitor-default-options"),ue=hr({passive:!0,capture:!0}),ur=(()=>{class e{_ngZone=E(q);_platform=E(et);_inputModalityDetector=E(In);_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=E(W);_stopInputModalityDetector=new Y;constructor(){let i=E(Rn,{optional:!0});this._detectionMode=i?.detectionMode||pe.IMMEDIATE}_rootNodeFocusAndBlurListener=i=>{let r=nt(i);for(let s=r;s;s=s.parentElement)i.type==="focus"?this._onFocus(i,s):this._onBlur(i,s)};monitor(i,r=!1){let s=te(i);if(!this._platform.isBrowser||s.nodeType!==1)return oi();let h=Ii(s)||this._document,c=this._elementInfo.get(s);if(c)return r&&(c.checkChildren=!0),c.subject;let u={checkChildren:r,subject:new Y,rootNode:h};return this._elementInfo.set(s,u),this._registerGlobalListeners(u),u.subject}stopMonitoring(i){let r=te(i),s=this._elementInfo.get(r);s&&(s.subject.complete(),this._setClasses(r),this._elementInfo.delete(r),this._removeGlobalListeners(s))}focusVia(i,r,s){let h=te(i),c=this._document.activeElement;h===c?this._getClosestElementsInfo(h).forEach(([u,d])=>this._originChanged(u,r,d)):(this._setOrigin(r),typeof h.focus=="function"&&h.focus(s))}ngOnDestroy(){this._elementInfo.forEach((i,r)=>this.stopMonitoring(r))}_getWindow(){return this._document.defaultView||window}_getFocusOrigin(i){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(i)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:i&&this._isLastInteractionFromInputLabel(i)?"mouse":"program"}_shouldBeAttributedToTouch(i){return this._detectionMode===pe.EVENTUAL||!!i?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(i,r){i.classList.toggle("cdk-focused",!!r),i.classList.toggle("cdk-touch-focused",r==="touch"),i.classList.toggle("cdk-keyboard-focused",r==="keyboard"),i.classList.toggle("cdk-mouse-focused",r==="mouse"),i.classList.toggle("cdk-program-focused",r==="program")}_setOrigin(i,r=!1){this._ngZone.runOutsideAngular(()=>{if(this._origin=i,this._originFromTouchInteraction=i==="touch"&&r,this._detectionMode===pe.IMMEDIATE){clearTimeout(this._originTimeoutId);let s=this._originFromTouchInteraction?fr:1;this._originTimeoutId=setTimeout(()=>this._origin=null,s)}})}_onFocus(i,r){let s=this._elementInfo.get(r),h=nt(i);!s||!s.checkChildren&&r!==h||this._originChanged(r,this._getFocusOrigin(h),s)}_onBlur(i,r){let s=this._elementInfo.get(r);!s||s.checkChildren&&i.relatedTarget instanceof Node&&r.contains(i.relatedTarget)||(this._setClasses(r),this._emitOrigin(s,null))}_emitOrigin(i,r){i.subject.observers.length&&this._ngZone.run(()=>i.subject.next(r))}_registerGlobalListeners(i){if(!this._platform.isBrowser)return;let r=i.rootNode,s=this._rootNodeFocusListenerCount.get(r)||0;s||this._ngZone.runOutsideAngular(()=>{r.addEventListener("focus",this._rootNodeFocusAndBlurListener,ue),r.addEventListener("blur",this._rootNodeFocusAndBlurListener,ue)}),this._rootNodeFocusListenerCount.set(r,s+1),++this._monitoredElementCount===1&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(fi(this._stopInputModalityDetector)).subscribe(h=>{this._setOrigin(h,!0)}))}_removeGlobalListeners(i){let r=i.rootNode;if(this._rootNodeFocusListenerCount.has(r)){let s=this._rootNodeFocusListenerCount.get(r);s>1?this._rootNodeFocusListenerCount.set(r,s-1):(r.removeEventListener("focus",this._rootNodeFocusAndBlurListener,ue),r.removeEventListener("blur",this._rootNodeFocusAndBlurListener,ue),this._rootNodeFocusListenerCount.delete(r))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(i,r,s){this._setClasses(i,r),this._emitOrigin(s,r),this._lastFocusOrigin=r}_getClosestElementsInfo(i){let r=[];return this._elementInfo.forEach((s,h)=>{(h===i||s.checkChildren&&h.contains(i))&&r.push([h,s])}),r}_isLastInteractionFromInputLabel(i){let{_mostRecentTarget:r,mostRecentModality:s}=this._inputModalityDetector;if(s!=="mouse"||!r||r===i||i.nodeName!=="INPUT"&&i.nodeName!=="TEXTAREA"||i.disabled)return!1;let h=i.labels;if(h){for(let c=0;c<h.length;c++)if(h[c].contains(r))return!0}return!1}static \u0275fac=function(r){return new(r||e)};static \u0275prov=j({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var pr=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275cmp=ct({type:e,selectors:[["ng-component"]],exportAs:["cdkVisuallyHidden"],decls:0,vars:0,template:function(r,s){},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}
4
- `],encapsulation:2,changeDetection:0})}return e})();var $e=(()=>{class e{_platform=E(et);constructor(){}isDisabled(i){return i.hasAttribute("disabled")}isVisible(i){return Ln(i)&&getComputedStyle(i).visibility==="visible"}isTabbable(i){if(!this._platform.isBrowser)return!1;let r=Mn(Yn(i));if(r&&(dr(r)===-1||!this.isVisible(r)))return!1;let s=i.nodeName.toLowerCase(),h=dr(i);return i.hasAttribute("contenteditable")?h!==-1:s==="iframe"||s==="object"||this._platform.WEBKIT&&this._platform.IOS&&!$n(i)?!1:s==="audio"?i.hasAttribute("controls")?h!==-1:!1:s==="video"?h===-1?!1:h!==null?!0:this._platform.FIREFOX||i.hasAttribute("controls"):i.tabIndex>=0}isFocusable(i,r){return Vn(i)&&!this.isDisabled(i)&&(r?.ignoreVisibility||this.isVisible(i))}static \u0275fac=function(r){return new(r||e)};static \u0275prov=j({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function Mn(e){try{return e.frameElement}catch{return null}}function Ln(e){return!!(e.offsetWidth||e.offsetHeight||typeof e.getClientRects=="function"&&e.getClientRects().length)}function kn(e){let t=e.nodeName.toLowerCase();return t==="input"||t==="select"||t==="button"||t==="textarea"}function Fn(e){return jn(e)&&e.type=="hidden"}function Un(e){return Hn(e)&&e.hasAttribute("href")}function jn(e){return e.nodeName.toLowerCase()=="input"}function Hn(e){return e.nodeName.toLowerCase()=="a"}function gr(e){if(!e.hasAttribute("tabindex")||e.tabIndex===void 0)return!1;let t=e.getAttribute("tabindex");return!!(t&&!isNaN(parseInt(t,10)))}function dr(e){if(!gr(e))return null;let t=parseInt(e.getAttribute("tabindex")||"",10);return isNaN(t)?-1:t}function $n(e){let t=e.nodeName.toLowerCase(),i=t==="input"&&e.type;return i==="text"||i==="password"||t==="select"||t==="textarea"}function Vn(e){return Fn(e)?!1:kn(e)||Un(e)||e.hasAttribute("contenteditable")||gr(e)}function Yn(e){return e.ownerDocument&&e.ownerDocument.defaultView||window}var He=class{_element;_checker;_ngZone;_document;_injector;_startAnchor;_endAnchor;_hasAttached=!1;startAnchorListener=()=>this.focusLastTabbableElement();endAnchorListener=()=>this.focusFirstTabbableElement();get enabled(){return this._enabled}set enabled(t){this._enabled=t,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(t,this._startAnchor),this._toggleAnchorTabIndex(t,this._endAnchor))}_enabled=!0;constructor(t,i,r,s,h=!1,c){this._element=t,this._checker=i,this._ngZone=r,this._document=s,this._injector=c,h||this.attachAnchors()}destroy(){let t=this._startAnchor,i=this._endAnchor;t&&(t.removeEventListener("focus",this.startAnchorListener),t.remove()),i&&(i.removeEventListener("focus",this.endAnchorListener),i.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(t){return new Promise(i=>{this._executeOnStable(()=>i(this.focusInitialElement(t)))})}focusFirstTabbableElementWhenReady(t){return new Promise(i=>{this._executeOnStable(()=>i(this.focusFirstTabbableElement(t)))})}focusLastTabbableElementWhenReady(t){return new Promise(i=>{this._executeOnStable(()=>i(this.focusLastTabbableElement(t)))})}_getRegionBoundary(t){let i=this._element.querySelectorAll(`[cdk-focus-region-${t}], [cdkFocusRegion${t}], [cdk-focus-${t}]`);return t=="start"?i.length?i[0]:this._getFirstTabbableElement(this._element):i.length?i[i.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(t){let i=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(i){if(!this._checker.isFocusable(i)){let r=this._getFirstTabbableElement(i);return r?.focus(t),!!r}return i.focus(t),!0}return this.focusFirstTabbableElement(t)}focusFirstTabbableElement(t){let i=this._getRegionBoundary("start");return i&&i.focus(t),!!i}focusLastTabbableElement(t){let i=this._getRegionBoundary("end");return i&&i.focus(t),!!i}hasAttached(){return this._hasAttached}_getFirstTabbableElement(t){if(this._checker.isFocusable(t)&&this._checker.isTabbable(t))return t;let i=t.children;for(let r=0;r<i.length;r++){let s=i[r].nodeType===this._document.ELEMENT_NODE?this._getFirstTabbableElement(i[r]):null;if(s)return s}return null}_getLastTabbableElement(t){if(this._checker.isFocusable(t)&&this._checker.isTabbable(t))return t;let i=t.children;for(let r=i.length-1;r>=0;r--){let s=i[r].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(i[r]):null;if(s)return s}return null}_createAnchor(){let t=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,t),t.classList.add("cdk-visually-hidden"),t.classList.add("cdk-focus-trap-anchor"),t.setAttribute("aria-hidden","true"),t}_toggleAnchorTabIndex(t,i){t?i.setAttribute("tabindex","0"):i.removeAttribute("tabindex")}toggleAnchors(t){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(t,this._startAnchor),this._toggleAnchorTabIndex(t,this._endAnchor))}_executeOnStable(t){this._injector?ft(t,{injector:this._injector}):setTimeout(t)}},_r=(()=>{class e{_checker=E($e);_ngZone=E(q);_document=E(W);_injector=E(G);constructor(){E(It).load(pr)}create(i,r=!1){return new He(i,this._checker,this._ngZone,this._document,r,this._injector)}static \u0275fac=function(r){return new(r||e)};static \u0275prov=j({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function yr(e,...t){return t.length?t.some(i=>e[i]):e.altKey||e.shiftKey||e.ctrlKey||e.metaKey}function Ve(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}function ot(e){return e==null?"":typeof e=="string"?e:`${e}px`}var mr=Ti();function br(e){return new Ye(e.get(Pi),e.get(W))}var Ye=class{_viewportRuler;_previousHTMLStyles={top:"",left:""};_previousScrollPosition;_isEnabled=!1;_document;constructor(t,i){this._viewportRuler=t,this._document=i}attach(){}enable(){if(this._canBeEnabled()){let t=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=t.style.left||"",this._previousHTMLStyles.top=t.style.top||"",t.style.left=ot(-this._previousScrollPosition.left),t.style.top=ot(-this._previousScrollPosition.top),t.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){let t=this._document.documentElement,i=this._document.body,r=t.style,s=i.style,h=r.scrollBehavior||"",c=s.scrollBehavior||"";this._isEnabled=!1,r.left=this._previousHTMLStyles.left,r.top=this._previousHTMLStyles.top,t.classList.remove("cdk-global-scrollblock"),mr&&(r.scrollBehavior=s.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),mr&&(r.scrollBehavior=h,s.scrollBehavior=c)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;let i=this._document.documentElement,r=this._viewportRuler.getViewportSize();return i.scrollHeight>r.height||i.scrollWidth>r.width}};var We=class{enable(){}disable(){}attach(){}};var Ut=class{positionStrategy;scrollStrategy=new We;panelClass="";hasBackdrop=!1;backdropClass="cdk-overlay-dark-backdrop";disableAnimations;width;height;minWidth;minHeight;maxWidth;maxHeight;direction;disposeOnNavigation=!1;constructor(t){if(t){let i=Object.keys(t);for(let r of i)t[r]!==void 0&&(this[r]=t[r])}}};var Er=(()=>{class e{_attachedOverlays=[];_document=E(W);_isAttached;constructor(){}ngOnDestroy(){this.detach()}add(i){this.remove(i),this._attachedOverlays.push(i)}remove(i){let r=this._attachedOverlays.indexOf(i);r>-1&&this._attachedOverlays.splice(r,1),this._attachedOverlays.length===0&&this.detach()}static \u0275fac=function(r){return new(r||e)};static \u0275prov=j({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Xn=(()=>{class e extends Er{_ngZone=E(q);_renderer=E(wt).createRenderer(null,null);_cleanupKeydown;add(i){super.add(i),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=i=>{let r=this._attachedOverlays;for(let s=r.length-1;s>-1;s--)if(r[s]._keydownEvents.observers.length>0){this._ngZone.run(()=>r[s]._keydownEvents.next(i));break}};static \u0275fac=(()=>{let i;return function(s){return(i||(i=Zt(e)))(s||e)}})();static \u0275prov=j({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),zn=(()=>{class e extends Er{_platform=E(et);_ngZone=E(q);_renderer=E(wt).createRenderer(null,null);_cursorOriginalValue;_cursorStyleIsSet=!1;_pointerDownEventTarget;_cleanups;add(i){if(super.add(i),!this._isAttached){let r=this._document.body,s={capture:!0},h=this._renderer;this._cleanups=this._ngZone.runOutsideAngular(()=>[h.listen(r,"pointerdown",this._pointerDownListener,s),h.listen(r,"click",this._clickListener,s),h.listen(r,"auxclick",this._clickListener,s),h.listen(r,"contextmenu",this._clickListener,s)]),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(i=>i()),this._cleanups=void 0,this._platform.IOS&&this._cursorStyleIsSet&&(this._document.body.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1)}_pointerDownListener=i=>{this._pointerDownEventTarget=nt(i)};_clickListener=i=>{let r=nt(i),s=i.type==="click"&&this._pointerDownEventTarget?this._pointerDownEventTarget:r;this._pointerDownEventTarget=null;let h=this._attachedOverlays.slice();for(let c=h.length-1;c>-1;c--){let u=h[c];if(u._outsidePointerEvents.observers.length<1||!u.hasAttached())continue;if(vr(u.overlayElement,r)||vr(u.overlayElement,s))break;let d=u._outsidePointerEvents;this._ngZone?this._ngZone.run(()=>d.next(i)):d.next(i)}};static \u0275fac=(()=>{let i;return function(s){return(i||(i=Zt(e)))(s||e)}})();static \u0275prov=j({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function vr(e,t){let i=typeof ShadowRoot<"u"&&ShadowRoot,r=t;for(;r;){if(r===e)return!0;r=i&&r instanceof ShadowRoot?r.host:r.parentNode}return!1}var Or=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275cmp=ct({type:e,selectors:[["ng-component"]],hostAttrs:["cdk-overlay-style-loader",""],decls:0,vars:0,template:function(r,s){},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;touch-action:manipulation}@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}
5
- `],encapsulation:2,changeDetection:0})}return e})(),Ze=(()=>{class e{_platform=E(et);_containerElement;_document=E(W);_styleLoader=E(It);constructor(){}ngOnDestroy(){this._containerElement?.remove()}getContainerElement(){return this._loadStyles(),this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let i="cdk-overlay-container";if(this._platform.isBrowser||Ve()){let s=this._document.querySelectorAll(`.${i}[platform="server"], .${i}[platform="test"]`);for(let h=0;h<s.length;h++)s[h].remove()}let r=this._document.createElement("div");r.classList.add(i),Ve()?r.setAttribute("platform","test"):this._platform.isBrowser||r.setAttribute("platform","server"),this._document.body.appendChild(r),this._containerElement=r}_loadStyles(){this._styleLoader.load(Or)}static \u0275fac=function(r){return new(r||e)};static \u0275prov=j({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Xe=class{_renderer;_ngZone;element;_cleanupClick;_cleanupTransitionEnd;_fallbackTimeout;constructor(t,i,r,s){this._renderer=i,this._ngZone=r,this.element=t.createElement("div"),this.element.classList.add("cdk-overlay-backdrop"),this._cleanupClick=i.listen(this.element,"click",s)}detach(){this._ngZone.runOutsideAngular(()=>{let t=this.element;clearTimeout(this._fallbackTimeout),this._cleanupTransitionEnd?.(),this._cleanupTransitionEnd=this._renderer.listen(t,"transitionend",this.dispose),this._fallbackTimeout=setTimeout(this.dispose,500),t.style.pointerEvents="none",t.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()}},jt=class{_portalOutlet;_host;_pane;_config;_ngZone;_keyboardDispatcher;_document;_location;_outsideClickDispatcher;_animationsDisabled;_injector;_renderer;_backdropClick=new Y;_attachments=new Y;_detachments=new Y;_positionStrategy;_scrollStrategy;_locationChanges=ri.EMPTY;_backdropRef=null;_detachContentMutationObserver;_detachContentAfterRenderRef;_previousHostParent;_keydownEvents=new Y;_outsidePointerEvents=new Y;_afterNextRenderRef;constructor(t,i,r,s,h,c,u,d,m,y=!1,_,v){this._portalOutlet=t,this._host=i,this._pane=r,this._config=s,this._ngZone=h,this._keyboardDispatcher=c,this._document=u,this._location=d,this._outsideClickDispatcher=m,this._animationsDisabled=y,this._injector=_,this._renderer=v,s.scrollStrategy&&(this._scrollStrategy=s.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=s.positionStrategy}get overlayElement(){return this._pane}get backdropElement(){return this._backdropRef?.element||null}get hostElement(){return this._host}attach(t){!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host);let i=this._portalOutlet.attach(t);return this._positionStrategy&&this._positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._afterNextRenderRef?.destroy(),this._afterNextRenderRef=ft(()=>{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._completeDetachContent(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),typeof i?.onDestroy=="function"&&i.onDestroy(()=>{this.hasAttached()&&this._ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>this.detach()))}),i}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();let t=this._portalOutlet.detach();return this._detachments.next(),this._completeDetachContent(),this._keyboardDispatcher.remove(this),this._detachContentWhenEmpty(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),t}dispose(){let t=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,t&&this._detachments.next(),this._detachments.complete(),this._completeDetachContent()}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(t){t!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=t,this.hasAttached()&&(t.attach(this),this.updatePosition()))}updateSize(t){this._config=U(U({},this._config),t),this._updateElementSize()}setDirection(t){this._config=ii(U({},this._config),{direction:t}),this._updateElementDirection()}addPanelClass(t){this._pane&&this._toggleClasses(this._pane,t,!0)}removePanelClass(t){this._pane&&this._toggleClasses(this._pane,t,!1)}getDirection(){let t=this._config.direction;return t?typeof t=="string"?t:t.value:"ltr"}updateScrollStrategy(t){t!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=t,this.hasAttached()&&(t.attach(this),t.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;let t=this._pane.style;t.width=ot(this._config.width),t.height=ot(this._config.height),t.minWidth=ot(this._config.minWidth),t.minHeight=ot(this._config.minHeight),t.maxWidth=ot(this._config.maxWidth),t.maxHeight=ot(this._config.maxHeight)}_togglePointerEvents(t){this._pane.style.pointerEvents=t?"":"none"}_attachBackdrop(){let t="cdk-overlay-backdrop-showing";this._backdropRef?.dispose(),this._backdropRef=new Xe(this._document,this._renderer,this._ngZone,i=>{this._backdropClick.next(i)}),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(t))}):this._backdropRef.element.classList.add(t)}_updateStackingOrder(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){this._animationsDisabled?(this._backdropRef?.dispose(),this._backdropRef=null):this._backdropRef?.detach()}_toggleClasses(t,i,r){let s=Ri(i||[]).filter(h=>!!h);s.length&&(r?t.classList.add(...s):t.classList.remove(...s))}_detachContentWhenEmpty(){let t=!1;try{this._detachContentAfterRenderRef=ft(()=>{t=!0,this._detachContent()},{injector:this._injector})}catch(i){if(t)throw i;this._detachContent()}globalThis.MutationObserver&&this._pane&&(this._detachContentMutationObserver||=new globalThis.MutationObserver(()=>{this._detachContent()}),this._detachContentMutationObserver.observe(this._pane,{childList:!0}))}_detachContent(){(!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()),this._completeDetachContent())}_completeDetachContent(){this._detachContentAfterRenderRef?.destroy(),this._detachContentAfterRenderRef=void 0,this._detachContentMutationObserver?.disconnect()}_disposeScrollStrategy(){let t=this._scrollStrategy;t?.disable(),t?.detach?.()}};var wr="cdk-global-overlay-wrapper";function Sr(e){return new ze}var ze=class{_overlayRef;_cssPosition="static";_topOffset="";_bottomOffset="";_alignItems="";_xPosition="";_xOffset="";_width="";_height="";_isDisposed=!1;attach(t){let i=t.getConfig();this._overlayRef=t,this._width&&!i.width&&t.updateSize({width:this._width}),this._height&&!i.height&&t.updateSize({height:this._height}),t.hostElement.classList.add(wr),this._isDisposed=!1}top(t=""){return this._bottomOffset="",this._topOffset=t,this._alignItems="flex-start",this}left(t=""){return this._xOffset=t,this._xPosition="left",this}bottom(t=""){return this._topOffset="",this._bottomOffset=t,this._alignItems="flex-end",this}right(t=""){return this._xOffset=t,this._xPosition="right",this}start(t=""){return this._xOffset=t,this._xPosition="start",this}end(t=""){return this._xOffset=t,this._xPosition="end",this}width(t=""){return this._overlayRef?this._overlayRef.updateSize({width:t}):this._width=t,this}height(t=""){return this._overlayRef?this._overlayRef.updateSize({height:t}):this._height=t,this}centerHorizontally(t=""){return this.left(t),this._xPosition="center",this}centerVertically(t=""){return this.top(t),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;let t=this._overlayRef.overlayElement.style,i=this._overlayRef.hostElement.style,r=this._overlayRef.getConfig(),{width:s,height:h,maxWidth:c,maxHeight:u}=r,d=(s==="100%"||s==="100vw")&&(!c||c==="100%"||c==="100vw"),m=(h==="100%"||h==="100vh")&&(!u||u==="100%"||u==="100vh"),y=this._xPosition,_=this._xOffset,v=this._overlayRef.getConfig().direction==="rtl",S="",O="",A="";d?A="flex-start":y==="center"?(A="center",v?O=_:S=_):v?y==="left"||y==="end"?(A="flex-end",S=_):(y==="right"||y==="start")&&(A="flex-start",O=_):y==="left"||y==="start"?(A="flex-start",S=_):(y==="right"||y==="end")&&(A="flex-end",O=_),t.position=this._cssPosition,t.marginLeft=d?"0":S,t.marginTop=m?"0":this._topOffset,t.marginBottom=this._bottomOffset,t.marginRight=d?"0":O,i.justifyContent=A,i.alignItems=m?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;let t=this._overlayRef.overlayElement.style,i=this._overlayRef.hostElement,r=i.style;i.classList.remove(wr),r.justifyContent=r.alignItems=t.marginTop=t.marginBottom=t.marginLeft=t.marginRight=t.position="",this._overlayRef=null,this._isDisposed=!0}};function Ar(e,t){e.get(It).load(Or);let i=e.get(Ze),r=e.get(W),s=e.get(ee),h=e.get(gi),c=e.get(Rt),u=r.createElement("div"),d=r.createElement("div");d.id=s.getId("cdk-overlay-"),d.classList.add("cdk-overlay-pane"),u.appendChild(d),i.getContainerElement().appendChild(u);let m=new fe(d,h,e),y=new Ut(t),_=e.get(Kt,null,{optional:!0})||e.get(wt).createRenderer(null,null);return y.direction=y.direction||c.value,new jt(m,u,d,y,e.get(q),e.get(Xn),r,e.get(Ai),e.get(zn),t?.disableAnimations??e.get(ui,null,{optional:!0})==="NoopAnimations",e.get(Xt),_)}function Zn(e,t){}var Bt=class{viewContainerRef;injector;id;role="dialog";panelClass="";hasBackdrop=!0;backdropClass="";disableClose=!1;closePredicate;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;disableAnimations=!1;providers;container;templateContext};var Jn=(()=>{class e extends Ct{_elementRef=E(ht);_focusTrapFactory=E(_r);_config;_interactivityChecker=E($e);_ngZone=E(q);_focusMonitor=E(ur);_renderer=E(Kt);_changeDetectorRef=E(Oi);_injector=E(G);_platform=E(et);_document=E(W);_portalOutlet;_focusTrapped=new Y;_focusTrap=null;_elementFocusedBeforeDialogWasOpened=null;_closeInteractionType=null;_ariaLabelledByQueue=[];_isDestroyed=!1;constructor(){super(),this._config=E(Bt,{optional:!0})||new Bt,this._config.ariaLabelledBy&&this._ariaLabelledByQueue.push(this._config.ariaLabelledBy)}_addAriaLabelledBy(i){this._ariaLabelledByQueue.push(i),this._changeDetectorRef.markForCheck()}_removeAriaLabelledBy(i){let r=this._ariaLabelledByQueue.indexOf(i);r>-1&&(this._ariaLabelledByQueue.splice(r,1),this._changeDetectorRef.markForCheck())}_contentAttached(){this._initializeFocusTrap(),this._captureInitialFocus()}_captureInitialFocus(){this._trapFocus()}ngOnDestroy(){this._focusTrapped.complete(),this._isDestroyed=!0,this._restoreFocus()}attachComponentPortal(i){this._portalOutlet.hasAttached();let r=this._portalOutlet.attachComponentPortal(i);return this._contentAttached(),r}attachTemplatePortal(i){this._portalOutlet.hasAttached();let r=this._portalOutlet.attachTemplatePortal(i);return this._contentAttached(),r}attachDomPortal=i=>{this._portalOutlet.hasAttached();let r=this._portalOutlet.attachDomPortal(i);return this._contentAttached(),r};_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(i,r){this._interactivityChecker.isFocusable(i)||(i.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{let s=()=>{h(),c(),i.removeAttribute("tabindex")},h=this._renderer.listen(i,"blur",s),c=this._renderer.listen(i,"mousedown",s)})),i.focus(r)}_focusByCssSelector(i,r){let s=this._elementRef.nativeElement.querySelector(i);s&&this._forceFocus(s,r)}_trapFocus(i){this._isDestroyed||ft(()=>{let r=this._elementRef.nativeElement;switch(this._config.autoFocus){case!1:case"dialog":this._containsFocus()||r.focus(i);break;case!0:case"first-tabbable":this._focusTrap?.focusInitialElement(i)||this._focusDialogContainer(i);break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]',i);break;default:this._focusByCssSelector(this._config.autoFocus,i);break}this._focusTrapped.next()},{injector:this._injector})}_restoreFocus(){let i=this._config.restoreFocus,r=null;if(typeof i=="string"?r=this._document.querySelector(i):typeof i=="boolean"?r=i?this._elementFocusedBeforeDialogWasOpened:null:i&&(r=i),this._config.restoreFocus&&r&&typeof r.focus=="function"){let s=Qt(),h=this._elementRef.nativeElement;(!s||s===this._document.body||s===h||h.contains(s))&&(this._focusMonitor?(this._focusMonitor.focusVia(r,this._closeInteractionType),this._closeInteractionType=null):r.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(i){this._elementRef.nativeElement.focus?.(i)}_containsFocus(){let i=this._elementRef.nativeElement,r=Qt();return i===r||i.contains(r)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=Qt()))}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=ct({type:e,selectors:[["cdk-dialog-container"]],viewQuery:function(r,s){if(r&1&&yi(Ue,7),r&2){let h;mi(h=vi())&&(s._portalOutlet=h.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(r,s){r&2&&qt("id",s._config.id||null)("role",s._config.role)("aria-modal",s._config.ariaModal)("aria-labelledby",s._config.ariaLabel?null:s._ariaLabelledByQueue[0])("aria-label",s._config.ariaLabel)("aria-describedby",s._config.ariaDescribedBy||null)},features:[Gt],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(r,s){r&1&&di(0,Zn,0,0,"ng-template",0)},dependencies:[Ue],styles:[`.cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}
6
- `],encapsulation:2})}return e})(),Ht=class{overlayRef;config;componentInstance;componentRef;containerInstance;disableClose;closed=new Y;backdropClick;keydownEvents;outsidePointerEvents;id;_detachSubscription;constructor(t,i){this.overlayRef=t,this.config=i,this.disableClose=i.disableClose,this.backdropClick=t.backdropClick(),this.keydownEvents=t.keydownEvents(),this.outsidePointerEvents=t.outsidePointerEvents(),this.id=i.id,this.keydownEvents.subscribe(r=>{r.keyCode===27&&!this.disableClose&&!yr(r)&&(r.preventDefault(),this.close(void 0,{focusOrigin:"keyboard"}))}),this.backdropClick.subscribe(()=>{!this.disableClose&&this._canClose()?this.close(void 0,{focusOrigin:"mouse"}):this.containerInstance._recaptureFocus?.()}),this._detachSubscription=t.detachments().subscribe(()=>{i.closeOnOverlayDetachments!==!1&&this.close()})}close(t,i){if(this._canClose(t)){let r=this.closed;this.containerInstance._closeInteractionType=i?.focusOrigin||"program",this._detachSubscription.unsubscribe(),this.overlayRef.dispose(),r.next(t),r.complete(),this.componentInstance=this.containerInstance=null}}updatePosition(){return this.overlayRef.updatePosition(),this}updateSize(t="",i=""){return this.overlayRef.updateSize({width:t,height:i}),this}addPanelClass(t){return this.overlayRef.addPanelClass(t),this}removePanelClass(t){return this.overlayRef.removePanelClass(t),this}_canClose(t){let i=this.config;return!!this.containerInstance&&(!i.closePredicate||i.closePredicate(t,i,this.componentInstance))}},Kn=new z("DialogScrollStrategy",{providedIn:"root",factory:()=>{let e=E(G);return()=>br(e)}}),Gn=new z("DialogData"),qn=new z("DefaultDialogConfig");function Qn(e){let t=zt(e),i=new bt;return{valueSignal:t,get value(){return t()},change:i,ngOnDestroy(){i.complete()}}}var qs=(()=>{class e{_injector=E(G);_defaultOptions=E(qn,{optional:!0});_parentDialog=E(e,{optional:!0,skipSelf:!0});_overlayContainer=E(Ze);_idGenerator=E(ee);_openDialogsAtThisLevel=[];_afterAllClosedAtThisLevel=new Y;_afterOpenedAtThisLevel=new Y;_ariaHiddenElements=new Map;_scrollStrategy=E(Kn);get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}afterAllClosed=si(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(hi(void 0)));constructor(){}open(i,r){let s=this._defaultOptions||new Bt;r=U(U({},s),r),r.id=r.id||this._idGenerator.getId("cdk-dialog-"),r.id&&this.getDialogById(r.id);let h=this._getOverlayConfig(r),c=Ar(this._injector,h),u=new Ht(c,r),d=this._attachContainer(c,u,r);if(u.containerInstance=d,!this.openDialogs.length){let m=this._overlayContainer.getContainerElement();d._focusTrapped?d._focusTrapped.pipe(ai(1)).subscribe(()=>{this._hideNonDialogContentFromAssistiveTechnology(m)}):this._hideNonDialogContentFromAssistiveTechnology(m)}return this._attachDialogContent(i,u,d,r),this.openDialogs.push(u),u.closed.subscribe(()=>this._removeOpenDialog(u,!0)),this.afterOpened.next(u),u}closeAll(){Je(this.openDialogs,i=>i.close())}getDialogById(i){return this.openDialogs.find(r=>r.id===i)}ngOnDestroy(){Je(this._openDialogsAtThisLevel,i=>{i.config.closeOnDestroy===!1&&this._removeOpenDialog(i,!1)}),Je(this._openDialogsAtThisLevel,i=>i.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(i){let r=new Ut({positionStrategy:i.positionStrategy||Sr().centerHorizontally().centerVertically(),scrollStrategy:i.scrollStrategy||this._scrollStrategy(),panelClass:i.panelClass,hasBackdrop:i.hasBackdrop,direction:i.direction,minWidth:i.minWidth,minHeight:i.minHeight,maxWidth:i.maxWidth,maxHeight:i.maxHeight,width:i.width,height:i.height,disposeOnNavigation:i.closeOnNavigation,disableAnimations:i.disableAnimations});return i.backdropClass&&(r.backdropClass=i.backdropClass),r}_attachContainer(i,r,s){let h=s.injector||s.viewContainerRef?.injector,c=[{provide:Bt,useValue:s},{provide:Ht,useValue:r},{provide:jt,useValue:i}],u;s.container?typeof s.container=="function"?u=s.container:(u=s.container.type,c.push(...s.container.providers(s))):u=Jn;let d=new At(u,s.viewContainerRef,G.create({parent:h||this._injector,providers:c}));return i.attach(d).instance}_attachDialogContent(i,r,s,h){if(i instanceof Jt){let c=this._createInjector(h,r,s,void 0),u={$implicit:h.data,dialogRef:r};h.templateContext&&(u=U(U({},u),typeof h.templateContext=="function"?h.templateContext():h.templateContext)),s.attachTemplatePortal(new Nt(i,null,u,c))}else{let c=this._createInjector(h,r,s,this._injector),u=s.attachComponentPortal(new At(i,h.viewContainerRef,c));r.componentRef=u,r.componentInstance=u.instance}}_createInjector(i,r,s,h){let c=i.injector||i.viewContainerRef?.injector,u=[{provide:Gn,useValue:i.data},{provide:Ht,useValue:r}];return i.providers&&(typeof i.providers=="function"?u.push(...i.providers(r,i,s)):u.push(...i.providers)),i.direction&&(!c||!c.get(Rt,null,{optional:!0}))&&u.push({provide:Rt,useValue:Qn(i.direction)}),G.create({parent:c||h,providers:u})}_removeOpenDialog(i,r){let s=this.openDialogs.indexOf(i);s>-1&&(this.openDialogs.splice(s,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((h,c)=>{h?c.setAttribute("aria-hidden",h):c.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),r&&this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(i){if(i.parentElement){let r=i.parentElement.children;for(let s=r.length-1;s>-1;s--){let h=r[s];h!==i&&h.nodeName!=="SCRIPT"&&h.nodeName!=="STYLE"&&!h.hasAttribute("aria-live")&&(this._ariaHiddenElements.set(h,h.getAttribute("aria-hidden")),h.setAttribute("aria-hidden","true"))}}}_getAfterAllClosed(){let i=this._parentDialog;return i?i._getAfterAllClosed():this._afterAllClosedAtThisLevel}static \u0275fac=function(r){return new(r||e)};static \u0275prov=j({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function Je(e,t){let i=e.length;for(;i--;)t(e[i])}var de=class e{static cache=new Map;static loadingPromises=new Map;async getSvg(t){if(e.cache.has(t))return e.cache.get(t);if(e.loadingPromises.has(t))return e.loadingPromises.get(t);let i=this.fetchSvgContent(t);e.loadingPromises.set(t,i);try{let r=await i;return e.cache.set(t,r),r}finally{e.loadingPromises.delete(t)}}getCachedSvg(t){return e.cache.get(t)??null}async preloadIcons(t){let i=t.map(r=>this.getSvg(r).catch(s=>(Ee.error(`Failed to preload icon: ${r}`,s),"")));await Promise.all(i)}clearCache(){e.cache.clear(),e.loadingPromises.clear()}async fetchSvgContent(t){let i=`${Ci.baseURL}/svg/${t}.svg`;try{return(await Bi(i,{cache:"force-cache",headers:{Accept:"image/svg+xml,text/plain"}})).data}catch(r){return Ee.error(`Unable to get the icon: ${t}`,r),""}}static \u0275fac=function(i){return new(i||e)};static \u0275prov=j({token:e,factory:e.\u0275fac,providedIn:"root"})};var Nr=class e{name=Ei.required();rawSvg=zt("");sanitisedSvg=wi(()=>this.sanitizer.bypassSecurityTrustHtml(this.rawSvg()));sanitizer=E(Ni);iconService=E(de);constructor(){bi(()=>{let t=this.name();this.loadIcon(t)})}async loadIcon(t){try{let i=await this.iconService.getSvg(t);this.rawSvg.set(i)}catch{this.rawSvg.set("")}}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=ct({type:e,selectors:[["cooee-icon"]],hostAttrs:["role","img"],hostVars:2,hostBindings:function(i,r){i&2&&(_i("innerHTML",r.sanitisedSvg(),pi),qt("aria-label",r.name()))},inputs:{name:[1,"name"]},decls:0,vars:0,template:function(i,r){},encapsulation:2})};var Dr=Lr(Cr());var eo=["utm_source","utm_medium","utm_campaign","utm_term","utm_content","utm_id"],Br={utm_source:"tw_source",utm_campaign:"tw_campaign"},io="cooee_ai";var pa=()=>{let e;try{e=new Dr.URLBuilder(location.href)}catch{return{}}let t={};eo.forEach(r=>{let s=e.getQueryParam(r);s&&(t[r]=s)});let i={};return Object.keys(Br).forEach(r=>{let s=e.getQueryParam(Br[r]);s&&(i[r]=s)}),U(U({},i),t)};function da(e,t){if(!e)return"";let i=t?t.objective.toLowerCase().toString():"cooee_widget",r=t?t.shortID:"",s=new URL(e,location.origin);return s.searchParams.set("utm_source",io),s.searchParams.set("utm_medium","onsite_widget"),s.searchParams.set("utm_campaign",i),s.searchParams.set("utm_content",r),s.toString()}var ga=(e,t)=>{let i=new URL(e);return t.shortID&&i.searchParams.set("ceevid",t.shortID+""),i.toString()},_a=()=>new URLSearchParams(location.search).get("ceevid");export{oo as a,so as b,lr as c,Ht as d,Gn as e,qs as f,Nr as g,io as h,pa as i,da as j,ga as k,_a as l};
@@ -1,8 +0,0 @@
1
- import{e as D,f as A}from"./chunk-V7UGKYBN.js";var V=D((C,m)=>{"use strict";(function(r){"use strict";var e={};e.VERSION="1.6.1";var s,f={},E=function(o,t){return function(){return t.apply(o,arguments)}},h=function(){var o=arguments,t=o[0],u,n;for(n=1;n<o.length;n++)for(u in o[n])!(u in t)&&o[n].hasOwnProperty(u)&&(t[u]=o[n][u]);return t},g=function(o,t){return{value:o,name:t}};e.TRACE=g(1,"TRACE"),e.DEBUG=g(2,"DEBUG"),e.INFO=g(3,"INFO"),e.TIME=g(4,"TIME"),e.WARN=g(5,"WARN"),e.ERROR=g(8,"ERROR"),e.OFF=g(99,"OFF");var _=function(o){this.context=o,this.setLevel(o.filterLevel),this.log=this.info};_.prototype={setLevel:function(o){o&&"value"in o&&(this.context.filterLevel=o)},getLevel:function(){return this.context.filterLevel},enabledFor:function(o){var t=this.context.filterLevel;return o.value>=t.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(o){typeof o=="string"&&o.length>0&&this.invoke(e.TIME,[o,"start"])},timeEnd:function(o){typeof o=="string"&&o.length>0&&this.invoke(e.TIME,[o,"end"])},invoke:function(o,t){s&&this.enabledFor(o)&&s(t,h({level:o},this.context))}};var i=new _({filterLevel:e.OFF});(function(){var o=e;o.enabledFor=E(i,i.enabledFor),o.trace=E(i,i.trace),o.debug=E(i,i.debug),o.time=E(i,i.time),o.timeEnd=E(i,i.timeEnd),o.info=E(i,i.info),o.warn=E(i,i.warn),o.error=E(i,i.error),o.log=o.info})(),e.setHandler=function(o){s=o},e.setLevel=function(o){i.setLevel(o);for(var t in f)f.hasOwnProperty(t)&&f[t].setLevel(o)},e.getLevel=function(){return i.getLevel()},e.get=function(o){return f[o]||(f[o]=new _(h({name:o},i.context)))},e.createDefaultHandler=function(o){o=o||{},o.formatter=o.formatter||function(l,c){c.name&&l.unshift("["+c.name+"]")};var t={},u=function(n,l){Function.prototype.apply.call(n,console,l)};return typeof console>"u"?function(){}:function(n,l){n=Array.prototype.slice.call(n);var c=console.log,d;l.level===e.TIME?(d=(l.name?"["+l.name+"] ":"")+n[0],n[1]==="start"?console.time?console.time(d):t[d]=new Date().getTime():console.timeEnd?console.timeEnd(d):u(c,[d+": "+(new Date().getTime()-t[d])+"ms"])):(l.level===e.WARN&&console.warn?c=console.warn:l.level===e.ERROR&&console.error?c=console.error:l.level===e.INFO&&console.info?c=console.info:l.level===e.DEBUG&&console.debug?c=console.debug:l.level===e.TRACE&&console.trace&&(c=console.trace),o.formatter(n,l),u(c,n))}},e.useDefaults=function(o){e.setLevel(o&&o.defaultLevel||e.DEBUG),e.setHandler(e.createDefaultHandler(o))},e.setDefaults=e.useDefaults,typeof define=="function"&&define.amd?define(e):typeof m<"u"&&m.exports?m.exports=e:(e._prevLogger=r.Logger,e.noConflict=function(){return r.Logger=e._prevLogger,e},r.Logger=e)})(C)});var I="13.1.6";var b=I.split("-")[0].split(".").slice(0,3).map(r=>r.padStart(2,"0")).join(""),S="WEB",N="CooeeSDK",p=I,M=parseInt(b,10);var P=["collection","product","cart"],U=[{identifier:"#flo-checkout-wrapper",gateway:"Shopflow"},{identifier:"#fastrr-main-container",gateway:"Shiprocket"},{identifier:"#gokwik-modal-wrapper",gateway:"Gokwik"},{identifier:"#zecpe",gateway:"Ecom 360"}],x=["View Item","View Cart","View Collection"],F=["CE Screen View","View Collection","View Item","View Cart"];var T=`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${p}/dist`,L={apiURL:"https://api.sdk.letscooee.com",debug:!1,mode:"production",baseURL:T,styleURL:`${T}/widget.min.css`,widgetURL:`${T}/widget.min.js`,swiperStyleURL:`${T}/swiper-bundle.min.css`};var a=A(V());var v=class{static debuggerEl;static infoLogs=[];static log(...e){a.default.info(...e)}static verbose(...e){a.default.debug(...e)}static error(...e){a.default.error(...e)}static warn(...e){a.default.warn(...e)}static info(...e){a.default.info(...e),this.infoLogs.push({time:new Date,message:e.join(" ")}),this.addToDebugger()}static trace(...e){a.default.trace(...e)}static addToDebugger(){sessionStorage.cooeeDebug&&(this.debuggerEl=this.debuggerEl??document.querySelector("cooee-debugger"),this.debuggerEl&&this.debuggerEl&&(this.debuggerEl.logs=[...this.infoLogs]))}};function K(r=N){a.default.useDefaults({formatter:function(e){e.unshift(`${r} (v${p}):`)}}),w()&&(localStorage.cooeeLogLevel="TRACE"),localStorage.cooeeLogLevel?a.default.setLevel(a.default[localStorage.cooeeLogLevel]):a.default.setLevel(L.debug?a.default.TRACE:a.default.OFF)}function w(){let r=O();return r==="1"||r==="on"}function O(){return new URL(location.href).searchParams?.get("cooee-debug")}function $(){let r=["display: inline-block;","font-size: 14px;","background: linear-gradient(90deg, #d52dc8 25%, #2179e2 82%);","color: white;","padding: 4px;","border-radius: 4px;"].join(" "),e=`
2
- `;e+=`\u{1F4E3} Drive higher conversions with AI-powered onsite engagement
3
- `,e+=`\u{1F50D} Track real-time visitor intent & optimize engagement
4
- `,e+=`\u{1F4CA} Improve Meta Ads ROAS with intent-driven campaigns
5
- `,e+=`\u{1F6CD}\uFE0F Boost purchases & repeat sales effortlessly
6
- `,e+=`
7
-
8
- `,e+="Learn more: https://www.letscooee.com",console.group("%c Elevate your ecommerce experience with Cooee \u{1F680} ",r),console.log(`%c${e}`,"font-size: 13px; line-height: 1.8;"),console.log(`SDK v${p}`),console.groupEnd(),v.info(`SDK v${p} loaded`)}function z(r){if(r<0)return`${r}ms`;let e=new Date(Date.UTC(0,0,0,0,0,0,r)),s=[];return e.getUTCMinutes()&&s.push(e.getUTCMinutes()+"m"),e.getUTCSeconds()&&s.push(e.getUTCSeconds()+"s"),e.getUTCMilliseconds()&&s.push(e.getUTCMilliseconds()+"ms"),s.length||s.push("0ms"),s.join(" ")}export{S as a,p as b,M as c,P as d,U as e,x as f,F as g,L as h,V as i,v as j,K as k,w as l,O as m,$ as n,z as o};
@@ -1 +0,0 @@
1
- var k=Object.create;var h=Object.defineProperty,l=Object.defineProperties,m=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,p=Object.getPrototypeOf,i=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable;var g=(a,b,c)=>b in a?h(a,b,{enumerable:!0,configurable:!0,writable:!0,value:c}):a[b]=c,r=(a,b)=>{for(var c in b||={})i.call(b,c)&&g(a,c,b[c]);if(f)for(var c of f(b))j.call(b,c)&&g(a,c,b[c]);return a},s=(a,b)=>l(a,n(b));var t=(a=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(a,{get:(b,c)=>(typeof require<"u"?require:b)[c]}):a)(function(a){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});var u=(a,b)=>{var c={};for(var d in a)i.call(a,d)&&b.indexOf(d)<0&&(c[d]=a[d]);if(a!=null&&f)for(var d of f(a))b.indexOf(d)<0&&j.call(a,d)&&(c[d]=a[d]);return c};var v=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports);var q=(a,b,c,d)=>{if(b&&typeof b=="object"||typeof b=="function")for(let e of o(b))!i.call(a,e)&&e!==c&&h(a,e,{get:()=>b[e],enumerable:!(d=m(b,e))||d.enumerable});return a};var w=(a,b,c)=>(c=a!=null?k(p(a)):{},q(b||!a||!a.__esModule?h(c,"default",{value:a,enumerable:!0}):c,a));var x=(a,b,c)=>g(a,typeof b!="symbol"?b+"":b,c);export{r as a,s as b,t as c,u as d,v as e,w as f,x as g};
@@ -1 +0,0 @@
1
- import{j as e,l as h,o as t}from"./chunk-TWXZPLZM.js";import"./chunk-V7UGKYBN.js";function p(n){if(n===0)return"0 B";let i=1024,s=["B","KB","MB","GB"],c=Math.floor(Math.log(n)/Math.log(i));return`${(n/Math.pow(i,c)).toFixed(2)} ${s[c]}`}function a(n){return n?new Date(n).toLocaleString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3,hour12:!1,timeZoneName:"short"}):"N/A"}function M(){let n=performance.getEntriesByType?.("resource");if(n)return n.find(i=>i.name.includes("@letscooee/web-sdk")&&i.name.includes("main.min.js"))}function I(n){window.cooeeSDKPreview||!h()||(document.readyState==="complete"?setTimeout(()=>v(n),100):window.addEventListener("load",()=>{setTimeout(()=>v(n),100)}))}function v(n){try{P(n)}catch(i){console.error("Failed to print debugging logs",i)}}function P(n){let i=performance.getEntriesByType?.("navigation")?.[0],s=window.CooeeSDK?.pageLoadTime,c=M(),f=performance.timeOrigin||0,o=i?.responseEnd?f+i.responseEnd:void 0,d=f,m=i?.domContentLoadedEventEnd||0,u=i?.loadEventEnd||0,g=o&&o>0?o:s?s.getTime():0,T=o&&o>0?"HTML download complete":"inline script execution",S=m>0?d+m:void 0,$=u>0?d+u:void 0;e.info("\u23F1\uFE0F \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 Performance Timing Report \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550"),e.info("\u{1F4C5} Absolute Timestamps (Local Time):"),e.info(" Note: Inline script can execute during HTML download (incremental parsing)"),e.info(""),e.info(` 1. Navigation started: ${a(d)}`);let r=s?s.getTime():0;if(o&&o>0&&r?r<o?(e.info(` 2. Inline script executed: ${a(r)} (during HTML parsing)`),e.info(` 3. HTML download complete: ${a(o)}`)):(e.info(` 2. HTML download complete: ${a(o)}`),e.info(` 3. Inline script executed: ${a(r)}`)):o&&o>0?e.info(` 2. HTML download complete: ${a(o)}`):r&&e.info(` 2. Inline script executed: ${a(r)}`),e.info(` 4. SDK module loaded: ${a(n.getTime())} (from CDN)`),S&&e.info(` 5. DOMContentLoaded: ${a(S)}`),$&&e.info(` 6. Page fully loaded: ${a($)}`),e.info(""),e.info("\u23F1\uFE0F Relative Timings:"),o&&o>0&&d){let l=o-d;e.info(` Shopify backend + HTML download: ${t(l)} (not Cooee SDK)`)}if(g){let l=n.getTime()-g;if(l<0){let L=r>0?r:d,w=r>0?"inline script execution":"navigation start",B=n.getTime()-L;e.info(` SDK module load time: ${t(B)} after ${w}`),e.info(` (Note: Using earlier baseline because SDK loaded before ${T})`)}else e.info(` SDK module load time: ${t(l)} after ${T}`),e.info(` (Baseline: ${T} at ${a(g)})`);let D=n.getTime()-d;e.info(` \u{1F3AF} Total SDK load time: ${t(D)} (from navigation start to SDK ready)`)}m&&m>0&&e.info(` DOMContentLoaded: ${t(m)} after navigation start`),u&&u>0&&e.info(` Page fully loaded: ${t(u)} after navigation start`),z(c),e.info("\u23F1\uFE0F \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550")}function z(n){if(!n){e.info(""),e.info("\u{1F4E6} SDK Resource Metrics: Not available");return}e.info(""),e.info("\u{1F4E6} SDK Resource Metrics:"),e.info(` URL: ${n.name}`),e.info(` Download duration: ${t(n.duration)}`);let i=n.transferSize===0;if(e.info(` Served from: ${i?"\u{1F4BE} Cache (disk/memory)":"\u{1F310} Network"}`),!i){e.info(` Transfer size: ${p(n.transferSize)}`),e.info(` Encoded size: ${p(n.encodedBodySize)}`),e.info(` Decoded size: ${p(n.decodedBodySize)}`);let s=(1-n.encodedBodySize/n.decodedBodySize)*100;s>0&&e.info(` Compression ratio: ${s.toFixed(1)}%`)}if(n.domainLookupEnd>0){let s=n.domainLookupEnd-n.domainLookupStart,c=n.connectEnd-n.connectStart,f=n.responseStart-n.requestStart,o=n.responseEnd-n.responseStart;e.info(" Timing breakdown:"),s>0&&e.info(` DNS lookup: ${t(s)}`),c>0&&e.info(` TCP connect: ${t(c)}`),f>0&&e.info(` Request: ${t(f)}`),o>0&&e.info(` Response: ${t(o)}`)}}export{I as printAllDebugLogs};
@@ -1,4 +0,0 @@
1
- import{a as S}from"./chunk-KIK4KPM3.js";import{f as k,g as C,h as M}from"./chunk-PLMFOGWI.js";import{Aa as h,Ca as b,K as d,O as r,Qa as s,Ra as w,X as l,aa as c,cb as m,db as y,eb as v,kb as D,la as g,ma as u,na as f,sa as a,ta as n,ua as x,vb as E}from"./chunk-BMEFEXWO.js";import"./chunk-ICI7BO4Q.js";import"./chunk-V7UGKYBN.js";function L(i,t){if(i&1&&(a(0,"li")(1,"span",1),s(2),m(3,"date"),n(),s(4,"\xA0 "),x(5,"span",2),m(6,"safeHtml"),n()),i&2){let e=t.$implicit;r(2),w(v(3,2,e.time,"hh:mm:ss a")),r(3),h("innerHTML",y(6,5,e.message),d)}}var _=class i{logs=D.required();constructor(){}async shareLogs(){let t=this.logs().map(p=>`[${new Date(p.time).toLocaleString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3,hour12:!1,timeZoneName:"short"})}] ${p.message}`).join(`
2
- `),{getAPIResourceMetricsText:e}=await import("./resource-metrics-OOA42ELP.js"),o=e();if(o&&(t+=`
3
- `+o),M()&&navigator.share){navigator.share({text:t});return}navigator.clipboard.writeText(t),k("Copied to your clipboard")}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=l({type:i,selectors:[["cooee-debugger"]],inputs:{logs:[1,"logs"]},features:[c([S])],decls:5,vars:0,consts:[[1,"btn-copy",3,"click"],[2,"color","rgb(100, 116, 139)"],[3,"innerHTML"]],template:function(e,o){e&1&&(a(0,"ol"),u(1,L,7,7,"li",null,g),n(),a(3,"button",0),b("click",function(){return o.shareLogs()}),s(4,"Share"),n()),e&2&&(r(),f(o.logs()))},dependencies:[C,E],styles:[`:host{display:block;position:fixed;top:calc(100vh - 90px);left:10px;right:10px;width:auto;max-width:100%;min-width:calc(100vw - 20px);height:80px;background:#fff;z-index:111111111111;overflow-y:auto;font-size:13px;line-height:1.5;padding:5px;font-family:Arial,"sans-serif";font-weight:500;border:2px solid rgb(245,28,143);border-radius:6px;resize:both;-webkit-user-select:auto;user-select:auto;box-shadow:#0000001a 0 10px 15px -3px,#0000001a 0 4px 6px -4px}@media (min-width: 768px){:host{width:600px;min-width:auto}}ol{margin:0;padding:0 0 0 28px}.btn-copy{position:absolute;top:5px;right:5px;background:#f51c8f;border:none;cursor:pointer;padding:6px 8px;font-size:12px;font-weight:500;border-radius:6px;color:#fff}
4
- `],encapsulation:3})};export{_ as DebuggerComponent};
@@ -1,3 +0,0 @@
1
- import{a as s}from"./chunk-ICI7BO4Q.js";import"./chunk-V7UGKYBN.js";var h=["/v1/engagement/cart-widgets","/v1/engagement/page-widgets","/v1/event/validate-session"];function r(e){if(e===0)return"0 B";let o=1024,i=["B","KB","MB","GB"],t=Math.floor(Math.log(e)/Math.log(o));return`${(e/Math.pow(o,t)).toFixed(2)} ${i[t]}`}function g(){let e=performance.getEntriesByType?.("resource");return e?e.filter(o=>h.some(i=>o.name.includes(i))):[]}function S(e){let o=[],i=new URL(e.name).pathname;o.push(` URL: ${i}`),o.push(` Duration: ${s(e.duration)}`);let t=e.transferSize===0;if(o.push(` Served from: ${t?"Cache (disk/memory)":"Network"}`),!t){o.push(` Transfer size: ${r(e.transferSize)}`),o.push(` Encoded size: ${r(e.encodedBodySize)}`),o.push(` Decoded size: ${r(e.decodedBodySize)}`);let n=(1-e.encodedBodySize/e.decodedBodySize)*100;n>0&&o.push(` Compression ratio: ${n.toFixed(1)}%`)}let c=e.domainLookupEnd-e.domainLookupStart,u=e.connectEnd-e.connectStart,a=e.secureConnectionStart>0?e.connectEnd-e.secureConnectionStart:0,d=e.responseStart-e.requestStart,p=e.responseEnd-e.responseStart;o.push(" Timing breakdown:"),c>0&&o.push(` DNS lookup: ${s(c)}`),u>0&&o.push(` TCP connect: ${s(u)}`),a>0&&o.push(` SSL handshake: ${s(a)}`),d>0&&o.push(` Server waiting (TTFB): ${s(d)}`),p>0&&o.push(` Content download: ${s(p)}`);let m=e.serverTiming;if(m?.length){o.push(" Server-Timing:");for(let n of m){let f=n.description||n.name;n.duration>0?o.push(` ${f}: ${s(n.duration)}`):o.push(` ${f}: ${n.duration}`)}}return o.join(`
2
- `)}function l(){let e=g();if(!e.length)return"";let o=["","\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 API Resource Metrics \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550"];for(let i of e)o.push(""),o.push(S(i));return o.push("\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550"),o.join(`
3
- `)}export{r as formatBytes,g as getAPIResourceEntries,l as getAPIResourceMetricsText};