@letscooee/web-sdk 13.1.12 → 13.1.14

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,2 +0,0 @@
1
- import{$a as mt,B as ht,C as z,E as V,G as ct,I as dt,Kb as bt,Lb as Pt,Mb as T,Na as ft,Ob as S,Qb as St,Rb as v,Sb as yt,T as B,Ub as Rt,V as _t,Wb as Et,X as pt,Z as gt,a as w,b as A,c as _,ca as D,d as et,da as C,ea as ut,f as it,h as st,j as nt,k as F,l as rt,nb as vt,o as ot,ob as Dt,p as at,pb as wt,q as x,r as lt,s as H,u as P,v as d}from"./chunk-HC6OE5XR.js";function W(r){let t=r.cloneNode(!0),e=t.querySelectorAll("[id]"),i=r.nodeName.toLowerCase();t.removeAttribute("id");for(let s=0;s<e.length;s++)e[s].removeAttribute("id");return i==="canvas"?Ct(r,t):(i==="input"||i==="select"||i==="textarea")&&xt(r,t),It("canvas",r,t,Ct),It("input, textarea, select",r,t,xt),t}function It(r,t,e,i){let s=t.querySelectorAll(r);if(s.length){let n=e.querySelectorAll(r);for(let o=0;o<s.length;o++)i(s[o],n[o])}}var Xt=0;function xt(r,t){t.type!=="file"&&(t.value=r.value),t.type==="radio"&&t.name&&(t.name=`mat-clone-${t.name}-${Xt++}`)}function Ct(r,t){let e=t.getContext("2d");if(e)try{e.drawImage(r,0,0)}catch{}}function Y(r){let t=r.getBoundingClientRect();return{top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.width,height:t.height,x:t.x,y:t.y}}function Z(r,t,e){let{top:i,bottom:s,left:n,right:o}=r;return e>=i&&e<=s&&t>=n&&t<=o}function Jt(r,t){let e=t.left<r.left,i=t.left+t.width>r.right,s=t.top<r.top,n=t.top+t.height>r.bottom;return e||i||s||n}function E(r,t,e){r.top+=t,r.bottom=r.top+r.height,r.left+=e,r.right=r.left+r.width}function Tt(r,t,e,i){let{top:s,right:n,bottom:o,left:a,width:l,height:h}=r,c=l*t,g=h*t;return i>s-g&&i<o+g&&e>a-c&&e<n+c}var k=class{_document;positions=new Map;constructor(t){this._document=t}clear(){this.positions.clear()}cache(t){this.clear(),this.positions.set(this._document,{scrollPosition:this.getViewportScrollPosition()}),t.forEach(e=>{this.positions.set(e,{scrollPosition:{top:e.scrollTop,left:e.scrollLeft},clientRect:Y(e)})})}handleScroll(t){let e=S(t),i=this.positions.get(e);if(!i)return null;let s=i.scrollPosition,n,o;if(e===this._document){let h=this.getViewportScrollPosition();n=h.top,o=h.left}else n=e.scrollTop,o=e.scrollLeft;let a=s.top-n,l=s.left-o;return this.positions.forEach((h,c)=>{h.clientRect&&e!==c&&e.contains(c)&&E(h.clientRect,a,l)}),s.top=n,s.left=o,{top:a,left:l}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}};function Gt(r,t){let e=r.rootNodes;if(e.length===1&&e[0].nodeType===t.ELEMENT_NODE)return e[0];let i=t.createElement("div");return e.forEach(s=>i.appendChild(s)),i}function X(r,t,e){for(let i in t)if(t.hasOwnProperty(i)){let s=t[i];s?r.setProperty(i,s,e?.has(i)?"important":""):r.removeProperty(i)}return r}function b(r,t){let e=t?"":"none";X(r.style,{"touch-action":t?"":"none","-webkit-user-drag":t?"":"none","-webkit-tap-highlight-color":t?"":"transparent","user-select":e,"-ms-user-select":e,"-webkit-user-select":e,"-moz-user-select":e})}function kt(r,t,e){X(r.style,{position:t?"":"fixed",top:t?"":"0",opacity:t?"":"0",left:t?"":"-999em"},e)}function O(r,t){return t&&t!="none"?r+" "+t:r}function Ot(r,t){r.style.width=`${t.width}px`,r.style.height=`${t.height}px`,r.style.transform=I(t.left,t.top)}function I(r,t){return`translate3d(${Math.round(r)}px, ${Math.round(t)}px, 0)`}function Lt(r){let t=r.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(r)*t}function Qt(r){let t=getComputedStyle(r),e=G(t,"transition-property"),i=e.find(a=>a==="transform"||a==="all");if(!i)return 0;let s=e.indexOf(i),n=G(t,"transition-duration"),o=G(t,"transition-delay");return Lt(n[s])+Lt(o[s])}function G(r,t){return r.getPropertyValue(t).split(",").map(i=>i.trim())}var te=new Set(["position"]),j=class{_document;_rootElement;_direction;_initialDomRect;_previewTemplate;_previewClass;_pickupPositionOnPage;_initialTransform;_zIndex;_renderer;_previewEmbeddedView;_preview;get element(){return this._preview}constructor(t,e,i,s,n,o,a,l,h,c){this._document=t,this._rootElement=e,this._direction=i,this._initialDomRect=s,this._previewTemplate=n,this._previewClass=o,this._pickupPositionOnPage=a,this._initialTransform=l,this._zIndex=h,this._renderer=c}attach(t){this._preview=this._createPreview(),t.appendChild(this._preview),Nt(this._preview)&&this._preview.showPopover()}destroy(){this._preview.remove(),this._previewEmbeddedView?.destroy(),this._preview=this._previewEmbeddedView=null}setTransform(t){this._preview.style.transform=t}getBoundingClientRect(){return this._preview.getBoundingClientRect()}addClass(t){this._preview.classList.add(t)}getTransitionDuration(){return Qt(this._preview)}addEventListener(t,e){return this._renderer.listen(this._preview,t,e)}_createPreview(){let t=this._previewTemplate,e=this._previewClass,i=t?t.template:null,s;if(i&&t){let n=t.matchSize?this._initialDomRect:null,o=t.viewContainer.createEmbeddedView(i,t.context);o.detectChanges(),s=Gt(o,this._document),this._previewEmbeddedView=o,t.matchSize?Ot(s,n):s.style.transform=I(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else s=W(this._rootElement),Ot(s,this._initialDomRect),this._initialTransform&&(s.style.transform=this._initialTransform);return X(s.style,{"pointer-events":"none",margin:Nt(s)?"0 auto 0 0":"0",position:"fixed",top:"0",left:"0","z-index":this._zIndex+""},te),b(s,!1),s.classList.add("cdk-drag-preview"),s.setAttribute("popover","manual"),s.setAttribute("dir",this._direction),e&&(Array.isArray(e)?e.forEach(n=>s.classList.add(n)):s.classList.add(e)),s}};function Nt(r){return"showPopover"in r}var ee={passive:!0},Mt={passive:!1},ie={passive:!1,capture:!0},se=800,At="cdk-drag-placeholder",Ft=new Set(["position"]),q=class{_config;_document;_ngZone;_viewportRuler;_dragDropRegistry;_renderer;_rootElementCleanups;_cleanupShadowRootSelectStart;_preview;_previewContainer;_placeholderRef;_placeholder;_pickupPositionInElement;_pickupPositionOnPage;_marker;_anchor=null;_passiveTransform={x:0,y:0};_activeTransform={x:0,y:0};_initialTransform;_hasStartedDragging=V(!1);_hasMoved;_initialContainer;_initialIndex;_parentPositions;_moveEvents=new _;_pointerDirectionDelta;_pointerPositionAtLastDirectionChange;_lastKnownPointerPosition;_rootElement;_ownerSVGElement;_rootElementTapHighlight;_pointerMoveSubscription=w.EMPTY;_pointerUpSubscription=w.EMPTY;_scrollSubscription=w.EMPTY;_resizeSubscription=w.EMPTY;_lastTouchEventTime;_dragStartTime;_boundaryElement=null;_nativeInteractionsEnabled=!0;_initialDomRect;_previewRect;_boundaryRect;_previewTemplate;_placeholderTemplate;_handles=[];_disabledHandles=new Set;_dropContainer;_direction="ltr";_parentDragRef;_cachedShadowRoot;lockAxis;dragStartDelay=0;previewClass;scale=1;get disabled(){return this._disabled||!!(this._dropContainer&&this._dropContainer.disabled)}set disabled(t){t!==this._disabled&&(this._disabled=t,this._toggleNativeDragInteractions(),this._handles.forEach(e=>b(e,t)))}_disabled=!1;beforeStarted=new _;started=new _;released=new _;ended=new _;entered=new _;exited=new _;dropped=new _;moved=this._moveEvents;data;constrainPosition;constructor(t,e,i,s,n,o,a){this._config=e,this._document=i,this._ngZone=s,this._viewportRuler=n,this._dragDropRegistry=o,this._renderer=a,this.withRootElement(t).withParent(e.parentDragRef||null),this._parentPositions=new k(i),o.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(t){this._handles=t.map(i=>v(i)),this._handles.forEach(i=>b(i,this.disabled)),this._toggleNativeDragInteractions();let e=new Set;return this._disabledHandles.forEach(i=>{this._handles.indexOf(i)>-1&&e.add(i)}),this._disabledHandles=e,this}withPreviewTemplate(t){return this._previewTemplate=t,this}withPlaceholderTemplate(t){return this._placeholderTemplate=t,this}withRootElement(t){let e=v(t);if(e!==this._rootElement){this._removeRootElementListeners();let i=this._renderer;this._rootElementCleanups=this._ngZone.runOutsideAngular(()=>[i.listen(e,"mousedown",this._pointerDown,Mt),i.listen(e,"touchstart",this._pointerDown,ee),i.listen(e,"dragstart",this._nativeDragStart,Mt)]),this._initialTransform=void 0,this._rootElement=e}return typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(t){return this._boundaryElement=t?v(t):null,this._resizeSubscription.unsubscribe(),t&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(t){return this._parentDragRef=t,this}dispose(){this._removeRootElementListeners(),this.isDragging()&&this._rootElement?.remove(),this._marker?.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeListeners(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._marker=this._parentDragRef=null}isDragging(){return this._hasStartedDragging()&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}resetToBoundary(){if(this._boundaryElement&&this._rootElement&&Jt(this._boundaryElement.getBoundingClientRect(),this._rootElement.getBoundingClientRect())){let t=this._boundaryElement.getBoundingClientRect(),e=this._rootElement.getBoundingClientRect(),i=0,s=0;e.left<t.left?i=t.left-e.left:e.right>t.right&&(i=t.right-e.right),e.top<t.top?s=t.top-e.top:e.bottom>t.bottom&&(s=t.bottom-e.bottom);let n=this._activeTransform.x,o=this._activeTransform.y,a=n+i,l=o+s;this._rootElement.style.transform=I(a,l),this._activeTransform={x:a,y:l},this._passiveTransform={x:a,y:l}}}disableHandle(t){!this._disabledHandles.has(t)&&this._handles.indexOf(t)>-1&&(this._disabledHandles.add(t),b(t,!0))}enableHandle(t){this._disabledHandles.has(t)&&(this._disabledHandles.delete(t),b(t,this.disabled))}withDirection(t){return this._direction=t,this}_withDropContainer(t){this._dropContainer=t}getFreeDragPosition(){let t=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:t.x,y:t.y}}setFreeDragPosition(t){return this._activeTransform={x:0,y:0},this._passiveTransform.x=t.x,this._passiveTransform.y=t.y,this._dropContainer||this._applyRootElementTransform(t.x,t.y),this}withPreviewContainer(t){return this._previewContainer=t,this}_sortFromLastPointerPosition(){let t=this._lastKnownPointerPosition;t&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(t),t)}_removeListeners(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe(),this._cleanupShadowRootSelectStart?.(),this._cleanupShadowRootSelectStart=void 0}_destroyPreview(){this._preview?.destroy(),this._preview=null}_destroyPlaceholder(){this._anchor?.remove(),this._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._anchor=this._placeholderRef=null}_pointerDown=t=>{if(this.beforeStarted.next(),this._handles.length){let e=this._getTargetHandle(t);e&&!this._disabledHandles.has(e)&&!this.disabled&&this._initializeDragSequence(e,t)}else this.disabled||this._initializeDragSequence(this._rootElement,t)};_pointerMove=t=>{let e=this._getPointerPositionOnPage(t);if(!this._hasStartedDragging()){let s=Math.abs(e.x-this._pickupPositionOnPage.x),n=Math.abs(e.y-this._pickupPositionOnPage.y);if(s+n>=this._config.dragStartThreshold){let a=Date.now()>=this._dragStartTime+this._getDragStartDelay(t),l=this._dropContainer;if(!a){this._endDragSequence(t);return}(!l||!l.isDragging()&&!l.isReceiving())&&(t.cancelable&&t.preventDefault(),this._hasStartedDragging.set(!0),this._ngZone.run(()=>this._startDragSequence(t)))}return}t.cancelable&&t.preventDefault();let i=this._getConstrainedPointerPosition(e);if(this._hasMoved=!0,this._lastKnownPointerPosition=e,this._updatePointerDirectionDelta(i),this._dropContainer)this._updateActiveDropContainer(i,e);else{let s=this.constrainPosition?this._initialDomRect:this._pickupPositionOnPage,n=this._activeTransform;n.x=i.x-s.x+this._passiveTransform.x,n.y=i.y-s.y+this._passiveTransform.y,this._applyRootElementTransform(n.x,n.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:i,event:t,distance:this._getDragDistance(i),delta:this._pointerDirectionDelta})})};_pointerUp=t=>{this._endDragSequence(t)};_endDragSequence(t){if(this._dragDropRegistry.isDragging(this)&&(this._removeListeners(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),!!this._hasStartedDragging()))if(this.released.next({source:this,event:t}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(t),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;let e=this._getPointerPositionOnPage(t);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(e),dropPoint:e,event:t})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(t){y(t)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();let e=this._getShadowRoot(),i=this._dropContainer;if(e&&this._ngZone.runOutsideAngular(()=>{this._cleanupShadowRootSelectStart=this._renderer.listen(e,"selectstart",ne,ie)}),i){let s=this._rootElement,n=s.parentNode,o=this._placeholder=this._createPlaceholderElement(),a=this._marker=this._marker||this._document.createComment("");n.insertBefore(a,s),this._initialTransform=s.style.transform||"",this._preview=new j(this._document,this._rootElement,this._direction,this._initialDomRect,this._previewTemplate||null,this.previewClass||null,this._pickupPositionOnPage,this._initialTransform,this._config.zIndex||1e3,this._renderer),this._preview.attach(this._getPreviewInsertionPoint(n,e)),kt(s,!1,Ft),this._document.body.appendChild(n.replaceChild(o,s)),this.started.next({source:this,event:t}),i.start(),this._initialContainer=i,this._initialIndex=i.getItemIndex(this)}else this.started.next({source:this,event:t}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(i?i.getScrollableParents():[])}_initializeDragSequence(t,e){this._parentDragRef&&e.stopPropagation();let i=this.isDragging(),s=y(e),n=!s&&e.button!==0,o=this._rootElement,a=S(e),l=!s&&this._lastTouchEventTime&&this._lastTouchEventTime+se>Date.now(),h=s?Pt(e):bt(e);if(a&&a.draggable&&e.type==="mousedown"&&e.preventDefault(),i||n||l||h)return;if(this._handles.length){let m=o.style;this._rootElementTapHighlight=m.webkitTapHighlightColor||"",m.webkitTapHighlightColor="transparent"}this._hasMoved=!1,this._hasStartedDragging.set(this._hasMoved),this._removeListeners(),this._initialDomRect=this._rootElement.getBoundingClientRect(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(m=>this._updateOnScroll(m)),this._boundaryElement&&(this._boundaryRect=Y(this._boundaryElement));let c=this._previewTemplate;this._pickupPositionInElement=c&&c.template&&!c.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialDomRect,t,e);let g=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(e);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:g.x,y:g.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,e)}_cleanupDragArtifacts(t){kt(this._rootElement,!0,Ft),this._marker.parentNode.replaceChild(this._rootElement,this._marker),this._destroyPreview(),this._destroyPlaceholder(),this._initialDomRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{let e=this._dropContainer,i=e.getItemIndex(this),s=this._getPointerPositionOnPage(t),n=this._getDragDistance(s),o=e._isOverContainer(s.x,s.y);this.ended.next({source:this,distance:n,dropPoint:s,event:t}),this.dropped.next({item:this,currentIndex:i,previousIndex:this._initialIndex,container:e,previousContainer:this._initialContainer,isPointerOverContainer:o,distance:n,dropPoint:s,event:t}),e.drop(this,i,this._initialIndex,this._initialContainer,o,n,s,t),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:t,y:e},{x:i,y:s}){let n=this._initialContainer._getSiblingContainerFromPosition(this,t,e);!n&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(t,e)&&(n=this._initialContainer),n&&n!==this._dropContainer&&this._ngZone.run(()=>{let o=this._dropContainer.getItemIndex(this),a=this._dropContainer.getItemAtIndex(o+1)?.getVisibleElement()||null;this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._conditionallyInsertAnchor(n,this._dropContainer,a),this._dropContainer=n,this._dropContainer.enter(this,t,e,n===this._initialContainer&&n.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:n,currentIndex:n.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(i,s),this._dropContainer._sortItem(this,t,e,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(t,e):this._applyPreviewTransform(t-this._pickupPositionInElement.x,e-this._pickupPositionInElement.y))}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();let t=this._placeholder.getBoundingClientRect();this._preview.addClass("cdk-drag-animating"),this._applyPreviewTransform(t.left,t.top);let e=this._preview.getTransitionDuration();return e===0?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(i=>{let s=a=>{(!a||this._preview&&S(a)===this._preview.element&&a.propertyName==="transform")&&(o(),i(),clearTimeout(n))},n=setTimeout(s,e*1.5),o=this._preview.addEventListener("transitionend",s)}))}_createPlaceholderElement(){let t=this._placeholderTemplate,e=t?t.template:null,i;return e?(this._placeholderRef=t.viewContainer.createEmbeddedView(e,t.context),this._placeholderRef.detectChanges(),i=Gt(this._placeholderRef,this._document)):i=W(this._rootElement),i.style.pointerEvents="none",i.classList.add(At),i}_getPointerPositionInElement(t,e,i){let s=e===this._rootElement?null:e,n=s?s.getBoundingClientRect():t,o=y(i)?i.targetTouches[0]:i,a=this._getViewportScrollPosition(),l=o.pageX-n.left-a.left,h=o.pageY-n.top-a.top;return{x:n.left-t.left+l,y:n.top-t.top+h}}_getPointerPositionOnPage(t){let e=this._getViewportScrollPosition(),i=y(t)?t.touches[0]||t.changedTouches[0]||{pageX:0,pageY:0}:t,s=i.pageX-e.left,n=i.pageY-e.top;if(this._ownerSVGElement){let o=this._ownerSVGElement.getScreenCTM();if(o){let a=this._ownerSVGElement.createSVGPoint();return a.x=s,a.y=n,a.matrixTransform(o.inverse())}}return{x:s,y:n}}_getConstrainedPointerPosition(t){let e=this._dropContainer?this._dropContainer.lockAxis:null,{x:i,y:s}=this.constrainPosition?this.constrainPosition(t,this,this._initialDomRect,this._pickupPositionInElement):t;if(this.lockAxis==="x"||e==="x"?s=this._pickupPositionOnPage.y-(this.constrainPosition?this._pickupPositionInElement.y:0):(this.lockAxis==="y"||e==="y")&&(i=this._pickupPositionOnPage.x-(this.constrainPosition?this._pickupPositionInElement.x:0)),this._boundaryRect){let{x:n,y:o}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,a=this._boundaryRect,{width:l,height:h}=this._getPreviewRect(),c=a.top+o,g=a.bottom-(h-o),m=a.left+n,N=a.right-(l-n);i=Ht(i,m,N),s=Ht(s,c,g)}return{x:i,y:s}}_updatePointerDirectionDelta(t){let{x:e,y:i}=t,s=this._pointerDirectionDelta,n=this._pointerPositionAtLastDirectionChange,o=Math.abs(e-n.x),a=Math.abs(i-n.y);return o>this._config.pointerDirectionChangeThreshold&&(s.x=e>n.x?1:-1,n.x=e),a>this._config.pointerDirectionChangeThreshold&&(s.y=i>n.y?1:-1,n.y=i),s}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;let t=this._handles.length>0||!this.isDragging();t!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=t,b(this._rootElement,t))}_removeRootElementListeners(){this._rootElementCleanups?.forEach(t=>t()),this._rootElementCleanups=void 0}_applyRootElementTransform(t,e){let i=1/this.scale,s=I(t*i,e*i),n=this._rootElement.style;this._initialTransform==null&&(this._initialTransform=n.transform&&n.transform!="none"?n.transform:""),n.transform=O(s,this._initialTransform)}_applyPreviewTransform(t,e){let i=this._previewTemplate?.template?void 0:this._initialTransform,s=I(t,e);this._preview.setTransform(O(s,i))}_getDragDistance(t){let e=this._pickupPositionOnPage;return e?{x:t.x-e.x,y:t.y-e.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:t,y:e}=this._passiveTransform;if(t===0&&e===0||this.isDragging()||!this._boundaryElement)return;let i=this._rootElement.getBoundingClientRect(),s=this._boundaryElement.getBoundingClientRect();if(s.width===0&&s.height===0||i.width===0&&i.height===0)return;let n=s.left-i.left,o=i.right-s.right,a=s.top-i.top,l=i.bottom-s.bottom;s.width>i.width?(n>0&&(t+=n),o>0&&(t-=o)):t=0,s.height>i.height?(a>0&&(e+=a),l>0&&(e-=l)):e=0,(t!==this._passiveTransform.x||e!==this._passiveTransform.y)&&this.setFreeDragPosition({y:e,x:t})}_getDragStartDelay(t){let e=this.dragStartDelay;return typeof e=="number"?e:y(t)?e.touch:e?e.mouse:0}_updateOnScroll(t){let e=this._parentPositions.handleScroll(t);if(e){let i=S(t);this._boundaryRect&&i!==this._boundaryElement&&i.contains(this._boundaryElement)&&E(this._boundaryRect,e.top,e.left),this._pickupPositionOnPage.x+=e.left,this._pickupPositionOnPage.y+=e.top,this._dropContainer||(this._activeTransform.x-=e.left,this._activeTransform.y-=e.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){return this._parentPositions.positions.get(this._document)?.scrollPosition||this._parentPositions.getViewportScrollPosition()}_getShadowRoot(){return this._cachedShadowRoot===void 0&&(this._cachedShadowRoot=T(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(t,e){let i=this._previewContainer||"global";if(i==="parent")return t;if(i==="global"){let s=this._document;return e||s.fullscreenElement||s.webkitFullscreenElement||s.mozFullScreenElement||s.msFullscreenElement||s.body}return v(i)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialDomRect),this._previewRect}_nativeDragStart=t=>{if(this._handles.length){let e=this._getTargetHandle(t);e&&!this._disabledHandles.has(e)&&!this.disabled&&t.preventDefault()}else this.disabled||t.preventDefault()};_getTargetHandle(t){return this._handles.find(e=>t.target&&(t.target===e||e.contains(t.target)))}_conditionallyInsertAnchor(t,e,i){if(t===this._initialContainer)this._anchor?.remove(),this._anchor=null;else if(e===this._initialContainer&&e.hasAnchor){let s=this._anchor??=W(this._placeholder);s.classList.remove(At),s.classList.add("cdk-drag-anchor"),s.style.transform="",i?i.before(s):v(e.element).appendChild(s)}}};function Ht(r,t,e){return Math.max(t,Math.min(e,r))}function y(r){return r.type[0]==="t"}function ne(r){r.preventDefault()}function Ut(r,t,e){let i=zt(t,r.length-1),s=zt(e,r.length-1);if(i===s)return;let n=r[i],o=s<i?-1:1;for(let a=i;a!==s;a+=o)r[a]=r[a+o];r[s]=n}function zt(r,t){return Math.max(0,Math.min(t,r))}var L=class{_dragDropRegistry;_element;_sortPredicate;_itemPositions=[];_activeDraggables;orientation="vertical";direction;constructor(t){this._dragDropRegistry=t}_previousSwap={drag:null,delta:0,overlaps:!1};start(t){this.withItems(t)}sort(t,e,i,s){let n=this._itemPositions,o=this._getItemIndexFromPointerPosition(t,e,i,s);if(o===-1&&n.length>0)return null;let a=this.orientation==="horizontal",l=n.findIndex(u=>u.drag===t),h=n[o],c=n[l].clientRect,g=h.clientRect,m=l>o?1:-1,N=this._getItemOffsetPx(c,g,m),$t=this._getSiblingOffsetPx(l,n,m),Kt=n.slice();return Ut(n,l,o),n.forEach((u,Yt)=>{if(Kt[Yt]===u)return;let J=u.drag===t,M=J?N:$t,Q=J?t.getPlaceholderElement():u.drag.getRootElement();u.offset+=M;let tt=Math.round(u.offset*(1/u.drag.scale));a?(Q.style.transform=O(`translate3d(${tt}px, 0, 0)`,u.initialTransform),E(u.clientRect,0,M)):(Q.style.transform=O(`translate3d(0, ${tt}px, 0)`,u.initialTransform),E(u.clientRect,M,0))}),this._previousSwap.overlaps=Z(g,e,i),this._previousSwap.drag=h.drag,this._previousSwap.delta=a?s.x:s.y,{previousIndex:l,currentIndex:o}}enter(t,e,i,s){let n=s==null||s<0?this._getItemIndexFromPointerPosition(t,e,i):s,o=this._activeDraggables,a=o.indexOf(t),l=t.getPlaceholderElement(),h=o[n];if(h===t&&(h=o[n+1]),!h&&(n==null||n===-1||n<o.length-1)&&this._shouldEnterAsFirstChild(e,i)&&(h=o[0]),a>-1&&o.splice(a,1),h&&!this._dragDropRegistry.isDragging(h)){let c=h.getRootElement();c.parentElement.insertBefore(l,c),o.splice(n,0,t)}else this._element.appendChild(l),o.push(t);l.style.transform="",this._cacheItemPositions()}withItems(t){this._activeDraggables=t.slice(),this._cacheItemPositions()}withSortPredicate(t){this._sortPredicate=t}reset(){this._activeDraggables?.forEach(t=>{let e=t.getRootElement();if(e){let i=this._itemPositions.find(s=>s.drag===t)?.initialTransform;e.style.transform=i||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(t){return this._getVisualItemPositions().findIndex(e=>e.drag===t)}getItemAtIndex(t){return this._getVisualItemPositions()[t]?.drag||null}updateOnScroll(t,e){this._itemPositions.forEach(({clientRect:i})=>{E(i,t,e)}),this._itemPositions.forEach(({drag:i})=>{this._dragDropRegistry.isDragging(i)&&i._sortFromLastPointerPosition()})}withElementContainer(t){this._element=t}_cacheItemPositions(){let t=this.orientation==="horizontal";this._itemPositions=this._activeDraggables.map(e=>{let i=e.getVisibleElement();return{drag:e,offset:0,initialTransform:i.style.transform||"",clientRect:Y(i)}}).sort((e,i)=>t?e.clientRect.left-i.clientRect.left:e.clientRect.top-i.clientRect.top)}_getVisualItemPositions(){return this.orientation==="horizontal"&&this.direction==="rtl"?this._itemPositions.slice().reverse():this._itemPositions}_getItemOffsetPx(t,e,i){let s=this.orientation==="horizontal",n=s?e.left-t.left:e.top-t.top;return i===-1&&(n+=s?e.width-t.width:e.height-t.height),n}_getSiblingOffsetPx(t,e,i){let s=this.orientation==="horizontal",n=e[t].clientRect,o=e[t+i*-1],a=n[s?"width":"height"]*i;if(o){let l=s?"left":"top",h=s?"right":"bottom";i===-1?a-=o.clientRect[l]-n[h]:a+=n[l]-o.clientRect[h]}return a}_shouldEnterAsFirstChild(t,e){if(!this._activeDraggables.length)return!1;let i=this._itemPositions,s=this.orientation==="horizontal";if(i[0].drag!==this._activeDraggables[0]){let o=i[i.length-1].clientRect;return s?t>=o.right:e>=o.bottom}else{let o=i[0].clientRect;return s?t<=o.left:e<=o.top}}_getItemIndexFromPointerPosition(t,e,i,s){let n=this.orientation==="horizontal",o=this._itemPositions.findIndex(({drag:a,clientRect:l})=>{if(a===t)return!1;if(s){let h=n?s.x:s.y;if(a===this._previousSwap.drag&&this._previousSwap.overlaps&&h===this._previousSwap.delta)return!1}return n?e>=Math.floor(l.left)&&e<Math.floor(l.right):i>=Math.floor(l.top)&&i<Math.floor(l.bottom)});return o===-1||!this._sortPredicate(o,t)?-1:o}},$=class{_document;_dragDropRegistry;_element;_sortPredicate;_rootNode;_activeItems;_previousSwap={drag:null,deltaX:0,deltaY:0,overlaps:!1};_relatedNodes=[];constructor(t,e){this._document=t,this._dragDropRegistry=e}start(t){let e=this._element.childNodes;this._relatedNodes=[];for(let i=0;i<e.length;i++){let s=e[i];this._relatedNodes.push([s,s.nextSibling])}this.withItems(t)}sort(t,e,i,s){let n=this._getItemIndexFromPointerPosition(t,e,i),o=this._previousSwap;if(n===-1||this._activeItems[n]===t)return null;let a=this._activeItems[n];if(o.drag===a&&o.overlaps&&o.deltaX===s.x&&o.deltaY===s.y)return null;let l=this.getItemIndex(t),h=t.getPlaceholderElement(),c=a.getRootElement();n>l?c.after(h):c.before(h),Ut(this._activeItems,l,n);let g=this._getRootNode().elementFromPoint(e,i);return o.deltaX=s.x,o.deltaY=s.y,o.drag=a,o.overlaps=c===g||c.contains(g),{previousIndex:l,currentIndex:n}}enter(t,e,i,s){let n=this._activeItems.indexOf(t);n>-1&&this._activeItems.splice(n,1);let o=s==null||s<0?this._getItemIndexFromPointerPosition(t,e,i):s;o===-1&&(o=this._getClosestItemIndexToPointer(t,e,i));let a=this._activeItems[o];a&&!this._dragDropRegistry.isDragging(a)?(this._activeItems.splice(o,0,t),a.getRootElement().before(t.getPlaceholderElement())):(this._activeItems.push(t),this._element.appendChild(t.getPlaceholderElement()))}withItems(t){this._activeItems=t.slice()}withSortPredicate(t){this._sortPredicate=t}reset(){let t=this._element,e=this._previousSwap;for(let i=this._relatedNodes.length-1;i>-1;i--){let[s,n]=this._relatedNodes[i];s.parentNode===t&&s.nextSibling!==n&&(n===null?t.appendChild(s):n.parentNode===t&&t.insertBefore(s,n))}this._relatedNodes=[],this._activeItems=[],e.drag=null,e.deltaX=e.deltaY=0,e.overlaps=!1}getActiveItemsSnapshot(){return this._activeItems}getItemIndex(t){return this._activeItems.indexOf(t)}getItemAtIndex(t){return this._activeItems[t]||null}updateOnScroll(){this._activeItems.forEach(t=>{this._dragDropRegistry.isDragging(t)&&t._sortFromLastPointerPosition()})}withElementContainer(t){t!==this._element&&(this._element=t,this._rootNode=void 0)}_getItemIndexFromPointerPosition(t,e,i){let s=this._getRootNode().elementFromPoint(Math.floor(e),Math.floor(i)),n=s?this._activeItems.findIndex(o=>{let a=o.getRootElement();return s===a||a.contains(s)}):-1;return n===-1||!this._sortPredicate(n,t)?-1:n}_getRootNode(){return this._rootNode||(this._rootNode=T(this._element)||this._document),this._rootNode}_getClosestItemIndexToPointer(t,e,i){if(this._activeItems.length===0)return-1;if(this._activeItems.length===1)return 0;let s=1/0,n=-1;for(let o=0;o<this._activeItems.length;o++){let a=this._activeItems[o];if(a!==t){let{x:l,y:h}=a.getRootElement().getBoundingClientRect(),c=Math.hypot(e-l,i-h);c<s&&(s=c,n=o)}}return n}},Vt=.05,Wt=.05,f=(function(r){return r[r.NONE=0]="NONE",r[r.UP=1]="UP",r[r.DOWN=2]="DOWN",r})(f||{}),p=(function(r){return r[r.NONE=0]="NONE",r[r.LEFT=1]="LEFT",r[r.RIGHT=2]="RIGHT",r})(p||{}),K=class{_dragDropRegistry;_ngZone;_viewportRuler;element;disabled=!1;sortingDisabled=!1;lockAxis;autoScrollDisabled=!1;autoScrollStep=2;hasAnchor=!1;enterPredicate=()=>!0;sortPredicate=()=>!0;beforeStarted=new _;entered=new _;exited=new _;dropped=new _;sorted=new _;receivingStarted=new _;receivingStopped=new _;data;_container;_isDragging=!1;_parentPositions;_sortStrategy;_domRect;_draggables=[];_siblings=[];_activeSiblings=new Set;_viewportScrollSubscription=w.EMPTY;_verticalScrollDirection=f.NONE;_horizontalScrollDirection=p.NONE;_scrollNode;_stopScrollTimers=new _;_cachedShadowRoot=null;_document;_scrollableElements=[];_initialScrollSnap;_direction="ltr";constructor(t,e,i,s,n){this._dragDropRegistry=e,this._ngZone=s,this._viewportRuler=n;let o=this.element=v(t);this._document=i,this.withOrientation("vertical").withElementContainer(o),e.registerDropContainer(this),this._parentPositions=new k(i)}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this.receivingStarted.complete(),this.receivingStopped.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(t,e,i,s){this._draggingStarted(),s==null&&this.sortingDisabled&&(s=this._draggables.indexOf(t)),this._sortStrategy.enter(t,e,i,s),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:t,container:this,currentIndex:this.getItemIndex(t)})}exit(t){this._reset(),this.exited.next({item:t,container:this})}drop(t,e,i,s,n,o,a,l={}){this._reset(),this.dropped.next({item:t,currentIndex:e,previousIndex:i,container:this,previousContainer:s,isPointerOverContainer:n,distance:o,dropPoint:a,event:l})}withItems(t){let e=this._draggables;return this._draggables=t,t.forEach(i=>i._withDropContainer(this)),this.isDragging()&&(e.filter(s=>s.isDragging()).every(s=>t.indexOf(s)===-1)?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(t){return this._direction=t,this._sortStrategy instanceof L&&(this._sortStrategy.direction=t),this}connectedTo(t){return this._siblings=t.slice(),this}withOrientation(t){if(t==="mixed")this._sortStrategy=new $(this._document,this._dragDropRegistry);else{let e=new L(this._dragDropRegistry);e.direction=this._direction,e.orientation=t,this._sortStrategy=e}return this._sortStrategy.withElementContainer(this._container),this._sortStrategy.withSortPredicate((e,i)=>this.sortPredicate(e,i,this)),this}withScrollableParents(t){let e=this._container;return this._scrollableElements=t.indexOf(e)===-1?[e,...t]:t.slice(),this}withElementContainer(t){if(t===this._container)return this;let e=v(this.element),i=this._scrollableElements.indexOf(this._container),s=this._scrollableElements.indexOf(t);return i>-1&&this._scrollableElements.splice(i,1),s>-1&&this._scrollableElements.splice(s,1),this._sortStrategy&&this._sortStrategy.withElementContainer(t),this._cachedShadowRoot=null,this._scrollableElements.unshift(t),this._container=t,this}getScrollableParents(){return this._scrollableElements}getItemIndex(t){return this._isDragging?this._sortStrategy.getItemIndex(t):this._draggables.indexOf(t)}getItemAtIndex(t){return this._isDragging?this._sortStrategy.getItemAtIndex(t):this._draggables[t]||null}isReceiving(){return this._activeSiblings.size>0}_sortItem(t,e,i,s){if(this.sortingDisabled||!this._domRect||!Tt(this._domRect,Vt,e,i))return;let n=this._sortStrategy.sort(t,e,i,s);n&&this.sorted.next({previousIndex:n.previousIndex,currentIndex:n.currentIndex,container:this,item:t})}_startScrollingIfNecessary(t,e){if(this.autoScrollDisabled)return;let i,s=f.NONE,n=p.NONE;if(this._parentPositions.positions.forEach((o,a)=>{a===this._document||!o.clientRect||i||Tt(o.clientRect,Vt,t,e)&&([s,n]=re(a,o.clientRect,this._direction,t,e),(s||n)&&(i=a))}),!s&&!n){let{width:o,height:a}=this._viewportRuler.getViewportSize(),l={width:o,height:a,top:0,right:o,bottom:a,left:0};s=Zt(l,e),n=jt(l,t),i=window}i&&(s!==this._verticalScrollDirection||n!==this._horizontalScrollDirection||i!==this._scrollNode)&&(this._verticalScrollDirection=s,this._horizontalScrollDirection=n,this._scrollNode=i,(s||n)&&i?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){let t=this._container.style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=t.msScrollSnapType||t.scrollSnapType||"",t.scrollSnapType=t.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){this._parentPositions.cache(this._scrollableElements),this._domRect=this._parentPositions.positions.get(this._container).clientRect}_reset(){this._isDragging=!1;let t=this._container.style;t.scrollSnapType=t.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(e=>e._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_startScrollInterval=()=>{this._stopScrolling(),nt(0,it).pipe(x(this._stopScrollTimers)).subscribe(()=>{let t=this._scrollNode,e=this.autoScrollStep;this._verticalScrollDirection===f.UP?t.scrollBy(0,-e):this._verticalScrollDirection===f.DOWN&&t.scrollBy(0,e),this._horizontalScrollDirection===p.LEFT?t.scrollBy(-e,0):this._horizontalScrollDirection===p.RIGHT&&t.scrollBy(e,0)})};_isOverContainer(t,e){return this._domRect!=null&&Z(this._domRect,t,e)}_getSiblingContainerFromPosition(t,e,i){return this._siblings.find(s=>s._canReceive(t,e,i))}_canReceive(t,e,i){if(!this._domRect||!Z(this._domRect,e,i)||!this.enterPredicate(t,this))return!1;let s=this._getShadowRoot().elementFromPoint(e,i);return s?s===this._container||this._container.contains(s):!1}_startReceiving(t,e){let i=this._activeSiblings;!i.has(t)&&e.every(s=>this.enterPredicate(s,this)||this._draggables.indexOf(s)>-1)&&(i.add(t),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:t,receiver:this,items:e}))}_stopReceiving(t){this._activeSiblings.delete(t),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:t,receiver:this})}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(t=>{if(this.isDragging()){let e=this._parentPositions.handleScroll(t);e&&this._sortStrategy.updateOnScroll(e.top,e.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){let t=T(this._container);this._cachedShadowRoot=t||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){let t=this._sortStrategy.getActiveItemsSnapshot().filter(e=>e.isDragging());this._siblings.forEach(e=>e._startReceiving(this,t))}};function Zt(r,t){let{top:e,bottom:i,height:s}=r,n=s*Wt;return t>=e-n&&t<=e+n?f.UP:t>=i-n&&t<=i+n?f.DOWN:f.NONE}function jt(r,t){let{left:e,right:i,width:s}=r,n=s*Wt;return t>=e-n&&t<=e+n?p.LEFT:t>=i-n&&t<=i+n?p.RIGHT:p.NONE}function re(r,t,e,i,s){let n=Zt(t,s),o=jt(t,i),a=f.NONE,l=p.NONE;if(n){let h=r.scrollTop;n===f.UP?h>0&&(a=f.UP):r.scrollHeight-h>r.clientHeight&&(a=f.DOWN)}if(o){let h=r.scrollLeft;e==="rtl"?o===p.RIGHT?h<0&&(l=p.RIGHT):r.scrollWidth+h>r.clientWidth&&(l=p.LEFT):o===p.LEFT?h>0&&(l=p.LEFT):r.scrollWidth-h>r.clientWidth&&(l=p.RIGHT)}return[a,l]}var R={capture:!0},U={passive:!1,capture:!0},oe=(()=>{class r{static \u0275fac=function(i){return new(i||r)};static \u0275cmp=pt({type:r,selectors:[["ng-component"]],hostAttrs:["cdk-drag-resets-container",""],decls:0,vars:0,template:function(i,s){},styles:[`@layer cdk-resets{.cdk-drag-preview{background:none;border:none;padding:0;color:inherit;inset:auto}}.cdk-drag-placeholder *,.cdk-drag-preview *{pointer-events:none !important}
2
- `],encapsulation:2,changeDetection:0})}return r})(),qt=(()=>{class r{_ngZone=d(C);_document=d(z);_styleLoader=d(yt);_renderer=d(B).createRenderer(null,null);_cleanupDocumentTouchmove;_scroll=new _;_dropInstances=new Set;_dragInstances=new Set;_activeDragInstances=V([]);_globalListeners;_draggingPredicate=e=>e.isDragging();_domNodesToDirectives=null;pointerMove=new _;pointerUp=new _;constructor(){}registerDropContainer(e){this._dropInstances.has(e)||this._dropInstances.add(e)}registerDragItem(e){this._dragInstances.add(e),this._dragInstances.size===1&&this._ngZone.runOutsideAngular(()=>{this._cleanupDocumentTouchmove?.(),this._cleanupDocumentTouchmove=this._renderer.listen(this._document,"touchmove",this._persistentTouchmoveListener,U)})}removeDropContainer(e){this._dropInstances.delete(e)}removeDragItem(e){this._dragInstances.delete(e),this.stopDragging(e),this._dragInstances.size===0&&this._cleanupDocumentTouchmove?.()}startDragging(e,i){if(!(this._activeDragInstances().indexOf(e)>-1)&&(this._styleLoader.load(oe),this._activeDragInstances.update(s=>[...s,e]),this._activeDragInstances().length===1)){let s=i.type.startsWith("touch"),n=a=>this.pointerUp.next(a),o=[["scroll",a=>this._scroll.next(a),R],["selectstart",this._preventDefaultWhileDragging,U]];s?o.push(["touchend",n,R],["touchcancel",n,R]):o.push(["mouseup",n,R]),s||o.push(["mousemove",a=>this.pointerMove.next(a),U]),this._ngZone.runOutsideAngular(()=>{this._globalListeners=o.map(([a,l,h])=>this._renderer.listen(this._document,a,l,h))})}}stopDragging(e){this._activeDragInstances.update(i=>{let s=i.indexOf(e);return s>-1?(i.splice(s,1),[...i]):i}),this._activeDragInstances().length===0&&this._clearGlobalListeners()}isDragging(e){return this._activeDragInstances().indexOf(e)>-1}scrolled(e){let i=[this._scroll];return e&&e!==this._document&&i.push(new A(s=>this._ngZone.runOutsideAngular(()=>{let n=this._renderer.listen(e,"scroll",o=>{this._activeDragInstances().length&&s.next(o)},R);return()=>{n()}}))),F(...i)}registerDirectiveNode(e,i){this._domNodesToDirectives??=new WeakMap,this._domNodesToDirectives.set(e,i)}removeDirectiveNode(e){this._domNodesToDirectives?.delete(e)}getDragDirectiveForNode(e){return this._domNodesToDirectives?.get(e)||null}ngOnDestroy(){this._dragInstances.forEach(e=>this.removeDragItem(e)),this._dropInstances.forEach(e=>this.removeDropContainer(e)),this._domNodesToDirectives=null,this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_preventDefaultWhileDragging=e=>{this._activeDragInstances().length>0&&e.preventDefault()};_persistentTouchmoveListener=e=>{this._activeDragInstances().length>0&&(this._activeDragInstances().some(this._draggingPredicate)&&e.preventDefault(),this.pointerMove.next(e))};_clearGlobalListeners(){this._globalListeners?.forEach(e=>e()),this._globalListeners=void 0}static \u0275fac=function(i){return new(i||r)};static \u0275prov=H({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})(),ae={dragStartThreshold:5,pointerDirectionChangeThreshold:5},le=(()=>{class r{_document=d(z);_ngZone=d(C);_viewportRuler=d(Et);_dragDropRegistry=d(qt);_renderer=d(B).createRenderer(null,null);constructor(){}createDrag(e,i=ae){return new q(e,i,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry,this._renderer)}createDropList(e){return new K(e,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}static \u0275fac=function(i){return new(i||r)};static \u0275prov=H({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})(),Bt=new P("CDK_DRAG_PARENT");var he=new P("CdkDragHandle");var ce=new P("CDK_DRAG_CONFIG"),de=new P("CdkDropList"),Ae=(()=>{class r{element=d(dt);dropContainer=d(de,{optional:!0,skipSelf:!0});_ngZone=d(C);_viewContainerRef=d(_t);_dir=d(Rt,{optional:!0});_changeDetectorRef=d(vt);_selfHandle=d(he,{optional:!0,self:!0});_parentDrag=d(Bt,{optional:!0,skipSelf:!0});_dragDropRegistry=d(qt);_destroyed=new _;_handles=new et([]);_previewTemplate;_placeholderTemplate;_dragRef;data;lockAxis;rootElementSelector;boundaryElement;dragStartDelay;freeDragPosition;get disabled(){return this._disabled||!!(this.dropContainer&&this.dropContainer.disabled)}set disabled(e){this._disabled=e,this._dragRef.disabled=this._disabled}_disabled;constrainPosition;previewClass;previewContainer;scale=1;started=new D;released=new D;ended=new D;entered=new D;exited=new D;dropped=new D;moved=new A(e=>{let i=this._dragRef.moved.pipe(st(s=>({source:this,pointerPosition:s.pointerPosition,event:s.event,delta:s.delta,distance:s.distance}))).subscribe(e);return()=>{i.unsubscribe()}});_injector=d(ht);constructor(){let e=this.dropContainer,i=d(ce,{optional:!0}),s=d(le);this._dragRef=s.createDrag(this.element,{dragStartThreshold:i&&i.dragStartThreshold!=null?i.dragStartThreshold:5,pointerDirectionChangeThreshold:i&&i.pointerDirectionChangeThreshold!=null?i.pointerDirectionChangeThreshold:5,zIndex:i?.zIndex}),this._dragRef.data=this,this._dragDropRegistry.registerDirectiveNode(this.element.nativeElement,this),i&&this._assignDefaults(i),e&&(e.addItem(this),e._dropListRef.beforeStarted.pipe(x(this._destroyed)).subscribe(()=>{this._dragRef.scale=this.scale})),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}getPlaceholderElement(){return this._dragRef.getPlaceholderElement()}getRootElement(){return this._dragRef.getRootElement()}reset(){this._dragRef.reset()}resetToBoundary(){this._dragRef.resetToBoundary()}getFreeDragPosition(){return this._dragRef.getFreeDragPosition()}setFreeDragPosition(e){this._dragRef.setFreeDragPosition(e)}ngAfterViewInit(){ut(()=>{this._updateRootElement(),this._setupHandlesListener(),this._dragRef.scale=this.scale,this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)},{injector:this._injector})}ngOnChanges(e){let i=e.rootElementSelector,s=e.freeDragPosition;i&&!i.firstChange&&this._updateRootElement(),this._dragRef.scale=this.scale,s&&!s.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this),this._dragDropRegistry.removeDirectiveNode(this.element.nativeElement),this._ngZone.runOutsideAngular(()=>{this._handles.complete(),this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()})}_addHandle(e){let i=this._handles.getValue();i.push(e),this._handles.next(i)}_removeHandle(e){let i=this._handles.getValue(),s=i.indexOf(e);s>-1&&(i.splice(s,1),this._handles.next(i))}_setPreviewTemplate(e){this._previewTemplate=e}_resetPreviewTemplate(e){e===this._previewTemplate&&(this._previewTemplate=null)}_setPlaceholderTemplate(e){this._placeholderTemplate=e}_resetPlaceholderTemplate(e){e===this._placeholderTemplate&&(this._placeholderTemplate=null)}_updateRootElement(){let e=this.element.nativeElement,i=e;this.rootElementSelector&&(i=e.closest!==void 0?e.closest(this.rootElementSelector):e.parentElement?.closest(this.rootElementSelector)),this._dragRef.withRootElement(i||e)}_getBoundaryElement(){let e=this.boundaryElement;return e?typeof e=="string"?this.element.nativeElement.closest(e):v(e):null}_syncInputs(e){e.beforeStarted.subscribe(()=>{if(!e.isDragging()){let i=this._dir,s=this.dragStartDelay,n=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,o=this._previewTemplate?{template:this._previewTemplate.templateRef,context:this._previewTemplate.data,matchSize:this._previewTemplate.matchSize,viewContainer:this._viewContainerRef}:null;e.disabled=this.disabled,e.lockAxis=this.lockAxis,e.scale=this.scale,e.dragStartDelay=typeof s=="object"&&s?s:St(s),e.constrainPosition=this.constrainPosition,e.previewClass=this.previewClass,e.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(n).withPreviewTemplate(o).withPreviewContainer(this.previewContainer||"global"),i&&e.withDirection(i.value)}}),e.beforeStarted.pipe(rt(1)).subscribe(()=>{if(this._parentDrag){e.withParent(this._parentDrag._dragRef);return}let i=this.element.nativeElement.parentElement;for(;i;){let s=this._dragDropRegistry.getDragDirectiveForNode(i);if(s){e.withParent(s._dragRef);break}i=i.parentElement}})}_handleEvents(e){e.started.subscribe(i=>{this.started.emit({source:this,event:i.event}),this._changeDetectorRef.markForCheck()}),e.released.subscribe(i=>{this.released.emit({source:this,event:i.event})}),e.ended.subscribe(i=>{this.ended.emit({source:this,distance:i.distance,dropPoint:i.dropPoint,event:i.event}),this._changeDetectorRef.markForCheck()}),e.entered.subscribe(i=>{this.entered.emit({container:i.container.data,item:this,currentIndex:i.currentIndex})}),e.exited.subscribe(i=>{this.exited.emit({container:i.container.data,item:this})}),e.dropped.subscribe(i=>{this.dropped.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,previousContainer:i.previousContainer.data,container:i.container.data,isPointerOverContainer:i.isPointerOverContainer,item:this,distance:i.distance,dropPoint:i.dropPoint,event:i.event})})}_assignDefaults(e){let{lockAxis:i,dragStartDelay:s,constrainPosition:n,previewClass:o,boundaryElement:a,draggingDisabled:l,rootElementSelector:h,previewContainer:c}=e;this.disabled=l??!1,this.dragStartDelay=s||0,i&&(this.lockAxis=i),n&&(this.constrainPosition=n),o&&(this.previewClass=o),a&&(this.boundaryElement=a),h&&(this.rootElementSelector=h),c&&(this.previewContainer=c)}_setupHandlesListener(){this._handles.pipe(lt(e=>{let i=e.map(s=>s.element);this._selfHandle&&this.rootElementSelector&&i.push(this.element),this._dragRef.withHandles(i)}),at(e=>F(...e.map(i=>i._stateChanges.pipe(ot(i))))),x(this._destroyed)).subscribe(e=>{let i=this._dragRef,s=e.element.nativeElement;e.disabled?i.disableHandle(s):i.enableHandle(s)})}static \u0275fac=function(i){return new(i||r)};static \u0275dir=gt({type:r,selectors:[["","cdkDrag",""]],hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(i,s){i&2&&ft("cdk-drag-disabled",s.disabled)("cdk-drag-dragging",s._dragRef.isDragging())},inputs:{data:[0,"cdkDragData","data"],lockAxis:[0,"cdkDragLockAxis","lockAxis"],rootElementSelector:[0,"cdkDragRootElement","rootElementSelector"],boundaryElement:[0,"cdkDragBoundary","boundaryElement"],dragStartDelay:[0,"cdkDragStartDelay","dragStartDelay"],freeDragPosition:[0,"cdkDragFreeDragPosition","freeDragPosition"],disabled:[2,"cdkDragDisabled","disabled",Dt],constrainPosition:[0,"cdkDragConstrainPosition","constrainPosition"],previewClass:[0,"cdkDragPreviewClass","previewClass"],previewContainer:[0,"cdkDragPreviewContainer","previewContainer"],scale:[2,"cdkDragScale","scale",wt]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],features:[mt([{provide:Bt,useExisting:r}]),ct]})}return r})();export{Ae as a};
@@ -1,6 +0,0 @@
1
- import{$ as Gt,Aa as _i,Ab as Ci,B as G,C as W,Db as Bi,E as zt,Ga as yi,H as Zt,Ha as mi,I as ht,Ia as vi,Ib as Ee,J as ui,K as pi,Kb as Di,Lb as xi,Mb as Ii,Nb as Qt,Ob as nt,Pb as et,R as Jt,Rb as te,Sb as It,T as wt,Tb as Ri,U as Kt,Ub as Rt,V as we,Vb as Ti,W as be,Wb as Pi,X as ct,Xb as ee,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-HC6OE5XR.js";import{a as U,b as ii,e as Mr,g as Lr}from"./chunk-U4XWPFUW.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{a as ee,b as lt,c as ue,e as dt,g as mt,h as he}from"./chunk-U4XWPFUW.js";var vt=dt((ht,ke)=>{"use strict";(function(s){if(typeof ht=="object"&&typeof ke<"u")ke.exports=s();else if(typeof define=="function"&&define.amd)define([],s);else{var n;typeof window<"u"?n=window:typeof global<"u"?n=global:typeof self<"u"?n=self:n=this,n.localforage=s()}})(function(){var s,n,h;return(function c(v,I,w){function R(T,V){if(!I[T]){if(!v[T]){var p=typeof ue=="function"&&ue;if(!V&&p)return p(T,!0);if(b)return b(T,!0);var _=new Error("Cannot find module '"+T+"'");throw _.code="MODULE_NOT_FOUND",_}var C=I[T]={exports:{}};v[T][0].call(C.exports,function(O){var j=v[T][1][O];return R(j||O)},C,C.exports,c,v,I,w)}return I[T].exports}for(var b=typeof ue=="function"&&ue,m=0;m<w.length;m++)R(w[m]);return R})({1:[function(c,v,I){(function(w){"use strict";var R=w.MutationObserver||w.WebKitMutationObserver,b;if(R){var m=0,T=new R(O),V=w.document.createTextNode("");T.observe(V,{characterData:!0}),b=function(){V.data=m=++m%2}}else if(!w.setImmediate&&typeof w.MessageChannel<"u"){var p=new w.MessageChannel;p.port1.onmessage=O,b=function(){p.port2.postMessage(0)}}else"document"in w&&"onreadystatechange"in w.document.createElement("script")?b=function(){var B=w.document.createElement("script");B.onreadystatechange=function(){O(),B.onreadystatechange=null,B.parentNode.removeChild(B),B=null},w.document.documentElement.appendChild(B)}:b=function(){setTimeout(O,0)};var _,C=[];function O(){_=!0;for(var B,z,F=C.length;F;){for(z=C,C=[],B=-1;++B<F;)z[B]();F=C.length}_=!1}v.exports=j;function j(B){C.push(B)===1&&!_&&b()}}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(c,v,I){"use strict";var w=c(1);function R(){}var b={},m=["REJECTED"],T=["FULFILLED"],V=["PENDING"];v.exports=p;function p(y){if(typeof y!="function")throw new TypeError("resolver must be a function");this.state=V,this.queue=[],this.outcome=void 0,y!==R&&j(this,y)}p.prototype.catch=function(y){return this.then(null,y)},p.prototype.then=function(y,A){if(typeof y!="function"&&this.state===T||typeof A!="function"&&this.state===m)return this;var D=new this.constructor(R);if(this.state!==V){var L=this.state===T?y:A;C(D,L,this.outcome)}else this.queue.push(new _(D,y,A));return D};function _(y,A,D){this.promise=y,typeof A=="function"&&(this.onFulfilled=A,this.callFulfilled=this.otherCallFulfilled),typeof D=="function"&&(this.onRejected=D,this.callRejected=this.otherCallRejected)}_.prototype.callFulfilled=function(y){b.resolve(this.promise,y)},_.prototype.otherCallFulfilled=function(y){C(this.promise,this.onFulfilled,y)},_.prototype.callRejected=function(y){b.reject(this.promise,y)},_.prototype.otherCallRejected=function(y){C(this.promise,this.onRejected,y)};function C(y,A,D){w(function(){var L;try{L=A(D)}catch(U){return b.reject(y,U)}L===y?b.reject(y,new TypeError("Cannot resolve promise with itself")):b.resolve(y,L)})}b.resolve=function(y,A){var D=B(O,A);if(D.status==="error")return b.reject(y,D.value);var L=D.value;if(L)j(y,L);else{y.state=T,y.outcome=A;for(var U=-1,k=y.queue.length;++U<k;)y.queue[U].callFulfilled(A)}return y},b.reject=function(y,A){y.state=m,y.outcome=A;for(var D=-1,L=y.queue.length;++D<L;)y.queue[D].callRejected(A);return y};function O(y){var A=y&&y.then;if(y&&(typeof y=="object"||typeof y=="function")&&typeof A=="function")return function(){A.apply(y,arguments)}}function j(y,A){var D=!1;function L(G){D||(D=!0,b.reject(y,G))}function U(G){D||(D=!0,b.resolve(y,G))}function k(){A(U,L)}var $=B(k);$.status==="error"&&L($.value)}function B(y,A){var D={};try{D.value=y(A),D.status="success"}catch(L){D.status="error",D.value=L}return D}p.resolve=z;function z(y){return y instanceof this?y:b.resolve(new this(R),y)}p.reject=F;function F(y){var A=new this(R);return b.reject(A,y)}p.all=Re;function Re(y){var A=this;if(Object.prototype.toString.call(y)!=="[object Array]")return this.reject(new TypeError("must be an array"));var D=y.length,L=!1;if(!D)return this.resolve([]);for(var U=new Array(D),k=0,$=-1,G=new this(R);++$<D;)q(y[$],$);return G;function q(ie,me){A.resolve(ie).then(Ce,function(te){L||(L=!0,b.reject(G,te))});function Ce(te){U[me]=te,++k===D&&!L&&(L=!0,b.resolve(G,U))}}}p.race=Z;function Z(y){var A=this;if(Object.prototype.toString.call(y)!=="[object Array]")return this.reject(new TypeError("must be an array"));var D=y.length,L=!1;if(!D)return this.resolve([]);for(var U=-1,k=new this(R);++U<D;)$(y[U]);return k;function $(G){A.resolve(G).then(function(q){L||(L=!0,b.resolve(k,q))},function(q){L||(L=!0,b.reject(k,q))})}}},{1:1}],3:[function(c,v,I){(function(w){"use strict";typeof w.Promise!="function"&&(w.Promise=c(2))}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(c,v,I){"use strict";var w=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function R(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function b(){try{if(typeof indexedDB<"u")return indexedDB;if(typeof webkitIndexedDB<"u")return webkitIndexedDB;if(typeof mozIndexedDB<"u")return mozIndexedDB;if(typeof OIndexedDB<"u")return OIndexedDB;if(typeof msIndexedDB<"u")return msIndexedDB}catch{return}}var m=b();function T(){try{if(!m||!m.open)return!1;var e=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),r=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!e||r)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function V(e,r){e=e||[],r=r||{};try{return new Blob(e,r)}catch(o){if(o.name!=="TypeError")throw o;for(var t=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,i=new t,a=0;a<e.length;a+=1)i.append(e[a]);return i.getBlob(r.type)}}typeof Promise>"u"&&c(3);var p=Promise;function _(e,r){r&&e.then(function(t){r(null,t)},function(t){r(t)})}function C(e,r,t){typeof r=="function"&&e.then(r),typeof t=="function"&&e.catch(t)}function O(e){return typeof e!="string"&&(console.warn(e+" used as a key, but it is not a string."),e=String(e)),e}function j(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var B="local-forage-detect-blob-support",z=void 0,F={},Re=Object.prototype.toString,Z="readonly",y="readwrite";function A(e){for(var r=e.length,t=new ArrayBuffer(r),i=new Uint8Array(t),a=0;a<r;a++)i[a]=e.charCodeAt(a);return t}function D(e){return new p(function(r){var t=e.transaction(B,y),i=V([""]);t.objectStore(B).put(i,"key"),t.onabort=function(a){a.preventDefault(),a.stopPropagation(),r(!1)},t.oncomplete=function(){var a=navigator.userAgent.match(/Chrome\/(\d+)/),o=navigator.userAgent.match(/Edge\//);r(o||!a||parseInt(a[1],10)>=43)}}).catch(function(){return!1})}function L(e){return typeof z=="boolean"?p.resolve(z):D(e).then(function(r){return z=r,z})}function U(e){var r=F[e.name],t={};t.promise=new p(function(i,a){t.resolve=i,t.reject=a}),r.deferredOperations.push(t),r.dbReady?r.dbReady=r.dbReady.then(function(){return t.promise}):r.dbReady=t.promise}function k(e){var r=F[e.name],t=r.deferredOperations.pop();if(t)return t.resolve(),t.promise}function $(e,r){var t=F[e.name],i=t.deferredOperations.pop();if(i)return i.reject(r),i.promise}function G(e,r){return new p(function(t,i){if(F[e.name]=F[e.name]||Ye(),e.db)if(r)U(e),e.db.close();else return t(e.db);var a=[e.name];r&&a.push(e.version);var o=m.open.apply(m,a);r&&(o.onupgradeneeded=function(u){var f=o.result;try{f.createObjectStore(e.storeName),u.oldVersion<=1&&f.createObjectStore(B)}catch(l){if(l.name==="ConstraintError")console.warn('The database "'+e.name+'" has been upgraded from version '+u.oldVersion+" to version "+u.newVersion+', but the storage "'+e.storeName+'" already exists.');else throw l}}),o.onerror=function(u){u.preventDefault(),i(o.error)},o.onsuccess=function(){var u=o.result;u.onversionchange=function(f){f.target.close()},t(u),k(e)}})}function q(e){return G(e,!1)}function ie(e){return G(e,!0)}function me(e,r){if(!e.db)return!0;var t=!e.db.objectStoreNames.contains(e.storeName),i=e.version<e.db.version,a=e.version>e.db.version;if(i&&(e.version!==r&&console.warn('The database "'+e.name+`" can't be downgraded from version `+e.db.version+" to version "+e.version+"."),e.version=e.db.version),a||t){if(t){var o=e.db.version+1;o>e.version&&(e.version=o)}return!0}return!1}function Ce(e){return new p(function(r,t){var i=new FileReader;i.onerror=t,i.onloadend=function(a){var o=btoa(a.target.result||"");r({__local_forage_encoded_blob:!0,data:o,type:e.type})},i.readAsBinaryString(e)})}function te(e){var r=A(atob(e.data));return V([r],{type:e.type})}function He(e){return e&&e.__local_forage_encoded_blob}function Lt(e){var r=this,t=r._initReady().then(function(){var i=F[r._dbInfo.name];if(i&&i.dbReady)return i.dbReady});return C(t,e,e),t}function Ot(e){U(e);for(var r=F[e.name],t=r.forages,i=0;i<t.length;i++){var a=t[i];a._dbInfo.db&&(a._dbInfo.db.close(),a._dbInfo.db=null)}return e.db=null,q(e).then(function(o){return e.db=o,me(e)?ie(e):o}).then(function(o){e.db=r.db=o;for(var u=0;u<t.length;u++)t[u]._dbInfo.db=o}).catch(function(o){throw $(e,o),o})}function K(e,r,t,i){i===void 0&&(i=1);try{var a=e.db.transaction(e.storeName,r);t(null,a)}catch(o){if(i>0&&(!e.db||o.name==="InvalidStateError"||o.name==="NotFoundError"))return p.resolve().then(function(){if(!e.db||o.name==="NotFoundError"&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),ie(e)}).then(function(){return Ot(e).then(function(){K(e,r,t,i-1)})}).catch(t);t(o)}}function Ye(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function Pt(e){var r=this,t={db:null};if(e)for(var i in e)t[i]=e[i];var a=F[t.name];a||(a=Ye(),F[t.name]=a),a.forages.push(r),r._initReady||(r._initReady=r.ready,r.ready=Lt);var o=[];function u(){return p.resolve()}for(var f=0;f<a.forages.length;f++){var l=a.forages[f];l!==r&&o.push(l._initReady().catch(u))}var d=a.forages.slice(0);return p.all(o).then(function(){return t.db=a.db,q(t)}).then(function(g){return t.db=g,me(t,r._defaultConfig.version)?ie(t):g}).then(function(g){t.db=a.db=g,r._dbInfo=t;for(var E=0;E<d.length;E++){var S=d[E];S!==r&&(S._dbInfo.db=t.db,S._dbInfo.version=t.version)}})}function Vt(e,r){var t=this;e=O(e);var i=new p(function(a,o){t.ready().then(function(){K(t._dbInfo,Z,function(u,f){if(u)return o(u);try{var l=f.objectStore(t._dbInfo.storeName),d=l.get(e);d.onsuccess=function(){var g=d.result;g===void 0&&(g=null),He(g)&&(g=te(g)),a(g)},d.onerror=function(){o(d.error)}}catch(g){o(g)}})}).catch(o)});return _(i,r),i}function Mt(e,r){var t=this,i=new p(function(a,o){t.ready().then(function(){K(t._dbInfo,Z,function(u,f){if(u)return o(u);try{var l=f.objectStore(t._dbInfo.storeName),d=l.openCursor(),g=1;d.onsuccess=function(){var E=d.result;if(E){var S=E.value;He(S)&&(S=te(S));var N=e(S,E.key,g++);N!==void 0?a(N):E.continue()}else a()},d.onerror=function(){o(d.error)}}catch(E){o(E)}})}).catch(o)});return _(i,r),i}function Bt(e,r,t){var i=this;e=O(e);var a=new p(function(o,u){var f;i.ready().then(function(){return f=i._dbInfo,Re.call(r)==="[object Blob]"?L(f.db).then(function(l){return l?r:Ce(r)}):r}).then(function(l){K(i._dbInfo,y,function(d,g){if(d)return u(d);try{var E=g.objectStore(i._dbInfo.storeName);l===null&&(l=void 0);var S=E.put(l,e);g.oncomplete=function(){l===void 0&&(l=null),o(l)},g.onabort=g.onerror=function(){var N=S.error?S.error:S.transaction.error;u(N)}}catch(N){u(N)}})}).catch(u)});return _(a,t),a}function Ft(e,r){var t=this;e=O(e);var i=new p(function(a,o){t.ready().then(function(){K(t._dbInfo,y,function(u,f){if(u)return o(u);try{var l=f.objectStore(t._dbInfo.storeName),d=l.delete(e);f.oncomplete=function(){a()},f.onerror=function(){o(d.error)},f.onabort=function(){var g=d.error?d.error:d.transaction.error;o(g)}}catch(g){o(g)}})}).catch(o)});return _(i,r),i}function Ut(e){var r=this,t=new p(function(i,a){r.ready().then(function(){K(r._dbInfo,y,function(o,u){if(o)return a(o);try{var f=u.objectStore(r._dbInfo.storeName),l=f.clear();u.oncomplete=function(){i()},u.onabort=u.onerror=function(){var d=l.error?l.error:l.transaction.error;a(d)}}catch(d){a(d)}})}).catch(a)});return _(t,e),t}function kt(e){var r=this,t=new p(function(i,a){r.ready().then(function(){K(r._dbInfo,Z,function(o,u){if(o)return a(o);try{var f=u.objectStore(r._dbInfo.storeName),l=f.count();l.onsuccess=function(){i(l.result)},l.onerror=function(){a(l.error)}}catch(d){a(d)}})}).catch(a)});return _(t,e),t}function Wt(e,r){var t=this,i=new p(function(a,o){if(e<0){a(null);return}t.ready().then(function(){K(t._dbInfo,Z,function(u,f){if(u)return o(u);try{var l=f.objectStore(t._dbInfo.storeName),d=!1,g=l.openKeyCursor();g.onsuccess=function(){var E=g.result;if(!E){a(null);return}e===0||d?a(E.key):(d=!0,E.advance(e))},g.onerror=function(){o(g.error)}}catch(E){o(E)}})}).catch(o)});return _(i,r),i}function $t(e){var r=this,t=new p(function(i,a){r.ready().then(function(){K(r._dbInfo,Z,function(o,u){if(o)return a(o);try{var f=u.objectStore(r._dbInfo.storeName),l=f.openKeyCursor(),d=[];l.onsuccess=function(){var g=l.result;if(!g){i(d);return}d.push(g.key),g.continue()},l.onerror=function(){a(l.error)}}catch(g){a(g)}})}).catch(a)});return _(t,e),t}function Gt(e,r){r=j.apply(this,arguments);var t=this.config();e=typeof e!="function"&&e||{},e.name||(e.name=e.name||t.name,e.storeName=e.storeName||t.storeName);var i=this,a;if(!e.name)a=p.reject("Invalid arguments");else{var o=e.name===t.name&&i._dbInfo.db,u=o?p.resolve(i._dbInfo.db):q(e).then(function(f){var l=F[e.name],d=l.forages;l.db=f;for(var g=0;g<d.length;g++)d[g]._dbInfo.db=f;return f});e.storeName?a=u.then(function(f){if(f.objectStoreNames.contains(e.storeName)){var l=f.version+1;U(e);var d=F[e.name],g=d.forages;f.close();for(var E=0;E<g.length;E++){var S=g[E];S._dbInfo.db=null,S._dbInfo.version=l}var N=new p(function(x,M){var P=m.open(e.name,l);P.onerror=function(H){var se=P.result;se.close(),M(H)},P.onupgradeneeded=function(){var H=P.result;H.deleteObjectStore(e.storeName)},P.onsuccess=function(){var H=P.result;H.close(),x(H)}});return N.then(function(x){d.db=x;for(var M=0;M<g.length;M++){var P=g[M];P._dbInfo.db=x,k(P._dbInfo)}}).catch(function(x){throw($(e,x)||p.resolve()).catch(function(){}),x})}}):a=u.then(function(f){U(e);var l=F[e.name],d=l.forages;f.close();for(var g=0;g<d.length;g++){var E=d[g];E._dbInfo.db=null}var S=new p(function(N,x){var M=m.deleteDatabase(e.name);M.onerror=function(){var P=M.result;P&&P.close(),x(M.error)},M.onblocked=function(){console.warn('dropInstance blocked for database "'+e.name+'" until all open connections are closed')},M.onsuccess=function(){var P=M.result;P&&P.close(),N(P)}});return S.then(function(N){l.db=N;for(var x=0;x<d.length;x++){var M=d[x];k(M._dbInfo)}}).catch(function(N){throw($(e,N)||p.resolve()).catch(function(){}),N})})}return _(a,r),a}var Ht={_driver:"asyncStorage",_initStorage:Pt,_support:T(),iterate:Mt,getItem:Vt,setItem:Bt,removeItem:Ft,clear:Ut,length:kt,key:Wt,keys:$t,dropInstance:Gt};function Yt(){return typeof openDatabase=="function"}var X="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",jt="~~local_forage_type~",je=/^~~local_forage_type~([^~]+)~/,ge="__lfsc__:",Ae=ge.length,Ne="arbf",xe="blob",ze="si08",qe="ui08",Ke="uic8",Xe="si16",Je="si32",Qe="ur16",Ze="ui32",et="fl32",tt="fl64",rt=Ae+Ne.length,nt=Object.prototype.toString;function ot(e){var r=e.length*.75,t=e.length,i,a=0,o,u,f,l;e[e.length-1]==="="&&(r--,e[e.length-2]==="="&&r--);var d=new ArrayBuffer(r),g=new Uint8Array(d);for(i=0;i<t;i+=4)o=X.indexOf(e[i]),u=X.indexOf(e[i+1]),f=X.indexOf(e[i+2]),l=X.indexOf(e[i+3]),g[a++]=o<<2|u>>4,g[a++]=(u&15)<<4|f>>2,g[a++]=(f&3)<<6|l&63;return d}function Le(e){var r=new Uint8Array(e),t="",i;for(i=0;i<r.length;i+=3)t+=X[r[i]>>2],t+=X[(r[i]&3)<<4|r[i+1]>>4],t+=X[(r[i+1]&15)<<2|r[i+2]>>6],t+=X[r[i+2]&63];return r.length%3===2?t=t.substring(0,t.length-1)+"=":r.length%3===1&&(t=t.substring(0,t.length-2)+"=="),t}function zt(e,r){var t="";if(e&&(t=nt.call(e)),e&&(t==="[object ArrayBuffer]"||e.buffer&&nt.call(e.buffer)==="[object ArrayBuffer]")){var i,a=ge;e instanceof ArrayBuffer?(i=e,a+=Ne):(i=e.buffer,t==="[object Int8Array]"?a+=ze:t==="[object Uint8Array]"?a+=qe:t==="[object Uint8ClampedArray]"?a+=Ke:t==="[object Int16Array]"?a+=Xe:t==="[object Uint16Array]"?a+=Qe:t==="[object Int32Array]"?a+=Je:t==="[object Uint32Array]"?a+=Ze:t==="[object Float32Array]"?a+=et:t==="[object Float64Array]"?a+=tt:r(new Error("Failed to get type for BinaryArray"))),r(a+Le(i))}else if(t==="[object Blob]"){var o=new FileReader;o.onload=function(){var u=jt+e.type+"~"+Le(this.result);r(ge+xe+u)},o.readAsArrayBuffer(e)}else try{r(JSON.stringify(e))}catch(u){console.error("Couldn't convert value into a JSON string: ",e),r(null,u)}}function qt(e){if(e.substring(0,Ae)!==ge)return JSON.parse(e);var r=e.substring(rt),t=e.substring(Ae,rt),i;if(t===xe&&je.test(r)){var a=r.match(je);i=a[1],r=r.substring(a[0].length)}var o=ot(r);switch(t){case Ne:return o;case xe:return V([o],{type:i});case ze:return new Int8Array(o);case qe:return new Uint8Array(o);case Ke:return new Uint8ClampedArray(o);case Xe:return new Int16Array(o);case Qe:return new Uint16Array(o);case Je:return new Int32Array(o);case Ze:return new Uint32Array(o);case et:return new Float32Array(o);case tt:return new Float64Array(o);default:throw new Error("Unkown type: "+t)}}var Oe={serialize:zt,deserialize:qt,stringToBuffer:ot,bufferToString:Le};function it(e,r,t,i){e.executeSql("CREATE TABLE IF NOT EXISTS "+r.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],t,i)}function Kt(e){var r=this,t={db:null};if(e)for(var i in e)t[i]=typeof e[i]!="string"?e[i].toString():e[i];var a=new p(function(o,u){try{t.db=openDatabase(t.name,String(t.version),t.description,t.size)}catch(f){return u(f)}t.db.transaction(function(f){it(f,t,function(){r._dbInfo=t,o()},function(l,d){u(d)})},u)});return t.serializer=Oe,a}function J(e,r,t,i,a,o){e.executeSql(t,i,a,function(u,f){f.code===f.SYNTAX_ERR?u.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[r.storeName],function(l,d){d.rows.length?o(l,f):it(l,r,function(){l.executeSql(t,i,a,o)},o)},o):o(u,f)},o)}function Xt(e,r){var t=this;e=O(e);var i=new p(function(a,o){t.ready().then(function(){var u=t._dbInfo;u.db.transaction(function(f){J(f,u,"SELECT * FROM "+u.storeName+" WHERE key = ? LIMIT 1",[e],function(l,d){var g=d.rows.length?d.rows.item(0).value:null;g&&(g=u.serializer.deserialize(g)),a(g)},function(l,d){o(d)})})}).catch(o)});return _(i,r),i}function Jt(e,r){var t=this,i=new p(function(a,o){t.ready().then(function(){var u=t._dbInfo;u.db.transaction(function(f){J(f,u,"SELECT * FROM "+u.storeName,[],function(l,d){for(var g=d.rows,E=g.length,S=0;S<E;S++){var N=g.item(S),x=N.value;if(x&&(x=u.serializer.deserialize(x)),x=e(x,N.key,S+1),x!==void 0){a(x);return}}a()},function(l,d){o(d)})})}).catch(o)});return _(i,r),i}function at(e,r,t,i){var a=this;e=O(e);var o=new p(function(u,f){a.ready().then(function(){r===void 0&&(r=null);var l=r,d=a._dbInfo;d.serializer.serialize(r,function(g,E){E?f(E):d.db.transaction(function(S){J(S,d,"INSERT OR REPLACE INTO "+d.storeName+" (key, value) VALUES (?, ?)",[e,g],function(){u(l)},function(N,x){f(x)})},function(S){if(S.code===S.QUOTA_ERR){if(i>0){u(at.apply(a,[e,l,t,i-1]));return}f(S)}})})}).catch(f)});return _(o,t),o}function Qt(e,r,t){return at.apply(this,[e,r,t,1])}function Zt(e,r){var t=this;e=O(e);var i=new p(function(a,o){t.ready().then(function(){var u=t._dbInfo;u.db.transaction(function(f){J(f,u,"DELETE FROM "+u.storeName+" WHERE key = ?",[e],function(){a()},function(l,d){o(d)})})}).catch(o)});return _(i,r),i}function er(e){var r=this,t=new p(function(i,a){r.ready().then(function(){var o=r._dbInfo;o.db.transaction(function(u){J(u,o,"DELETE FROM "+o.storeName,[],function(){i()},function(f,l){a(l)})})}).catch(a)});return _(t,e),t}function tr(e){var r=this,t=new p(function(i,a){r.ready().then(function(){var o=r._dbInfo;o.db.transaction(function(u){J(u,o,"SELECT COUNT(key) as c FROM "+o.storeName,[],function(f,l){var d=l.rows.item(0).c;i(d)},function(f,l){a(l)})})}).catch(a)});return _(t,e),t}function rr(e,r){var t=this,i=new p(function(a,o){t.ready().then(function(){var u=t._dbInfo;u.db.transaction(function(f){J(f,u,"SELECT key FROM "+u.storeName+" WHERE id = ? LIMIT 1",[e+1],function(l,d){var g=d.rows.length?d.rows.item(0).key:null;a(g)},function(l,d){o(d)})})}).catch(o)});return _(i,r),i}function nr(e){var r=this,t=new p(function(i,a){r.ready().then(function(){var o=r._dbInfo;o.db.transaction(function(u){J(u,o,"SELECT key FROM "+o.storeName,[],function(f,l){for(var d=[],g=0;g<l.rows.length;g++)d.push(l.rows.item(g).key);i(d)},function(f,l){a(l)})})}).catch(a)});return _(t,e),t}function or(e){return new p(function(r,t){e.transaction(function(i){i.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(a,o){for(var u=[],f=0;f<o.rows.length;f++)u.push(o.rows.item(f).name);r({db:e,storeNames:u})},function(a,o){t(o)})},function(i){t(i)})})}function ir(e,r){r=j.apply(this,arguments);var t=this.config();e=typeof e!="function"&&e||{},e.name||(e.name=e.name||t.name,e.storeName=e.storeName||t.storeName);var i=this,a;return e.name?a=new p(function(o){var u;e.name===t.name?u=i._dbInfo.db:u=openDatabase(e.name,"","",0),e.storeName?o({db:u,storeNames:[e.storeName]}):o(or(u))}).then(function(o){return new p(function(u,f){o.db.transaction(function(l){function d(N){return new p(function(x,M){l.executeSql("DROP TABLE IF EXISTS "+N,[],function(){x()},function(P,H){M(H)})})}for(var g=[],E=0,S=o.storeNames.length;E<S;E++)g.push(d(o.storeNames[E]));p.all(g).then(function(){u()}).catch(function(N){f(N)})},function(l){f(l)})})}):a=p.reject("Invalid arguments"),_(a,r),a}var ar={_driver:"webSQLStorage",_initStorage:Kt,_support:Yt(),iterate:Jt,getItem:Xt,setItem:Qt,removeItem:Zt,clear:er,length:tr,key:rr,keys:nr,dropInstance:ir};function sr(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function st(e,r){var t=e.name+"/";return e.storeName!==r.storeName&&(t+=e.storeName+"/"),t}function ur(){var e="_localforage_support_test";try{return localStorage.setItem(e,!0),localStorage.removeItem(e),!1}catch{return!0}}function cr(){return!ur()||localStorage.length>0}function fr(e){var r=this,t={};if(e)for(var i in e)t[i]=e[i];return t.keyPrefix=st(e,r._defaultConfig),cr()?(r._dbInfo=t,t.serializer=Oe,p.resolve()):p.reject()}function lr(e){var r=this,t=r.ready().then(function(){for(var i=r._dbInfo.keyPrefix,a=localStorage.length-1;a>=0;a--){var o=localStorage.key(a);o.indexOf(i)===0&&localStorage.removeItem(o)}});return _(t,e),t}function dr(e,r){var t=this;e=O(e);var i=t.ready().then(function(){var a=t._dbInfo,o=localStorage.getItem(a.keyPrefix+e);return o&&(o=a.serializer.deserialize(o)),o});return _(i,r),i}function mr(e,r){var t=this,i=t.ready().then(function(){for(var a=t._dbInfo,o=a.keyPrefix,u=o.length,f=localStorage.length,l=1,d=0;d<f;d++){var g=localStorage.key(d);if(g.indexOf(o)===0){var E=localStorage.getItem(g);if(E&&(E=a.serializer.deserialize(E)),E=e(E,g.substring(u),l++),E!==void 0)return E}}});return _(i,r),i}function gr(e,r){var t=this,i=t.ready().then(function(){var a=t._dbInfo,o;try{o=localStorage.key(e)}catch{o=null}return o&&(o=o.substring(a.keyPrefix.length)),o});return _(i,r),i}function pr(e){var r=this,t=r.ready().then(function(){for(var i=r._dbInfo,a=localStorage.length,o=[],u=0;u<a;u++){var f=localStorage.key(u);f.indexOf(i.keyPrefix)===0&&o.push(f.substring(i.keyPrefix.length))}return o});return _(t,e),t}function hr(e){var r=this,t=r.keys().then(function(i){return i.length});return _(t,e),t}function vr(e,r){var t=this;e=O(e);var i=t.ready().then(function(){var a=t._dbInfo;localStorage.removeItem(a.keyPrefix+e)});return _(i,r),i}function yr(e,r,t){var i=this;e=O(e);var a=i.ready().then(function(){r===void 0&&(r=null);var o=r;return new p(function(u,f){var l=i._dbInfo;l.serializer.serialize(r,function(d,g){if(g)f(g);else try{localStorage.setItem(l.keyPrefix+e,d),u(o)}catch(E){(E.name==="QuotaExceededError"||E.name==="NS_ERROR_DOM_QUOTA_REACHED")&&f(E),f(E)}})})});return _(a,t),a}function Er(e,r){if(r=j.apply(this,arguments),e=typeof e!="function"&&e||{},!e.name){var t=this.config();e.name=e.name||t.name,e.storeName=e.storeName||t.storeName}var i=this,a;return e.name?a=new p(function(o){e.storeName?o(st(e,i._defaultConfig)):o(e.name+"/")}).then(function(o){for(var u=localStorage.length-1;u>=0;u--){var f=localStorage.key(u);f.indexOf(o)===0&&localStorage.removeItem(f)}}):a=p.reject("Invalid arguments"),_(a,r),a}var _r={_driver:"localStorageWrapper",_initStorage:fr,_support:sr(),iterate:mr,getItem:dr,setItem:yr,removeItem:vr,clear:lr,length:hr,key:gr,keys:pr,dropInstance:Er},br=function(r,t){return r===t||typeof r=="number"&&typeof t=="number"&&isNaN(r)&&isNaN(t)},Tr=function(r,t){for(var i=r.length,a=0;a<i;){if(br(r[a],t))return!0;a++}return!1},ut=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"},ae={},ct={},re={INDEXEDDB:Ht,WEBSQL:ar,LOCALSTORAGE:_r},wr=[re.INDEXEDDB._driver,re.WEBSQL._driver,re.LOCALSTORAGE._driver],pe=["dropInstance"],Pe=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(pe),Ir={description:"",driver:wr.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function Sr(e,r){e[r]=function(){var t=arguments;return e.ready().then(function(){return e[r].apply(e,t)})}}function Ve(){for(var e=1;e<arguments.length;e++){var r=arguments[e];if(r)for(var t in r)r.hasOwnProperty(t)&&(ut(r[t])?arguments[0][t]=r[t].slice():arguments[0][t]=r[t])}return arguments[0]}var Dr=(function(){function e(r){R(this,e);for(var t in re)if(re.hasOwnProperty(t)){var i=re[t],a=i._driver;this[t]=a,ae[a]||this.defineDriver(i)}this._defaultConfig=Ve({},Ir),this._config=Ve({},this._defaultConfig,r),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return e.prototype.config=function(t){if((typeof t>"u"?"undefined":w(t))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var i in t){if(i==="storeName"&&(t[i]=t[i].replace(/\W/g,"_")),i==="version"&&typeof t[i]!="number")return new Error("Database version must be a number.");this._config[i]=t[i]}return"driver"in t&&t.driver?this.setDriver(this._config.driver):!0}else return typeof t=="string"?this._config[t]:this._config},e.prototype.defineDriver=function(t,i,a){var o=new p(function(u,f){try{var l=t._driver,d=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!t._driver){f(d);return}for(var g=Pe.concat("_initStorage"),E=0,S=g.length;E<S;E++){var N=g[E],x=!Tr(pe,N);if((x||t[N])&&typeof t[N]!="function"){f(d);return}}var M=function(){for(var se=function(Ar){return function(){var Nr=new Error("Method "+Ar+" is not implemented by the current driver"),ft=p.reject(Nr);return _(ft,arguments[arguments.length-1]),ft}},Me=0,Cr=pe.length;Me<Cr;Me++){var Be=pe[Me];t[Be]||(t[Be]=se(Be))}};M();var P=function(se){ae[l]&&console.info("Redefining LocalForage driver: "+l),ae[l]=t,ct[l]=se,u()};"_support"in t?t._support&&typeof t._support=="function"?t._support().then(P,f):P(!!t._support):P(!0)}catch(H){f(H)}});return C(o,i,a),o},e.prototype.driver=function(){return this._driver||null},e.prototype.getDriver=function(t,i,a){var o=ae[t]?p.resolve(ae[t]):p.reject(new Error("Driver not found."));return C(o,i,a),o},e.prototype.getSerializer=function(t){var i=p.resolve(Oe);return C(i,t),i},e.prototype.ready=function(t){var i=this,a=i._driverSet.then(function(){return i._ready===null&&(i._ready=i._initDriver()),i._ready});return C(a,t,t),a},e.prototype.setDriver=function(t,i,a){var o=this;ut(t)||(t=[t]);var u=this._getSupportedDrivers(t);function f(){o._config.driver=o.driver()}function l(E){return o._extend(E),f(),o._ready=o._initStorage(o._config),o._ready}function d(E){return function(){var S=0;function N(){for(;S<E.length;){var x=E[S];return S++,o._dbInfo=null,o._ready=null,o.getDriver(x).then(l).catch(N)}f();var M=new Error("No available storage method found.");return o._driverSet=p.reject(M),o._driverSet}return N()}}var g=this._driverSet!==null?this._driverSet.catch(function(){return p.resolve()}):p.resolve();return this._driverSet=g.then(function(){var E=u[0];return o._dbInfo=null,o._ready=null,o.getDriver(E).then(function(S){o._driver=S._driver,f(),o._wrapLibraryMethodsWithReady(),o._initDriver=d(u)})}).catch(function(){f();var E=new Error("No available storage method found.");return o._driverSet=p.reject(E),o._driverSet}),C(this._driverSet,i,a),this._driverSet},e.prototype.supports=function(t){return!!ct[t]},e.prototype._extend=function(t){Ve(this,t)},e.prototype._getSupportedDrivers=function(t){for(var i=[],a=0,o=t.length;a<o;a++){var u=t[a];this.supports(u)&&i.push(u)}return i},e.prototype._wrapLibraryMethodsWithReady=function(){for(var t=0,i=Pe.length;t<i;t++)Sr(this,Pe[t])},e.prototype.createInstance=function(t){return new e(t)},e})(),Rr=new Dr;v.exports=Rr},{3:3}]},{},[4])(4)})});var wt=dt((Tt,we)=>{"use strict";(function(s){"use strict";var n={};n.VERSION="1.6.1";var h,c={},v=function(m,T){return function(){return T.apply(m,arguments)}},I=function(){var m=arguments,T=m[0],V,p;for(p=1;p<m.length;p++)for(V in m[p])!(V in T)&&m[p].hasOwnProperty(V)&&(T[V]=m[p][V]);return T},w=function(m,T){return{value:m,name:T}};n.TRACE=w(1,"TRACE"),n.DEBUG=w(2,"DEBUG"),n.INFO=w(3,"INFO"),n.TIME=w(4,"TIME"),n.WARN=w(5,"WARN"),n.ERROR=w(8,"ERROR"),n.OFF=w(99,"OFF");var R=function(m){this.context=m,this.setLevel(m.filterLevel),this.log=this.info};R.prototype={setLevel:function(m){m&&"value"in m&&(this.context.filterLevel=m)},getLevel:function(){return this.context.filterLevel},enabledFor:function(m){var T=this.context.filterLevel;return m.value>=T.value},trace:function(){this.invoke(n.TRACE,arguments)},debug:function(){this.invoke(n.DEBUG,arguments)},info:function(){this.invoke(n.INFO,arguments)},warn:function(){this.invoke(n.WARN,arguments)},error:function(){this.invoke(n.ERROR,arguments)},time:function(m){typeof m=="string"&&m.length>0&&this.invoke(n.TIME,[m,"start"])},timeEnd:function(m){typeof m=="string"&&m.length>0&&this.invoke(n.TIME,[m,"end"])},invoke:function(m,T){h&&this.enabledFor(m)&&h(T,I({level:m},this.context))}};var b=new R({filterLevel:n.OFF});(function(){var m=n;m.enabledFor=v(b,b.enabledFor),m.trace=v(b,b.trace),m.debug=v(b,b.debug),m.time=v(b,b.time),m.timeEnd=v(b,b.timeEnd),m.info=v(b,b.info),m.warn=v(b,b.warn),m.error=v(b,b.error),m.log=m.info})(),n.setHandler=function(m){h=m},n.setLevel=function(m){b.setLevel(m);for(var T in c)c.hasOwnProperty(T)&&c[T].setLevel(m)},n.getLevel=function(){return b.getLevel()},n.get=function(m){return c[m]||(c[m]=new R(I({name:m},b.context)))},n.createDefaultHandler=function(m){m=m||{},m.formatter=m.formatter||function(_,C){C.name&&_.unshift("["+C.name+"]")};var T={},V=function(p,_){Function.prototype.apply.call(p,console,_)};return typeof console>"u"?function(){}:function(p,_){p=Array.prototype.slice.call(p);var C=console.log,O;_.level===n.TIME?(O=(_.name?"["+_.name+"] ":"")+p[0],p[1]==="start"?console.time?console.time(O):T[O]=new Date().getTime():console.timeEnd?console.timeEnd(O):V(C,[O+": "+(new Date().getTime()-T[O])+"ms"])):(_.level===n.WARN&&console.warn?C=console.warn:_.level===n.ERROR&&console.error?C=console.error:_.level===n.INFO&&console.info?C=console.info:_.level===n.DEBUG&&console.debug?C=console.debug:_.level===n.TRACE&&console.trace&&(C=console.trace),m.formatter(p,_),V(C,p))}},n.useDefaults=function(m){n.setLevel(m&&m.defaultLevel||n.DEBUG),n.setHandler(n.createDefaultHandler(m))},n.setDefaults=n.useDefaults,typeof define=="function"&&define.amd?define(n):typeof we<"u"&&we.exports?we.exports=n:(n._prevLogger=s.Logger,n.noConflict=function(){return s.Logger=n._prevLogger,n},s.Logger=n)})(Tt)});var Fe="13.1.12";var Lr=Fe.split("-")[0].split(".").slice(0,3).map(s=>s.padStart(2,"0")).join(""),qr="WEB",gt="CooeeSDK",Q=Fe,Kr=parseInt(Lr,10);var Xr=["collection","product","cart"],Jr=[{identifier:"#flo-checkout-wrapper",gateway:"Shopflow"},{identifier:"#fastrr-main-container",gateway:"Shiprocket"},{identifier:"#gokwik-modal-wrapper",gateway:"Gokwik"},{identifier:"#zecpe",gateway:"Ecom 360"}],Qr=["View Item","View Cart","View Collection"],Zr=["CE Screen View","View Collection","View Item","View Cart"],pt="https://cdn.jsdelivr.net/npm/swiper@11";var Ue=`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${Q}/dist`,ce={apiURL:"https://api.sdk.letscooee.com",debug:!1,mode:"production",baseURL:Ue,styleURL:`${Ue}/widget.min.css`,widgetURL:`${Ue}/widget.min.js`,swiperStyleURL:`${pt}/swiper-bundle.min.css`};var ve=class{static ISO_WITHOUT_MS_REGEX=new RegExp(/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)/);static isObject(n){return typeof n=="object"&&!Array.isArray(n)&&n!==null}static parseToAny(n){try{return JSON.parse(n.toString())}catch{}return n.toString().match(this.ISO_WITHOUT_MS_REGEX)?new Date(n.toString()):n}static async sleep(n){return new Promise(h=>setTimeout(h,n))}static hasKeys(n){return n?Object.keys(n).length>=1:!1}static convertObjectToArray(n,h){return h.reduce((c,v)=>(n.hasOwnProperty(v)&&n[v]!=null&&c.push({[v]:n[v]}),c),[])}static removeNullUndefinedKeys(n){return Object.keys(n).reduce((h,c)=>(n[c]!==null&&n[c]!==void 0&&(h[c]=n[c]),h),{})}static stringify(n){return JSON.stringify(n,function(h,c){return c===void 0?null:c})}};var ye=class{gaEnabled;gaMeasurementID;pixelPush;website;currencyCount;money;storefrontToken;skipItemAttribute;widgetCustomisation;currency;static get(){return window.CooeeSDK.config}update(n){return n??={},this.gaEnabled=n.gaEnabled,this.gaMeasurementID=n.gaMeasurementID,this.pixelPush=n.pixelPush,this.website=n.website??{},this.currencyCount=n.currencyCount??0,this.money=n.money,this.currency=n.currency,this.storefrontToken=n.storefrontToken,this.skipItemAttribute=n.skipItemAttribute,this.widgetCustomisation=n.widgetCustomisation,this}};var We=mt(vt());function Ee(s){return We.default.createInstance({name:"lc",storeName:s,driver:We.default.LOCALSTORAGE})}var ne=class{static storage;static async get(n,h){return await this.storage?.getItem(n)??h}static set(n,h){return this.storage?.setItem(n,h)}static remove(n){return this.storage?.removeItem(n)}static clear(){return this.storage?.clear()}static getForage(){return this.storage}};var fe=class fe extends ne{};he(fe,"storeName","ses"),fe.storage=Ee(fe.storeName);var _e=fe;var le=class le extends ne{};he(le,"storeName","usr"),le.storage=Ee(le.storeName);var de=le;var be=class{static format(n,h){let c=/{{\s*(\w+)\s*}}/;return h.replace(c,(v,I)=>{switch(I){case"amount":return this.formatWithDelimiters(n,2);case"amount_no_decimals":return this.formatWithDelimiters(n,0);case"amount_with_comma_separator":return this.formatWithDelimiters(n,2,".",",");case"amount_no_decimals_with_comma_separator":return this.formatWithDelimiters(n,0,".",",");case"amount_with_apostrophe_separator":return this.formatWithDelimiters(n,2,"'",".");case"amount_no_decimals_with_space_separator":return this.formatWithDelimiters(n,0," ");case"amount_with_space_separator":return this.formatWithDelimiters(n,2," ",",");case"amount_with_period_and_space_separator":return this.formatWithDelimiters(n,2," ",".");default:return v}})}static formatWithDelimiters(n,h=2,c=",",v="."){if(isNaN(n)||n==null)return"0";let w=(n/100).toFixed(h).split("."),R=w[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+c),b=w[1]?v+w[1]:"";return R+b}};function yt(s){if(s<0)return`${s}ms`;let n=new Date(Date.UTC(0,0,0,0,0,0,s)),h=[];return n.getUTCMinutes()&&h.push(n.getUTCMinutes()+"m"),n.getUTCSeconds()&&h.push(n.getUTCSeconds()+"s"),n.getUTCMilliseconds()&&h.push(n.getUTCMilliseconds()+"ms"),h.length||h.push("0ms"),h.join(" ")}function $e(){return window.CooeeSDK.runtimeData}function yn(){return yt(Date.now()-$e().sdkLoadTime.getTime())}function Nn(s){try{return new URL(s)}catch{return}}function xn(s){return!s||s==="null"||s==="undefined"}function Ln(s,n){let h=s.indexOf(n);return h===-1?!1:(s.splice(h,1),!0)}function On(s,n,h){return{[s]:Or(n,h),[s+"_wo_currency"]:n}}function Or(s,n){if(s==0&&n)return"Free";let h=$e(),c=ye.get(),v=h.shopCurrencyCode||c.currency,I=h.currencyCode;I||Y.warn("Currency code is not set in RuntimeData");let w=c.money?.format??h.moneyFormat,R;if(w&&v===I)R=be.format(s*100,w);else{let b;try{b=new Intl.NumberFormat(Et(),{style:"currency",currency:I||v,minimumFractionDigits:0,maximumFractionDigits:2})}catch(m){return Ge(m,"format-currency",{extra:{currentCurrency:I,shopCurrency:v}}),""}R=b.format(s),R=R.replace("\u20B9","Rs. "),c.money?.showCurrency&&I!=="INR"&&(R=R.concat(` ${I}`))}return R}function Pn(s){let n=Et();try{return new Intl.NumberFormat(n,{notation:"compact"}).format(s)}catch(h){return Ge(h,"format-number",{extra:{lang:n,value:s}}),s.toString()}}function Et(){let s="en";return typeof navigator<"u"&&(navigator.languages!==void 0&&navigator.languages.length>0?s=navigator.languages[0]:navigator.language&&(s=navigator.language)),s=s.split(";")[0],s=s.split("-")[0],s||"en"}var Te;function _t(){if(Te)return Te;try{return Te=Intl.DateTimeFormat().resolvedOptions().timeZone,Te}catch{return""}}function bt(s){document.readyState!=="loading"?s():document.addEventListener("DOMContentLoaded",s)}function Vn(s){let n=document.createElement("span");n.id="snackbar",n.innerText=s,document.body.appendChild(n),n.className="show",setTimeout(()=>{n.classList.remove("show"),document.body.removeChild(n)},5e3)}async function Pr(s,n=7,h=document){let c=1,v=document.querySelectorAll("nonexistent-tag");for(;c<=n;){let I=Math.min(50*2**c,1e3);if(c>1&&await ve.sleep(I),v=h.querySelectorAll(s),v.length)return Y.verbose(`Attempt ${c}: ${v.length} elements found with ${s}`),v;Y.verbose(`Attempt ${c}: Elements not found with ${s}. Will retry after ${I}ms.`),c++}return Y.verbose(`\u26A0\uFE0F Max attempts reached. Element not found with ${s}.`),v}async function Mn(s,n=10,h=document){return(await Pr(s,n,h)).item(0)}async function Vr(s){let[n,h,c]=await Promise.all([de.get("did"),_e.get("id",""),de.get("sessionNumber",1)]),v={letscooee_did:n,letscooee_sid:h,letscooee_sn:`${c}`,__letscooee_time:new Date().toLocaleString()};return s&&(v.__letscooee_via=s),v}async function Bn(s){let n=await Vr(s);return Object.entries(n).map(([h,c])=>({key:h,value:c.toString()}))}function Fn(s,n,h,c=!1){Object.defineProperty(s,n,{enumerable:!1,configurable:!1,writable:c,value:h})}function Un(s){if(s%100>=11&&s%100<=13)return s+"th";switch(s%10){case 1:return s+"st";case 2:return s+"nd";case 3:return s+"rd";default:return s+"th"}}var W=mt(wt());var Y=class{static debuggerEl;static infoLogs=[];static log(...n){W.default.info(...n)}static verbose(...n){W.default.debug(...n)}static error(...n){W.default.error(...n)}static warn(...n){W.default.warn(...n)}static info(...n){W.default.info(...n),this.infoLogs.push({time:new Date,message:n.join(" ")}),this.addToDebugger()}static trace(...n){W.default.trace(...n)}static addToDebugger(){sessionStorage.cooeeDebug&&(this.debuggerEl=this.debuggerEl??document.querySelector("cooee-debugger"),this.debuggerEl&&this.debuggerEl&&(this.debuggerEl.logs=[...this.infoLogs]))}};function Hn(s=gt){W.default.useDefaults({formatter:function(n){n.unshift(`${s} (v${Q}):`)}}),Mr()&&(localStorage.cooeeLogLevel="TRACE"),localStorage.cooeeLogLevel?W.default.setLevel(W.default[localStorage.cooeeLogLevel]):W.default.setLevel(ce.debug?W.default.TRACE:W.default.OFF)}function Mr(){let s=It();return s==="1"||s==="on"}function It(){return new URL(location.href).searchParams?.get("cooee-debug")}function Yn(){let s=["display: inline-block;","font-size: 14px;","background: linear-gradient(90deg, #d52dc8 25%, #2179e2 82%);","color: white;","padding: 4px;","border-radius: 4px;"].join(" "),n=`
2
- `;n+=`\u{1F4E3} Drive higher conversions with AI-powered onsite engagement
3
- `,n+=`\u{1F50D} Track real-time visitor intent & optimize engagement
4
- `,n+=`\u{1F4CA} Improve Meta Ads ROAS with intent-driven campaigns
5
- `,n+=`\u{1F6CD}\uFE0F Boost purchases & repeat sales effortlessly
6
- `,n+=`
7
-
8
- `,n+="Learn more: https://www.letscooee.com",console.group("%c Elevate your ecommerce experience with Cooee \u{1F680} ",s),console.log(`%c${n}`,"font-size: 13px; line-height: 1.8;"),console.log(`SDK v${Q}`),console.groupEnd(),Y.info(`SDK v${Q} loaded`)}function jn(){let s=localStorage.getItem("cooeeDebugTill"),n=It();if(n==="1"||n==="on"){let h=Fr();s||(s=h.toString(),localStorage.setItem("cooeeDebugTill",s))}n==="on"?sessionStorage.cooeeDebug="1":n==="off"&&sessionStorage.removeItem("cooeeDebug"),sessionStorage.cooeeDebug&&Br(),s&&new Date(+s)<new Date&&localStorage.removeItem("cooeeDebugTill")}function Br(){let s=document.createElement("cooee-debugger");bt(()=>{document.body.appendChild(s)})}function Fr(){return new Date().getTime()+360*60*1e3}var St=5,Ur=500,oe=class extends Error{request;response;status;requestBody;responseText;constructor(n){super(n),this.name="FetchError",Object.setPrototypeOf(this,new.target.prototype)}is40x(){return!!this.response&&this.response.status>=400&&this.response.status<500}};async function Kn(s,n){let h=Date.now(),c;try{c=await kr(s,n)}catch{}let v=c?new Request(c.url,{method:n?.method||"GET"}):new Request(s,n);if(!c||!c.ok){let m="Failed to fetch";c?.statusText&&(m+=`: ${c.statusText}`);let T=new oe(m);throw T.request=v,T.response=c?.clone(),T.status=c?.status,T.requestBody=n?.body,T.responseText=await Dt(c),T}let I,w=(c.headers.get("content-type")||"").toLowerCase(),R=c.headers.get("content-length"),b=n?.method?.toUpperCase()||"GET";if(c.status===204||c.status===205||b==="HEAD"||R==="0")I=void 0;else if(w.includes("application/json")||w.includes("application/problem+json")||w.includes("text/javascript"))try{I=await c.clone().json()}catch(m){let T=new oe(`Failed to parse JSON response: ${m?.message}`);throw T.request=v,T.response=c.clone(),T.status=c.status,T.requestBody=n?.body,T.responseText=await Dt(c),T}else w.includes("text/")||w.includes("image/svg+xml")?I=await c.text():I=await c.arrayBuffer();return{data:I,status:c.status,statusText:c.statusText,headers:c.headers,timeTakenMs:Date.now()-h,options:n,request:v}}async function kr(s,n){let h=null,c;for(let v=0;v<=St;v++){try{let I=new Headers(n?.headers);(s.includes("letscooee.com")||s.includes("localhost"))&&I.set("Cooee-Retry-Attempt",v.toString());let w=lt(ee({},n),{headers:I});if(c=await fetch(s,w),c.ok||c.status>=400&&c.status<500)return c;h=new Error(`Server error: ${c.status} ${c.statusText}`)}catch(I){h=I instanceof Error?I:new Error(String(I))}if(v<St){let I=Math.pow(2,v)*Ur;Y.info(`Request to ${s} failed. Retrying in ${I}ms...`),await new Promise(w=>setTimeout(w,I))}}if(c&&!c.ok)return c;throw h||new Error("Request failed after retries")}async function Dt(s){if(s){try{return s=s.clone(),await s.json()}catch{}try{return await s.text()}catch{}}}var Ie={},Se,De,Ct,At,Rt;async function Nt(){if(!De)return Rt??=Wr(),Rt}async function Wr(){let{BrowserClient:s,Scope:n,defaultStackParser:h,getDefaultIntegrations:c,makeFetchTransport:v}=await import("./esm-EYV26LOR.js");At=n;let I=c({}).filter(w=>!["BrowserApiErrors","Breadcrumbs","GlobalHandlers"].includes(w.name));De=new s({dsn:"https://1bc3dda4c861f60cd6be1b67584f4bc6@o559187.ingest.us.sentry.io/4507626484203520",transport:v,stackParser:h,integrations:I,environment:ce.mode,release:`web-sdk@${Q}`,debug:ce.debug,sampleRate:.5}),De.init()}function Ge(s,n,h){Y.error(`${n}:`,s),Nt().then(()=>{let c=xt(h);if(c.setTag("operation",n),s instanceof oe){$r(c,s,n);return}c.captureException(s)})}function no(s,n,h){Nt().then(()=>{xt(h).captureMessage(s,n??"error")})}function $r(s,n,h){if(Gr(s,n),n.response){let c=n.response,v=n.responseText;s.setTag("error.message",n.message),c.status!=null&&s.setTag("http.status_code",c.status),c.statusText&&s.setTag("http.status_text",c.statusText),v&&typeof v=="object"&&"error"in v&&(s.setTag("http.error_code",v.error.code),s.setTag("http.error_message",v.error.message)),s.setExtras({responseText:n.responseText,statusText:c.statusText,responseType:c.type,redirected:c.redirected,responseUrl:c.url,originalError:n.message}),s.captureMessage(`${h} failed with ${c.status}`,"error");return}if(n.request){s.captureMessage(`No response was received for ${h}`,"error");return}}function Gr(s,n){let h=n.request;if(!h)return;s.setExtras({body:n.requestBody,headers:h.headers,method:h.method,url:h.url});let c=h.headers?.get("Cooee-Retry-Attempt");c!==null&&s.setTag("retry.attempt",c)}function oo(s){Ct=s}function io(s,n){Ie[s]=ee(ee({},Ie[s]),n)}function ao(s){Se=ee(ee({},Se),s)}function xt(s){s??={};let{extra:n,tags:h}=s,c=new At;if(c.setClient(De),c.setUser(Ct),s.triggerContext&&!s.engagementTrigger&&(s.engagementTrigger=s.triggerContext.triggerData),s.engagementTrigger){let v=s.engagementTrigger;c.setTags({"engagement.id":v.engagementID,"engagement.short_id":v.shortID,"engagement.objective":v.objective,"engagement.delivery_type":v.onsiteDeliveryType,"engagement.content_id":v.contentID,"engagement.variation":v.variation,"engagement.currency":v.currency})}return n&&c.setExtras(n),h&&c.setTags(h),Se&&c.setTags(Se),Object.keys(Ie).forEach(v=>{c.setContext(v,Ie[v])}),c.setTag("language",navigator.language),c.setTag("timezone",_t()),Hr(c),c}function Hr(s){window.Shopify&&(s.setTag("shopify.shop",window.Shopify.shop),s.setTag("shopify.currency",window.Shopify.currency?.active),s.setTag("shopify.locale",window.Shopify.locale),s.setTag("theme.schema_name",window.Shopify.theme?.schema_name),s.setTag("theme.schema_version",window.Shopify.theme?.schema_version))}export{qr as a,Q as b,Kr as c,Xr as d,Jr as e,Qr as f,Zr as g,pt as h,ce as i,ve as j,ye as k,Ee as l,ne as m,_e as n,de as o,oe as p,Kn as q,Ge as r,no as s,oo as t,io as u,ao as v,yt as w,$e as x,yn as y,Nn as z,xn as A,Ln as B,On as C,Or as D,Pn as E,bt as F,Vn as G,Pr as H,Mn as I,Vr as J,Bn as K,Fn as L,Un as M,wt as N,Y as O,Hn as P,Mr as Q,Yn as R,jn as S};