@letscooee/web-sdk 9.8.1 → 9.8.2

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.
@@ -4,7 +4,7 @@ ${t.map((n,r)=>`${r+1}) ${n.toString()}`).join(`
4
4
  `);return r>=0?n.slice(0,r):n}function jw(e,t){return e?t?`${e} ${t}`:e:t||""}var $N=Tt({__forward_ref__:Tt});function Ng(e){return e.__forward_ref__=Ng,e.toString=function(){return mr(this())},e}function kn(e){return Ab(e)?e():e}function Ab(e){return typeof e=="function"&&e.hasOwnProperty($N)&&e.__forward_ref__===Ng}function ne(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function Ag(e){return $w(e,Mb)||$w(e,Ob)}function $w(e,t){return e.hasOwnProperty(t)?e[t]:null}function WN(e){return e&&(e[Mb]||e[Ob])||null}function Ww(e){return e&&(e.hasOwnProperty(Gw)||e.hasOwnProperty(GN))?e[Gw]:null}var Mb=Tt({\u0275prov:Tt}),Gw=Tt({\u0275inj:Tt}),Ob=Tt({ngInjectableDef:Tt}),GN=Tt({ngInjectorDef:Tt}),pe=class{_desc;ngMetadataName="InjectionToken";\u0275prov;constructor(e,t){this._desc=e,this.\u0275prov=void 0,typeof t=="number"?this.__NG_ELEMENT_ID__=t:t!==void 0&&(this.\u0275prov=ne({token:this,providedIn:t.providedIn||"root",factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function Pb(e){return e&&!!e.\u0275providers}var zN=Tt({\u0275cmp:Tt}),qN=Tt({\u0275dir:Tt}),Mg=Tt({\u0275pipe:Tt}),Yu=Tt({\u0275fac:Tt}),Fc=Tt({__NG_ELEMENT_ID__:Tt}),zw=Tt({__NG_ENV_ID__:Tt});function Zc(e){return typeof e=="string"?e:e==null?"":String(e)}function YN(e){return typeof e=="function"?e.name||e.toString():typeof e=="object"&&e!=null&&typeof e.type=="function"?e.type.name||e.type.toString():Zc(e)}function KN(e,t){throw new $e(-200,e)}function Og(e,t){throw new $e(-201,!1)}var Ke=function(e){return e[e.Default=0]="Default",e[e.Host=1]="Host",e[e.Self=2]="Self",e[e.SkipSelf=4]="SkipSelf",e[e.Optional=8]="Optional",e}(Ke||{}),Sm;function kb(){return Sm}function Wn(e){let t=Sm;return Sm=e,t}function Lb(e,t,n){let r=Ag(e);if(r&&r.providedIn=="root")return r.value===void 0?r.value=r.factory():r.value;if(n&Ke.Optional)return null;if(t!==void 0)return t;Og(e,"Injector")}var ZN={},Bc=ZN,XN="__NG_DI_FLAG__",Ku="ngTempTokenPath",JN="ngTokenPath",QN=/\n/gm,eA="\u0275",qw="__source",oa;function tA(){return oa}function oo(e){let t=oa;return oa=e,t}function nA(e,t=Ke.Default){if(oa===void 0)throw new $e(-203,!1);return oa===null?Lb(e,void 0,t):oa.get(e,t&Ke.Optional?null:void 0,t)}function Ze(e,t=Ke.Default){return(kb()||nA)(kn(e),t)}function O(e,t=Ke.Default){return Ze(e,yd(t))}function yd(e){return typeof e>"u"||typeof e=="number"?e:0|(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function Dm(e){let t=[];for(let n=0;n<e.length;n++){let r=kn(e[n]);if(Array.isArray(r)){if(r.length===0)throw new $e(900,!1);let i,s=Ke.Default;for(let o=0;o<r.length;o++){let a=r[o],l=rA(a);typeof l=="number"?l===-1?i=a.token:s|=l:i=a}t.push(Ze(i,s))}else t.push(Ze(r))}return t}function rA(e){return e[XN]}function iA(e,t,n,r){let i=e[Ku];throw t[qw]&&i.unshift(t[qw]),e.message=oA(`
5
5
  `+e.message,i,n,r),e[JN]=i,e[Ku]=null,e}function oA(e,t,n,r=null){e=e&&e.charAt(0)===`
6
6
  `&&e.charAt(1)==eA?e.slice(2):e;let i=mr(t);if(Array.isArray(t))i=t.map(mr).join(" -> ");else if(typeof t=="object"){let s=[];for(let o in t)if(t.hasOwnProperty(o)){let a=t[o];s.push(o+":"+(typeof a=="string"?JSON.stringify(a):mr(a)))}i=`{${s.join(", ")}}`}return`${n}${r?"("+r+")":""}[${i}]: ${e.replace(QN,`
7
- `)}`}function zo(e,t){return e.hasOwnProperty(Yu)?e[Yu]:null}function sA(e,t,n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){let i=e[r],s=t[r];if(n&&(i=n(i),s=n(s)),s!==i)return!1}return!0}function aA(e){return e.flat(Number.POSITIVE_INFINITY)}function Pg(e,t){e.forEach(n=>Array.isArray(n)?Pg(n,t):t(n))}function Fb(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function Zu(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function cA(e,t,n,r){let i=e.length;if(i==t)e.push(n,r);else if(i===1)e.push(r,e[0]),e[0]=n;else{for(i--,e.push(e[i-1],e[i]);i>t;){let s=i-2;e[i]=e[s],i--}e[t]=n,e[t+1]=r}}function lA(e,t,n){let r=Xc(e,t);return r>=0?e[r|1]=n:(r=~r,cA(e,r,t,n)),r}function lm(e,t){let n=Xc(e,t);if(n>=0)return e[n|1]}function Xc(e,t){return uA(e,t,1)}function uA(e,t,n){let r=0,i=e.length>>n;for(;i!==r;){let s=r+(i-r>>1),o=e[s<<n];if(t===o)return s<<n;o>t?i=s:r=s+1}return~(i<<n)}var qo={},xi=[],Vc=new pe(""),Bb=new pe("",-1),Vb=new pe(""),Xu=class{get(e,t=Bc){if(t===Bc){let n=new Error(`NullInjectorError: No provider for ${mr(e)}!`);throw n.name="NullInjectorError",n}return t}};function Yo(e){return e[zN]||null}function Ub(e){return e[qN]||null}function Hb(e){return e[Mg]||null}function dA(e){let t=Yo(e)||Ub(e)||Hb(e);return t!==null&&t.standalone}function jb(e){return{\u0275providers:e}}function fA(...e){return{\u0275providers:$b(!0,e),\u0275fromNgModule:!0}}function $b(e,...t){let n=[],r=new Set,i,s=o=>{n.push(o)};return Pg(t,o=>{let a=o;Im(a,s,[],r)&&(i||=[],i.push(a))}),i!==void 0&&Wb(i,s),n}function Wb(e,t){for(let n=0;n<e.length;n++){let{ngModule:r,providers:i}=e[n];kg(i,s=>{t(s,r)})}}function Im(e,t,n,r){if(e=kn(e),!e)return!1;let i=null,s=Ww(e),o=!s&&Yo(e);if(!s&&!o){let l=e.ngModule;if(s=Ww(l),s)i=l;else return!1}else{if(o&&!o.standalone)return!1;i=e}let a=r.has(i);if(o){if(a)return!1;if(r.add(i),o.dependencies){let l=typeof o.dependencies=="function"?o.dependencies():o.dependencies;for(let c of l)Im(c,t,n,r)}}else if(s){if(s.imports!=null&&!a){r.add(i);let c;try{Pg(s.imports,h=>{Im(h,t,n,r)&&(c||=[],c.push(h))})}finally{}c!==void 0&&Wb(c,t)}if(!a){let c=zo(i)||(()=>new i);t({provide:i,useFactory:c,deps:xi},i),t({provide:Vb,useValue:i,multi:!0},i),t({provide:Vc,useValue:()=>Ze(i),multi:!0},i)}let l=s.providers;if(l!=null&&!a){let c=e;kg(l,h=>{t(h,c)})}}else return!1;return i!==e&&e.providers!==void 0}function kg(e,t){for(let n of e)Pb(n)&&(n=n.\u0275providers),Array.isArray(n)?kg(n,t):t(n)}var pA=Tt({provide:String,useValue:Tt});function Gb(e){return e!==null&&typeof e=="object"&&pA in e}function hA(e){return!!(e&&e.useExisting)}function mA(e){return!!(e&&e.useFactory)}function ca(e){return typeof e=="function"}function gA(e){return!!e.useClass}var vd=new pe(""),ju={},yA={},um;function _d(){return um===void 0&&(um=new Xu),um}var Gn=class{},Uc=class extends Gn{parent;source;scopes;records=new Map;_ngOnDestroyHooks=new Set;_onDestroyHooks=[];get destroyed(){return this._destroyed}_destroyed=!1;injectorDefTypes;constructor(e,t,n,r){super(),this.parent=t,this.source=n,this.scopes=r,xm(e,s=>this.processProvider(s)),this.records.set(Bb,ta(void 0,this)),r.has("environment")&&this.records.set(Gn,ta(void 0,this));let i=this.records.get(vd);i!=null&&typeof i.value=="string"&&this.scopes.add(i.value),this.injectorDefTypes=new Set(this.get(Vb,xi,Ke.Self))}destroy(){kc(this),this._destroyed=!0;let e=je(null);try{for(let n of this._ngOnDestroyHooks)n.ngOnDestroy();let t=this._onDestroyHooks;this._onDestroyHooks=[];for(let n of t)n()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),je(e)}}onDestroy(e){return kc(this),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){kc(this);let t=oo(this),n=Wn(void 0),r;try{return e()}finally{oo(t),Wn(n)}}get(e,t=Bc,n=Ke.Default){if(kc(this),e.hasOwnProperty(zw))return e[zw](this);n=yd(n);let r,i=oo(this),s=Wn(void 0);try{if(!(n&Ke.SkipSelf)){let a=this.records.get(e);if(a===void 0){let l=bA(e)&&Ag(e);l&&this.injectableDefInScope(l)?a=ta(Tm(e),ju):a=null,this.records.set(e,a)}if(a!=null)return this.hydrate(e,a)}let o=n&Ke.Self?_d():this.parent;return t=n&Ke.Optional&&t===Bc?null:t,o.get(e,t)}catch(o){if(o.name==="NullInjectorError"){if((o[Ku]=o[Ku]||[]).unshift(mr(e)),i)throw o;return iA(o,e,"R3InjectorError",this.source)}else throw o}finally{Wn(s),oo(i)}}resolveInjectorInitializers(){let e=je(null),t=oo(this),n=Wn(void 0),r;try{let i=this.get(Vc,xi,Ke.Self);for(let s of i)s()}finally{oo(t),Wn(n),je(e)}}toString(){let e=[],t=this.records;for(let n of t.keys())e.push(mr(n));return`R3Injector[${e.join(", ")}]`}processProvider(e){e=kn(e);let t=ca(e)?e:kn(e&&e.provide),n=_A(e);if(!ca(e)&&e.multi===!0){let r=this.records.get(t);r||(r=ta(void 0,ju,!0),r.factory=()=>Dm(r.multi),this.records.set(t,r)),t=e,r.multi.push(e)}this.records.set(t,n)}hydrate(e,t){let n=je(null);try{return t.value===ju&&(t.value=yA,t.value=t.factory()),typeof t.value=="object"&&t.value&&wA(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{je(n)}}injectableDefInScope(e){if(!e.providedIn)return!1;let t=kn(e.providedIn);return typeof t=="string"?t==="any"||this.scopes.has(t):this.injectorDefTypes.has(t)}removeOnDestroy(e){let t=this._onDestroyHooks.indexOf(e);t!==-1&&this._onDestroyHooks.splice(t,1)}};function Tm(e){let t=Ag(e),n=t!==null?t.factory:zo(e);if(n!==null)return n;if(e instanceof pe)throw new $e(204,!1);if(e instanceof Function)return vA(e);throw new $e(204,!1)}function vA(e){if(e.length>0)throw new $e(204,!1);let t=WN(e);return t!==null?()=>t.factory(e):()=>new e}function _A(e){if(Gb(e))return ta(void 0,e.useValue);{let t=zb(e);return ta(t,ju)}}function zb(e,t,n){let r;if(ca(e)){let i=kn(e);return zo(i)||Tm(i)}else if(Gb(e))r=()=>kn(e.useValue);else if(mA(e))r=()=>e.useFactory(...Dm(e.deps||[]));else if(hA(e))r=()=>Ze(kn(e.useExisting));else{let i=kn(e&&(e.useClass||e.provide));if(EA(e))r=()=>new i(...Dm(e.deps));else return zo(i)||Tm(i)}return r}function kc(e){if(e.destroyed)throw new $e(205,!1)}function ta(e,t,n=!1){return{factory:e,value:t,multi:n?[]:void 0}}function EA(e){return!!e.deps}function wA(e){return e!==null&&typeof e=="object"&&typeof e.ngOnDestroy=="function"}function bA(e){return typeof e=="function"||typeof e=="object"&&e instanceof pe}function xm(e,t){for(let n of e)Array.isArray(n)?xm(n,t):n&&Pb(n)?xm(n.\u0275providers,t):t(n)}function qb(e,t){e instanceof Uc&&kc(e);let n,r=oo(e),i=Wn(void 0);try{return t()}finally{oo(r),Wn(i)}}function Yb(){return kb()!==void 0||tA()!=null}function Kb(e){if(!Yb())throw new $e(-203,!1)}function CA(e){return typeof e=="function"}var Fi=0,_e=1,be=2,Rn=3,Or=4,Lr=5,Hc=6,Ju=7,jt=8,jc=9,Ri=10,sn=11,$c=12,Yw=13,pa=14,Pr=15,Ko=16,na=17,Ni=18,Jc=19,Zb=20,so=21,dm=22,Qu=23,Qn=24,sa=25,Vt=26,Xb=1,Zo=7,ed=8,la=9,xn=10;function Ti(e){return Array.isArray(e)&&typeof e[Xb]=="object"}function Bi(e){return Array.isArray(e)&&e[Xb]===!0}function Lg(e){return(e.flags&4)!==0}function ha(e){return e.componentOffset>-1}function Ed(e){return(e.flags&1)===1}function Kr(e){return!!e.template}function td(e){return(e[be]&512)!==0}function Qc(e){return(e[be]&256)===256}var Rm=class{previousValue;currentValue;firstChange;constructor(e,t,n){this.previousValue=e,this.currentValue=t,this.firstChange=n}isFirstChange(){return this.firstChange}};function Jb(e,t,n,r){t!==null?t.applyValueToInputSignal(t,r):e[n]=r}var ns=(()=>{let e=()=>Qb;return e.ngInherit=!0,e})();function Qb(e){return e.type.prototype.ngOnChanges&&(e.setInput=DA),SA}function SA(){let e=tC(this),t=e?.current;if(t){let n=e.previous;if(n===qo)e.previous=t;else for(let r in t)n[r]=t[r];e.current=null,this.ngOnChanges(t)}}function DA(e,t,n,r,i){let s=this.declaredInputs[r],o=tC(e)||IA(e,{previous:qo,current:null}),a=o.current||(o.current={}),l=o.previous,c=l[s];a[s]=new Rm(c&&c.currentValue,n,l===qo),Jb(e,t,i,n)}var eC="__ngSimpleChanges__";function tC(e){return e[eC]||null}function IA(e,t){return e[eC]=t}var Kw=null,pt=function(e,t=null,n){Kw?.(e,t,n)},nC="svg",TA="math";function er(e){for(;Array.isArray(e);)e=e[Fi];return e}function rC(e,t){return er(t[e])}function Xr(e,t){return er(t[e.index])}function Fg(e,t){return e.data[t]}function wd(e,t){return e[t]}function gr(e,t){let n=t[e];return Ti(n)?n:n[Fi]}function xA(e){return(e[be]&4)===4}function Bg(e){return(e[be]&128)===128}function RA(e){return Bi(e[Rn])}function ao(e,t){return t==null?null:e[t]}function iC(e){e[na]=0}function Vg(e){e[be]&1024||(e[be]|=1024,Bg(e)&&el(e))}function NA(e,t){for(;e>0;)t=t[pa],e--;return t}function bd(e){return!!(e[be]&9216||e[Qn]?.dirty)}function Nm(e){e[Ri].changeDetectionScheduler?.notify(8),e[be]&64&&(e[be]|=1024),bd(e)&&el(e)}function el(e){e[Ri].changeDetectionScheduler?.notify(0);let t=Xo(e);for(;t!==null&&!(t[be]&8192||(t[be]|=8192,!Bg(t)));)t=Xo(t)}function oC(e,t){if(Qc(e))throw new $e(911,!1);e[so]===null&&(e[so]=[]),e[so].push(t)}function AA(e,t){if(e[so]===null)return;let n=e[so].indexOf(t);n!==-1&&e[so].splice(n,1)}function Xo(e){let t=e[Rn];return Bi(t)?t[Rn]:t}function sC(e){return e[Ju]??=[]}function aC(e){return e.cleanup??=[]}function MA(e,t,n,r){let i=sC(t);i.push(n),e.firstCreatePass&&aC(e).push(r,i.length-1)}var xe={lFrame:mC(null),bindingsEnabled:!0,skipHydrationRootTNode:null},Am=!1;function OA(){return xe.lFrame.elementDepthCount}function PA(){xe.lFrame.elementDepthCount++}function kA(){xe.lFrame.elementDepthCount--}function Ug(){return xe.bindingsEnabled}function LA(){return xe.skipHydrationRootTNode!==null}function FA(e){return xe.skipHydrationRootTNode===e}function BA(){xe.skipHydrationRootTNode=null}function Fe(){return xe.lFrame.lView}function Zt(){return xe.lFrame.tView}function Xt(e){return xe.lFrame.contextLView=e,e[jt]}function Jt(e){return xe.lFrame.contextLView=null,e}function tr(){let e=cC();for(;e!==null&&e.type===64;)e=e.parent;return e}function cC(){return xe.lFrame.currentTNode}function VA(){let e=xe.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}function lo(e,t){let n=xe.lFrame;n.currentTNode=e,n.isParent=t}function Hg(){return xe.lFrame.isParent}function lC(){xe.lFrame.isParent=!1}function uC(){return xe.lFrame.contextLView}function dC(){return Am}function Zw(e){let t=Am;return Am=e,t}function jg(){let e=xe.lFrame,t=e.bindingRootIndex;return t===-1&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function UA(e){return xe.lFrame.bindingIndex=e}function tl(){return xe.lFrame.bindingIndex++}function HA(e){let t=xe.lFrame,n=t.bindingIndex;return t.bindingIndex=t.bindingIndex+e,n}function jA(){return xe.lFrame.inI18n}function $A(e,t){let n=xe.lFrame;n.bindingIndex=n.bindingRootIndex=e,Mm(t)}function WA(){return xe.lFrame.currentDirectiveIndex}function Mm(e){xe.lFrame.currentDirectiveIndex=e}function GA(e){let t=xe.lFrame.currentDirectiveIndex;return t===-1?null:e[t]}function fC(){return xe.lFrame.currentQueryIndex}function $g(e){xe.lFrame.currentQueryIndex=e}function zA(e){let t=e[_e];return t.type===2?t.declTNode:t.type===1?e[Lr]:null}function pC(e,t,n){if(n&Ke.SkipSelf){let i=t,s=e;for(;(i=i.parent,i===null&&!(n&Ke.Host))&&(i=zA(s),!(i===null||(s=s[pa],i.type&10))););if(i===null)return!1;t=i,e=s}let r=xe.lFrame=hC();return r.currentTNode=t,r.lView=e,!0}function Wg(e){let t=hC(),n=e[_e];xe.lFrame=t,t.currentTNode=n.firstChild,t.lView=e,t.tView=n,t.contextLView=e,t.bindingIndex=n.bindingStartIndex,t.inI18n=!1}function hC(){let e=xe.lFrame,t=e===null?null:e.child;return t===null?mC(e):t}function mC(e){let t={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:e,child:null,inI18n:!1};return e!==null&&(e.child=t),t}function gC(){let e=xe.lFrame;return xe.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}var yC=gC;function Gg(){let e=gC();e.isParent=!0,e.tView=null,e.selectedIndex=-1,e.contextLView=null,e.elementDepthCount=0,e.currentDirectiveIndex=-1,e.currentNamespace=null,e.bindingRootIndex=-1,e.bindingIndex=-1,e.currentQueryIndex=0}function qA(e){return(xe.lFrame.contextLView=NA(e,xe.lFrame.contextLView))[jt]}function uo(){return xe.lFrame.selectedIndex}function Jo(e){xe.lFrame.selectedIndex=e}function zg(){let e=xe.lFrame;return Fg(e.tView,e.selectedIndex)}function vr(){xe.lFrame.currentNamespace=nC}function rs(){YA()}function YA(){xe.lFrame.currentNamespace=null}function KA(){return xe.lFrame.currentNamespace}var vC=!0;function Cd(){return vC}function Sd(e){vC=e}function ZA(e,t,n){let{ngOnChanges:r,ngOnInit:i,ngDoCheck:s}=t.type.prototype;if(r){let o=Qb(t);(n.preOrderHooks??=[]).push(e,o),(n.preOrderCheckHooks??=[]).push(e,o)}i&&(n.preOrderHooks??=[]).push(0-e,i),s&&((n.preOrderHooks??=[]).push(e,s),(n.preOrderCheckHooks??=[]).push(e,s))}function qg(e,t){for(let n=t.directiveStart,r=t.directiveEnd;n<r;n++){let i=e.data[n].type.prototype,{ngAfterContentInit:s,ngAfterContentChecked:o,ngAfterViewInit:a,ngAfterViewChecked:l,ngOnDestroy:c}=i;s&&(e.contentHooks??=[]).push(-n,s),o&&((e.contentHooks??=[]).push(n,o),(e.contentCheckHooks??=[]).push(n,o)),a&&(e.viewHooks??=[]).push(-n,a),l&&((e.viewHooks??=[]).push(n,l),(e.viewCheckHooks??=[]).push(n,l)),c!=null&&(e.destroyHooks??=[]).push(n,c)}}function $u(e,t,n){_C(e,t,3,n)}function Wu(e,t,n,r){(e[be]&3)===n&&_C(e,t,n,r)}function fm(e,t){let n=e[be];(n&3)===t&&(n&=16383,n+=1,e[be]=n)}function _C(e,t,n,r){let i=r!==void 0?e[na]&65535:0,s=r??-1,o=t.length-1,a=0;for(let l=i;l<o;l++)if(typeof t[l+1]=="number"){if(a=t[l],r!=null&&a>=r)break}else t[l]<0&&(e[na]+=65536),(a<s||s==-1)&&(XA(e,n,t,l),e[na]=(e[na]&4294901760)+l+2),l++}function Xw(e,t){pt(4,e,t);let n=je(null);try{t.call(e)}finally{je(n),pt(5,e,t)}}function XA(e,t,n,r){let i=n[r]<0,s=n[r+1],o=i?-n[r]:n[r],a=e[o];i?e[be]>>14<e[na]>>16&&(e[be]&3)===t&&(e[be]+=16384,Xw(a,s)):Xw(a,s)}var aa=-1,Qo=class{factory;injectImpl;resolving=!1;canSeeViewProviders;multi;componentProviders;index;providerFactory;constructor(e,t,n){this.factory=e,this.canSeeViewProviders=t,this.injectImpl=n}};function JA(e){return e instanceof Qo}function QA(e){return(e.flags&8)!==0}function eM(e){return(e.flags&16)!==0}function tM(e,t,n){let r=0;for(;r<n.length;){let i=n[r];if(typeof i=="number"){if(i!==0)break;r++;let s=n[r++],o=n[r++],a=n[r++];e.setAttribute(t,o,a,s)}else{let s=i,o=n[++r];rM(s)?e.setProperty(t,s,o):e.setAttribute(t,s,o),r++}}return r}function nM(e){return e===3||e===4||e===6}function rM(e){return e.charCodeAt(0)===64}function ua(e,t){if(!(t===null||t.length===0))if(e===null||e.length===0)e=t.slice();else{let n=-1;for(let r=0;r<t.length;r++){let i=t[r];typeof i=="number"?n=i:n===0||(n===-1||n===2?Jw(e,n,i,null,t[++r]):Jw(e,n,i,null,null))}}return e}function Jw(e,t,n,r,i){let s=0,o=e.length;if(t===-1)o=-1;else for(;s<e.length;){let a=e[s++];if(typeof a=="number"){if(a===t){o=-1;break}else if(a>t){o=s-1;break}}}for(;s<e.length;){let a=e[s];if(typeof a=="number")break;if(a===n){if(r===null){i!==null&&(e[s+1]=i);return}else if(r===e[s+1]){e[s+2]=i;return}}s++,r!==null&&s++,i!==null&&s++}o!==-1&&(e.splice(o,0,t),s=o+1),e.splice(s++,0,n),r!==null&&e.splice(s++,0,r),i!==null&&e.splice(s++,0,i)}var pm={},Om=class{injector;parentInjector;constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,n){n=yd(n);let r=this.injector.get(e,pm,n);return r!==pm||t===pm?r:this.parentInjector.get(e,t,n)}};function EC(e){return e!==aa}function nd(e){return e&32767}function iM(e){return e>>16}function rd(e,t){let n=iM(e),r=t;for(;n>0;)r=r[pa],n--;return r}var Pm=!0;function id(e){let t=Pm;return Pm=e,t}var oM=256,wC=oM-1,bC=5,sM=0,qr={};function aM(e,t,n){let r;typeof n=="string"?r=n.charCodeAt(0)||0:n.hasOwnProperty(Fc)&&(r=n[Fc]),r==null&&(r=n[Fc]=sM++);let i=r&wC,s=1<<i;t.data[e+(i>>bC)]|=s}function od(e,t){let n=CC(e,t);if(n!==-1)return n;let r=t[_e];r.firstCreatePass&&(e.injectorIndex=t.length,hm(r.data,e),hm(t,null),hm(r.blueprint,null));let i=Yg(e,t),s=e.injectorIndex;if(EC(i)){let o=nd(i),a=rd(i,t),l=a[_e].data;for(let c=0;c<8;c++)t[s+c]=a[o+c]|l[o+c]}return t[s+8]=i,s}function hm(e,t){e.push(0,0,0,0,0,0,0,0,t)}function CC(e,t){return e.injectorIndex===-1||e.parent&&e.parent.injectorIndex===e.injectorIndex||t[e.injectorIndex+8]===null?-1:e.injectorIndex}function Yg(e,t){if(e.parent&&e.parent.injectorIndex!==-1)return e.parent.injectorIndex;let n=0,r=null,i=t;for(;i!==null;){if(r=xC(i),r===null)return aa;if(n++,i=i[pa],r.injectorIndex!==-1)return r.injectorIndex|n<<16}return aa}function km(e,t,n){aM(e,t,n)}function SC(e,t,n){if(n&Ke.Optional||e!==void 0)return e;Og(t,"NodeInjector")}function DC(e,t,n,r){if(n&Ke.Optional&&r===void 0&&(r=null),(n&(Ke.Self|Ke.Host))===0){let i=e[jc],s=Wn(void 0);try{return i?i.get(t,r,n&Ke.Optional):Lb(t,r,n&Ke.Optional)}finally{Wn(s)}}return SC(r,t,n)}function IC(e,t,n,r=Ke.Default,i){if(e!==null){if(t[be]&2048&&!(r&Ke.Self)){let o=dM(e,t,n,r,qr);if(o!==qr)return o}let s=TC(e,t,n,r,qr);if(s!==qr)return s}return DC(t,n,r,i)}function TC(e,t,n,r,i){let s=lM(n);if(typeof s=="function"){if(!pC(t,e,r))return r&Ke.Host?SC(i,n,r):DC(t,n,r,i);try{let o;if(o=s(r),o==null&&!(r&Ke.Optional))Og(n);else return o}finally{yC()}}else if(typeof s=="number"){let o=null,a=CC(e,t),l=aa,c=r&Ke.Host?t[Pr][Lr]:null;for((a===-1||r&Ke.SkipSelf)&&(l=a===-1?Yg(e,t):t[a+8],l===aa||!eb(r,!1)?a=-1:(o=t[_e],a=nd(l),t=rd(l,t)));a!==-1;){let h=t[_e];if(Qw(s,a,h.data)){let d=cM(a,t,n,o,r,c);if(d!==qr)return d}l=t[a+8],l!==aa&&eb(r,t[_e].data[a+8]===c)&&Qw(s,a,t)?(o=h,a=nd(l),t=rd(l,t)):a=-1}}return i}function cM(e,t,n,r,i,s){let o=t[_e],a=o.data[e+8],l=r==null?ha(a)&&Pm:r!=o&&(a.type&3)!==0,c=i&Ke.Host&&s===a,h=Gu(a,o,n,l,c);return h!==null?Wc(t,o,h,a):qr}function Gu(e,t,n,r,i){let s=e.providerIndexes,o=t.data,a=s&1048575,l=e.directiveStart,c=e.directiveEnd,h=s>>20,d=r?a:a+h,f=i?a+h:c;for(let g=d;g<f;g++){let m=o[g];if(g<l&&n===m||g>=l&&m.type===n)return g}if(i){let g=o[l];if(g&&Kr(g)&&g.type===n)return l}return null}function Wc(e,t,n,r){let i=e[n],s=t.data;if(JA(i)){let o=i;o.resolving&&KN(YN(s[n]));let a=id(o.canSeeViewProviders);o.resolving=!0;let l,c=o.injectImpl?Wn(o.injectImpl):null,h=pC(e,r,Ke.Default);try{i=e[n]=o.factory(void 0,s,e,r),t.firstCreatePass&&n>=r.directiveStart&&ZA(n,s[n],t)}finally{c!==null&&Wn(c),id(a),o.resolving=!1,yC()}}return i}function lM(e){if(typeof e=="string")return e.charCodeAt(0)||0;let t=e.hasOwnProperty(Fc)?e[Fc]:void 0;return typeof t=="number"?t>=0?t&wC:uM:t}function Qw(e,t,n){let r=1<<e;return!!(n[t+(e>>bC)]&r)}function eb(e,t){return!(e&Ke.Self)&&!(e&Ke.Host&&t)}var Wo=class{_tNode;_lView;constructor(e,t){this._tNode=e,this._lView=t}get(e,t,n){return IC(this._tNode,this._lView,e,yd(n),t)}};function uM(){return new Wo(tr(),Fe())}function Dd(e){return Rg(()=>{let t=e.prototype.constructor,n=t[Yu]||Lm(t),r=Object.prototype,i=Object.getPrototypeOf(e.prototype).constructor;for(;i&&i!==r;){let s=i[Yu]||Lm(i);if(s&&s!==n)return s;i=Object.getPrototypeOf(i)}return s=>new s})}function Lm(e){return Ab(e)?()=>{let t=Lm(kn(e));return t&&t()}:zo(e)}function dM(e,t,n,r,i){let s=e,o=t;for(;s!==null&&o!==null&&o[be]&2048&&!td(o);){let a=TC(s,o,n,r|Ke.Self,qr);if(a!==qr)return a;let l=s.parent;if(!l){let c=o[Zb];if(c){let h=c.get(n,qr,r);if(h!==qr)return h}l=xC(o),o=o[pa]}s=l}return i}function xC(e){let t=e[_e],n=t.type;return n===2?t.declTNode:n===1?e[Lr]:null}function tb(e,t=null,n=null,r){let i=fM(e,t,n,r);return i.resolveInjectorInitializers(),i}function fM(e,t=null,n=null,r,i=new Set){let s=[n||xi,fA(e)];return r=r||(typeof e=="object"?void 0:mr(e)),new Uc(s,t||_d(),r||null,i)}var ht=class GE{static THROW_IF_NOT_FOUND=Bc;static NULL=new Xu;static create(t,n){if(Array.isArray(t))return tb({name:""},n,t,"");{let r=t.name??"";return tb({name:r},t.parent,t.providers,r)}}static \u0275prov=ne({token:GE,providedIn:"any",factory:()=>Ze(Bb)});static __NG_ELEMENT_ID__=-1},pM=new pe("");pM.__NG_ELEMENT_ID__=e=>{let t=tr();if(t===null)throw new $e(204,!1);if(t.type&2)return t.value;if(e&Ke.Optional)return null;throw new $e(204,!1)};var RC=!1,Kg=(()=>{class e{static __NG_ELEMENT_ID__=hM;static __NG_ENV_ID__=n=>n}return e})(),Fm=class extends Kg{_lView;constructor(e){super(),this._lView=e}onDestroy(e){return oC(this._lView,e),()=>AA(this._lView,e)}};function hM(){return new Fm(Fe())}var Ai=class{},Id=new pe("",{providedIn:"root",factory:()=>!1}),NC=new pe(""),Zg=new pe(""),Td=(()=>{class e{taskId=0;pendingTasks=new Set;get _hasPendingTasks(){return this.hasPendingTasks.value}hasPendingTasks=new Nr(!1);add(){this._hasPendingTasks||this.hasPendingTasks.next(!0);let n=this.taskId++;return this.pendingTasks.add(n),n}has(n){return this.pendingTasks.has(n)}remove(n){this.pendingTasks.delete(n),this.pendingTasks.size===0&&this._hasPendingTasks&&this.hasPendingTasks.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this._hasPendingTasks&&this.hasPendingTasks.next(!1)}static \u0275prov=ne({token:e,providedIn:"root",factory:()=>new e})}return e})(),Bm=class extends J{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(e=!1){super(),this.__isAsync=e,Yb()&&(this.destroyRef=O(Kg,{optional:!0})??void 0,this.pendingTasks=O(Td,{optional:!0})??void 0)}emit(e){let t=je(null);try{super.next(e)}finally{je(t)}}subscribe(e,t,n){let r=e,i=t||(()=>null),s=n;if(e&&typeof e=="object"){let a=e;r=a.next?.bind(a),i=a.error?.bind(a),s=a.complete?.bind(a)}this.__isAsync&&(i=this.wrapInTimeout(i),r&&(r=this.wrapInTimeout(r)),s&&(s=this.wrapInTimeout(s)));let o=super.subscribe({next:r,error:i,complete:s});return e instanceof ot&&e.add(o),o}wrapInTimeout(e){return t=>{let n=this.pendingTasks?.add();setTimeout(()=>{e(t),n!==void 0&&this.pendingTasks?.remove(n)})}}},Je=Bm;function sd(...e){}function AC(e){let t,n;function r(){e=sd;try{n!==void 0&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(n),t!==void 0&&clearTimeout(t)}catch{}}return t=setTimeout(()=>{e(),r()}),typeof requestAnimationFrame=="function"&&(n=requestAnimationFrame(()=>{e(),r()})),()=>r()}function nb(e){return queueMicrotask(()=>e()),()=>{e=sd}}var Xg="isAngularZone",ad=Xg+"_ID",mM=0,Le=class Yd{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new Je(!1);onMicrotaskEmpty=new Je(!1);onStable=new Je(!1);onError=new Je(!1);constructor(t){let{enableLongStackTrace:n=!1,shouldCoalesceEventChangeDetection:r=!1,shouldCoalesceRunChangeDetection:i=!1,scheduleInRootZone:s=RC}=t;if(typeof Zone>"u")throw new $e(908,!1);Zone.assertZonePatched();let o=this;o._nesting=0,o._outer=o._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(o._inner=o._inner.fork(new Zone.TaskTrackingZoneSpec)),n&&Zone.longStackTraceZoneSpec&&(o._inner=o._inner.fork(Zone.longStackTraceZoneSpec)),o.shouldCoalesceEventChangeDetection=!i&&r,o.shouldCoalesceRunChangeDetection=i,o.callbackScheduled=!1,o.scheduleInRootZone=s,vM(o)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get(Xg)===!0}static assertInAngularZone(){if(!Yd.isInAngularZone())throw new $e(909,!1)}static assertNotInAngularZone(){if(Yd.isInAngularZone())throw new $e(909,!1)}run(t,n,r){return this._inner.run(t,n,r)}runTask(t,n,r,i){let s=this._inner,o=s.scheduleEventTask("NgZoneEvent: "+i,t,gM,sd,sd);try{return s.runTask(o,n,r)}finally{s.cancelTask(o)}}runGuarded(t,n,r){return this._inner.runGuarded(t,n,r)}runOutsideAngular(t){return this._outer.run(t)}},gM={};function Jg(e){if(e._nesting==0&&!e.hasPendingMicrotasks&&!e.isStable)try{e._nesting++,e.onMicrotaskEmpty.emit(null)}finally{if(e._nesting--,!e.hasPendingMicrotasks)try{e.runOutsideAngular(()=>e.onStable.emit(null))}finally{e.isStable=!0}}}function yM(e){if(e.isCheckStableRunning||e.callbackScheduled)return;e.callbackScheduled=!0;function t(){AC(()=>{e.callbackScheduled=!1,Vm(e),e.isCheckStableRunning=!0,Jg(e),e.isCheckStableRunning=!1})}e.scheduleInRootZone?Zone.root.run(()=>{t()}):e._outer.run(()=>{t()}),Vm(e)}function vM(e){let t=()=>{yM(e)},n=mM++;e._inner=e._inner.fork({name:"angular",properties:{[Xg]:!0,[ad]:n,[ad+n]:!0},onInvokeTask:(r,i,s,o,a,l)=>{if(_M(l))return r.invokeTask(s,o,a,l);try{return rb(e),r.invokeTask(s,o,a,l)}finally{(e.shouldCoalesceEventChangeDetection&&o.type==="eventTask"||e.shouldCoalesceRunChangeDetection)&&t(),ib(e)}},onInvoke:(r,i,s,o,a,l,c)=>{try{return rb(e),r.invoke(s,o,a,l,c)}finally{e.shouldCoalesceRunChangeDetection&&!e.callbackScheduled&&!EM(l)&&t(),ib(e)}},onHasTask:(r,i,s,o)=>{r.hasTask(s,o),i===s&&(o.change=="microTask"?(e._hasPendingMicrotasks=o.microTask,Vm(e),Jg(e)):o.change=="macroTask"&&(e.hasPendingMacrotasks=o.macroTask))},onHandleError:(r,i,s,o)=>(r.handleError(s,o),e.runOutsideAngular(()=>e.onError.emit(o)),!1)})}function Vm(e){e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&e.callbackScheduled===!0?e.hasPendingMicrotasks=!0:e.hasPendingMicrotasks=!1}function rb(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function ib(e){e._nesting--,Jg(e)}var cd=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new Je;onMicrotaskEmpty=new Je;onStable=new Je;onError=new Je;run(e,t,n){return e.apply(t,n)}runGuarded(e,t,n){return e.apply(t,n)}runOutsideAngular(e){return e()}runTask(e,t,n,r){return e.apply(t,n)}};function _M(e){return MC(e,"__ignore_ng_zone__")}function EM(e){return MC(e,"__scheduler_tick__")}function MC(e,t){return!Array.isArray(e)||e.length!==1?!1:e[0]?.data?.[t]===!0}var Mi=class{_console=console;handleError(e){this._console.error("ERROR",e)}},wM=new pe("",{providedIn:"root",factory:()=>{let e=O(Le),t=O(Mi);return n=>e.runOutsideAngular(()=>t.handleError(n))}});function bM(){return ma(tr(),Fe())}function ma(e,t){return new Ct(Xr(e,t))}var Ct=(()=>{class e{nativeElement;constructor(n){this.nativeElement=n}static __NG_ELEMENT_ID__=bM}return e})();function CM(e){return e instanceof Ct?e.nativeElement:e}function Vi(e,t){let n=dw(e),r=n[bi];return t?.equal&&(r.equal=t.equal),n.set=i=>Zh(r,i),n.update=i=>fw(r,i),n.asReadonly=SM.bind(n),n}function SM(){let e=this[bi];if(e.readonlyFn===void 0){let t=()=>this();t[bi]=e,e.readonlyFn=t}return e.readonlyFn}function DM(){return this._results[Symbol.iterator]()}var Um=class{_emitDistinctChangesOnly;dirty=!0;_onDirty=void 0;_results=[];_changesDetected=!1;_changes=void 0;length=0;first=void 0;last=void 0;get changes(){return this._changes??=new J}constructor(e=!1){this._emitDistinctChangesOnly=e}get(e){return this._results[e]}map(e){return this._results.map(e)}filter(e){return this._results.filter(e)}find(e){return this._results.find(e)}reduce(e,t){return this._results.reduce(e,t)}forEach(e){this._results.forEach(e)}some(e){return this._results.some(e)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(e,t){this.dirty=!1;let n=aA(e);(this._changesDetected=!sA(this._results,n,t))&&(this._results=n,this.length=n.length,this.last=n[this.length-1],this.first=n[0])}notifyOnChanges(){this._changes!==void 0&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.next(this)}onDirty(e){this._onDirty=e}setDirty(){this.dirty=!0,this._onDirty?.()}destroy(){this._changes!==void 0&&(this._changes.complete(),this._changes.unsubscribe())}[Symbol.iterator]=DM};function OC(e){return(e.flags&128)===128}var PC=function(e){return e[e.OnPush=0]="OnPush",e[e.Default=1]="Default",e}(PC||{}),Qg=new Map,IM=0;function TM(){return IM++}function xM(e){Qg.set(e[Jc],e)}function kC(e){return Qg.get(e)||null}function Hm(e){Qg.delete(e[Jc])}var jm=class{lViewId;nodeIndex;native;component;directives;localRefs;get lView(){return kC(this.lViewId)}constructor(e,t,n){this.lViewId=e,this.nodeIndex=t,this.native=n}};function LC(e){let t=mm(e);if(t){if(Ti(t)){let n=t,r,i,s;if(FC(e)){if(r=AM(n,e),r==-1)throw new Error("The provided component was not found in the application");i=e}else if(RM(e)){if(r=MM(n,e),r==-1)throw new Error("The provided directive was not found in the application");s=OM(r,n)}else if(r=sb(n,e),r==-1)return null;let o=er(n[r]),a=mm(o),l=a&&!Array.isArray(a)?a:ob(n,r,o);if(i&&l.component===void 0&&(l.component=i,Yr(l.component,l)),s&&l.directives===void 0){l.directives=s;for(let c=0;c<s.length;c++)Yr(s[c],l)}Yr(l.native,l),t=l}}else{let n=e,r=n;for(;r=r.parentNode;){let i=mm(r);if(i){let s=Array.isArray(i)?i:i.lView;if(!s)return null;let o=sb(s,n);if(o>=0){let a=er(s[o]),l=ob(s,o,a);Yr(a,l),t=l;break}}}}return t||null}function ob(e,t,n){return new jm(e[Jc],t,n)}var $m="__ngContext__";function Yr(e,t){Ti(t)?(e[$m]=t[Jc],xM(t)):e[$m]=t}function mm(e){let t=e[$m];return typeof t=="number"?kC(t):t||null}function FC(e){return e&&e.constructor&&e.constructor.\u0275cmp}function RM(e){return e&&e.constructor&&e.constructor.\u0275dir}function sb(e,t){let n=e[_e];for(let r=Vt;r<n.bindingStartIndex;r++)if(er(e[r])===t)return r;return-1}function NM(e){if(e.child)return e.child;if(e.next)return e.next;for(;e.parent&&!e.parent.next;)e=e.parent;return e.parent&&e.parent.next}function AM(e,t){let n=e[_e].components;if(n)for(let r=0;r<n.length;r++){let i=n[r];if(gr(i,e)[jt]===t)return i}else if(gr(Vt,e)[jt]===t)return Vt;return-1}function MM(e,t){let n=e[_e].firstChild;for(;n;){let r=n.directiveStart,i=n.directiveEnd;for(let s=r;s<i;s++)if(e[s]===t)return n.index;n=NM(n)}return-1}function OM(e,t){let n=t[_e].data[e];if(n.directiveStart===0)return xi;let r=[];for(let i=n.directiveStart;i<n.directiveEnd;i++){let s=t[i];FC(s)||r.push(s)}return r}function BC(e){return UC(e[$c])}function VC(e){return UC(e[Or])}function UC(e){for(;e!==null&&!Bi(e);)e=e[Or];return e}var Wm;function HC(e){Wm=e}function jC(){if(Wm!==void 0)return Wm;if(typeof document<"u")return document;throw new $e(210,!1)}var nl=new pe("",{providedIn:"root",factory:()=>PM}),PM="ng",ey=new pe(""),is=new pe("",{providedIn:"platform",factory:()=>"unknown"}),$C=new pe(""),ty=new pe("",{providedIn:"root",factory:()=>jC().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null}),kM="h",LM="b",WC=!1,FM=new pe("",{providedIn:"root",factory:()=>WC}),ny=function(e){return e[e.CHANGE_DETECTION=0]="CHANGE_DETECTION",e[e.AFTER_NEXT_RENDER=1]="AFTER_NEXT_RENDER",e}(ny||{}),ga=new pe(""),ab=new Set;function fo(e){ab.has(e)||(ab.add(e),performance?.mark?.("mark_feature_usage",{detail:{feature:e}}))}var GC=(()=>{class e{view;node;constructor(n,r){this.view=n,this.node=r}static __NG_ELEMENT_ID__=BM}return e})();function BM(){return new GC(Fe(),tr())}var ra=function(e){return e[e.EarlyRead=0]="EarlyRead",e[e.Write=1]="Write",e[e.MixedReadWrite=2]="MixedReadWrite",e[e.Read=3]="Read",e}(ra||{}),zC=(()=>{class e{impl=null;execute(){this.impl?.execute()}static \u0275prov=ne({token:e,providedIn:"root",factory:()=>new e})}return e})(),VM=[ra.EarlyRead,ra.Write,ra.MixedReadWrite,ra.Read],UM=(()=>{class e{ngZone=O(Le);scheduler=O(Ai);errorHandler=O(Mi,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){O(ga,{optional:!0})}execute(){let n=this.sequences.size>0;n&&pt(16),this.executing=!0;for(let r of VM)for(let i of this.sequences)if(!(i.erroredOrDestroyed||!i.hooks[r]))try{i.pipelinedValue=this.ngZone.runOutsideAngular(()=>this.maybeTrace(()=>{let s=i.hooks[r];return s(i.pipelinedValue)},i.snapshot))}catch(s){i.erroredOrDestroyed=!0,this.errorHandler?.handleError(s)}this.executing=!1;for(let r of this.sequences)r.afterRun(),r.once&&(this.sequences.delete(r),r.destroy());for(let r of this.deferredRegistrations)this.sequences.add(r);this.deferredRegistrations.size>0&&this.scheduler.notify(7),this.deferredRegistrations.clear(),n&&pt(17)}register(n){let{view:r}=n;r!==void 0?((r[sa]??=[]).push(n),el(r),r[be]|=8192):this.executing?this.deferredRegistrations.add(n):this.addSequence(n)}addSequence(n){this.sequences.add(n),this.scheduler.notify(7)}unregister(n){this.executing&&this.sequences.has(n)?(n.erroredOrDestroyed=!0,n.pipelinedValue=void 0,n.once=!0):(this.sequences.delete(n),this.deferredRegistrations.delete(n))}maybeTrace(n,r){return r?r.run(ny.AFTER_NEXT_RENDER,n):n()}static \u0275prov=ne({token:e,providedIn:"root",factory:()=>new e})}return e})(),Gm=class{impl;hooks;view;once;snapshot;erroredOrDestroyed=!1;pipelinedValue=void 0;unregisterOnDestroy;constructor(e,t,n,r,i,s=null){this.impl=e,this.hooks=t,this.view=n,this.once=r,this.snapshot=s,this.unregisterOnDestroy=i?.onDestroy(()=>this.destroy())}afterRun(){this.erroredOrDestroyed=!1,this.pipelinedValue=void 0,this.snapshot?.dispose(),this.snapshot=null}destroy(){this.impl.unregister(this),this.unregisterOnDestroy?.();let e=this.view?.[sa];e&&(this.view[sa]=e.filter(t=>t!==this))}};function ry(e,t){!t?.injector&&Kb(ry);let n=t?.injector??O(ht);return fo("NgAfterRender"),qC(e,n,t,!1)}function Jr(e,t){!t?.injector&&Kb(Jr);let n=t?.injector??O(ht);return fo("NgAfterNextRender"),qC(e,n,t,!0)}function HM(e,t){if(e instanceof Function){let n=[void 0,void 0,void 0,void 0];return n[t]=e,n}else return[e.earlyRead,e.write,e.mixedReadWrite,e.read]}function qC(e,t,n,r){let i=t.get(zC);i.impl??=t.get(UM);let s=t.get(ga,null,{optional:!0}),o=n?.phase??ra.MixedReadWrite,a=n?.manualCleanup!==!0?t.get(Kg):null,l=t.get(GC,null,{optional:!0}),c=new Gm(i.impl,HM(e,o),l?.view,r,a,s?.snapshot(null));return i.impl.register(c),c}var jM=()=>null;function YC(e,t,n=!1){return jM(e,t,n)}function KC(e,t){let n=e.contentQueries;if(n!==null){let r=je(null);try{for(let i=0;i<n.length;i+=2){let s=n[i],o=n[i+1];if(o!==-1){let a=e.data[o];$g(s),a.contentQueries(2,t[o],o)}}}finally{je(r)}}}function zm(e,t,n){$g(0);let r=je(null);try{t(e,n)}finally{je(r)}}function iy(e,t,n){if(Lg(t)){let r=je(null);try{let i=t.directiveStart,s=t.directiveEnd;for(let o=i;o<s;o++){let a=e.data[o];if(a.contentQueries){let l=n[o];a.contentQueries(1,l,o)}}}finally{je(r)}}}var Zr=function(e){return e[e.Emulated=0]="Emulated",e[e.None=2]="None",e[e.ShadowDom=3]="ShadowDom",e}(Zr||{}),Bu;function $M(){if(Bu===void 0&&(Bu=null,Go.trustedTypes))try{Bu=Go.trustedTypes.createPolicy("angular",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch{}return Bu}function xd(e){return $M()?.createHTML(e)||e}var Vu;function WM(){if(Vu===void 0&&(Vu=null,Go.trustedTypes))try{Vu=Go.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch{}return Vu}function cb(e){return WM()?.createHTML(e)||e}var Oi=class{changingThisBreaksApplicationSecurity;constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${Nb})`}},qm=class extends Oi{getTypeName(){return"HTML"}},Ym=class extends Oi{getTypeName(){return"Style"}},Km=class extends Oi{getTypeName(){return"Script"}},Zm=class extends Oi{getTypeName(){return"URL"}},Xm=class extends Oi{getTypeName(){return"ResourceURL"}};function Qr(e){return e instanceof Oi?e.changingThisBreaksApplicationSecurity:e}function po(e,t){let n=GM(e);if(n!=null&&n!==t){if(n==="ResourceURL"&&t==="URL")return!0;throw new Error(`Required a safe ${t}, got a ${n} (see ${Nb})`)}return n===t}function GM(e){return e instanceof Oi&&e.getTypeName()||null}function ZC(e){return new qm(e)}function XC(e){return new Ym(e)}function JC(e){return new Km(e)}function QC(e){return new Zm(e)}function eS(e){return new Xm(e)}function zM(e){let t=new Qm(e);return qM()?new Jm(t):t}var Jm=class{inertDocumentHelper;constructor(e){this.inertDocumentHelper=e}getInertBodyElement(e){e="<body><remove></remove>"+e;try{let t=new window.DOMParser().parseFromString(xd(e),"text/html").body;return t===null?this.inertDocumentHelper.getInertBodyElement(e):(t.firstChild?.remove(),t)}catch{return null}}},Qm=class{defaultDoc;inertDocument;constructor(e){this.defaultDoc=e,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(e){let t=this.inertDocument.createElement("template");return t.innerHTML=xd(e),t}};function qM(){try{return!!new window.DOMParser().parseFromString(xd(""),"text/html")}catch{return!1}}var YM=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function Rd(e){return e=String(e),e.match(YM)?e:"unsafe:"+e}function Ui(e){let t={};for(let n of e.split(","))t[n]=!0;return t}function rl(...e){let t={};for(let n of e)for(let r in n)n.hasOwnProperty(r)&&(t[r]=!0);return t}var tS=Ui("area,br,col,hr,img,wbr"),nS=Ui("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),rS=Ui("rp,rt"),KM=rl(rS,nS),ZM=rl(nS,Ui("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),XM=rl(rS,Ui("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),lb=rl(tS,ZM,XM,KM),iS=Ui("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),JM=Ui("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),QM=Ui("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext"),eO=rl(iS,JM,QM),tO=Ui("script,style,template"),eg=class{sanitizedSomething=!1;buf=[];sanitizeChildren(e){let t=e.firstChild,n=!0,r=[];for(;t;){if(t.nodeType===Node.ELEMENT_NODE?n=this.startElement(t):t.nodeType===Node.TEXT_NODE?this.chars(t.nodeValue):this.sanitizedSomething=!0,n&&t.firstChild){r.push(t),t=iO(t);continue}for(;t;){t.nodeType===Node.ELEMENT_NODE&&this.endElement(t);let i=rO(t);if(i){t=i;break}t=r.pop()}}return this.buf.join("")}startElement(e){let t=ub(e).toLowerCase();if(!lb.hasOwnProperty(t))return this.sanitizedSomething=!0,!tO.hasOwnProperty(t);this.buf.push("<"),this.buf.push(t);let n=e.attributes;for(let r=0;r<n.length;r++){let i=n.item(r),s=i.name,o=s.toLowerCase();if(!eO.hasOwnProperty(o)){this.sanitizedSomething=!0;continue}let a=i.value;iS[o]&&(a=Rd(a)),this.buf.push(" ",s,'="',db(a),'"')}return this.buf.push(">"),!0}endElement(e){let t=ub(e).toLowerCase();lb.hasOwnProperty(t)&&!tS.hasOwnProperty(t)&&(this.buf.push("</"),this.buf.push(t),this.buf.push(">"))}chars(e){this.buf.push(db(e))}};function nO(e,t){return(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function rO(e){let t=e.nextSibling;if(t&&e!==t.previousSibling)throw oS(t);return t}function iO(e){let t=e.firstChild;if(t&&nO(e,t))throw oS(t);return t}function ub(e){let t=e.nodeName;return typeof t=="string"?t:"FORM"}function oS(e){return new Error(`Failed to sanitize html because the element is clobbered: ${e.outerHTML}`)}var oO=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,sO=/([^\#-~ |!])/g;function db(e){return e.replace(/&/g,"&amp;").replace(oO,function(t){let n=t.charCodeAt(0),r=t.charCodeAt(1);return"&#"+((n-55296)*1024+(r-56320)+65536)+";"}).replace(sO,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}var Uu;function oy(e,t){let n=null;try{Uu=Uu||zM(e);let r=t?String(t):"";n=Uu.getInertBodyElement(r);let i=5,s=r;do{if(i===0)throw new Error("Failed to sanitize html because the input is unstable");i--,r=s,s=n.innerHTML,n=Uu.getInertBodyElement(r)}while(r!==s);let o=new eg().sanitizeChildren(fb(n)||n);return xd(o)}finally{if(n){let r=fb(n)||n;for(;r.firstChild;)r.firstChild.remove()}}}function fb(e){return"content"in e&&aO(e)?e.content:null}function aO(e){return e.nodeType===Node.ELEMENT_NODE&&e.nodeName==="TEMPLATE"}var ei=function(e){return e[e.NONE=0]="NONE",e[e.HTML=1]="HTML",e[e.STYLE=2]="STYLE",e[e.SCRIPT=3]="SCRIPT",e[e.URL=4]="URL",e[e.RESOURCE_URL=5]="RESOURCE_URL",e}(ei||{});function Fr(e){let t=sS();return t?cb(t.sanitize(ei.HTML,e)||""):po(e,"HTML")?cb(Qr(e)):oy(jC(),Zc(e))}function an(e){let t=sS();return t?t.sanitize(ei.URL,e)||"":po(e,"URL")?Qr(e):Rd(Zc(e))}function sS(){let e=Fe();return e&&e[Ri].sanitizer}var cO=/^>|^->|<!--|-->|--!>|<!-$/g,lO=/(<|>)/g,uO="\u200B$1\u200B";function dO(e){return e.replace(cO,t=>t.replace(lO,uO))}function aS(e){return e.ownerDocument.defaultView}function fO(e,t,n){let r=e.length;for(;;){let i=e.indexOf(t,n);if(i===-1)return i;if(i===0||e.charCodeAt(i-1)<=32){let s=t.length;if(i+s===r||e.charCodeAt(i+s)<=32)return i}n=i+1}}var cS="ng-template";function pO(e,t,n,r){let i=0;if(r){for(;i<t.length&&typeof t[i]=="string";i+=2)if(t[i]==="class"&&fO(t[i+1].toLowerCase(),n,0)!==-1)return!0}else if(sy(e))return!1;if(i=t.indexOf(1,i),i>-1){let s;for(;++i<t.length&&typeof(s=t[i])=="string";)if(s.toLowerCase()===n)return!0}return!1}function sy(e){return e.type===4&&e.value!==cS}function hO(e,t,n){let r=e.type===4&&!n?cS:e.value;return t===r}function mO(e,t,n){let r=4,i=e.attrs,s=i!==null?vO(i):0,o=!1;for(let a=0;a<t.length;a++){let l=t[a];if(typeof l=="number"){if(!o&&!Mr(r)&&!Mr(l))return!1;if(o&&Mr(l))continue;o=!1,r=l|r&1;continue}if(!o)if(r&4){if(r=2|r&1,l!==""&&!hO(e,l,n)||l===""&&t.length===1){if(Mr(r))return!1;o=!0}}else if(r&8){if(i===null||!pO(e,i,l,n)){if(Mr(r))return!1;o=!0}}else{let c=t[++a],h=gO(l,i,sy(e),n);if(h===-1){if(Mr(r))return!1;o=!0;continue}if(c!==""){let d;if(h>s?d="":d=i[h+1].toLowerCase(),r&2&&c!==d){if(Mr(r))return!1;o=!0}}}}return Mr(r)||o}function Mr(e){return(e&1)===0}function gO(e,t,n,r){if(t===null)return-1;let i=0;if(r||!n){let s=!1;for(;i<t.length;){let o=t[i];if(o===e)return i;if(o===3||o===6)s=!0;else if(o===1||o===2){let a=t[++i];for(;typeof a=="string";)a=t[++i];continue}else{if(o===4)break;if(o===0){i+=4;continue}}i+=s?1:2}return-1}else return _O(t,e)}function yO(e,t,n=!1){for(let r=0;r<t.length;r++)if(mO(e,t[r],n))return!0;return!1}function vO(e){for(let t=0;t<e.length;t++){let n=e[t];if(nM(n))return t}return e.length}function _O(e,t){let n=e.indexOf(4);if(n>-1)for(n++;n<e.length;){let r=e[n];if(typeof r=="number")return-1;if(r===t)return n;n++}return-1}function pb(e,t){return e?":not("+t.trim()+")":t}function EO(e){let t=e[0],n=1,r=2,i="",s=!1;for(;n<e.length;){let o=e[n];if(typeof o=="string")if(r&2){let a=e[++n];i+="["+o+(a.length>0?'="'+a+'"':"")+"]"}else r&8?i+="."+o:r&4&&(i+=" "+o);else i!==""&&!Mr(o)&&(t+=pb(s,i),i=""),r=o,s=s||!Mr(r);n++}return i!==""&&(t+=pb(s,i)),t}function wO(e){return e.map(EO).join(",")}function bO(e){let t=[],n=[],r=1,i=2;for(;r<e.length;){let s=e[r];if(typeof s=="string")i===2?s!==""&&t.push(s,e[++r]):i===8&&n.push(s);else{if(!Mr(i))break;i=s}r++}return n.length&&t.push(1,...n),t}var Hi={};function CO(e,t){return e.createText(t)}function SO(e,t,n){e.setValue(t,n)}function DO(e,t){return e.createComment(dO(t))}function lS(e,t,n){return e.createElement(t,n)}function ld(e,t,n,r,i){e.insertBefore(t,n,r,i)}function uS(e,t,n){e.appendChild(t,n)}function hb(e,t,n,r,i){r!==null?ld(e,t,n,r,i):uS(e,t,n)}function IO(e,t,n){e.removeChild(null,t,n)}function TO(e,t,n){e.setAttribute(t,"style",n)}function xO(e,t,n){n===""?e.removeAttribute(t,"class"):e.setAttribute(t,"class",n)}function dS(e,t,n){let{mergedAttrs:r,classes:i,styles:s}=n;r!==null&&tM(e,t,r),i!==null&&xO(e,t,i),s!==null&&TO(e,t,s)}function ay(e,t,n,r,i,s,o,a,l,c,h){let d=Vt+r,f=d+i,g=RO(d,f),m=typeof c=="function"?c():c;return g[_e]={type:e,blueprint:g,template:n,queries:null,viewQuery:a,declTNode:t,data:g.slice().fill(null,d),bindingStartIndex:d,expandoStartIndex:f,hostBindingOpCodes:null,firstCreatePass:!0,firstUpdatePass:!0,staticViewQueries:!1,staticContentQueries:!1,preOrderHooks:null,preOrderCheckHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,cleanup:null,contentQueries:null,components:null,directiveRegistry:typeof s=="function"?s():s,pipeRegistry:typeof o=="function"?o():o,firstChild:null,schemas:l,consts:m,incompleteFirstPass:!1,ssrId:h}}function RO(e,t){let n=[];for(let r=0;r<t;r++)n.push(r<e?null:Hi);return n}function NO(e){let t=e.tView;return t===null||t.incompleteFirstPass?e.tView=ay(1,null,e.template,e.decls,e.vars,e.directiveDefs,e.pipeDefs,e.viewQuery,e.schemas,e.consts,e.id):t}function cy(e,t,n,r,i,s,o,a,l,c,h){let d=t.blueprint.slice();return d[Fi]=i,d[be]=r|4|128|8|64|1024,(c!==null||e&&e[be]&2048)&&(d[be]|=2048),iC(d),d[Rn]=d[pa]=e,d[jt]=n,d[Ri]=o||e&&e[Ri],d[sn]=a||e&&e[sn],d[jc]=l||e&&e[jc]||null,d[Lr]=s,d[Jc]=TM(),d[Hc]=h,d[Zb]=c,d[Pr]=t.type==2?e[Pr]:d,d}function AO(e,t,n){let r=Xr(t,e),i=NO(n),s=e[Ri].rendererFactory,o=ly(e,cy(e,i,null,fS(n),r,t,null,s.createRenderer(r,n),null,null,null));return e[t.index]=o}function fS(e){let t=16;return e.signals?t=4096:e.onPush&&(t=64),t}function pS(e,t,n,r){if(n===0)return-1;let i=t.length;for(let s=0;s<n;s++)t.push(r),e.blueprint.push(r),e.data.push(null);return i}function ly(e,t){return e[$c]?e[Yw][Or]=t:e[$c]=t,e[Yw]=t,t}function X(e=1){hS(Zt(),Fe(),uo()+e,!1)}function hS(e,t,n,r){if(!r)if((t[be]&3)===3){let i=e.preOrderCheckHooks;i!==null&&$u(t,i,n)}else{let i=e.preOrderHooks;i!==null&&Wu(t,i,0,n)}Jo(n)}var Nd=function(e){return e[e.None=0]="None",e[e.SignalBased=1]="SignalBased",e[e.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",e}(Nd||{});function tg(e,t,n,r){let i=je(null);try{let[s,o,a]=e.inputs[n],l=null;(o&Nd.SignalBased)!==0&&(l=t[s][bi]),l!==null&&l.transformFn!==void 0?r=l.transformFn(r):a!==null&&(r=a.call(t,r)),e.setInput!==null?e.setInput(t,l,r,n,s):Jb(t,l,s,r)}finally{je(i)}}function mS(e,t,n,r,i){let s=uo(),o=r&2;try{Jo(-1),o&&t.length>Vt&&hS(e,t,Vt,!1),pt(o?2:0,i),n(r,i)}finally{Jo(s),pt(o?3:1,i)}}function Ad(e,t,n){FO(e,t,n),(n.flags&64)===64&&BO(e,t,n)}function uy(e,t,n=Xr){let r=t.localNames;if(r!==null){let i=t.index+1;for(let s=0;s<r.length;s+=2){let o=r[s+1],a=o===-1?n(t,e):e[o];e[i++]=a}}}function MO(e,t,n,r){let i=r.get(FM,WC)||n===Zr.ShadowDom,s=e.selectRootElement(t,i);return OO(s),s}function OO(e){PO(e)}var PO=()=>null;function kO(e){return e==="class"?"className":e==="for"?"htmlFor":e==="formaction"?"formAction":e==="innerHtml"?"innerHTML":e==="readonly"?"readOnly":e==="tabindex"?"tabIndex":e}function gS(e,t,n,r,i,s,o,a){if(!a&&fy(t,e,n,r,i)){ha(t)&&LO(n,t.index);return}if(t.type&3){let l=Xr(t,n);r=kO(r),i=o!=null?o(i,t.value||"",r):i,s.setProperty(l,r,i)}else t.type&12}function LO(e,t){let n=gr(t,e);n[be]&16||(n[be]|=64)}function FO(e,t,n){let r=n.directiveStart,i=n.directiveEnd;ha(n)&&AO(t,n,e.data[r+n.componentOffset]),e.firstCreatePass||od(n,t);let s=n.initialInputs;for(let o=r;o<i;o++){let a=e.data[o],l=Wc(t,e,o,n);if(Yr(l,t),s!==null&&jO(t,o-r,l,a,n,s),Kr(a)){let c=gr(n.index,t);c[jt]=Wc(t,e,o,n)}}}function BO(e,t,n){let r=n.directiveStart,i=n.directiveEnd,s=n.index,o=WA();try{Jo(s);for(let a=r;a<i;a++){let l=e.data[a],c=t[a];Mm(a),(l.hostBindings!==null||l.hostVars!==0||l.hostAttrs!==null)&&VO(l,c)}}finally{Jo(-1),Mm(o)}}function VO(e,t){e.hostBindings!==null&&e.hostBindings(1,t)}function dy(e,t){let n=e.directiveRegistry,r=null;if(n)for(let i=0;i<n.length;i++){let s=n[i];yO(t,s.selectors,!1)&&(r??=[],Kr(s)?r.unshift(s):r.push(s))}return r}function UO(e,t,n,r,i,s){let o=Xr(e,t);HO(t[sn],o,s,e.value,n,r,i)}function HO(e,t,n,r,i,s,o){if(s==null)e.removeAttribute(t,i,n);else{let a=o==null?Zc(s):o(s,r||"",i);e.setAttribute(t,i,a,n)}}function jO(e,t,n,r,i,s){let o=s[t];if(o!==null)for(let a=0;a<o.length;a+=2){let l=o[a],c=o[a+1];tg(r,n,l,c)}}function yS(e,t){let n=e[jc],r=n?n.get(Mi,null):null;r&&r.handleError(t)}function fy(e,t,n,r,i){let s=e.inputs?.[r],o=e.hostDirectiveInputs?.[r],a=!1;if(o)for(let l=0;l<o.length;l+=2){let c=o[l],h=o[l+1],d=t.data[c];tg(d,n[c],h,i),a=!0}if(s)for(let l of s){let c=n[l],h=t.data[l];tg(h,c,r,i),a=!0}return a}function $O(e,t){let n=gr(t,e),r=n[_e];WO(r,n);let i=n[Fi];i!==null&&n[Hc]===null&&(n[Hc]=YC(i,n[jc])),pt(18),py(r,n,n[jt]),pt(19,n[jt])}function WO(e,t){for(let n=t.length;n<e.blueprint.length;n++)t.push(e.blueprint[n])}function py(e,t,n){Wg(t);try{let r=e.viewQuery;r!==null&&zm(1,r,n);let i=e.template;i!==null&&mS(e,t,i,1,n),e.firstCreatePass&&(e.firstCreatePass=!1),t[Ni]?.finishViewCreation(e),e.staticContentQueries&&KC(e,t),e.staticViewQueries&&zm(2,e.viewQuery,n);let s=e.components;s!==null&&GO(t,s)}catch(r){throw e.firstCreatePass&&(e.incompleteFirstPass=!0,e.firstCreatePass=!1),r}finally{t[be]&=-5,Gg()}}function GO(e,t){for(let n=0;n<t.length;n++)$O(e,t[n])}function Md(e,t,n,r){let i=je(null);try{let s=t.tView,o=e[be]&4096?4096:16,a=cy(e,s,n,o,null,t,null,null,r?.injector??null,r?.embeddedViewInjector??null,r?.dehydratedView??null),l=e[t.index];a[Ko]=l;let c=e[Ni];return c!==null&&(a[Ni]=c.createEmbeddedView(s)),py(s,a,n),a}finally{je(i)}}function Gc(e,t){return!t||t.firstChild===null||OC(e)}var zO;function hy(e,t){return zO(e,t)}var Pi=function(e){return e[e.Important=1]="Important",e[e.DashCase=2]="DashCase",e}(Pi||{});function vS(e){return(e.flags&32)===32}function ia(e,t,n,r,i){if(r!=null){let s,o=!1;Bi(r)?s=r:Ti(r)&&(o=!0,r=r[Fi]);let a=er(r);e===0&&n!==null?i==null?uS(t,n,a):ld(t,n,a,i||null,!0):e===1&&n!==null?ld(t,n,a,i||null,!0):e===2?IO(t,a,o):e===3&&t.destroyNode(a),s!=null&&iP(t,e,s,n,i)}}function qO(e,t){_S(e,t),t[Fi]=null,t[Lr]=null}function YO(e,t,n,r,i,s){r[Fi]=i,r[Lr]=t,kd(e,r,n,1,i,s)}function _S(e,t){t[Ri].changeDetectionScheduler?.notify(9),kd(e,t,t[sn],2,null,null)}function KO(e){let t=e[$c];if(!t)return gm(e[_e],e);for(;t;){let n=null;if(Ti(t))n=t[$c];else{let r=t[xn];r&&(n=r)}if(!n){for(;t&&!t[Or]&&t!==e;)Ti(t)&&gm(t[_e],t),t=t[Rn];t===null&&(t=e),Ti(t)&&gm(t[_e],t),n=t&&t[Or]}t=n}}function my(e,t){let n=e[la],r=n.indexOf(t);n.splice(r,1)}function Od(e,t){if(Qc(t))return;let n=t[sn];n.destroyNode&&kd(e,t,n,3,null,null),KO(t)}function gm(e,t){if(Qc(t))return;let n=je(null);try{t[be]&=-129,t[be]|=256,t[Qn]&&Kh(t[Qn]),XO(e,t),ZO(e,t),t[_e].type===1&&t[sn].destroy();let r=t[Ko];if(r!==null&&Bi(t[Rn])){r!==t[Rn]&&my(r,t);let i=t[Ni];i!==null&&i.detachView(e)}Hm(t)}finally{je(n)}}function ZO(e,t){let n=e.cleanup,r=t[Ju];if(n!==null)for(let o=0;o<n.length-1;o+=2)if(typeof n[o]=="string"){let a=n[o+3];a>=0?r[a]():r[-a].unsubscribe(),o+=2}else{let a=r[n[o+1]];n[o].call(a)}r!==null&&(t[Ju]=null);let i=t[so];if(i!==null){t[so]=null;for(let o=0;o<i.length;o++){let a=i[o];a()}}let s=t[Qu];if(s!==null){t[Qu]=null;for(let o of s)o.destroy()}}function XO(e,t){let n;if(e!=null&&(n=e.destroyHooks)!=null)for(let r=0;r<n.length;r+=2){let i=t[n[r]];if(!(i instanceof Qo)){let s=n[r+1];if(Array.isArray(s))for(let o=0;o<s.length;o+=2){let a=i[s[o]],l=s[o+1];pt(4,a,l);try{l.call(a)}finally{pt(5,a,l)}}else{pt(4,i,s);try{s.call(i)}finally{pt(5,i,s)}}}}}function JO(e,t,n){return QO(e,t.parent,n)}function QO(e,t,n){let r=t;for(;r!==null&&r.type&168;)t=r,r=t.parent;if(r===null)return n[Fi];if(ha(r)){let{encapsulation:i}=e.data[r.directiveStart+r.componentOffset];if(i===Zr.None||i===Zr.Emulated)return null}return Xr(r,n)}function eP(e,t,n){return nP(e,t,n)}function tP(e,t,n){return e.type&40?Xr(e,n):null}var nP=tP,mb;function Pd(e,t,n,r){let i=JO(e,r,t),s=t[sn],o=r.parent||t[Lr],a=eP(o,r,t);if(i!=null)if(Array.isArray(n))for(let l=0;l<n.length;l++)hb(s,i,n[l],a,!1);else hb(s,i,n,a,!1);mb!==void 0&&mb(s,r,t,n,i)}function Lc(e,t){if(t!==null){let n=t.type;if(n&3)return Xr(t,e);if(n&4)return ng(-1,e[t.index]);if(n&8){let r=t.child;if(r!==null)return Lc(e,r);{let i=e[t.index];return Bi(i)?ng(-1,i):er(i)}}else{if(n&128)return Lc(e,t.next);if(n&32)return hy(t,e)()||er(e[t.index]);{let r=ES(e,t);if(r!==null){if(Array.isArray(r))return r[0];let i=Xo(e[Pr]);return Lc(i,r)}else return Lc(e,t.next)}}}return null}function ES(e,t){if(t!==null){let n=e[Pr][Lr],r=t.projection;return n.projection[r]}return null}function ng(e,t){let n=xn+e+1;if(n<t.length){let r=t[n],i=r[_e].firstChild;if(i!==null)return Lc(r,i)}return t[Zo]}function gy(e,t,n,r,i,s,o){for(;n!=null;){if(n.type===128){n=n.next;continue}let a=r[n.index],l=n.type;if(o&&t===0&&(a&&Yr(er(a),r),n.flags|=2),!vS(n))if(l&8)gy(e,t,n.child,r,i,s,!1),ia(t,e,i,a,s);else if(l&32){let c=hy(n,r),h;for(;h=c();)ia(t,e,i,h,s);ia(t,e,i,a,s)}else l&16?rP(e,t,r,n,i,s):ia(t,e,i,a,s);n=o?n.projectionNext:n.next}}function kd(e,t,n,r,i,s){gy(n,r,e.firstChild,t,i,s,!1)}function rP(e,t,n,r,i,s){let o=n[Pr],a=o[Lr].projection[r.projection];if(Array.isArray(a))for(let l=0;l<a.length;l++){let c=a[l];ia(t,e,i,c,s)}else{let l=a,c=o[Rn];OC(r)&&(l.flags|=128),gy(e,t,l,c,i,s,!0)}}function iP(e,t,n,r,i){let s=n[Zo],o=er(n);s!==o&&ia(t,e,r,s,i);for(let a=xn;a<n.length;a++){let l=n[a];kd(l[_e],l,e,t,r,s)}}function oP(e,t,n,r,i){if(t)i?e.addClass(n,r):e.removeClass(n,r);else{let s=r.indexOf("-")===-1?void 0:Pi.DashCase;i==null?e.removeStyle(n,r,s):(typeof i=="string"&&i.endsWith("!important")&&(i=i.slice(0,-10),s|=Pi.Important),e.setStyle(n,r,i,s))}}function ud(e,t,n,r,i=!1){for(;n!==null;){if(n.type===128){n=i?n.projectionNext:n.next;continue}let s=t[n.index];s!==null&&r.push(er(s)),Bi(s)&&sP(s,r);let o=n.type;if(o&8)ud(e,t,n.child,r);else if(o&32){let a=hy(n,t),l;for(;l=a();)r.push(l)}else if(o&16){let a=ES(t,n);if(Array.isArray(a))r.push(...a);else{let l=Xo(t[Pr]);ud(l[_e],l,a,r,!0)}}n=i?n.projectionNext:n.next}return r}function sP(e,t){for(let n=xn;n<e.length;n++){let r=e[n],i=r[_e].firstChild;i!==null&&ud(r[_e],r,i,t)}e[Zo]!==e[Fi]&&t.push(e[Zo])}function wS(e){if(e[sa]!==null){for(let t of e[sa])t.impl.addSequence(t);e[sa].length=0}}var bS=[];function aP(e){return e[Qn]??cP(e)}function cP(e){let t=bS.pop()??Object.create(uP);return t.lView=e,t}function lP(e){e.lView[Qn]!==e&&(e.lView=null,bS.push(e))}var uP=te(w({},lu),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:e=>{el(e.lView)},consumerOnSignalRead(){this.lView[Qn]=this}});function dP(e){let t=e[Qn]??Object.create(fP);return t.lView=e,t}var fP=te(w({},lu),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:e=>{let t=Xo(e.lView);for(;t&&!CS(t[_e]);)t=Xo(t);t&&Vg(t)},consumerOnSignalRead(){this.lView[Qn]=this}});function CS(e){return e.type!==2}function SS(e){if(e[Qu]===null)return;let t=!0;for(;t;){let n=!1;for(let r of e[Qu])r.dirty&&(n=!0,r.zone===null||Zone.current===r.zone?r.run():r.zone.run(()=>r.run()));t=n&&!!(e[be]&8192)}}var pP=100;function DS(e,t=!0,n=0){let r=e[Ri].rendererFactory,i=!1;i||r.begin?.();try{hP(e,n)}catch(s){throw t&&yS(e,s),s}finally{i||r.end?.()}}function hP(e,t){let n=dC();try{Zw(!0),rg(e,t);let r=0;for(;bd(e);){if(r===pP)throw new $e(103,!1);r++,rg(e,1)}}finally{Zw(n)}}function mP(e,t,n,r){if(Qc(t))return;let i=t[be],s=!1,o=!1;Wg(t);let a=!0,l=null,c=null;s||(CS(e)?(c=aP(t),l=qh(c)):ew()===null?(a=!1,c=dP(t),l=qh(c)):t[Qn]&&(Kh(t[Qn]),t[Qn]=null));try{iC(t),UA(e.bindingStartIndex),n!==null&&mS(e,t,n,2,r);let h=(i&3)===3;if(!s)if(h){let g=e.preOrderCheckHooks;g!==null&&$u(t,g,null)}else{let g=e.preOrderHooks;g!==null&&Wu(t,g,0,null),fm(t,0)}if(o||gP(t),SS(t),IS(t,0),e.contentQueries!==null&&KC(e,t),!s)if(h){let g=e.contentCheckHooks;g!==null&&$u(t,g)}else{let g=e.contentHooks;g!==null&&Wu(t,g,1),fm(t,1)}vP(e,t);let d=e.components;d!==null&&xS(t,d,0);let f=e.viewQuery;if(f!==null&&zm(2,f,r),!s)if(h){let g=e.viewCheckHooks;g!==null&&$u(t,g)}else{let g=e.viewHooks;g!==null&&Wu(t,g,2),fm(t,2)}if(e.firstUpdatePass===!0&&(e.firstUpdatePass=!1),t[dm]){for(let g of t[dm])g();t[dm]=null}s||(wS(t),t[be]&=-73)}catch(h){throw s||el(t),h}finally{c!==null&&(iw(c,l),a&&lP(c)),Gg()}}function IS(e,t){for(let n=BC(e);n!==null;n=VC(n))for(let r=xn;r<n.length;r++){let i=n[r];TS(i,t)}}function gP(e){for(let t=BC(e);t!==null;t=VC(t)){if(!(t[be]&2))continue;let n=t[la];for(let r=0;r<n.length;r++){let i=n[r];Vg(i)}}}function yP(e,t,n){pt(18);let r=gr(t,e);TS(r,n),pt(19,r[jt])}function TS(e,t){Bg(e)&&rg(e,t)}function rg(e,t){let n=e[_e],r=e[be],i=e[Qn],s=!!(t===0&&r&16);if(s||=!!(r&64&&t===0),s||=!!(r&1024),s||=!!(i?.dirty&&Yh(i)),s||=!1,i&&(i.dirty=!1),e[be]&=-9217,s)mP(n,e,n.template,e[jt]);else if(r&8192){SS(e),IS(e,1);let o=n.components;o!==null&&xS(e,o,1),wS(e)}}function xS(e,t,n){for(let r=0;r<t.length;r++)yP(e,t[r],n)}function vP(e,t){let n=e.hostBindingOpCodes;if(n!==null)try{for(let r=0;r<n.length;r++){let i=n[r];if(i<0)Jo(~i);else{let s=i,o=n[++r],a=n[++r];$A(o,s);let l=t[s];pt(24,l),a(2,l),pt(25,l)}}}finally{Jo(-1)}}function yy(e,t){let n=dC()?64:1088;for(e[Ri].changeDetectionScheduler?.notify(t);e;){e[be]|=n;let r=Xo(e);if(td(e)&&!r)return e;e=r}return null}function RS(e,t,n,r){return[e,!0,0,t,null,r,null,n,null,null]}function NS(e,t){let n=xn+t;if(n<e.length)return e[n]}function Ld(e,t,n,r=!0){let i=t[_e];if(_P(i,t,e,n),r){let o=ng(n,e),a=t[sn],l=a.parentNode(e[Zo]);l!==null&&YO(i,e[Lr],a,t,l,o)}let s=t[Hc];s!==null&&s.firstChild!==null&&(s.firstChild=null)}function AS(e,t){let n=zc(e,t);return n!==void 0&&Od(n[_e],n),n}function zc(e,t){if(e.length<=xn)return;let n=xn+t,r=e[n];if(r){let i=r[Ko];i!==null&&i!==e&&my(i,r),t>0&&(e[n-1][Or]=r[Or]);let s=Zu(e,xn+t);qO(r[_e],r);let o=s[Ni];o!==null&&o.detachView(s[_e]),r[Rn]=null,r[Or]=null,r[be]&=-129}return r}function _P(e,t,n,r){let i=xn+r,s=n.length;r>0&&(n[i-1][Or]=t),r<s-xn?(t[Or]=n[i],Fb(n,xn+r,t)):(n.push(t),t[Or]=null),t[Rn]=n;let o=t[Ko];o!==null&&n!==o&&MS(o,t);let a=t[Ni];a!==null&&a.insertView(e),Nm(t),t[be]|=128}function MS(e,t){let n=e[la],r=t[Rn];if(Ti(r))e[be]|=2;else{let i=r[Rn][Pr];t[Pr]!==i&&(e[be]|=2)}n===null?e[la]=[t]:n.push(t)}var es=class{_lView;_cdRefInjectingView;notifyErrorHandler;_appRef=null;_attachedToViewContainer=!1;get rootNodes(){let e=this._lView,t=e[_e];return ud(t,e,t.firstChild,[])}constructor(e,t,n=!0){this._lView=e,this._cdRefInjectingView=t,this.notifyErrorHandler=n}get context(){return this._lView[jt]}get dirty(){return!!(this._lView[be]&9280)||!!this._lView[Qn]?.dirty}set context(e){this._lView[jt]=e}get destroyed(){return Qc(this._lView)}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){let e=this._lView[Rn];if(Bi(e)){let t=e[ed],n=t?t.indexOf(this):-1;n>-1&&(zc(e,n),Zu(t,n))}this._attachedToViewContainer=!1}Od(this._lView[_e],this._lView)}onDestroy(e){oC(this._lView,e)}markForCheck(){yy(this._cdRefInjectingView||this._lView,4)}markForRefresh(){Vg(this._cdRefInjectingView||this._lView)}detach(){this._lView[be]&=-129}reattach(){Nm(this._lView),this._lView[be]|=128}detectChanges(){this._lView[be]|=1024,DS(this._lView,this.notifyErrorHandler)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new $e(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=td(this._lView),t=this._lView[Ko];t!==null&&!e&&my(t,this._lView),_S(this._lView[_e],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new $e(902,!1);this._appRef=e;let t=td(this._lView),n=this._lView[Ko];n!==null&&!t&&MS(n,this._lView),Nm(this._lView)}},kr=(()=>{class e{static __NG_ELEMENT_ID__=bP}return e})(),EP=kr,wP=class extends EP{_declarationLView;_declarationTContainer;elementRef;constructor(e,t,n){super(),this._declarationLView=e,this._declarationTContainer=t,this.elementRef=n}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(e,t){return this.createEmbeddedViewImpl(e,t)}createEmbeddedViewImpl(e,t,n){let r=Md(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:t,dehydratedView:n});return new es(r)}};function bP(){return Fd(tr(),Fe())}function Fd(e,t){return e.type&4?new wP(t,e,ma(e,t)):null}function il(e,t,n,r,i){let s=e.data[t];if(s===null)s=CP(e,t,n,r,i),jA()&&(s.flags|=32);else if(s.type&64){s.type=n,s.value=r,s.attrs=i;let o=VA();s.injectorIndex=o===null?-1:o.injectorIndex}return lo(s,!0),s}function CP(e,t,n,r,i){let s=cC(),o=Hg(),a=o?s:s&&s.parent,l=e.data[t]=DP(e,a,n,t,r,i);return SP(e,l,s,o),l}function SP(e,t,n,r){e.firstChild===null&&(e.firstChild=t),n!==null&&(r?n.child==null&&t.parent!==null&&(n.child=t):n.next===null&&(n.next=t,t.prev=n))}function DP(e,t,n,r,i,s){let o=t?t.injectorIndex:-1,a=0;return LA()&&(a|=128),{type:n,index:r,insertBeforeIndex:null,injectorIndex:o,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,propertyBindings:null,flags:a,providerIndexes:0,value:i,attrs:s,mergedAttrs:null,localNames:null,initialInputs:null,inputs:null,hostDirectiveInputs:null,outputs:null,hostDirectiveOutputs:null,directiveToIndex:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:t,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}var dW=new RegExp(`^(\\d+)*(${LM}|${kM})*(.*)`),IP=()=>null;function qc(e,t){return IP(e,t)}var ig=class{},dd=class{},og=class{resolveComponentFactory(e){throw Error(`No component factory found for ${mr(e)}.`)}},co=class{static NULL=new og},hn=class{},ya=(()=>{class e{destroyNode=null;static __NG_ELEMENT_ID__=()=>TP()}return e})();function TP(){let e=Fe(),t=tr(),n=gr(t.index,e);return(Ti(n)?n:e)[sn]}var xP=(()=>{class e{static \u0275prov=ne({token:e,providedIn:"root",factory:()=>null})}return e})();function sg(e,t,n){let r=n?e.styles:null,i=n?e.classes:null,s=0;if(t!==null)for(let o=0;o<t.length;o++){let a=t[o];if(typeof a=="number")s=a;else if(s==1)i=jw(i,a);else if(s==2){let l=a,c=t[++o];r=jw(r,l+": "+c+";")}}n?e.styles=r:e.stylesWithoutHost=r,n?e.classes=i:e.classesWithoutHost=i}function Ot(e,t=Ke.Default){let n=Fe();if(n===null)return Ze(e,t);let r=tr();return IC(r,n,kn(e),t)}function vy(e,t,n,r,i){let s=r===null?null:{"":-1},o=i(e,n);if(o!==null){let a,l=null,c=null,h=NP(o);h===null?a=o:[a,l,c]=h,OP(e,t,n,a,s,l,c)}s!==null&&r!==null&&RP(n,r,s)}function RP(e,t,n){let r=e.localNames=[];for(let i=0;i<t.length;i+=2){let s=n[t[i+1]];if(s==null)throw new $e(-301,!1);r.push(t[i],s)}}function NP(e){let t=null,n=!1;for(let o=0;o<e.length;o++){let a=e[o];if(o===0&&Kr(a)&&(t=a),a.findHostDirectiveDefs!==null){n=!0;break}}if(!n)return null;let r=null,i=null,s=null;for(let o of e)o.findHostDirectiveDefs!==null&&(r??=[],i??=new Map,s??=new Map,AP(o,r,s,i)),o===t&&(r??=[],r.push(o));return r!==null?(r.push(...t===null?e:e.slice(1)),[r,i,s]):null}function AP(e,t,n,r){let i=t.length;e.findHostDirectiveDefs(e,t,r),n.set(e,[i,t.length-1])}function MP(e,t,n){t.componentOffset=n,(e.components??=[]).push(t.index)}function OP(e,t,n,r,i,s,o){let a=r.length,l=!1;for(let f=0;f<a;f++){let g=r[f];!l&&Kr(g)&&(l=!0,MP(e,n,f)),km(od(n,t),e,g.type)}VP(n,e.data.length,a);for(let f=0;f<a;f++){let g=r[f];g.providersResolver&&g.providersResolver(g)}let c=!1,h=!1,d=pS(e,t,a,null);a>0&&(n.directiveToIndex=new Map);for(let f=0;f<a;f++){let g=r[f];if(n.mergedAttrs=ua(n.mergedAttrs,g.hostAttrs),kP(e,n,t,d,g),BP(d,g,i),o!==null&&o.has(g)){let[b,x]=o.get(g);n.directiveToIndex.set(g.type,[d,b+n.directiveStart,x+n.directiveStart])}else(s===null||!s.has(g))&&n.directiveToIndex.set(g.type,d);g.contentQueries!==null&&(n.flags|=4),(g.hostBindings!==null||g.hostAttrs!==null||g.hostVars!==0)&&(n.flags|=64);let m=g.type.prototype;!c&&(m.ngOnChanges||m.ngOnInit||m.ngDoCheck)&&((e.preOrderHooks??=[]).push(n.index),c=!0),!h&&(m.ngOnChanges||m.ngDoCheck)&&((e.preOrderCheckHooks??=[]).push(n.index),h=!0),d++}PP(e,n,s)}function PP(e,t,n){for(let r=t.directiveStart;r<t.directiveEnd;r++){let i=e.data[r];if(n===null||!n.has(i))gb(0,t,i,r),gb(1,t,i,r),vb(t,r,!1);else{let s=n.get(i);yb(0,t,s,r),yb(1,t,s,r),vb(t,r,!0)}}}function gb(e,t,n,r){let i=e===0?n.inputs:n.outputs;for(let s in i)if(i.hasOwnProperty(s)){let o;e===0?o=t.inputs??={}:o=t.outputs??={},o[s]??=[],o[s].push(r),OS(t,s)}}function yb(e,t,n,r){let i=e===0?n.inputs:n.outputs;for(let s in i)if(i.hasOwnProperty(s)){let o=i[s],a;e===0?a=t.hostDirectiveInputs??={}:a=t.hostDirectiveOutputs??={},a[o]??=[],a[o].push(r,s),OS(t,o)}}function OS(e,t){t==="class"?e.flags|=8:t==="style"&&(e.flags|=16)}function vb(e,t,n){let{attrs:r,inputs:i,hostDirectiveInputs:s}=e;if(r===null||!n&&i===null||n&&s===null||sy(e)){e.initialInputs??=[],e.initialInputs.push(null);return}let o=null,a=0;for(;a<r.length;){let l=r[a];if(l===0){a+=4;continue}else if(l===5){a+=2;continue}else if(typeof l=="number")break;if(!n&&i.hasOwnProperty(l)){let c=i[l];for(let h of c)if(h===t){o??=[],o.push(l,r[a+1]);break}}else if(n&&s.hasOwnProperty(l)){let c=s[l];for(let h=0;h<c.length;h+=2)if(c[h]===t){o??=[],o.push(c[h+1],r[a+1]);break}}a+=2}e.initialInputs??=[],e.initialInputs.push(o)}function kP(e,t,n,r,i){e.data[r]=i;let s=i.factory||(i.factory=zo(i.type,!0)),o=new Qo(s,Kr(i),Ot);e.blueprint[r]=o,n[r]=o,LP(e,t,r,pS(e,n,i.hostVars,Hi),i)}function LP(e,t,n,r,i){let s=i.hostBindings;if(s){let o=e.hostBindingOpCodes;o===null&&(o=e.hostBindingOpCodes=[]);let a=~t.index;FP(o)!=a&&o.push(a),o.push(n,r,s)}}function FP(e){let t=e.length;for(;t>0;){let n=e[--t];if(typeof n=="number"&&n<0)return n}return 0}function BP(e,t,n){if(n){if(t.exportAs)for(let r=0;r<t.exportAs.length;r++)n[t.exportAs[r]]=e;Kr(t)&&(n[""]=e)}}function VP(e,t,n){e.flags|=1,e.directiveStart=t,e.directiveEnd=t+n,e.providerIndexes=t}function PS(e,t,n,r,i,s,o,a){let l=t.consts,c=ao(l,o),h=il(t,e,2,r,c);return s&&vy(t,n,h,ao(l,a),i),h.mergedAttrs=ua(h.mergedAttrs,h.attrs),h.attrs!==null&&sg(h,h.attrs,!1),h.mergedAttrs!==null&&sg(h,h.mergedAttrs,!0),t.queries!==null&&t.queries.elementStart(t,h),h}function kS(e,t){qg(e,t),Lg(t)&&e.queries.elementEnd(t)}var ag=class extends co{ngModule;constructor(e){super(),this.ngModule=e}resolveComponentFactory(e){let t=Yo(e);return new Yc(t,this.ngModule)}};function UP(e){return Object.keys(e).map(t=>{let[n,r,i]=e[t],s={propName:n,templateName:t,isSignal:(r&Nd.SignalBased)!==0};return i&&(s.transform=i),s})}function HP(e){return Object.keys(e).map(t=>({propName:e[t],templateName:t}))}function jP(e,t,n){let r=t instanceof Gn?t:t?.injector;return r&&e.getStandaloneInjector!==null&&(r=e.getStandaloneInjector(r)||r),r?new Om(n,r):n}function $P(e){let t=e.get(hn,null);if(t===null)throw new $e(407,!1);let n=e.get(xP,null),r=e.get(Ai,null);return{rendererFactory:t,sanitizer:n,changeDetectionScheduler:r}}function WP(e,t){let n=(e.selectors[0][0]||"div").toLowerCase();return lS(t,n,n==="svg"?nC:n==="math"?TA:null)}var Yc=class extends dd{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;get inputs(){return UP(this.componentDef.inputs)}get outputs(){return HP(this.componentDef.outputs)}constructor(e,t){super(),this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=wO(e.selectors),this.ngContentSelectors=e.ngContentSelectors??[],this.isBoundToModule=!!t}create(e,t,n,r){pt(22);let i=je(null);try{let s=this.componentDef,o=n?["ng-version","19.2.0"]:bO(this.componentDef.selectors[0]),a=ay(0,null,null,1,0,null,null,null,null,[o],null),l=jP(s,r||this.ngModule,e),c=$P(l),h=c.rendererFactory.createRenderer(null,s),d=n?MO(h,n,s.encapsulation,l):WP(s,h),f=cy(null,a,null,512|fS(s),null,null,c,h,l,null,YC(d,l,!0));f[Vt]=d,Wg(f);let g=null;try{let m=PS(Vt,a,f,"#host",()=>[this.componentDef],!0,0);d&&(dS(h,d,m),Yr(d,f)),Ad(a,f,m),iy(a,m,f),kS(a,m),t!==void 0&&GP(m,this.ngContentSelectors,t),g=gr(m.index,f),f[jt]=g[jt],py(a,f,null)}catch(m){throw g!==null&&Hm(g),Hm(f),m}finally{pt(23),Gg()}return new cg(this.componentType,f)}finally{je(i)}}},cg=class extends ig{_rootLView;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(e,t){super(),this._rootLView=t,this._tNode=Fg(t[_e],Vt),this.location=ma(this._tNode,t),this.instance=gr(this._tNode.index,t)[jt],this.hostView=this.changeDetectorRef=new es(t,void 0,!1),this.componentType=e}setInput(e,t){let n=this._tNode;if(this.previousInputValues??=new Map,this.previousInputValues.has(e)&&Object.is(this.previousInputValues.get(e),t))return;let r=this._rootLView,i=fy(n,r[_e],r,e,t);this.previousInputValues.set(e,t);let s=gr(n.index,r);yy(s,1)}get injector(){return new Wo(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}};function GP(e,t,n){let r=e.projection=[];for(let i=0;i<t.length;i++){let s=n[i];r.push(s!=null&&s.length?Array.from(s):null)}}var Br=(()=>{class e{static __NG_ELEMENT_ID__=zP}return e})();function zP(){let e=tr();return FS(e,Fe())}var qP=Br,LS=class extends qP{_lContainer;_hostTNode;_hostLView;constructor(e,t,n){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=n}get element(){return ma(this._hostTNode,this._hostLView)}get injector(){return new Wo(this._hostTNode,this._hostLView)}get parentInjector(){let e=Yg(this._hostTNode,this._hostLView);if(EC(e)){let t=rd(e,this._hostLView),n=nd(e),r=t[_e].data[n+8];return new Wo(r,t)}else return new Wo(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let t=_b(this._lContainer);return t!==null&&t[e]||null}get length(){return this._lContainer.length-xn}createEmbeddedView(e,t,n){let r,i;typeof n=="number"?r=n:n!=null&&(r=n.index,i=n.injector);let s=qc(this._lContainer,e.ssrId),o=e.createEmbeddedViewImpl(t||{},i,s);return this.insertImpl(o,r,Gc(this._hostTNode,s)),o}createComponent(e,t,n,r,i){let s=e&&!CA(e),o;if(s)o=t;else{let g=t||{};o=g.index,n=g.injector,r=g.projectableNodes,i=g.environmentInjector||g.ngModuleRef}let a=s?e:new Yc(Yo(e)),l=n||this.parentInjector;if(!i&&a.ngModule==null){let g=(s?l:this.parentInjector).get(Gn,null);g&&(i=g)}let c=Yo(a.componentType??{}),h=qc(this._lContainer,c?.id??null),d=h?.firstChild??null,f=a.create(l,r,d,i);return this.insertImpl(f.hostView,o,Gc(this._hostTNode,h)),f}insert(e,t){return this.insertImpl(e,t,!0)}insertImpl(e,t,n){let r=e._lView;if(RA(r)){let o=this.indexOf(e);if(o!==-1)this.detach(o);else{let a=r[Rn],l=new LS(a,a[Lr],a[Rn]);l.detach(l.indexOf(e))}}let i=this._adjustIndex(t),s=this._lContainer;return Ld(s,r,i,n),e.attachToViewContainerRef(),Fb(ym(s),i,e),e}move(e,t){return this.insert(e,t)}indexOf(e){let t=_b(this._lContainer);return t!==null?t.indexOf(e):-1}remove(e){let t=this._adjustIndex(e,-1),n=zc(this._lContainer,t);n&&(Zu(ym(this._lContainer),t),Od(n[_e],n))}detach(e){let t=this._adjustIndex(e,-1),n=zc(this._lContainer,t);return n&&Zu(ym(this._lContainer),t)!=null?new es(n):null}_adjustIndex(e,t=0){return e??this.length+t}};function _b(e){return e[ed]}function ym(e){return e[ed]||(e[ed]=[])}function FS(e,t){let n,r=t[e.index];return Bi(r)?n=r:(n=RS(r,t,null,e),t[e.index]=n,ly(t,n)),KP(n,t,e,r),new LS(n,e,t)}function YP(e,t){let n=e[sn],r=n.createComment(""),i=Xr(t,e),s=n.parentNode(i);return ld(n,s,r,n.nextSibling(i),!1),r}var KP=JP,ZP=()=>!1;function XP(e,t,n){return ZP(e,t,n)}function JP(e,t,n,r){if(e[Zo])return;let i;n.type&8?i=er(r):i=YP(t,n),e[Zo]=i}var lg=class zE{queryList;matches=null;constructor(t){this.queryList=t}clone(){return new zE(this.queryList)}setDirty(){this.queryList.setDirty()}},ug=class WE{queries;constructor(t=[]){this.queries=t}createEmbeddedView(t){let n=t.queries;if(n!==null){let r=t.contentQueries!==null?t.contentQueries[0]:n.length,i=[];for(let s=0;s<r;s++){let o=n.getByIndex(s),a=this.queries[o.indexInDeclarationView];i.push(a.clone())}return new WE(i)}return null}insertView(t){this.dirtyQueriesWithMatches(t)}detachView(t){this.dirtyQueriesWithMatches(t)}finishViewCreation(t){this.dirtyQueriesWithMatches(t)}dirtyQueriesWithMatches(t){for(let n=0;n<this.queries.length;n++)_y(t,n).matches!==null&&this.queries[n].setDirty()}},dg=class{flags;read;predicate;constructor(e,t,n=null){this.flags=t,this.read=n,typeof e=="string"?this.predicate=s1(e):this.predicate=e}},fg=class qE{queries;constructor(t=[]){this.queries=t}elementStart(t,n){for(let r=0;r<this.queries.length;r++)this.queries[r].elementStart(t,n)}elementEnd(t){for(let n=0;n<this.queries.length;n++)this.queries[n].elementEnd(t)}embeddedTView(t){let n=null;for(let r=0;r<this.length;r++){let i=n!==null?n.length:0,s=this.getByIndex(r).embeddedTView(t,i);s&&(s.indexInDeclarationView=r,n!==null?n.push(s):n=[s])}return n!==null?new qE(n):null}template(t,n){for(let r=0;r<this.queries.length;r++)this.queries[r].template(t,n)}getByIndex(t){return this.queries[t]}get length(){return this.queries.length}track(t){this.queries.push(t)}},pg=class YE{metadata;matches=null;indexInDeclarationView=-1;crossesNgTemplate=!1;_declarationNodeIndex;_appliesToNextNode=!0;constructor(t,n=-1){this.metadata=t,this._declarationNodeIndex=n}elementStart(t,n){this.isApplyingToNode(n)&&this.matchTNode(t,n)}elementEnd(t){this._declarationNodeIndex===t.index&&(this._appliesToNextNode=!1)}template(t,n){this.elementStart(t,n)}embeddedTView(t,n){return this.isApplyingToNode(t)?(this.crossesNgTemplate=!0,this.addMatch(-t.index,n),new YE(this.metadata)):null}isApplyingToNode(t){if(this._appliesToNextNode&&(this.metadata.flags&1)!==1){let n=this._declarationNodeIndex,r=t.parent;for(;r!==null&&r.type&8&&r.index!==n;)r=r.parent;return n===(r!==null?r.index:-1)}return this._appliesToNextNode}matchTNode(t,n){let r=this.metadata.predicate;if(Array.isArray(r))for(let i=0;i<r.length;i++){let s=r[i];this.matchTNodeWithReadOption(t,n,QP(n,s)),this.matchTNodeWithReadOption(t,n,Gu(n,t,s,!1,!1))}else r===kr?n.type&4&&this.matchTNodeWithReadOption(t,n,-1):this.matchTNodeWithReadOption(t,n,Gu(n,t,r,!1,!1))}matchTNodeWithReadOption(t,n,r){if(r!==null){let i=this.metadata.read;if(i!==null)if(i===Ct||i===Br||i===kr&&n.type&4)this.addMatch(n.index,-2);else{let s=Gu(n,t,i,!1,!1);s!==null&&this.addMatch(n.index,s)}else this.addMatch(n.index,r)}}addMatch(t,n){this.matches===null?this.matches=[t,n]:this.matches.push(t,n)}};function QP(e,t){let n=e.localNames;if(n!==null){for(let r=0;r<n.length;r+=2)if(n[r]===t)return n[r+1]}return null}function e1(e,t){return e.type&11?ma(e,t):e.type&4?Fd(e,t):null}function t1(e,t,n,r){return n===-1?e1(t,e):n===-2?n1(e,t,r):Wc(e,e[_e],n,t)}function n1(e,t,n){if(n===Ct)return ma(t,e);if(n===kr)return Fd(t,e);if(n===Br)return FS(t,e)}function BS(e,t,n,r){let i=t[Ni].queries[r];if(i.matches===null){let s=e.data,o=n.matches,a=[];for(let l=0;o!==null&&l<o.length;l+=2){let c=o[l];if(c<0)a.push(null);else{let h=s[c];a.push(t1(t,h,o[l+1],n.metadata.read))}}i.matches=a}return i.matches}function hg(e,t,n,r){let i=e.queries.getByIndex(n),s=i.matches;if(s!==null){let o=BS(e,t,i,n);for(let a=0;a<s.length;a+=2){let l=s[a];if(l>0)r.push(o[a/2]);else{let c=s[a+1],h=t[-l];for(let d=xn;d<h.length;d++){let f=h[d];f[Ko]===f[Rn]&&hg(f[_e],f,c,r)}if(h[la]!==null){let d=h[la];for(let f=0;f<d.length;f++){let g=d[f];hg(g[_e],g,c,r)}}}}}return r}function r1(e,t){return e[Ni].queries[t].queryList}function i1(e,t,n){let r=new Um((n&4)===4);return MA(e,t,r,r.destroy),(t[Ni]??=new ug).queries.push(new lg(r))-1}function o1(e,t,n){let r=Zt();return r.firstCreatePass&&(a1(r,new dg(e,t,n),-1),(t&2)===2&&(r.staticViewQueries=!0)),i1(r,Fe(),t)}function s1(e){return e.split(",").map(t=>t.trim())}function a1(e,t,n){e.queries===null&&(e.queries=new fg),e.queries.track(new pg(t,n))}function _y(e,t){return e.queries.getByIndex(t)}function c1(e,t){let n=e[_e],r=_y(n,t);return r.crossesNgTemplate?hg(n,e,t,[]):BS(n,e,r,t)}var ki=class{},fd=class extends ki{injector;componentFactoryResolver=new ag(this);instance=null;constructor(e){super();let t=new Uc([...e.providers,{provide:ki,useValue:this},{provide:co,useValue:this.componentFactoryResolver}],e.parent||_d(),e.debugName,new Set(["environment"]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function l1(e,t,n=null){return new fd({providers:e,parent:t,debugName:n,runEnvironmentInitializers:!0}).injector}var u1=(()=>{class e{_injector;cachedInjectors=new Map;constructor(n){this._injector=n}getOrCreateStandaloneInjector(n){if(!n.standalone)return null;if(!this.cachedInjectors.has(n)){let r=$b(!1,n.type),i=r.length>0?l1([r],this._injector,`Standalone[${n.type.name}]`):null;this.cachedInjectors.set(n,i)}return this.cachedInjectors.get(n)}ngOnDestroy(){try{for(let n of this.cachedInjectors.values())n!==null&&n.destroy()}finally{this.cachedInjectors.clear()}}static \u0275prov=ne({token:e,providedIn:"environment",factory:()=>new e(Ze(Gn))})}return e})();function yt(e){return Rg(()=>{let t=VS(e),n=te(w({},t),{decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection===PC.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:t.standalone?i=>i.get(u1).getOrCreateStandaloneInjector(n):null,getExternalStyles:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||Zr.Emulated,styles:e.styles||xi,_:null,schemas:e.schemas||null,tView:null,id:""});t.standalone&&fo("NgStandalone"),US(n);let r=e.dependencies;return n.directiveDefs=Eb(r,!1),n.pipeDefs=Eb(r,!0),n.id=m1(n),n})}function d1(e){return Yo(e)||Ub(e)}function f1(e){return e!==null}function p1(e,t){if(e==null)return qo;let n={};for(let r in e)if(e.hasOwnProperty(r)){let i=e[r],s,o,a,l;Array.isArray(i)?(a=i[0],s=i[1],o=i[2]??s,l=i[3]||null):(s=i,o=i,a=Nd.None,l=null),n[s]=[r,a,l],t[s]=o}return n}function h1(e){if(e==null)return qo;let t={};for(let n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function Vr(e){return Rg(()=>{let t=VS(e);return US(t),t})}function os(e){return{type:e.type,name:e.name,factory:null,pure:e.pure!==!1,standalone:e.standalone??!0,onDestroy:e.type.prototype.ngOnDestroy||null}}function VS(e){let t={};return{type:e.type,providersResolver:null,factory:null,hostBindings:e.hostBindings||null,hostVars:e.hostVars||0,hostAttrs:e.hostAttrs||null,contentQueries:e.contentQueries||null,declaredInputs:t,inputConfig:e.inputs||qo,exportAs:e.exportAs||null,standalone:e.standalone??!0,signals:e.signals===!0,selectors:e.selectors||xi,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:p1(e.inputs,t),outputs:h1(e.outputs),debugInfo:null}}function US(e){e.features?.forEach(t=>t(e))}function Eb(e,t){if(!e)return null;let n=t?Hb:d1;return()=>(typeof e=="function"?e():e).map(r=>n(r)).filter(f1)}function m1(e){let t=0,n=typeof e.consts=="function"?"":e.consts,r=[e.selectors,e.ngContentSelectors,e.hostVars,e.hostAttrs,n,e.vars,e.decls,e.encapsulation,e.standalone,e.signals,e.exportAs,JSON.stringify(e.inputs),JSON.stringify(e.outputs),Object.getOwnPropertyNames(e.type.prototype),!!e.contentQueries,!!e.viewQuery];for(let i of r.join("|"))t=Math.imul(31,t)+i.charCodeAt(0)<<0;return t+=2147483648,"c"+t}function g1(e){return Object.getPrototypeOf(e.prototype).constructor}function ho(e){let t=g1(e.type),n=!0,r=[e];for(;t;){let i;if(Kr(e))i=t.\u0275cmp||t.\u0275dir;else{if(t.\u0275cmp)throw new $e(903,!1);i=t.\u0275dir}if(i){if(n){r.push(i);let o=e;o.inputs=vm(e.inputs),o.declaredInputs=vm(e.declaredInputs),o.outputs=vm(e.outputs);let a=i.hostBindings;a&&w1(e,a);let l=i.viewQuery,c=i.contentQueries;if(l&&_1(e,l),c&&E1(e,c),y1(e,i),jN(e.outputs,i.outputs),Kr(i)&&i.data.animation){let h=e.data;h.animation=(h.animation||[]).concat(i.data.animation)}}let s=i.features;if(s)for(let o=0;o<s.length;o++){let a=s[o];a&&a.ngInherit&&a(e),a===ho&&(n=!1)}}t=Object.getPrototypeOf(t)}v1(r)}function y1(e,t){for(let n in t.inputs){if(!t.inputs.hasOwnProperty(n)||e.inputs.hasOwnProperty(n))continue;let r=t.inputs[n];r!==void 0&&(e.inputs[n]=r,e.declaredInputs[n]=t.declaredInputs[n])}}function v1(e){let t=0,n=null;for(let r=e.length-1;r>=0;r--){let i=e[r];i.hostVars=t+=i.hostVars,i.hostAttrs=ua(i.hostAttrs,n=ua(n,i.hostAttrs))}}function vm(e){return e===qo?{}:e===xi?[]:e}function _1(e,t){let n=e.viewQuery;n?e.viewQuery=(r,i)=>{t(r,i),n(r,i)}:e.viewQuery=t}function E1(e,t){let n=e.contentQueries;n?e.contentQueries=(r,i,s)=>{t(r,i,s),n(r,i,s)}:e.contentQueries=t}function w1(e,t){let n=e.hostBindings;n?e.hostBindings=(r,i)=>{t(r,i),n(r,i)}:e.hostBindings=t}function HS(e,t,n){return e[t]=n}function Li(e,t,n){let r=e[t];return Object.is(r,n)?!1:(e[t]=n,!0)}function b1(e,t,n,r){let i=Li(e,t,n);return Li(e,t+1,r)||i}function C1(e,t,n,r,i,s,o,a,l){let c=t.consts,h=il(t,e,4,o||null,a||null);Ug()&&vy(t,n,h,ao(c,l),dy),h.mergedAttrs=ua(h.mergedAttrs,h.attrs),qg(t,h);let d=h.tView=ay(2,h,r,i,s,t.directiveRegistry,t.pipeRegistry,null,t.schemas,c,null);return t.queries!==null&&(t.queries.template(t,h),d.queries=t.queries.embeddedTView(h)),h}function mg(e,t,n,r,i,s,o,a,l,c){let h=n+Vt,d=t.firstCreatePass?C1(h,t,e,r,i,s,o,a,l):t.data[h];lo(d,!1);let f=S1(t,e,d,n);Cd()&&Pd(t,e,f,d),Yr(f,e);let g=RS(f,e,f,d);return e[h]=g,ly(e,g),XP(g,d,e),Ed(d)&&Ad(t,e,d),l!=null&&uy(e,d,c),d}function xt(e,t,n,r,i,s,o,a){let l=Fe(),c=Zt(),h=ao(c.consts,s);return mg(l,c,e,t,n,r,i,h,o,a),xt}var S1=D1;function D1(e,t,n,r){return Sd(!0),t[sn].createComment("")}var jS=new pe(""),I1=(()=>{class e{static \u0275prov=ne({token:e,providedIn:"root",factory:()=>new gg})}return e})(),gg=class{queuedEffectCount=0;queues=new Map;schedule(e){this.enqueue(e)}remove(e){let t=e.zone,n=this.queues.get(t);n.has(e)&&(n.delete(e),this.queuedEffectCount--)}enqueue(e){let t=e.zone;this.queues.has(t)||this.queues.set(t,new Set);let n=this.queues.get(t);n.has(e)||(this.queuedEffectCount++,n.add(e))}flush(){for(;this.queuedEffectCount>0;)for(let[e,t]of this.queues)e===null?this.flushQueue(t):e.run(()=>this.flushQueue(t))}flushQueue(e){for(let t of e)e.delete(t),this.queuedEffectCount--,t.run()}};function Ey(e){return!!e&&typeof e.then=="function"}function $S(e){return!!e&&typeof e.subscribe=="function"}var T1=new pe(""),WS=(()=>{class e{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((n,r)=>{this.resolve=n,this.reject=r});appInits=O(T1,{optional:!0})??[];injector=O(ht);constructor(){}runInitializers(){if(this.initialized)return;let n=[];for(let i of this.appInits){let s=qb(this.injector,i);if(Ey(s))n.push(s);else if($S(s)){let o=new Promise((a,l)=>{s.subscribe({complete:a,error:l})});n.push(o)}}let r=()=>{this.done=!0,this.resolve()};Promise.all(n).then(()=>{r()}).catch(i=>{this.reject(i)}),n.length===0&&r(),this.initialized=!0}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),x1=new pe("");function R1(){uw(()=>{throw new $e(600,!1)})}function N1(e){return e.isBoundToModule}var A1=10,yr=(()=>{class e{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=O(wM);afterRenderManager=O(zC);zonelessEnabled=O(Id);rootEffectScheduler=O(I1);dirtyFlags=0;tracingSnapshot=null;externalTestViews=new Set;afterTick=new J;get allViews(){return[...this.externalTestViews.keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];isStable=O(Td).hasPendingTasks.pipe(pr(n=>!n));constructor(){O(ga,{optional:!0})}whenStable(){let n;return new Promise(r=>{n=this.isStable.subscribe({next:i=>{i&&r()}})}).finally(()=>{n.unsubscribe()})}_injector=O(Gn);_rendererFactory=null;get injector(){return this._injector}bootstrap(n,r){pt(10);let i=n instanceof dd;if(!this._injector.get(WS).done){let d=!i&&dA(n),f=!1;throw new $e(405,f)}let s;i?s=n:s=this._injector.get(co).resolveComponentFactory(n),this.componentTypes.push(s.componentType);let o=N1(s)?void 0:this._injector.get(ki),a=r||s.selector,l=s.create(ht.NULL,[],a,o),c=l.location.nativeElement,h=l.injector.get(jS,null);return h?.registerApplication(c),l.onDestroy(()=>{this.detachView(l.hostView),zu(this.components,l),h?.unregisterApplication(c)}),this._loadComponent(l),pt(11,l),l}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){pt(12),this.tracingSnapshot!==null?this.tracingSnapshot.run(ny.CHANGE_DETECTION,this.tickImpl):this.tickImpl()}tickImpl=()=>{if(this._runningTick)throw new $e(101,!1);let n=je(null);try{this._runningTick=!0,this.synchronize()}catch(r){this.internalErrorHandler(r)}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,je(n),this.afterTick.next(),pt(13)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(hn,null,{optional:!0}));let n=0;for(;this.dirtyFlags!==0&&n++<A1;)pt(14),this.synchronizeOnce(),pt(15)}synchronizeOnce(){if(this.dirtyFlags&16&&(this.dirtyFlags&=-17,this.rootEffectScheduler.flush()),this.dirtyFlags&7){let n=!!(this.dirtyFlags&1);this.dirtyFlags&=-8,this.dirtyFlags|=8;for(let{_lView:r,notifyErrorHandler:i}of this.allViews)M1(r,i,n,this.zonelessEnabled);if(this.dirtyFlags&=-5,this.syncDirtyFlagsWithViews(),this.dirtyFlags&23)return}else this._rendererFactory?.begin?.(),this._rendererFactory?.end?.();this.dirtyFlags&8&&(this.dirtyFlags&=-9,this.afterRenderManager.execute()),this.syncDirtyFlagsWithViews()}syncDirtyFlagsWithViews(){if(this.allViews.some(({_lView:n})=>bd(n))){this.dirtyFlags|=2;return}else this.dirtyFlags&=-8}attachView(n){let r=n;this._views.push(r),r.attachToAppRef(this)}detachView(n){let r=n;zu(this._views,r),r.detachFromAppRef()}_loadComponent(n){this.attachView(n.hostView),this.tick(),this.components.push(n),this._injector.get(x1,[]).forEach(r=>r(n))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(n=>n()),this._views.slice().forEach(n=>n.destroy())}finally{this._destroyed=!0,this._views=[],this._destroyListeners=[]}}onDestroy(n){return this._destroyListeners.push(n),()=>zu(this._destroyListeners,n)}destroy(){if(this._destroyed)throw new $e(406,!1);let n=this._injector;n.destroy&&!n.destroyed&&n.destroy()}get viewCount(){return this._views.length}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function zu(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function M1(e,t,n,r){!n&&!bd(e)||DS(e,t,n&&!r?0:1)}function va(e,t,n,r){let i=Fe(),s=tl();if(Li(i,s,t)){let o=Zt(),a=zg();UO(a,i,e,t,n,r)}return va}function GS(e,t,n,r){return Li(e,tl(),n)?t+Zc(n)+r:Hi}function Hu(e,t){return e<<17|t<<2}function ts(e){return e>>17&32767}function O1(e){return(e&2)==2}function P1(e,t){return e&131071|t<<17}function yg(e){return e|2}function da(e){return(e&131068)>>2}function _m(e,t){return e&-131069|t<<2}function k1(e){return(e&1)===1}function vg(e){return e|1}function L1(e,t,n,r,i,s){let o=s?t.classBindings:t.styleBindings,a=ts(o),l=da(o);e[r]=n;let c=!1,h;if(Array.isArray(n)){let d=n;h=d[1],(h===null||Xc(d,h)>0)&&(c=!0)}else h=n;if(i)if(l!==0){let d=ts(e[a+1]);e[r+1]=Hu(d,a),d!==0&&(e[d+1]=_m(e[d+1],r)),e[a+1]=P1(e[a+1],r)}else e[r+1]=Hu(a,0),a!==0&&(e[a+1]=_m(e[a+1],r)),a=r;else e[r+1]=Hu(l,0),a===0?a=r:e[l+1]=_m(e[l+1],r),l=r;c&&(e[r+1]=yg(e[r+1])),wb(e,h,r,!0),wb(e,h,r,!1),F1(t,h,e,r,s),o=Hu(a,l),s?t.classBindings=o:t.styleBindings=o}function F1(e,t,n,r,i){let s=i?e.residualClasses:e.residualStyles;s!=null&&typeof t=="string"&&Xc(s,t)>=0&&(n[r+1]=vg(n[r+1]))}function wb(e,t,n,r){let i=e[n+1],s=t===null,o=r?ts(i):da(i),a=!1;for(;o!==0&&(a===!1||s);){let l=e[o],c=e[o+1];B1(l,t)&&(a=!0,e[o+1]=r?vg(c):yg(c)),o=r?ts(c):da(c)}a&&(e[n+1]=r?yg(i):vg(i))}function B1(e,t){return e===null||t==null||(Array.isArray(e)?e[1]:e)===t?!0:Array.isArray(e)&&typeof t=="string"?Xc(e,t)>=0:!1}function Be(e,t,n){let r=Fe(),i=tl();if(Li(r,i,t)){let s=Zt(),o=zg();gS(s,o,r,e,t,r[sn],n,!1)}return Be}function bb(e,t,n,r,i){fy(t,e,n,i?"class":"style",r)}function mo(e,t,n){return zS(e,t,n,!1),mo}function go(e,t){return zS(e,t,null,!0),go}function zS(e,t,n,r){let i=Fe(),s=Zt(),o=HA(2);if(s.firstUpdatePass&&U1(s,e,o,r),t!==Hi&&Li(i,o,t)){let a=s.data[uo()];G1(s,a,i,i[sn],e,i[o+1]=z1(t,n),r,o)}}function V1(e,t){return t>=e.expandoStartIndex}function U1(e,t,n,r){let i=e.data;if(i[n+1]===null){let s=i[uo()],o=V1(e,n);q1(s,r)&&t===null&&!o&&(t=!1),t=H1(i,s,t,r),L1(i,s,t,n,o,r)}}function H1(e,t,n,r){let i=GA(e),s=r?t.residualClasses:t.residualStyles;if(i===null)(r?t.classBindings:t.styleBindings)===0&&(n=Em(null,e,t,n,r),n=Kc(n,t.attrs,r),s=null);else{let o=t.directiveStylingLast;if(o===-1||e[o]!==i)if(n=Em(i,e,t,n,r),s===null){let a=j1(e,t,r);a!==void 0&&Array.isArray(a)&&(a=Em(null,e,t,a[1],r),a=Kc(a,t.attrs,r),$1(e,t,r,a))}else s=W1(e,t,r)}return s!==void 0&&(r?t.residualClasses=s:t.residualStyles=s),n}function j1(e,t,n){let r=n?t.classBindings:t.styleBindings;if(da(r)!==0)return e[ts(r)]}function $1(e,t,n,r){let i=n?t.classBindings:t.styleBindings;e[ts(i)]=r}function W1(e,t,n){let r,i=t.directiveEnd;for(let s=1+t.directiveStylingLast;s<i;s++){let o=e[s].hostAttrs;r=Kc(r,o,n)}return Kc(r,t.attrs,n)}function Em(e,t,n,r,i){let s=null,o=n.directiveEnd,a=n.directiveStylingLast;for(a===-1?a=n.directiveStart:a++;a<o&&(s=t[a],r=Kc(r,s.hostAttrs,i),s!==e);)a++;return e!==null&&(n.directiveStylingLast=a),r}function Kc(e,t,n){let r=n?1:2,i=-1;if(t!==null)for(let s=0;s<t.length;s++){let o=t[s];typeof o=="number"?i=o:i===r&&(Array.isArray(e)||(e=e===void 0?[]:["",e]),lA(e,o,n?!0:t[++s]))}return e===void 0?null:e}function G1(e,t,n,r,i,s,o,a){if(!(t.type&3))return;let l=e.data,c=l[a+1],h=k1(c)?Cb(l,t,n,i,da(c),o):void 0;if(!pd(h)){pd(s)||O1(c)&&(s=Cb(l,null,n,i,a,o));let d=rC(uo(),n);oP(r,o,d,i,s)}}function Cb(e,t,n,r,i,s){let o=t===null,a;for(;i>0;){let l=e[i],c=Array.isArray(l),h=c?l[1]:l,d=h===null,f=n[i+1];f===Hi&&(f=d?xi:void 0);let g=d?lm(f,r):h===r?f:void 0;if(c&&!pd(g)&&(g=lm(l,r)),pd(g)&&(a=g,o))return a;let m=e[i+1];i=o?ts(m):da(m)}if(t!==null){let l=s?t.residualClasses:t.residualStyles;l!=null&&(a=lm(l,r))}return a}function pd(e){return e!==void 0}function z1(e,t){return e==null||e===""||(typeof t=="string"?e=e+t:typeof e=="object"&&(e=mr(Qr(e)))),e}function q1(e,t){return(e.flags&(t?8:16))!==0}var _g=class{destroy(e){}updateValue(e,t){}swap(e,t){let n=Math.min(e,t),r=Math.max(e,t),i=this.detach(r);if(r-n>1){let s=this.detach(n);this.attach(n,i),this.attach(r,s)}else this.attach(n,i)}move(e,t){this.attach(t,this.detach(e))}};function wm(e,t,n,r,i){return e===n&&Object.is(t,r)?1:Object.is(i(e,t),i(n,r))?-1:0}function Y1(e,t,n){let r,i,s=0,o=e.length-1,a;if(Array.isArray(t)){let l=t.length-1;for(;s<=o&&s<=l;){let c=e.at(s),h=t[s],d=wm(s,c,s,h,n);if(d!==0){d<0&&e.updateValue(s,h),s++;continue}let f=e.at(o),g=t[l],m=wm(o,f,l,g,n);if(m!==0){m<0&&e.updateValue(o,g),o--,l--;continue}let b=n(s,c),x=n(o,f),A=n(s,h);if(Object.is(A,x)){let F=n(l,g);Object.is(F,b)?(e.swap(s,o),e.updateValue(o,g),l--,o--):e.move(o,s),e.updateValue(s,h),s++;continue}if(r??=new hd,i??=Db(e,s,o,n),Eg(e,r,s,A))e.updateValue(s,h),s++,o++;else if(i.has(A))r.set(b,e.detach(s)),o--;else{let F=e.create(s,t[s]);e.attach(s,F),s++,o++}}for(;s<=l;)Sb(e,r,n,s,t[s]),s++}else if(t!=null){let l=t[Symbol.iterator](),c=l.next();for(;!c.done&&s<=o;){let h=e.at(s),d=c.value,f=wm(s,h,s,d,n);if(f!==0)f<0&&e.updateValue(s,d),s++,c=l.next();else{r??=new hd,i??=Db(e,s,o,n);let g=n(s,d);if(Eg(e,r,s,g))e.updateValue(s,d),s++,o++,c=l.next();else if(!i.has(g))e.attach(s,e.create(s,d)),s++,o++,c=l.next();else{let m=n(s,h);r.set(m,e.detach(s)),o--}}}for(;!c.done;)Sb(e,r,n,e.length,c.value),c=l.next()}for(;s<=o;)e.destroy(e.detach(o--));r?.forEach(l=>{e.destroy(l)})}function Eg(e,t,n,r){return t!==void 0&&t.has(r)?(e.attach(n,t.get(r)),t.delete(r),!0):!1}function Sb(e,t,n,r,i){if(Eg(e,t,r,n(r,i)))e.updateValue(r,i);else{let s=e.create(r,i);e.attach(r,s)}}function Db(e,t,n,r){let i=new Set;for(let s=t;s<=n;s++)i.add(r(s,e.at(s)));return i}var hd=class{kvMap=new Map;_vMap=void 0;has(e){return this.kvMap.has(e)}delete(e){if(!this.has(e))return!1;let t=this.kvMap.get(e);return this._vMap!==void 0&&this._vMap.has(t)?(this.kvMap.set(e,this._vMap.get(t)),this._vMap.delete(t)):this.kvMap.delete(e),!0}get(e){return this.kvMap.get(e)}set(e,t){if(this.kvMap.has(e)){let n=this.kvMap.get(e);this._vMap===void 0&&(this._vMap=new Map);let r=this._vMap;for(;r.has(n);)n=r.get(n);r.set(n,t)}else this.kvMap.set(e,t)}forEach(e){for(let[t,n]of this.kvMap)if(e(n,t),this._vMap!==void 0){let r=this._vMap;for(;r.has(n);)n=r.get(n),e(n,t)}}};function $t(e,t){fo("NgControlFlow");let n=Fe(),r=tl(),i=n[r]!==Hi?n[r]:-1,s=i!==-1?md(n,Vt+i):void 0,o=0;if(Li(n,r,e)){let a=je(null);try{if(s!==void 0&&AS(s,o),e!==-1){let l=Vt+e,c=md(n,l),h=Sg(n[_e],l),d=qc(c,h.tView.ssrId),f=Md(n,h,t,{dehydratedView:d});Ld(c,f,o,Gc(h,d))}}finally{je(a)}}else if(s!==void 0){let a=NS(s,o);a!==void 0&&(a[jt]=t)}}var wg=class{lContainer;$implicit;$index;constructor(e,t,n){this.lContainer=e,this.$implicit=t,this.$index=n}get $count(){return this.lContainer.length-xn}};function ss(e,t){return t}var bg=class{hasEmptyBlock;trackByFn;liveCollection;constructor(e,t,n){this.hasEmptyBlock=e,this.trackByFn=t,this.liveCollection=n}};function Qt(e,t,n,r,i,s,o,a,l,c,h,d,f){fo("NgControlFlow");let g=Fe(),m=Zt(),b=l!==void 0,x=Fe(),A=a?o.bind(x[Pr][jt]):o,F=new bg(b,A);x[Vt+e]=F,mg(g,m,e+1,t,n,r,i,ao(m.consts,s)),b&&mg(g,m,e+2,l,c,h,d,ao(m.consts,f))}var Cg=class extends _g{lContainer;hostLView;templateTNode;operationsCounter=void 0;needsIndexUpdate=!1;constructor(e,t,n){super(),this.lContainer=e,this.hostLView=t,this.templateTNode=n}get length(){return this.lContainer.length-xn}at(e){return this.getLView(e)[jt].$implicit}attach(e,t){let n=t[Hc];this.needsIndexUpdate||=e!==this.length,Ld(this.lContainer,t,e,Gc(this.templateTNode,n))}detach(e){return this.needsIndexUpdate||=e!==this.length-1,K1(this.lContainer,e)}create(e,t){let n=qc(this.lContainer,this.templateTNode.tView.ssrId),r=Md(this.hostLView,this.templateTNode,new wg(this.lContainer,t,e),{dehydratedView:n});return this.operationsCounter?.recordCreate(),r}destroy(e){Od(e[_e],e),this.operationsCounter?.recordDestroy()}updateValue(e,t){this.getLView(e)[jt].$implicit=t}reset(){this.needsIndexUpdate=!1,this.operationsCounter?.reset()}updateIndexes(){if(this.needsIndexUpdate)for(let e=0;e<this.length;e++)this.getLView(e)[jt].$index=e}getLView(e){return Z1(this.lContainer,e)}};function en(e){let t=je(null),n=uo();try{let r=Fe(),i=r[_e],s=r[n],o=n+1,a=md(r,o);if(s.liveCollection===void 0){let c=Sg(i,o);s.liveCollection=new Cg(a,r,c)}else s.liveCollection.reset();let l=s.liveCollection;if(Y1(l,e,s.trackByFn),l.updateIndexes(),s.hasEmptyBlock){let c=tl(),h=l.length===0;if(Li(r,c,h)){let d=n+2,f=md(r,d);if(h){let g=Sg(i,d),m=qc(f,g.tView.ssrId),b=Md(r,g,void 0,{dehydratedView:m});Ld(f,b,0,Gc(g,m))}else AS(f,0)}}}finally{je(t)}}function md(e,t){return e[t]}function K1(e,t){return zc(e,t)}function Z1(e,t){return NS(e,t)}function Sg(e,t){return Fg(e,t)}function re(e,t,n,r){let i=Fe(),s=Zt(),o=Vt+e,a=i[sn],l=s.firstCreatePass?PS(o,s,i,t,dy,Ug(),n,r):s.data[o],c=X1(s,i,l,a,t,e);i[o]=c;let h=Ed(l);return lo(l,!0),dS(a,c,l),!vS(l)&&Cd()&&Pd(s,i,c,l),(OA()===0||h)&&Yr(c,i),PA(),h&&(Ad(s,i,l),iy(s,l,i)),r!==null&&uy(i,l),re}function ie(){let e=tr();Hg()?lC():(e=e.parent,lo(e,!1));let t=e;FA(t)&&BA(),kA();let n=Zt();return n.firstCreatePass&&kS(n,t),t.classesWithoutHost!=null&&QA(t)&&bb(n,t,Fe(),t.classesWithoutHost,!0),t.stylesWithoutHost!=null&&eM(t)&&bb(n,t,Fe(),t.stylesWithoutHost,!1),ie}function Ne(e,t,n,r){return re(e,t,n,r),ie(),Ne}var X1=(e,t,n,r,i,s)=>(Sd(!0),lS(r,i,KA()));function J1(e,t,n,r,i){let s=t.consts,o=ao(s,r),a=il(t,e,8,"ng-container",o);o!==null&&sg(a,o,!0);let l=ao(s,i);return Ug()&&vy(t,n,a,l,dy),a.mergedAttrs=ua(a.mergedAttrs,a.attrs),t.queries!==null&&t.queries.elementStart(t,a),a}function qS(e,t,n){let r=Fe(),i=Zt(),s=e+Vt,o=i.firstCreatePass?J1(s,i,r,t,n):i.data[s];lo(o,!0);let a=Q1(i,r,o,e);return r[s]=a,Cd()&&Pd(i,r,a,o),Yr(a,r),Ed(o)&&(Ad(i,r,o),iy(i,o,r)),n!=null&&uy(r,o),qS}function YS(){let e=tr(),t=Zt();return Hg()?lC():(e=e.parent,lo(e,!1)),t.firstCreatePass&&(qg(t,e),Lg(e)&&t.queries.elementEnd(e)),YS}function Bd(e,t,n){return qS(e,t,n),YS(),Bd}var Q1=(e,t,n,r)=>(Sd(!0),DO(t[sn],""));function nr(){return Fe()}var gd="en-US",ek=gd;function tk(e){typeof e=="string"&&(ek=e.toLowerCase().replace(/_/g,"-"))}var nk=(e,t,n)=>{};function Rt(e,t,n,r){let i=Fe(),s=Zt(),o=tr();return ik(s,i,i[sn],o,e,t,r),Rt}function rk(e,t,n,r){let i=e.cleanup;if(i!=null)for(let s=0;s<i.length-1;s+=2){let o=i[s];if(o===n&&i[s+1]===r){let a=t[Ju],l=i[s+2];return a.length>l?a[l]:null}typeof o=="string"&&(s+=2)}return null}function ik(e,t,n,r,i,s,o){let a=Ed(r),l=e.firstCreatePass?aC(e):null,c=t[jt],h=sC(t),d=!0;if(r.type&3||o){let f=Xr(r,t),g=o?o(f):f,m=h.length,b=o?A=>o(er(A[r.index])):r.index,x=null;if(!o&&a&&(x=rk(e,t,i,r.index)),x!==null){let A=x.__ngLastListenerFn__||x;A.__ngNextListenerFn__=s,x.__ngLastListenerFn__=s,d=!1}else{s=xb(r,t,c,s),nk(f,i,s);let A=n.listen(g,i,s);h.push(s,A),l&&l.push(i,b,m,m+1)}}else s=xb(r,t,c,s);if(d){let f=r.outputs?.[i],g=r.hostDirectiveOutputs?.[i];if(g&&g.length)for(let m=0;m<g.length;m+=2){let b=g[m],x=g[m+1];Ib(r,e,t,b,x,i,s,h,l)}if(f&&f.length)for(let m of f)Ib(r,e,t,m,i,i,s,h,l)}}function Ib(e,t,n,r,i,s,o,a,l){let c=n[r],h=t.data[r].outputs[i],d=c[h].subscribe(o),f=a.length;a.push(o,d),l&&l.push(s,e.index,f,-(f+1))}function Tb(e,t,n,r){let i=je(null);try{return pt(6,t,n),n(r)!==!1}catch(s){return yS(e,s),!1}finally{pt(7,t,n),je(i)}}function xb(e,t,n,r){return function i(s){if(s===Function)return r;let o=ha(e)?gr(e.index,t):t;yy(o,5);let a=Tb(t,n,r,s),l=i.__ngNextListenerFn__;for(;l;)a=Tb(t,n,l,s)&&a,l=l.__ngNextListenerFn__;return a}}function me(e=1){return qA(e)}function zn(e,t,n){return ji(e,"",t,"",n),zn}function ji(e,t,n,r,i){let s=Fe(),o=GS(s,t,n,r);if(o!==Hi){let a=Zt(),l=zg();gS(a,l,s,e,o,s[sn],i,!1)}return ji}function Ea(e,t,n){o1(e,t,n)}function wa(e){let t=Fe(),n=Zt(),r=fC();$g(r+1);let i=_y(n,r);if(e.dirty&&xA(t)===((i.metadata.flags&2)===2)){if(i.matches===null)e.reset([]);else{let s=c1(t,r);e.reset(s,CM),e.notifyOnChanges()}return!0}return!1}function ba(){return r1(Fe(),fC())}function wy(e,t,n,r){n>=e.data.length&&(e.data[n]=null,e.blueprint[n]=null),t[n]=r}function by(e){let t=uC();return wd(t,Vt+e)}function tn(e,t=""){let n=Fe(),r=Zt(),i=e+Vt,s=r.firstCreatePass?il(r,i,1,t,null):r.data[i],o=ok(r,n,s,t,e);n[i]=o,Cd()&&Pd(r,n,o,s),lo(s,!1)}var ok=(e,t,n,r,i)=>(Sd(!0),CO(t[sn],r));function Ca(e){return as("",e,""),Ca}function as(e,t,n){let r=Fe(),i=GS(r,e,t,n);return i!==Hi&&sk(r,uo(),i),as}function sk(e,t,n){let r=rC(t,e);SO(e[sn],r,n)}var KS={};function $i(e){let t=Zt(),n=Fe(),r=e+Vt,i=il(t,r,128,null,null);return lo(i,!1),wy(t,n,r,KS),$i}function yo(e){fo("NgLet");let t=Zt(),n=Fe(),r=uo();return wy(t,n,r,e),e}function Ur(e){let t=uC(),n=wd(t,Vt+e);if(n===KS)throw new $e(314,!1);return n}function ak(e,t,n){let r=Zt();if(r.firstCreatePass){let i=Kr(e);Dg(n,r.data,r.blueprint,i,!0),Dg(t,r.data,r.blueprint,i,!1)}}function Dg(e,t,n,r,i){if(e=kn(e),Array.isArray(e))for(let s=0;s<e.length;s++)Dg(e[s],t,n,r,i);else{let s=Zt(),o=Fe(),a=tr(),l=ca(e)?e:kn(e.provide),c=zb(e),h=a.providerIndexes&1048575,d=a.directiveStart,f=a.providerIndexes>>20;if(ca(e)||!e.multi){let g=new Qo(c,i,Ot),m=Cm(l,t,i?h:h+f,d);m===-1?(km(od(a,o),s,l),bm(s,e,t.length),t.push(l),a.directiveStart++,a.directiveEnd++,i&&(a.providerIndexes+=1048576),n.push(g),o.push(g)):(n[m]=g,o[m]=g)}else{let g=Cm(l,t,h+f,d),m=Cm(l,t,h,h+f),b=g>=0&&n[g],x=m>=0&&n[m];if(i&&!x||!i&&!b){km(od(a,o),s,l);let A=uk(i?lk:ck,n.length,i,r,c);!i&&x&&(n[m].providerFactory=A),bm(s,e,t.length,0),t.push(l),a.directiveStart++,a.directiveEnd++,i&&(a.providerIndexes+=1048576),n.push(A),o.push(A)}else{let A=ZS(n[i?m:g],c,!i&&r);bm(s,e,g>-1?g:m,A)}!i&&r&&x&&n[m].componentProviders++}}}function bm(e,t,n,r){let i=ca(t),s=gA(t);if(i||s){let o=(s?kn(t.useClass):t).prototype.ngOnDestroy;if(o){let a=e.destroyHooks||(e.destroyHooks=[]);if(!i&&t.multi){let l=a.indexOf(n);l===-1?a.push(n,[r,o]):a[l+1].push(r,o)}else a.push(n,o)}}}function ZS(e,t,n){return n&&e.componentProviders++,e.multi.push(t)-1}function Cm(e,t,n,r){for(let i=n;i<r;i++)if(t[i]===e)return i;return-1}function ck(e,t,n,r){return Ig(this.multi,[])}function lk(e,t,n,r){let i=this.multi,s;if(this.providerFactory){let o=this.providerFactory.componentProviders,a=Wc(n,n[_e],this.providerFactory.index,r);s=a.slice(0,o),Ig(i,s);for(let l=o;l<a.length;l++)s.push(a[l])}else s=[],Ig(i,s);return s}function Ig(e,t){for(let n=0;n<e.length;n++){let r=e[n];t.push(r())}return t}function uk(e,t,n,r,i){let s=new Qo(e,n,Ot);return s.multi=[],s.index=t,s.componentProviders=0,ZS(s,i,r&&!n),s}function Vd(e,t=[]){return n=>{n.providersResolver=(r,i)=>ak(r,i?i(e):e,t)}}function XS(e,t,n,r){return QS(Fe(),jg(),e,t,n,r)}function JS(e,t){let n=e[t];return n===Hi?void 0:n}function QS(e,t,n,r,i,s){let o=t+n;return Li(e,o,i)?HS(e,o+1,s?r.call(s,i):r(i)):JS(e,o+1)}function dk(e,t,n,r,i,s,o){let a=t+n;return b1(e,a,i,s)?HS(e,a+2,o?r.call(o,i,s):r(i,s)):JS(e,a+2)}function Sn(e,t){let n=Zt(),r,i=e+Vt;n.firstCreatePass?(r=fk(t,n.pipeRegistry),n.data[i]=r,r.onDestroy&&(n.destroyHooks??=[]).push(i,r.onDestroy)):r=n.data[i];let s=r.factory||(r.factory=zo(r.type,!0)),o,a=Wn(Ot);try{let l=id(!1),c=s();return id(l),wy(n,Fe(),i,c),c}finally{Wn(a)}}function fk(e,t){if(t)for(let n=t.length-1;n>=0;n--){let r=t[n];if(e===r.name)return r}}function Nn(e,t,n){let r=e+Vt,i=Fe(),s=wd(i,r);return tD(i,r)?QS(i,jg(),t,s.transform,n,s):s.transform(n)}function eD(e,t,n,r){let i=e+Vt,s=Fe(),o=wd(s,i);return tD(s,i)?dk(s,jg(),t,o.transform,n,r,o):o.transform(n,r)}function tD(e,t){return e[_e].data[t].pure}function nD(e,t){return Fd(e,t)}var fa=class{full;major;minor;patch;constructor(e){this.full=e;let t=e.split(".");this.major=t[0],this.minor=t[1],this.patch=t.slice(2).join(".")}},Cy=new fa("19.2.0"),pk=(()=>{class e{zone=O(Le);changeDetectionScheduler=O(Ai);applicationRef=O(yr);_onMicrotaskEmptySubscription;initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.changeDetectionScheduler.runningTick||this.zone.run(()=>{this.applicationRef.tick()})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function hk({ngZoneFactory:e,ignoreChangesOutsideZone:t,scheduleInRootZone:n}){return e??=()=>new Le(te(w({},mk()),{scheduleInRootZone:n})),[{provide:Le,useFactory:e},{provide:Vc,multi:!0,useFactory:()=>{let r=O(pk,{optional:!0});return()=>r.initialize()}},{provide:Vc,multi:!0,useFactory:()=>{let r=O(gk);return()=>{r.initialize()}}},t===!0?{provide:NC,useValue:!0}:[],{provide:Zg,useValue:n??RC}]}function mk(e){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:e?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:e?.runCoalescing??!1}}var gk=(()=>{class e{subscription=new ot;initialized=!1;zone=O(Le);pendingTasks=O(Td);initialize(){if(this.initialized)return;this.initialized=!0;let n=null;!this.zone.isStable&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(n=this.pendingTasks.add()),this.zone.runOutsideAngular(()=>{this.subscription.add(this.zone.onStable.subscribe(()=>{Le.assertNotInAngularZone(),queueMicrotask(()=>{n!==null&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(n),n=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{Le.assertInAngularZone(),n??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),rD=(()=>{class e{appRef=O(yr);taskService=O(Td);ngZone=O(Le);zonelessEnabled=O(Id);tracing=O(ga,{optional:!0});disableScheduling=O(NC,{optional:!0})??!1;zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new ot;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(ad):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(O(Zg,{optional:!0})??!1);cancelScheduledCallback=null;useMicrotaskScheduler=!1;runningTick=!1;pendingRenderTaskId=null;constructor(){this.subscriptions.add(this.appRef.afterTick.subscribe(()=>{this.runningTick||this.cleanup()})),this.subscriptions.add(this.ngZone.onUnstable.subscribe(()=>{this.runningTick||this.cleanup()})),this.disableScheduling||=!this.zonelessEnabled&&(this.ngZone instanceof cd||!this.zoneIsDefined)}notify(n){if(!this.zonelessEnabled&&n===5)return;let r=!1;switch(n){case 0:{this.appRef.dirtyFlags|=2;break}case 3:case 2:case 4:case 5:case 1:{this.appRef.dirtyFlags|=4;break}case 6:{this.appRef.dirtyFlags|=2,r=!0;break}case 12:{this.appRef.dirtyFlags|=16,r=!0;break}case 13:{this.appRef.dirtyFlags|=2,r=!0;break}case 11:{r=!0;break}case 9:case 8:case 7:case 10:default:this.appRef.dirtyFlags|=8}if(this.appRef.tracingSnapshot=this.tracing?.snapshot(this.appRef.tracingSnapshot)??null,!this.shouldScheduleTick(r))return;let i=this.useMicrotaskScheduler?nb:AC;this.pendingRenderTaskId=this.taskService.add(),this.scheduleInRootZone?this.cancelScheduledCallback=Zone.root.run(()=>i(()=>this.tick())):this.cancelScheduledCallback=this.ngZone.runOutsideAngular(()=>i(()=>this.tick()))}shouldScheduleTick(n){return!(this.disableScheduling&&!n||this.appRef.destroyed||this.pendingRenderTaskId!==null||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Zone.current.get(ad+this.angularZoneId))}tick(){if(this.runningTick||this.appRef.destroyed)return;if(this.appRef.dirtyFlags===0){this.cleanup();return}!this.zonelessEnabled&&this.appRef.dirtyFlags&7&&(this.appRef.dirtyFlags|=1);let n=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick()},void 0,this.schedulerTickApplyArgs)}catch(r){throw this.taskService.remove(n),r}finally{this.cleanup()}this.useMicrotaskScheduler=!0,nb(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(n)})}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,this.pendingRenderTaskId!==null){let n=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(n)}}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function iD(){return fo("NgZoneless"),jb([{provide:Ai,useExisting:rD},{provide:Le,useClass:cd},{provide:Id,useValue:!0},{provide:Zg,useValue:!1},[]])}function yk(){return typeof $localize<"u"&&$localize.locale||gd}var Sy=new pe("",{providedIn:"root",factory:()=>O(Sy,Ke.Optional|Ke.SkipSelf)||yk()}),Tg=new pe(""),vk=new pe("");function Pc(e){return!e.moduleRef}function _k(e){let t=Pc(e)?e.r3Injector:e.moduleRef.injector,n=t.get(Le);return n.run(()=>{Pc(e)?e.r3Injector.resolveInjectorInitializers():e.moduleRef.resolveInjectorInitializers();let r=t.get(Mi,null),i;if(n.runOutsideAngular(()=>{i=n.onError.subscribe({next:s=>{r.handleError(s)}})}),Pc(e)){let s=()=>t.destroy(),o=e.platformInjector.get(Tg);o.add(s),t.onDestroy(()=>{i.unsubscribe(),o.delete(s)})}else{let s=()=>e.moduleRef.destroy(),o=e.platformInjector.get(Tg);o.add(s),e.moduleRef.onDestroy(()=>{zu(e.allPlatformModules,e.moduleRef),i.unsubscribe(),o.delete(s)})}return wk(r,n,()=>{let s=t.get(WS);return s.runInitializers(),s.donePromise.then(()=>{let o=t.get(Sy,gd);if(tk(o||gd),!t.get(vk,!0))return Pc(e)?t.get(yr):(e.allPlatformModules.push(e.moduleRef),e.moduleRef);if(Pc(e)){let a=t.get(yr);return e.rootComponent!==void 0&&a.bootstrap(e.rootComponent),a}else return Ek(e.moduleRef,e.allPlatformModules),e.moduleRef})})})}function Ek(e,t){let n=e.injector.get(yr);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>n.bootstrap(r));else if(e.instance.ngDoBootstrap)e.instance.ngDoBootstrap(n);else throw new $e(-403,!1);t.push(e)}function wk(e,t,n){try{let r=n();return Ey(r)?r.catch(i=>{throw t.runOutsideAngular(()=>e.handleError(i)),i}):r}catch(r){throw t.runOutsideAngular(()=>e.handleError(r)),r}}var qu=null;function bk(e=[],t){return ht.create({name:t,providers:[{provide:vd,useValue:"platform"},{provide:Tg,useValue:new Set([()=>qu=null])},...e]})}function Ck(e=[]){if(qu)return qu;let t=bk(e);return qu=t,R1(),Sk(t),t}function Sk(e){let t=e.get(ey,null);qb(e,()=>{t?.forEach(n=>n())})}var rr=(()=>{class e{static __NG_ELEMENT_ID__=Dk}return e})();function Dk(e){return Ik(tr(),Fe(),(e&16)===16)}function Ik(e,t,n){if(ha(e)&&!n){let r=gr(e.index,t);return new es(r,r)}else if(e.type&175){let r=t[Pr];return new es(r,t)}return null}function oD(e){pt(8);try{let{rootComponent:t,appProviders:n,platformProviders:r}=e,i=Ck(r),s=[hk({}),{provide:Ai,useExisting:rD},...n||[]],o=new fd({providers:s,parent:i,debugName:"",runEnvironmentInitializers:!1});return _k({r3Injector:o.injector,platformInjector:i,rootComponent:t})}catch(t){return Promise.reject(t)}finally{pt(9)}}function Sa(e){return typeof e=="boolean"?e:e!=null&&e!=="false"}function Dy(e,t=NaN){return!isNaN(parseFloat(e))&&!isNaN(Number(e))?Number(e):t}function Iy(e){let t=je(null);try{return e()}finally{je(t)}}var Rb=class{[bi];constructor(e){this[bi]=e}destroy(){this[bi].destroy()}};function Ud(e,t){let n=Yo(e),r=t.elementInjector||_d();return new Yc(n).create(r,t.projectableNodes,t.hostElement,t.environmentInjector)}var Tk={schedule(e,t){let n=setTimeout(e,t);return()=>clearTimeout(n)}};function xk(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function Rk(e){return!!e&&e.nodeType===Node.ELEMENT_NODE}var Ty;function Nk(e,t){if(!Ty){let n=Element.prototype;Ty=n.matches||n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector}return e.nodeType===Node.ELEMENT_NODE?Ty.call(e,t):!1}function Ak(e){let t={};return e.forEach(({propName:n,templateName:r,transform:i})=>{t[xk(r)]=[n,i]}),t}function Mk(e,t){return t.get(co).resolveComponentFactory(e).inputs}function Ok(e,t){let n=e.childNodes,r=t.map(()=>[]),i=-1;t.some((s,o)=>s==="*"?(i=o,!0):!1);for(let s=0,o=n.length;s<o;++s){let a=n[s],l=Pk(a,t,i);l!==-1&&r[l].push(a)}return r}function Pk(e,t,n){let r=n;return Rk(e)&&t.some((i,s)=>i!=="*"&&Nk(e,i)?(r=s,!0):!1),r}var kk=10,xy=class{componentFactory;inputMap=new Map;constructor(e,t){this.componentFactory=t.get(co).resolveComponentFactory(e);for(let n of this.componentFactory.inputs)this.inputMap.set(n.propName,n.templateName)}create(e){return new Ry(this.componentFactory,e,this.inputMap)}},Ry=class{componentFactory;injector;inputMap;eventEmitters=new Bo(1);events=this.eventEmitters.pipe(ea(e=>io(...e)));componentRef=null;scheduledDestroyFn=null;initialInputValues=new Map;ngZone;elementZone;appRef;cdScheduler;constructor(e,t,n){this.componentFactory=e,this.injector=t,this.inputMap=n,this.ngZone=this.injector.get(Le),this.appRef=this.injector.get(yr),this.cdScheduler=t.get(Ai),this.elementZone=typeof Zone>"u"?null:this.ngZone.run(()=>Zone.current)}connect(e){this.runInZone(()=>{if(this.scheduledDestroyFn!==null){this.scheduledDestroyFn(),this.scheduledDestroyFn=null;return}this.componentRef===null&&this.initializeComponent(e)})}disconnect(){this.runInZone(()=>{this.componentRef===null||this.scheduledDestroyFn!==null||(this.scheduledDestroyFn=Tk.schedule(()=>{this.componentRef!==null&&(this.componentRef.destroy(),this.componentRef=null)},kk))})}getInputValue(e){return this.runInZone(()=>this.componentRef===null?this.initialInputValues.get(e):this.componentRef.instance[e])}setInputValue(e,t){if(this.componentRef===null){this.initialInputValues.set(e,t);return}this.runInZone(()=>{this.componentRef.setInput(this.inputMap.get(e)??e,t),this.componentRef.hostView.dirty&&(this.componentRef.changeDetectorRef.markForRefresh(),this.cdScheduler.notify(6))})}initializeComponent(e){let t=ht.create({providers:[],parent:this.injector}),n=Ok(e,this.componentFactory.ngContentSelectors);this.componentRef=this.componentFactory.create(t,n,e),this.initializeInputs(),this.initializeOutputs(this.componentRef),this.appRef.attachView(this.componentRef.hostView),this.componentRef.hostView.detectChanges()}initializeInputs(){for(let[e,t]of this.initialInputValues)this.setInputValue(e,t);this.initialInputValues.clear()}initializeOutputs(e){let t=this.componentFactory.outputs.map(({propName:n,templateName:r})=>{let i=e.instance[n];return new nt(s=>{let o=i.subscribe(a=>s.next({name:r,value:a}));return()=>o.unsubscribe()})});this.eventEmitters.next(t)}runInZone(e){return this.elementZone&&Zone.current!==this.elementZone?this.ngZone.run(e):e()}},Ny=class extends HTMLElement{ngElementEventsSubscription=null};function sD(e,t){let n=Mk(e,t.injector),r=t.strategyFactory||new xy(e,t.injector),i=Ak(n);class s extends Ny{injector;static observedAttributes=Object.keys(i);get ngElementStrategy(){if(!this._ngElementStrategy){let a=this._ngElementStrategy=r.create(this.injector||t.injector);n.forEach(({propName:l,transform:c})=>{if(!this.hasOwnProperty(l))return;let h=this[l];delete this[l],a.setInputValue(l,h,c)})}return this._ngElementStrategy}_ngElementStrategy;constructor(a){super(),this.injector=a}attributeChangedCallback(a,l,c,h){let[d,f]=i[a];this.ngElementStrategy.setInputValue(d,c,f)}connectedCallback(){let a=!1;this.ngElementStrategy.events&&(this.subscribeToEvents(),a=!0),this.ngElementStrategy.connect(this),a||this.subscribeToEvents()}disconnectedCallback(){this._ngElementStrategy&&this._ngElementStrategy.disconnect(),this.ngElementEventsSubscription&&(this.ngElementEventsSubscription.unsubscribe(),this.ngElementEventsSubscription=null)}subscribeToEvents(){this.ngElementEventsSubscription=this.ngElementStrategy.events.subscribe(a=>{let l=new CustomEvent(a.name,{detail:a.value});this.dispatchEvent(l)})}}return n.forEach(({propName:o,transform:a})=>{Object.defineProperty(s.prototype,o,{get(){return this.ngElementStrategy.getInputValue(o)},set(l){this.ngElementStrategy.setInputValue(o,l,a)},configurable:!0,enumerable:!0})}),s}var uD=null;function Da(){return uD}function dD(e){uD??=e}var Hd=class{},Qe=new pe(""),fD=(()=>{class e{historyGo(n){throw new Error("")}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:()=>O(Fk),providedIn:"platform"})}return e})(),Fk=(()=>{class e extends fD{_location;_history;_doc=O(Qe);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Da().getBaseHref(this._doc)}onPopState(n){let r=Da().getGlobalEventTarget(this._doc,"window");return r.addEventListener("popstate",n,!1),()=>r.removeEventListener("popstate",n)}onHashChange(n){let r=Da().getGlobalEventTarget(this._doc,"window");return r.addEventListener("hashchange",n,!1),()=>r.removeEventListener("hashchange",n)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(n){this._location.pathname=n}pushState(n,r,i){this._history.pushState(n,r,i)}replaceState(n,r,i){this._history.replaceState(n,r,i)}forward(){this._history.forward()}back(){this._history.back()}historyGo(n=0){this._history.go(n)}getState(){return this._history.state}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:()=>new e,providedIn:"platform"})}return e})();function pD(e,t){return e?t?e.endsWith("/")?t.startsWith("/")?e+t.slice(1):e+t:t.startsWith("/")?e+t:`${e}/${t}`:e:t}function aD(e){let t=e.search(/#|\?|$/);return e[t-1]==="/"?e.slice(0,t-1)+e.slice(t):e}function cs(e){return e&&e[0]!=="?"?`?${e}`:e}var My=(()=>{class e{historyGo(n){throw new Error("")}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:()=>O(Vk),providedIn:"root"})}return e})(),Bk=new pe(""),Vk=(()=>{class e extends My{_platformLocation;_baseHref;_removeListenerFns=[];constructor(n,r){super(),this._platformLocation=n,this._baseHref=r??this._platformLocation.getBaseHrefFromDOM()??O(Qe).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(n){this._removeListenerFns.push(this._platformLocation.onPopState(n),this._platformLocation.onHashChange(n))}getBaseHref(){return this._baseHref}prepareExternalUrl(n){return pD(this._baseHref,n)}path(n=!1){let r=this._platformLocation.pathname+cs(this._platformLocation.search),i=this._platformLocation.hash;return i&&n?`${r}${i}`:r}pushState(n,r,i,s){let o=this.prepareExternalUrl(i+cs(s));this._platformLocation.pushState(n,r,o)}replaceState(n,r,i,s){let o=this.prepareExternalUrl(i+cs(s));this._platformLocation.replaceState(n,r,o)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(n=0){this._platformLocation.historyGo?.(n)}static \u0275fac=function(n){return new(n||e)(Ze(fD),Ze(Bk,8))};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Oy=(()=>{class e{_subject=new J;_basePath;_locationStrategy;_urlChangeListeners=[];_urlChangeSubscription=null;constructor(n){this._locationStrategy=n;let r=this._locationStrategy.getBaseHref();this._basePath=jk(aD(cD(r))),this._locationStrategy.onPopState(i=>{this._subject.next({url:this.path(!0),pop:!0,state:i.state,type:i.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(n=!1){return this.normalize(this._locationStrategy.path(n))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(n,r=""){return this.path()==this.normalize(n+cs(r))}normalize(n){return e.stripTrailingSlash(Hk(this._basePath,cD(n)))}prepareExternalUrl(n){return n&&n[0]!=="/"&&(n="/"+n),this._locationStrategy.prepareExternalUrl(n)}go(n,r="",i=null){this._locationStrategy.pushState(i,"",n,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+cs(r)),i)}replaceState(n,r="",i=null){this._locationStrategy.replaceState(i,"",n,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+cs(r)),i)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(n=0){this._locationStrategy.historyGo?.(n)}onUrlChange(n){return this._urlChangeListeners.push(n),this._urlChangeSubscription??=this.subscribe(r=>{this._notifyUrlChangeListeners(r.url,r.state)}),()=>{let r=this._urlChangeListeners.indexOf(n);this._urlChangeListeners.splice(r,1),this._urlChangeListeners.length===0&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(n="",r){this._urlChangeListeners.forEach(i=>i(n,r))}subscribe(n,r,i){return this._subject.subscribe({next:n,error:r??void 0,complete:i??void 0})}static normalizeQueryParams=cs;static joinWithSlash=pD;static stripTrailingSlash=aD;static \u0275fac=function(n){return new(n||e)(Ze(My))};static \u0275prov=ne({token:e,factory:()=>Uk(),providedIn:"root"})}return e})();function Uk(){return new Oy(Ze(My))}function Hk(e,t){if(!e||!t.startsWith(e))return t;let n=t.substring(e.length);return n===""||["/",";","?","#"].includes(n[0])?n:t}function cD(e){return e.replace(/\/index.html$/,"")}function jk(e){if(new RegExp("^(https?:)?//").test(e)){let[,t]=e.split(/\/\/[^\/]+/);return t}return e}function hD(e,t){t=encodeURIComponent(t);for(let n of e.split(";")){let r=n.indexOf("="),[i,s]=r==-1?[n,""]:[n.slice(0,r),n.slice(r+1)];if(i.trim()===t)return decodeURIComponent(s)}return null}var Ay=/\s+/,lD=[],mD=(()=>{class e{_ngEl;_renderer;initialClasses=lD;rawClass;stateMap=new Map;constructor(n,r){this._ngEl=n,this._renderer=r}set klass(n){this.initialClasses=n!=null?n.trim().split(Ay):lD}set ngClass(n){this.rawClass=typeof n=="string"?n.trim().split(Ay):n}ngDoCheck(){for(let r of this.initialClasses)this._updateState(r,!0);let n=this.rawClass;if(Array.isArray(n)||n instanceof Set)for(let r of n)this._updateState(r,!0);else if(n!=null)for(let r of Object.keys(n))this._updateState(r,!!n[r]);this._applyStateDiff()}_updateState(n,r){let i=this.stateMap.get(n);i!==void 0?(i.enabled!==r&&(i.changed=!0,i.enabled=r),i.touched=!0):this.stateMap.set(n,{enabled:r,changed:!0,touched:!0})}_applyStateDiff(){for(let n of this.stateMap){let r=n[0],i=n[1];i.changed?(this._toggleClass(r,i.enabled),i.changed=!1):i.touched||(i.enabled&&this._toggleClass(r,!1),this.stateMap.delete(r)),i.touched=!1}}_toggleClass(n,r){n=n.trim(),n.length>0&&n.split(Ay).forEach(i=>{r?this._renderer.addClass(this._ngEl.nativeElement,i):this._renderer.removeClass(this._ngEl.nativeElement,i)})}static \u0275fac=function(n){return new(n||e)(Ot(Ct),Ot(ya))};static \u0275dir=Vr({type:e,selectors:[["","ngClass",""]],inputs:{klass:[0,"class","klass"],ngClass:"ngClass"}})}return e})(),gD=(()=>{class e{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;constructor(n){this._viewContainerRef=n}ngOnChanges(n){if(this._shouldRecreateView(n)){let r=this._viewContainerRef;if(this._viewRef&&r.remove(r.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let i=this._createContextForwardProxy();this._viewRef=r.createEmbeddedView(this.ngTemplateOutlet,i,{injector:this.ngTemplateOutletInjector??void 0})}}_shouldRecreateView(n){return!!n.ngTemplateOutlet||!!n.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(n,r,i)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,r,i):!1,get:(n,r,i)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,r,i)}})}static \u0275fac=function(n){return new(n||e)(Ot(Br))};static \u0275dir=Vr({type:e,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},features:[ns]})}return e})(),Py="browser",$k="server";function yD(e){return e===Py}function ky(e){return e===$k}var jd=class{},Fy=class extends Hd{supportsDOMEvents=!0},By=class lI extends Fy{static makeCurrent(){dD(new lI)}onAndCancel(t,n,r,i){return t.addEventListener(n,r,i),()=>{t.removeEventListener(n,r,i)}}dispatchEvent(t,n){t.dispatchEvent(n)}remove(t){t.remove()}createElement(t,n){return n=n||this.getDefaultDocument(),n.createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,n){return n==="window"?window:n==="document"?t:n==="body"?t.body:null}getBaseHref(t){let n=Gk();return n==null?null:zk(n)}resetBaseElement(){ol=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return hD(document.cookie,t)}},ol=null;function Gk(){return ol=ol||document.querySelector("base"),ol?ol.getAttribute("href"):null}function zk(e){return new URL(e,document.baseURI).pathname}var qk=(()=>{class e{build(){return new XMLHttpRequest}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:e.\u0275fac})}return e})(),Vy=new pe(""),CD=(()=>{class e{_zone;_plugins;_eventNameToPlugin=new Map;constructor(n,r){this._zone=r,n.forEach(i=>{i.manager=this}),this._plugins=n.slice().reverse()}addEventListener(n,r,i,s){return this._findPluginFor(r).addEventListener(n,r,i,s)}getZone(){return this._zone}_findPluginFor(n){let r=this._eventNameToPlugin.get(n);if(r)return r;if(r=this._plugins.find(i=>i.supports(n)),!r)throw new $e(5101,!1);return this._eventNameToPlugin.set(n,r),r}static \u0275fac=function(n){return new(n||e)(Ze(Vy),Ze(Le))};static \u0275prov=ne({token:e,factory:e.\u0275fac})}return e})(),Wd=class{_doc;constructor(e){this._doc=e}manager},$d="ng-app-id";function vD(e){for(let t of e)t.remove()}function _D(e,t){let n=t.createElement("style");return n.textContent=e,n}function Yk(e,t,n,r){let i=e.head?.querySelectorAll(`style[${$d}="${t}"],link[${$d}="${t}"]`);if(i)for(let s of i)s.removeAttribute($d),s instanceof HTMLLinkElement?r.set(s.href.slice(s.href.lastIndexOf("/")+1),{usage:0,elements:[s]}):s.textContent&&n.set(s.textContent,{usage:0,elements:[s]})}function Uy(e,t){let n=t.createElement("link");return n.setAttribute("rel","stylesheet"),n.setAttribute("href",e),n}var SD=(()=>{class e{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;isServer;constructor(n,r,i,s={}){this.doc=n,this.appId=r,this.nonce=i,this.isServer=ky(s),Yk(n,r,this.inline,this.external),this.hosts.add(n.head)}addStyles(n,r){for(let i of n)this.addUsage(i,this.inline,_D);r?.forEach(i=>this.addUsage(i,this.external,Uy))}removeStyles(n,r){for(let i of n)this.removeUsage(i,this.inline);r?.forEach(i=>this.removeUsage(i,this.external))}addUsage(n,r,i){let s=r.get(n);s?s.usage++:r.set(n,{usage:1,elements:[...this.hosts].map(o=>this.addElement(o,i(n,this.doc)))})}removeUsage(n,r){let i=r.get(n);i&&(i.usage--,i.usage<=0&&(vD(i.elements),r.delete(n)))}ngOnDestroy(){for(let[,{elements:n}]of[...this.inline,...this.external])vD(n);this.hosts.clear()}addHost(n){this.hosts.add(n);for(let[r,{elements:i}]of this.inline)i.push(this.addElement(n,_D(r,this.doc)));for(let[r,{elements:i}]of this.external)i.push(this.addElement(n,Uy(r,this.doc)))}removeHost(n){this.hosts.delete(n)}addElement(n,r){return this.nonce&&r.setAttribute("nonce",this.nonce),this.isServer&&r.setAttribute($d,this.appId),n.appendChild(r)}static \u0275fac=function(n){return new(n||e)(Ze(Qe),Ze(nl),Ze(ty,8),Ze(is))};static \u0275prov=ne({token:e,factory:e.\u0275fac})}return e})(),Ly={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},jy=/%COMP%/g,DD="%COMP%",Kk=`_nghost-${DD}`,Zk=`_ngcontent-${DD}`,Xk=!0,Jk=new pe("",{providedIn:"root",factory:()=>Xk});function Qk(e){return Zk.replace(jy,e)}function eL(e){return Kk.replace(jy,e)}function ID(e,t){return t.map(n=>n.replace(jy,e))}var ED=(()=>{class e{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;platformId;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;platformIsServer;constructor(n,r,i,s,o,a,l,c=null,h=null){this.eventManager=n,this.sharedStylesHost=r,this.appId=i,this.removeStylesOnCompDestroy=s,this.doc=o,this.platformId=a,this.ngZone=l,this.nonce=c,this.tracingService=h,this.platformIsServer=ky(a),this.defaultRenderer=new sl(n,o,l,this.platformIsServer,this.tracingService)}createRenderer(n,r){if(!n||!r)return this.defaultRenderer;this.platformIsServer&&r.encapsulation===Zr.ShadowDom&&(r=te(w({},r),{encapsulation:Zr.Emulated}));let i=this.getOrCreateRenderer(n,r);return i instanceof Gd?i.applyToHost(n):i instanceof al&&i.applyStyles(),i}getOrCreateRenderer(n,r){let i=this.rendererByCompId,s=i.get(r.id);if(!s){let o=this.doc,a=this.ngZone,l=this.eventManager,c=this.sharedStylesHost,h=this.removeStylesOnCompDestroy,d=this.platformIsServer,f=this.tracingService;switch(r.encapsulation){case Zr.Emulated:s=new Gd(l,c,r,this.appId,h,o,a,d,f);break;case Zr.ShadowDom:return new Hy(l,c,n,r,o,a,this.nonce,d,f);default:s=new al(l,c,r,h,o,a,d,f);break}i.set(r.id,s)}return s}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(n){this.rendererByCompId.delete(n)}static \u0275fac=function(n){return new(n||e)(Ze(CD),Ze(SD),Ze(nl),Ze(Jk),Ze(Qe),Ze(is),Ze(Le),Ze(ty),Ze(ga,8))};static \u0275prov=ne({token:e,factory:e.\u0275fac})}return e})(),sl=class{eventManager;doc;ngZone;platformIsServer;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(e,t,n,r,i){this.eventManager=e,this.doc=t,this.ngZone=n,this.platformIsServer=r,this.tracingService=i}destroy(){}destroyNode=null;createElement(e,t){return t?this.doc.createElementNS(Ly[t]||t,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,t){(wD(e)?e.content:e).appendChild(t)}insertBefore(e,t,n){e&&(wD(e)?e.content:e).insertBefore(t,n)}removeChild(e,t){t.remove()}selectRootElement(e,t){let n=typeof e=="string"?this.doc.querySelector(e):e;if(!n)throw new $e(-5104,!1);return t||(n.textContent=""),n}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,t,n,r){if(r){t=r+":"+t;let i=Ly[r];i?e.setAttributeNS(i,t,n):e.setAttribute(t,n)}else e.setAttribute(t,n)}removeAttribute(e,t,n){if(n){let r=Ly[n];r?e.removeAttributeNS(r,t):e.removeAttribute(`${n}:${t}`)}else e.removeAttribute(t)}addClass(e,t){e.classList.add(t)}removeClass(e,t){e.classList.remove(t)}setStyle(e,t,n,r){r&(Pi.DashCase|Pi.Important)?e.style.setProperty(t,n,r&Pi.Important?"important":""):e.style[t]=n}removeStyle(e,t,n){n&Pi.DashCase?e.style.removeProperty(t):e.style[t]=""}setProperty(e,t,n){e!=null&&(e[t]=n)}setValue(e,t){e.nodeValue=t}listen(e,t,n,r){if(typeof e=="string"&&(e=Da().getGlobalEventTarget(this.doc,e),!e))throw new Error(`Unsupported event target ${e} for event ${t}`);let i=this.decoratePreventDefault(n);return this.tracingService!==null&&this.tracingService.wrapEventListener&&(i=this.tracingService.wrapEventListener(e,t,i)),this.eventManager.addEventListener(e,t,i,r)}decoratePreventDefault(e){return t=>{if(t==="__ngUnwrap__")return e;(this.platformIsServer?this.ngZone.runGuarded(()=>e(t)):e(t))===!1&&t.preventDefault()}}};function wD(e){return e.tagName==="TEMPLATE"&&e.content!==void 0}var Hy=class extends sl{sharedStylesHost;hostEl;shadowRoot;constructor(e,t,n,r,i,s,o,a,l){super(e,i,s,a,l),this.sharedStylesHost=t,this.hostEl=n,this.shadowRoot=n.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let c=r.styles;c=ID(r.id,c);for(let d of c){let f=document.createElement("style");o&&f.setAttribute("nonce",o),f.textContent=d,this.shadowRoot.appendChild(f)}let h=r.getExternalStyles?.();if(h)for(let d of h){let f=Uy(d,i);o&&f.setAttribute("nonce",o),this.shadowRoot.appendChild(f)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}appendChild(e,t){return super.appendChild(this.nodeOrShadowRoot(e),t)}insertBefore(e,t,n){return super.insertBefore(this.nodeOrShadowRoot(e),t,n)}removeChild(e,t){return super.removeChild(null,t)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},al=class extends sl{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(e,t,n,r,i,s,o,a,l){super(e,i,s,o,a),this.sharedStylesHost=t,this.removeStylesOnCompDestroy=r;let c=n.styles;this.styles=l?ID(l,c):c,this.styleUrls=n.getExternalStyles?.(l)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},Gd=class extends al{contentAttr;hostAttr;constructor(e,t,n,r,i,s,o,a,l){let c=r+"-"+n.id;super(e,t,n,i,s,o,a,l,c),this.contentAttr=Qk(c),this.hostAttr=eL(c)}applyToHost(e){this.applyStyles(),this.setAttribute(e,this.hostAttr,"")}createElement(e,t){let n=super.createElement(e,t);return super.setAttribute(n,this.contentAttr,""),n}},tL=(()=>{class e extends Wd{constructor(n){super(n)}supports(n){return!0}addEventListener(n,r,i,s){return n.addEventListener(r,i,s),()=>this.removeEventListener(n,r,i,s)}removeEventListener(n,r,i,s){return n.removeEventListener(r,i,s)}static \u0275fac=function(n){return new(n||e)(Ze(Qe))};static \u0275prov=ne({token:e,factory:e.\u0275fac})}return e})(),bD=["alt","control","meta","shift"],nL={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},rL={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey},iL=(()=>{class e extends Wd{constructor(n){super(n)}supports(n){return e.parseEventName(n)!=null}addEventListener(n,r,i,s){let o=e.parseEventName(r),a=e.eventCallback(o.fullKey,i,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Da().onAndCancel(n,o.domEventName,a,s))}static parseEventName(n){let r=n.toLowerCase().split("."),i=r.shift();if(r.length===0||!(i==="keydown"||i==="keyup"))return null;let s=e._normalizeKey(r.pop()),o="",a=r.indexOf("code");if(a>-1&&(r.splice(a,1),o="code."),bD.forEach(c=>{let h=r.indexOf(c);h>-1&&(r.splice(h,1),o+=c+".")}),o+=s,r.length!=0||s.length===0)return null;let l={};return l.domEventName=i,l.fullKey=o,l}static matchEventFullKeyCode(n,r){let i=nL[n.key]||n.key,s="";return r.indexOf("code.")>-1&&(i=n.code,s="code."),i==null||!i?!1:(i=i.toLowerCase(),i===" "?i="space":i==="."&&(i="dot"),bD.forEach(o=>{if(o!==i){let a=rL[o];a(n)&&(s+=o+".")}}),s+=i,s===r)}static eventCallback(n,r,i){return s=>{e.matchEventFullKeyCode(s,n)&&i.runGuarded(()=>r(s))}}static _normalizeKey(n){return n==="esc"?"escape":n}static \u0275fac=function(n){return new(n||e)(Ze(Qe))};static \u0275prov=ne({token:e,factory:e.\u0275fac})}return e})();function TD(e){return oD(oL(e))}function oL(e){return{appProviders:[...uL,...e?.providers??[]],platformProviders:lL}}function sL(){By.makeCurrent()}function aL(){return new Mi}function cL(){return HC(document),document}var lL=[{provide:is,useValue:Py},{provide:ey,useValue:sL,multi:!0},{provide:Qe,useFactory:cL,deps:[]}],uL=[{provide:vd,useValue:"root"},{provide:Mi,useFactory:aL,deps:[]},{provide:Vy,useClass:tL,multi:!0,deps:[Qe]},{provide:Vy,useClass:iL,multi:!0,deps:[Qe]},ED,SD,CD,{provide:hn,useExisting:ED},{provide:jd,useClass:qk,deps:[]},[]],$y=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:function(n){let r=null;return n?r=new(n||e):r=Ze(dL),r},providedIn:"root"})}return e})(),dL=(()=>{class e extends $y{_doc;constructor(n){super(),this._doc=n}sanitize(n,r){if(r==null)return null;switch(n){case ei.NONE:return r;case ei.HTML:return po(r,"HTML")?Qr(r):oy(this._doc,String(r)).toString();case ei.STYLE:return po(r,"Style")?Qr(r):r;case ei.SCRIPT:if(po(r,"Script"))return Qr(r);throw new $e(5200,!1);case ei.URL:return po(r,"URL")?Qr(r):Rd(String(r));case ei.RESOURCE_URL:if(po(r,"ResourceURL"))return Qr(r);throw new $e(5201,!1);default:throw new $e(5202,!1)}}bypassSecurityTrustHtml(n){return ZC(n)}bypassSecurityTrustStyle(n){return XC(n)}bypassSecurityTrustScript(n){return JC(n)}bypassSecurityTrustUrl(n){return QC(n)}bypassSecurityTrustResourceUrl(n){return eS(n)}static \u0275fac=function(n){return new(n||e)(Ze(Qe))};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),xD="9.8.1",k=class ep{static SDK_VERSION=xD;static SDK_VERSION_CODE;static SDK="WEB";static LOG_PREFIX="CooeeSDK";static COOEE="cooee";static SESSION_STORAGE_SCROLL_ID="sleid";static IDLE_TIME_IN_SECONDS=30*60;static IN_APP_WRAPPER_NAME="cooee-wrapper";static IN_APP_CONTAINER_NAME="cooee-container";static IN_APP_DEFAULT_PADDING=15;static EVENT_SCREEN_VIEW="CE Screen View";static EVENT_APP_BACKGROUND="CE App Background";static EVENT_TRIGGER_DISPLAYED="CE Trigger Displayed";static EVENT_CAMPAIGN_HOLDOUT="CE Campaign Holdout";static EVENT_CAMPAIGN_REJECTED="CE Campaign Rejected";static EVENT_CAMPAIGN_FAILED="CE Campaign Failed";static EVENT_TRIGGER_CLOSED="CE Trigger Closed";static EVENT_SCROLL="CE Scroll";static EVENT_TRIGGER_CLICKED="CE Trigger Clicked";static EVENT_FORM_SUBMITTED="CE Form Submitted";static EVENT_EXPERIMENT_START="CE Experiment Start";static EVENT_VIDEO_DIALOG_CLOSED="CE Video Dialog Closed";static EVENT_VIDEO_DIALOG_OPENED="CE Video Dialog Opened";static EVENT_VIDEO_CHANGE="CE Video Changed";static EVENT_LAST_VIDEO_ENDED="CE Last Video Ended";static EVENT_VIDEO_MUTED="CE Video Muted";static EVENT_VIDEO_UNMUTED="CE Video Unmuted";static EVENT_ADD_TO_CART_CLICKED="CE Add To Cart Clicked";static EVENT_VIEW_ITEM_CLICKED="CE View Item Clicked";static EVENT_MORE_ITEM_INFO_CLICKED="CE More Item Info Clicked";static EVENT_OPEN_CART_CLICKED="CE Open Cart Clicked";static EVENT_ADD_TO_CART="Add To Cart";static EVENT_REMOVE_FROM_CART="Remove From Cart";static EVENT_VIEW_ITEM="View Item";static EVENT_VIEW_CART="View Cart";static EVENT_VIEW_COLLECTION="View Collection";static EVENT_BUY_NOW_CLICKED="Buy Now Clicked";static EVENT_CHECKOUT_STARTED="Checkout Started";static EVENT_REVIEW_CLICKED="Review Clicked";static EVENT_ITEM_THUMBNAIL_CLICKED="Item Thumbnail Clicked";static JS_LOAD_WHITELIST_EVENTS=[this.EVENT_VIEW_ITEM,this.EVENT_VIEW_CART,this.EVENT_VIEW_COLLECTION];static HASH_INITIATE_CHECKOUT="initiate-checkout";static HASH_OPEN_CART_DRAWER="open-cart-drawer";static ADD_BUNDLE_CTA_INBOUND_EVENT="letscooee:inbound:cta:add-bundle";static CTA_OPEN_CART_EVENT="letscooee:outbound:open-cart";static CTA_AFTER_REFRESH_UI="letscooee:outbound:refresh-ui";static POPUP_ACTIVITY_EVENT="letscooee:outbound:popup-activities";static THIRD_PARTY_CHECKOUT_EVENT="letscooee:outbound:third-party-initiate-checkout";static CAMPAIGN_DISPLAYED_ACTIVITY="DISPLAYED";static CAMPAIGN_CLICKED_ACTIVITY="CLICKED";static CAMPAIGN_CLOSED_ACTIVITY="CLOSED";static BLACKLISTED_PAGE_NAMES=["collection","product","cart"];static API_CALL_MAX_ATTEMPTS=3;static API_CALL_RETRY_DELAY=1e3;static PLACEHOLDER_IMAGE="https://cdn.global.letscooee.com/images/placeholders/product.png";static CART_UPDATE_BROADCAST="CART_UPDATE";static GRAPHQL_VERSION="2024-10";static GRAPHQL_API_PATH=`/api/${this.GRAPHQL_VERSION}/graphql.json`;static SHADOW_SPLITTER=":shadow";static CAMPAIGN_ATTRIBUTE="_letscooee_campaign";static CONTENT_ATTRIBUTE="_letscooee_content";static VIA="_via";static PAYMENT_MODAL_DETAILS=[{identifier:"#flo-checkout-wrapper",gateway:"Shopflow"},{identifier:"#fastrr-main-container",gateway:"Shiprocket"},{identifier:"#gokwik-modal-wrapper",gateway:"Gokwik"},{identifier:"#zecpe",gateway:"Ecom 360"}];static{let t=ep.SDK_VERSION.split(".").map(n=>n.padStart(2,"0")).join("");ep.SDK_VERSION_CODE=parseInt(t,10)}},mn={apiURL:"https://api.sdk.letscooee.com",debug:!1,mode:"production",styleURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${k.SDK_VERSION}/dist/widget.min.css`,widgetURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${k.SDK_VERSION}/dist/widget.min.js`},ir=Re(ds()),C=class{static log(...e){ir.default.info(...e)}static debug(...e){ir.default.debug(...e)}static error(...e){ir.default.error(...e)}static warn(...e){ir.default.warn(...e)}static info(...e){ir.default.info(...e)}static trace(...e){ir.default.trace(...e)}static configure(e=k.LOG_PREFIX){ir.default.useDefaults({formatter:function(n){n.unshift(`${e} (v${k.SDK_VERSION}):`)}});let t=this.getDebugParam();(t==="1"||t==="on")&&(localStorage.cooeeLogLevel="TRACE"),localStorage.cooeeLogLevel?ir.default.setLevel(ir.default[localStorage.cooeeLogLevel]):ir.default.setLevel(mn.debug?ir.default.TRACE:ir.default.OFF)}static getDebugParam(){return new URL(location.href).searchParams?.get("cooee-debug")}static logBrand(){let e=`
7
+ `)}`}function zo(e,t){return e.hasOwnProperty(Yu)?e[Yu]:null}function sA(e,t,n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){let i=e[r],s=t[r];if(n&&(i=n(i),s=n(s)),s!==i)return!1}return!0}function aA(e){return e.flat(Number.POSITIVE_INFINITY)}function Pg(e,t){e.forEach(n=>Array.isArray(n)?Pg(n,t):t(n))}function Fb(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function Zu(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function cA(e,t,n,r){let i=e.length;if(i==t)e.push(n,r);else if(i===1)e.push(r,e[0]),e[0]=n;else{for(i--,e.push(e[i-1],e[i]);i>t;){let s=i-2;e[i]=e[s],i--}e[t]=n,e[t+1]=r}}function lA(e,t,n){let r=Xc(e,t);return r>=0?e[r|1]=n:(r=~r,cA(e,r,t,n)),r}function lm(e,t){let n=Xc(e,t);if(n>=0)return e[n|1]}function Xc(e,t){return uA(e,t,1)}function uA(e,t,n){let r=0,i=e.length>>n;for(;i!==r;){let s=r+(i-r>>1),o=e[s<<n];if(t===o)return s<<n;o>t?i=s:r=s+1}return~(i<<n)}var qo={},xi=[],Vc=new pe(""),Bb=new pe("",-1),Vb=new pe(""),Xu=class{get(e,t=Bc){if(t===Bc){let n=new Error(`NullInjectorError: No provider for ${mr(e)}!`);throw n.name="NullInjectorError",n}return t}};function Yo(e){return e[zN]||null}function Ub(e){return e[qN]||null}function Hb(e){return e[Mg]||null}function dA(e){let t=Yo(e)||Ub(e)||Hb(e);return t!==null&&t.standalone}function jb(e){return{\u0275providers:e}}function fA(...e){return{\u0275providers:$b(!0,e),\u0275fromNgModule:!0}}function $b(e,...t){let n=[],r=new Set,i,s=o=>{n.push(o)};return Pg(t,o=>{let a=o;Im(a,s,[],r)&&(i||=[],i.push(a))}),i!==void 0&&Wb(i,s),n}function Wb(e,t){for(let n=0;n<e.length;n++){let{ngModule:r,providers:i}=e[n];kg(i,s=>{t(s,r)})}}function Im(e,t,n,r){if(e=kn(e),!e)return!1;let i=null,s=Ww(e),o=!s&&Yo(e);if(!s&&!o){let l=e.ngModule;if(s=Ww(l),s)i=l;else return!1}else{if(o&&!o.standalone)return!1;i=e}let a=r.has(i);if(o){if(a)return!1;if(r.add(i),o.dependencies){let l=typeof o.dependencies=="function"?o.dependencies():o.dependencies;for(let c of l)Im(c,t,n,r)}}else if(s){if(s.imports!=null&&!a){r.add(i);let c;try{Pg(s.imports,h=>{Im(h,t,n,r)&&(c||=[],c.push(h))})}finally{}c!==void 0&&Wb(c,t)}if(!a){let c=zo(i)||(()=>new i);t({provide:i,useFactory:c,deps:xi},i),t({provide:Vb,useValue:i,multi:!0},i),t({provide:Vc,useValue:()=>Ze(i),multi:!0},i)}let l=s.providers;if(l!=null&&!a){let c=e;kg(l,h=>{t(h,c)})}}else return!1;return i!==e&&e.providers!==void 0}function kg(e,t){for(let n of e)Pb(n)&&(n=n.\u0275providers),Array.isArray(n)?kg(n,t):t(n)}var pA=Tt({provide:String,useValue:Tt});function Gb(e){return e!==null&&typeof e=="object"&&pA in e}function hA(e){return!!(e&&e.useExisting)}function mA(e){return!!(e&&e.useFactory)}function ca(e){return typeof e=="function"}function gA(e){return!!e.useClass}var vd=new pe(""),ju={},yA={},um;function _d(){return um===void 0&&(um=new Xu),um}var Gn=class{},Uc=class extends Gn{parent;source;scopes;records=new Map;_ngOnDestroyHooks=new Set;_onDestroyHooks=[];get destroyed(){return this._destroyed}_destroyed=!1;injectorDefTypes;constructor(e,t,n,r){super(),this.parent=t,this.source=n,this.scopes=r,xm(e,s=>this.processProvider(s)),this.records.set(Bb,ta(void 0,this)),r.has("environment")&&this.records.set(Gn,ta(void 0,this));let i=this.records.get(vd);i!=null&&typeof i.value=="string"&&this.scopes.add(i.value),this.injectorDefTypes=new Set(this.get(Vb,xi,Ke.Self))}destroy(){kc(this),this._destroyed=!0;let e=je(null);try{for(let n of this._ngOnDestroyHooks)n.ngOnDestroy();let t=this._onDestroyHooks;this._onDestroyHooks=[];for(let n of t)n()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),je(e)}}onDestroy(e){return kc(this),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){kc(this);let t=oo(this),n=Wn(void 0),r;try{return e()}finally{oo(t),Wn(n)}}get(e,t=Bc,n=Ke.Default){if(kc(this),e.hasOwnProperty(zw))return e[zw](this);n=yd(n);let r,i=oo(this),s=Wn(void 0);try{if(!(n&Ke.SkipSelf)){let a=this.records.get(e);if(a===void 0){let l=bA(e)&&Ag(e);l&&this.injectableDefInScope(l)?a=ta(Tm(e),ju):a=null,this.records.set(e,a)}if(a!=null)return this.hydrate(e,a)}let o=n&Ke.Self?_d():this.parent;return t=n&Ke.Optional&&t===Bc?null:t,o.get(e,t)}catch(o){if(o.name==="NullInjectorError"){if((o[Ku]=o[Ku]||[]).unshift(mr(e)),i)throw o;return iA(o,e,"R3InjectorError",this.source)}else throw o}finally{Wn(s),oo(i)}}resolveInjectorInitializers(){let e=je(null),t=oo(this),n=Wn(void 0),r;try{let i=this.get(Vc,xi,Ke.Self);for(let s of i)s()}finally{oo(t),Wn(n),je(e)}}toString(){let e=[],t=this.records;for(let n of t.keys())e.push(mr(n));return`R3Injector[${e.join(", ")}]`}processProvider(e){e=kn(e);let t=ca(e)?e:kn(e&&e.provide),n=_A(e);if(!ca(e)&&e.multi===!0){let r=this.records.get(t);r||(r=ta(void 0,ju,!0),r.factory=()=>Dm(r.multi),this.records.set(t,r)),t=e,r.multi.push(e)}this.records.set(t,n)}hydrate(e,t){let n=je(null);try{return t.value===ju&&(t.value=yA,t.value=t.factory()),typeof t.value=="object"&&t.value&&wA(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{je(n)}}injectableDefInScope(e){if(!e.providedIn)return!1;let t=kn(e.providedIn);return typeof t=="string"?t==="any"||this.scopes.has(t):this.injectorDefTypes.has(t)}removeOnDestroy(e){let t=this._onDestroyHooks.indexOf(e);t!==-1&&this._onDestroyHooks.splice(t,1)}};function Tm(e){let t=Ag(e),n=t!==null?t.factory:zo(e);if(n!==null)return n;if(e instanceof pe)throw new $e(204,!1);if(e instanceof Function)return vA(e);throw new $e(204,!1)}function vA(e){if(e.length>0)throw new $e(204,!1);let t=WN(e);return t!==null?()=>t.factory(e):()=>new e}function _A(e){if(Gb(e))return ta(void 0,e.useValue);{let t=zb(e);return ta(t,ju)}}function zb(e,t,n){let r;if(ca(e)){let i=kn(e);return zo(i)||Tm(i)}else if(Gb(e))r=()=>kn(e.useValue);else if(mA(e))r=()=>e.useFactory(...Dm(e.deps||[]));else if(hA(e))r=()=>Ze(kn(e.useExisting));else{let i=kn(e&&(e.useClass||e.provide));if(EA(e))r=()=>new i(...Dm(e.deps));else return zo(i)||Tm(i)}return r}function kc(e){if(e.destroyed)throw new $e(205,!1)}function ta(e,t,n=!1){return{factory:e,value:t,multi:n?[]:void 0}}function EA(e){return!!e.deps}function wA(e){return e!==null&&typeof e=="object"&&typeof e.ngOnDestroy=="function"}function bA(e){return typeof e=="function"||typeof e=="object"&&e instanceof pe}function xm(e,t){for(let n of e)Array.isArray(n)?xm(n,t):n&&Pb(n)?xm(n.\u0275providers,t):t(n)}function qb(e,t){e instanceof Uc&&kc(e);let n,r=oo(e),i=Wn(void 0);try{return t()}finally{oo(r),Wn(i)}}function Yb(){return kb()!==void 0||tA()!=null}function Kb(e){if(!Yb())throw new $e(-203,!1)}function CA(e){return typeof e=="function"}var Fi=0,_e=1,be=2,Rn=3,Or=4,Lr=5,Hc=6,Ju=7,jt=8,jc=9,Ri=10,sn=11,$c=12,Yw=13,pa=14,Pr=15,Ko=16,na=17,Ni=18,Jc=19,Zb=20,so=21,dm=22,Qu=23,Qn=24,sa=25,Vt=26,Xb=1,Zo=7,ed=8,la=9,xn=10;function Ti(e){return Array.isArray(e)&&typeof e[Xb]=="object"}function Bi(e){return Array.isArray(e)&&e[Xb]===!0}function Lg(e){return(e.flags&4)!==0}function ha(e){return e.componentOffset>-1}function Ed(e){return(e.flags&1)===1}function Kr(e){return!!e.template}function td(e){return(e[be]&512)!==0}function Qc(e){return(e[be]&256)===256}var Rm=class{previousValue;currentValue;firstChange;constructor(e,t,n){this.previousValue=e,this.currentValue=t,this.firstChange=n}isFirstChange(){return this.firstChange}};function Jb(e,t,n,r){t!==null?t.applyValueToInputSignal(t,r):e[n]=r}var ns=(()=>{let e=()=>Qb;return e.ngInherit=!0,e})();function Qb(e){return e.type.prototype.ngOnChanges&&(e.setInput=DA),SA}function SA(){let e=tC(this),t=e?.current;if(t){let n=e.previous;if(n===qo)e.previous=t;else for(let r in t)n[r]=t[r];e.current=null,this.ngOnChanges(t)}}function DA(e,t,n,r,i){let s=this.declaredInputs[r],o=tC(e)||IA(e,{previous:qo,current:null}),a=o.current||(o.current={}),l=o.previous,c=l[s];a[s]=new Rm(c&&c.currentValue,n,l===qo),Jb(e,t,i,n)}var eC="__ngSimpleChanges__";function tC(e){return e[eC]||null}function IA(e,t){return e[eC]=t}var Kw=null,pt=function(e,t=null,n){Kw?.(e,t,n)},nC="svg",TA="math";function er(e){for(;Array.isArray(e);)e=e[Fi];return e}function rC(e,t){return er(t[e])}function Xr(e,t){return er(t[e.index])}function Fg(e,t){return e.data[t]}function wd(e,t){return e[t]}function gr(e,t){let n=t[e];return Ti(n)?n:n[Fi]}function xA(e){return(e[be]&4)===4}function Bg(e){return(e[be]&128)===128}function RA(e){return Bi(e[Rn])}function ao(e,t){return t==null?null:e[t]}function iC(e){e[na]=0}function Vg(e){e[be]&1024||(e[be]|=1024,Bg(e)&&el(e))}function NA(e,t){for(;e>0;)t=t[pa],e--;return t}function bd(e){return!!(e[be]&9216||e[Qn]?.dirty)}function Nm(e){e[Ri].changeDetectionScheduler?.notify(8),e[be]&64&&(e[be]|=1024),bd(e)&&el(e)}function el(e){e[Ri].changeDetectionScheduler?.notify(0);let t=Xo(e);for(;t!==null&&!(t[be]&8192||(t[be]|=8192,!Bg(t)));)t=Xo(t)}function oC(e,t){if(Qc(e))throw new $e(911,!1);e[so]===null&&(e[so]=[]),e[so].push(t)}function AA(e,t){if(e[so]===null)return;let n=e[so].indexOf(t);n!==-1&&e[so].splice(n,1)}function Xo(e){let t=e[Rn];return Bi(t)?t[Rn]:t}function sC(e){return e[Ju]??=[]}function aC(e){return e.cleanup??=[]}function MA(e,t,n,r){let i=sC(t);i.push(n),e.firstCreatePass&&aC(e).push(r,i.length-1)}var xe={lFrame:mC(null),bindingsEnabled:!0,skipHydrationRootTNode:null},Am=!1;function OA(){return xe.lFrame.elementDepthCount}function PA(){xe.lFrame.elementDepthCount++}function kA(){xe.lFrame.elementDepthCount--}function Ug(){return xe.bindingsEnabled}function LA(){return xe.skipHydrationRootTNode!==null}function FA(e){return xe.skipHydrationRootTNode===e}function BA(){xe.skipHydrationRootTNode=null}function Fe(){return xe.lFrame.lView}function Zt(){return xe.lFrame.tView}function Xt(e){return xe.lFrame.contextLView=e,e[jt]}function Jt(e){return xe.lFrame.contextLView=null,e}function tr(){let e=cC();for(;e!==null&&e.type===64;)e=e.parent;return e}function cC(){return xe.lFrame.currentTNode}function VA(){let e=xe.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}function lo(e,t){let n=xe.lFrame;n.currentTNode=e,n.isParent=t}function Hg(){return xe.lFrame.isParent}function lC(){xe.lFrame.isParent=!1}function uC(){return xe.lFrame.contextLView}function dC(){return Am}function Zw(e){let t=Am;return Am=e,t}function jg(){let e=xe.lFrame,t=e.bindingRootIndex;return t===-1&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function UA(e){return xe.lFrame.bindingIndex=e}function tl(){return xe.lFrame.bindingIndex++}function HA(e){let t=xe.lFrame,n=t.bindingIndex;return t.bindingIndex=t.bindingIndex+e,n}function jA(){return xe.lFrame.inI18n}function $A(e,t){let n=xe.lFrame;n.bindingIndex=n.bindingRootIndex=e,Mm(t)}function WA(){return xe.lFrame.currentDirectiveIndex}function Mm(e){xe.lFrame.currentDirectiveIndex=e}function GA(e){let t=xe.lFrame.currentDirectiveIndex;return t===-1?null:e[t]}function fC(){return xe.lFrame.currentQueryIndex}function $g(e){xe.lFrame.currentQueryIndex=e}function zA(e){let t=e[_e];return t.type===2?t.declTNode:t.type===1?e[Lr]:null}function pC(e,t,n){if(n&Ke.SkipSelf){let i=t,s=e;for(;(i=i.parent,i===null&&!(n&Ke.Host))&&(i=zA(s),!(i===null||(s=s[pa],i.type&10))););if(i===null)return!1;t=i,e=s}let r=xe.lFrame=hC();return r.currentTNode=t,r.lView=e,!0}function Wg(e){let t=hC(),n=e[_e];xe.lFrame=t,t.currentTNode=n.firstChild,t.lView=e,t.tView=n,t.contextLView=e,t.bindingIndex=n.bindingStartIndex,t.inI18n=!1}function hC(){let e=xe.lFrame,t=e===null?null:e.child;return t===null?mC(e):t}function mC(e){let t={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:e,child:null,inI18n:!1};return e!==null&&(e.child=t),t}function gC(){let e=xe.lFrame;return xe.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}var yC=gC;function Gg(){let e=gC();e.isParent=!0,e.tView=null,e.selectedIndex=-1,e.contextLView=null,e.elementDepthCount=0,e.currentDirectiveIndex=-1,e.currentNamespace=null,e.bindingRootIndex=-1,e.bindingIndex=-1,e.currentQueryIndex=0}function qA(e){return(xe.lFrame.contextLView=NA(e,xe.lFrame.contextLView))[jt]}function uo(){return xe.lFrame.selectedIndex}function Jo(e){xe.lFrame.selectedIndex=e}function zg(){let e=xe.lFrame;return Fg(e.tView,e.selectedIndex)}function vr(){xe.lFrame.currentNamespace=nC}function rs(){YA()}function YA(){xe.lFrame.currentNamespace=null}function KA(){return xe.lFrame.currentNamespace}var vC=!0;function Cd(){return vC}function Sd(e){vC=e}function ZA(e,t,n){let{ngOnChanges:r,ngOnInit:i,ngDoCheck:s}=t.type.prototype;if(r){let o=Qb(t);(n.preOrderHooks??=[]).push(e,o),(n.preOrderCheckHooks??=[]).push(e,o)}i&&(n.preOrderHooks??=[]).push(0-e,i),s&&((n.preOrderHooks??=[]).push(e,s),(n.preOrderCheckHooks??=[]).push(e,s))}function qg(e,t){for(let n=t.directiveStart,r=t.directiveEnd;n<r;n++){let i=e.data[n].type.prototype,{ngAfterContentInit:s,ngAfterContentChecked:o,ngAfterViewInit:a,ngAfterViewChecked:l,ngOnDestroy:c}=i;s&&(e.contentHooks??=[]).push(-n,s),o&&((e.contentHooks??=[]).push(n,o),(e.contentCheckHooks??=[]).push(n,o)),a&&(e.viewHooks??=[]).push(-n,a),l&&((e.viewHooks??=[]).push(n,l),(e.viewCheckHooks??=[]).push(n,l)),c!=null&&(e.destroyHooks??=[]).push(n,c)}}function $u(e,t,n){_C(e,t,3,n)}function Wu(e,t,n,r){(e[be]&3)===n&&_C(e,t,n,r)}function fm(e,t){let n=e[be];(n&3)===t&&(n&=16383,n+=1,e[be]=n)}function _C(e,t,n,r){let i=r!==void 0?e[na]&65535:0,s=r??-1,o=t.length-1,a=0;for(let l=i;l<o;l++)if(typeof t[l+1]=="number"){if(a=t[l],r!=null&&a>=r)break}else t[l]<0&&(e[na]+=65536),(a<s||s==-1)&&(XA(e,n,t,l),e[na]=(e[na]&4294901760)+l+2),l++}function Xw(e,t){pt(4,e,t);let n=je(null);try{t.call(e)}finally{je(n),pt(5,e,t)}}function XA(e,t,n,r){let i=n[r]<0,s=n[r+1],o=i?-n[r]:n[r],a=e[o];i?e[be]>>14<e[na]>>16&&(e[be]&3)===t&&(e[be]+=16384,Xw(a,s)):Xw(a,s)}var aa=-1,Qo=class{factory;injectImpl;resolving=!1;canSeeViewProviders;multi;componentProviders;index;providerFactory;constructor(e,t,n){this.factory=e,this.canSeeViewProviders=t,this.injectImpl=n}};function JA(e){return e instanceof Qo}function QA(e){return(e.flags&8)!==0}function eM(e){return(e.flags&16)!==0}function tM(e,t,n){let r=0;for(;r<n.length;){let i=n[r];if(typeof i=="number"){if(i!==0)break;r++;let s=n[r++],o=n[r++],a=n[r++];e.setAttribute(t,o,a,s)}else{let s=i,o=n[++r];rM(s)?e.setProperty(t,s,o):e.setAttribute(t,s,o),r++}}return r}function nM(e){return e===3||e===4||e===6}function rM(e){return e.charCodeAt(0)===64}function ua(e,t){if(!(t===null||t.length===0))if(e===null||e.length===0)e=t.slice();else{let n=-1;for(let r=0;r<t.length;r++){let i=t[r];typeof i=="number"?n=i:n===0||(n===-1||n===2?Jw(e,n,i,null,t[++r]):Jw(e,n,i,null,null))}}return e}function Jw(e,t,n,r,i){let s=0,o=e.length;if(t===-1)o=-1;else for(;s<e.length;){let a=e[s++];if(typeof a=="number"){if(a===t){o=-1;break}else if(a>t){o=s-1;break}}}for(;s<e.length;){let a=e[s];if(typeof a=="number")break;if(a===n){if(r===null){i!==null&&(e[s+1]=i);return}else if(r===e[s+1]){e[s+2]=i;return}}s++,r!==null&&s++,i!==null&&s++}o!==-1&&(e.splice(o,0,t),s=o+1),e.splice(s++,0,n),r!==null&&e.splice(s++,0,r),i!==null&&e.splice(s++,0,i)}var pm={},Om=class{injector;parentInjector;constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,n){n=yd(n);let r=this.injector.get(e,pm,n);return r!==pm||t===pm?r:this.parentInjector.get(e,t,n)}};function EC(e){return e!==aa}function nd(e){return e&32767}function iM(e){return e>>16}function rd(e,t){let n=iM(e),r=t;for(;n>0;)r=r[pa],n--;return r}var Pm=!0;function id(e){let t=Pm;return Pm=e,t}var oM=256,wC=oM-1,bC=5,sM=0,qr={};function aM(e,t,n){let r;typeof n=="string"?r=n.charCodeAt(0)||0:n.hasOwnProperty(Fc)&&(r=n[Fc]),r==null&&(r=n[Fc]=sM++);let i=r&wC,s=1<<i;t.data[e+(i>>bC)]|=s}function od(e,t){let n=CC(e,t);if(n!==-1)return n;let r=t[_e];r.firstCreatePass&&(e.injectorIndex=t.length,hm(r.data,e),hm(t,null),hm(r.blueprint,null));let i=Yg(e,t),s=e.injectorIndex;if(EC(i)){let o=nd(i),a=rd(i,t),l=a[_e].data;for(let c=0;c<8;c++)t[s+c]=a[o+c]|l[o+c]}return t[s+8]=i,s}function hm(e,t){e.push(0,0,0,0,0,0,0,0,t)}function CC(e,t){return e.injectorIndex===-1||e.parent&&e.parent.injectorIndex===e.injectorIndex||t[e.injectorIndex+8]===null?-1:e.injectorIndex}function Yg(e,t){if(e.parent&&e.parent.injectorIndex!==-1)return e.parent.injectorIndex;let n=0,r=null,i=t;for(;i!==null;){if(r=xC(i),r===null)return aa;if(n++,i=i[pa],r.injectorIndex!==-1)return r.injectorIndex|n<<16}return aa}function km(e,t,n){aM(e,t,n)}function SC(e,t,n){if(n&Ke.Optional||e!==void 0)return e;Og(t,"NodeInjector")}function DC(e,t,n,r){if(n&Ke.Optional&&r===void 0&&(r=null),(n&(Ke.Self|Ke.Host))===0){let i=e[jc],s=Wn(void 0);try{return i?i.get(t,r,n&Ke.Optional):Lb(t,r,n&Ke.Optional)}finally{Wn(s)}}return SC(r,t,n)}function IC(e,t,n,r=Ke.Default,i){if(e!==null){if(t[be]&2048&&!(r&Ke.Self)){let o=dM(e,t,n,r,qr);if(o!==qr)return o}let s=TC(e,t,n,r,qr);if(s!==qr)return s}return DC(t,n,r,i)}function TC(e,t,n,r,i){let s=lM(n);if(typeof s=="function"){if(!pC(t,e,r))return r&Ke.Host?SC(i,n,r):DC(t,n,r,i);try{let o;if(o=s(r),o==null&&!(r&Ke.Optional))Og(n);else return o}finally{yC()}}else if(typeof s=="number"){let o=null,a=CC(e,t),l=aa,c=r&Ke.Host?t[Pr][Lr]:null;for((a===-1||r&Ke.SkipSelf)&&(l=a===-1?Yg(e,t):t[a+8],l===aa||!eb(r,!1)?a=-1:(o=t[_e],a=nd(l),t=rd(l,t)));a!==-1;){let h=t[_e];if(Qw(s,a,h.data)){let d=cM(a,t,n,o,r,c);if(d!==qr)return d}l=t[a+8],l!==aa&&eb(r,t[_e].data[a+8]===c)&&Qw(s,a,t)?(o=h,a=nd(l),t=rd(l,t)):a=-1}}return i}function cM(e,t,n,r,i,s){let o=t[_e],a=o.data[e+8],l=r==null?ha(a)&&Pm:r!=o&&(a.type&3)!==0,c=i&Ke.Host&&s===a,h=Gu(a,o,n,l,c);return h!==null?Wc(t,o,h,a):qr}function Gu(e,t,n,r,i){let s=e.providerIndexes,o=t.data,a=s&1048575,l=e.directiveStart,c=e.directiveEnd,h=s>>20,d=r?a:a+h,f=i?a+h:c;for(let g=d;g<f;g++){let m=o[g];if(g<l&&n===m||g>=l&&m.type===n)return g}if(i){let g=o[l];if(g&&Kr(g)&&g.type===n)return l}return null}function Wc(e,t,n,r){let i=e[n],s=t.data;if(JA(i)){let o=i;o.resolving&&KN(YN(s[n]));let a=id(o.canSeeViewProviders);o.resolving=!0;let l,c=o.injectImpl?Wn(o.injectImpl):null,h=pC(e,r,Ke.Default);try{i=e[n]=o.factory(void 0,s,e,r),t.firstCreatePass&&n>=r.directiveStart&&ZA(n,s[n],t)}finally{c!==null&&Wn(c),id(a),o.resolving=!1,yC()}}return i}function lM(e){if(typeof e=="string")return e.charCodeAt(0)||0;let t=e.hasOwnProperty(Fc)?e[Fc]:void 0;return typeof t=="number"?t>=0?t&wC:uM:t}function Qw(e,t,n){let r=1<<e;return!!(n[t+(e>>bC)]&r)}function eb(e,t){return!(e&Ke.Self)&&!(e&Ke.Host&&t)}var Wo=class{_tNode;_lView;constructor(e,t){this._tNode=e,this._lView=t}get(e,t,n){return IC(this._tNode,this._lView,e,yd(n),t)}};function uM(){return new Wo(tr(),Fe())}function Dd(e){return Rg(()=>{let t=e.prototype.constructor,n=t[Yu]||Lm(t),r=Object.prototype,i=Object.getPrototypeOf(e.prototype).constructor;for(;i&&i!==r;){let s=i[Yu]||Lm(i);if(s&&s!==n)return s;i=Object.getPrototypeOf(i)}return s=>new s})}function Lm(e){return Ab(e)?()=>{let t=Lm(kn(e));return t&&t()}:zo(e)}function dM(e,t,n,r,i){let s=e,o=t;for(;s!==null&&o!==null&&o[be]&2048&&!td(o);){let a=TC(s,o,n,r|Ke.Self,qr);if(a!==qr)return a;let l=s.parent;if(!l){let c=o[Zb];if(c){let h=c.get(n,qr,r);if(h!==qr)return h}l=xC(o),o=o[pa]}s=l}return i}function xC(e){let t=e[_e],n=t.type;return n===2?t.declTNode:n===1?e[Lr]:null}function tb(e,t=null,n=null,r){let i=fM(e,t,n,r);return i.resolveInjectorInitializers(),i}function fM(e,t=null,n=null,r,i=new Set){let s=[n||xi,fA(e)];return r=r||(typeof e=="object"?void 0:mr(e)),new Uc(s,t||_d(),r||null,i)}var ht=class GE{static THROW_IF_NOT_FOUND=Bc;static NULL=new Xu;static create(t,n){if(Array.isArray(t))return tb({name:""},n,t,"");{let r=t.name??"";return tb({name:r},t.parent,t.providers,r)}}static \u0275prov=ne({token:GE,providedIn:"any",factory:()=>Ze(Bb)});static __NG_ELEMENT_ID__=-1},pM=new pe("");pM.__NG_ELEMENT_ID__=e=>{let t=tr();if(t===null)throw new $e(204,!1);if(t.type&2)return t.value;if(e&Ke.Optional)return null;throw new $e(204,!1)};var RC=!1,Kg=(()=>{class e{static __NG_ELEMENT_ID__=hM;static __NG_ENV_ID__=n=>n}return e})(),Fm=class extends Kg{_lView;constructor(e){super(),this._lView=e}onDestroy(e){return oC(this._lView,e),()=>AA(this._lView,e)}};function hM(){return new Fm(Fe())}var Ai=class{},Id=new pe("",{providedIn:"root",factory:()=>!1}),NC=new pe(""),Zg=new pe(""),Td=(()=>{class e{taskId=0;pendingTasks=new Set;get _hasPendingTasks(){return this.hasPendingTasks.value}hasPendingTasks=new Nr(!1);add(){this._hasPendingTasks||this.hasPendingTasks.next(!0);let n=this.taskId++;return this.pendingTasks.add(n),n}has(n){return this.pendingTasks.has(n)}remove(n){this.pendingTasks.delete(n),this.pendingTasks.size===0&&this._hasPendingTasks&&this.hasPendingTasks.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this._hasPendingTasks&&this.hasPendingTasks.next(!1)}static \u0275prov=ne({token:e,providedIn:"root",factory:()=>new e})}return e})(),Bm=class extends J{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(e=!1){super(),this.__isAsync=e,Yb()&&(this.destroyRef=O(Kg,{optional:!0})??void 0,this.pendingTasks=O(Td,{optional:!0})??void 0)}emit(e){let t=je(null);try{super.next(e)}finally{je(t)}}subscribe(e,t,n){let r=e,i=t||(()=>null),s=n;if(e&&typeof e=="object"){let a=e;r=a.next?.bind(a),i=a.error?.bind(a),s=a.complete?.bind(a)}this.__isAsync&&(i=this.wrapInTimeout(i),r&&(r=this.wrapInTimeout(r)),s&&(s=this.wrapInTimeout(s)));let o=super.subscribe({next:r,error:i,complete:s});return e instanceof ot&&e.add(o),o}wrapInTimeout(e){return t=>{let n=this.pendingTasks?.add();setTimeout(()=>{e(t),n!==void 0&&this.pendingTasks?.remove(n)})}}},Je=Bm;function sd(...e){}function AC(e){let t,n;function r(){e=sd;try{n!==void 0&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(n),t!==void 0&&clearTimeout(t)}catch{}}return t=setTimeout(()=>{e(),r()}),typeof requestAnimationFrame=="function"&&(n=requestAnimationFrame(()=>{e(),r()})),()=>r()}function nb(e){return queueMicrotask(()=>e()),()=>{e=sd}}var Xg="isAngularZone",ad=Xg+"_ID",mM=0,Le=class Yd{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new Je(!1);onMicrotaskEmpty=new Je(!1);onStable=new Je(!1);onError=new Je(!1);constructor(t){let{enableLongStackTrace:n=!1,shouldCoalesceEventChangeDetection:r=!1,shouldCoalesceRunChangeDetection:i=!1,scheduleInRootZone:s=RC}=t;if(typeof Zone>"u")throw new $e(908,!1);Zone.assertZonePatched();let o=this;o._nesting=0,o._outer=o._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(o._inner=o._inner.fork(new Zone.TaskTrackingZoneSpec)),n&&Zone.longStackTraceZoneSpec&&(o._inner=o._inner.fork(Zone.longStackTraceZoneSpec)),o.shouldCoalesceEventChangeDetection=!i&&r,o.shouldCoalesceRunChangeDetection=i,o.callbackScheduled=!1,o.scheduleInRootZone=s,vM(o)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get(Xg)===!0}static assertInAngularZone(){if(!Yd.isInAngularZone())throw new $e(909,!1)}static assertNotInAngularZone(){if(Yd.isInAngularZone())throw new $e(909,!1)}run(t,n,r){return this._inner.run(t,n,r)}runTask(t,n,r,i){let s=this._inner,o=s.scheduleEventTask("NgZoneEvent: "+i,t,gM,sd,sd);try{return s.runTask(o,n,r)}finally{s.cancelTask(o)}}runGuarded(t,n,r){return this._inner.runGuarded(t,n,r)}runOutsideAngular(t){return this._outer.run(t)}},gM={};function Jg(e){if(e._nesting==0&&!e.hasPendingMicrotasks&&!e.isStable)try{e._nesting++,e.onMicrotaskEmpty.emit(null)}finally{if(e._nesting--,!e.hasPendingMicrotasks)try{e.runOutsideAngular(()=>e.onStable.emit(null))}finally{e.isStable=!0}}}function yM(e){if(e.isCheckStableRunning||e.callbackScheduled)return;e.callbackScheduled=!0;function t(){AC(()=>{e.callbackScheduled=!1,Vm(e),e.isCheckStableRunning=!0,Jg(e),e.isCheckStableRunning=!1})}e.scheduleInRootZone?Zone.root.run(()=>{t()}):e._outer.run(()=>{t()}),Vm(e)}function vM(e){let t=()=>{yM(e)},n=mM++;e._inner=e._inner.fork({name:"angular",properties:{[Xg]:!0,[ad]:n,[ad+n]:!0},onInvokeTask:(r,i,s,o,a,l)=>{if(_M(l))return r.invokeTask(s,o,a,l);try{return rb(e),r.invokeTask(s,o,a,l)}finally{(e.shouldCoalesceEventChangeDetection&&o.type==="eventTask"||e.shouldCoalesceRunChangeDetection)&&t(),ib(e)}},onInvoke:(r,i,s,o,a,l,c)=>{try{return rb(e),r.invoke(s,o,a,l,c)}finally{e.shouldCoalesceRunChangeDetection&&!e.callbackScheduled&&!EM(l)&&t(),ib(e)}},onHasTask:(r,i,s,o)=>{r.hasTask(s,o),i===s&&(o.change=="microTask"?(e._hasPendingMicrotasks=o.microTask,Vm(e),Jg(e)):o.change=="macroTask"&&(e.hasPendingMacrotasks=o.macroTask))},onHandleError:(r,i,s,o)=>(r.handleError(s,o),e.runOutsideAngular(()=>e.onError.emit(o)),!1)})}function Vm(e){e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&e.callbackScheduled===!0?e.hasPendingMicrotasks=!0:e.hasPendingMicrotasks=!1}function rb(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function ib(e){e._nesting--,Jg(e)}var cd=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new Je;onMicrotaskEmpty=new Je;onStable=new Je;onError=new Je;run(e,t,n){return e.apply(t,n)}runGuarded(e,t,n){return e.apply(t,n)}runOutsideAngular(e){return e()}runTask(e,t,n,r){return e.apply(t,n)}};function _M(e){return MC(e,"__ignore_ng_zone__")}function EM(e){return MC(e,"__scheduler_tick__")}function MC(e,t){return!Array.isArray(e)||e.length!==1?!1:e[0]?.data?.[t]===!0}var Mi=class{_console=console;handleError(e){this._console.error("ERROR",e)}},wM=new pe("",{providedIn:"root",factory:()=>{let e=O(Le),t=O(Mi);return n=>e.runOutsideAngular(()=>t.handleError(n))}});function bM(){return ma(tr(),Fe())}function ma(e,t){return new Ct(Xr(e,t))}var Ct=(()=>{class e{nativeElement;constructor(n){this.nativeElement=n}static __NG_ELEMENT_ID__=bM}return e})();function CM(e){return e instanceof Ct?e.nativeElement:e}function Vi(e,t){let n=dw(e),r=n[bi];return t?.equal&&(r.equal=t.equal),n.set=i=>Zh(r,i),n.update=i=>fw(r,i),n.asReadonly=SM.bind(n),n}function SM(){let e=this[bi];if(e.readonlyFn===void 0){let t=()=>this();t[bi]=e,e.readonlyFn=t}return e.readonlyFn}function DM(){return this._results[Symbol.iterator]()}var Um=class{_emitDistinctChangesOnly;dirty=!0;_onDirty=void 0;_results=[];_changesDetected=!1;_changes=void 0;length=0;first=void 0;last=void 0;get changes(){return this._changes??=new J}constructor(e=!1){this._emitDistinctChangesOnly=e}get(e){return this._results[e]}map(e){return this._results.map(e)}filter(e){return this._results.filter(e)}find(e){return this._results.find(e)}reduce(e,t){return this._results.reduce(e,t)}forEach(e){this._results.forEach(e)}some(e){return this._results.some(e)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(e,t){this.dirty=!1;let n=aA(e);(this._changesDetected=!sA(this._results,n,t))&&(this._results=n,this.length=n.length,this.last=n[this.length-1],this.first=n[0])}notifyOnChanges(){this._changes!==void 0&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.next(this)}onDirty(e){this._onDirty=e}setDirty(){this.dirty=!0,this._onDirty?.()}destroy(){this._changes!==void 0&&(this._changes.complete(),this._changes.unsubscribe())}[Symbol.iterator]=DM};function OC(e){return(e.flags&128)===128}var PC=function(e){return e[e.OnPush=0]="OnPush",e[e.Default=1]="Default",e}(PC||{}),Qg=new Map,IM=0;function TM(){return IM++}function xM(e){Qg.set(e[Jc],e)}function kC(e){return Qg.get(e)||null}function Hm(e){Qg.delete(e[Jc])}var jm=class{lViewId;nodeIndex;native;component;directives;localRefs;get lView(){return kC(this.lViewId)}constructor(e,t,n){this.lViewId=e,this.nodeIndex=t,this.native=n}};function LC(e){let t=mm(e);if(t){if(Ti(t)){let n=t,r,i,s;if(FC(e)){if(r=AM(n,e),r==-1)throw new Error("The provided component was not found in the application");i=e}else if(RM(e)){if(r=MM(n,e),r==-1)throw new Error("The provided directive was not found in the application");s=OM(r,n)}else if(r=sb(n,e),r==-1)return null;let o=er(n[r]),a=mm(o),l=a&&!Array.isArray(a)?a:ob(n,r,o);if(i&&l.component===void 0&&(l.component=i,Yr(l.component,l)),s&&l.directives===void 0){l.directives=s;for(let c=0;c<s.length;c++)Yr(s[c],l)}Yr(l.native,l),t=l}}else{let n=e,r=n;for(;r=r.parentNode;){let i=mm(r);if(i){let s=Array.isArray(i)?i:i.lView;if(!s)return null;let o=sb(s,n);if(o>=0){let a=er(s[o]),l=ob(s,o,a);Yr(a,l),t=l;break}}}}return t||null}function ob(e,t,n){return new jm(e[Jc],t,n)}var $m="__ngContext__";function Yr(e,t){Ti(t)?(e[$m]=t[Jc],xM(t)):e[$m]=t}function mm(e){let t=e[$m];return typeof t=="number"?kC(t):t||null}function FC(e){return e&&e.constructor&&e.constructor.\u0275cmp}function RM(e){return e&&e.constructor&&e.constructor.\u0275dir}function sb(e,t){let n=e[_e];for(let r=Vt;r<n.bindingStartIndex;r++)if(er(e[r])===t)return r;return-1}function NM(e){if(e.child)return e.child;if(e.next)return e.next;for(;e.parent&&!e.parent.next;)e=e.parent;return e.parent&&e.parent.next}function AM(e,t){let n=e[_e].components;if(n)for(let r=0;r<n.length;r++){let i=n[r];if(gr(i,e)[jt]===t)return i}else if(gr(Vt,e)[jt]===t)return Vt;return-1}function MM(e,t){let n=e[_e].firstChild;for(;n;){let r=n.directiveStart,i=n.directiveEnd;for(let s=r;s<i;s++)if(e[s]===t)return n.index;n=NM(n)}return-1}function OM(e,t){let n=t[_e].data[e];if(n.directiveStart===0)return xi;let r=[];for(let i=n.directiveStart;i<n.directiveEnd;i++){let s=t[i];FC(s)||r.push(s)}return r}function BC(e){return UC(e[$c])}function VC(e){return UC(e[Or])}function UC(e){for(;e!==null&&!Bi(e);)e=e[Or];return e}var Wm;function HC(e){Wm=e}function jC(){if(Wm!==void 0)return Wm;if(typeof document<"u")return document;throw new $e(210,!1)}var nl=new pe("",{providedIn:"root",factory:()=>PM}),PM="ng",ey=new pe(""),is=new pe("",{providedIn:"platform",factory:()=>"unknown"}),$C=new pe(""),ty=new pe("",{providedIn:"root",factory:()=>jC().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null}),kM="h",LM="b",WC=!1,FM=new pe("",{providedIn:"root",factory:()=>WC}),ny=function(e){return e[e.CHANGE_DETECTION=0]="CHANGE_DETECTION",e[e.AFTER_NEXT_RENDER=1]="AFTER_NEXT_RENDER",e}(ny||{}),ga=new pe(""),ab=new Set;function fo(e){ab.has(e)||(ab.add(e),performance?.mark?.("mark_feature_usage",{detail:{feature:e}}))}var GC=(()=>{class e{view;node;constructor(n,r){this.view=n,this.node=r}static __NG_ELEMENT_ID__=BM}return e})();function BM(){return new GC(Fe(),tr())}var ra=function(e){return e[e.EarlyRead=0]="EarlyRead",e[e.Write=1]="Write",e[e.MixedReadWrite=2]="MixedReadWrite",e[e.Read=3]="Read",e}(ra||{}),zC=(()=>{class e{impl=null;execute(){this.impl?.execute()}static \u0275prov=ne({token:e,providedIn:"root",factory:()=>new e})}return e})(),VM=[ra.EarlyRead,ra.Write,ra.MixedReadWrite,ra.Read],UM=(()=>{class e{ngZone=O(Le);scheduler=O(Ai);errorHandler=O(Mi,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){O(ga,{optional:!0})}execute(){let n=this.sequences.size>0;n&&pt(16),this.executing=!0;for(let r of VM)for(let i of this.sequences)if(!(i.erroredOrDestroyed||!i.hooks[r]))try{i.pipelinedValue=this.ngZone.runOutsideAngular(()=>this.maybeTrace(()=>{let s=i.hooks[r];return s(i.pipelinedValue)},i.snapshot))}catch(s){i.erroredOrDestroyed=!0,this.errorHandler?.handleError(s)}this.executing=!1;for(let r of this.sequences)r.afterRun(),r.once&&(this.sequences.delete(r),r.destroy());for(let r of this.deferredRegistrations)this.sequences.add(r);this.deferredRegistrations.size>0&&this.scheduler.notify(7),this.deferredRegistrations.clear(),n&&pt(17)}register(n){let{view:r}=n;r!==void 0?((r[sa]??=[]).push(n),el(r),r[be]|=8192):this.executing?this.deferredRegistrations.add(n):this.addSequence(n)}addSequence(n){this.sequences.add(n),this.scheduler.notify(7)}unregister(n){this.executing&&this.sequences.has(n)?(n.erroredOrDestroyed=!0,n.pipelinedValue=void 0,n.once=!0):(this.sequences.delete(n),this.deferredRegistrations.delete(n))}maybeTrace(n,r){return r?r.run(ny.AFTER_NEXT_RENDER,n):n()}static \u0275prov=ne({token:e,providedIn:"root",factory:()=>new e})}return e})(),Gm=class{impl;hooks;view;once;snapshot;erroredOrDestroyed=!1;pipelinedValue=void 0;unregisterOnDestroy;constructor(e,t,n,r,i,s=null){this.impl=e,this.hooks=t,this.view=n,this.once=r,this.snapshot=s,this.unregisterOnDestroy=i?.onDestroy(()=>this.destroy())}afterRun(){this.erroredOrDestroyed=!1,this.pipelinedValue=void 0,this.snapshot?.dispose(),this.snapshot=null}destroy(){this.impl.unregister(this),this.unregisterOnDestroy?.();let e=this.view?.[sa];e&&(this.view[sa]=e.filter(t=>t!==this))}};function ry(e,t){!t?.injector&&Kb(ry);let n=t?.injector??O(ht);return fo("NgAfterRender"),qC(e,n,t,!1)}function Jr(e,t){!t?.injector&&Kb(Jr);let n=t?.injector??O(ht);return fo("NgAfterNextRender"),qC(e,n,t,!0)}function HM(e,t){if(e instanceof Function){let n=[void 0,void 0,void 0,void 0];return n[t]=e,n}else return[e.earlyRead,e.write,e.mixedReadWrite,e.read]}function qC(e,t,n,r){let i=t.get(zC);i.impl??=t.get(UM);let s=t.get(ga,null,{optional:!0}),o=n?.phase??ra.MixedReadWrite,a=n?.manualCleanup!==!0?t.get(Kg):null,l=t.get(GC,null,{optional:!0}),c=new Gm(i.impl,HM(e,o),l?.view,r,a,s?.snapshot(null));return i.impl.register(c),c}var jM=()=>null;function YC(e,t,n=!1){return jM(e,t,n)}function KC(e,t){let n=e.contentQueries;if(n!==null){let r=je(null);try{for(let i=0;i<n.length;i+=2){let s=n[i],o=n[i+1];if(o!==-1){let a=e.data[o];$g(s),a.contentQueries(2,t[o],o)}}}finally{je(r)}}}function zm(e,t,n){$g(0);let r=je(null);try{t(e,n)}finally{je(r)}}function iy(e,t,n){if(Lg(t)){let r=je(null);try{let i=t.directiveStart,s=t.directiveEnd;for(let o=i;o<s;o++){let a=e.data[o];if(a.contentQueries){let l=n[o];a.contentQueries(1,l,o)}}}finally{je(r)}}}var Zr=function(e){return e[e.Emulated=0]="Emulated",e[e.None=2]="None",e[e.ShadowDom=3]="ShadowDom",e}(Zr||{}),Bu;function $M(){if(Bu===void 0&&(Bu=null,Go.trustedTypes))try{Bu=Go.trustedTypes.createPolicy("angular",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch{}return Bu}function xd(e){return $M()?.createHTML(e)||e}var Vu;function WM(){if(Vu===void 0&&(Vu=null,Go.trustedTypes))try{Vu=Go.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch{}return Vu}function cb(e){return WM()?.createHTML(e)||e}var Oi=class{changingThisBreaksApplicationSecurity;constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${Nb})`}},qm=class extends Oi{getTypeName(){return"HTML"}},Ym=class extends Oi{getTypeName(){return"Style"}},Km=class extends Oi{getTypeName(){return"Script"}},Zm=class extends Oi{getTypeName(){return"URL"}},Xm=class extends Oi{getTypeName(){return"ResourceURL"}};function Qr(e){return e instanceof Oi?e.changingThisBreaksApplicationSecurity:e}function po(e,t){let n=GM(e);if(n!=null&&n!==t){if(n==="ResourceURL"&&t==="URL")return!0;throw new Error(`Required a safe ${t}, got a ${n} (see ${Nb})`)}return n===t}function GM(e){return e instanceof Oi&&e.getTypeName()||null}function ZC(e){return new qm(e)}function XC(e){return new Ym(e)}function JC(e){return new Km(e)}function QC(e){return new Zm(e)}function eS(e){return new Xm(e)}function zM(e){let t=new Qm(e);return qM()?new Jm(t):t}var Jm=class{inertDocumentHelper;constructor(e){this.inertDocumentHelper=e}getInertBodyElement(e){e="<body><remove></remove>"+e;try{let t=new window.DOMParser().parseFromString(xd(e),"text/html").body;return t===null?this.inertDocumentHelper.getInertBodyElement(e):(t.firstChild?.remove(),t)}catch{return null}}},Qm=class{defaultDoc;inertDocument;constructor(e){this.defaultDoc=e,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(e){let t=this.inertDocument.createElement("template");return t.innerHTML=xd(e),t}};function qM(){try{return!!new window.DOMParser().parseFromString(xd(""),"text/html")}catch{return!1}}var YM=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function Rd(e){return e=String(e),e.match(YM)?e:"unsafe:"+e}function Ui(e){let t={};for(let n of e.split(","))t[n]=!0;return t}function rl(...e){let t={};for(let n of e)for(let r in n)n.hasOwnProperty(r)&&(t[r]=!0);return t}var tS=Ui("area,br,col,hr,img,wbr"),nS=Ui("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),rS=Ui("rp,rt"),KM=rl(rS,nS),ZM=rl(nS,Ui("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),XM=rl(rS,Ui("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),lb=rl(tS,ZM,XM,KM),iS=Ui("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),JM=Ui("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),QM=Ui("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext"),eO=rl(iS,JM,QM),tO=Ui("script,style,template"),eg=class{sanitizedSomething=!1;buf=[];sanitizeChildren(e){let t=e.firstChild,n=!0,r=[];for(;t;){if(t.nodeType===Node.ELEMENT_NODE?n=this.startElement(t):t.nodeType===Node.TEXT_NODE?this.chars(t.nodeValue):this.sanitizedSomething=!0,n&&t.firstChild){r.push(t),t=iO(t);continue}for(;t;){t.nodeType===Node.ELEMENT_NODE&&this.endElement(t);let i=rO(t);if(i){t=i;break}t=r.pop()}}return this.buf.join("")}startElement(e){let t=ub(e).toLowerCase();if(!lb.hasOwnProperty(t))return this.sanitizedSomething=!0,!tO.hasOwnProperty(t);this.buf.push("<"),this.buf.push(t);let n=e.attributes;for(let r=0;r<n.length;r++){let i=n.item(r),s=i.name,o=s.toLowerCase();if(!eO.hasOwnProperty(o)){this.sanitizedSomething=!0;continue}let a=i.value;iS[o]&&(a=Rd(a)),this.buf.push(" ",s,'="',db(a),'"')}return this.buf.push(">"),!0}endElement(e){let t=ub(e).toLowerCase();lb.hasOwnProperty(t)&&!tS.hasOwnProperty(t)&&(this.buf.push("</"),this.buf.push(t),this.buf.push(">"))}chars(e){this.buf.push(db(e))}};function nO(e,t){return(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function rO(e){let t=e.nextSibling;if(t&&e!==t.previousSibling)throw oS(t);return t}function iO(e){let t=e.firstChild;if(t&&nO(e,t))throw oS(t);return t}function ub(e){let t=e.nodeName;return typeof t=="string"?t:"FORM"}function oS(e){return new Error(`Failed to sanitize html because the element is clobbered: ${e.outerHTML}`)}var oO=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,sO=/([^\#-~ |!])/g;function db(e){return e.replace(/&/g,"&amp;").replace(oO,function(t){let n=t.charCodeAt(0),r=t.charCodeAt(1);return"&#"+((n-55296)*1024+(r-56320)+65536)+";"}).replace(sO,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}var Uu;function oy(e,t){let n=null;try{Uu=Uu||zM(e);let r=t?String(t):"";n=Uu.getInertBodyElement(r);let i=5,s=r;do{if(i===0)throw new Error("Failed to sanitize html because the input is unstable");i--,r=s,s=n.innerHTML,n=Uu.getInertBodyElement(r)}while(r!==s);let o=new eg().sanitizeChildren(fb(n)||n);return xd(o)}finally{if(n){let r=fb(n)||n;for(;r.firstChild;)r.firstChild.remove()}}}function fb(e){return"content"in e&&aO(e)?e.content:null}function aO(e){return e.nodeType===Node.ELEMENT_NODE&&e.nodeName==="TEMPLATE"}var ei=function(e){return e[e.NONE=0]="NONE",e[e.HTML=1]="HTML",e[e.STYLE=2]="STYLE",e[e.SCRIPT=3]="SCRIPT",e[e.URL=4]="URL",e[e.RESOURCE_URL=5]="RESOURCE_URL",e}(ei||{});function Fr(e){let t=sS();return t?cb(t.sanitize(ei.HTML,e)||""):po(e,"HTML")?cb(Qr(e)):oy(jC(),Zc(e))}function an(e){let t=sS();return t?t.sanitize(ei.URL,e)||"":po(e,"URL")?Qr(e):Rd(Zc(e))}function sS(){let e=Fe();return e&&e[Ri].sanitizer}var cO=/^>|^->|<!--|-->|--!>|<!-$/g,lO=/(<|>)/g,uO="\u200B$1\u200B";function dO(e){return e.replace(cO,t=>t.replace(lO,uO))}function aS(e){return e.ownerDocument.defaultView}function fO(e,t,n){let r=e.length;for(;;){let i=e.indexOf(t,n);if(i===-1)return i;if(i===0||e.charCodeAt(i-1)<=32){let s=t.length;if(i+s===r||e.charCodeAt(i+s)<=32)return i}n=i+1}}var cS="ng-template";function pO(e,t,n,r){let i=0;if(r){for(;i<t.length&&typeof t[i]=="string";i+=2)if(t[i]==="class"&&fO(t[i+1].toLowerCase(),n,0)!==-1)return!0}else if(sy(e))return!1;if(i=t.indexOf(1,i),i>-1){let s;for(;++i<t.length&&typeof(s=t[i])=="string";)if(s.toLowerCase()===n)return!0}return!1}function sy(e){return e.type===4&&e.value!==cS}function hO(e,t,n){let r=e.type===4&&!n?cS:e.value;return t===r}function mO(e,t,n){let r=4,i=e.attrs,s=i!==null?vO(i):0,o=!1;for(let a=0;a<t.length;a++){let l=t[a];if(typeof l=="number"){if(!o&&!Mr(r)&&!Mr(l))return!1;if(o&&Mr(l))continue;o=!1,r=l|r&1;continue}if(!o)if(r&4){if(r=2|r&1,l!==""&&!hO(e,l,n)||l===""&&t.length===1){if(Mr(r))return!1;o=!0}}else if(r&8){if(i===null||!pO(e,i,l,n)){if(Mr(r))return!1;o=!0}}else{let c=t[++a],h=gO(l,i,sy(e),n);if(h===-1){if(Mr(r))return!1;o=!0;continue}if(c!==""){let d;if(h>s?d="":d=i[h+1].toLowerCase(),r&2&&c!==d){if(Mr(r))return!1;o=!0}}}}return Mr(r)||o}function Mr(e){return(e&1)===0}function gO(e,t,n,r){if(t===null)return-1;let i=0;if(r||!n){let s=!1;for(;i<t.length;){let o=t[i];if(o===e)return i;if(o===3||o===6)s=!0;else if(o===1||o===2){let a=t[++i];for(;typeof a=="string";)a=t[++i];continue}else{if(o===4)break;if(o===0){i+=4;continue}}i+=s?1:2}return-1}else return _O(t,e)}function yO(e,t,n=!1){for(let r=0;r<t.length;r++)if(mO(e,t[r],n))return!0;return!1}function vO(e){for(let t=0;t<e.length;t++){let n=e[t];if(nM(n))return t}return e.length}function _O(e,t){let n=e.indexOf(4);if(n>-1)for(n++;n<e.length;){let r=e[n];if(typeof r=="number")return-1;if(r===t)return n;n++}return-1}function pb(e,t){return e?":not("+t.trim()+")":t}function EO(e){let t=e[0],n=1,r=2,i="",s=!1;for(;n<e.length;){let o=e[n];if(typeof o=="string")if(r&2){let a=e[++n];i+="["+o+(a.length>0?'="'+a+'"':"")+"]"}else r&8?i+="."+o:r&4&&(i+=" "+o);else i!==""&&!Mr(o)&&(t+=pb(s,i),i=""),r=o,s=s||!Mr(r);n++}return i!==""&&(t+=pb(s,i)),t}function wO(e){return e.map(EO).join(",")}function bO(e){let t=[],n=[],r=1,i=2;for(;r<e.length;){let s=e[r];if(typeof s=="string")i===2?s!==""&&t.push(s,e[++r]):i===8&&n.push(s);else{if(!Mr(i))break;i=s}r++}return n.length&&t.push(1,...n),t}var Hi={};function CO(e,t){return e.createText(t)}function SO(e,t,n){e.setValue(t,n)}function DO(e,t){return e.createComment(dO(t))}function lS(e,t,n){return e.createElement(t,n)}function ld(e,t,n,r,i){e.insertBefore(t,n,r,i)}function uS(e,t,n){e.appendChild(t,n)}function hb(e,t,n,r,i){r!==null?ld(e,t,n,r,i):uS(e,t,n)}function IO(e,t,n){e.removeChild(null,t,n)}function TO(e,t,n){e.setAttribute(t,"style",n)}function xO(e,t,n){n===""?e.removeAttribute(t,"class"):e.setAttribute(t,"class",n)}function dS(e,t,n){let{mergedAttrs:r,classes:i,styles:s}=n;r!==null&&tM(e,t,r),i!==null&&xO(e,t,i),s!==null&&TO(e,t,s)}function ay(e,t,n,r,i,s,o,a,l,c,h){let d=Vt+r,f=d+i,g=RO(d,f),m=typeof c=="function"?c():c;return g[_e]={type:e,blueprint:g,template:n,queries:null,viewQuery:a,declTNode:t,data:g.slice().fill(null,d),bindingStartIndex:d,expandoStartIndex:f,hostBindingOpCodes:null,firstCreatePass:!0,firstUpdatePass:!0,staticViewQueries:!1,staticContentQueries:!1,preOrderHooks:null,preOrderCheckHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,cleanup:null,contentQueries:null,components:null,directiveRegistry:typeof s=="function"?s():s,pipeRegistry:typeof o=="function"?o():o,firstChild:null,schemas:l,consts:m,incompleteFirstPass:!1,ssrId:h}}function RO(e,t){let n=[];for(let r=0;r<t;r++)n.push(r<e?null:Hi);return n}function NO(e){let t=e.tView;return t===null||t.incompleteFirstPass?e.tView=ay(1,null,e.template,e.decls,e.vars,e.directiveDefs,e.pipeDefs,e.viewQuery,e.schemas,e.consts,e.id):t}function cy(e,t,n,r,i,s,o,a,l,c,h){let d=t.blueprint.slice();return d[Fi]=i,d[be]=r|4|128|8|64|1024,(c!==null||e&&e[be]&2048)&&(d[be]|=2048),iC(d),d[Rn]=d[pa]=e,d[jt]=n,d[Ri]=o||e&&e[Ri],d[sn]=a||e&&e[sn],d[jc]=l||e&&e[jc]||null,d[Lr]=s,d[Jc]=TM(),d[Hc]=h,d[Zb]=c,d[Pr]=t.type==2?e[Pr]:d,d}function AO(e,t,n){let r=Xr(t,e),i=NO(n),s=e[Ri].rendererFactory,o=ly(e,cy(e,i,null,fS(n),r,t,null,s.createRenderer(r,n),null,null,null));return e[t.index]=o}function fS(e){let t=16;return e.signals?t=4096:e.onPush&&(t=64),t}function pS(e,t,n,r){if(n===0)return-1;let i=t.length;for(let s=0;s<n;s++)t.push(r),e.blueprint.push(r),e.data.push(null);return i}function ly(e,t){return e[$c]?e[Yw][Or]=t:e[$c]=t,e[Yw]=t,t}function X(e=1){hS(Zt(),Fe(),uo()+e,!1)}function hS(e,t,n,r){if(!r)if((t[be]&3)===3){let i=e.preOrderCheckHooks;i!==null&&$u(t,i,n)}else{let i=e.preOrderHooks;i!==null&&Wu(t,i,0,n)}Jo(n)}var Nd=function(e){return e[e.None=0]="None",e[e.SignalBased=1]="SignalBased",e[e.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",e}(Nd||{});function tg(e,t,n,r){let i=je(null);try{let[s,o,a]=e.inputs[n],l=null;(o&Nd.SignalBased)!==0&&(l=t[s][bi]),l!==null&&l.transformFn!==void 0?r=l.transformFn(r):a!==null&&(r=a.call(t,r)),e.setInput!==null?e.setInput(t,l,r,n,s):Jb(t,l,s,r)}finally{je(i)}}function mS(e,t,n,r,i){let s=uo(),o=r&2;try{Jo(-1),o&&t.length>Vt&&hS(e,t,Vt,!1),pt(o?2:0,i),n(r,i)}finally{Jo(s),pt(o?3:1,i)}}function Ad(e,t,n){FO(e,t,n),(n.flags&64)===64&&BO(e,t,n)}function uy(e,t,n=Xr){let r=t.localNames;if(r!==null){let i=t.index+1;for(let s=0;s<r.length;s+=2){let o=r[s+1],a=o===-1?n(t,e):e[o];e[i++]=a}}}function MO(e,t,n,r){let i=r.get(FM,WC)||n===Zr.ShadowDom,s=e.selectRootElement(t,i);return OO(s),s}function OO(e){PO(e)}var PO=()=>null;function kO(e){return e==="class"?"className":e==="for"?"htmlFor":e==="formaction"?"formAction":e==="innerHtml"?"innerHTML":e==="readonly"?"readOnly":e==="tabindex"?"tabIndex":e}function gS(e,t,n,r,i,s,o,a){if(!a&&fy(t,e,n,r,i)){ha(t)&&LO(n,t.index);return}if(t.type&3){let l=Xr(t,n);r=kO(r),i=o!=null?o(i,t.value||"",r):i,s.setProperty(l,r,i)}else t.type&12}function LO(e,t){let n=gr(t,e);n[be]&16||(n[be]|=64)}function FO(e,t,n){let r=n.directiveStart,i=n.directiveEnd;ha(n)&&AO(t,n,e.data[r+n.componentOffset]),e.firstCreatePass||od(n,t);let s=n.initialInputs;for(let o=r;o<i;o++){let a=e.data[o],l=Wc(t,e,o,n);if(Yr(l,t),s!==null&&jO(t,o-r,l,a,n,s),Kr(a)){let c=gr(n.index,t);c[jt]=Wc(t,e,o,n)}}}function BO(e,t,n){let r=n.directiveStart,i=n.directiveEnd,s=n.index,o=WA();try{Jo(s);for(let a=r;a<i;a++){let l=e.data[a],c=t[a];Mm(a),(l.hostBindings!==null||l.hostVars!==0||l.hostAttrs!==null)&&VO(l,c)}}finally{Jo(-1),Mm(o)}}function VO(e,t){e.hostBindings!==null&&e.hostBindings(1,t)}function dy(e,t){let n=e.directiveRegistry,r=null;if(n)for(let i=0;i<n.length;i++){let s=n[i];yO(t,s.selectors,!1)&&(r??=[],Kr(s)?r.unshift(s):r.push(s))}return r}function UO(e,t,n,r,i,s){let o=Xr(e,t);HO(t[sn],o,s,e.value,n,r,i)}function HO(e,t,n,r,i,s,o){if(s==null)e.removeAttribute(t,i,n);else{let a=o==null?Zc(s):o(s,r||"",i);e.setAttribute(t,i,a,n)}}function jO(e,t,n,r,i,s){let o=s[t];if(o!==null)for(let a=0;a<o.length;a+=2){let l=o[a],c=o[a+1];tg(r,n,l,c)}}function yS(e,t){let n=e[jc],r=n?n.get(Mi,null):null;r&&r.handleError(t)}function fy(e,t,n,r,i){let s=e.inputs?.[r],o=e.hostDirectiveInputs?.[r],a=!1;if(o)for(let l=0;l<o.length;l+=2){let c=o[l],h=o[l+1],d=t.data[c];tg(d,n[c],h,i),a=!0}if(s)for(let l of s){let c=n[l],h=t.data[l];tg(h,c,r,i),a=!0}return a}function $O(e,t){let n=gr(t,e),r=n[_e];WO(r,n);let i=n[Fi];i!==null&&n[Hc]===null&&(n[Hc]=YC(i,n[jc])),pt(18),py(r,n,n[jt]),pt(19,n[jt])}function WO(e,t){for(let n=t.length;n<e.blueprint.length;n++)t.push(e.blueprint[n])}function py(e,t,n){Wg(t);try{let r=e.viewQuery;r!==null&&zm(1,r,n);let i=e.template;i!==null&&mS(e,t,i,1,n),e.firstCreatePass&&(e.firstCreatePass=!1),t[Ni]?.finishViewCreation(e),e.staticContentQueries&&KC(e,t),e.staticViewQueries&&zm(2,e.viewQuery,n);let s=e.components;s!==null&&GO(t,s)}catch(r){throw e.firstCreatePass&&(e.incompleteFirstPass=!0,e.firstCreatePass=!1),r}finally{t[be]&=-5,Gg()}}function GO(e,t){for(let n=0;n<t.length;n++)$O(e,t[n])}function Md(e,t,n,r){let i=je(null);try{let s=t.tView,o=e[be]&4096?4096:16,a=cy(e,s,n,o,null,t,null,null,r?.injector??null,r?.embeddedViewInjector??null,r?.dehydratedView??null),l=e[t.index];a[Ko]=l;let c=e[Ni];return c!==null&&(a[Ni]=c.createEmbeddedView(s)),py(s,a,n),a}finally{je(i)}}function Gc(e,t){return!t||t.firstChild===null||OC(e)}var zO;function hy(e,t){return zO(e,t)}var Pi=function(e){return e[e.Important=1]="Important",e[e.DashCase=2]="DashCase",e}(Pi||{});function vS(e){return(e.flags&32)===32}function ia(e,t,n,r,i){if(r!=null){let s,o=!1;Bi(r)?s=r:Ti(r)&&(o=!0,r=r[Fi]);let a=er(r);e===0&&n!==null?i==null?uS(t,n,a):ld(t,n,a,i||null,!0):e===1&&n!==null?ld(t,n,a,i||null,!0):e===2?IO(t,a,o):e===3&&t.destroyNode(a),s!=null&&iP(t,e,s,n,i)}}function qO(e,t){_S(e,t),t[Fi]=null,t[Lr]=null}function YO(e,t,n,r,i,s){r[Fi]=i,r[Lr]=t,kd(e,r,n,1,i,s)}function _S(e,t){t[Ri].changeDetectionScheduler?.notify(9),kd(e,t,t[sn],2,null,null)}function KO(e){let t=e[$c];if(!t)return gm(e[_e],e);for(;t;){let n=null;if(Ti(t))n=t[$c];else{let r=t[xn];r&&(n=r)}if(!n){for(;t&&!t[Or]&&t!==e;)Ti(t)&&gm(t[_e],t),t=t[Rn];t===null&&(t=e),Ti(t)&&gm(t[_e],t),n=t&&t[Or]}t=n}}function my(e,t){let n=e[la],r=n.indexOf(t);n.splice(r,1)}function Od(e,t){if(Qc(t))return;let n=t[sn];n.destroyNode&&kd(e,t,n,3,null,null),KO(t)}function gm(e,t){if(Qc(t))return;let n=je(null);try{t[be]&=-129,t[be]|=256,t[Qn]&&Kh(t[Qn]),XO(e,t),ZO(e,t),t[_e].type===1&&t[sn].destroy();let r=t[Ko];if(r!==null&&Bi(t[Rn])){r!==t[Rn]&&my(r,t);let i=t[Ni];i!==null&&i.detachView(e)}Hm(t)}finally{je(n)}}function ZO(e,t){let n=e.cleanup,r=t[Ju];if(n!==null)for(let o=0;o<n.length-1;o+=2)if(typeof n[o]=="string"){let a=n[o+3];a>=0?r[a]():r[-a].unsubscribe(),o+=2}else{let a=r[n[o+1]];n[o].call(a)}r!==null&&(t[Ju]=null);let i=t[so];if(i!==null){t[so]=null;for(let o=0;o<i.length;o++){let a=i[o];a()}}let s=t[Qu];if(s!==null){t[Qu]=null;for(let o of s)o.destroy()}}function XO(e,t){let n;if(e!=null&&(n=e.destroyHooks)!=null)for(let r=0;r<n.length;r+=2){let i=t[n[r]];if(!(i instanceof Qo)){let s=n[r+1];if(Array.isArray(s))for(let o=0;o<s.length;o+=2){let a=i[s[o]],l=s[o+1];pt(4,a,l);try{l.call(a)}finally{pt(5,a,l)}}else{pt(4,i,s);try{s.call(i)}finally{pt(5,i,s)}}}}}function JO(e,t,n){return QO(e,t.parent,n)}function QO(e,t,n){let r=t;for(;r!==null&&r.type&168;)t=r,r=t.parent;if(r===null)return n[Fi];if(ha(r)){let{encapsulation:i}=e.data[r.directiveStart+r.componentOffset];if(i===Zr.None||i===Zr.Emulated)return null}return Xr(r,n)}function eP(e,t,n){return nP(e,t,n)}function tP(e,t,n){return e.type&40?Xr(e,n):null}var nP=tP,mb;function Pd(e,t,n,r){let i=JO(e,r,t),s=t[sn],o=r.parent||t[Lr],a=eP(o,r,t);if(i!=null)if(Array.isArray(n))for(let l=0;l<n.length;l++)hb(s,i,n[l],a,!1);else hb(s,i,n,a,!1);mb!==void 0&&mb(s,r,t,n,i)}function Lc(e,t){if(t!==null){let n=t.type;if(n&3)return Xr(t,e);if(n&4)return ng(-1,e[t.index]);if(n&8){let r=t.child;if(r!==null)return Lc(e,r);{let i=e[t.index];return Bi(i)?ng(-1,i):er(i)}}else{if(n&128)return Lc(e,t.next);if(n&32)return hy(t,e)()||er(e[t.index]);{let r=ES(e,t);if(r!==null){if(Array.isArray(r))return r[0];let i=Xo(e[Pr]);return Lc(i,r)}else return Lc(e,t.next)}}}return null}function ES(e,t){if(t!==null){let n=e[Pr][Lr],r=t.projection;return n.projection[r]}return null}function ng(e,t){let n=xn+e+1;if(n<t.length){let r=t[n],i=r[_e].firstChild;if(i!==null)return Lc(r,i)}return t[Zo]}function gy(e,t,n,r,i,s,o){for(;n!=null;){if(n.type===128){n=n.next;continue}let a=r[n.index],l=n.type;if(o&&t===0&&(a&&Yr(er(a),r),n.flags|=2),!vS(n))if(l&8)gy(e,t,n.child,r,i,s,!1),ia(t,e,i,a,s);else if(l&32){let c=hy(n,r),h;for(;h=c();)ia(t,e,i,h,s);ia(t,e,i,a,s)}else l&16?rP(e,t,r,n,i,s):ia(t,e,i,a,s);n=o?n.projectionNext:n.next}}function kd(e,t,n,r,i,s){gy(n,r,e.firstChild,t,i,s,!1)}function rP(e,t,n,r,i,s){let o=n[Pr],a=o[Lr].projection[r.projection];if(Array.isArray(a))for(let l=0;l<a.length;l++){let c=a[l];ia(t,e,i,c,s)}else{let l=a,c=o[Rn];OC(r)&&(l.flags|=128),gy(e,t,l,c,i,s,!0)}}function iP(e,t,n,r,i){let s=n[Zo],o=er(n);s!==o&&ia(t,e,r,s,i);for(let a=xn;a<n.length;a++){let l=n[a];kd(l[_e],l,e,t,r,s)}}function oP(e,t,n,r,i){if(t)i?e.addClass(n,r):e.removeClass(n,r);else{let s=r.indexOf("-")===-1?void 0:Pi.DashCase;i==null?e.removeStyle(n,r,s):(typeof i=="string"&&i.endsWith("!important")&&(i=i.slice(0,-10),s|=Pi.Important),e.setStyle(n,r,i,s))}}function ud(e,t,n,r,i=!1){for(;n!==null;){if(n.type===128){n=i?n.projectionNext:n.next;continue}let s=t[n.index];s!==null&&r.push(er(s)),Bi(s)&&sP(s,r);let o=n.type;if(o&8)ud(e,t,n.child,r);else if(o&32){let a=hy(n,t),l;for(;l=a();)r.push(l)}else if(o&16){let a=ES(t,n);if(Array.isArray(a))r.push(...a);else{let l=Xo(t[Pr]);ud(l[_e],l,a,r,!0)}}n=i?n.projectionNext:n.next}return r}function sP(e,t){for(let n=xn;n<e.length;n++){let r=e[n],i=r[_e].firstChild;i!==null&&ud(r[_e],r,i,t)}e[Zo]!==e[Fi]&&t.push(e[Zo])}function wS(e){if(e[sa]!==null){for(let t of e[sa])t.impl.addSequence(t);e[sa].length=0}}var bS=[];function aP(e){return e[Qn]??cP(e)}function cP(e){let t=bS.pop()??Object.create(uP);return t.lView=e,t}function lP(e){e.lView[Qn]!==e&&(e.lView=null,bS.push(e))}var uP=te(w({},lu),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:e=>{el(e.lView)},consumerOnSignalRead(){this.lView[Qn]=this}});function dP(e){let t=e[Qn]??Object.create(fP);return t.lView=e,t}var fP=te(w({},lu),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:e=>{let t=Xo(e.lView);for(;t&&!CS(t[_e]);)t=Xo(t);t&&Vg(t)},consumerOnSignalRead(){this.lView[Qn]=this}});function CS(e){return e.type!==2}function SS(e){if(e[Qu]===null)return;let t=!0;for(;t;){let n=!1;for(let r of e[Qu])r.dirty&&(n=!0,r.zone===null||Zone.current===r.zone?r.run():r.zone.run(()=>r.run()));t=n&&!!(e[be]&8192)}}var pP=100;function DS(e,t=!0,n=0){let r=e[Ri].rendererFactory,i=!1;i||r.begin?.();try{hP(e,n)}catch(s){throw t&&yS(e,s),s}finally{i||r.end?.()}}function hP(e,t){let n=dC();try{Zw(!0),rg(e,t);let r=0;for(;bd(e);){if(r===pP)throw new $e(103,!1);r++,rg(e,1)}}finally{Zw(n)}}function mP(e,t,n,r){if(Qc(t))return;let i=t[be],s=!1,o=!1;Wg(t);let a=!0,l=null,c=null;s||(CS(e)?(c=aP(t),l=qh(c)):ew()===null?(a=!1,c=dP(t),l=qh(c)):t[Qn]&&(Kh(t[Qn]),t[Qn]=null));try{iC(t),UA(e.bindingStartIndex),n!==null&&mS(e,t,n,2,r);let h=(i&3)===3;if(!s)if(h){let g=e.preOrderCheckHooks;g!==null&&$u(t,g,null)}else{let g=e.preOrderHooks;g!==null&&Wu(t,g,0,null),fm(t,0)}if(o||gP(t),SS(t),IS(t,0),e.contentQueries!==null&&KC(e,t),!s)if(h){let g=e.contentCheckHooks;g!==null&&$u(t,g)}else{let g=e.contentHooks;g!==null&&Wu(t,g,1),fm(t,1)}vP(e,t);let d=e.components;d!==null&&xS(t,d,0);let f=e.viewQuery;if(f!==null&&zm(2,f,r),!s)if(h){let g=e.viewCheckHooks;g!==null&&$u(t,g)}else{let g=e.viewHooks;g!==null&&Wu(t,g,2),fm(t,2)}if(e.firstUpdatePass===!0&&(e.firstUpdatePass=!1),t[dm]){for(let g of t[dm])g();t[dm]=null}s||(wS(t),t[be]&=-73)}catch(h){throw s||el(t),h}finally{c!==null&&(iw(c,l),a&&lP(c)),Gg()}}function IS(e,t){for(let n=BC(e);n!==null;n=VC(n))for(let r=xn;r<n.length;r++){let i=n[r];TS(i,t)}}function gP(e){for(let t=BC(e);t!==null;t=VC(t)){if(!(t[be]&2))continue;let n=t[la];for(let r=0;r<n.length;r++){let i=n[r];Vg(i)}}}function yP(e,t,n){pt(18);let r=gr(t,e);TS(r,n),pt(19,r[jt])}function TS(e,t){Bg(e)&&rg(e,t)}function rg(e,t){let n=e[_e],r=e[be],i=e[Qn],s=!!(t===0&&r&16);if(s||=!!(r&64&&t===0),s||=!!(r&1024),s||=!!(i?.dirty&&Yh(i)),s||=!1,i&&(i.dirty=!1),e[be]&=-9217,s)mP(n,e,n.template,e[jt]);else if(r&8192){SS(e),IS(e,1);let o=n.components;o!==null&&xS(e,o,1),wS(e)}}function xS(e,t,n){for(let r=0;r<t.length;r++)yP(e,t[r],n)}function vP(e,t){let n=e.hostBindingOpCodes;if(n!==null)try{for(let r=0;r<n.length;r++){let i=n[r];if(i<0)Jo(~i);else{let s=i,o=n[++r],a=n[++r];$A(o,s);let l=t[s];pt(24,l),a(2,l),pt(25,l)}}}finally{Jo(-1)}}function yy(e,t){let n=dC()?64:1088;for(e[Ri].changeDetectionScheduler?.notify(t);e;){e[be]|=n;let r=Xo(e);if(td(e)&&!r)return e;e=r}return null}function RS(e,t,n,r){return[e,!0,0,t,null,r,null,n,null,null]}function NS(e,t){let n=xn+t;if(n<e.length)return e[n]}function Ld(e,t,n,r=!0){let i=t[_e];if(_P(i,t,e,n),r){let o=ng(n,e),a=t[sn],l=a.parentNode(e[Zo]);l!==null&&YO(i,e[Lr],a,t,l,o)}let s=t[Hc];s!==null&&s.firstChild!==null&&(s.firstChild=null)}function AS(e,t){let n=zc(e,t);return n!==void 0&&Od(n[_e],n),n}function zc(e,t){if(e.length<=xn)return;let n=xn+t,r=e[n];if(r){let i=r[Ko];i!==null&&i!==e&&my(i,r),t>0&&(e[n-1][Or]=r[Or]);let s=Zu(e,xn+t);qO(r[_e],r);let o=s[Ni];o!==null&&o.detachView(s[_e]),r[Rn]=null,r[Or]=null,r[be]&=-129}return r}function _P(e,t,n,r){let i=xn+r,s=n.length;r>0&&(n[i-1][Or]=t),r<s-xn?(t[Or]=n[i],Fb(n,xn+r,t)):(n.push(t),t[Or]=null),t[Rn]=n;let o=t[Ko];o!==null&&n!==o&&MS(o,t);let a=t[Ni];a!==null&&a.insertView(e),Nm(t),t[be]|=128}function MS(e,t){let n=e[la],r=t[Rn];if(Ti(r))e[be]|=2;else{let i=r[Rn][Pr];t[Pr]!==i&&(e[be]|=2)}n===null?e[la]=[t]:n.push(t)}var es=class{_lView;_cdRefInjectingView;notifyErrorHandler;_appRef=null;_attachedToViewContainer=!1;get rootNodes(){let e=this._lView,t=e[_e];return ud(t,e,t.firstChild,[])}constructor(e,t,n=!0){this._lView=e,this._cdRefInjectingView=t,this.notifyErrorHandler=n}get context(){return this._lView[jt]}get dirty(){return!!(this._lView[be]&9280)||!!this._lView[Qn]?.dirty}set context(e){this._lView[jt]=e}get destroyed(){return Qc(this._lView)}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){let e=this._lView[Rn];if(Bi(e)){let t=e[ed],n=t?t.indexOf(this):-1;n>-1&&(zc(e,n),Zu(t,n))}this._attachedToViewContainer=!1}Od(this._lView[_e],this._lView)}onDestroy(e){oC(this._lView,e)}markForCheck(){yy(this._cdRefInjectingView||this._lView,4)}markForRefresh(){Vg(this._cdRefInjectingView||this._lView)}detach(){this._lView[be]&=-129}reattach(){Nm(this._lView),this._lView[be]|=128}detectChanges(){this._lView[be]|=1024,DS(this._lView,this.notifyErrorHandler)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new $e(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=td(this._lView),t=this._lView[Ko];t!==null&&!e&&my(t,this._lView),_S(this._lView[_e],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new $e(902,!1);this._appRef=e;let t=td(this._lView),n=this._lView[Ko];n!==null&&!t&&MS(n,this._lView),Nm(this._lView)}},kr=(()=>{class e{static __NG_ELEMENT_ID__=bP}return e})(),EP=kr,wP=class extends EP{_declarationLView;_declarationTContainer;elementRef;constructor(e,t,n){super(),this._declarationLView=e,this._declarationTContainer=t,this.elementRef=n}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(e,t){return this.createEmbeddedViewImpl(e,t)}createEmbeddedViewImpl(e,t,n){let r=Md(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:t,dehydratedView:n});return new es(r)}};function bP(){return Fd(tr(),Fe())}function Fd(e,t){return e.type&4?new wP(t,e,ma(e,t)):null}function il(e,t,n,r,i){let s=e.data[t];if(s===null)s=CP(e,t,n,r,i),jA()&&(s.flags|=32);else if(s.type&64){s.type=n,s.value=r,s.attrs=i;let o=VA();s.injectorIndex=o===null?-1:o.injectorIndex}return lo(s,!0),s}function CP(e,t,n,r,i){let s=cC(),o=Hg(),a=o?s:s&&s.parent,l=e.data[t]=DP(e,a,n,t,r,i);return SP(e,l,s,o),l}function SP(e,t,n,r){e.firstChild===null&&(e.firstChild=t),n!==null&&(r?n.child==null&&t.parent!==null&&(n.child=t):n.next===null&&(n.next=t,t.prev=n))}function DP(e,t,n,r,i,s){let o=t?t.injectorIndex:-1,a=0;return LA()&&(a|=128),{type:n,index:r,insertBeforeIndex:null,injectorIndex:o,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,propertyBindings:null,flags:a,providerIndexes:0,value:i,attrs:s,mergedAttrs:null,localNames:null,initialInputs:null,inputs:null,hostDirectiveInputs:null,outputs:null,hostDirectiveOutputs:null,directiveToIndex:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:t,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}var dW=new RegExp(`^(\\d+)*(${LM}|${kM})*(.*)`),IP=()=>null;function qc(e,t){return IP(e,t)}var ig=class{},dd=class{},og=class{resolveComponentFactory(e){throw Error(`No component factory found for ${mr(e)}.`)}},co=class{static NULL=new og},hn=class{},ya=(()=>{class e{destroyNode=null;static __NG_ELEMENT_ID__=()=>TP()}return e})();function TP(){let e=Fe(),t=tr(),n=gr(t.index,e);return(Ti(n)?n:e)[sn]}var xP=(()=>{class e{static \u0275prov=ne({token:e,providedIn:"root",factory:()=>null})}return e})();function sg(e,t,n){let r=n?e.styles:null,i=n?e.classes:null,s=0;if(t!==null)for(let o=0;o<t.length;o++){let a=t[o];if(typeof a=="number")s=a;else if(s==1)i=jw(i,a);else if(s==2){let l=a,c=t[++o];r=jw(r,l+": "+c+";")}}n?e.styles=r:e.stylesWithoutHost=r,n?e.classes=i:e.classesWithoutHost=i}function Ot(e,t=Ke.Default){let n=Fe();if(n===null)return Ze(e,t);let r=tr();return IC(r,n,kn(e),t)}function vy(e,t,n,r,i){let s=r===null?null:{"":-1},o=i(e,n);if(o!==null){let a,l=null,c=null,h=NP(o);h===null?a=o:[a,l,c]=h,OP(e,t,n,a,s,l,c)}s!==null&&r!==null&&RP(n,r,s)}function RP(e,t,n){let r=e.localNames=[];for(let i=0;i<t.length;i+=2){let s=n[t[i+1]];if(s==null)throw new $e(-301,!1);r.push(t[i],s)}}function NP(e){let t=null,n=!1;for(let o=0;o<e.length;o++){let a=e[o];if(o===0&&Kr(a)&&(t=a),a.findHostDirectiveDefs!==null){n=!0;break}}if(!n)return null;let r=null,i=null,s=null;for(let o of e)o.findHostDirectiveDefs!==null&&(r??=[],i??=new Map,s??=new Map,AP(o,r,s,i)),o===t&&(r??=[],r.push(o));return r!==null?(r.push(...t===null?e:e.slice(1)),[r,i,s]):null}function AP(e,t,n,r){let i=t.length;e.findHostDirectiveDefs(e,t,r),n.set(e,[i,t.length-1])}function MP(e,t,n){t.componentOffset=n,(e.components??=[]).push(t.index)}function OP(e,t,n,r,i,s,o){let a=r.length,l=!1;for(let f=0;f<a;f++){let g=r[f];!l&&Kr(g)&&(l=!0,MP(e,n,f)),km(od(n,t),e,g.type)}VP(n,e.data.length,a);for(let f=0;f<a;f++){let g=r[f];g.providersResolver&&g.providersResolver(g)}let c=!1,h=!1,d=pS(e,t,a,null);a>0&&(n.directiveToIndex=new Map);for(let f=0;f<a;f++){let g=r[f];if(n.mergedAttrs=ua(n.mergedAttrs,g.hostAttrs),kP(e,n,t,d,g),BP(d,g,i),o!==null&&o.has(g)){let[b,x]=o.get(g);n.directiveToIndex.set(g.type,[d,b+n.directiveStart,x+n.directiveStart])}else(s===null||!s.has(g))&&n.directiveToIndex.set(g.type,d);g.contentQueries!==null&&(n.flags|=4),(g.hostBindings!==null||g.hostAttrs!==null||g.hostVars!==0)&&(n.flags|=64);let m=g.type.prototype;!c&&(m.ngOnChanges||m.ngOnInit||m.ngDoCheck)&&((e.preOrderHooks??=[]).push(n.index),c=!0),!h&&(m.ngOnChanges||m.ngDoCheck)&&((e.preOrderCheckHooks??=[]).push(n.index),h=!0),d++}PP(e,n,s)}function PP(e,t,n){for(let r=t.directiveStart;r<t.directiveEnd;r++){let i=e.data[r];if(n===null||!n.has(i))gb(0,t,i,r),gb(1,t,i,r),vb(t,r,!1);else{let s=n.get(i);yb(0,t,s,r),yb(1,t,s,r),vb(t,r,!0)}}}function gb(e,t,n,r){let i=e===0?n.inputs:n.outputs;for(let s in i)if(i.hasOwnProperty(s)){let o;e===0?o=t.inputs??={}:o=t.outputs??={},o[s]??=[],o[s].push(r),OS(t,s)}}function yb(e,t,n,r){let i=e===0?n.inputs:n.outputs;for(let s in i)if(i.hasOwnProperty(s)){let o=i[s],a;e===0?a=t.hostDirectiveInputs??={}:a=t.hostDirectiveOutputs??={},a[o]??=[],a[o].push(r,s),OS(t,o)}}function OS(e,t){t==="class"?e.flags|=8:t==="style"&&(e.flags|=16)}function vb(e,t,n){let{attrs:r,inputs:i,hostDirectiveInputs:s}=e;if(r===null||!n&&i===null||n&&s===null||sy(e)){e.initialInputs??=[],e.initialInputs.push(null);return}let o=null,a=0;for(;a<r.length;){let l=r[a];if(l===0){a+=4;continue}else if(l===5){a+=2;continue}else if(typeof l=="number")break;if(!n&&i.hasOwnProperty(l)){let c=i[l];for(let h of c)if(h===t){o??=[],o.push(l,r[a+1]);break}}else if(n&&s.hasOwnProperty(l)){let c=s[l];for(let h=0;h<c.length;h+=2)if(c[h]===t){o??=[],o.push(c[h+1],r[a+1]);break}}a+=2}e.initialInputs??=[],e.initialInputs.push(o)}function kP(e,t,n,r,i){e.data[r]=i;let s=i.factory||(i.factory=zo(i.type,!0)),o=new Qo(s,Kr(i),Ot);e.blueprint[r]=o,n[r]=o,LP(e,t,r,pS(e,n,i.hostVars,Hi),i)}function LP(e,t,n,r,i){let s=i.hostBindings;if(s){let o=e.hostBindingOpCodes;o===null&&(o=e.hostBindingOpCodes=[]);let a=~t.index;FP(o)!=a&&o.push(a),o.push(n,r,s)}}function FP(e){let t=e.length;for(;t>0;){let n=e[--t];if(typeof n=="number"&&n<0)return n}return 0}function BP(e,t,n){if(n){if(t.exportAs)for(let r=0;r<t.exportAs.length;r++)n[t.exportAs[r]]=e;Kr(t)&&(n[""]=e)}}function VP(e,t,n){e.flags|=1,e.directiveStart=t,e.directiveEnd=t+n,e.providerIndexes=t}function PS(e,t,n,r,i,s,o,a){let l=t.consts,c=ao(l,o),h=il(t,e,2,r,c);return s&&vy(t,n,h,ao(l,a),i),h.mergedAttrs=ua(h.mergedAttrs,h.attrs),h.attrs!==null&&sg(h,h.attrs,!1),h.mergedAttrs!==null&&sg(h,h.mergedAttrs,!0),t.queries!==null&&t.queries.elementStart(t,h),h}function kS(e,t){qg(e,t),Lg(t)&&e.queries.elementEnd(t)}var ag=class extends co{ngModule;constructor(e){super(),this.ngModule=e}resolveComponentFactory(e){let t=Yo(e);return new Yc(t,this.ngModule)}};function UP(e){return Object.keys(e).map(t=>{let[n,r,i]=e[t],s={propName:n,templateName:t,isSignal:(r&Nd.SignalBased)!==0};return i&&(s.transform=i),s})}function HP(e){return Object.keys(e).map(t=>({propName:e[t],templateName:t}))}function jP(e,t,n){let r=t instanceof Gn?t:t?.injector;return r&&e.getStandaloneInjector!==null&&(r=e.getStandaloneInjector(r)||r),r?new Om(n,r):n}function $P(e){let t=e.get(hn,null);if(t===null)throw new $e(407,!1);let n=e.get(xP,null),r=e.get(Ai,null);return{rendererFactory:t,sanitizer:n,changeDetectionScheduler:r}}function WP(e,t){let n=(e.selectors[0][0]||"div").toLowerCase();return lS(t,n,n==="svg"?nC:n==="math"?TA:null)}var Yc=class extends dd{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;get inputs(){return UP(this.componentDef.inputs)}get outputs(){return HP(this.componentDef.outputs)}constructor(e,t){super(),this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=wO(e.selectors),this.ngContentSelectors=e.ngContentSelectors??[],this.isBoundToModule=!!t}create(e,t,n,r){pt(22);let i=je(null);try{let s=this.componentDef,o=n?["ng-version","19.2.0"]:bO(this.componentDef.selectors[0]),a=ay(0,null,null,1,0,null,null,null,null,[o],null),l=jP(s,r||this.ngModule,e),c=$P(l),h=c.rendererFactory.createRenderer(null,s),d=n?MO(h,n,s.encapsulation,l):WP(s,h),f=cy(null,a,null,512|fS(s),null,null,c,h,l,null,YC(d,l,!0));f[Vt]=d,Wg(f);let g=null;try{let m=PS(Vt,a,f,"#host",()=>[this.componentDef],!0,0);d&&(dS(h,d,m),Yr(d,f)),Ad(a,f,m),iy(a,m,f),kS(a,m),t!==void 0&&GP(m,this.ngContentSelectors,t),g=gr(m.index,f),f[jt]=g[jt],py(a,f,null)}catch(m){throw g!==null&&Hm(g),Hm(f),m}finally{pt(23),Gg()}return new cg(this.componentType,f)}finally{je(i)}}},cg=class extends ig{_rootLView;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(e,t){super(),this._rootLView=t,this._tNode=Fg(t[_e],Vt),this.location=ma(this._tNode,t),this.instance=gr(this._tNode.index,t)[jt],this.hostView=this.changeDetectorRef=new es(t,void 0,!1),this.componentType=e}setInput(e,t){let n=this._tNode;if(this.previousInputValues??=new Map,this.previousInputValues.has(e)&&Object.is(this.previousInputValues.get(e),t))return;let r=this._rootLView,i=fy(n,r[_e],r,e,t);this.previousInputValues.set(e,t);let s=gr(n.index,r);yy(s,1)}get injector(){return new Wo(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}};function GP(e,t,n){let r=e.projection=[];for(let i=0;i<t.length;i++){let s=n[i];r.push(s!=null&&s.length?Array.from(s):null)}}var Br=(()=>{class e{static __NG_ELEMENT_ID__=zP}return e})();function zP(){let e=tr();return FS(e,Fe())}var qP=Br,LS=class extends qP{_lContainer;_hostTNode;_hostLView;constructor(e,t,n){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=n}get element(){return ma(this._hostTNode,this._hostLView)}get injector(){return new Wo(this._hostTNode,this._hostLView)}get parentInjector(){let e=Yg(this._hostTNode,this._hostLView);if(EC(e)){let t=rd(e,this._hostLView),n=nd(e),r=t[_e].data[n+8];return new Wo(r,t)}else return new Wo(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let t=_b(this._lContainer);return t!==null&&t[e]||null}get length(){return this._lContainer.length-xn}createEmbeddedView(e,t,n){let r,i;typeof n=="number"?r=n:n!=null&&(r=n.index,i=n.injector);let s=qc(this._lContainer,e.ssrId),o=e.createEmbeddedViewImpl(t||{},i,s);return this.insertImpl(o,r,Gc(this._hostTNode,s)),o}createComponent(e,t,n,r,i){let s=e&&!CA(e),o;if(s)o=t;else{let g=t||{};o=g.index,n=g.injector,r=g.projectableNodes,i=g.environmentInjector||g.ngModuleRef}let a=s?e:new Yc(Yo(e)),l=n||this.parentInjector;if(!i&&a.ngModule==null){let g=(s?l:this.parentInjector).get(Gn,null);g&&(i=g)}let c=Yo(a.componentType??{}),h=qc(this._lContainer,c?.id??null),d=h?.firstChild??null,f=a.create(l,r,d,i);return this.insertImpl(f.hostView,o,Gc(this._hostTNode,h)),f}insert(e,t){return this.insertImpl(e,t,!0)}insertImpl(e,t,n){let r=e._lView;if(RA(r)){let o=this.indexOf(e);if(o!==-1)this.detach(o);else{let a=r[Rn],l=new LS(a,a[Lr],a[Rn]);l.detach(l.indexOf(e))}}let i=this._adjustIndex(t),s=this._lContainer;return Ld(s,r,i,n),e.attachToViewContainerRef(),Fb(ym(s),i,e),e}move(e,t){return this.insert(e,t)}indexOf(e){let t=_b(this._lContainer);return t!==null?t.indexOf(e):-1}remove(e){let t=this._adjustIndex(e,-1),n=zc(this._lContainer,t);n&&(Zu(ym(this._lContainer),t),Od(n[_e],n))}detach(e){let t=this._adjustIndex(e,-1),n=zc(this._lContainer,t);return n&&Zu(ym(this._lContainer),t)!=null?new es(n):null}_adjustIndex(e,t=0){return e??this.length+t}};function _b(e){return e[ed]}function ym(e){return e[ed]||(e[ed]=[])}function FS(e,t){let n,r=t[e.index];return Bi(r)?n=r:(n=RS(r,t,null,e),t[e.index]=n,ly(t,n)),KP(n,t,e,r),new LS(n,e,t)}function YP(e,t){let n=e[sn],r=n.createComment(""),i=Xr(t,e),s=n.parentNode(i);return ld(n,s,r,n.nextSibling(i),!1),r}var KP=JP,ZP=()=>!1;function XP(e,t,n){return ZP(e,t,n)}function JP(e,t,n,r){if(e[Zo])return;let i;n.type&8?i=er(r):i=YP(t,n),e[Zo]=i}var lg=class zE{queryList;matches=null;constructor(t){this.queryList=t}clone(){return new zE(this.queryList)}setDirty(){this.queryList.setDirty()}},ug=class WE{queries;constructor(t=[]){this.queries=t}createEmbeddedView(t){let n=t.queries;if(n!==null){let r=t.contentQueries!==null?t.contentQueries[0]:n.length,i=[];for(let s=0;s<r;s++){let o=n.getByIndex(s),a=this.queries[o.indexInDeclarationView];i.push(a.clone())}return new WE(i)}return null}insertView(t){this.dirtyQueriesWithMatches(t)}detachView(t){this.dirtyQueriesWithMatches(t)}finishViewCreation(t){this.dirtyQueriesWithMatches(t)}dirtyQueriesWithMatches(t){for(let n=0;n<this.queries.length;n++)_y(t,n).matches!==null&&this.queries[n].setDirty()}},dg=class{flags;read;predicate;constructor(e,t,n=null){this.flags=t,this.read=n,typeof e=="string"?this.predicate=s1(e):this.predicate=e}},fg=class qE{queries;constructor(t=[]){this.queries=t}elementStart(t,n){for(let r=0;r<this.queries.length;r++)this.queries[r].elementStart(t,n)}elementEnd(t){for(let n=0;n<this.queries.length;n++)this.queries[n].elementEnd(t)}embeddedTView(t){let n=null;for(let r=0;r<this.length;r++){let i=n!==null?n.length:0,s=this.getByIndex(r).embeddedTView(t,i);s&&(s.indexInDeclarationView=r,n!==null?n.push(s):n=[s])}return n!==null?new qE(n):null}template(t,n){for(let r=0;r<this.queries.length;r++)this.queries[r].template(t,n)}getByIndex(t){return this.queries[t]}get length(){return this.queries.length}track(t){this.queries.push(t)}},pg=class YE{metadata;matches=null;indexInDeclarationView=-1;crossesNgTemplate=!1;_declarationNodeIndex;_appliesToNextNode=!0;constructor(t,n=-1){this.metadata=t,this._declarationNodeIndex=n}elementStart(t,n){this.isApplyingToNode(n)&&this.matchTNode(t,n)}elementEnd(t){this._declarationNodeIndex===t.index&&(this._appliesToNextNode=!1)}template(t,n){this.elementStart(t,n)}embeddedTView(t,n){return this.isApplyingToNode(t)?(this.crossesNgTemplate=!0,this.addMatch(-t.index,n),new YE(this.metadata)):null}isApplyingToNode(t){if(this._appliesToNextNode&&(this.metadata.flags&1)!==1){let n=this._declarationNodeIndex,r=t.parent;for(;r!==null&&r.type&8&&r.index!==n;)r=r.parent;return n===(r!==null?r.index:-1)}return this._appliesToNextNode}matchTNode(t,n){let r=this.metadata.predicate;if(Array.isArray(r))for(let i=0;i<r.length;i++){let s=r[i];this.matchTNodeWithReadOption(t,n,QP(n,s)),this.matchTNodeWithReadOption(t,n,Gu(n,t,s,!1,!1))}else r===kr?n.type&4&&this.matchTNodeWithReadOption(t,n,-1):this.matchTNodeWithReadOption(t,n,Gu(n,t,r,!1,!1))}matchTNodeWithReadOption(t,n,r){if(r!==null){let i=this.metadata.read;if(i!==null)if(i===Ct||i===Br||i===kr&&n.type&4)this.addMatch(n.index,-2);else{let s=Gu(n,t,i,!1,!1);s!==null&&this.addMatch(n.index,s)}else this.addMatch(n.index,r)}}addMatch(t,n){this.matches===null?this.matches=[t,n]:this.matches.push(t,n)}};function QP(e,t){let n=e.localNames;if(n!==null){for(let r=0;r<n.length;r+=2)if(n[r]===t)return n[r+1]}return null}function e1(e,t){return e.type&11?ma(e,t):e.type&4?Fd(e,t):null}function t1(e,t,n,r){return n===-1?e1(t,e):n===-2?n1(e,t,r):Wc(e,e[_e],n,t)}function n1(e,t,n){if(n===Ct)return ma(t,e);if(n===kr)return Fd(t,e);if(n===Br)return FS(t,e)}function BS(e,t,n,r){let i=t[Ni].queries[r];if(i.matches===null){let s=e.data,o=n.matches,a=[];for(let l=0;o!==null&&l<o.length;l+=2){let c=o[l];if(c<0)a.push(null);else{let h=s[c];a.push(t1(t,h,o[l+1],n.metadata.read))}}i.matches=a}return i.matches}function hg(e,t,n,r){let i=e.queries.getByIndex(n),s=i.matches;if(s!==null){let o=BS(e,t,i,n);for(let a=0;a<s.length;a+=2){let l=s[a];if(l>0)r.push(o[a/2]);else{let c=s[a+1],h=t[-l];for(let d=xn;d<h.length;d++){let f=h[d];f[Ko]===f[Rn]&&hg(f[_e],f,c,r)}if(h[la]!==null){let d=h[la];for(let f=0;f<d.length;f++){let g=d[f];hg(g[_e],g,c,r)}}}}}return r}function r1(e,t){return e[Ni].queries[t].queryList}function i1(e,t,n){let r=new Um((n&4)===4);return MA(e,t,r,r.destroy),(t[Ni]??=new ug).queries.push(new lg(r))-1}function o1(e,t,n){let r=Zt();return r.firstCreatePass&&(a1(r,new dg(e,t,n),-1),(t&2)===2&&(r.staticViewQueries=!0)),i1(r,Fe(),t)}function s1(e){return e.split(",").map(t=>t.trim())}function a1(e,t,n){e.queries===null&&(e.queries=new fg),e.queries.track(new pg(t,n))}function _y(e,t){return e.queries.getByIndex(t)}function c1(e,t){let n=e[_e],r=_y(n,t);return r.crossesNgTemplate?hg(n,e,t,[]):BS(n,e,r,t)}var ki=class{},fd=class extends ki{injector;componentFactoryResolver=new ag(this);instance=null;constructor(e){super();let t=new Uc([...e.providers,{provide:ki,useValue:this},{provide:co,useValue:this.componentFactoryResolver}],e.parent||_d(),e.debugName,new Set(["environment"]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function l1(e,t,n=null){return new fd({providers:e,parent:t,debugName:n,runEnvironmentInitializers:!0}).injector}var u1=(()=>{class e{_injector;cachedInjectors=new Map;constructor(n){this._injector=n}getOrCreateStandaloneInjector(n){if(!n.standalone)return null;if(!this.cachedInjectors.has(n)){let r=$b(!1,n.type),i=r.length>0?l1([r],this._injector,`Standalone[${n.type.name}]`):null;this.cachedInjectors.set(n,i)}return this.cachedInjectors.get(n)}ngOnDestroy(){try{for(let n of this.cachedInjectors.values())n!==null&&n.destroy()}finally{this.cachedInjectors.clear()}}static \u0275prov=ne({token:e,providedIn:"environment",factory:()=>new e(Ze(Gn))})}return e})();function yt(e){return Rg(()=>{let t=VS(e),n=te(w({},t),{decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection===PC.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:t.standalone?i=>i.get(u1).getOrCreateStandaloneInjector(n):null,getExternalStyles:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||Zr.Emulated,styles:e.styles||xi,_:null,schemas:e.schemas||null,tView:null,id:""});t.standalone&&fo("NgStandalone"),US(n);let r=e.dependencies;return n.directiveDefs=Eb(r,!1),n.pipeDefs=Eb(r,!0),n.id=m1(n),n})}function d1(e){return Yo(e)||Ub(e)}function f1(e){return e!==null}function p1(e,t){if(e==null)return qo;let n={};for(let r in e)if(e.hasOwnProperty(r)){let i=e[r],s,o,a,l;Array.isArray(i)?(a=i[0],s=i[1],o=i[2]??s,l=i[3]||null):(s=i,o=i,a=Nd.None,l=null),n[s]=[r,a,l],t[s]=o}return n}function h1(e){if(e==null)return qo;let t={};for(let n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function Vr(e){return Rg(()=>{let t=VS(e);return US(t),t})}function os(e){return{type:e.type,name:e.name,factory:null,pure:e.pure!==!1,standalone:e.standalone??!0,onDestroy:e.type.prototype.ngOnDestroy||null}}function VS(e){let t={};return{type:e.type,providersResolver:null,factory:null,hostBindings:e.hostBindings||null,hostVars:e.hostVars||0,hostAttrs:e.hostAttrs||null,contentQueries:e.contentQueries||null,declaredInputs:t,inputConfig:e.inputs||qo,exportAs:e.exportAs||null,standalone:e.standalone??!0,signals:e.signals===!0,selectors:e.selectors||xi,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:p1(e.inputs,t),outputs:h1(e.outputs),debugInfo:null}}function US(e){e.features?.forEach(t=>t(e))}function Eb(e,t){if(!e)return null;let n=t?Hb:d1;return()=>(typeof e=="function"?e():e).map(r=>n(r)).filter(f1)}function m1(e){let t=0,n=typeof e.consts=="function"?"":e.consts,r=[e.selectors,e.ngContentSelectors,e.hostVars,e.hostAttrs,n,e.vars,e.decls,e.encapsulation,e.standalone,e.signals,e.exportAs,JSON.stringify(e.inputs),JSON.stringify(e.outputs),Object.getOwnPropertyNames(e.type.prototype),!!e.contentQueries,!!e.viewQuery];for(let i of r.join("|"))t=Math.imul(31,t)+i.charCodeAt(0)<<0;return t+=2147483648,"c"+t}function g1(e){return Object.getPrototypeOf(e.prototype).constructor}function ho(e){let t=g1(e.type),n=!0,r=[e];for(;t;){let i;if(Kr(e))i=t.\u0275cmp||t.\u0275dir;else{if(t.\u0275cmp)throw new $e(903,!1);i=t.\u0275dir}if(i){if(n){r.push(i);let o=e;o.inputs=vm(e.inputs),o.declaredInputs=vm(e.declaredInputs),o.outputs=vm(e.outputs);let a=i.hostBindings;a&&w1(e,a);let l=i.viewQuery,c=i.contentQueries;if(l&&_1(e,l),c&&E1(e,c),y1(e,i),jN(e.outputs,i.outputs),Kr(i)&&i.data.animation){let h=e.data;h.animation=(h.animation||[]).concat(i.data.animation)}}let s=i.features;if(s)for(let o=0;o<s.length;o++){let a=s[o];a&&a.ngInherit&&a(e),a===ho&&(n=!1)}}t=Object.getPrototypeOf(t)}v1(r)}function y1(e,t){for(let n in t.inputs){if(!t.inputs.hasOwnProperty(n)||e.inputs.hasOwnProperty(n))continue;let r=t.inputs[n];r!==void 0&&(e.inputs[n]=r,e.declaredInputs[n]=t.declaredInputs[n])}}function v1(e){let t=0,n=null;for(let r=e.length-1;r>=0;r--){let i=e[r];i.hostVars=t+=i.hostVars,i.hostAttrs=ua(i.hostAttrs,n=ua(n,i.hostAttrs))}}function vm(e){return e===qo?{}:e===xi?[]:e}function _1(e,t){let n=e.viewQuery;n?e.viewQuery=(r,i)=>{t(r,i),n(r,i)}:e.viewQuery=t}function E1(e,t){let n=e.contentQueries;n?e.contentQueries=(r,i,s)=>{t(r,i,s),n(r,i,s)}:e.contentQueries=t}function w1(e,t){let n=e.hostBindings;n?e.hostBindings=(r,i)=>{t(r,i),n(r,i)}:e.hostBindings=t}function HS(e,t,n){return e[t]=n}function Li(e,t,n){let r=e[t];return Object.is(r,n)?!1:(e[t]=n,!0)}function b1(e,t,n,r){let i=Li(e,t,n);return Li(e,t+1,r)||i}function C1(e,t,n,r,i,s,o,a,l){let c=t.consts,h=il(t,e,4,o||null,a||null);Ug()&&vy(t,n,h,ao(c,l),dy),h.mergedAttrs=ua(h.mergedAttrs,h.attrs),qg(t,h);let d=h.tView=ay(2,h,r,i,s,t.directiveRegistry,t.pipeRegistry,null,t.schemas,c,null);return t.queries!==null&&(t.queries.template(t,h),d.queries=t.queries.embeddedTView(h)),h}function mg(e,t,n,r,i,s,o,a,l,c){let h=n+Vt,d=t.firstCreatePass?C1(h,t,e,r,i,s,o,a,l):t.data[h];lo(d,!1);let f=S1(t,e,d,n);Cd()&&Pd(t,e,f,d),Yr(f,e);let g=RS(f,e,f,d);return e[h]=g,ly(e,g),XP(g,d,e),Ed(d)&&Ad(t,e,d),l!=null&&uy(e,d,c),d}function xt(e,t,n,r,i,s,o,a){let l=Fe(),c=Zt(),h=ao(c.consts,s);return mg(l,c,e,t,n,r,i,h,o,a),xt}var S1=D1;function D1(e,t,n,r){return Sd(!0),t[sn].createComment("")}var jS=new pe(""),I1=(()=>{class e{static \u0275prov=ne({token:e,providedIn:"root",factory:()=>new gg})}return e})(),gg=class{queuedEffectCount=0;queues=new Map;schedule(e){this.enqueue(e)}remove(e){let t=e.zone,n=this.queues.get(t);n.has(e)&&(n.delete(e),this.queuedEffectCount--)}enqueue(e){let t=e.zone;this.queues.has(t)||this.queues.set(t,new Set);let n=this.queues.get(t);n.has(e)||(this.queuedEffectCount++,n.add(e))}flush(){for(;this.queuedEffectCount>0;)for(let[e,t]of this.queues)e===null?this.flushQueue(t):e.run(()=>this.flushQueue(t))}flushQueue(e){for(let t of e)e.delete(t),this.queuedEffectCount--,t.run()}};function Ey(e){return!!e&&typeof e.then=="function"}function $S(e){return!!e&&typeof e.subscribe=="function"}var T1=new pe(""),WS=(()=>{class e{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((n,r)=>{this.resolve=n,this.reject=r});appInits=O(T1,{optional:!0})??[];injector=O(ht);constructor(){}runInitializers(){if(this.initialized)return;let n=[];for(let i of this.appInits){let s=qb(this.injector,i);if(Ey(s))n.push(s);else if($S(s)){let o=new Promise((a,l)=>{s.subscribe({complete:a,error:l})});n.push(o)}}let r=()=>{this.done=!0,this.resolve()};Promise.all(n).then(()=>{r()}).catch(i=>{this.reject(i)}),n.length===0&&r(),this.initialized=!0}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),x1=new pe("");function R1(){uw(()=>{throw new $e(600,!1)})}function N1(e){return e.isBoundToModule}var A1=10,yr=(()=>{class e{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=O(wM);afterRenderManager=O(zC);zonelessEnabled=O(Id);rootEffectScheduler=O(I1);dirtyFlags=0;tracingSnapshot=null;externalTestViews=new Set;afterTick=new J;get allViews(){return[...this.externalTestViews.keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];isStable=O(Td).hasPendingTasks.pipe(pr(n=>!n));constructor(){O(ga,{optional:!0})}whenStable(){let n;return new Promise(r=>{n=this.isStable.subscribe({next:i=>{i&&r()}})}).finally(()=>{n.unsubscribe()})}_injector=O(Gn);_rendererFactory=null;get injector(){return this._injector}bootstrap(n,r){pt(10);let i=n instanceof dd;if(!this._injector.get(WS).done){let d=!i&&dA(n),f=!1;throw new $e(405,f)}let s;i?s=n:s=this._injector.get(co).resolveComponentFactory(n),this.componentTypes.push(s.componentType);let o=N1(s)?void 0:this._injector.get(ki),a=r||s.selector,l=s.create(ht.NULL,[],a,o),c=l.location.nativeElement,h=l.injector.get(jS,null);return h?.registerApplication(c),l.onDestroy(()=>{this.detachView(l.hostView),zu(this.components,l),h?.unregisterApplication(c)}),this._loadComponent(l),pt(11,l),l}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){pt(12),this.tracingSnapshot!==null?this.tracingSnapshot.run(ny.CHANGE_DETECTION,this.tickImpl):this.tickImpl()}tickImpl=()=>{if(this._runningTick)throw new $e(101,!1);let n=je(null);try{this._runningTick=!0,this.synchronize()}catch(r){this.internalErrorHandler(r)}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,je(n),this.afterTick.next(),pt(13)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(hn,null,{optional:!0}));let n=0;for(;this.dirtyFlags!==0&&n++<A1;)pt(14),this.synchronizeOnce(),pt(15)}synchronizeOnce(){if(this.dirtyFlags&16&&(this.dirtyFlags&=-17,this.rootEffectScheduler.flush()),this.dirtyFlags&7){let n=!!(this.dirtyFlags&1);this.dirtyFlags&=-8,this.dirtyFlags|=8;for(let{_lView:r,notifyErrorHandler:i}of this.allViews)M1(r,i,n,this.zonelessEnabled);if(this.dirtyFlags&=-5,this.syncDirtyFlagsWithViews(),this.dirtyFlags&23)return}else this._rendererFactory?.begin?.(),this._rendererFactory?.end?.();this.dirtyFlags&8&&(this.dirtyFlags&=-9,this.afterRenderManager.execute()),this.syncDirtyFlagsWithViews()}syncDirtyFlagsWithViews(){if(this.allViews.some(({_lView:n})=>bd(n))){this.dirtyFlags|=2;return}else this.dirtyFlags&=-8}attachView(n){let r=n;this._views.push(r),r.attachToAppRef(this)}detachView(n){let r=n;zu(this._views,r),r.detachFromAppRef()}_loadComponent(n){this.attachView(n.hostView),this.tick(),this.components.push(n),this._injector.get(x1,[]).forEach(r=>r(n))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(n=>n()),this._views.slice().forEach(n=>n.destroy())}finally{this._destroyed=!0,this._views=[],this._destroyListeners=[]}}onDestroy(n){return this._destroyListeners.push(n),()=>zu(this._destroyListeners,n)}destroy(){if(this._destroyed)throw new $e(406,!1);let n=this._injector;n.destroy&&!n.destroyed&&n.destroy()}get viewCount(){return this._views.length}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function zu(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function M1(e,t,n,r){!n&&!bd(e)||DS(e,t,n&&!r?0:1)}function va(e,t,n,r){let i=Fe(),s=tl();if(Li(i,s,t)){let o=Zt(),a=zg();UO(a,i,e,t,n,r)}return va}function GS(e,t,n,r){return Li(e,tl(),n)?t+Zc(n)+r:Hi}function Hu(e,t){return e<<17|t<<2}function ts(e){return e>>17&32767}function O1(e){return(e&2)==2}function P1(e,t){return e&131071|t<<17}function yg(e){return e|2}function da(e){return(e&131068)>>2}function _m(e,t){return e&-131069|t<<2}function k1(e){return(e&1)===1}function vg(e){return e|1}function L1(e,t,n,r,i,s){let o=s?t.classBindings:t.styleBindings,a=ts(o),l=da(o);e[r]=n;let c=!1,h;if(Array.isArray(n)){let d=n;h=d[1],(h===null||Xc(d,h)>0)&&(c=!0)}else h=n;if(i)if(l!==0){let d=ts(e[a+1]);e[r+1]=Hu(d,a),d!==0&&(e[d+1]=_m(e[d+1],r)),e[a+1]=P1(e[a+1],r)}else e[r+1]=Hu(a,0),a!==0&&(e[a+1]=_m(e[a+1],r)),a=r;else e[r+1]=Hu(l,0),a===0?a=r:e[l+1]=_m(e[l+1],r),l=r;c&&(e[r+1]=yg(e[r+1])),wb(e,h,r,!0),wb(e,h,r,!1),F1(t,h,e,r,s),o=Hu(a,l),s?t.classBindings=o:t.styleBindings=o}function F1(e,t,n,r,i){let s=i?e.residualClasses:e.residualStyles;s!=null&&typeof t=="string"&&Xc(s,t)>=0&&(n[r+1]=vg(n[r+1]))}function wb(e,t,n,r){let i=e[n+1],s=t===null,o=r?ts(i):da(i),a=!1;for(;o!==0&&(a===!1||s);){let l=e[o],c=e[o+1];B1(l,t)&&(a=!0,e[o+1]=r?vg(c):yg(c)),o=r?ts(c):da(c)}a&&(e[n+1]=r?yg(i):vg(i))}function B1(e,t){return e===null||t==null||(Array.isArray(e)?e[1]:e)===t?!0:Array.isArray(e)&&typeof t=="string"?Xc(e,t)>=0:!1}function Be(e,t,n){let r=Fe(),i=tl();if(Li(r,i,t)){let s=Zt(),o=zg();gS(s,o,r,e,t,r[sn],n,!1)}return Be}function bb(e,t,n,r,i){fy(t,e,n,i?"class":"style",r)}function mo(e,t,n){return zS(e,t,n,!1),mo}function go(e,t){return zS(e,t,null,!0),go}function zS(e,t,n,r){let i=Fe(),s=Zt(),o=HA(2);if(s.firstUpdatePass&&U1(s,e,o,r),t!==Hi&&Li(i,o,t)){let a=s.data[uo()];G1(s,a,i,i[sn],e,i[o+1]=z1(t,n),r,o)}}function V1(e,t){return t>=e.expandoStartIndex}function U1(e,t,n,r){let i=e.data;if(i[n+1]===null){let s=i[uo()],o=V1(e,n);q1(s,r)&&t===null&&!o&&(t=!1),t=H1(i,s,t,r),L1(i,s,t,n,o,r)}}function H1(e,t,n,r){let i=GA(e),s=r?t.residualClasses:t.residualStyles;if(i===null)(r?t.classBindings:t.styleBindings)===0&&(n=Em(null,e,t,n,r),n=Kc(n,t.attrs,r),s=null);else{let o=t.directiveStylingLast;if(o===-1||e[o]!==i)if(n=Em(i,e,t,n,r),s===null){let a=j1(e,t,r);a!==void 0&&Array.isArray(a)&&(a=Em(null,e,t,a[1],r),a=Kc(a,t.attrs,r),$1(e,t,r,a))}else s=W1(e,t,r)}return s!==void 0&&(r?t.residualClasses=s:t.residualStyles=s),n}function j1(e,t,n){let r=n?t.classBindings:t.styleBindings;if(da(r)!==0)return e[ts(r)]}function $1(e,t,n,r){let i=n?t.classBindings:t.styleBindings;e[ts(i)]=r}function W1(e,t,n){let r,i=t.directiveEnd;for(let s=1+t.directiveStylingLast;s<i;s++){let o=e[s].hostAttrs;r=Kc(r,o,n)}return Kc(r,t.attrs,n)}function Em(e,t,n,r,i){let s=null,o=n.directiveEnd,a=n.directiveStylingLast;for(a===-1?a=n.directiveStart:a++;a<o&&(s=t[a],r=Kc(r,s.hostAttrs,i),s!==e);)a++;return e!==null&&(n.directiveStylingLast=a),r}function Kc(e,t,n){let r=n?1:2,i=-1;if(t!==null)for(let s=0;s<t.length;s++){let o=t[s];typeof o=="number"?i=o:i===r&&(Array.isArray(e)||(e=e===void 0?[]:["",e]),lA(e,o,n?!0:t[++s]))}return e===void 0?null:e}function G1(e,t,n,r,i,s,o,a){if(!(t.type&3))return;let l=e.data,c=l[a+1],h=k1(c)?Cb(l,t,n,i,da(c),o):void 0;if(!pd(h)){pd(s)||O1(c)&&(s=Cb(l,null,n,i,a,o));let d=rC(uo(),n);oP(r,o,d,i,s)}}function Cb(e,t,n,r,i,s){let o=t===null,a;for(;i>0;){let l=e[i],c=Array.isArray(l),h=c?l[1]:l,d=h===null,f=n[i+1];f===Hi&&(f=d?xi:void 0);let g=d?lm(f,r):h===r?f:void 0;if(c&&!pd(g)&&(g=lm(l,r)),pd(g)&&(a=g,o))return a;let m=e[i+1];i=o?ts(m):da(m)}if(t!==null){let l=s?t.residualClasses:t.residualStyles;l!=null&&(a=lm(l,r))}return a}function pd(e){return e!==void 0}function z1(e,t){return e==null||e===""||(typeof t=="string"?e=e+t:typeof e=="object"&&(e=mr(Qr(e)))),e}function q1(e,t){return(e.flags&(t?8:16))!==0}var _g=class{destroy(e){}updateValue(e,t){}swap(e,t){let n=Math.min(e,t),r=Math.max(e,t),i=this.detach(r);if(r-n>1){let s=this.detach(n);this.attach(n,i),this.attach(r,s)}else this.attach(n,i)}move(e,t){this.attach(t,this.detach(e))}};function wm(e,t,n,r,i){return e===n&&Object.is(t,r)?1:Object.is(i(e,t),i(n,r))?-1:0}function Y1(e,t,n){let r,i,s=0,o=e.length-1,a;if(Array.isArray(t)){let l=t.length-1;for(;s<=o&&s<=l;){let c=e.at(s),h=t[s],d=wm(s,c,s,h,n);if(d!==0){d<0&&e.updateValue(s,h),s++;continue}let f=e.at(o),g=t[l],m=wm(o,f,l,g,n);if(m!==0){m<0&&e.updateValue(o,g),o--,l--;continue}let b=n(s,c),x=n(o,f),A=n(s,h);if(Object.is(A,x)){let F=n(l,g);Object.is(F,b)?(e.swap(s,o),e.updateValue(o,g),l--,o--):e.move(o,s),e.updateValue(s,h),s++;continue}if(r??=new hd,i??=Db(e,s,o,n),Eg(e,r,s,A))e.updateValue(s,h),s++,o++;else if(i.has(A))r.set(b,e.detach(s)),o--;else{let F=e.create(s,t[s]);e.attach(s,F),s++,o++}}for(;s<=l;)Sb(e,r,n,s,t[s]),s++}else if(t!=null){let l=t[Symbol.iterator](),c=l.next();for(;!c.done&&s<=o;){let h=e.at(s),d=c.value,f=wm(s,h,s,d,n);if(f!==0)f<0&&e.updateValue(s,d),s++,c=l.next();else{r??=new hd,i??=Db(e,s,o,n);let g=n(s,d);if(Eg(e,r,s,g))e.updateValue(s,d),s++,o++,c=l.next();else if(!i.has(g))e.attach(s,e.create(s,d)),s++,o++,c=l.next();else{let m=n(s,h);r.set(m,e.detach(s)),o--}}}for(;!c.done;)Sb(e,r,n,e.length,c.value),c=l.next()}for(;s<=o;)e.destroy(e.detach(o--));r?.forEach(l=>{e.destroy(l)})}function Eg(e,t,n,r){return t!==void 0&&t.has(r)?(e.attach(n,t.get(r)),t.delete(r),!0):!1}function Sb(e,t,n,r,i){if(Eg(e,t,r,n(r,i)))e.updateValue(r,i);else{let s=e.create(r,i);e.attach(r,s)}}function Db(e,t,n,r){let i=new Set;for(let s=t;s<=n;s++)i.add(r(s,e.at(s)));return i}var hd=class{kvMap=new Map;_vMap=void 0;has(e){return this.kvMap.has(e)}delete(e){if(!this.has(e))return!1;let t=this.kvMap.get(e);return this._vMap!==void 0&&this._vMap.has(t)?(this.kvMap.set(e,this._vMap.get(t)),this._vMap.delete(t)):this.kvMap.delete(e),!0}get(e){return this.kvMap.get(e)}set(e,t){if(this.kvMap.has(e)){let n=this.kvMap.get(e);this._vMap===void 0&&(this._vMap=new Map);let r=this._vMap;for(;r.has(n);)n=r.get(n);r.set(n,t)}else this.kvMap.set(e,t)}forEach(e){for(let[t,n]of this.kvMap)if(e(n,t),this._vMap!==void 0){let r=this._vMap;for(;r.has(n);)n=r.get(n),e(n,t)}}};function $t(e,t){fo("NgControlFlow");let n=Fe(),r=tl(),i=n[r]!==Hi?n[r]:-1,s=i!==-1?md(n,Vt+i):void 0,o=0;if(Li(n,r,e)){let a=je(null);try{if(s!==void 0&&AS(s,o),e!==-1){let l=Vt+e,c=md(n,l),h=Sg(n[_e],l),d=qc(c,h.tView.ssrId),f=Md(n,h,t,{dehydratedView:d});Ld(c,f,o,Gc(h,d))}}finally{je(a)}}else if(s!==void 0){let a=NS(s,o);a!==void 0&&(a[jt]=t)}}var wg=class{lContainer;$implicit;$index;constructor(e,t,n){this.lContainer=e,this.$implicit=t,this.$index=n}get $count(){return this.lContainer.length-xn}};function ss(e,t){return t}var bg=class{hasEmptyBlock;trackByFn;liveCollection;constructor(e,t,n){this.hasEmptyBlock=e,this.trackByFn=t,this.liveCollection=n}};function Qt(e,t,n,r,i,s,o,a,l,c,h,d,f){fo("NgControlFlow");let g=Fe(),m=Zt(),b=l!==void 0,x=Fe(),A=a?o.bind(x[Pr][jt]):o,F=new bg(b,A);x[Vt+e]=F,mg(g,m,e+1,t,n,r,i,ao(m.consts,s)),b&&mg(g,m,e+2,l,c,h,d,ao(m.consts,f))}var Cg=class extends _g{lContainer;hostLView;templateTNode;operationsCounter=void 0;needsIndexUpdate=!1;constructor(e,t,n){super(),this.lContainer=e,this.hostLView=t,this.templateTNode=n}get length(){return this.lContainer.length-xn}at(e){return this.getLView(e)[jt].$implicit}attach(e,t){let n=t[Hc];this.needsIndexUpdate||=e!==this.length,Ld(this.lContainer,t,e,Gc(this.templateTNode,n))}detach(e){return this.needsIndexUpdate||=e!==this.length-1,K1(this.lContainer,e)}create(e,t){let n=qc(this.lContainer,this.templateTNode.tView.ssrId),r=Md(this.hostLView,this.templateTNode,new wg(this.lContainer,t,e),{dehydratedView:n});return this.operationsCounter?.recordCreate(),r}destroy(e){Od(e[_e],e),this.operationsCounter?.recordDestroy()}updateValue(e,t){this.getLView(e)[jt].$implicit=t}reset(){this.needsIndexUpdate=!1,this.operationsCounter?.reset()}updateIndexes(){if(this.needsIndexUpdate)for(let e=0;e<this.length;e++)this.getLView(e)[jt].$index=e}getLView(e){return Z1(this.lContainer,e)}};function en(e){let t=je(null),n=uo();try{let r=Fe(),i=r[_e],s=r[n],o=n+1,a=md(r,o);if(s.liveCollection===void 0){let c=Sg(i,o);s.liveCollection=new Cg(a,r,c)}else s.liveCollection.reset();let l=s.liveCollection;if(Y1(l,e,s.trackByFn),l.updateIndexes(),s.hasEmptyBlock){let c=tl(),h=l.length===0;if(Li(r,c,h)){let d=n+2,f=md(r,d);if(h){let g=Sg(i,d),m=qc(f,g.tView.ssrId),b=Md(r,g,void 0,{dehydratedView:m});Ld(f,b,0,Gc(g,m))}else AS(f,0)}}}finally{je(t)}}function md(e,t){return e[t]}function K1(e,t){return zc(e,t)}function Z1(e,t){return NS(e,t)}function Sg(e,t){return Fg(e,t)}function re(e,t,n,r){let i=Fe(),s=Zt(),o=Vt+e,a=i[sn],l=s.firstCreatePass?PS(o,s,i,t,dy,Ug(),n,r):s.data[o],c=X1(s,i,l,a,t,e);i[o]=c;let h=Ed(l);return lo(l,!0),dS(a,c,l),!vS(l)&&Cd()&&Pd(s,i,c,l),(OA()===0||h)&&Yr(c,i),PA(),h&&(Ad(s,i,l),iy(s,l,i)),r!==null&&uy(i,l),re}function ie(){let e=tr();Hg()?lC():(e=e.parent,lo(e,!1));let t=e;FA(t)&&BA(),kA();let n=Zt();return n.firstCreatePass&&kS(n,t),t.classesWithoutHost!=null&&QA(t)&&bb(n,t,Fe(),t.classesWithoutHost,!0),t.stylesWithoutHost!=null&&eM(t)&&bb(n,t,Fe(),t.stylesWithoutHost,!1),ie}function Ne(e,t,n,r){return re(e,t,n,r),ie(),Ne}var X1=(e,t,n,r,i,s)=>(Sd(!0),lS(r,i,KA()));function J1(e,t,n,r,i){let s=t.consts,o=ao(s,r),a=il(t,e,8,"ng-container",o);o!==null&&sg(a,o,!0);let l=ao(s,i);return Ug()&&vy(t,n,a,l,dy),a.mergedAttrs=ua(a.mergedAttrs,a.attrs),t.queries!==null&&t.queries.elementStart(t,a),a}function qS(e,t,n){let r=Fe(),i=Zt(),s=e+Vt,o=i.firstCreatePass?J1(s,i,r,t,n):i.data[s];lo(o,!0);let a=Q1(i,r,o,e);return r[s]=a,Cd()&&Pd(i,r,a,o),Yr(a,r),Ed(o)&&(Ad(i,r,o),iy(i,o,r)),n!=null&&uy(r,o),qS}function YS(){let e=tr(),t=Zt();return Hg()?lC():(e=e.parent,lo(e,!1)),t.firstCreatePass&&(qg(t,e),Lg(e)&&t.queries.elementEnd(e)),YS}function Bd(e,t,n){return qS(e,t,n),YS(),Bd}var Q1=(e,t,n,r)=>(Sd(!0),DO(t[sn],""));function nr(){return Fe()}var gd="en-US",ek=gd;function tk(e){typeof e=="string"&&(ek=e.toLowerCase().replace(/_/g,"-"))}var nk=(e,t,n)=>{};function Rt(e,t,n,r){let i=Fe(),s=Zt(),o=tr();return ik(s,i,i[sn],o,e,t,r),Rt}function rk(e,t,n,r){let i=e.cleanup;if(i!=null)for(let s=0;s<i.length-1;s+=2){let o=i[s];if(o===n&&i[s+1]===r){let a=t[Ju],l=i[s+2];return a.length>l?a[l]:null}typeof o=="string"&&(s+=2)}return null}function ik(e,t,n,r,i,s,o){let a=Ed(r),l=e.firstCreatePass?aC(e):null,c=t[jt],h=sC(t),d=!0;if(r.type&3||o){let f=Xr(r,t),g=o?o(f):f,m=h.length,b=o?A=>o(er(A[r.index])):r.index,x=null;if(!o&&a&&(x=rk(e,t,i,r.index)),x!==null){let A=x.__ngLastListenerFn__||x;A.__ngNextListenerFn__=s,x.__ngLastListenerFn__=s,d=!1}else{s=xb(r,t,c,s),nk(f,i,s);let A=n.listen(g,i,s);h.push(s,A),l&&l.push(i,b,m,m+1)}}else s=xb(r,t,c,s);if(d){let f=r.outputs?.[i],g=r.hostDirectiveOutputs?.[i];if(g&&g.length)for(let m=0;m<g.length;m+=2){let b=g[m],x=g[m+1];Ib(r,e,t,b,x,i,s,h,l)}if(f&&f.length)for(let m of f)Ib(r,e,t,m,i,i,s,h,l)}}function Ib(e,t,n,r,i,s,o,a,l){let c=n[r],h=t.data[r].outputs[i],d=c[h].subscribe(o),f=a.length;a.push(o,d),l&&l.push(s,e.index,f,-(f+1))}function Tb(e,t,n,r){let i=je(null);try{return pt(6,t,n),n(r)!==!1}catch(s){return yS(e,s),!1}finally{pt(7,t,n),je(i)}}function xb(e,t,n,r){return function i(s){if(s===Function)return r;let o=ha(e)?gr(e.index,t):t;yy(o,5);let a=Tb(t,n,r,s),l=i.__ngNextListenerFn__;for(;l;)a=Tb(t,n,l,s)&&a,l=l.__ngNextListenerFn__;return a}}function me(e=1){return qA(e)}function zn(e,t,n){return ji(e,"",t,"",n),zn}function ji(e,t,n,r,i){let s=Fe(),o=GS(s,t,n,r);if(o!==Hi){let a=Zt(),l=zg();gS(a,l,s,e,o,s[sn],i,!1)}return ji}function Ea(e,t,n){o1(e,t,n)}function wa(e){let t=Fe(),n=Zt(),r=fC();$g(r+1);let i=_y(n,r);if(e.dirty&&xA(t)===((i.metadata.flags&2)===2)){if(i.matches===null)e.reset([]);else{let s=c1(t,r);e.reset(s,CM),e.notifyOnChanges()}return!0}return!1}function ba(){return r1(Fe(),fC())}function wy(e,t,n,r){n>=e.data.length&&(e.data[n]=null,e.blueprint[n]=null),t[n]=r}function by(e){let t=uC();return wd(t,Vt+e)}function tn(e,t=""){let n=Fe(),r=Zt(),i=e+Vt,s=r.firstCreatePass?il(r,i,1,t,null):r.data[i],o=ok(r,n,s,t,e);n[i]=o,Cd()&&Pd(r,n,o,s),lo(s,!1)}var ok=(e,t,n,r,i)=>(Sd(!0),CO(t[sn],r));function Ca(e){return as("",e,""),Ca}function as(e,t,n){let r=Fe(),i=GS(r,e,t,n);return i!==Hi&&sk(r,uo(),i),as}function sk(e,t,n){let r=rC(t,e);SO(e[sn],r,n)}var KS={};function $i(e){let t=Zt(),n=Fe(),r=e+Vt,i=il(t,r,128,null,null);return lo(i,!1),wy(t,n,r,KS),$i}function yo(e){fo("NgLet");let t=Zt(),n=Fe(),r=uo();return wy(t,n,r,e),e}function Ur(e){let t=uC(),n=wd(t,Vt+e);if(n===KS)throw new $e(314,!1);return n}function ak(e,t,n){let r=Zt();if(r.firstCreatePass){let i=Kr(e);Dg(n,r.data,r.blueprint,i,!0),Dg(t,r.data,r.blueprint,i,!1)}}function Dg(e,t,n,r,i){if(e=kn(e),Array.isArray(e))for(let s=0;s<e.length;s++)Dg(e[s],t,n,r,i);else{let s=Zt(),o=Fe(),a=tr(),l=ca(e)?e:kn(e.provide),c=zb(e),h=a.providerIndexes&1048575,d=a.directiveStart,f=a.providerIndexes>>20;if(ca(e)||!e.multi){let g=new Qo(c,i,Ot),m=Cm(l,t,i?h:h+f,d);m===-1?(km(od(a,o),s,l),bm(s,e,t.length),t.push(l),a.directiveStart++,a.directiveEnd++,i&&(a.providerIndexes+=1048576),n.push(g),o.push(g)):(n[m]=g,o[m]=g)}else{let g=Cm(l,t,h+f,d),m=Cm(l,t,h,h+f),b=g>=0&&n[g],x=m>=0&&n[m];if(i&&!x||!i&&!b){km(od(a,o),s,l);let A=uk(i?lk:ck,n.length,i,r,c);!i&&x&&(n[m].providerFactory=A),bm(s,e,t.length,0),t.push(l),a.directiveStart++,a.directiveEnd++,i&&(a.providerIndexes+=1048576),n.push(A),o.push(A)}else{let A=ZS(n[i?m:g],c,!i&&r);bm(s,e,g>-1?g:m,A)}!i&&r&&x&&n[m].componentProviders++}}}function bm(e,t,n,r){let i=ca(t),s=gA(t);if(i||s){let o=(s?kn(t.useClass):t).prototype.ngOnDestroy;if(o){let a=e.destroyHooks||(e.destroyHooks=[]);if(!i&&t.multi){let l=a.indexOf(n);l===-1?a.push(n,[r,o]):a[l+1].push(r,o)}else a.push(n,o)}}}function ZS(e,t,n){return n&&e.componentProviders++,e.multi.push(t)-1}function Cm(e,t,n,r){for(let i=n;i<r;i++)if(t[i]===e)return i;return-1}function ck(e,t,n,r){return Ig(this.multi,[])}function lk(e,t,n,r){let i=this.multi,s;if(this.providerFactory){let o=this.providerFactory.componentProviders,a=Wc(n,n[_e],this.providerFactory.index,r);s=a.slice(0,o),Ig(i,s);for(let l=o;l<a.length;l++)s.push(a[l])}else s=[],Ig(i,s);return s}function Ig(e,t){for(let n=0;n<e.length;n++){let r=e[n];t.push(r())}return t}function uk(e,t,n,r,i){let s=new Qo(e,n,Ot);return s.multi=[],s.index=t,s.componentProviders=0,ZS(s,i,r&&!n),s}function Vd(e,t=[]){return n=>{n.providersResolver=(r,i)=>ak(r,i?i(e):e,t)}}function XS(e,t,n,r){return QS(Fe(),jg(),e,t,n,r)}function JS(e,t){let n=e[t];return n===Hi?void 0:n}function QS(e,t,n,r,i,s){let o=t+n;return Li(e,o,i)?HS(e,o+1,s?r.call(s,i):r(i)):JS(e,o+1)}function dk(e,t,n,r,i,s,o){let a=t+n;return b1(e,a,i,s)?HS(e,a+2,o?r.call(o,i,s):r(i,s)):JS(e,a+2)}function Sn(e,t){let n=Zt(),r,i=e+Vt;n.firstCreatePass?(r=fk(t,n.pipeRegistry),n.data[i]=r,r.onDestroy&&(n.destroyHooks??=[]).push(i,r.onDestroy)):r=n.data[i];let s=r.factory||(r.factory=zo(r.type,!0)),o,a=Wn(Ot);try{let l=id(!1),c=s();return id(l),wy(n,Fe(),i,c),c}finally{Wn(a)}}function fk(e,t){if(t)for(let n=t.length-1;n>=0;n--){let r=t[n];if(e===r.name)return r}}function Nn(e,t,n){let r=e+Vt,i=Fe(),s=wd(i,r);return tD(i,r)?QS(i,jg(),t,s.transform,n,s):s.transform(n)}function eD(e,t,n,r){let i=e+Vt,s=Fe(),o=wd(s,i);return tD(s,i)?dk(s,jg(),t,o.transform,n,r,o):o.transform(n,r)}function tD(e,t){return e[_e].data[t].pure}function nD(e,t){return Fd(e,t)}var fa=class{full;major;minor;patch;constructor(e){this.full=e;let t=e.split(".");this.major=t[0],this.minor=t[1],this.patch=t.slice(2).join(".")}},Cy=new fa("19.2.0"),pk=(()=>{class e{zone=O(Le);changeDetectionScheduler=O(Ai);applicationRef=O(yr);_onMicrotaskEmptySubscription;initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.changeDetectionScheduler.runningTick||this.zone.run(()=>{this.applicationRef.tick()})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function hk({ngZoneFactory:e,ignoreChangesOutsideZone:t,scheduleInRootZone:n}){return e??=()=>new Le(te(w({},mk()),{scheduleInRootZone:n})),[{provide:Le,useFactory:e},{provide:Vc,multi:!0,useFactory:()=>{let r=O(pk,{optional:!0});return()=>r.initialize()}},{provide:Vc,multi:!0,useFactory:()=>{let r=O(gk);return()=>{r.initialize()}}},t===!0?{provide:NC,useValue:!0}:[],{provide:Zg,useValue:n??RC}]}function mk(e){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:e?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:e?.runCoalescing??!1}}var gk=(()=>{class e{subscription=new ot;initialized=!1;zone=O(Le);pendingTasks=O(Td);initialize(){if(this.initialized)return;this.initialized=!0;let n=null;!this.zone.isStable&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(n=this.pendingTasks.add()),this.zone.runOutsideAngular(()=>{this.subscription.add(this.zone.onStable.subscribe(()=>{Le.assertNotInAngularZone(),queueMicrotask(()=>{n!==null&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(n),n=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{Le.assertInAngularZone(),n??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),rD=(()=>{class e{appRef=O(yr);taskService=O(Td);ngZone=O(Le);zonelessEnabled=O(Id);tracing=O(ga,{optional:!0});disableScheduling=O(NC,{optional:!0})??!1;zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new ot;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(ad):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(O(Zg,{optional:!0})??!1);cancelScheduledCallback=null;useMicrotaskScheduler=!1;runningTick=!1;pendingRenderTaskId=null;constructor(){this.subscriptions.add(this.appRef.afterTick.subscribe(()=>{this.runningTick||this.cleanup()})),this.subscriptions.add(this.ngZone.onUnstable.subscribe(()=>{this.runningTick||this.cleanup()})),this.disableScheduling||=!this.zonelessEnabled&&(this.ngZone instanceof cd||!this.zoneIsDefined)}notify(n){if(!this.zonelessEnabled&&n===5)return;let r=!1;switch(n){case 0:{this.appRef.dirtyFlags|=2;break}case 3:case 2:case 4:case 5:case 1:{this.appRef.dirtyFlags|=4;break}case 6:{this.appRef.dirtyFlags|=2,r=!0;break}case 12:{this.appRef.dirtyFlags|=16,r=!0;break}case 13:{this.appRef.dirtyFlags|=2,r=!0;break}case 11:{r=!0;break}case 9:case 8:case 7:case 10:default:this.appRef.dirtyFlags|=8}if(this.appRef.tracingSnapshot=this.tracing?.snapshot(this.appRef.tracingSnapshot)??null,!this.shouldScheduleTick(r))return;let i=this.useMicrotaskScheduler?nb:AC;this.pendingRenderTaskId=this.taskService.add(),this.scheduleInRootZone?this.cancelScheduledCallback=Zone.root.run(()=>i(()=>this.tick())):this.cancelScheduledCallback=this.ngZone.runOutsideAngular(()=>i(()=>this.tick()))}shouldScheduleTick(n){return!(this.disableScheduling&&!n||this.appRef.destroyed||this.pendingRenderTaskId!==null||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Zone.current.get(ad+this.angularZoneId))}tick(){if(this.runningTick||this.appRef.destroyed)return;if(this.appRef.dirtyFlags===0){this.cleanup();return}!this.zonelessEnabled&&this.appRef.dirtyFlags&7&&(this.appRef.dirtyFlags|=1);let n=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick()},void 0,this.schedulerTickApplyArgs)}catch(r){throw this.taskService.remove(n),r}finally{this.cleanup()}this.useMicrotaskScheduler=!0,nb(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(n)})}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,this.pendingRenderTaskId!==null){let n=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(n)}}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function iD(){return fo("NgZoneless"),jb([{provide:Ai,useExisting:rD},{provide:Le,useClass:cd},{provide:Id,useValue:!0},{provide:Zg,useValue:!1},[]])}function yk(){return typeof $localize<"u"&&$localize.locale||gd}var Sy=new pe("",{providedIn:"root",factory:()=>O(Sy,Ke.Optional|Ke.SkipSelf)||yk()}),Tg=new pe(""),vk=new pe("");function Pc(e){return!e.moduleRef}function _k(e){let t=Pc(e)?e.r3Injector:e.moduleRef.injector,n=t.get(Le);return n.run(()=>{Pc(e)?e.r3Injector.resolveInjectorInitializers():e.moduleRef.resolveInjectorInitializers();let r=t.get(Mi,null),i;if(n.runOutsideAngular(()=>{i=n.onError.subscribe({next:s=>{r.handleError(s)}})}),Pc(e)){let s=()=>t.destroy(),o=e.platformInjector.get(Tg);o.add(s),t.onDestroy(()=>{i.unsubscribe(),o.delete(s)})}else{let s=()=>e.moduleRef.destroy(),o=e.platformInjector.get(Tg);o.add(s),e.moduleRef.onDestroy(()=>{zu(e.allPlatformModules,e.moduleRef),i.unsubscribe(),o.delete(s)})}return wk(r,n,()=>{let s=t.get(WS);return s.runInitializers(),s.donePromise.then(()=>{let o=t.get(Sy,gd);if(tk(o||gd),!t.get(vk,!0))return Pc(e)?t.get(yr):(e.allPlatformModules.push(e.moduleRef),e.moduleRef);if(Pc(e)){let a=t.get(yr);return e.rootComponent!==void 0&&a.bootstrap(e.rootComponent),a}else return Ek(e.moduleRef,e.allPlatformModules),e.moduleRef})})})}function Ek(e,t){let n=e.injector.get(yr);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>n.bootstrap(r));else if(e.instance.ngDoBootstrap)e.instance.ngDoBootstrap(n);else throw new $e(-403,!1);t.push(e)}function wk(e,t,n){try{let r=n();return Ey(r)?r.catch(i=>{throw t.runOutsideAngular(()=>e.handleError(i)),i}):r}catch(r){throw t.runOutsideAngular(()=>e.handleError(r)),r}}var qu=null;function bk(e=[],t){return ht.create({name:t,providers:[{provide:vd,useValue:"platform"},{provide:Tg,useValue:new Set([()=>qu=null])},...e]})}function Ck(e=[]){if(qu)return qu;let t=bk(e);return qu=t,R1(),Sk(t),t}function Sk(e){let t=e.get(ey,null);qb(e,()=>{t?.forEach(n=>n())})}var rr=(()=>{class e{static __NG_ELEMENT_ID__=Dk}return e})();function Dk(e){return Ik(tr(),Fe(),(e&16)===16)}function Ik(e,t,n){if(ha(e)&&!n){let r=gr(e.index,t);return new es(r,r)}else if(e.type&175){let r=t[Pr];return new es(r,t)}return null}function oD(e){pt(8);try{let{rootComponent:t,appProviders:n,platformProviders:r}=e,i=Ck(r),s=[hk({}),{provide:Ai,useExisting:rD},...n||[]],o=new fd({providers:s,parent:i,debugName:"",runEnvironmentInitializers:!1});return _k({r3Injector:o.injector,platformInjector:i,rootComponent:t})}catch(t){return Promise.reject(t)}finally{pt(9)}}function Sa(e){return typeof e=="boolean"?e:e!=null&&e!=="false"}function Dy(e,t=NaN){return!isNaN(parseFloat(e))&&!isNaN(Number(e))?Number(e):t}function Iy(e){let t=je(null);try{return e()}finally{je(t)}}var Rb=class{[bi];constructor(e){this[bi]=e}destroy(){this[bi].destroy()}};function Ud(e,t){let n=Yo(e),r=t.elementInjector||_d();return new Yc(n).create(r,t.projectableNodes,t.hostElement,t.environmentInjector)}var Tk={schedule(e,t){let n=setTimeout(e,t);return()=>clearTimeout(n)}};function xk(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function Rk(e){return!!e&&e.nodeType===Node.ELEMENT_NODE}var Ty;function Nk(e,t){if(!Ty){let n=Element.prototype;Ty=n.matches||n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector}return e.nodeType===Node.ELEMENT_NODE?Ty.call(e,t):!1}function Ak(e){let t={};return e.forEach(({propName:n,templateName:r,transform:i})=>{t[xk(r)]=[n,i]}),t}function Mk(e,t){return t.get(co).resolveComponentFactory(e).inputs}function Ok(e,t){let n=e.childNodes,r=t.map(()=>[]),i=-1;t.some((s,o)=>s==="*"?(i=o,!0):!1);for(let s=0,o=n.length;s<o;++s){let a=n[s],l=Pk(a,t,i);l!==-1&&r[l].push(a)}return r}function Pk(e,t,n){let r=n;return Rk(e)&&t.some((i,s)=>i!=="*"&&Nk(e,i)?(r=s,!0):!1),r}var kk=10,xy=class{componentFactory;inputMap=new Map;constructor(e,t){this.componentFactory=t.get(co).resolveComponentFactory(e);for(let n of this.componentFactory.inputs)this.inputMap.set(n.propName,n.templateName)}create(e){return new Ry(this.componentFactory,e,this.inputMap)}},Ry=class{componentFactory;injector;inputMap;eventEmitters=new Bo(1);events=this.eventEmitters.pipe(ea(e=>io(...e)));componentRef=null;scheduledDestroyFn=null;initialInputValues=new Map;ngZone;elementZone;appRef;cdScheduler;constructor(e,t,n){this.componentFactory=e,this.injector=t,this.inputMap=n,this.ngZone=this.injector.get(Le),this.appRef=this.injector.get(yr),this.cdScheduler=t.get(Ai),this.elementZone=typeof Zone>"u"?null:this.ngZone.run(()=>Zone.current)}connect(e){this.runInZone(()=>{if(this.scheduledDestroyFn!==null){this.scheduledDestroyFn(),this.scheduledDestroyFn=null;return}this.componentRef===null&&this.initializeComponent(e)})}disconnect(){this.runInZone(()=>{this.componentRef===null||this.scheduledDestroyFn!==null||(this.scheduledDestroyFn=Tk.schedule(()=>{this.componentRef!==null&&(this.componentRef.destroy(),this.componentRef=null)},kk))})}getInputValue(e){return this.runInZone(()=>this.componentRef===null?this.initialInputValues.get(e):this.componentRef.instance[e])}setInputValue(e,t){if(this.componentRef===null){this.initialInputValues.set(e,t);return}this.runInZone(()=>{this.componentRef.setInput(this.inputMap.get(e)??e,t),this.componentRef.hostView.dirty&&(this.componentRef.changeDetectorRef.markForRefresh(),this.cdScheduler.notify(6))})}initializeComponent(e){let t=ht.create({providers:[],parent:this.injector}),n=Ok(e,this.componentFactory.ngContentSelectors);this.componentRef=this.componentFactory.create(t,n,e),this.initializeInputs(),this.initializeOutputs(this.componentRef),this.appRef.attachView(this.componentRef.hostView),this.componentRef.hostView.detectChanges()}initializeInputs(){for(let[e,t]of this.initialInputValues)this.setInputValue(e,t);this.initialInputValues.clear()}initializeOutputs(e){let t=this.componentFactory.outputs.map(({propName:n,templateName:r})=>{let i=e.instance[n];return new nt(s=>{let o=i.subscribe(a=>s.next({name:r,value:a}));return()=>o.unsubscribe()})});this.eventEmitters.next(t)}runInZone(e){return this.elementZone&&Zone.current!==this.elementZone?this.ngZone.run(e):e()}},Ny=class extends HTMLElement{ngElementEventsSubscription=null};function sD(e,t){let n=Mk(e,t.injector),r=t.strategyFactory||new xy(e,t.injector),i=Ak(n);class s extends Ny{injector;static observedAttributes=Object.keys(i);get ngElementStrategy(){if(!this._ngElementStrategy){let a=this._ngElementStrategy=r.create(this.injector||t.injector);n.forEach(({propName:l,transform:c})=>{if(!this.hasOwnProperty(l))return;let h=this[l];delete this[l],a.setInputValue(l,h,c)})}return this._ngElementStrategy}_ngElementStrategy;constructor(a){super(),this.injector=a}attributeChangedCallback(a,l,c,h){let[d,f]=i[a];this.ngElementStrategy.setInputValue(d,c,f)}connectedCallback(){let a=!1;this.ngElementStrategy.events&&(this.subscribeToEvents(),a=!0),this.ngElementStrategy.connect(this),a||this.subscribeToEvents()}disconnectedCallback(){this._ngElementStrategy&&this._ngElementStrategy.disconnect(),this.ngElementEventsSubscription&&(this.ngElementEventsSubscription.unsubscribe(),this.ngElementEventsSubscription=null)}subscribeToEvents(){this.ngElementEventsSubscription=this.ngElementStrategy.events.subscribe(a=>{let l=new CustomEvent(a.name,{detail:a.value});this.dispatchEvent(l)})}}return n.forEach(({propName:o,transform:a})=>{Object.defineProperty(s.prototype,o,{get(){return this.ngElementStrategy.getInputValue(o)},set(l){this.ngElementStrategy.setInputValue(o,l,a)},configurable:!0,enumerable:!0})}),s}var uD=null;function Da(){return uD}function dD(e){uD??=e}var Hd=class{},Qe=new pe(""),fD=(()=>{class e{historyGo(n){throw new Error("")}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:()=>O(Fk),providedIn:"platform"})}return e})(),Fk=(()=>{class e extends fD{_location;_history;_doc=O(Qe);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Da().getBaseHref(this._doc)}onPopState(n){let r=Da().getGlobalEventTarget(this._doc,"window");return r.addEventListener("popstate",n,!1),()=>r.removeEventListener("popstate",n)}onHashChange(n){let r=Da().getGlobalEventTarget(this._doc,"window");return r.addEventListener("hashchange",n,!1),()=>r.removeEventListener("hashchange",n)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(n){this._location.pathname=n}pushState(n,r,i){this._history.pushState(n,r,i)}replaceState(n,r,i){this._history.replaceState(n,r,i)}forward(){this._history.forward()}back(){this._history.back()}historyGo(n=0){this._history.go(n)}getState(){return this._history.state}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:()=>new e,providedIn:"platform"})}return e})();function pD(e,t){return e?t?e.endsWith("/")?t.startsWith("/")?e+t.slice(1):e+t:t.startsWith("/")?e+t:`${e}/${t}`:e:t}function aD(e){let t=e.search(/#|\?|$/);return e[t-1]==="/"?e.slice(0,t-1)+e.slice(t):e}function cs(e){return e&&e[0]!=="?"?`?${e}`:e}var My=(()=>{class e{historyGo(n){throw new Error("")}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:()=>O(Vk),providedIn:"root"})}return e})(),Bk=new pe(""),Vk=(()=>{class e extends My{_platformLocation;_baseHref;_removeListenerFns=[];constructor(n,r){super(),this._platformLocation=n,this._baseHref=r??this._platformLocation.getBaseHrefFromDOM()??O(Qe).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(n){this._removeListenerFns.push(this._platformLocation.onPopState(n),this._platformLocation.onHashChange(n))}getBaseHref(){return this._baseHref}prepareExternalUrl(n){return pD(this._baseHref,n)}path(n=!1){let r=this._platformLocation.pathname+cs(this._platformLocation.search),i=this._platformLocation.hash;return i&&n?`${r}${i}`:r}pushState(n,r,i,s){let o=this.prepareExternalUrl(i+cs(s));this._platformLocation.pushState(n,r,o)}replaceState(n,r,i,s){let o=this.prepareExternalUrl(i+cs(s));this._platformLocation.replaceState(n,r,o)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(n=0){this._platformLocation.historyGo?.(n)}static \u0275fac=function(n){return new(n||e)(Ze(fD),Ze(Bk,8))};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Oy=(()=>{class e{_subject=new J;_basePath;_locationStrategy;_urlChangeListeners=[];_urlChangeSubscription=null;constructor(n){this._locationStrategy=n;let r=this._locationStrategy.getBaseHref();this._basePath=jk(aD(cD(r))),this._locationStrategy.onPopState(i=>{this._subject.next({url:this.path(!0),pop:!0,state:i.state,type:i.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(n=!1){return this.normalize(this._locationStrategy.path(n))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(n,r=""){return this.path()==this.normalize(n+cs(r))}normalize(n){return e.stripTrailingSlash(Hk(this._basePath,cD(n)))}prepareExternalUrl(n){return n&&n[0]!=="/"&&(n="/"+n),this._locationStrategy.prepareExternalUrl(n)}go(n,r="",i=null){this._locationStrategy.pushState(i,"",n,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+cs(r)),i)}replaceState(n,r="",i=null){this._locationStrategy.replaceState(i,"",n,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+cs(r)),i)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(n=0){this._locationStrategy.historyGo?.(n)}onUrlChange(n){return this._urlChangeListeners.push(n),this._urlChangeSubscription??=this.subscribe(r=>{this._notifyUrlChangeListeners(r.url,r.state)}),()=>{let r=this._urlChangeListeners.indexOf(n);this._urlChangeListeners.splice(r,1),this._urlChangeListeners.length===0&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(n="",r){this._urlChangeListeners.forEach(i=>i(n,r))}subscribe(n,r,i){return this._subject.subscribe({next:n,error:r??void 0,complete:i??void 0})}static normalizeQueryParams=cs;static joinWithSlash=pD;static stripTrailingSlash=aD;static \u0275fac=function(n){return new(n||e)(Ze(My))};static \u0275prov=ne({token:e,factory:()=>Uk(),providedIn:"root"})}return e})();function Uk(){return new Oy(Ze(My))}function Hk(e,t){if(!e||!t.startsWith(e))return t;let n=t.substring(e.length);return n===""||["/",";","?","#"].includes(n[0])?n:t}function cD(e){return e.replace(/\/index.html$/,"")}function jk(e){if(new RegExp("^(https?:)?//").test(e)){let[,t]=e.split(/\/\/[^\/]+/);return t}return e}function hD(e,t){t=encodeURIComponent(t);for(let n of e.split(";")){let r=n.indexOf("="),[i,s]=r==-1?[n,""]:[n.slice(0,r),n.slice(r+1)];if(i.trim()===t)return decodeURIComponent(s)}return null}var Ay=/\s+/,lD=[],mD=(()=>{class e{_ngEl;_renderer;initialClasses=lD;rawClass;stateMap=new Map;constructor(n,r){this._ngEl=n,this._renderer=r}set klass(n){this.initialClasses=n!=null?n.trim().split(Ay):lD}set ngClass(n){this.rawClass=typeof n=="string"?n.trim().split(Ay):n}ngDoCheck(){for(let r of this.initialClasses)this._updateState(r,!0);let n=this.rawClass;if(Array.isArray(n)||n instanceof Set)for(let r of n)this._updateState(r,!0);else if(n!=null)for(let r of Object.keys(n))this._updateState(r,!!n[r]);this._applyStateDiff()}_updateState(n,r){let i=this.stateMap.get(n);i!==void 0?(i.enabled!==r&&(i.changed=!0,i.enabled=r),i.touched=!0):this.stateMap.set(n,{enabled:r,changed:!0,touched:!0})}_applyStateDiff(){for(let n of this.stateMap){let r=n[0],i=n[1];i.changed?(this._toggleClass(r,i.enabled),i.changed=!1):i.touched||(i.enabled&&this._toggleClass(r,!1),this.stateMap.delete(r)),i.touched=!1}}_toggleClass(n,r){n=n.trim(),n.length>0&&n.split(Ay).forEach(i=>{r?this._renderer.addClass(this._ngEl.nativeElement,i):this._renderer.removeClass(this._ngEl.nativeElement,i)})}static \u0275fac=function(n){return new(n||e)(Ot(Ct),Ot(ya))};static \u0275dir=Vr({type:e,selectors:[["","ngClass",""]],inputs:{klass:[0,"class","klass"],ngClass:"ngClass"}})}return e})(),gD=(()=>{class e{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;constructor(n){this._viewContainerRef=n}ngOnChanges(n){if(this._shouldRecreateView(n)){let r=this._viewContainerRef;if(this._viewRef&&r.remove(r.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let i=this._createContextForwardProxy();this._viewRef=r.createEmbeddedView(this.ngTemplateOutlet,i,{injector:this.ngTemplateOutletInjector??void 0})}}_shouldRecreateView(n){return!!n.ngTemplateOutlet||!!n.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(n,r,i)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,r,i):!1,get:(n,r,i)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,r,i)}})}static \u0275fac=function(n){return new(n||e)(Ot(Br))};static \u0275dir=Vr({type:e,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},features:[ns]})}return e})(),Py="browser",$k="server";function yD(e){return e===Py}function ky(e){return e===$k}var jd=class{},Fy=class extends Hd{supportsDOMEvents=!0},By=class lI extends Fy{static makeCurrent(){dD(new lI)}onAndCancel(t,n,r,i){return t.addEventListener(n,r,i),()=>{t.removeEventListener(n,r,i)}}dispatchEvent(t,n){t.dispatchEvent(n)}remove(t){t.remove()}createElement(t,n){return n=n||this.getDefaultDocument(),n.createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,n){return n==="window"?window:n==="document"?t:n==="body"?t.body:null}getBaseHref(t){let n=Gk();return n==null?null:zk(n)}resetBaseElement(){ol=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return hD(document.cookie,t)}},ol=null;function Gk(){return ol=ol||document.querySelector("base"),ol?ol.getAttribute("href"):null}function zk(e){return new URL(e,document.baseURI).pathname}var qk=(()=>{class e{build(){return new XMLHttpRequest}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:e.\u0275fac})}return e})(),Vy=new pe(""),CD=(()=>{class e{_zone;_plugins;_eventNameToPlugin=new Map;constructor(n,r){this._zone=r,n.forEach(i=>{i.manager=this}),this._plugins=n.slice().reverse()}addEventListener(n,r,i,s){return this._findPluginFor(r).addEventListener(n,r,i,s)}getZone(){return this._zone}_findPluginFor(n){let r=this._eventNameToPlugin.get(n);if(r)return r;if(r=this._plugins.find(i=>i.supports(n)),!r)throw new $e(5101,!1);return this._eventNameToPlugin.set(n,r),r}static \u0275fac=function(n){return new(n||e)(Ze(Vy),Ze(Le))};static \u0275prov=ne({token:e,factory:e.\u0275fac})}return e})(),Wd=class{_doc;constructor(e){this._doc=e}manager},$d="ng-app-id";function vD(e){for(let t of e)t.remove()}function _D(e,t){let n=t.createElement("style");return n.textContent=e,n}function Yk(e,t,n,r){let i=e.head?.querySelectorAll(`style[${$d}="${t}"],link[${$d}="${t}"]`);if(i)for(let s of i)s.removeAttribute($d),s instanceof HTMLLinkElement?r.set(s.href.slice(s.href.lastIndexOf("/")+1),{usage:0,elements:[s]}):s.textContent&&n.set(s.textContent,{usage:0,elements:[s]})}function Uy(e,t){let n=t.createElement("link");return n.setAttribute("rel","stylesheet"),n.setAttribute("href",e),n}var SD=(()=>{class e{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;isServer;constructor(n,r,i,s={}){this.doc=n,this.appId=r,this.nonce=i,this.isServer=ky(s),Yk(n,r,this.inline,this.external),this.hosts.add(n.head)}addStyles(n,r){for(let i of n)this.addUsage(i,this.inline,_D);r?.forEach(i=>this.addUsage(i,this.external,Uy))}removeStyles(n,r){for(let i of n)this.removeUsage(i,this.inline);r?.forEach(i=>this.removeUsage(i,this.external))}addUsage(n,r,i){let s=r.get(n);s?s.usage++:r.set(n,{usage:1,elements:[...this.hosts].map(o=>this.addElement(o,i(n,this.doc)))})}removeUsage(n,r){let i=r.get(n);i&&(i.usage--,i.usage<=0&&(vD(i.elements),r.delete(n)))}ngOnDestroy(){for(let[,{elements:n}]of[...this.inline,...this.external])vD(n);this.hosts.clear()}addHost(n){this.hosts.add(n);for(let[r,{elements:i}]of this.inline)i.push(this.addElement(n,_D(r,this.doc)));for(let[r,{elements:i}]of this.external)i.push(this.addElement(n,Uy(r,this.doc)))}removeHost(n){this.hosts.delete(n)}addElement(n,r){return this.nonce&&r.setAttribute("nonce",this.nonce),this.isServer&&r.setAttribute($d,this.appId),n.appendChild(r)}static \u0275fac=function(n){return new(n||e)(Ze(Qe),Ze(nl),Ze(ty,8),Ze(is))};static \u0275prov=ne({token:e,factory:e.\u0275fac})}return e})(),Ly={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},jy=/%COMP%/g,DD="%COMP%",Kk=`_nghost-${DD}`,Zk=`_ngcontent-${DD}`,Xk=!0,Jk=new pe("",{providedIn:"root",factory:()=>Xk});function Qk(e){return Zk.replace(jy,e)}function eL(e){return Kk.replace(jy,e)}function ID(e,t){return t.map(n=>n.replace(jy,e))}var ED=(()=>{class e{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;platformId;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;platformIsServer;constructor(n,r,i,s,o,a,l,c=null,h=null){this.eventManager=n,this.sharedStylesHost=r,this.appId=i,this.removeStylesOnCompDestroy=s,this.doc=o,this.platformId=a,this.ngZone=l,this.nonce=c,this.tracingService=h,this.platformIsServer=ky(a),this.defaultRenderer=new sl(n,o,l,this.platformIsServer,this.tracingService)}createRenderer(n,r){if(!n||!r)return this.defaultRenderer;this.platformIsServer&&r.encapsulation===Zr.ShadowDom&&(r=te(w({},r),{encapsulation:Zr.Emulated}));let i=this.getOrCreateRenderer(n,r);return i instanceof Gd?i.applyToHost(n):i instanceof al&&i.applyStyles(),i}getOrCreateRenderer(n,r){let i=this.rendererByCompId,s=i.get(r.id);if(!s){let o=this.doc,a=this.ngZone,l=this.eventManager,c=this.sharedStylesHost,h=this.removeStylesOnCompDestroy,d=this.platformIsServer,f=this.tracingService;switch(r.encapsulation){case Zr.Emulated:s=new Gd(l,c,r,this.appId,h,o,a,d,f);break;case Zr.ShadowDom:return new Hy(l,c,n,r,o,a,this.nonce,d,f);default:s=new al(l,c,r,h,o,a,d,f);break}i.set(r.id,s)}return s}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(n){this.rendererByCompId.delete(n)}static \u0275fac=function(n){return new(n||e)(Ze(CD),Ze(SD),Ze(nl),Ze(Jk),Ze(Qe),Ze(is),Ze(Le),Ze(ty),Ze(ga,8))};static \u0275prov=ne({token:e,factory:e.\u0275fac})}return e})(),sl=class{eventManager;doc;ngZone;platformIsServer;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(e,t,n,r,i){this.eventManager=e,this.doc=t,this.ngZone=n,this.platformIsServer=r,this.tracingService=i}destroy(){}destroyNode=null;createElement(e,t){return t?this.doc.createElementNS(Ly[t]||t,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,t){(wD(e)?e.content:e).appendChild(t)}insertBefore(e,t,n){e&&(wD(e)?e.content:e).insertBefore(t,n)}removeChild(e,t){t.remove()}selectRootElement(e,t){let n=typeof e=="string"?this.doc.querySelector(e):e;if(!n)throw new $e(-5104,!1);return t||(n.textContent=""),n}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,t,n,r){if(r){t=r+":"+t;let i=Ly[r];i?e.setAttributeNS(i,t,n):e.setAttribute(t,n)}else e.setAttribute(t,n)}removeAttribute(e,t,n){if(n){let r=Ly[n];r?e.removeAttributeNS(r,t):e.removeAttribute(`${n}:${t}`)}else e.removeAttribute(t)}addClass(e,t){e.classList.add(t)}removeClass(e,t){e.classList.remove(t)}setStyle(e,t,n,r){r&(Pi.DashCase|Pi.Important)?e.style.setProperty(t,n,r&Pi.Important?"important":""):e.style[t]=n}removeStyle(e,t,n){n&Pi.DashCase?e.style.removeProperty(t):e.style[t]=""}setProperty(e,t,n){e!=null&&(e[t]=n)}setValue(e,t){e.nodeValue=t}listen(e,t,n,r){if(typeof e=="string"&&(e=Da().getGlobalEventTarget(this.doc,e),!e))throw new Error(`Unsupported event target ${e} for event ${t}`);let i=this.decoratePreventDefault(n);return this.tracingService!==null&&this.tracingService.wrapEventListener&&(i=this.tracingService.wrapEventListener(e,t,i)),this.eventManager.addEventListener(e,t,i,r)}decoratePreventDefault(e){return t=>{if(t==="__ngUnwrap__")return e;(this.platformIsServer?this.ngZone.runGuarded(()=>e(t)):e(t))===!1&&t.preventDefault()}}};function wD(e){return e.tagName==="TEMPLATE"&&e.content!==void 0}var Hy=class extends sl{sharedStylesHost;hostEl;shadowRoot;constructor(e,t,n,r,i,s,o,a,l){super(e,i,s,a,l),this.sharedStylesHost=t,this.hostEl=n,this.shadowRoot=n.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let c=r.styles;c=ID(r.id,c);for(let d of c){let f=document.createElement("style");o&&f.setAttribute("nonce",o),f.textContent=d,this.shadowRoot.appendChild(f)}let h=r.getExternalStyles?.();if(h)for(let d of h){let f=Uy(d,i);o&&f.setAttribute("nonce",o),this.shadowRoot.appendChild(f)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}appendChild(e,t){return super.appendChild(this.nodeOrShadowRoot(e),t)}insertBefore(e,t,n){return super.insertBefore(this.nodeOrShadowRoot(e),t,n)}removeChild(e,t){return super.removeChild(null,t)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},al=class extends sl{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(e,t,n,r,i,s,o,a,l){super(e,i,s,o,a),this.sharedStylesHost=t,this.removeStylesOnCompDestroy=r;let c=n.styles;this.styles=l?ID(l,c):c,this.styleUrls=n.getExternalStyles?.(l)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},Gd=class extends al{contentAttr;hostAttr;constructor(e,t,n,r,i,s,o,a,l){let c=r+"-"+n.id;super(e,t,n,i,s,o,a,l,c),this.contentAttr=Qk(c),this.hostAttr=eL(c)}applyToHost(e){this.applyStyles(),this.setAttribute(e,this.hostAttr,"")}createElement(e,t){let n=super.createElement(e,t);return super.setAttribute(n,this.contentAttr,""),n}},tL=(()=>{class e extends Wd{constructor(n){super(n)}supports(n){return!0}addEventListener(n,r,i,s){return n.addEventListener(r,i,s),()=>this.removeEventListener(n,r,i,s)}removeEventListener(n,r,i,s){return n.removeEventListener(r,i,s)}static \u0275fac=function(n){return new(n||e)(Ze(Qe))};static \u0275prov=ne({token:e,factory:e.\u0275fac})}return e})(),bD=["alt","control","meta","shift"],nL={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},rL={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey},iL=(()=>{class e extends Wd{constructor(n){super(n)}supports(n){return e.parseEventName(n)!=null}addEventListener(n,r,i,s){let o=e.parseEventName(r),a=e.eventCallback(o.fullKey,i,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Da().onAndCancel(n,o.domEventName,a,s))}static parseEventName(n){let r=n.toLowerCase().split("."),i=r.shift();if(r.length===0||!(i==="keydown"||i==="keyup"))return null;let s=e._normalizeKey(r.pop()),o="",a=r.indexOf("code");if(a>-1&&(r.splice(a,1),o="code."),bD.forEach(c=>{let h=r.indexOf(c);h>-1&&(r.splice(h,1),o+=c+".")}),o+=s,r.length!=0||s.length===0)return null;let l={};return l.domEventName=i,l.fullKey=o,l}static matchEventFullKeyCode(n,r){let i=nL[n.key]||n.key,s="";return r.indexOf("code.")>-1&&(i=n.code,s="code."),i==null||!i?!1:(i=i.toLowerCase(),i===" "?i="space":i==="."&&(i="dot"),bD.forEach(o=>{if(o!==i){let a=rL[o];a(n)&&(s+=o+".")}}),s+=i,s===r)}static eventCallback(n,r,i){return s=>{e.matchEventFullKeyCode(s,n)&&i.runGuarded(()=>r(s))}}static _normalizeKey(n){return n==="esc"?"escape":n}static \u0275fac=function(n){return new(n||e)(Ze(Qe))};static \u0275prov=ne({token:e,factory:e.\u0275fac})}return e})();function TD(e){return oD(oL(e))}function oL(e){return{appProviders:[...uL,...e?.providers??[]],platformProviders:lL}}function sL(){By.makeCurrent()}function aL(){return new Mi}function cL(){return HC(document),document}var lL=[{provide:is,useValue:Py},{provide:ey,useValue:sL,multi:!0},{provide:Qe,useFactory:cL,deps:[]}],uL=[{provide:vd,useValue:"root"},{provide:Mi,useFactory:aL,deps:[]},{provide:Vy,useClass:tL,multi:!0,deps:[Qe]},{provide:Vy,useClass:iL,multi:!0,deps:[Qe]},ED,SD,CD,{provide:hn,useExisting:ED},{provide:jd,useClass:qk,deps:[]},[]],$y=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:function(n){let r=null;return n?r=new(n||e):r=Ze(dL),r},providedIn:"root"})}return e})(),dL=(()=>{class e extends $y{_doc;constructor(n){super(),this._doc=n}sanitize(n,r){if(r==null)return null;switch(n){case ei.NONE:return r;case ei.HTML:return po(r,"HTML")?Qr(r):oy(this._doc,String(r)).toString();case ei.STYLE:return po(r,"Style")?Qr(r):r;case ei.SCRIPT:if(po(r,"Script"))return Qr(r);throw new $e(5200,!1);case ei.URL:return po(r,"URL")?Qr(r):Rd(String(r));case ei.RESOURCE_URL:if(po(r,"ResourceURL"))return Qr(r);throw new $e(5201,!1);default:throw new $e(5202,!1)}}bypassSecurityTrustHtml(n){return ZC(n)}bypassSecurityTrustStyle(n){return XC(n)}bypassSecurityTrustScript(n){return JC(n)}bypassSecurityTrustUrl(n){return QC(n)}bypassSecurityTrustResourceUrl(n){return eS(n)}static \u0275fac=function(n){return new(n||e)(Ze(Qe))};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),xD="9.8.2",k=class ep{static SDK_VERSION=xD;static SDK_VERSION_CODE;static SDK="WEB";static LOG_PREFIX="CooeeSDK";static COOEE="cooee";static SESSION_STORAGE_SCROLL_ID="sleid";static IDLE_TIME_IN_SECONDS=30*60;static IN_APP_WRAPPER_NAME="cooee-wrapper";static IN_APP_CONTAINER_NAME="cooee-container";static IN_APP_DEFAULT_PADDING=15;static EVENT_SCREEN_VIEW="CE Screen View";static EVENT_APP_BACKGROUND="CE App Background";static EVENT_TRIGGER_DISPLAYED="CE Trigger Displayed";static EVENT_CAMPAIGN_HOLDOUT="CE Campaign Holdout";static EVENT_CAMPAIGN_REJECTED="CE Campaign Rejected";static EVENT_CAMPAIGN_FAILED="CE Campaign Failed";static EVENT_TRIGGER_CLOSED="CE Trigger Closed";static EVENT_SCROLL="CE Scroll";static EVENT_TRIGGER_CLICKED="CE Trigger Clicked";static EVENT_FORM_SUBMITTED="CE Form Submitted";static EVENT_EXPERIMENT_START="CE Experiment Start";static EVENT_VIDEO_DIALOG_CLOSED="CE Video Dialog Closed";static EVENT_VIDEO_DIALOG_OPENED="CE Video Dialog Opened";static EVENT_VIDEO_CHANGE="CE Video Changed";static EVENT_LAST_VIDEO_ENDED="CE Last Video Ended";static EVENT_VIDEO_MUTED="CE Video Muted";static EVENT_VIDEO_UNMUTED="CE Video Unmuted";static EVENT_ADD_TO_CART_CLICKED="CE Add To Cart Clicked";static EVENT_VIEW_ITEM_CLICKED="CE View Item Clicked";static EVENT_MORE_ITEM_INFO_CLICKED="CE More Item Info Clicked";static EVENT_OPEN_CART_CLICKED="CE Open Cart Clicked";static EVENT_ADD_TO_CART="Add To Cart";static EVENT_REMOVE_FROM_CART="Remove From Cart";static EVENT_VIEW_ITEM="View Item";static EVENT_VIEW_CART="View Cart";static EVENT_VIEW_COLLECTION="View Collection";static EVENT_BUY_NOW_CLICKED="Buy Now Clicked";static EVENT_CHECKOUT_STARTED="Checkout Started";static EVENT_REVIEW_CLICKED="Review Clicked";static EVENT_ITEM_THUMBNAIL_CLICKED="Item Thumbnail Clicked";static JS_LOAD_WHITELIST_EVENTS=[this.EVENT_VIEW_ITEM,this.EVENT_VIEW_CART,this.EVENT_VIEW_COLLECTION];static HASH_INITIATE_CHECKOUT="initiate-checkout";static HASH_OPEN_CART_DRAWER="open-cart-drawer";static ADD_BUNDLE_CTA_INBOUND_EVENT="letscooee:inbound:cta:add-bundle";static CTA_OPEN_CART_EVENT="letscooee:outbound:open-cart";static CTA_AFTER_REFRESH_UI="letscooee:outbound:refresh-ui";static POPUP_ACTIVITY_EVENT="letscooee:outbound:popup-activities";static THIRD_PARTY_CHECKOUT_EVENT="letscooee:outbound:third-party-initiate-checkout";static CAMPAIGN_DISPLAYED_ACTIVITY="DISPLAYED";static CAMPAIGN_CLICKED_ACTIVITY="CLICKED";static CAMPAIGN_CLOSED_ACTIVITY="CLOSED";static BLACKLISTED_PAGE_NAMES=["collection","product","cart"];static API_CALL_MAX_ATTEMPTS=3;static API_CALL_RETRY_DELAY=1e3;static PLACEHOLDER_IMAGE="https://cdn.global.letscooee.com/images/placeholders/product.png";static CART_UPDATE_BROADCAST="CART_UPDATE";static GRAPHQL_VERSION="2024-10";static GRAPHQL_API_PATH=`/api/${this.GRAPHQL_VERSION}/graphql.json`;static SHADOW_SPLITTER=":shadow";static CAMPAIGN_ATTRIBUTE="_letscooee_campaign";static CONTENT_ATTRIBUTE="_letscooee_content";static VIA="_via";static PAYMENT_MODAL_DETAILS=[{identifier:"#flo-checkout-wrapper",gateway:"Shopflow"},{identifier:"#fastrr-main-container",gateway:"Shiprocket"},{identifier:"#gokwik-modal-wrapper",gateway:"Gokwik"},{identifier:"#zecpe",gateway:"Ecom 360"}];static{let t=ep.SDK_VERSION.split(".").map(n=>n.padStart(2,"0")).join("");ep.SDK_VERSION_CODE=parseInt(t,10)}},mn={apiURL:"https://api.sdk.letscooee.com",debug:!1,mode:"production",styleURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${k.SDK_VERSION}/dist/widget.min.css`,widgetURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${k.SDK_VERSION}/dist/widget.min.js`},ir=Re(ds()),C=class{static log(...e){ir.default.info(...e)}static debug(...e){ir.default.debug(...e)}static error(...e){ir.default.error(...e)}static warn(...e){ir.default.warn(...e)}static info(...e){ir.default.info(...e)}static trace(...e){ir.default.trace(...e)}static configure(e=k.LOG_PREFIX){ir.default.useDefaults({formatter:function(n){n.unshift(`${e} (v${k.SDK_VERSION}):`)}});let t=this.getDebugParam();(t==="1"||t==="on")&&(localStorage.cooeeLogLevel="TRACE"),localStorage.cooeeLogLevel?ir.default.setLevel(ir.default[localStorage.cooeeLogLevel]):ir.default.setLevel(mn.debug?ir.default.TRACE:ir.default.OFF)}static getDebugParam(){return new URL(location.href).searchParams?.get("cooee-debug")}static logBrand(){let e=`
8
8
  display: inline-block;
9
9
  font-size: 14px;
10
10
  background: linear-gradient(90deg, #d52dc8 25%, #2179e2 82%);
@@ -72,7 +72,7 @@ mutation cartDiscountCodesUpdate($cartId: ID!, $discountCodes: [String!]) {
72
72
  }
73
73
  }
74
74
  }
75
- `,Mo=class{async performAddToCart(e,t){if(!e.length)return;let n=e.map(a=>{let{vID:l,quantity:c}=this.getVIDAndQuantity(a);return{id:l?+l:+a.mID,quantity:c,properties:t.getPrivateAttributesForLineItem()}}),r=Dt.getCartURL("cart/add.js"),i={items:n},s=Gt.get();s.isMiniCart()?i.sections=["mini-cart"]:s.isShopifyDefaultDrawer()&&(i.sections=s.element.getSectionsToRender?.().map(a=>a.section??a.id));let o=JSON.stringify(i);try{let a=await fetch(r,{body:o,method:"post",headers:{"Content-Type":"application/json"}});if(a.status===200||a.status===302)return C.log(`Added ${e.length} items to Cart`),ce.showSnackbar("Product added to your cart"),a.json()}catch(a){C.error("Failed to add product in cart",a)}}async performUpdate(e,t){if(!sx.JSUtils.hasKeys(t)){C.warn("No update fields provided");return}let n=Dt.getCartURL("cart/change.js"),r=w({id:e.key},t),i=JSON.stringify(r);try{let s=await fetch(n,{body:i,method:"post",headers:{"Content-Type":"application/json"}});(s.status===200||s.status===302)&&(C.log(`Updated ${e}`),Ge.getCurrent().update(s.json()))}catch(s){C.error("Failed to update item in cart",s,e)}}async performCopyCoupon(e){if(e)try{await navigator.clipboard.writeText(e),C.log(`Code-${e} copied`),ce.showSnackbar("Discount code copied")}catch(t){C.error("Failed to copy code",t)}}performGoToItem(e){if(!e?.link)return;let t=Dt.getProductSlug(e.link);t&&(location.pathname=Dt.getRootPrefix()+"products/"+t)}async upgradeToSubscription(e,t){if(!e){C.warn("Trying to upgrade to subscription with no item");return}let n=await Ge.getCurrent().getNormalisedCart(),r=e.selectedOrFirstVariant.value,i=n.items.findIndex(c=>c.vID===r.mID),s=r.selectedSellingPlan.value,o=Dt.getCartURL("cart/change.js"),a={line:i+1,selling_plan:s?.mID||null,properties:t.getPrivateAttributesForLineItem()},l=JSON.stringify(a);try{let c=await fetch(o,{body:l,method:"post",headers:{"Content-Type":"application/json"}});if(c.status===200||c.status===302){C.log(`Upgraded ${e} selling plan`),ce.showSnackbar("Line item updated");let h=await c.json();return Ge.getCurrent().update(h),h}}catch(c){C.error("Failed to update subscription for item in cart",c)}}async performCartCreate(e,t,n){let r=vt.get().storefrontToken;if(!r)throw new Error("Storefront token not set for the store");if(!e?.vID){C.error("No variant ID found to perform Buy now",e);return}let i=t?[t]:[],s=[{merchandiseId:`gid://shopify/ProductVariant/${e.vID}`,quantity:1,attributes:n.getKVFormatPrivateAttributesForLineItem()}],o=await ce.getCartAttributes(),a=new Headers;a.append("Content-Type","application/json"),a.append("X-Shopify-Storefront-Access-Token",r);let l=JSON.stringify({query:LV,variables:{input:{lines:s,discountCodes:i,attributes:o}}});return(await On.getInstance().request(k.GRAPHQL_API_PATH,{method:"POST",headers:a,body:l})).data?.cartCreate?.cart?.checkoutUrl}async processEvent(e){let t=e.clickAction,n=e.items,r=e.triggerData;if(t.at){let i=t;if(C.log(`Performing ${JSON.stringify(i)} action`),i.at===101)n?.length&&this.performGoToItem(n[0]);else if(i.at===102)n?.length&&await this.performAddToCart(n,r);else if(i.at===103)await this.performCopyCoupon(r.discount.code);else if(i.at===105)Gt.get().open();else if(i.at===104){let s=e.collections;if(!s?.length)return;location.pathname=Dt.getRootPrefix()+"collections/"+s[0].handle}}t.applyDiscount&&r.discount?.code&&Ao.navigate(r.discount.code,r.redirectBehaviour)}getVIDAndQuantity(e){let t,n;if(e instanceof gn)t=e.vID,n=e.quantity??1;else{if(!e.vars?.length)return{};t=e.selectedOrFirstVariant.value.mID,n=1}return{vID:t,quantity:n}}},Hp=class extends Ei{ctaListener=new Mo;constructor(e){super(e),mi.get().subscriber(k.CART_UPDATE_BROADCAST).pipe(Ii(null)).subscribe(this.checkMilestone.bind(this))}update(e){super.update(e),this.widgetElement.update()}shouldStopRendering(){return!1}renderContainer(){if(this.widgetElement?.isConnected){this.addToRendered();return}let e=this.widgetElement=document.createElement("cooee-progressbar");e.className="cooee-root",e.cart=Ge.getCurrent(),e.engagementTrigger=this.engagementTrigger,e.setAttribute("engagement",this.engagementTrigger.shortID),this.rootContainer.appendChild(e),this.addToRendered()}async checkMilestone(){let e=await Ge.getCurrent().getNormalisedCart(),t=[...this.engagementTrigger.progressBarConfig.milestones];for(let n of t){if(e.amount<n.minValue)break;if(C.log("Current milestone",n),n.rewardType===ax.MilestoneRewardType.FREE_AUTO_GIFT){let r=n.items[0],i=e.items.find(s=>s.vID===r.vID||s.mID===r.mID);if(i)C.log(`Item(vID:${r.vID}) already present in the cart. Updating item's properties`),await this.ctaListener.performUpdate(i,{properties:this.engagementTrigger.getPrivateAttributesForLineItem()});else{let s=await this.ctaListener.performAddToCart([r],this.engagementTrigger);Gt.get().refreshUI(s,!1)}}}}async removeOtherFreeGifts(e){let t=(await Ge.getCurrent().getNormalisedCart()).items.filter(n=>n.vID!==e?.vID&&n.properties[k.CAMPAIGN_ATTRIBUTE]===this.engagementTrigger.shortID);if(t.length)for(let n of t)await this.ctaListener.performUpdate(n,{quantity:0})}},jp=class extends Kn{constructor(e){super(e)}shouldStopRendering(){return!1}renderContainer(){if(this.widgetElement?.isConnected){this.addToRendered();return}let e=this.widgetElement=document.createElement("cooee-shoppable-videos");e.className="cooee-root",e.triggerContext=this.triggerContext,e.addEventListener("sendEvent",t=>{let n=t.detail;this.safeHTTPService.sendEvent(n)}),e.setAttribute("engagement",this.engagementTrigger.shortID),this.rootContainer.appendChild(e),this.addToRendered()}},cx=Re(Ta()),$p=class extends Kn{constructor(e){super(e)}shouldStopRendering(){return!1}renderContainer(){let e=this.getParentElement(`inner-letscooee-${this.engagementTrigger.shortID}`);this.rootContainer.appendChild(e),document.addEventListener(k.ADD_BUNDLE_CTA_INBOUND_EVENT,this.inboundCTAListener.bind(this),!1)}async inboundCTAListener(e){let t=this.engagementTrigger,n=`Engagement(id: ${t.engagementID}, shortID: ${t.shortID})`,r=e.detail;if(!cx.JSUtils.hasKeys(r)){C.error(`No detail received for ${n}`);return}C.log("Detail received for BYOB",r);let i=r.campaignID??r.campaignId??r.campaign_id;if(i!==t.shortID&&i!==t.engagementID){C.warn(`Current ${n} is not BYOB. Received: ${i}`);return}let s=r.items;if(!s?.length)return;let o=s.map(a=>new gn({mID:a.product_id,vID:a.variant_id,quantity:a.quantity||1}));await new Ro(this.triggerContext).execute({embeddedItems:o,clickAction:{at:108,applyDiscount:!0}})}},fc=class{runtimeData=Oe.get();processCartWidgetResponse(e){this.runtimeData.isCartDirty=!1,this.runtimeData.cartEngagements=e;let t=[...Ei.renderedEngagements];Ei.renderedEngagements.length=0;for(let n of e)C.log(`\u{1F4E3} ${n} received as cart embed`),!this.findAndUpdateCurrent(n,t)&&(C.log(`${n} is new`),n.isProgressBar()?new Hp(n).renderSilently():n.isSubscriptionUpsell()?Up.renderCartUpsell(n):new Ei(n).renderSilently());this.removeOldWidgets(t)}processPageWidgetResponse(e){let t=[...Kn.renderedEngagements];Kn.renderedEngagements.length=0;for(let n of e)C.log(`\u{1F4E3} ${n} received as page embed`),!this.findAndUpdateCurrent(n,t)&&(C.log(`${n} is new`),n.isShoppableVideo()?new jp(n).renderSilently():n.isBYOB()?new $p(n).renderSilently():new Kn(n).renderSilently());this.removeOldWidgets(t)}findAndUpdateCurrent(e,t){let n=t.findIndex(r=>r.isSameTrigger(e));return n<0||e.isSubscriptionUpsell()?!1:(t[n].update(e),t[n].renderSilently(),t.splice(n,1),!0)}removeOldWidgets(e){for(let t of e)t.destroy()}},pc=class{runtimeData=Oe.get();httpService=Te.get(On);sessionManager=Te.get(zt);constructor(){}async getWidgetProps(){let e={};e.engagementIDs=this.addAvailableEngagementShortIDs(),e.locale=this.runtimeData.locale,await this.addSessionContext(e),e.currentItem=this.runtimeData.getCurrentItem();try{e.cart=await Ge.getCurrent().getNormalisedCart()}catch(i){C.error("Error fetching Shopify cart before sending widget call",i)}let t=new URLSearchParams(location.search),n=t.get("cooee-preview");n?e.previewIDs=n.trim().split(",").filter(i=>Number.isInteger(+i)):this.runtimeData.previewIDs?.length&&(e.previewIDs=this.runtimeData.previewIDs);let r=t.get("cooee-variant");return r?e.previewVariant=r:this.runtimeData.previewVariant&&(e.previewVariant=this.runtimeData.previewVariant),e}async addSessionContext(e){let t=await this.sessionManager.checkSessionAndGetContext();e.sessionID=t[0],e.sessionNumber=t[1],e.landingPage=t[2],e.page=hi.parseFromCurrent()}addAvailableEngagementShortIDs(){let e=document.querySelectorAll(".letscooee-engagement"),t=[];return e.forEach(n=>{let r=n.dataset.engagementId;r&&+r&&t.push(r)}),t}},Gr=class AD extends pc{static INSTANCE;loadWidgetsSubject=new J;constructor(){super(),this.loadWidgetsSubject.pipe(Ar(300)).subscribe(()=>{this.loadCartWidgets().catch(t=>C.error("Unable to initiate cart widgets",t)),this.loadPageWidgets().catch(t=>C.error("Unable to initiate page widgets",t))}),mi.get().subscriber(k.CART_UPDATE_BROADCAST).subscribe(()=>this.loadWidgetsSubject.next())}static getInstance(){return this.INSTANCE||(this.INSTANCE=new AD),this.INSTANCE}loadOrRenderWidgetsAfterCartChange(){this.runtimeData.isCartDirty?this.loadWidgetsSilently():this.renderCachedCartWidgets()}loadPageWidgetsSilently(){zt.replaySubject.subscribe(async()=>{this.loadPageWidgets().catch(t=>C.error("Unable to initiate load page widgets",t))})}loadCartWidgetsSilently(){zt.replaySubject.subscribe(async()=>{this.loadCartWidgets().catch(t=>C.error("Unable to initiate cart widgets",t))})}loadWidgetsSilently(){zt.replaySubject.subscribe(async()=>{this.loadWidgetsSubject.next()})}async loadPageWidgets(){let t=await this.getWidgetProps();C.log("Load widgets",t),this.httpService.post("/v1/engagement/page-widgets",t).then(async n=>{let r=n.widgets.map(i=>new Hn(i));new fc().processPageWidgetResponse(r)}).catch(n=>{C.error("Error sending widget getter",n)})}async loadCartWidgets(){let t=await this.getWidgetProps();C.log("Load cart widgets",t),this.httpService.post("/v1/engagement/cart-widgets",t).then(async n=>{let r=n.widgets.map(i=>new Hn(i));new fc().processCartWidgetResponse(r)}).catch(n=>{C.error("Error sending widget getter",n)})}async getVariation(t){let n=await this.getWidgetProps();return this.httpService.post("/v1/engagement/get-variant",w(w({},t),n))}renderCachedCartWidgets(){new fc().processCartWidgetResponse(this.runtimeData.cartEngagements)}},Wp=class{eventAPIService;constructor(){this.eventAPIService=Te.get(Oo)}processResponse(e){for(let t of e)t.experimentConfig&&(this.runExperiment(t),this.trackExperimentRan(t));document.querySelector("#lc-hide-body")?.remove()}async runExperiment(e){let t=e.experimentConfig?.experiments;if(!t?.length){C.log("Nothing to experiment",e.toString());return}for(let n of t){if(!n.cssSelector){C.debug("No CSS Selector available",e.toString());continue}let r;try{r=await ce.retrySelectors(n.cssSelector)}catch{C.error("Fail to get CSS selector for experiment",e.toString());return}if(!r?.length)return;for(let i of r)Object.assign(i.style,n.style),n.type==="TEXT"&&n.text&&(i.innerHTML=n.text)}}trackExperimentRan(e){this.eventAPIService.trackExperiment({name:k.EVENT_EXPERIMENT_START,experiment:new bo(e)}).catch(t=>{C.error("Fail to track experiment",t)})}},Oo=class LD extends pc{static INSTANCE;constructor(){super()}static getInstance(){return this.INSTANCE||(this.INSTANCE=new LD),this.INSTANCE}loadExperimentSilently(){rt.get(ge.SDK_TOKEN).then(t=>{t?this.loadExperiments().catch(n=>C.error("Unable to initiate experiment",n)):zt.replaySubject.subscribe(async()=>{this.loadExperiments().catch(n=>C.error("Unable to initiate experiment",n))})})}async loadExperiments(){if(!this.runtimeData.activeExperiment)return;let t=await this.getWidgetProps();C.log("Load experiments",t),this.httpService.post("/v1/engagement/experiments",t).then(async n=>{let r=n.experiments.map(i=>new Hn(i));new Wp().processResponse(r)}).catch(n=>{C.error("Error sending experiment getter",n)})}async trackExperiment(t){await this.addSessionContext(t),await this.httpService.post("/v1/event/experiment",t)}},Gp=class{runtimeData=Oe.get();widgetAPIService=Te.get(Gr);experimentAPIService=Te.get(Oo);meddle(){let e=gt.globalRef;e.account=e.account??[],e.profile=e.profile??[],e.events=e.events??[],e.screen=e.screen??[],e.page=e.page??[],this.meddlePage(),this.meddleAccount(),this.meddleEvents(),this.meddleProfile(),this.meddleScreen(),this.exposeMethods()}exposeMethods(){let e=gt.globalRef;e.loadPageWidgets=()=>{this.widgetAPIService.loadPageWidgetsSilently()},e.loadCartWidgets=()=>{this.widgetAPIService.loadCartWidgetsSilently()},e.loadExperiments=()=>{this.experimentAPIService.loadExperimentSilently()},e.previewWidget=gt.previewWidget.bind(gt),e.previewPopup=gt.previewPopup.bind(gt)}overwritePush(e,t){Fa(e,"push",t)}meddleAccount(){this.overwritePush(gt.globalRef.account,(...e)=>{this.processAccount(e[0])}),gt.globalRef.account.forEach(this.processAccount.bind(this))}meddleEvents(){this.overwritePush(gt.globalRef.events,(...e)=>{this.processEvent(e[0])}),gt.globalRef.events.forEach(this.processEvent.bind(this))}meddleProfile(){this.overwritePush(gt.globalRef.profile,(...e)=>{this.processProfile(e[0])}),gt.globalRef.profile.forEach(this.processProfile.bind(this))}meddleScreen(){this.overwritePush(gt.globalRef.screen,(...e)=>{this.processPageName(e[0])}),gt.globalRef.screen.forEach(this.processPageName.bind(this))}processAccount(e){e&&(e.appID&&gt.authenticate(e),e.flags&&Os.setFlags(e.flags))}processEvent(e){e&&(k.JS_LOAD_WHITELIST_EVENTS.includes(e[0])?gt.sendEvent(e[0],e[1],w({occurred:this.runtimeData.jsLoadTime},e[2])):gt.sendEvent(e[0],e[1],e[2]))}processProfile(e){e&&gt.updateProfile(e)}processPageName(e){e&&gt.setPageName(e)}meddlePage(){this.overwritePush(gt.globalRef.page,(...e)=>{this.processPage(e[0])}),gt.globalRef.page.forEach(this.processPage.bind(this))}processPage(e){e.currentItem&&this.runtimeData.setCurrentItem(e.currentItem),e.currency&&(this.runtimeData.currencyCode=e.currency),e.shopCurrency&&(this.runtimeData.shopCurrencyCode=e.shopCurrency),e.moneyFormat&&(this.runtimeData.moneyFormat=e.moneyFormat),e.jsLoad&&(this.runtimeData.jsLoadTime=e.jsLoad),e.locale&&(this.runtimeData.locale=e.locale),e.pageName&&gt.setPageName(e.pageName),e.activeExperiment&&(this.runtimeData.activeExperiment=e.activeExperiment)}},hc=class{static SESSION_STORAGE=window.sessionStorage;static SESSION_STORAGE_KEY_PREFIX=k.COOEE.concat("-");static getString(e,t){return this.getItem(e)||t}static setString(e,t){this.setItem(e,t)}static remove(e){this.removeItem(e)}static getItem(e){return this.SESSION_STORAGE.getItem(this.SESSION_STORAGE_KEY_PREFIX.concat(e))}static setItem(e,t){this.SESSION_STORAGE.setItem(this.SESSION_STORAGE_KEY_PREFIX.concat(e),t)}static removeItem(e){this.SESSION_STORAGE.removeItem(this.SESSION_STORAGE_KEY_PREFIX.concat(e))}},mc=class su{static INSTANCE;static DEBOUNCE_TIME=1e3;static THRESHOLD=10;safeHttpService=Te.get(Ve);_lastScreenOrScroll=new Date;lastPercent=0;constructor(){}set lastScreenOrScroll(t){this._lastScreenOrScroll=t}static getInstance(){return this.INSTANCE||(this.INSTANCE=new su),this.INSTANCE}resetScrollID(t){hc.remove(k.SESSION_STORAGE_SCROLL_ID),this.lastScreenOrScroll=t??new Date}listen(){if(window.scrollY){let t=this.getPercentScrolledY();this.shouldSendScroll(t)&&this.sendScroll(t)}ce.onDocumentLoaded(()=>{this.observeWindowScroll()})}observeWindowScroll(){Di(window,"scroll").pipe(Ar(su.DEBOUNCE_TIME),pr(()=>{let t=this.getPercentScrolledY();if(t>100){C.warn("Received scroll percent is more than 100",t);return}if(this.shouldSendScroll(t))return t})).subscribe(t=>{this.sendScroll(t)})}shouldSendScroll(t){return Math.abs(this.lastPercent-t)>=su.THRESHOLD||this.lastPercent!==t&&t===100}sendScroll(t){if(t==null)return;let n={percent:t,timeMS:new Date().getTime()-this._lastScreenOrScroll.getTime()};this.lastPercent=t;let r=hc.getString(k.SESSION_STORAGE_SCROLL_ID,""),i=new We(k.EVENT_SCROLL,n,null,r);this.safeHttpService.sendEvent(i),hc.setString(k.SESSION_STORAGE_SCROLL_ID,i.id.toHexString()),this._lastScreenOrScroll=new Date(i.occurred)}getPercentScrolledY(){let t=window.document.body.scrollHeight,n=window.innerHeight;return Math.ceil((window.scrollY+n)/t*100)}},zp=class MD{static ACTIVE_DURATION="aDur";static INACTIVE_DURATION="iaDur";apiService=Te.get(Ve);runtimeData=Oe.get();listen(){document.onvisibilitychange=()=>{document.visibilityState==="visible"?this.onVisible():document.visibilityState==="hidden"&&this.onHidden()}}async onVisible(){}async onHidden(){let t=await this.runtimeData.setInactive();if(t===0){C.info("Not sending background event as user was inactive on website");return}C.info(`Sending background event with ${t} seconds`);let n={};n[MD.ACTIVE_DURATION]=t,this.apiService.sendEvent(new We(k.EVENT_APP_BACKGROUND,n))}},qp=class{loadedFonts=[];async loadAllFonts(e){e.elems?.forEach(t=>{t instanceof _i&&this.loadFamily(t.typography?.fam)})}async loadFamily(e){if(!e?.fonts||this.loadedFonts.indexOf(e.name)>-1)return;let t=[];e.fonts.forEach(n=>{if(n.url){let r=new FontFace(k.COOEE+e.name,n.getURL(),n.getFontDescriptor());t.push(r.load())}}),this.loadedFonts.push(e.name),(await Promise.all(t)).forEach(n=>{document.fonts.add(n)})}},Yp=class{static updateIdentity(e){if(!this.isInstalled())return;let t={};e.email&&(t.email=e.email),e.mobile&&(t.phone_number=e.mobile),C.debug("Sending email/mobile to Klaviyo"),window.klaviyo.push(["identify",t])}static isInstalled(){return window.klaviyo&&typeof window.klaviyo=="object"}},Kp=class{apiService;action;triggerContext;constructor(e,t){this.action=e,this.apiService=Ve.getInstance(),this.triggerContext=t}async execute(){let e=this.containsCTA()?k.EVENT_TRIGGER_CLICKED:k.EVENT_TRIGGER_CLOSED;switch(this.action.at!==106&&await this.closeTriggerAndSendEvent(e),this.action.at){case 2:break;case 4:this.gotoURLAction();break;case 5:this.shareAction();break;case 106:await this.collectFormData();break;case void 0:case 105:break;default:C.error("Received an invalid ClickActionType: ",this.action.at);return}}externalAction(){this.action.ext?.u&&window.open(this.action.ext.u,"_blank")?.focus()}gotoURLAction(){if(this.action.gu?.u){let e=this.action.gu.u;ce.isValidURL(e)||(e=`//${e}`),window.open(e,"_self")}}prompt(){let e=this.action.pmpt;e&&(e===2&&this.promptLocationPermission(),e===3&&this.promptPushNotificationPermission(),e===1&&this.promptCameraPermission())}async closeTriggerAndSendEvent(e,t){this.triggerContext.closeInApp(e,t),await this.dispatchEvent()}shareAction(){if(this.action.share){if(!navigator.share){C.warn("Navigator.share is not compatible with this browser");return}navigator.share({text:this.action.share.text,title:"Share"}).then(e=>console.log(e)).catch(e=>console.error(e))}}containsCTA(){return this.action.at&&this.action.at!==1?!0:!(this.isEmpty(this.action.custKV)&&this.isEmpty(this.action.up))}isEmpty(e){return e?Object.keys(e).length===0:!0}promptLocationPermission(){!navigator.geolocation||!navigator.permissions||navigator.geolocation.getCurrentPosition(e=>{this.apiService.updateDeviceProps({coords:[e.coords.latitude,e.coords.longitude]}),this.sendPermissionData()})}promptPushNotificationPermission(){if(!("Notification"in window)){C.warn("This browser does not support desktop notification");return}if(Notification.permission!=="default"){this.apiService.updateDeviceProps({pnPerm:Notification.permission});return}Notification.requestPermission().then(()=>{this.sendPermissionData()})}promptCameraPermission(){navigator.mediaDevices&&navigator.mediaDevices.getUserMedia({video:!0}).finally(()=>{this.sendPermissionData()})}checkPermission(e){return navigator.permissions.query({name:e}).then(t=>t.state.toString())}async checkAllPermission(){let e=await this.checkPermission("camera"),t=await this.checkPermission("geolocation"),n=Notification.permission;return{camera:e,location:t,notification:n}}sendPermissionData(){this.checkAllPermission().then(e=>{this.apiService.updateDeviceProps({perm:e})})}async collectFormData(){let e={};for(let t of this.triggerContext.inputs){if(!t.isValid)return;let n=document.getElementById(t.id).value;t.type===51?e.email=n:t.type===52&&(e.mobile=n)}await this.closeTriggerAndSendEvent(k.EVENT_FORM_SUBMITTED,{form:e}),ce.showSnackbar("Coupon applied on cart"),Yp.updateIdentity(e)}async dispatchEvent(){let e=this.triggerContext.triggerData,t={clickAction:this.action,items:this.triggerContext.selectedEmbeddedItems??e.embeddedItems??e.items,collections:e.collections,triggerData:e};await new Mo().processEvent(t);let n={action:this.containsCTA()?k.CAMPAIGN_CLICKED_ACTIVITY:k.CAMPAIGN_CLOSED_ACTIVITY};document.dispatchEvent(new CustomEvent(k.POPUP_ACTIVITY_EVENT,{detail:n}))}},Tr=class{renderer=sr.get();parentHTMLEl;inappElement;inappHTMLEl;triggerContext;stylesConverter;scalingFactor;constructor(e,t,n){this.parentHTMLEl=e,this.inappElement=t,this.triggerContext=n,this.stylesConverter=new uc(this.renderer.getScalingFactor())}getHTMLElement(){return this.inappHTMLEl}insertElement(){this.renderer.appendChild(this.parentHTMLEl,this.inappHTMLEl)}processCommonBlocks(){this.processWidthAndHeight(),this.processPositionBlock(),this.processTransformBlock(),this.processTransparency(),this.processShadow(),this.registerAction();let e=te(w(w(w(w({},this.getDisplayStyles()),this.getSpaceStyles()),this.getBorderStyles()),this.getBackgroundStyles()),{boxSizing:"border-box",outline:"none"});this.renderer.setStyles(this.inappHTMLEl,e)}getDisplayStyles(){return{display:"block"}}processWidthAndHeight(){this.inappElement.w&&this.renderer.setStyle(this.inappHTMLEl,"width",this.stylesConverter.getSizePx(this.inappElement.w)),this.inappElement.h&&this.renderer.setStyle(this.inappHTMLEl,"height",this.stylesConverter.getSizePx(this.inappElement.h))}processPositionBlock(){let e={position:"absolute",left:this.stylesConverter.getSizePx(this.inappElement.x),top:this.stylesConverter.getSizePx(this.inappElement.y)};this.renderer.setStyles(this.inappHTMLEl,e)}getBorderStyles(){return this.stylesConverter.getBorderStyles(this.inappElement.br)}getSpaceStyles(){return this.stylesConverter.getSpaceStyles(this.inappElement.spc)}processTransparency(){let e=this.inappElement.alpha;if(!isNaN(e)){let t=(e/100).toFixed(2);this.renderer.setStyle(this.inappHTMLEl,"opacity",t)}}processShadow(){let e=this.inappElement.shd;e?this.renderer.setStyle(this.inappHTMLEl,"box-shadow",e.getStyle(this.scalingFactor)):this.renderer.setStyle(this.inappHTMLEl,"box-shadow","unset")}processTransformBlock(){let e=new Rs(this.inappElement.trf);e&&e.rotate&&this.renderer.setStyle(this.inappHTMLEl,"transform",`rotate(${e.rotate}deg)`)}registerAction(){let e=this.inappElement.clc;!e||Object.keys(e).length===0||(this.inappHTMLEl.addEventListener("click",t=>{t.stopPropagation(),new Kp(e,this.triggerContext).execute()}),this.renderer.setStyle(this.inappHTMLEl,"cursor","pointer"))}getBackgroundStyles(){return this.stylesConverter.getBackgroundStyles(this.inappElement.bg)}},wi=class extends Tr{constructor(e,t,n){super(e,t,n)}processCommonBlocks(){super.processCommonBlocks(),this.processFontBlock(),this.processAlignment()}processFontBlock(){let e={},t=this.inappElement.typography;return t&&(e.fontSize=this.stylesConverter.getSizePx(t.fs),e.fontFamily=k.COOEE+t.fam?.name,e.lineHeight=`${t.lh}`,e.letterSpacing=t.letterSpacing),this.stylesConverter.getColourStyles(this.inappElement.color,"color",e),this.renderer.setStyles(this.inappHTMLEl,e),e}processPart(e,t){let n=[];t.u&&n.push("underline"),t.st&&n.push("line-through"),n.length||n.push("normal"),this.renderer.setStyle(e,"font-weight",t.b?"bold":"normal"),this.renderer.setStyle(e,"font-style",t.i?"italic":"normal"),this.renderer.setStyle(e,"text-decoration",n.join(" ")),this.renderer.setStyle(e,"color",t.c??"inherit"),this.renderer.setStyle(e,"font-family","inherit")}processAlignment(){let e=this.inappElement.typography.ta,t=e?Za[e]?.toLowerCase():this.inappElement.typography.alignment;t||(t="start"),this.renderer.setStyle(this.inappHTMLEl,"text-align",t)}},Kl=class extends wi{constructor(e,t,n){super(e,t,n),this.inappHTMLEl=this.renderer.createElement("div"),this.insertElement()}render(){this.inappElement.parts?.forEach(e=>{let t=this.renderer.createElement("span");t.innerHTML=e.txt?.toString()?.replace(/\n/g,"<br />"),this.processPart(t,e),this.renderer.appendChild(this.inappHTMLEl,t)}),this.processCommonBlocks()}},Zl=class extends Tr{constructor(e,t,n){super(e,t,n),this.inappHTMLEl=this.renderer.createElement("div"),this.insertElement()}render(){this.processCommonBlocks()}},Fs=class extends Tr{constructor(e,t,n){super(e,t,n),this.inappHTMLEl=this.renderer.createElement("img"),this.insertElement()}render(){this.renderer.setAttribute(this.inappHTMLEl,"src",this.inappElement.src),this.renderer.setStyle(this.inappHTMLEl,"max-width","none"),this.renderer.setStyle(this.inappHTMLEl,"max-height","none"),this.renderer.setStyle(this.inappHTMLEl,"margin","0 auto"),this.processCommonBlocks()}},Xl=class UD extends Tr{constructor(t,n,r){super(t,n,r),this.parent=t,this.inappHTMLEl=this.renderer.createElement("div")}static MAX_Z_INDEX="2147483647";render(){return this.parent||this.renderer.removeInApp(this.triggerContext),this.insertElement(),this.processCommonBlocks(),this.inappHTMLEl.classList.add(k.IN_APP_WRAPPER_NAME),this.inappHTMLEl.classList.add(this.triggerContext.rootClassName),this.renderer.setStyle(this.inappHTMLEl,"z-index",UD.MAX_Z_INDEX),this.inappHTMLEl}getBackgroundStyles(){return this.inappElement.cover?super.getBackgroundStyles():{}}processWidthAndHeight(){let t=this.inappElement.cont;if(this.inappElement.cover)this.renderer.isParentNotBody()?(this.renderer.setStyle(this.inappHTMLEl,"width","100%"),this.renderer.setStyle(this.inappHTMLEl,"height","100%")):(this.renderer.setStyle(this.inappHTMLEl,"width","100vw"),this.renderer.setStyle(this.inappHTMLEl,"height","100vh")),this.renderer.setStyle(this.inappHTMLEl,"top","0"),this.renderer.setStyle(this.inappHTMLEl,"left","0");else{let n=this.inappElement.spc,r=this.stylesConverter.getScaledSize(t.w)+n.getHorizontal(),i=this.stylesConverter.getScaledSize(t.h)+n.getVertical();this.renderer.setStyle(this.inappHTMLEl,"width",r+"px"),this.renderer.setStyle(this.inappHTMLEl,"height",i+"px")}}getSpaceStyles(){return{padding:this.inappElement.spc.getPaddingCSS()}}getDisplayStyles(){return w(w({display:"flex"},this.inappElement.getStylesForWrapper()),this.inappElement.getFlexStylesForContainer())}processPositionBlock(){if(this.renderer.isParentNotBody()){if(this.triggerContext.triggerData.ian?.isEmbedded()){this.renderer.setStyle(this.inappHTMLEl,"position","block");return}this.renderer.setStyle(this.inappHTMLEl,"position","absolute")}else this.renderer.setStyle(this.inappHTMLEl,"position","fixed")}getBorderStyles(){return{}}processTransparency(){}processTransformBlock(){}processShadow(){}},Zp=class extends Tr{constructor(e,t,n){super(e,t,n),this.inappHTMLEl=this.renderer.createElement("div"),this.insertElement()}render(){return this.processCommonBlocks(),this.renderer.setStyle(this.inappHTMLEl,"position","relative"),this.renderer.setStyle(this.inappHTMLEl,"overflow","hidden"),this.inappHTMLEl.classList.add(k.IN_APP_CONTAINER_NAME),this}},gc=class extends wi{borderColor="";constructor(e,t,n){super(e,t,n),this.inappHTMLEl=this.renderer.createElement("input"),this.insertElement()}render(){let e=this.setInputType();this.renderer.setAttribute(this.inappHTMLEl,"placeholder",this.inappElement.placeholderText),this.renderer.setStyle(this.inappHTMLEl,"background","#ffffff00"),this.renderer.setStyle(this.inappHTMLEl,"outline","none"),this.inappHTMLEl.addEventListener("click",t=>{t.stopPropagation()}),this.processCommonBlocks(),this.addListener(this.inappHTMLEl,e),this.triggerContext.addInputField(e,this.inappElement.t)}},Xp=class VD extends gc{static EMAIL_REGEX=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/;constructor(t,n,r){super(t,n,r)}setInputType(){let t=`coo-${this.inappElement.t}`;return this.renderer.setAttribute(this.inappHTMLEl,"type","email"),this.renderer.setAttribute(this.inappHTMLEl,"id",t),t}addListener(t,n){t.addEventListener("keydown",r=>{this.borderColor||(this.borderColor=this.inappHTMLEl.style.borderColor),t.value.match(VD.EMAIL_REGEX)?(this.renderer.setStyle(this.inappHTMLEl,"border-color",this.borderColor),this.triggerContext.updateValidation(n,!0)):(this.renderer.setStyle(this.inappHTMLEl,"border-color","red"),this.triggerContext.updateValidation(n,!1)),r.stopPropagation()})}},Jp=class BD extends gc{static MOBILE_REGEX=/^\d+$/;constructor(t,n,r){super(t,n,r)}setInputType(){let t=`coo-${this.inappElement.t}`;return this.renderer.setAttribute(this.inappHTMLEl,"type","tel"),this.renderer.setAttribute(this.inappHTMLEl,"id",t),t}addListener(t,n){t.addEventListener("keydown",r=>{this.borderColor||(this.borderColor=this.inappHTMLEl.style.borderColor),t.value.match(BD.MOBILE_REGEX)?(this.renderer.setStyle(this.inappHTMLEl,"border-color",this.borderColor),this.triggerContext.updateValidation(n,!0)):(this.renderer.setStyle(this.inappHTMLEl,"border-color","red"),this.triggerContext.updateValidation(n,!1)),r.stopPropagation()})}},Qp=class us extends wi{static DAYS="Days";static HOURS="Hours";static MINUTES="Minutes";static SECONDS="Seconds";elements;spans=[];constructor(t,n,r){super(t,n,r),this.inappHTMLEl=this.renderer.createElement("div"),this.insertElement()}render(){this.addTimerChildren(),this.processAndStartTimer(),this.processCommonBlocks();let t=te(w(w(w({flex:"1 1 0"},this.stylesConverter.getBackgroundStyles(this.inappElement.bg)),this.stylesConverter.getBorderStyles(this.inappElement.br)),this.stylesConverter.getSpaceStyles(this.inappElement.spc)),{marginLeft:this.stylesConverter.getSizePx(this.inappElement.gap),marginRight:this.stylesConverter.getSizePx(this.inappElement.gap)});this.addStylesToTimer(t)}getBackgroundStyles(){return{}}processFontBlock(){let t=super.processFontBlock();return this.stylesConverter.getColourStyles(this.inappElement.color,"color",t),this.addStylesToTimer(t),t}getSpaceStyles(){return{}}getBorderStyles(){return{}}getDisplayStyles(){return{display:"flex",flexWrap:"nowrap",justifyContent:"center"}}addStylesToTimer(t){this.elements.forEach(n=>this.renderer.setStyles(n,t))}addTimerChildren(){let t=this.inappElement.show;this.elements=[],t.day&&this.elements.push(this.getChild(us.DAYS)),t.hour&&this.elements.push(this.getChild(us.HOURS)),t.minute&&this.elements.push(this.getChild(us.MINUTES)),t.second&&this.elements.push(this.getChild(us.SECONDS)),this.elements.forEach(n=>this.inappHTMLEl.appendChild(n))}getChild(t){let n=this.renderer.createElement("div"),r=this.renderer.createElement("span"),i=this.renderer.createElement("span");return i.innerText=t,r.innerText="00",r.id=`lc-${t}`,this.renderer.setStyle(i,"font-size","0.5em"),this.renderer.setStyle(i,"text-align","center"),this.renderer.setStyle(i,"font-family","inherit"),this.renderer.setStyle(r,"text-align","center"),this.renderer.setStyle(r,"font-family","inherit"),this.inappElement.lblPos==="start"?(n.appendChild(i),n.appendChild(r)):(n.appendChild(r),n.appendChild(i)),this.renderer.setStyle(n,"display","flex"),this.renderer.setStyle(n,"flex-direction",this.inappElement.horizontal?"":"column"),this.renderer.setStyle(n,"justify-content","center"),this.renderer.setStyle(n,"align-items","center"),this.renderer.setStyle(n,"gap","5px"),this.spans.push(r),n}processAndStartTimer(){let t=this.inappElement.timer.start(this.inappElement.timerType,n=>{this.spans.forEach(r=>{r.id===`lc-${us.DAYS}`?r.innerText=String(n.days).padStart(2,"0"):r.id===`lc-${us.HOURS}`?r.innerText=String(n.hours).padStart(2,"0"):r.id===`lc-${us.MINUTES}`?r.innerText=String(n.minutes).padStart(2,"0"):r.id===`lc-${us.SECONDS}`&&(r.innerText=String(n.seconds).padStart(2,"0"))})});this.triggerContext.intervals.push(t)}},eh=class extends wi{constructor(e,t,n){super(e,t,n),this.inappHTMLEl=this.renderer.createElement("select"),this.insertElement()}render(){this.renderer.setStyle(this.inappHTMLEl,"background","#ffffff00"),this.renderer.setStyle(this.inappHTMLEl,"outline","none"),this.processCommonBlocks(),this.addListener(this.inappHTMLEl),this.addOptions()}addListener(e){this.triggerContext.selectedEmbeddedItems?.length||this.updateItems(this.triggerContext.triggerData.items[0].vars[0]),e.addEventListener("click",t=>{t.stopPropagation()}),e.addEventListener("change",()=>{let t=new vi(JSON.parse(e.value));this.updateItems(t)})}updateItems(e){let t=this.triggerContext.triggerData.items[0];this.triggerContext.selectedEmbeddedItems=[t.toEmbed(e)];let n=this.parentHTMLEl.querySelector("#coo-13");if(!n)return;let r=e.imgs[0]??t.imgs?.at(0);r?.url&&n.setAttribute("src",r.url)}addOptions(){let e=this.triggerContext.triggerData.items,t=this.inappHTMLEl;if(!e?.length){t.add(this.createOption(this.inappElement.placeholderText));return}let n=this.triggerContext.selectedEmbeddedItems?.at(0);e[0].vars.forEach(r=>{t.add(this.createOption(r.name??"Default",r,r.mID===n?.vID))})}createOption(e,t,n){let r=this.renderer.createElement("option");return r.text=e,r.value=JSON.stringify(t),n&&(r.selected=!0),t||(r.disabled=!0),r}},th=class extends Fs{constructor(e,t,n){super(e,t,n)}render(){super.render(),this.inappHTMLEl.setAttribute("id",`coo-${this.inappElement.type}`)}},yc=class xc{static ACTIVE_TRIGGER_DATA;renderer=sr.get();safeHTTP;parent;rootContainer;containerHTMLElement;ian;triggerContext;resizeListener;cartDrawerToggleSubscription;constructor(t){this.safeHTTP=Ve.getInstance(),this.resizeListener=()=>this.screenResized(),this.setParentContainer(t)}setParentContainer(t){this.parent=t??document.body,this.renderer.setParentContainer(this.parent)}render(t){this.renderEngagement(new Hn(t))}async renderEngagement(t){if(this.triggerContext=new cc(new Date,t),this.triggerContext.onClose(n=>{this.closeInApp(n)}),this.ian=t.ian,(this.renderer.isMobile()||t.previewType==="mobile")&&this.ian.overrideForMobileView(),this.ian.isEmbedded()){let n=document.querySelector(this.ian.getEmbeddedSelector());this.setParentContainer(n)}await this.preloadImages(t),t.shouldDelay()?window.setTimeout(()=>{this.withCartDrawerClosed()},t.getDelaySeconds()):this.withCartDrawerClosed()}withCartDrawerClosed(){if(!Gt.get().isOpen()||!this.renderer.isMobile()){this.startRenderingOnce();return}this.cartDrawerToggleSubscription=Gt.get().onToggle().subscribe(({open:t})=>{!t&&this.startRenderingOnce()})}startRenderingOnce(){if(!this.shouldSkipCampaign()){xc.ACTIVE_TRIGGER_DATA=this.triggerContext.triggerData;try{this.startRendering()}catch(t){_t.getInstance().captureException(t,{triggerData:JSON.stringify(this.triggerContext.triggerData)});return}this.sendTriggerDisplayed(),this.renderer.isMobile()||window.addEventListener("resize",this.resizeListener),this.cartDrawerToggleSubscription?.unsubscribe()}}shouldSkipCampaign(){let t=this.triggerContext.triggerData;if(!t.previewType&&xc.ACTIVE_TRIGGER_DATA){let r={triggerShown:new bo(xc.ACTIVE_TRIGGER_DATA??{})};return this.skipTrigger(t,r),!0}if(Oe.get().isGoKwikPopupOpen)return this.skipTrigger(t,{reason:"GoKwik popup is open"}),!0;let n=k.PAYMENT_MODAL_DETAILS.find(r=>!!document.querySelector(r.identifier));return n?(this.skipTrigger(t,{reason:`${n.gateway} modal is open`}),!0):!1}startRendering(){this.renderer.calculateScalingFactor(this.ian),this.rootContainer=new Xl(this.parent,this.ian,this.triggerContext).render();try{this.renderContainer(this.triggerContext)}catch(t){throw C.error(t),t}}sendTriggerDisplayed(){let t={};this.triggerContext.triggerData.items?.length&&(t.promotedMIDs=this.triggerContext.triggerData.items?.map(i=>i.mID));let n=new We(k.EVENT_TRIGGER_DISPLAYED,t,this.triggerContext.triggerData);this.safeHTTP.sendEvent(n);let r={action:k.CAMPAIGN_DISPLAYED_ACTIVITY};document.dispatchEvent(new CustomEvent(k.POPUP_ACTIVITY_EVENT,{detail:r}))}sendTriggerClosed(t){let n=t.eventName;delete t.eventName;let r=new We(n,t,this.triggerContext.triggerData);r.name===k.EVENT_TRIGGER_CLICKED&&(r.items=this.triggerContext.selectedEmbeddedItems??this.triggerContext.triggerData.items?.map(i=>i.toEmbed())),this.safeHTTP.sendEvent(r)}addEnterAnimation(t){this.containerHTMLElement.animate(t.getEnterAnimation(),{duration:500})}renderElement(t,n,r){n instanceof ec?new Xp(t,n,r).render():n instanceof tc?new Jp(t,n,r).render():n instanceof So?new Kl(t,n,r).render():n instanceof nc?new th(t,n,r).render():n instanceof Zi?new Fs(t,n,r).render():n instanceof Ns?new Zl(t,n,r).render():n instanceof Ja?new Qp(t,n,r).render():n instanceof Qa?new eh(t,n,r).render():C.error("Unsupported element type- "+n.type)}renderContainer(t){let n=this.ian?.cont;n&&(this.containerHTMLElement=new Zp(this.rootContainer,n,t).render().getHTMLElement(),new qp().loadAllFonts(this.ian),this.ian.elems?.forEach(async r=>{await this.renderElement(this.containerHTMLElement,r,t)}),this.addEnterAnimation(this.ian.anim))}closeInApp(t){let n=this.ian.anim.getExitAnimation();this.sendTriggerClosed(t),xc.ACTIVE_TRIGGER_DATA=void 0;let r=this.containerHTMLElement.animate(n,{duration:500,easing:"ease-in-out"});r.onfinish=()=>{this.removeInApp(),window.removeEventListener("resize",this.resizeListener)}}screenResized(){this.removeInApp(),this.startRendering()}removeInApp(){sr.get().removeInApp(this.triggerContext)}skipTrigger(t,n){let r=new We(k.EVENT_CAMPAIGN_REJECTED,n,t);this.safeHTTP.sendEvent(r)}async preloadImages(t){let n=t.ian;if(!n)return;let r=[];n.elems.forEach(i=>{let s=i.bg?.img?.src;if(s&&r.push(this.getPromise(s)),i.t===1){let o=i.src;if(!o)return;r.push(this.getPromise(o))}}),n.bg?.img?.src&&r.push(this.getPromise(n.bg.img.src)),n.cont.bg?.img?.src&&r.push(this.getPromise(n.cont.bg.img.src)),await Promise.all(r)}getPromise(t){return new Promise(n=>{let r=new Image;r.onload=n,r.src=t,r.style.display="none"})}},nh=class{compareCartItemSubject=new J;constructor(){this.compareCartItemSubject.pipe(Ar(100)).subscribe(this.compareCartItems.bind(this))}listen(){this.compareCartItemSubject.next(),this.overwriteXMLHttpRequest(),this.overwriteFetchMethod()}overwriteXMLHttpRequest(){let e=this,t=window.XMLHttpRequest.prototype.send;window.XMLHttpRequest.prototype.send=function(){return this.addEventListener("load",function(){e.performEvent(this._url).catch(n=>C.error("Unable to process cart change in XMLHttpRequest",n))}),t.apply(this,arguments)},C.debug("Securely overwritten window.XMLHttpRequest.send method")}overwriteFetchMethod(){let e=this,t=window.fetch;window.fetch=function(n){return t.apply(window,arguments).then(r=>(e.performEvent(n.toString()).catch(i=>C.error("Unable to process cart change in fetch",i)),r))},C.debug("Securely overwritten window.fetch method")}async performEvent(e){this.isCartManipulationURL(e)&&(Oe.get().isCartDirty=!0,this.compareCartItemSubject.next())}isCartManipulationURL(e){return/\/cart\/(add|change|update|clear)/.test(e)}sendChangesAsEvents(e,t){let n=e?.items,r=t.items,i=[],s=[];if(C.debug(`Comparing cart change with old count ${n?.length} to new count ${r.length}`),r?.forEach(o=>{let a=n?.find(l=>l.vID===o.vID);if(a){if(a.quantity!==o.quantity){let l=a.quantity<o.quantity,c=Math.abs(a.quantity-o.quantity),h=te(w({},o),{quantity:c});l?i.push(h):s.push(h)}n&&ce.removeFromArray(n,a)}else i.push(o)}),n)for(let o of n)s.push(o);C.debug(`Cart delta: added: ${i.length}, removed: ${s.length}`),i.length&&this.sendEvent(k.EVENT_ADD_TO_CART,{items:i}),s.length&&e.token===t.token&&this.sendEvent(k.EVENT_REMOVE_FROM_CART,{items:s}),(s.length||i.length)&&mi.get().broadcast(k.CART_UPDATE_BROADCAST,{itemsAdded:i,itemsRemoved:s})}sendEvent(e,t){let n=new We(e,t);Te.get(Ve).sendEvent(n)}async compareCartItems(){let e=await rt.get(ge.CURRENT_CART,{}),t=await Ge.getCurrent().getNormalisedCart(!0);this.sendChangesAsEvents(e,t)}},rh=class{listen(){return this.overwriteFetchMethod(),this}overwriteFetchMethod(){let e=this,t=window.fetch;window.fetch=async function(n,r){try{await e.modifyRequest(n,r)}catch(i){_t.getInstance().captureError("Failed to modify graphql request",i,{body:JSON.stringify(r?.body)})}return t(n,r)},C.debug("Securely overwritten window.fetch method for graphql query")}async modifyRequest(e,t){let n=typeof e=="string"?e:e instanceof Request?e.url:"";if(!(n.includes("graphql.json")&&t?.method==="POST")||!t.body)return;let r;if(typeof t.body=="string")try{r=JSON.parse(t.body)}catch{return}else r=t.body;C.debug("Intercepted fetch request of:",n),r?.query.includes("cartCreate")&&(t.body=await this.updatedBody(r),this.sendBuyNowEvent())}async updatedBody(e){let t=e.variables.input.attributes??[],n=await ce.getCartAttributes();return e.variables.input.attributes=[...t,...n],JSON.stringify(e)}sendBuyNowEvent(){let e=Oe.get().getCurrentItem();if(!e)return;let t=new We(k.EVENT_BUY_NOW_CLICKED,{items:[e]});Ve.getInstance().sendEvent(t)}},vc=class{constructor(e,t){this.selectors=e,this.eventName=t,this.selectorString=e.join(",")}static INSTANCE;elements;selectorString;clickListenerCallback=e=>{let t=e.currentTarget,n=new We(this.eventName,{class:t.className||void 0,tagName:t.tagName||void 0,id:t.id||void 0});Ve.getInstance().sendEvent(n),this.removeClickListener(this.clickListenerCallback)};listenSilently(){this.listen().catch(e=>C.error(e))}async listen(){this.elements=await ce.retrySelectorForElements(this.selectorString),this.elements.forEach(e=>{e.addEventListener("click",this.clickListenerCallback)})}removeClickListener(e){this.elements?.forEach(t=>{t.removeEventListener("click",e)})}},ih=class Mf extends vc{static selectors=[".product__thumbnail-list-inner > button","product-gallery-navigation > button",".product-media--thumb-container",".product-images-inner > img",".m-product-media",".swiper-button-control",".media__thumb",".slick-arrow",".productView-img-container.product-single__media",".product-gallery__thumbnail_item_inner"];constructor(){super(Mf.selectors,k.EVENT_ITEM_THUMBNAIL_CLICKED)}static getInstance(){return this.INSTANCE||(this.INSTANCE=new Mf),this.INSTANCE}},oh=class Uf extends vc{static selectors=[".jdgm-widget.jdgm-preview-badge.jdgm-preview-badge--with-link.jdgm--done-setup","reviewsio-product-ratings",".ruk_rating_snippet.tracked:not(.hidden)","a > .loox-rating",".yotpo-reviews-star-ratings-widget",".yotpo.lp-hero__reviews",".pr-rating > a",".rivyoReviewWidget"];constructor(){super(Uf.selectors,k.EVENT_REVIEW_CLICKED)}static getInstance(){return this.INSTANCE||(this.INSTANCE=new Uf),this.INSTANCE}},sh=class{selector=[".gokwik-checkout button","button.cart__checkout-button","button.cart__checkout","button#checkout","button#checkout2",'button[id*="checkout" i]','button[name*="checkout" i]','button[class*="checkout" i]'].join(",");listen(){ce.onDocumentLoaded(()=>{C.debug("Execution order:","document ready"),this.useLocationHash()})}useLocationHash(){let e=window.location.hash?.substring(1);if(e)if(e.includes(k.HASH_INITIATE_CHECKOUT)){document.dispatchEvent(new Event(k.THIRD_PARTY_CHECKOUT_EVENT));let t=document.querySelector(this.selector);if(!t){C.debug("No clickable cart checkout button found");return}C.debug("Clickable cart checkout button found",t),t.click()}else e.includes(k.HASH_OPEN_CART_DRAWER)&&Gt.get().open()}},ah=class{trackSilently(){this.track().catch(e=>_t.getInstance().captureException(e))}async track(){let e=window.Shopify?.checkout,t=window.Shopify?.Checkout;if(!e&&!t)return;let n={};this.processSmallCheckout(e,n),this.processBigCheckout(t,n);let r=this.getTokenFromCurrentURLPath();if(r&&(n.urlToken=r),!Object.keys(n).length){C.warn("No processable data found in",e,t);return}n.referrer=document.referrer,n.url=location.href;let i=await Te.get(zt).checkSessionAndGetContext();n.sessionID=i[0],this.trackOrder(n)}processSmallCheckout(e,t){e&&(e.order_id&&(t.orderID=e.order_id.toString()),e.token&&(t.checkoutToken=e.token.toString()),e.customer_id&&(t.customerID=e.customer_id.toString()))}processBigCheckout(e,t){e&&(e.token&&!t.checkoutToken&&(t.checkoutToken=e.token.toString()),e.cartToken&&(t.cartToken=e.cartToken.toString()))}trackOrder(e){C.info("Found order to be send",e),Ve.getInstance().trackOrder(e)}getTokenFromCurrentURLPath(){let e=new RegExp("[A-Fa-f0-9]{28,32}");return location.pathname?.split("/").find(t=>t.length&&e.test(t))}},Jl=class{static attachCheckoutListener(){window.gokwikSdk&&window.gokwikSdk.on("checkout_initiated",async()=>{let e=await Ge.getCurrent().getNormalisedCart(),t={via:"GoKwik",items:e.items,cartToken:e.token,amount:{value:e.amount,currency:e.currency}},n=new We(k.EVENT_CHECKOUT_STARTED,t);Ve.getInstance().sendEvent(n)})}},ch=class{async migrate(){}};_n.escape=lx.MustacheUtils.escapeHtml;var gt=class{static globalRef;static authenticated;static async initForMerchantWebsiteOnly(){window.cooeeSDKPreview||(this.initGlobalReference(),await new ch().migrate(),this.autoAuthenticate(),new Gp().meddle(),Te.get(Oo).loadExperimentSilently(),new zp().listen(),new ah().trackSilently(),new nh().listen(),new rh().listen(),new sh().listen(),Te.get(mc).listen(),Te.get(oh).listenSilently(),Te.get(ih).listenSilently(),Te.get(Gr).loadPageWidgetsSilently(),this.attachGoKwikListeners(),this.storePreviewParams(),this.setupPreviewListeners(),Dr.watch())}static async initForAll(){this.injectWidgetAssets()}static initGlobalReference(){window.CooeeSDK||Fa(window,"CooeeSDK",{}),this.globalRef=window.CooeeSDK,Fa(this.globalRef,"config",new vt),Fa(this.globalRef,"runtimeData",new Oe),C.debug("Global reference initialised")}static injectWidgetAssets(){Nt.injectScriptURL(mn.widgetURL,"cooee-widget-sdk"),Nt.injectStylesheet(mn.styleURL)}static autoAuthenticate(){let e=Dt.getShopName();e&&this.authenticate({shopifyShop:e})}static authenticate(e){if(this.authenticated)return;let t=e.appID?.trim(),n=e.shopifyShop;if((ce.isNull(t)||t.length!==24)&&ce.isNull(n)){C.warn("Cooee App ID or Shop name is not configured");return}this.authenticated=!0,Te.get(zt).init(e)}static sendEvent(e,t,n){let r=new We(e,t,n?.triggerData);n?.occurred&&(r.occurred=n.occurred),Te.get(Ve).sendEvent(r)}static updateProfile(e){for(let t in e)if(t.toLowerCase().startsWith("ce "))throw new Error("User property name cannot start with 'CE '");Te.get(Ve).updateProfile(e)}static setPageName(e){if(!e)return;let t=Oe.get(),n=t.pageName;if(e===n)return;if(t.pageName=e,e==="cart"&&Te.get(Gr).loadOrRenderWidgetsAfterCartChange(),k.BLACKLISTED_PAGE_NAMES.some(s=>e.includes(s))){Te.get(mc).resetScrollID();return}let r={};n&&(r.ps=n);let i=new We(k.EVENT_SCREEN_VIEW,r);i.occurred=t.jsLoadTime,Te.get(Ve).sendEvent(i),Te.get(mc).resetScrollID(i.occurred)}static previewPopup(e,t){new yc(t).render(e)}static previewWidget(e){new Kn(new Hn(e)).render()}static setupPreviewListeners(){if(window.opener){try{window.opener.postMessage({action:"COOEE_READY_FOR_PREVIEW"},"*")}catch(e){C.error(e)}window.addEventListener("message",e=>{if(C.debug("Received event",e),!e.origin.includes("letscooee.com")&&!e.origin.includes("localhost"))return;let t=e.data;typeof t=="object"&&(t.action==="POPUP_PREVIEW"?(this.previewPopup(t.engagementTrigger),e.source?.postMessage({action:"PREVIEW_SUCCESSFUL"},e.origin)):t.action==="WIDGET_PREVIEW"&&(this.previewWidget(t.engagementTrigger),e.source?.postMessage({action:"PREVIEW_SUCCESSFUL"},e.origin)))})}}static attachGoKwikListeners(){let e=Oe.get();window.addEventListener("kp-modal:opened",()=>{e.isGoKwikPopupOpen=!0}),window.addEventListener("user-loggedin",t=>{let{token:n}=t.detail;n&&this.updateProfile({goKwikToken:n})}),window.gokwikSdk?Jl.attachCheckoutListener():window.addEventListener("gokwikLoaded",Jl.attachCheckoutListener)}static storePreviewParams(){let e=Oe.get(),t=new URLSearchParams(location.search),n=t.get("cooee-preview");n&&(e.previewIDs=n.trim().split(",").filter(i=>Number.isInteger(+i)));let r=t.get("cooee-variant");r&&(e.previewVariant=r)}},lh=class FD{static INSTANCE;constructor(){this.init()}static getInstance(){return this.INSTANCE||(this.INSTANCE=new FD),this.INSTANCE}init(){Nl.get(ge.APP_CONFIG,{}).then(t=>this.updateGlobalConfig(t))}async processAppConfigurations(t){C.log("Received app configuration",t),t.currencyCount=t.currencies?.length;let n=this.updateGlobalConfig(t);Nl.set(ge.APP_CONFIG,n).catch(r=>C.error(r)),op.processConfiguration(),n.website&&(Nt.injectRawScript(n.website.commonJS),Nt.injectRawCSS(n.website.commonCSS)),Gt.get().onToggle().subscribe(async({open:r})=>{C.info("Cart drawer is now",r?"open":"closed"),r&&(Te.get(Gr).loadOrRenderWidgetsAfterCartChange(),await this.trackViewCartEvent())})}updateGlobalConfig(t){let n=gt.globalRef.config.update(t);return Gt.forceUpdate(),C.debug("App configurations",n),n}async trackViewCartEvent(){let t=await Ge.getCurrent().getNormalisedCart(),n={value:t.amount,currency:t.currency},r={items:t.items,amount:n,drawer:!0};Ve.getInstance().sendEvent(new We(k.EVENT_VIEW_CART,r))}},ux=Re(b_()),uh=class Vf{static META_REQUIRED_FIELDS=["ad_id"];static GOOGLE_REQUIRED_FIELDS=["gad_source","gclid"];source;adID;campaignID;adName;campaignName;constructor(t){this.adID=t.adID,this.campaignID=t.campaignID,this.source=t.source}static getAdParams(){let t;try{t=new ux.URLBuilder(location.href)}catch{return{}}let n={};if(this.META_REQUIRED_FIELDS.every(r=>Array.from(t.getParams().keys()).includes(r)))return n={source:"META",adID:t.getQueryParam("ad_id")?.trim(),campaignID:t.getQueryParam("campaign_id")?.trim()},new Vf(n);if(this.GOOGLE_REQUIRED_FIELDS.every(r=>Array.from(t.getParams().keys()).includes(r)))return n={source:"GOOGLE"},new Vf(n)}},Ps=class jD{static INSTANCE;httpAPIService=On.getInstance();coreService=lh.getInstance();sentryService=_t.getInstance();sdkToken="";userID="";deviceID="";appID="";shopifyShop="";constructor(){}static getInstance(){return this.INSTANCE||(this.INSTANCE=new jD),this.INSTANCE}init(t){this.appID=t.appID,this.shopifyShop=t.shopifyShop}async storeAndPopulateAuthData(t){t&&(t.userID&&(this.userID=t.userID,await rt.set(ge.ID,t.userID)),t.deviceID&&(this.deviceID=t.deviceID,await rt.set(ge.DEVICE_ID,t.deviceID)),t.sdkToken&&(this.sdkToken=t.sdkToken,await rt.set(ge.SDK_TOKEN,t.sdkToken)),this.updateAPIClient())}async validateSession(t){await this.populateFirstSeen(),await this.populateUserDataFromStorage(),C.log("Validating session with server");let n=await this.getSessionValidateData(t);try{let r=await this.httpAPIService.validateSession(n);C.log("Validating session Response",r),await this.coreService.processAppConfigurations(r.appSettings),await this.storeAndPopulateAuthData(r)}catch(r){throw C.error(r),r}}async populateUserDataFromStorage(){if(this.sdkToken=await rt.get(ge.SDK_TOKEN),!this.sdkToken){C.warn("No SDK token found in local storage");return}this.userID=await rt.get(ge.ID),this.deviceID=await rt.get(ge.DEVICE_ID),this.updateAPIClient()}updateAPIClient(){C.debug("SDK Token:",this.sdkToken),C.log("Device ID:",this.deviceID),C.log("User ID:",this.userID),Ga.trackDeviceID(this.deviceID),Dr.prepend(`Device ID: <strong>${this.deviceID}</strong>`),this.httpAPIService.setAPIToken(this.sdkToken),this.sentryService.setGlobalContext("Visitor Info",{device_id:this.deviceID,user_id:this.userID}),this.sentryService.setUser({id:this.deviceID})}async getSessionValidateData(t){let n=await new rp().get();n.host=location.origin;try{(await _T())?.isPrivate&&(n.private=!0)}catch(i){dx.default.error("Unable to detect private/incognito window",i)}let r=await rt.get(ge.DEVICE_ID);return r||(r=new un().toHexString(),await rt.set(ge.DEVICE_ID,r)),te(w({deviceID:r,deviceProps:n,appID:this.appID,shopifyShop:this.shopifyShop},t),{sdk:k.SDK,page:hi.parseFromCurrent(),ad:uh.getAdParams(),occurred:this.getSessionStartTime(Oe.get().jsLoadTime),currentItem:Oe.get().getCurrentItem(),cart:await Ge.getCurrent().getNormalisedCart(),properties:{}})}async populateFirstSeen(){let t=await rt.get(ge.FIRST_SEEN),n=t?new Date(t):new Date;t||await rt.set(ge.FIRST_SEEN,n.toISOString()),this.httpAPIService.setFirstSeen(n),this.sentryService.setGlobalContext("Visitor Info",{first_seen:n.toISOString()})}getSessionStartTime(t){return(new Date().getTime()-t.getTime())/1e3>k.IDLE_TIME_IN_SECONDS?new Date:t}},zt=class Ic{static replaySubject=new Bo(1);static INSTANCE;sentryService=Te.get(_t);lock=new Wa;constructor(){}static getInstance(){return this.INSTANCE||(this.INSTANCE=new Ic),this.INSTANCE}init(t){if(C.debug("Initialising SDK",t),vT(navigator.userAgent)){C.info("This seems to be a bot. Disabling SDK");return}Ps.getInstance().init(t),Ic.INSTANCE.checkForNewSession(!0).then(async()=>{Ic.replaySubject.next(!0),Ic.replaySubject.complete()}).catch(n=>{C.error("Unable to initiate session",n)})}getCurrentSessionID(){return yn.set(ge.SESSION_LAST_USED_TIME,new Date().getTime()),yn.get(ge.ID,"")}async checkSessionAndGetContext(){return await this.checkForNewSession(),this.getContext()}async getContext(){let t=await Promise.all([this.getCurrentSessionID(),this.getCurrentSessionNumber(),this.getLandingPage()]);return this.sentryService.setGlobalContext("Visitor Session",{id:t[0],number:t[1],landing_page:t[2]}),t}async checkForNewSession(t){await this.lock.acquire();let n=!1;if(await this.isNewSessionRequired()?(await this.startNewSession(),t=!0,n=!0):await this.notSynced()&&(n=!0),t){let r=await this.getContext();await Ps.getInstance().validateSession({sessionID:r[0],sessionNumber:r[1],landingPage:r[2],newSession:n}),await yn.set(ge.SESSION_SYNCED,!0)}this.lock.release()}async startNewSession(){C.debug("Starting new session"),await yn.clear(),C.debug("Cleared SessionStorage before starting new session");let t=new Date,n=new un().toHexString();C.debug("New session ID to be used",n);let r=await rt.get(ge.SESSION_NUMBER,0)+1;Dr.prepend(`New Session ID: <strong>${n}</strong> & number: ${r}`),await Promise.all([rt.set(ge.SESSION_NUMBER,r),yn.set(ge.ID,n),yn.set(ge.SESSION_LAST_USED_TIME,t.getTime()),yn.set(ge.SESSION_LANDING_PAGE,hi.parseFromCurrent())])}getLandingPage(){return yn.get(ge.SESSION_LANDING_PAGE,{})}getCurrentSessionNumber(){return rt.get(ge.SESSION_NUMBER,1)}async isNewSessionRequired(){if(!await yn.get(ge.ID))return!0;let t=await yn.get(ge.SESSION_LAST_USED_TIME,0);return t?(new Date().getTime()-t)/1e3>k.IDLE_TIME_IN_SECONDS:!0}async notSynced(){return!await yn.get(ge.SESSION_SYNCED,!1)}},hx=Re(qn()),fx=Re(qn()),px=Re(Ta()),dh=class{triggerData;safeHttpService=Ve.getInstance();render(e){e.contentSource===fx.EngagementContentSource.KLAVIYO&&(this.triggerData=e,window.addEventListener("klaviyoForms",this.handleKlaviyoEvents.bind(this)),window._klOnsite=window._klOnsite||[],window._klOnsite.push(["openForm",e.klaviyoFormID]))}handleKlaviyoEvents(e){if(e.type!=="klaviyoForms")return;let t=e.detail;if(t.formId!==this.triggerData.klaviyoFormID){C.warn("Received invalid trigger callback");return}switch(t.type){case"open":this.safeHttpService.sendEvent(new We(k.EVENT_TRIGGER_DISPLAYED,{form:{id:t.formId}},this.triggerData));break;case"stepSubmit":{let n=this.getFormDetails(t);this.safeHttpService.sendEvent(new We(k.EVENT_FORM_SUBMITTED,{form:n},this.triggerData)),this.safeHttpService.updateProfile(n);break}case"close":window.removeEventListener("klaviyoForms",this.handleKlaviyoEvents.bind(this)),this.safeHttpService.sendEvent(new We(k.EVENT_TRIGGER_CLOSED,{form:{id:t.formId}},this.triggerData));break}}getFormDetails(e){let t={id:e.formId},n=e.metaData;if(px.JSUtils.hasKeys(n)){let r=["email","phone_number","first_name","last_name","$email","$phone_number","$first_name","$last_name"];Object.keys(n).forEach(o=>{r.includes(o)||(t[o]=n[o])}),t.email=n.$email??n.email,t.mobile=n.$phone_number??n.phone_number;let i=n.$first_name??n.first_name,s=n.$last_name??n.last_name;(i?.length||s?.length)&&(t.name=i+" "+s)}return t}},fh=class{static trackIntent(e){if(!this.isInstalled()){C.log("Facebook pixel not installed");return}if(!vt.get().pixelPush){C.log("Facebook pixel push not enabled");return}let t=Is[e.intent]?.toLowerCase(),n=e.segmentName;!t&&!n||(C.debug(`Sending ${t} intent and ${n} segment to Facebook Pixel`),window.fbq("trackCustom","CooeeIntent",{intent_value:t,segment_value:e.segmentName}))}static isInstalled(){return window.fbq&&typeof window.fbq=="function"}},ph=class HD{static INSTANCE;httpService=Te.get(On);sentryService=Te.get(_t);sessionManager=Te.get(zt);runtime=Oe.get();constructor(){}static getInstance(){return this.INSTANCE||(this.INSTANCE=new HD),this.INSTANCE}sendSilently(t){this.send(t).catch(n=>C.error(`Failed to send ${t.name}`,n))}async send(t){if(C.debug(`Sending event ${t.name}`),Dr.prepend(`Sending event <strong>${t.name}</strong> with id ${t.id}`),this.shouldReject(t)){C.warn(`Rejecting event ${t.name}`);return}await Promise.all([this.addSessionContext(t),this.addShopifyContext(t)]),this.addShopifyAttributes(),t.name!==k.EVENT_APP_BACKGROUND&&this.runtime.setActive(),t.currentItem=this.runtime.getCurrentItem(),t.locale=this.runtime.locale,this.httpService.post("/v1/event/track",t).then(async n=>{C.log("\u2705 Event tracked:",t.name),Dr.prepend(`\u2705 Event <strong>${n.eventName}</strong> tracked`),this.processEventResponse(t,n)}).catch(n=>{C.error(`Error sending event ${t.name} to server`,n)})}shouldReject(t){return t.trigger?.triggerID==="test"||t.trigger?.triggerID==="preview"?(C.warn("Not sending event as this is a test trigger"),!0):!1}async addSessionContext(t){let n=await this.sessionManager.checkSessionAndGetContext();t.sessionID=n[0],t.sessionNumber=n[1],t.landingPage=n[2],t.page=hi.parseFromCurrent()}async addShopifyContext(t){if(Dt.isShopify())try{t.cart=await Ge.getCurrent().getNormalisedCart()}catch(n){C.error("Error fetching Shopify cart before sending the event",n)}}processEventResponse(t,n){this.renderWidgetIfAny(t,n).catch(r=>{C.error("Failed to display a campaign",r,t,n),this.sentryService.captureException(r,{event:t,response:n})}),this.utiliseIntentIfCalculated(n)}async renderWidgetIfAny(t,n){if(!n.triggerData){C.log(`Nothing to engage after ${t.name}`);return}C.log(`\u{1F4E3} Engagement(id=${n.triggerData.shortID}) will be shown`,n.triggerData);let r=new Hn(n.triggerData);r.occurred=t.occurred;let i;try{i=await lc.refreshItems(r)}catch(s){C.error("Failed to refresh the products",s);return}if(r.items=i,r.contentSource===hx.EngagementContentSource.KLAVIYO){new dh().render(r);return}new yc().renderEngagement(r).catch(s=>{C.error("Failed to render popup",s),this.sentryService.captureException(s,{event:t,triggerData:r})})}utiliseIntentIfCalculated(t){t.intent&&(Ga.trackIntent(t.intent),fh.trackIntent(t),Dr.prepend(`Intent is <strong>${Is[t.intent]}</strong>`))}addShopifyAttributes(){Dt.isShopify()&&Ge.getCurrent().addCooeeAttributes().catch(t=>{C.error("Fail to add attributes in cart",t)})}},Ve=class $D{static INSTANCE;httpApiService=On.getInstance();eventAPIService=ph.getInstance();constructor(){}static getInstance(){return this.INSTANCE||(this.INSTANCE=new $D),this.INSTANCE}sendEvent(t){C.debug(`Waiting for auth to send event ${t.name}`),zt.replaySubject.subscribe(async()=>{this.eventAPIService.sendSilently(t)})}updateProfile(t){zt.replaySubject.subscribe(()=>{this.httpApiService.updateUserData(t??{})})}trackOrder(t){zt.replaySubject.subscribe(()=>{this.httpApiService.trackOrder(t)})}updateDeviceProps(t){zt.replaySubject.subscribe(()=>{this.httpApiService.updateDeviceProps({props:t})})}generateDiscount(t){return this.httpApiService.generateDiscount(t)}},Ro=class{constructor(e,t){this.triggerContext=e,this.element=t}safeHTTP=Ve.getInstance();async execute(e){let t=Oe.get().getCurrentItem(),n=e.clickAction||this.element?.clc;if(!n)return;let r=e.item,i=this.triggerContext,s=new Mo,o=i.triggerData.redirectBehaviour,a=!!i.triggerData.discount.type&&!!n?.applyDiscount,l={selectedVariants:i.triggerData.nonMutableItems.map(b=>({itemMID:b.mID,mID:b.selectedOrFirstVariant.value.mID})),eID:i.triggerData.engagementID,cID:i.triggerData.contentID},c="",h=[],d=[];if(r?d=[r.toEmbed()]:e.embeddedItem&&(d=[e.embeddedItem]),n.at===108){let b=i.selectedItems;if(d=e.embeddedItems??b.map(x=>x.toEmbed()),i.shouldGiveFBTDiscount||e.embeddedItems?.length){let x;e.embeddedItems?x=e.embeddedItems.map(F=>({itemMID:F.mID,mID:F.vID,quantity:F.quantity})):x=b.map(F=>({itemMID:F.mID,mID:F.selectedOrFirstVariant.value.mID}));let A=i.triggerData.bundleFrom;i.triggerData.isBundleOnCartDrawer()&&A&&(x.push({itemMID:A.mID,mID:A.selectedOrFirstVariant.value.mID,isPrimary:!0}),d.unshift(A.toEmbed())),l.selectedVariants=x,i.triggerData.isBundleOnPDP()&&l.selectedVariants.forEach(F=>{F.mID===t.vID&&(F.isPrimary=!0)})}else l=void 0;h=e.embeddedItems??b}else if(n.at===107){let b=await Ge.getCurrent().getNormalisedCart();d=b.items,l.selectedVariants=b.items.map(x=>({itemMID:x.mID,mID:x.vID}))}else if(n.at===102)h=r?[r]:[e.embeddedItem];else if(n.at===101)c=r?Dt.getRootPrefix()+"products/"+r.slug:e.embeddedItem?.link;else if(n.at===4){let b=ce.isValidURL(n.gu?.u);b&&(c=b.href)}else if(n.at===109){let b=await s.upgradeToSubscription(r,i.triggerData);this.triggerContext.triggerData.skipSubscribedItems&&this.triggerContext.renderer.destroy(),Gt.get().refreshUI(b)}else if(n.at===104){let b=this.triggerContext.triggerData.collections?.[0];b&&(c="collections/"+b.handle)}if(this.sendTriggerClicked(d,{from:"button"},e.video),C.debug({redirectPath:c,redirectBehaviour:o,hasDiscount:a}),!a&&c){location.href=c;return}let f,g=!1;try{f=await this.getOrGenerateDiscountCode(l),C.debug("Discount code (if any) to apply",f)}catch(b){if(!this.triggerContext.triggerData.isBYOB()){gx.default.error("Unable to get a discount code",b);return}}if(f&&n.at===103)await s.performCopyCoupon(f);else if(n.at===110){let b=await s.performCartCreate(t,f,i.triggerData);b&&(location.href=b);return}try{f&&await Ao.applyWithStorefront(f)}catch(b){C.error(b),g=!0}let m;if(h?.length&&(m=await s.performAddToCart(h,i.triggerData)),g&&f){Ao.navigate(f,o,c);return}if(c){location.href=c;return}Ao.navigateWithoutDiscount(o,m)}sendTriggerClicked(e,t,n){let r=k.EVENT_TRIGGER_CLICKED,i=new We(r,t,this.triggerContext.triggerData);i.items=e,n?.id&&(i.videos=[n.id]),this.safeHTTP.sendEvent(i)}async getOrGenerateDiscountCode(e){let t=this.triggerContext.triggerData.discount;if(!t?.type)return;let n="";if(t.type===mx.DiscountType.STATIC){if(!t.code)throw _t.getInstance().captureMessage("No discount code found","warning",{triggerContext:this.triggerContext}),new Error("No discount code found");return t.code}if(e){if(n=await this.generateDiscount(e),!n)throw C.error("No discount code found",e),new Error("Discount code not found or generated");return n}}async generateDiscount(e){try{return(await this.safeHTTP.generateDiscount(e))?.code}catch(t){throw ce.showSnackbar("Failed to generate a discount code"),C.error("Error generating discount code",t,e),_t.getInstance().captureMessage("Failed to generate discount code","error",{discountData:JSON.stringify(e),triggerContext:this.triggerContext,error:t}),t}}},Po=class{static getBestSources(e){if(!e)return[];let t=[],n=e.filter(i=>i.format==="mp4").sort((i,s)=>s.width-i.width)[0];n&&t.push(n);let r=e.filter(i=>i.format==="m3u8").sort((i,s)=>s.width-i.width)[0];return r&&t.push(r),t}},lE;function FV(){if(lE==null){let e=typeof document<"u"?document.head:null;lE=!!(e&&(e.createShadowRoot||e.attachShadow))}return lE}function _c(e){if(FV()){let t=e.getRootNode?e.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&t instanceof ShadowRoot)return t}return null}function hh(){let e=typeof document<"u"&&document?document.activeElement:null;for(;e&&e.shadowRoot;){let t=e.shadowRoot.activeElement;if(t===e)break;e=t}return e}function Zn(e){return e.composedPath?e.composedPath()[0]:e.target}function mh(e){return e.buttons===0||e.detail===0}function gh(e){let t=e.touches&&e.touches[0]||e.changedTouches&&e.changedTouches[0];return!!t&&t.identifier===-1&&(t.radiusX==null||t.radiusX===1)&&(t.radiusY==null||t.radiusY===1)}function uE(e,t=0){return BV(e)?Number(e):arguments.length===2?t:0}function BV(e){return!isNaN(parseFloat(e))&&!isNaN(Number(e))}function Xn(e){return e instanceof Ct?e.nativeElement:e}function Tn(e,t,n,r,i){let s=parseInt(Cy.major),o=parseInt(Cy.minor);return s>19||s===19&&o>0||s===0&&o===0?e.listen(t,n,r,i):(t.addEventListener(n,r,i),()=>{t.removeEventListener(n,r,i)})}var yh=new WeakMap,Bs=(()=>{class e{_appRef;_injector=O(ht);_environmentInjector=O(Gn);load(n){let r=this._appRef=this._appRef||this._injector.get(yr),i=yh.get(r);i||(i={loaders:new Set,refs:[]},yh.set(r,i),r.onDestroy(()=>{yh.get(r)?.refs.forEach(s=>s.destroy()),yh.delete(r)})),i.loaders.has(n)||(i.loaders.add(n),i.refs.push(Ud(n,{environmentInjector:this._environmentInjector})))}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),dE;try{dE=typeof Intl<"u"&&Intl.v8BreakIterator}catch{dE=!1}var Jn=(()=>{class e{_platformId=O(is);isBrowser=this._platformId?yD(this._platformId):typeof document=="object"&&!!document;EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent);TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent);BLINK=this.isBrowser&&!!(window.chrome||dE)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT;WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT;IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window);FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent);ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT;SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT;constructor(){}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),VV=new pe("cdk-dir-doc",{providedIn:"root",factory:UV});function UV(){return O(Qe)}var HV=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;function jV(e){let t=e?.toLowerCase()||"";return t==="auto"&&typeof navigator<"u"&&navigator?.language?HV.test(navigator.language)?"rtl":"ltr":t==="rtl"?"rtl":"ltr"}var Vs=(()=>{class e{value="ltr";change=new Je;constructor(){let n=O(VV,{optional:!0});if(n){let r=n.body?n.body.dir:null,i=n.documentElement?n.documentElement.dir:null;this.value=jV(r||i||"ltr")}}ngOnDestroy(){this.change.complete()}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Us;function yx(){if(Us==null){if(typeof document!="object"||!document||typeof Element!="function"||!Element)return Us=!1,Us;if("scrollBehavior"in document.documentElement.style)Us=!0;else{let e=Element.prototype.scrollTo;e?Us=!/\{\s*\[native code\]\s*\}/.test(e.toString()):Us=!1}}return Us}var $V=20,fE=(()=>{class e{_ngZone=O(Le);_platform=O(Jn);_renderer=O(hn).createRenderer(null,null);_cleanupGlobalListener;constructor(){}_scrolled=new J;_scrolledCount=0;scrollContainers=new Map;register(n){this.scrollContainers.has(n)||this.scrollContainers.set(n,n.elementScrolled().subscribe(()=>this._scrolled.next(n)))}deregister(n){let r=this.scrollContainers.get(n);r&&(r.unsubscribe(),this.scrollContainers.delete(n))}scrolled(n=$V){return this._platform.isBrowser?new nt(r=>{this._cleanupGlobalListener||(this._cleanupGlobalListener=this._ngZone.runOutsideAngular(()=>this._renderer.listen("document","scroll",()=>this._scrolled.next())));let i=n>0?this._scrolled.pipe(Lu(n)).subscribe(r):this._scrolled.subscribe(r);return this._scrolledCount++,()=>{i.unsubscribe(),this._scrolledCount--,this._scrolledCount||(this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0)}}):jo()}ngOnDestroy(){this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0,this.scrollContainers.forEach((n,r)=>this.deregister(r)),this._scrolled.complete()}ancestorScrolled(n,r){let i=this.getAncestorScrollContainers(n);return this.scrolled(r).pipe($o(s=>!s||i.indexOf(s)>-1))}getAncestorScrollContainers(n){let r=[];return this.scrollContainers.forEach((i,s)=>{this._scrollableContainsElement(s,n)&&r.push(s)}),r}_scrollableContainsElement(n,r){let i=Xn(r),s=n.getElementRef().nativeElement;do if(i==s)return!0;while(i=i.parentElement);return!1}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),WV=20,Ql=(()=>{class e{_platform=O(Jn);_listeners;_viewportSize;_change=new J;_document=O(Qe,{optional:!0});constructor(){let n=O(Le),r=O(hn).createRenderer(null,null);n.runOutsideAngular(()=>{if(this._platform.isBrowser){let i=s=>this._change.next(s);this._listeners=[r.listen("window","resize",i),r.listen("window","orientationchange",i)]}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){this._listeners?.forEach(n=>n()),this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();let n={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),n}getViewportRect(){let n=this.getViewportScrollPosition(),{width:r,height:i}=this.getViewportSize();return{top:n.top,left:n.left,bottom:n.top+i,right:n.left+r,height:i,width:r}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};let n=this._document,r=this._getWindow(),i=n.documentElement,s=i.getBoundingClientRect(),o=-s.top||n.body.scrollTop||r.scrollY||i.scrollTop||0,a=-s.left||n.body.scrollLeft||r.scrollX||i.scrollLeft||0;return{top:o,left:a}}change(n=WV){return n>0?this._change.pipe(Lu(n)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){let n=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:n.innerWidth,height:n.innerHeight}:{width:0,height:0}}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),pE={},vh=(()=>{class e{_appId=O(nl);getId(n){return this._appId!=="ng"&&(n+=this._appId),pE.hasOwnProperty(n)||(pE[n]=0),`${n}${pE[n]++}`}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function hE(e){return Array.isArray(e)?e:[e]}function Mx(e){let t=e.cloneNode(!0),n=t.querySelectorAll("[id]"),r=e.nodeName.toLowerCase();t.removeAttribute("id");for(let i=0;i<n.length;i++)n[i].removeAttribute("id");return r==="canvas"?Ex(e,t):(r==="input"||r==="select"||r==="textarea")&&_x(e,t),vx("canvas",e,t,Ex),vx("input, textarea, select",e,t,_x),t}function vx(e,t,n,r){let i=t.querySelectorAll(e);if(i.length){let s=n.querySelectorAll(e);for(let o=0;o<i.length;o++)r(i[o],s[o])}}var GV=0;function _x(e,t){t.type!=="file"&&(t.value=e.value),t.type==="radio"&&t.name&&(t.name=`mat-clone-${t.name}-${GV++}`)}function Ex(e,t){let n=t.getContext("2d");if(n)try{n.drawImage(e,0,0)}catch{}}function bE(e){let t=e.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 yE(e,t,n){let{top:r,bottom:i,left:s,right:o}=e;return n>=r&&n<=i&&t>=s&&t<=o}function nu(e,t,n){e.top+=t,e.bottom=e.top+e.height,e.left+=n,e.right=e.left+e.width}function wx(e,t,n,r){let{top:i,right:s,bottom:o,left:a,width:l,height:c}=e,h=l*t,d=c*t;return r>i-d&&r<o+d&&n>a-h&&n<s+h}var _h=class{_document;positions=new Map;constructor(e){this._document=e}clear(){this.positions.clear()}cache(e){this.clear(),this.positions.set(this._document,{scrollPosition:this.getViewportScrollPosition()}),e.forEach(t=>{this.positions.set(t,{scrollPosition:{top:t.scrollTop,left:t.scrollLeft},clientRect:bE(t)})})}handleScroll(e){let t=Zn(e),n=this.positions.get(t);if(!n)return null;let r=n.scrollPosition,i,s;if(t===this._document){let l=this.getViewportScrollPosition();i=l.top,s=l.left}else i=t.scrollTop,s=t.scrollLeft;let o=r.top-i,a=r.left-s;return this.positions.forEach((l,c)=>{l.clientRect&&t!==c&&t.contains(c)&&nu(l.clientRect,o,a)}),r.top=i,r.left=s,{top:o,left:a}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}};function Ox(e,t){let n=e.rootNodes;if(n.length===1&&n[0].nodeType===t.ELEMENT_NODE)return n[0];let r=t.createElement("div");return n.forEach(i=>r.appendChild(i)),r}function CE(e,t,n){for(let r in t)if(t.hasOwnProperty(r)){let i=t[r];i?e.setProperty(r,i,n?.has(r)?"important":""):e.removeProperty(r)}return e}function Ec(e,t){let n=t?"":"none";CE(e.style,{"touch-action":t?"":"none","-webkit-user-drag":t?"":"none","-webkit-tap-highlight-color":t?"":"transparent","user-select":n,"-ms-user-select":n,"-webkit-user-select":n,"-moz-user-select":n})}function bx(e,t,n){CE(e.style,{position:t?"":"fixed",top:t?"":"0",opacity:t?"":"0",left:t?"":"-999em"},n)}function Eh(e,t){return t&&t!="none"?e+" "+t:e}function Cx(e,t){e.style.width=`${t.width}px`,e.style.height=`${t.height}px`,e.style.transform=wh(t.left,t.top)}function wh(e,t){return`translate3d(${Math.round(e)}px, ${Math.round(t)}px, 0)`}function Sx(e){let t=e.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(e)*t}function zV(e){let t=getComputedStyle(e),n=mE(t,"transition-property"),r=n.find(a=>a==="transform"||a==="all");if(!r)return 0;let i=n.indexOf(r),s=mE(t,"transition-duration"),o=mE(t,"transition-delay");return Sx(s[i])+Sx(o[i])}function mE(e,t){return e.getPropertyValue(t).split(",").map(n=>n.trim())}var qV=new Set(["position"]),vE=class{_document;_rootElement;_direction;_initialDomRect;_previewTemplate;_previewClass;_pickupPositionOnPage;_initialTransform;_zIndex;_renderer;_previewEmbeddedView;_preview;get element(){return this._preview}constructor(e,t,n,r,i,s,o,a,l,c){this._document=e,this._rootElement=t,this._direction=n,this._initialDomRect=r,this._previewTemplate=i,this._previewClass=s,this._pickupPositionOnPage=o,this._initialTransform=a,this._zIndex=l,this._renderer=c}attach(e){this._preview=this._createPreview(),e.appendChild(this._preview),Dx(this._preview)&&this._preview.showPopover()}destroy(){this._preview.remove(),this._previewEmbeddedView?.destroy(),this._preview=this._previewEmbeddedView=null}setTransform(e){this._preview.style.transform=e}getBoundingClientRect(){return this._preview.getBoundingClientRect()}addClass(e){this._preview.classList.add(e)}getTransitionDuration(){return zV(this._preview)}addEventListener(e,t){return this._renderer.listen(this._preview,e,t)}_createPreview(){let e=this._previewTemplate,t=this._previewClass,n=e?e.template:null,r;if(n&&e){let i=e.matchSize?this._initialDomRect:null,s=e.viewContainer.createEmbeddedView(n,e.context);s.detectChanges(),r=Ox(s,this._document),this._previewEmbeddedView=s,e.matchSize?Cx(r,i):r.style.transform=wh(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else r=Mx(this._rootElement),Cx(r,this._initialDomRect),this._initialTransform&&(r.style.transform=this._initialTransform);return CE(r.style,{"pointer-events":"none",margin:Dx(r)?"0 auto 0 0":"0",position:"fixed",top:"0",left:"0","z-index":this._zIndex+""},qV),Ec(r,!1),r.classList.add("cdk-drag-preview"),r.setAttribute("popover","manual"),r.setAttribute("dir",this._direction),t&&(Array.isArray(t)?t.forEach(i=>r.classList.add(i)):r.classList.add(t)),r}};function Dx(e){return"showPopover"in e}var YV={passive:!0},Ix={passive:!1},KV={passive:!1,capture:!0},ZV=800,Tx=new Set(["position"]),_E=class{_config;_document;_ngZone;_viewportRuler;_dragDropRegistry;_renderer;_rootElementCleanups;_cleanupShadowRootSelectStart;_preview;_previewContainer;_placeholderRef;_placeholder;_pickupPositionInElement;_pickupPositionOnPage;_anchor;_passiveTransform={x:0,y:0};_activeTransform={x:0,y:0};_initialTransform;_hasStartedDragging=Vi(!1);_hasMoved;_initialContainer;_initialIndex;_parentPositions;_moveEvents=new J;_pointerDirectionDelta;_pointerPositionAtLastDirectionChange;_lastKnownPointerPosition;_rootElement;_ownerSVGElement;_rootElementTapHighlight;_pointerMoveSubscription=ot.EMPTY;_pointerUpSubscription=ot.EMPTY;_scrollSubscription=ot.EMPTY;_resizeSubscription=ot.EMPTY;_lastTouchEventTime;_dragStartTime;_boundaryElement=null;_nativeInteractionsEnabled=!0;_initialDomRect;_previewRect;_boundaryRect;_previewTemplate;_placeholderTemplate;_handles=[];_disabledHandles=new Set;_dropContainer;_direction="ltr";_parentDragRef;_cachedShadowRoot;lockAxis;dragStartDelay=0;previewClass;scale=1;get disabled(){return this._disabled||!!(this._dropContainer&&this._dropContainer.disabled)}set disabled(e){e!==this._disabled&&(this._disabled=e,this._toggleNativeDragInteractions(),this._handles.forEach(t=>Ec(t,e)))}_disabled=!1;beforeStarted=new J;started=new J;released=new J;ended=new J;entered=new J;exited=new J;dropped=new J;moved=this._moveEvents;data;constrainPosition;constructor(e,t,n,r,i,s,o){this._config=t,this._document=n,this._ngZone=r,this._viewportRuler=i,this._dragDropRegistry=s,this._renderer=o,this.withRootElement(e).withParent(t.parentDragRef||null),this._parentPositions=new _h(n),s.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(e){this._handles=e.map(n=>Xn(n)),this._handles.forEach(n=>Ec(n,this.disabled)),this._toggleNativeDragInteractions();let t=new Set;return this._disabledHandles.forEach(n=>{this._handles.indexOf(n)>-1&&t.add(n)}),this._disabledHandles=t,this}withPreviewTemplate(e){return this._previewTemplate=e,this}withPlaceholderTemplate(e){return this._placeholderTemplate=e,this}withRootElement(e){let t=Xn(e);return t!==this._rootElement&&(this._removeRootElementListeners(),this._rootElementCleanups=this._ngZone.runOutsideAngular(()=>[Tn(this._renderer,t,"mousedown",this._pointerDown,Ix),Tn(this._renderer,t,"touchstart",this._pointerDown,YV),Tn(this._renderer,t,"dragstart",this._nativeDragStart,Ix)]),this._initialTransform=void 0,this._rootElement=t),typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(e){return this._boundaryElement=e?Xn(e):null,this._resizeSubscription.unsubscribe(),e&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(e){return this._parentDragRef=e,this}dispose(){this._removeRootElementListeners(),this.isDragging()&&this._rootElement?.remove(),this._anchor?.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeListeners(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._anchor=this._parentDragRef=null}isDragging(){return this._hasStartedDragging()&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}disableHandle(e){!this._disabledHandles.has(e)&&this._handles.indexOf(e)>-1&&(this._disabledHandles.add(e),Ec(e,!0))}enableHandle(e){this._disabledHandles.has(e)&&(this._disabledHandles.delete(e),Ec(e,this.disabled))}withDirection(e){return this._direction=e,this}_withDropContainer(e){this._dropContainer=e}getFreeDragPosition(){let e=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:e.x,y:e.y}}setFreeDragPosition(e){return this._activeTransform={x:0,y:0},this._passiveTransform.x=e.x,this._passiveTransform.y=e.y,this._dropContainer||this._applyRootElementTransform(e.x,e.y),this}withPreviewContainer(e){return this._previewContainer=e,this}_sortFromLastPointerPosition(){let e=this._lastKnownPointerPosition;e&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(e),e)}_removeListeners(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe(),this._cleanupShadowRootSelectStart?.(),this._cleanupShadowRootSelectStart=void 0}_destroyPreview(){this._preview?.destroy(),this._preview=null}_destroyPlaceholder(){this._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._placeholderRef=null}_pointerDown=e=>{if(this.beforeStarted.next(),this._handles.length){let t=this._getTargetHandle(e);t&&!this._disabledHandles.has(t)&&!this.disabled&&this._initializeDragSequence(t,e)}else this.disabled||this._initializeDragSequence(this._rootElement,e)};_pointerMove=e=>{let t=this._getPointerPositionOnPage(e);if(!this._hasStartedDragging()){let r=Math.abs(t.x-this._pickupPositionOnPage.x),i=Math.abs(t.y-this._pickupPositionOnPage.y);if(r+i>=this._config.dragStartThreshold){let s=Date.now()>=this._dragStartTime+this._getDragStartDelay(e),o=this._dropContainer;if(!s){this._endDragSequence(e);return}(!o||!o.isDragging()&&!o.isReceiving())&&(e.cancelable&&e.preventDefault(),this._hasStartedDragging.set(!0),this._ngZone.run(()=>this._startDragSequence(e)))}return}e.cancelable&&e.preventDefault();let n=this._getConstrainedPointerPosition(t);if(this._hasMoved=!0,this._lastKnownPointerPosition=t,this._updatePointerDirectionDelta(n),this._dropContainer)this._updateActiveDropContainer(n,t);else{let r=this.constrainPosition?this._initialDomRect:this._pickupPositionOnPage,i=this._activeTransform;i.x=n.x-r.x+this._passiveTransform.x,i.y=n.y-r.y+this._passiveTransform.y,this._applyRootElementTransform(i.x,i.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:n,event:e,distance:this._getDragDistance(n),delta:this._pointerDirectionDelta})})};_pointerUp=e=>{this._endDragSequence(e)};_endDragSequence(e){if(this._dragDropRegistry.isDragging(this)&&(this._removeListeners(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),!!this._hasStartedDragging()))if(this.released.next({source:this,event:e}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(e),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;let t=this._getPointerPositionOnPage(e);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(t),dropPoint:t,event:e})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(e){eu(e)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();let t=this._getShadowRoot(),n=this._dropContainer;if(t&&this._ngZone.runOutsideAngular(()=>{this._cleanupShadowRootSelectStart=Tn(this._renderer,t,"selectstart",XV,KV)}),n){let r=this._rootElement,i=r.parentNode,s=this._placeholder=this._createPlaceholderElement(),o=this._anchor=this._anchor||this._document.createComment("");i.insertBefore(o,r),this._initialTransform=r.style.transform||"",this._preview=new vE(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(i,t)),bx(r,!1,Tx),this._document.body.appendChild(i.replaceChild(s,r)),this.started.next({source:this,event:e}),n.start(),this._initialContainer=n,this._initialIndex=n.getItemIndex(this)}else this.started.next({source:this,event:e}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(n?n.getScrollableParents():[])}_initializeDragSequence(e,t){this._parentDragRef&&t.stopPropagation();let n=this.isDragging(),r=eu(t),i=!r&&t.button!==0,s=this._rootElement,o=Zn(t),a=!r&&this._lastTouchEventTime&&this._lastTouchEventTime+ZV>Date.now(),l=r?gh(t):mh(t);if(o&&o.draggable&&t.type==="mousedown"&&t.preventDefault(),n||i||a||l)return;if(this._handles.length){let d=s.style;this._rootElementTapHighlight=d.webkitTapHighlightColor||"",d.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(d=>this._updateOnScroll(d)),this._boundaryElement&&(this._boundaryRect=bE(this._boundaryElement));let c=this._previewTemplate;this._pickupPositionInElement=c&&c.template&&!c.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialDomRect,e,t);let h=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(t);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:h.x,y:h.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,t)}_cleanupDragArtifacts(e){bx(this._rootElement,!0,Tx),this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._initialDomRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{let t=this._dropContainer,n=t.getItemIndex(this),r=this._getPointerPositionOnPage(e),i=this._getDragDistance(r),s=t._isOverContainer(r.x,r.y);this.ended.next({source:this,distance:i,dropPoint:r,event:e}),this.dropped.next({item:this,currentIndex:n,previousIndex:this._initialIndex,container:t,previousContainer:this._initialContainer,isPointerOverContainer:s,distance:i,dropPoint:r,event:e}),t.drop(this,n,this._initialIndex,this._initialContainer,s,i,r,e),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:e,y:t},{x:n,y:r}){let i=this._initialContainer._getSiblingContainerFromPosition(this,e,t);!i&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(e,t)&&(i=this._initialContainer),i&&i!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=i,this._dropContainer.enter(this,e,t,i===this._initialContainer&&i.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:i,currentIndex:i.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(n,r),this._dropContainer._sortItem(this,e,t,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(e,t):this._applyPreviewTransform(e-this._pickupPositionInElement.x,t-this._pickupPositionInElement.y))}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();let e=this._placeholder.getBoundingClientRect();this._preview.addClass("cdk-drag-animating"),this._applyPreviewTransform(e.left,e.top);let t=this._preview.getTransitionDuration();return t===0?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(n=>{let r=o=>{(!o||this._preview&&Zn(o)===this._preview.element&&o.propertyName==="transform")&&(s(),n(),clearTimeout(i))},i=setTimeout(r,t*1.5),s=this._preview.addEventListener("transitionend",r)}))}_createPlaceholderElement(){let e=this._placeholderTemplate,t=e?e.template:null,n;return t?(this._placeholderRef=e.viewContainer.createEmbeddedView(t,e.context),this._placeholderRef.detectChanges(),n=Ox(this._placeholderRef,this._document)):n=Mx(this._rootElement),n.style.pointerEvents="none",n.classList.add("cdk-drag-placeholder"),n}_getPointerPositionInElement(e,t,n){let r=t===this._rootElement?null:t,i=r?r.getBoundingClientRect():e,s=eu(n)?n.targetTouches[0]:n,o=this._getViewportScrollPosition(),a=s.pageX-i.left-o.left,l=s.pageY-i.top-o.top;return{x:i.left-e.left+a,y:i.top-e.top+l}}_getPointerPositionOnPage(e){let t=this._getViewportScrollPosition(),n=eu(e)?e.touches[0]||e.changedTouches[0]||{pageX:0,pageY:0}:e,r=n.pageX-t.left,i=n.pageY-t.top;if(this._ownerSVGElement){let s=this._ownerSVGElement.getScreenCTM();if(s){let o=this._ownerSVGElement.createSVGPoint();return o.x=r,o.y=i,o.matrixTransform(s.inverse())}}return{x:r,y:i}}_getConstrainedPointerPosition(e){let t=this._dropContainer?this._dropContainer.lockAxis:null,{x:n,y:r}=this.constrainPosition?this.constrainPosition(e,this,this._initialDomRect,this._pickupPositionInElement):e;if(this.lockAxis==="x"||t==="x"?r=this._pickupPositionOnPage.y-(this.constrainPosition?this._pickupPositionInElement.y:0):(this.lockAxis==="y"||t==="y")&&(n=this._pickupPositionOnPage.x-(this.constrainPosition?this._pickupPositionInElement.x:0)),this._boundaryRect){let{x:i,y:s}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,o=this._boundaryRect,{width:a,height:l}=this._getPreviewRect(),c=o.top+s,h=o.bottom-(l-s),d=o.left+i,f=o.right-(a-i);n=xx(n,d,f),r=xx(r,c,h)}return{x:n,y:r}}_updatePointerDirectionDelta(e){let{x:t,y:n}=e,r=this._pointerDirectionDelta,i=this._pointerPositionAtLastDirectionChange,s=Math.abs(t-i.x),o=Math.abs(n-i.y);return s>this._config.pointerDirectionChangeThreshold&&(r.x=t>i.x?1:-1,i.x=t),o>this._config.pointerDirectionChangeThreshold&&(r.y=n>i.y?1:-1,i.y=n),r}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;let e=this._handles.length>0||!this.isDragging();e!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=e,Ec(this._rootElement,e))}_removeRootElementListeners(){this._rootElementCleanups?.forEach(e=>e()),this._rootElementCleanups=void 0}_applyRootElementTransform(e,t){let n=1/this.scale,r=wh(e*n,t*n),i=this._rootElement.style;this._initialTransform==null&&(this._initialTransform=i.transform&&i.transform!="none"?i.transform:""),i.transform=Eh(r,this._initialTransform)}_applyPreviewTransform(e,t){let n=this._previewTemplate?.template?void 0:this._initialTransform,r=wh(e,t);this._preview.setTransform(Eh(r,n))}_getDragDistance(e){let t=this._pickupPositionOnPage;return t?{x:e.x-t.x,y:e.y-t.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:e,y:t}=this._passiveTransform;if(e===0&&t===0||this.isDragging()||!this._boundaryElement)return;let n=this._rootElement.getBoundingClientRect(),r=this._boundaryElement.getBoundingClientRect();if(r.width===0&&r.height===0||n.width===0&&n.height===0)return;let i=r.left-n.left,s=n.right-r.right,o=r.top-n.top,a=n.bottom-r.bottom;r.width>n.width?(i>0&&(e+=i),s>0&&(e-=s)):e=0,r.height>n.height?(o>0&&(t+=o),a>0&&(t-=a)):t=0,(e!==this._passiveTransform.x||t!==this._passiveTransform.y)&&this.setFreeDragPosition({y:t,x:e})}_getDragStartDelay(e){let t=this.dragStartDelay;return typeof t=="number"?t:eu(e)?t.touch:t?t.mouse:0}_updateOnScroll(e){let t=this._parentPositions.handleScroll(e);if(t){let n=Zn(e);this._boundaryRect&&n!==this._boundaryElement&&n.contains(this._boundaryElement)&&nu(this._boundaryRect,t.top,t.left),this._pickupPositionOnPage.x+=t.left,this._pickupPositionOnPage.y+=t.top,this._dropContainer||(this._activeTransform.x-=t.left,this._activeTransform.y-=t.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=_c(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(e,t){let n=this._previewContainer||"global";if(n==="parent")return e;if(n==="global"){let r=this._document;return t||r.fullscreenElement||r.webkitFullscreenElement||r.mozFullScreenElement||r.msFullscreenElement||r.body}return Xn(n)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialDomRect),this._previewRect}_nativeDragStart=e=>{if(this._handles.length){let t=this._getTargetHandle(e);t&&!this._disabledHandles.has(t)&&!this.disabled&&e.preventDefault()}else this.disabled||e.preventDefault()};_getTargetHandle(e){return this._handles.find(t=>e.target&&(e.target===t||t.contains(e.target)))}};function xx(e,t,n){return Math.max(t,Math.min(n,e))}function eu(e){return e.type[0]==="t"}function XV(e){e.preventDefault()}function Px(e,t,n){let r=Rx(t,e.length-1),i=Rx(n,e.length-1);if(r===i)return;let s=e[r],o=i<r?-1:1;for(let a=r;a!==i;a+=o)e[a]=e[a+o];e[i]=s}function Rx(e,t){return Math.max(0,Math.min(t,e))}var bh=class{_dragDropRegistry;_element;_sortPredicate;_itemPositions=[];_activeDraggables;orientation="vertical";direction;constructor(e){this._dragDropRegistry=e}_previousSwap={drag:null,delta:0,overlaps:!1};start(e){this.withItems(e)}sort(e,t,n,r){let i=this._itemPositions,s=this._getItemIndexFromPointerPosition(e,t,n,r);if(s===-1&&i.length>0)return null;let o=this.orientation==="horizontal",a=i.findIndex(b=>b.drag===e),l=i[s],c=i[a].clientRect,h=l.clientRect,d=a>s?1:-1,f=this._getItemOffsetPx(c,h,d),g=this._getSiblingOffsetPx(a,i,d),m=i.slice();return Px(i,a,s),i.forEach((b,x)=>{if(m[x]===b)return;let A=b.drag===e,F=A?f:g,V=A?e.getPlaceholderElement():b.drag.getRootElement();b.offset+=F;let M=Math.round(b.offset*(1/b.drag.scale));o?(V.style.transform=Eh(`translate3d(${M}px, 0, 0)`,b.initialTransform),nu(b.clientRect,0,F)):(V.style.transform=Eh(`translate3d(0, ${M}px, 0)`,b.initialTransform),nu(b.clientRect,F,0))}),this._previousSwap.overlaps=yE(h,t,n),this._previousSwap.drag=l.drag,this._previousSwap.delta=o?r.x:r.y,{previousIndex:a,currentIndex:s}}enter(e,t,n,r){let i=r==null||r<0?this._getItemIndexFromPointerPosition(e,t,n):r,s=this._activeDraggables,o=s.indexOf(e),a=e.getPlaceholderElement(),l=s[i];if(l===e&&(l=s[i+1]),!l&&(i==null||i===-1||i<s.length-1)&&this._shouldEnterAsFirstChild(t,n)&&(l=s[0]),o>-1&&s.splice(o,1),l&&!this._dragDropRegistry.isDragging(l)){let c=l.getRootElement();c.parentElement.insertBefore(a,c),s.splice(i,0,e)}else this._element.appendChild(a),s.push(e);a.style.transform="",this._cacheItemPositions()}withItems(e){this._activeDraggables=e.slice(),this._cacheItemPositions()}withSortPredicate(e){this._sortPredicate=e}reset(){this._activeDraggables?.forEach(e=>{let t=e.getRootElement();if(t){let n=this._itemPositions.find(r=>r.drag===e)?.initialTransform;t.style.transform=n||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(e){return(this.orientation==="horizontal"&&this.direction==="rtl"?this._itemPositions.slice().reverse():this._itemPositions).findIndex(t=>t.drag===e)}updateOnScroll(e,t){this._itemPositions.forEach(({clientRect:n})=>{nu(n,e,t)}),this._itemPositions.forEach(({drag:n})=>{this._dragDropRegistry.isDragging(n)&&n._sortFromLastPointerPosition()})}withElementContainer(e){this._element=e}_cacheItemPositions(){let e=this.orientation==="horizontal";this._itemPositions=this._activeDraggables.map(t=>{let n=t.getVisibleElement();return{drag:t,offset:0,initialTransform:n.style.transform||"",clientRect:bE(n)}}).sort((t,n)=>e?t.clientRect.left-n.clientRect.left:t.clientRect.top-n.clientRect.top)}_getItemOffsetPx(e,t,n){let r=this.orientation==="horizontal",i=r?t.left-e.left:t.top-e.top;return n===-1&&(i+=r?t.width-e.width:t.height-e.height),i}_getSiblingOffsetPx(e,t,n){let r=this.orientation==="horizontal",i=t[e].clientRect,s=t[e+n*-1],o=i[r?"width":"height"]*n;if(s){let a=r?"left":"top",l=r?"right":"bottom";n===-1?o-=s.clientRect[a]-i[l]:o+=i[a]-s.clientRect[l]}return o}_shouldEnterAsFirstChild(e,t){if(!this._activeDraggables.length)return!1;let n=this._itemPositions,r=this.orientation==="horizontal";if(n[0].drag!==this._activeDraggables[0]){let i=n[n.length-1].clientRect;return r?e>=i.right:t>=i.bottom}else{let i=n[0].clientRect;return r?e<=i.left:t<=i.top}}_getItemIndexFromPointerPosition(e,t,n,r){let i=this.orientation==="horizontal",s=this._itemPositions.findIndex(({drag:o,clientRect:a})=>{if(o===e)return!1;if(r){let l=i?r.x:r.y;if(o===this._previousSwap.drag&&this._previousSwap.overlaps&&l===this._previousSwap.delta)return!1}return i?t>=Math.floor(a.left)&&t<Math.floor(a.right):n>=Math.floor(a.top)&&n<Math.floor(a.bottom)});return s===-1||!this._sortPredicate(s,e)?-1:s}},EE=class{_document;_dragDropRegistry;_element;_sortPredicate;_rootNode;_activeItems;_previousSwap={drag:null,deltaX:0,deltaY:0,overlaps:!1};_relatedNodes=[];constructor(e,t){this._document=e,this._dragDropRegistry=t}start(e){let t=this._element.childNodes;this._relatedNodes=[];for(let n=0;n<t.length;n++){let r=t[n];this._relatedNodes.push([r,r.nextSibling])}this.withItems(e)}sort(e,t,n,r){let i=this._getItemIndexFromPointerPosition(e,t,n),s=this._previousSwap;if(i===-1||this._activeItems[i]===e)return null;let o=this._activeItems[i];if(s.drag===o&&s.overlaps&&s.deltaX===r.x&&s.deltaY===r.y)return null;let a=this.getItemIndex(e),l=e.getPlaceholderElement(),c=o.getRootElement();i>a?c.after(l):c.before(l),Px(this._activeItems,a,i);let h=this._getRootNode().elementFromPoint(t,n);return s.deltaX=r.x,s.deltaY=r.y,s.drag=o,s.overlaps=c===h||c.contains(h),{previousIndex:a,currentIndex:i}}enter(e,t,n,r){let i=r==null||r<0?this._getItemIndexFromPointerPosition(e,t,n):r;i===-1&&(i=this._getClosestItemIndexToPointer(e,t,n));let s=this._activeItems[i],o=this._activeItems.indexOf(e);o>-1&&this._activeItems.splice(o,1),s&&!this._dragDropRegistry.isDragging(s)?(this._activeItems.splice(i,0,e),s.getRootElement().before(e.getPlaceholderElement())):(this._activeItems.push(e),this._element.appendChild(e.getPlaceholderElement()))}withItems(e){this._activeItems=e.slice()}withSortPredicate(e){this._sortPredicate=e}reset(){let e=this._element,t=this._previousSwap;for(let n=this._relatedNodes.length-1;n>-1;n--){let[r,i]=this._relatedNodes[n];r.parentNode===e&&r.nextSibling!==i&&(i===null?e.appendChild(r):i.parentNode===e&&e.insertBefore(r,i))}this._relatedNodes=[],this._activeItems=[],t.drag=null,t.deltaX=t.deltaY=0,t.overlaps=!1}getActiveItemsSnapshot(){return this._activeItems}getItemIndex(e){return this._activeItems.indexOf(e)}updateOnScroll(){this._activeItems.forEach(e=>{this._dragDropRegistry.isDragging(e)&&e._sortFromLastPointerPosition()})}withElementContainer(e){e!==this._element&&(this._element=e,this._rootNode=void 0)}_getItemIndexFromPointerPosition(e,t,n){let r=this._getRootNode().elementFromPoint(Math.floor(t),Math.floor(n)),i=r?this._activeItems.findIndex(s=>{let o=s.getRootElement();return r===o||o.contains(r)}):-1;return i===-1||!this._sortPredicate(i,e)?-1:i}_getRootNode(){return this._rootNode||(this._rootNode=_c(this._element)||this._document),this._rootNode}_getClosestItemIndexToPointer(e,t,n){if(this._activeItems.length===0)return-1;if(this._activeItems.length===1)return 0;let r=1/0,i=-1;for(let s=0;s<this._activeItems.length;s++){let o=this._activeItems[s];if(o!==e){let{x:a,y:l}=o.getRootElement().getBoundingClientRect(),c=Math.hypot(t-a,n-l);c<r&&(r=c,i=s)}}return i}},Nx=.05,kx=.05,xr=function(e){return e[e.NONE=0]="NONE",e[e.UP=1]="UP",e[e.DOWN=2]="DOWN",e}(xr||{}),jn=function(e){return e[e.NONE=0]="NONE",e[e.LEFT=1]="LEFT",e[e.RIGHT=2]="RIGHT",e}(jn||{}),wE=class{_dragDropRegistry;_ngZone;_viewportRuler;element;disabled=!1;sortingDisabled=!1;lockAxis;autoScrollDisabled=!1;autoScrollStep=2;enterPredicate=()=>!0;sortPredicate=()=>!0;beforeStarted=new J;entered=new J;exited=new J;dropped=new J;sorted=new J;receivingStarted=new J;receivingStopped=new J;data;_container;_isDragging=!1;_parentPositions;_sortStrategy;_domRect;_draggables=[];_siblings=[];_activeSiblings=new Set;_viewportScrollSubscription=ot.EMPTY;_verticalScrollDirection=xr.NONE;_horizontalScrollDirection=jn.NONE;_scrollNode;_stopScrollTimers=new J;_cachedShadowRoot=null;_document;_scrollableElements=[];_initialScrollSnap;_direction="ltr";constructor(e,t,n,r,i){this._dragDropRegistry=t,this._ngZone=r,this._viewportRuler=i;let s=this.element=Xn(e);this._document=n,this.withOrientation("vertical").withElementContainer(s),t.registerDropContainer(this),this._parentPositions=new _h(n)}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this.receivingStarted.complete(),this.receivingStopped.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(e,t,n,r){this._draggingStarted(),r==null&&this.sortingDisabled&&(r=this._draggables.indexOf(e)),this._sortStrategy.enter(e,t,n,r),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:e,container:this,currentIndex:this.getItemIndex(e)})}exit(e){this._reset(),this.exited.next({item:e,container:this})}drop(e,t,n,r,i,s,o,a={}){this._reset(),this.dropped.next({item:e,currentIndex:t,previousIndex:n,container:this,previousContainer:r,isPointerOverContainer:i,distance:s,dropPoint:o,event:a})}withItems(e){let t=this._draggables;return this._draggables=e,e.forEach(n=>n._withDropContainer(this)),this.isDragging()&&(t.filter(n=>n.isDragging()).every(n=>e.indexOf(n)===-1)?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(e){return this._direction=e,this._sortStrategy instanceof bh&&(this._sortStrategy.direction=e),this}connectedTo(e){return this._siblings=e.slice(),this}withOrientation(e){if(e==="mixed")this._sortStrategy=new EE(this._document,this._dragDropRegistry);else{let t=new bh(this._dragDropRegistry);t.direction=this._direction,t.orientation=e,this._sortStrategy=t}return this._sortStrategy.withElementContainer(this._container),this._sortStrategy.withSortPredicate((t,n)=>this.sortPredicate(t,n,this)),this}withScrollableParents(e){let t=this._container;return this._scrollableElements=e.indexOf(t)===-1?[t,...e]:e.slice(),this}withElementContainer(e){if(e===this._container)return this;let t=Xn(this.element),n=this._scrollableElements.indexOf(this._container),r=this._scrollableElements.indexOf(e);return n>-1&&this._scrollableElements.splice(n,1),r>-1&&this._scrollableElements.splice(r,1),this._sortStrategy&&this._sortStrategy.withElementContainer(e),this._cachedShadowRoot=null,this._scrollableElements.unshift(e),this._container=e,this}getScrollableParents(){return this._scrollableElements}getItemIndex(e){return this._isDragging?this._sortStrategy.getItemIndex(e):this._draggables.indexOf(e)}isReceiving(){return this._activeSiblings.size>0}_sortItem(e,t,n,r){if(this.sortingDisabled||!this._domRect||!wx(this._domRect,Nx,t,n))return;let i=this._sortStrategy.sort(e,t,n,r);i&&this.sorted.next({previousIndex:i.previousIndex,currentIndex:i.currentIndex,container:this,item:e})}_startScrollingIfNecessary(e,t){if(this.autoScrollDisabled)return;let n,r=xr.NONE,i=jn.NONE;if(this._parentPositions.positions.forEach((s,o)=>{o===this._document||!s.clientRect||n||wx(s.clientRect,Nx,e,t)&&([r,i]=JV(o,s.clientRect,this._direction,e,t),(r||i)&&(n=o))}),!r&&!i){let{width:s,height:o}=this._viewportRuler.getViewportSize(),a={width:s,height:o,top:0,right:s,bottom:o,left:0};r=Lx(a,t),i=Fx(a,e),n=window}n&&(r!==this._verticalScrollDirection||i!==this._horizontalScrollDirection||n!==this._scrollNode)&&(this._verticalScrollDirection=r,this._horizontalScrollDirection=i,this._scrollNode=n,(r||i)&&n?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){let e=this._container.style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=e.msScrollSnapType||e.scrollSnapType||"",e.scrollSnapType=e.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){this._parentPositions.cache(this._scrollableElements),this._domRect=this._parentPositions.positions.get(this._container).clientRect}_reset(){this._isDragging=!1;let e=this._container.style;e.scrollSnapType=e.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(t=>t._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_startScrollInterval=()=>{this._stopScrolling(),om(0,wu).pipe(hr(this._stopScrollTimers)).subscribe(()=>{let e=this._scrollNode,t=this.autoScrollStep;this._verticalScrollDirection===xr.UP?e.scrollBy(0,-t):this._verticalScrollDirection===xr.DOWN&&e.scrollBy(0,t),this._horizontalScrollDirection===jn.LEFT?e.scrollBy(-t,0):this._horizontalScrollDirection===jn.RIGHT&&e.scrollBy(t,0)})};_isOverContainer(e,t){return this._domRect!=null&&yE(this._domRect,e,t)}_getSiblingContainerFromPosition(e,t,n){return this._siblings.find(r=>r._canReceive(e,t,n))}_canReceive(e,t,n){if(!this._domRect||!yE(this._domRect,t,n)||!this.enterPredicate(e,this))return!1;let r=this._getShadowRoot().elementFromPoint(t,n);return r?r===this._container||this._container.contains(r):!1}_startReceiving(e,t){let n=this._activeSiblings;!n.has(e)&&t.every(r=>this.enterPredicate(r,this)||this._draggables.indexOf(r)>-1)&&(n.add(e),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:e,receiver:this,items:t}))}_stopReceiving(e){this._activeSiblings.delete(e),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:e,receiver:this})}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(e=>{if(this.isDragging()){let t=this._parentPositions.handleScroll(e);t&&this._sortStrategy.updateOnScroll(t.top,t.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){let e=_c(this._container);this._cachedShadowRoot=e||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){let e=this._sortStrategy.getActiveItemsSnapshot().filter(t=>t.isDragging());this._siblings.forEach(t=>t._startReceiving(this,e))}};function Lx(e,t){let{top:n,bottom:r,height:i}=e,s=i*kx;return t>=n-s&&t<=n+s?xr.UP:t>=r-s&&t<=r+s?xr.DOWN:xr.NONE}function Fx(e,t){let{left:n,right:r,width:i}=e,s=i*kx;return t>=n-s&&t<=n+s?jn.LEFT:t>=r-s&&t<=r+s?jn.RIGHT:jn.NONE}function JV(e,t,n,r,i){let s=Lx(t,i),o=Fx(t,r),a=xr.NONE,l=jn.NONE;if(s){let c=e.scrollTop;s===xr.UP?c>0&&(a=xr.UP):e.scrollHeight-c>e.clientHeight&&(a=xr.DOWN)}if(o){let c=e.scrollLeft;n==="rtl"?o===jn.RIGHT?c<0&&(l=jn.RIGHT):e.scrollWidth+c>e.clientWidth&&(l=jn.LEFT):o===jn.LEFT?c>0&&(l=jn.LEFT):e.scrollWidth-c>e.clientWidth&&(l=jn.RIGHT)}return[a,l]}var tu={capture:!0},gE={passive:!1,capture:!0},QV=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275cmp=yt({type:e,selectors:[["ng-component"]],hostAttrs:["cdk-drag-resets-container",""],decls:0,vars:0,template:function(n,r){},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}
75
+ `,Mo=class{async performAddToCart(e,t){if(!e.length)return;let n=e.map(a=>{let{vID:l,quantity:c}=this.getVIDAndQuantity(a);return{id:l?+l:+a.mID,quantity:c,properties:t.getPrivateAttributesForLineItem()}}),r=Dt.getCartURL("cart/add.js"),i={items:n},s=Gt.get();s.isMiniCart()?i.sections=["mini-cart"]:s.isShopifyDefaultDrawer()&&(i.sections=s.element.getSectionsToRender?.().map(a=>a.section??a.id));let o=JSON.stringify(i);try{let a=await fetch(r,{body:o,method:"post",headers:{"Content-Type":"application/json"}});if(a.status===200||a.status===302)return C.log(`Added ${e.length} items to Cart`),ce.showSnackbar("Product added to your cart"),a.json()}catch(a){C.error("Failed to add product in cart",a)}}async performUpdate(e,t){if(!sx.JSUtils.hasKeys(t)){C.warn("No update fields provided");return}let n=Dt.getCartURL("cart/change.js"),r=w({id:e.key},t),i=JSON.stringify(r);try{let s=await fetch(n,{body:i,method:"post",headers:{"Content-Type":"application/json"}});(s.status===200||s.status===302)&&(C.log(`Updated ${e}`),Ge.getCurrent().update(s.json()))}catch(s){C.error("Failed to update item in cart",s,e)}}async performCopyCoupon(e){if(e)try{await navigator.clipboard.writeText(e),C.log(`Code-${e} copied`),ce.showSnackbar("Discount code copied")}catch(t){C.error("Failed to copy code",t)}}performGoToItem(e){if(!e?.link)return;let t=Dt.getProductSlug(e.link);t&&(location.pathname=Dt.getRootPrefix()+"products/"+t)}async upgradeToSubscription(e,t){if(!e){C.warn("Trying to upgrade to subscription with no item");return}let n=await Ge.getCurrent().getNormalisedCart(),r=e.selectedOrFirstVariant.value,i=n.items.findIndex(c=>c.vID===r.mID),s=r.selectedSellingPlan.value,o=Dt.getCartURL("cart/change.js"),a={line:i+1,selling_plan:s?.mID||null,properties:t.getPrivateAttributesForLineItem()},l=JSON.stringify(a);try{let c=await fetch(o,{body:l,method:"post",headers:{"Content-Type":"application/json"}});if(c.status===200||c.status===302){C.log(`Upgraded ${e} selling plan`),ce.showSnackbar("Line item updated");let h=await c.json();return Ge.getCurrent().update(h),h}}catch(c){C.error("Failed to update subscription for item in cart",c)}}async performCartCreate(e,t,n){let r=vt.get().storefrontToken;if(!r)throw new Error("Storefront token not set for the store");if(!e?.vID){C.error("No variant ID found to perform Buy now",e);return}let i=t?[t]:[],s=[{merchandiseId:`gid://shopify/ProductVariant/${e.vID}`,quantity:1,attributes:n.getKVFormatPrivateAttributesForLineItem()}],o=await ce.getCartAttributes(),a=new Headers;a.append("Content-Type","application/json"),a.append("X-Shopify-Storefront-Access-Token",r);let l=JSON.stringify({query:LV,variables:{input:{lines:s,discountCodes:i,attributes:o}}});return(await On.getInstance().request(k.GRAPHQL_API_PATH,{method:"POST",headers:a,body:l})).data?.cartCreate?.cart?.checkoutUrl}async processEvent(e){let t=e.clickAction,n=e.items,r=e.triggerData;if(t.at){let i=t;if(C.log(`Performing ${JSON.stringify(i)} action`),i.at===101)n?.length&&this.performGoToItem(n[0]);else if(i.at===102)n?.length&&await this.performAddToCart(n,r);else if(i.at===103)await this.performCopyCoupon(r.discount.code);else if(i.at===105)Gt.get().open();else if(i.at===104){let s=e.collections;if(!s?.length)return;location.pathname=Dt.getRootPrefix()+"collections/"+s[0].handle}}t.applyDiscount&&r.discount?.code&&Ao.navigate(r.discount.code,r.redirectBehaviour)}getVIDAndQuantity(e){let t,n;if(e instanceof gn)t=e.vID,n=e.quantity??1;else{if(!e.vars?.length)return{};t=e.selectedOrFirstVariant.value.mID,n=1}return{vID:t,quantity:n}}},Hp=class extends Ei{ctaListener=new Mo;constructor(e){super(e),mi.get().subscriber(k.CART_UPDATE_BROADCAST).pipe(Ii(null)).subscribe(this.checkMilestone.bind(this))}update(e){super.update(e),this.widgetElement.update()}shouldStopRendering(){return!1}renderContainer(){if(this.widgetElement?.isConnected){this.addToRendered();return}let e=this.widgetElement=document.createElement("cooee-progressbar");e.className="cooee-root",e.cart=Ge.getCurrent(),e.engagementTrigger=this.engagementTrigger,e.setAttribute("engagement",this.engagementTrigger.shortID),this.rootContainer.appendChild(e),this.addToRendered()}async checkMilestone(){let e=await Ge.getCurrent().getNormalisedCart(),t=[...this.engagementTrigger.progressBarConfig.milestones];for(let n of t){if(e.amount<n.minValue)break;if(C.log("Current milestone",n),n.rewardType===ax.MilestoneRewardType.FREE_AUTO_GIFT){let r=n.items[0],i=e.items.find(s=>s.vID===r.vID||s.mID===r.mID);if(i)C.log(`Item(vID:${r.vID}) already present in the cart. Updating item's properties`),await this.ctaListener.performUpdate(i,{properties:this.engagementTrigger.getPrivateAttributesForLineItem()});else{let s=await this.ctaListener.performAddToCart([r],this.engagementTrigger);Gt.get().refreshUI(s,!1)}}}}async removeOtherFreeGifts(e){let t=(await Ge.getCurrent().getNormalisedCart()).items.filter(n=>n.vID!==e?.vID&&n.properties[k.CAMPAIGN_ATTRIBUTE]===this.engagementTrigger.shortID);if(t.length)for(let n of t)await this.ctaListener.performUpdate(n,{quantity:0})}},jp=class extends Kn{constructor(e){super(e)}shouldStopRendering(){return!1}renderContainer(){if(this.widgetElement?.isConnected){this.addToRendered();return}let e=this.widgetElement=document.createElement("cooee-shoppable-videos");e.className="cooee-root",e.triggerContext=this.triggerContext,e.addEventListener("sendEvent",t=>{let n=t.detail;this.safeHTTPService.sendEvent(n)}),e.setAttribute("engagement",this.engagementTrigger.shortID),this.rootContainer.appendChild(e),this.addToRendered()}},cx=Re(Ta()),$p=class extends Kn{constructor(e){super(e)}shouldStopRendering(){return!1}renderContainer(){let e=this.getParentElement(`inner-letscooee-${this.engagementTrigger.shortID}`);this.rootContainer.appendChild(e),document.addEventListener(k.ADD_BUNDLE_CTA_INBOUND_EVENT,this.inboundCTAListener.bind(this),!1)}async inboundCTAListener(e){let t=this.engagementTrigger,n=`Engagement(id: ${t.engagementID}, shortID: ${t.shortID})`,r=e.detail;if(!cx.JSUtils.hasKeys(r)){C.error(`No detail received for ${n}`);return}C.log("Detail received for BYOB",r);let i=r.campaignID??r.campaignId??r.campaign_id;if(i!==t.shortID&&i!==t.engagementID){C.warn(`Current ${n} is not BYOB. Received: ${i}`);return}let s=r.items;if(!s?.length)return;let o=s.map(a=>new gn({mID:a.product_id,vID:a.variant_id,quantity:a.quantity||1}));await new Ro(this.triggerContext).execute({embeddedItems:o,clickAction:{at:108,applyDiscount:!0}})}},fc=class{runtimeData=Oe.get();processCartWidgetResponse(e){this.runtimeData.isCartDirty=!1,this.runtimeData.cartEngagements=e;let t=[...Ei.renderedEngagements];Ei.renderedEngagements.length=0;for(let n of e)C.log(`\u{1F4E3} ${n} received as cart embed`),!this.findAndUpdateCurrent(n,t)&&(C.log(`${n} is new`),n.isProgressBar()?new Hp(n).renderSilently():n.isSubscriptionUpsell()?Up.renderCartUpsell(n):new Ei(n).renderSilently());this.removeOldWidgets(t)}processPageWidgetResponse(e){let t=[...Kn.renderedEngagements];Kn.renderedEngagements.length=0;for(let n of e)C.log(`\u{1F4E3} ${n} received as page embed`),!this.findAndUpdateCurrent(n,t)&&(C.log(`${n} is new`),n.isShoppableVideo()?new jp(n).renderSilently():n.isBYOB()?new $p(n).renderSilently():new Kn(n).renderSilently());this.removeOldWidgets(t)}findAndUpdateCurrent(e,t){let n=t.findIndex(r=>r.isSameTrigger(e));return n<0||e.isSubscriptionUpsell()?!1:(t[n].update(e),t[n].renderSilently(),t.splice(n,1),!0)}removeOldWidgets(e){for(let t of e)t.destroy()}},pc=class{runtimeData=Oe.get();httpService=Te.get(On);sessionManager=Te.get(zt);constructor(){}async getWidgetProps(){let e={};e.engagementIDs=this.addAvailableEngagementShortIDs(),e.locale=this.runtimeData.locale,await this.addSessionContext(e),e.currentItem=this.runtimeData.getCurrentItem();try{e.cart=await Ge.getCurrent().getNormalisedCart()}catch(i){C.error("Error fetching Shopify cart before sending widget call",i)}let t=new URLSearchParams(location.search),n=t.get("cooee-preview");n?e.previewIDs=n.trim().split(",").filter(i=>Number.isInteger(+i)):this.runtimeData.previewIDs?.length&&(e.previewIDs=this.runtimeData.previewIDs);let r=t.get("cooee-variant");return r?e.previewVariant=r:this.runtimeData.previewVariant&&(e.previewVariant=this.runtimeData.previewVariant),e}async addSessionContext(e){let t=await this.sessionManager.checkSessionAndGetContext();e.sessionID=t[0],e.sessionNumber=t[1],e.landingPage=t[2],e.page=hi.parseFromCurrent()}addAvailableEngagementShortIDs(){let e=document.querySelectorAll(".letscooee-engagement"),t=[];return e.forEach(n=>{let r=n.dataset.engagementId;r&&+r&&t.push(r)}),t}},Gr=class AD extends pc{static INSTANCE;loadWidgetsSubject=new J;constructor(){super(),this.loadWidgetsSubject.pipe(Ar(300)).subscribe(()=>{this.loadCartWidgets().catch(t=>C.error("Unable to initiate cart widgets",t)),this.loadPageWidgets().catch(t=>C.error("Unable to initiate page widgets",t))}),mi.get().subscriber(k.CART_UPDATE_BROADCAST).subscribe(()=>this.loadWidgetsSubject.next())}static getInstance(){return this.INSTANCE||(this.INSTANCE=new AD),this.INSTANCE}loadOrRenderWidgetsAfterCartChange(){this.runtimeData.isCartDirty?this.loadWidgetsSilently():this.renderCachedCartWidgets()}loadPageWidgetsSilently(){zt.replaySubject.subscribe(async()=>{this.loadPageWidgets().catch(t=>C.error("Unable to initiate load page widgets",t))})}loadCartWidgetsSilently(){zt.replaySubject.subscribe(async()=>{this.loadCartWidgets().catch(t=>C.error("Unable to initiate cart widgets",t))})}loadWidgetsSilently(){zt.replaySubject.subscribe(async()=>{this.loadWidgetsSubject.next()})}async loadPageWidgets(){let t=await this.getWidgetProps();C.log("Load widgets",t),this.httpService.post("/v1/engagement/page-widgets",t).then(async n=>{let r=n.widgets.map(i=>new Hn(i));new fc().processPageWidgetResponse(r)}).catch(n=>{C.error("Error sending widget getter",n)})}async loadCartWidgets(){let t=await this.getWidgetProps();C.log("Load cart widgets",t),this.httpService.post("/v1/engagement/cart-widgets",t).then(async n=>{let r=n.widgets.map(i=>new Hn(i));new fc().processCartWidgetResponse(r)}).catch(n=>{C.error("Error sending widget getter",n)})}async getVariation(t){let n=await this.getWidgetProps();return this.httpService.post("/v1/engagement/get-variant",w(w({},t),n))}renderCachedCartWidgets(){new fc().processCartWidgetResponse(this.runtimeData.cartEngagements)}},Wp=class{eventAPIService;constructor(){this.eventAPIService=Te.get(Oo)}processResponse(e){for(let t of e)t.experimentConfig&&(this.runExperiment(t),this.trackExperimentRan(t));document.querySelector("#lc-hide-body")?.remove()}async runExperiment(e){let t=e.experimentConfig?.experiments;if(!t?.length){C.log("Nothing to experiment",e.toString());return}for(let n of t)this.executeSingleExperiment(e,n).catch(r=>C.error("Fail to execute experiment",r))}async executeSingleExperiment(e,t){if(!t.cssSelector){C.debug("No CSS Selector available",e.toString());return}let n=await ce.retrySelectors(t.cssSelector);for(let r of n)Object.assign(r.style,t.style),t.type==="TEXT"&&t.text&&(r.innerHTML=t.text)}trackExperimentRan(e){this.eventAPIService.trackExperiment({name:k.EVENT_EXPERIMENT_START,experiment:new bo(e)}).catch(t=>{C.error("Fail to track experiment",t)})}},Oo=class LD extends pc{static INSTANCE;constructor(){super()}static getInstance(){return this.INSTANCE||(this.INSTANCE=new LD),this.INSTANCE}loadExperimentSilently(){rt.get(ge.SDK_TOKEN).then(t=>{t?this.loadExperiments().catch(n=>C.error("Unable to initiate experiment",n)):zt.replaySubject.subscribe(async()=>{this.loadExperiments().catch(n=>C.error("Unable to initiate experiment",n))})})}async loadExperiments(){if(!this.runtimeData.activeExperiment)return;let t=await this.getWidgetProps();C.log("Load experiments",t),this.httpService.post("/v1/engagement/experiments",t).then(async n=>{let r=n.experiments.map(i=>new Hn(i));new Wp().processResponse(r)}).catch(n=>{C.error("Error sending experiment getter",n)})}async trackExperiment(t){await this.addSessionContext(t),await this.httpService.post("/v1/event/experiment",t)}},Gp=class{runtimeData=Oe.get();widgetAPIService=Te.get(Gr);experimentAPIService=Te.get(Oo);meddle(){let e=gt.globalRef;e.account=e.account??[],e.profile=e.profile??[],e.events=e.events??[],e.screen=e.screen??[],e.page=e.page??[],this.meddlePage(),this.meddleAccount(),this.meddleEvents(),this.meddleProfile(),this.meddleScreen(),this.exposeMethods()}exposeMethods(){let e=gt.globalRef;e.loadPageWidgets=()=>{this.widgetAPIService.loadPageWidgetsSilently()},e.loadCartWidgets=()=>{this.widgetAPIService.loadCartWidgetsSilently()},e.loadExperiments=()=>{this.experimentAPIService.loadExperimentSilently()},e.previewWidget=gt.previewWidget.bind(gt),e.previewPopup=gt.previewPopup.bind(gt)}overwritePush(e,t){Fa(e,"push",t)}meddleAccount(){this.overwritePush(gt.globalRef.account,(...e)=>{this.processAccount(e[0])}),gt.globalRef.account.forEach(this.processAccount.bind(this))}meddleEvents(){this.overwritePush(gt.globalRef.events,(...e)=>{this.processEvent(e[0])}),gt.globalRef.events.forEach(this.processEvent.bind(this))}meddleProfile(){this.overwritePush(gt.globalRef.profile,(...e)=>{this.processProfile(e[0])}),gt.globalRef.profile.forEach(this.processProfile.bind(this))}meddleScreen(){this.overwritePush(gt.globalRef.screen,(...e)=>{this.processPageName(e[0])}),gt.globalRef.screen.forEach(this.processPageName.bind(this))}processAccount(e){e&&(e.appID&&gt.authenticate(e),e.flags&&Os.setFlags(e.flags))}processEvent(e){e&&(k.JS_LOAD_WHITELIST_EVENTS.includes(e[0])?gt.sendEvent(e[0],e[1],w({occurred:this.runtimeData.jsLoadTime},e[2])):gt.sendEvent(e[0],e[1],e[2]))}processProfile(e){e&&gt.updateProfile(e)}processPageName(e){e&&gt.setPageName(e)}meddlePage(){this.overwritePush(gt.globalRef.page,(...e)=>{this.processPage(e[0])}),gt.globalRef.page.forEach(this.processPage.bind(this))}processPage(e){e.currentItem&&this.runtimeData.setCurrentItem(e.currentItem),e.currency&&(this.runtimeData.currencyCode=e.currency),e.shopCurrency&&(this.runtimeData.shopCurrencyCode=e.shopCurrency),e.moneyFormat&&(this.runtimeData.moneyFormat=e.moneyFormat),e.jsLoad&&(this.runtimeData.jsLoadTime=e.jsLoad),e.locale&&(this.runtimeData.locale=e.locale),e.pageName&&gt.setPageName(e.pageName),e.activeExperiment&&(this.runtimeData.activeExperiment=e.activeExperiment)}},hc=class{static SESSION_STORAGE=window.sessionStorage;static SESSION_STORAGE_KEY_PREFIX=k.COOEE.concat("-");static getString(e,t){return this.getItem(e)||t}static setString(e,t){this.setItem(e,t)}static remove(e){this.removeItem(e)}static getItem(e){return this.SESSION_STORAGE.getItem(this.SESSION_STORAGE_KEY_PREFIX.concat(e))}static setItem(e,t){this.SESSION_STORAGE.setItem(this.SESSION_STORAGE_KEY_PREFIX.concat(e),t)}static removeItem(e){this.SESSION_STORAGE.removeItem(this.SESSION_STORAGE_KEY_PREFIX.concat(e))}},mc=class su{static INSTANCE;static DEBOUNCE_TIME=1e3;static THRESHOLD=10;safeHttpService=Te.get(Ve);_lastScreenOrScroll=new Date;lastPercent=0;constructor(){}set lastScreenOrScroll(t){this._lastScreenOrScroll=t}static getInstance(){return this.INSTANCE||(this.INSTANCE=new su),this.INSTANCE}resetScrollID(t){hc.remove(k.SESSION_STORAGE_SCROLL_ID),this.lastScreenOrScroll=t??new Date}listen(){if(window.scrollY){let t=this.getPercentScrolledY();this.shouldSendScroll(t)&&this.sendScroll(t)}ce.onDocumentLoaded(()=>{this.observeWindowScroll()})}observeWindowScroll(){Di(window,"scroll").pipe(Ar(su.DEBOUNCE_TIME),pr(()=>{let t=this.getPercentScrolledY();if(t>100){C.warn("Received scroll percent is more than 100",t);return}if(this.shouldSendScroll(t))return t})).subscribe(t=>{this.sendScroll(t)})}shouldSendScroll(t){return Math.abs(this.lastPercent-t)>=su.THRESHOLD||this.lastPercent!==t&&t===100}sendScroll(t){if(t==null)return;let n={percent:t,timeMS:new Date().getTime()-this._lastScreenOrScroll.getTime()};this.lastPercent=t;let r=hc.getString(k.SESSION_STORAGE_SCROLL_ID,""),i=new We(k.EVENT_SCROLL,n,null,r);this.safeHttpService.sendEvent(i),hc.setString(k.SESSION_STORAGE_SCROLL_ID,i.id.toHexString()),this._lastScreenOrScroll=new Date(i.occurred)}getPercentScrolledY(){let t=window.document.body.scrollHeight,n=window.innerHeight;return Math.ceil((window.scrollY+n)/t*100)}},zp=class MD{static ACTIVE_DURATION="aDur";static INACTIVE_DURATION="iaDur";apiService=Te.get(Ve);runtimeData=Oe.get();listen(){document.onvisibilitychange=()=>{document.visibilityState==="visible"?this.onVisible():document.visibilityState==="hidden"&&this.onHidden()}}async onVisible(){}async onHidden(){let t=await this.runtimeData.setInactive();if(t===0){C.info("Not sending background event as user was inactive on website");return}C.info(`Sending background event with ${t} seconds`);let n={};n[MD.ACTIVE_DURATION]=t,this.apiService.sendEvent(new We(k.EVENT_APP_BACKGROUND,n))}},qp=class{loadedFonts=[];async loadAllFonts(e){e.elems?.forEach(t=>{t instanceof _i&&this.loadFamily(t.typography?.fam)})}async loadFamily(e){if(!e?.fonts||this.loadedFonts.indexOf(e.name)>-1)return;let t=[];e.fonts.forEach(n=>{if(n.url){let r=new FontFace(k.COOEE+e.name,n.getURL(),n.getFontDescriptor());t.push(r.load())}}),this.loadedFonts.push(e.name),(await Promise.all(t)).forEach(n=>{document.fonts.add(n)})}},Yp=class{static updateIdentity(e){if(!this.isInstalled())return;let t={};e.email&&(t.email=e.email),e.mobile&&(t.phone_number=e.mobile),C.debug("Sending email/mobile to Klaviyo"),window.klaviyo.push(["identify",t])}static isInstalled(){return window.klaviyo&&typeof window.klaviyo=="object"}},Kp=class{apiService;action;triggerContext;constructor(e,t){this.action=e,this.apiService=Ve.getInstance(),this.triggerContext=t}async execute(){let e=this.containsCTA()?k.EVENT_TRIGGER_CLICKED:k.EVENT_TRIGGER_CLOSED;switch(this.action.at!==106&&await this.closeTriggerAndSendEvent(e),this.action.at){case 2:break;case 4:this.gotoURLAction();break;case 5:this.shareAction();break;case 106:await this.collectFormData();break;case void 0:case 105:break;default:C.error("Received an invalid ClickActionType: ",this.action.at);return}}externalAction(){this.action.ext?.u&&window.open(this.action.ext.u,"_blank")?.focus()}gotoURLAction(){if(this.action.gu?.u){let e=this.action.gu.u;ce.isValidURL(e)||(e=`//${e}`),window.open(e,"_self")}}prompt(){let e=this.action.pmpt;e&&(e===2&&this.promptLocationPermission(),e===3&&this.promptPushNotificationPermission(),e===1&&this.promptCameraPermission())}async closeTriggerAndSendEvent(e,t){this.triggerContext.closeInApp(e,t),await this.dispatchEvent()}shareAction(){if(this.action.share){if(!navigator.share){C.warn("Navigator.share is not compatible with this browser");return}navigator.share({text:this.action.share.text,title:"Share"}).then(e=>console.log(e)).catch(e=>console.error(e))}}containsCTA(){return this.action.at&&this.action.at!==1?!0:!(this.isEmpty(this.action.custKV)&&this.isEmpty(this.action.up))}isEmpty(e){return e?Object.keys(e).length===0:!0}promptLocationPermission(){!navigator.geolocation||!navigator.permissions||navigator.geolocation.getCurrentPosition(e=>{this.apiService.updateDeviceProps({coords:[e.coords.latitude,e.coords.longitude]}),this.sendPermissionData()})}promptPushNotificationPermission(){if(!("Notification"in window)){C.warn("This browser does not support desktop notification");return}if(Notification.permission!=="default"){this.apiService.updateDeviceProps({pnPerm:Notification.permission});return}Notification.requestPermission().then(()=>{this.sendPermissionData()})}promptCameraPermission(){navigator.mediaDevices&&navigator.mediaDevices.getUserMedia({video:!0}).finally(()=>{this.sendPermissionData()})}checkPermission(e){return navigator.permissions.query({name:e}).then(t=>t.state.toString())}async checkAllPermission(){let e=await this.checkPermission("camera"),t=await this.checkPermission("geolocation"),n=Notification.permission;return{camera:e,location:t,notification:n}}sendPermissionData(){this.checkAllPermission().then(e=>{this.apiService.updateDeviceProps({perm:e})})}async collectFormData(){let e={};for(let t of this.triggerContext.inputs){if(!t.isValid)return;let n=document.getElementById(t.id).value;t.type===51?e.email=n:t.type===52&&(e.mobile=n)}await this.closeTriggerAndSendEvent(k.EVENT_FORM_SUBMITTED,{form:e}),ce.showSnackbar("Coupon applied on cart"),Yp.updateIdentity(e)}async dispatchEvent(){let e=this.triggerContext.triggerData,t={clickAction:this.action,items:this.triggerContext.selectedEmbeddedItems??e.embeddedItems??e.items,collections:e.collections,triggerData:e};await new Mo().processEvent(t);let n={action:this.containsCTA()?k.CAMPAIGN_CLICKED_ACTIVITY:k.CAMPAIGN_CLOSED_ACTIVITY};document.dispatchEvent(new CustomEvent(k.POPUP_ACTIVITY_EVENT,{detail:n}))}},Tr=class{renderer=sr.get();parentHTMLEl;inappElement;inappHTMLEl;triggerContext;stylesConverter;scalingFactor;constructor(e,t,n){this.parentHTMLEl=e,this.inappElement=t,this.triggerContext=n,this.stylesConverter=new uc(this.renderer.getScalingFactor())}getHTMLElement(){return this.inappHTMLEl}insertElement(){this.renderer.appendChild(this.parentHTMLEl,this.inappHTMLEl)}processCommonBlocks(){this.processWidthAndHeight(),this.processPositionBlock(),this.processTransformBlock(),this.processTransparency(),this.processShadow(),this.registerAction();let e=te(w(w(w(w({},this.getDisplayStyles()),this.getSpaceStyles()),this.getBorderStyles()),this.getBackgroundStyles()),{boxSizing:"border-box",outline:"none"});this.renderer.setStyles(this.inappHTMLEl,e)}getDisplayStyles(){return{display:"block"}}processWidthAndHeight(){this.inappElement.w&&this.renderer.setStyle(this.inappHTMLEl,"width",this.stylesConverter.getSizePx(this.inappElement.w)),this.inappElement.h&&this.renderer.setStyle(this.inappHTMLEl,"height",this.stylesConverter.getSizePx(this.inappElement.h))}processPositionBlock(){let e={position:"absolute",left:this.stylesConverter.getSizePx(this.inappElement.x),top:this.stylesConverter.getSizePx(this.inappElement.y)};this.renderer.setStyles(this.inappHTMLEl,e)}getBorderStyles(){return this.stylesConverter.getBorderStyles(this.inappElement.br)}getSpaceStyles(){return this.stylesConverter.getSpaceStyles(this.inappElement.spc)}processTransparency(){let e=this.inappElement.alpha;if(!isNaN(e)){let t=(e/100).toFixed(2);this.renderer.setStyle(this.inappHTMLEl,"opacity",t)}}processShadow(){let e=this.inappElement.shd;e?this.renderer.setStyle(this.inappHTMLEl,"box-shadow",e.getStyle(this.scalingFactor)):this.renderer.setStyle(this.inappHTMLEl,"box-shadow","unset")}processTransformBlock(){let e=new Rs(this.inappElement.trf);e&&e.rotate&&this.renderer.setStyle(this.inappHTMLEl,"transform",`rotate(${e.rotate}deg)`)}registerAction(){let e=this.inappElement.clc;!e||Object.keys(e).length===0||(this.inappHTMLEl.addEventListener("click",t=>{t.stopPropagation(),new Kp(e,this.triggerContext).execute()}),this.renderer.setStyle(this.inappHTMLEl,"cursor","pointer"))}getBackgroundStyles(){return this.stylesConverter.getBackgroundStyles(this.inappElement.bg)}},wi=class extends Tr{constructor(e,t,n){super(e,t,n)}processCommonBlocks(){super.processCommonBlocks(),this.processFontBlock(),this.processAlignment()}processFontBlock(){let e={},t=this.inappElement.typography;return t&&(e.fontSize=this.stylesConverter.getSizePx(t.fs),e.fontFamily=k.COOEE+t.fam?.name,e.lineHeight=`${t.lh}`,e.letterSpacing=t.letterSpacing),this.stylesConverter.getColourStyles(this.inappElement.color,"color",e),this.renderer.setStyles(this.inappHTMLEl,e),e}processPart(e,t){let n=[];t.u&&n.push("underline"),t.st&&n.push("line-through"),n.length||n.push("normal"),this.renderer.setStyle(e,"font-weight",t.b?"bold":"normal"),this.renderer.setStyle(e,"font-style",t.i?"italic":"normal"),this.renderer.setStyle(e,"text-decoration",n.join(" ")),this.renderer.setStyle(e,"color",t.c??"inherit"),this.renderer.setStyle(e,"font-family","inherit")}processAlignment(){let e=this.inappElement.typography.ta,t=e?Za[e]?.toLowerCase():this.inappElement.typography.alignment;t||(t="start"),this.renderer.setStyle(this.inappHTMLEl,"text-align",t)}},Kl=class extends wi{constructor(e,t,n){super(e,t,n),this.inappHTMLEl=this.renderer.createElement("div"),this.insertElement()}render(){this.inappElement.parts?.forEach(e=>{let t=this.renderer.createElement("span");t.innerHTML=e.txt?.toString()?.replace(/\n/g,"<br />"),this.processPart(t,e),this.renderer.appendChild(this.inappHTMLEl,t)}),this.processCommonBlocks()}},Zl=class extends Tr{constructor(e,t,n){super(e,t,n),this.inappHTMLEl=this.renderer.createElement("div"),this.insertElement()}render(){this.processCommonBlocks()}},Fs=class extends Tr{constructor(e,t,n){super(e,t,n),this.inappHTMLEl=this.renderer.createElement("img"),this.insertElement()}render(){this.renderer.setAttribute(this.inappHTMLEl,"src",this.inappElement.src),this.renderer.setStyle(this.inappHTMLEl,"max-width","none"),this.renderer.setStyle(this.inappHTMLEl,"max-height","none"),this.renderer.setStyle(this.inappHTMLEl,"margin","0 auto"),this.processCommonBlocks()}},Xl=class UD extends Tr{constructor(t,n,r){super(t,n,r),this.parent=t,this.inappHTMLEl=this.renderer.createElement("div")}static MAX_Z_INDEX="2147483647";render(){return this.parent||this.renderer.removeInApp(this.triggerContext),this.insertElement(),this.processCommonBlocks(),this.inappHTMLEl.classList.add(k.IN_APP_WRAPPER_NAME),this.inappHTMLEl.classList.add(this.triggerContext.rootClassName),this.renderer.setStyle(this.inappHTMLEl,"z-index",UD.MAX_Z_INDEX),this.inappHTMLEl}getBackgroundStyles(){return this.inappElement.cover?super.getBackgroundStyles():{}}processWidthAndHeight(){let t=this.inappElement.cont;if(this.inappElement.cover)this.renderer.isParentNotBody()?(this.renderer.setStyle(this.inappHTMLEl,"width","100%"),this.renderer.setStyle(this.inappHTMLEl,"height","100%")):(this.renderer.setStyle(this.inappHTMLEl,"width","100vw"),this.renderer.setStyle(this.inappHTMLEl,"height","100vh")),this.renderer.setStyle(this.inappHTMLEl,"top","0"),this.renderer.setStyle(this.inappHTMLEl,"left","0");else{let n=this.inappElement.spc,r=this.stylesConverter.getScaledSize(t.w)+n.getHorizontal(),i=this.stylesConverter.getScaledSize(t.h)+n.getVertical();this.renderer.setStyle(this.inappHTMLEl,"width",r+"px"),this.renderer.setStyle(this.inappHTMLEl,"height",i+"px")}}getSpaceStyles(){return{padding:this.inappElement.spc.getPaddingCSS()}}getDisplayStyles(){return w(w({display:"flex"},this.inappElement.getStylesForWrapper()),this.inappElement.getFlexStylesForContainer())}processPositionBlock(){if(this.renderer.isParentNotBody()){if(this.triggerContext.triggerData.ian?.isEmbedded()){this.renderer.setStyle(this.inappHTMLEl,"position","block");return}this.renderer.setStyle(this.inappHTMLEl,"position","absolute")}else this.renderer.setStyle(this.inappHTMLEl,"position","fixed")}getBorderStyles(){return{}}processTransparency(){}processTransformBlock(){}processShadow(){}},Zp=class extends Tr{constructor(e,t,n){super(e,t,n),this.inappHTMLEl=this.renderer.createElement("div"),this.insertElement()}render(){return this.processCommonBlocks(),this.renderer.setStyle(this.inappHTMLEl,"position","relative"),this.renderer.setStyle(this.inappHTMLEl,"overflow","hidden"),this.inappHTMLEl.classList.add(k.IN_APP_CONTAINER_NAME),this}},gc=class extends wi{borderColor="";constructor(e,t,n){super(e,t,n),this.inappHTMLEl=this.renderer.createElement("input"),this.insertElement()}render(){let e=this.setInputType();this.renderer.setAttribute(this.inappHTMLEl,"placeholder",this.inappElement.placeholderText),this.renderer.setStyle(this.inappHTMLEl,"background","#ffffff00"),this.renderer.setStyle(this.inappHTMLEl,"outline","none"),this.inappHTMLEl.addEventListener("click",t=>{t.stopPropagation()}),this.processCommonBlocks(),this.addListener(this.inappHTMLEl,e),this.triggerContext.addInputField(e,this.inappElement.t)}},Xp=class VD extends gc{static EMAIL_REGEX=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/;constructor(t,n,r){super(t,n,r)}setInputType(){let t=`coo-${this.inappElement.t}`;return this.renderer.setAttribute(this.inappHTMLEl,"type","email"),this.renderer.setAttribute(this.inappHTMLEl,"id",t),t}addListener(t,n){t.addEventListener("keydown",r=>{this.borderColor||(this.borderColor=this.inappHTMLEl.style.borderColor),t.value.match(VD.EMAIL_REGEX)?(this.renderer.setStyle(this.inappHTMLEl,"border-color",this.borderColor),this.triggerContext.updateValidation(n,!0)):(this.renderer.setStyle(this.inappHTMLEl,"border-color","red"),this.triggerContext.updateValidation(n,!1)),r.stopPropagation()})}},Jp=class BD extends gc{static MOBILE_REGEX=/^\d+$/;constructor(t,n,r){super(t,n,r)}setInputType(){let t=`coo-${this.inappElement.t}`;return this.renderer.setAttribute(this.inappHTMLEl,"type","tel"),this.renderer.setAttribute(this.inappHTMLEl,"id",t),t}addListener(t,n){t.addEventListener("keydown",r=>{this.borderColor||(this.borderColor=this.inappHTMLEl.style.borderColor),t.value.match(BD.MOBILE_REGEX)?(this.renderer.setStyle(this.inappHTMLEl,"border-color",this.borderColor),this.triggerContext.updateValidation(n,!0)):(this.renderer.setStyle(this.inappHTMLEl,"border-color","red"),this.triggerContext.updateValidation(n,!1)),r.stopPropagation()})}},Qp=class us extends wi{static DAYS="Days";static HOURS="Hours";static MINUTES="Minutes";static SECONDS="Seconds";elements;spans=[];constructor(t,n,r){super(t,n,r),this.inappHTMLEl=this.renderer.createElement("div"),this.insertElement()}render(){this.addTimerChildren(),this.processAndStartTimer(),this.processCommonBlocks();let t=te(w(w(w({flex:"1 1 0"},this.stylesConverter.getBackgroundStyles(this.inappElement.bg)),this.stylesConverter.getBorderStyles(this.inappElement.br)),this.stylesConverter.getSpaceStyles(this.inappElement.spc)),{marginLeft:this.stylesConverter.getSizePx(this.inappElement.gap),marginRight:this.stylesConverter.getSizePx(this.inappElement.gap)});this.addStylesToTimer(t)}getBackgroundStyles(){return{}}processFontBlock(){let t=super.processFontBlock();return this.stylesConverter.getColourStyles(this.inappElement.color,"color",t),this.addStylesToTimer(t),t}getSpaceStyles(){return{}}getBorderStyles(){return{}}getDisplayStyles(){return{display:"flex",flexWrap:"nowrap",justifyContent:"center"}}addStylesToTimer(t){this.elements.forEach(n=>this.renderer.setStyles(n,t))}addTimerChildren(){let t=this.inappElement.show;this.elements=[],t.day&&this.elements.push(this.getChild(us.DAYS)),t.hour&&this.elements.push(this.getChild(us.HOURS)),t.minute&&this.elements.push(this.getChild(us.MINUTES)),t.second&&this.elements.push(this.getChild(us.SECONDS)),this.elements.forEach(n=>this.inappHTMLEl.appendChild(n))}getChild(t){let n=this.renderer.createElement("div"),r=this.renderer.createElement("span"),i=this.renderer.createElement("span");return i.innerText=t,r.innerText="00",r.id=`lc-${t}`,this.renderer.setStyle(i,"font-size","0.5em"),this.renderer.setStyle(i,"text-align","center"),this.renderer.setStyle(i,"font-family","inherit"),this.renderer.setStyle(r,"text-align","center"),this.renderer.setStyle(r,"font-family","inherit"),this.inappElement.lblPos==="start"?(n.appendChild(i),n.appendChild(r)):(n.appendChild(r),n.appendChild(i)),this.renderer.setStyle(n,"display","flex"),this.renderer.setStyle(n,"flex-direction",this.inappElement.horizontal?"":"column"),this.renderer.setStyle(n,"justify-content","center"),this.renderer.setStyle(n,"align-items","center"),this.renderer.setStyle(n,"gap","5px"),this.spans.push(r),n}processAndStartTimer(){let t=this.inappElement.timer.start(this.inappElement.timerType,n=>{this.spans.forEach(r=>{r.id===`lc-${us.DAYS}`?r.innerText=String(n.days).padStart(2,"0"):r.id===`lc-${us.HOURS}`?r.innerText=String(n.hours).padStart(2,"0"):r.id===`lc-${us.MINUTES}`?r.innerText=String(n.minutes).padStart(2,"0"):r.id===`lc-${us.SECONDS}`&&(r.innerText=String(n.seconds).padStart(2,"0"))})});this.triggerContext.intervals.push(t)}},eh=class extends wi{constructor(e,t,n){super(e,t,n),this.inappHTMLEl=this.renderer.createElement("select"),this.insertElement()}render(){this.renderer.setStyle(this.inappHTMLEl,"background","#ffffff00"),this.renderer.setStyle(this.inappHTMLEl,"outline","none"),this.processCommonBlocks(),this.addListener(this.inappHTMLEl),this.addOptions()}addListener(e){this.triggerContext.selectedEmbeddedItems?.length||this.updateItems(this.triggerContext.triggerData.items[0].vars[0]),e.addEventListener("click",t=>{t.stopPropagation()}),e.addEventListener("change",()=>{let t=new vi(JSON.parse(e.value));this.updateItems(t)})}updateItems(e){let t=this.triggerContext.triggerData.items[0];this.triggerContext.selectedEmbeddedItems=[t.toEmbed(e)];let n=this.parentHTMLEl.querySelector("#coo-13");if(!n)return;let r=e.imgs[0]??t.imgs?.at(0);r?.url&&n.setAttribute("src",r.url)}addOptions(){let e=this.triggerContext.triggerData.items,t=this.inappHTMLEl;if(!e?.length){t.add(this.createOption(this.inappElement.placeholderText));return}let n=this.triggerContext.selectedEmbeddedItems?.at(0);e[0].vars.forEach(r=>{t.add(this.createOption(r.name??"Default",r,r.mID===n?.vID))})}createOption(e,t,n){let r=this.renderer.createElement("option");return r.text=e,r.value=JSON.stringify(t),n&&(r.selected=!0),t||(r.disabled=!0),r}},th=class extends Fs{constructor(e,t,n){super(e,t,n)}render(){super.render(),this.inappHTMLEl.setAttribute("id",`coo-${this.inappElement.type}`)}},yc=class xc{static ACTIVE_TRIGGER_DATA;renderer=sr.get();safeHTTP;parent;rootContainer;containerHTMLElement;ian;triggerContext;resizeListener;cartDrawerToggleSubscription;constructor(t){this.safeHTTP=Ve.getInstance(),this.resizeListener=()=>this.screenResized(),this.setParentContainer(t)}setParentContainer(t){this.parent=t??document.body,this.renderer.setParentContainer(this.parent)}render(t){this.renderEngagement(new Hn(t))}async renderEngagement(t){if(this.triggerContext=new cc(new Date,t),this.triggerContext.onClose(n=>{this.closeInApp(n)}),this.ian=t.ian,(this.renderer.isMobile()||t.previewType==="mobile")&&this.ian.overrideForMobileView(),this.ian.isEmbedded()){let n=document.querySelector(this.ian.getEmbeddedSelector());this.setParentContainer(n)}await this.preloadImages(t),t.shouldDelay()?window.setTimeout(()=>{this.withCartDrawerClosed()},t.getDelaySeconds()):this.withCartDrawerClosed()}withCartDrawerClosed(){if(!Gt.get().isOpen()||!this.renderer.isMobile()){this.startRenderingOnce();return}this.cartDrawerToggleSubscription=Gt.get().onToggle().subscribe(({open:t})=>{!t&&this.startRenderingOnce()})}startRenderingOnce(){if(!this.shouldSkipCampaign()){xc.ACTIVE_TRIGGER_DATA=this.triggerContext.triggerData;try{this.startRendering()}catch(t){_t.getInstance().captureException(t,{triggerData:JSON.stringify(this.triggerContext.triggerData)});return}this.sendTriggerDisplayed(),this.renderer.isMobile()||window.addEventListener("resize",this.resizeListener),this.cartDrawerToggleSubscription?.unsubscribe()}}shouldSkipCampaign(){let t=this.triggerContext.triggerData;if(!t.previewType&&xc.ACTIVE_TRIGGER_DATA){let r={triggerShown:new bo(xc.ACTIVE_TRIGGER_DATA??{})};return this.skipTrigger(t,r),!0}if(Oe.get().isGoKwikPopupOpen)return this.skipTrigger(t,{reason:"GoKwik popup is open"}),!0;let n=k.PAYMENT_MODAL_DETAILS.find(r=>!!document.querySelector(r.identifier));return n?(this.skipTrigger(t,{reason:`${n.gateway} modal is open`}),!0):!1}startRendering(){this.renderer.calculateScalingFactor(this.ian),this.rootContainer=new Xl(this.parent,this.ian,this.triggerContext).render();try{this.renderContainer(this.triggerContext)}catch(t){throw C.error(t),t}}sendTriggerDisplayed(){let t={};this.triggerContext.triggerData.items?.length&&(t.promotedMIDs=this.triggerContext.triggerData.items?.map(i=>i.mID));let n=new We(k.EVENT_TRIGGER_DISPLAYED,t,this.triggerContext.triggerData);this.safeHTTP.sendEvent(n);let r={action:k.CAMPAIGN_DISPLAYED_ACTIVITY};document.dispatchEvent(new CustomEvent(k.POPUP_ACTIVITY_EVENT,{detail:r}))}sendTriggerClosed(t){let n=t.eventName;delete t.eventName;let r=new We(n,t,this.triggerContext.triggerData);r.name===k.EVENT_TRIGGER_CLICKED&&(r.items=this.triggerContext.selectedEmbeddedItems??this.triggerContext.triggerData.items?.map(i=>i.toEmbed())),this.safeHTTP.sendEvent(r)}addEnterAnimation(t){this.containerHTMLElement.animate(t.getEnterAnimation(),{duration:500})}renderElement(t,n,r){n instanceof ec?new Xp(t,n,r).render():n instanceof tc?new Jp(t,n,r).render():n instanceof So?new Kl(t,n,r).render():n instanceof nc?new th(t,n,r).render():n instanceof Zi?new Fs(t,n,r).render():n instanceof Ns?new Zl(t,n,r).render():n instanceof Ja?new Qp(t,n,r).render():n instanceof Qa?new eh(t,n,r).render():C.error("Unsupported element type- "+n.type)}renderContainer(t){let n=this.ian?.cont;n&&(this.containerHTMLElement=new Zp(this.rootContainer,n,t).render().getHTMLElement(),new qp().loadAllFonts(this.ian),this.ian.elems?.forEach(async r=>{await this.renderElement(this.containerHTMLElement,r,t)}),this.addEnterAnimation(this.ian.anim))}closeInApp(t){let n=this.ian.anim.getExitAnimation();this.sendTriggerClosed(t),xc.ACTIVE_TRIGGER_DATA=void 0;let r=this.containerHTMLElement.animate(n,{duration:500,easing:"ease-in-out"});r.onfinish=()=>{this.removeInApp(),window.removeEventListener("resize",this.resizeListener)}}screenResized(){this.removeInApp(),this.startRendering()}removeInApp(){sr.get().removeInApp(this.triggerContext)}skipTrigger(t,n){let r=new We(k.EVENT_CAMPAIGN_REJECTED,n,t);this.safeHTTP.sendEvent(r)}async preloadImages(t){let n=t.ian;if(!n)return;let r=[];n.elems.forEach(i=>{let s=i.bg?.img?.src;if(s&&r.push(this.getPromise(s)),i.t===1){let o=i.src;if(!o)return;r.push(this.getPromise(o))}}),n.bg?.img?.src&&r.push(this.getPromise(n.bg.img.src)),n.cont.bg?.img?.src&&r.push(this.getPromise(n.cont.bg.img.src)),await Promise.all(r)}getPromise(t){return new Promise(n=>{let r=new Image;r.onload=n,r.src=t,r.style.display="none"})}},nh=class{compareCartItemSubject=new J;constructor(){this.compareCartItemSubject.pipe(Ar(100)).subscribe(this.compareCartItems.bind(this))}listen(){this.compareCartItemSubject.next(),this.overwriteXMLHttpRequest(),this.overwriteFetchMethod()}overwriteXMLHttpRequest(){let e=this,t=window.XMLHttpRequest.prototype.send;window.XMLHttpRequest.prototype.send=function(){return this.addEventListener("load",function(){e.performEvent(this._url).catch(n=>C.error("Unable to process cart change in XMLHttpRequest",n))}),t.apply(this,arguments)},C.debug("Securely overwritten window.XMLHttpRequest.send method")}overwriteFetchMethod(){let e=this,t=window.fetch;window.fetch=function(n){return t.apply(window,arguments).then(r=>(e.performEvent(n.toString()).catch(i=>C.error("Unable to process cart change in fetch",i)),r))},C.debug("Securely overwritten window.fetch method")}async performEvent(e){this.isCartManipulationURL(e)&&(Oe.get().isCartDirty=!0,this.compareCartItemSubject.next())}isCartManipulationURL(e){return/\/cart\/(add|change|update|clear)/.test(e)}sendChangesAsEvents(e,t){let n=e?.items,r=t.items,i=[],s=[];if(C.debug(`Comparing cart change with old count ${n?.length} to new count ${r.length}`),r?.forEach(o=>{let a=n?.find(l=>l.vID===o.vID);if(a){if(a.quantity!==o.quantity){let l=a.quantity<o.quantity,c=Math.abs(a.quantity-o.quantity),h=te(w({},o),{quantity:c});l?i.push(h):s.push(h)}n&&ce.removeFromArray(n,a)}else i.push(o)}),n)for(let o of n)s.push(o);C.debug(`Cart delta: added: ${i.length}, removed: ${s.length}`),i.length&&this.sendEvent(k.EVENT_ADD_TO_CART,{items:i}),s.length&&e.token===t.token&&this.sendEvent(k.EVENT_REMOVE_FROM_CART,{items:s}),(s.length||i.length)&&mi.get().broadcast(k.CART_UPDATE_BROADCAST,{itemsAdded:i,itemsRemoved:s})}sendEvent(e,t){let n=new We(e,t);Te.get(Ve).sendEvent(n)}async compareCartItems(){let e=await rt.get(ge.CURRENT_CART,{}),t=await Ge.getCurrent().getNormalisedCart(!0);this.sendChangesAsEvents(e,t)}},rh=class{listen(){return this.overwriteFetchMethod(),this}overwriteFetchMethod(){let e=this,t=window.fetch;window.fetch=async function(n,r){try{await e.modifyRequest(n,r)}catch(i){_t.getInstance().captureError("Failed to modify graphql request",i,{body:JSON.stringify(r?.body)})}return t(n,r)},C.debug("Securely overwritten window.fetch method for graphql query")}async modifyRequest(e,t){let n=typeof e=="string"?e:e instanceof Request?e.url:"";if(!(n.includes("graphql.json")&&t?.method==="POST")||!t.body)return;let r;if(typeof t.body=="string")try{r=JSON.parse(t.body)}catch{return}else r=t.body;C.debug("Intercepted fetch request of:",n),r?.query.includes("cartCreate")&&(t.body=await this.updatedBody(r),this.sendBuyNowEvent())}async updatedBody(e){let t=e.variables.input.attributes??[],n=await ce.getCartAttributes();return e.variables.input.attributes=[...t,...n],JSON.stringify(e)}sendBuyNowEvent(){let e=Oe.get().getCurrentItem();if(!e)return;let t=new We(k.EVENT_BUY_NOW_CLICKED,{items:[e]});Ve.getInstance().sendEvent(t)}},vc=class{constructor(e,t){this.selectors=e,this.eventName=t,this.selectorString=e.join(",")}static INSTANCE;elements;selectorString;clickListenerCallback=e=>{let t=e.currentTarget,n=new We(this.eventName,{class:t.className||void 0,tagName:t.tagName||void 0,id:t.id||void 0});Ve.getInstance().sendEvent(n),this.removeClickListener(this.clickListenerCallback)};listenSilently(){this.listen().catch(e=>C.error(e))}async listen(){this.elements=await ce.retrySelectorForElements(this.selectorString),this.elements.forEach(e=>{e.addEventListener("click",this.clickListenerCallback)})}removeClickListener(e){this.elements?.forEach(t=>{t.removeEventListener("click",e)})}},ih=class Mf extends vc{static selectors=[".product__thumbnail-list-inner > button","product-gallery-navigation > button",".product-media--thumb-container",".product-images-inner > img",".m-product-media",".swiper-button-control",".media__thumb",".slick-arrow",".productView-img-container.product-single__media",".product-gallery__thumbnail_item_inner"];constructor(){super(Mf.selectors,k.EVENT_ITEM_THUMBNAIL_CLICKED)}static getInstance(){return this.INSTANCE||(this.INSTANCE=new Mf),this.INSTANCE}},oh=class Uf extends vc{static selectors=[".jdgm-widget.jdgm-preview-badge.jdgm-preview-badge--with-link.jdgm--done-setup","reviewsio-product-ratings",".ruk_rating_snippet.tracked:not(.hidden)","a > .loox-rating",".yotpo-reviews-star-ratings-widget",".yotpo.lp-hero__reviews",".pr-rating > a",".rivyoReviewWidget"];constructor(){super(Uf.selectors,k.EVENT_REVIEW_CLICKED)}static getInstance(){return this.INSTANCE||(this.INSTANCE=new Uf),this.INSTANCE}},sh=class{selector=[".gokwik-checkout button","button.cart__checkout-button","button.cart__checkout","button#checkout","button#checkout2",'button[id*="checkout" i]','button[name*="checkout" i]','button[class*="checkout" i]'].join(",");listen(){ce.onDocumentLoaded(()=>{C.debug("Execution order:","document ready"),this.useLocationHash()})}useLocationHash(){let e=window.location.hash?.substring(1);if(e)if(e.includes(k.HASH_INITIATE_CHECKOUT)){document.dispatchEvent(new Event(k.THIRD_PARTY_CHECKOUT_EVENT));let t=document.querySelector(this.selector);if(!t){C.debug("No clickable cart checkout button found");return}C.debug("Clickable cart checkout button found",t),t.click()}else e.includes(k.HASH_OPEN_CART_DRAWER)&&Gt.get().open()}},ah=class{trackSilently(){this.track().catch(e=>_t.getInstance().captureException(e))}async track(){let e=window.Shopify?.checkout,t=window.Shopify?.Checkout;if(!e&&!t)return;let n={};this.processSmallCheckout(e,n),this.processBigCheckout(t,n);let r=this.getTokenFromCurrentURLPath();if(r&&(n.urlToken=r),!Object.keys(n).length){C.warn("No processable data found in",e,t);return}n.referrer=document.referrer,n.url=location.href;let i=await Te.get(zt).checkSessionAndGetContext();n.sessionID=i[0],this.trackOrder(n)}processSmallCheckout(e,t){e&&(e.order_id&&(t.orderID=e.order_id.toString()),e.token&&(t.checkoutToken=e.token.toString()),e.customer_id&&(t.customerID=e.customer_id.toString()))}processBigCheckout(e,t){e&&(e.token&&!t.checkoutToken&&(t.checkoutToken=e.token.toString()),e.cartToken&&(t.cartToken=e.cartToken.toString()))}trackOrder(e){C.info("Found order to be send",e),Ve.getInstance().trackOrder(e)}getTokenFromCurrentURLPath(){let e=new RegExp("[A-Fa-f0-9]{28,32}");return location.pathname?.split("/").find(t=>t.length&&e.test(t))}},Jl=class{static attachCheckoutListener(){window.gokwikSdk&&window.gokwikSdk.on("checkout_initiated",async()=>{let e=await Ge.getCurrent().getNormalisedCart(),t={via:"GoKwik",items:e.items,cartToken:e.token,amount:{value:e.amount,currency:e.currency}},n=new We(k.EVENT_CHECKOUT_STARTED,t);Ve.getInstance().sendEvent(n)})}},ch=class{async migrate(){}};_n.escape=lx.MustacheUtils.escapeHtml;var gt=class{static globalRef;static authenticated;static async initForMerchantWebsiteOnly(){window.cooeeSDKPreview||(this.initGlobalReference(),await new ch().migrate(),this.autoAuthenticate(),new Gp().meddle(),Te.get(Oo).loadExperimentSilently(),new zp().listen(),new ah().trackSilently(),new nh().listen(),new rh().listen(),new sh().listen(),Te.get(mc).listen(),Te.get(oh).listenSilently(),Te.get(ih).listenSilently(),Te.get(Gr).loadPageWidgetsSilently(),this.attachGoKwikListeners(),this.storePreviewParams(),this.setupPreviewListeners(),Dr.watch())}static async initForAll(){this.injectWidgetAssets()}static initGlobalReference(){window.CooeeSDK||Fa(window,"CooeeSDK",{}),this.globalRef=window.CooeeSDK,Fa(this.globalRef,"config",new vt),Fa(this.globalRef,"runtimeData",new Oe),C.debug("Global reference initialised")}static injectWidgetAssets(){Nt.injectScriptURL(mn.widgetURL,"cooee-widget-sdk"),Nt.injectStylesheet(mn.styleURL)}static autoAuthenticate(){let e=Dt.getShopName();e&&this.authenticate({shopifyShop:e})}static authenticate(e){if(this.authenticated)return;let t=e.appID?.trim(),n=e.shopifyShop;if((ce.isNull(t)||t.length!==24)&&ce.isNull(n)){C.warn("Cooee App ID or Shop name is not configured");return}this.authenticated=!0,Te.get(zt).init(e)}static sendEvent(e,t,n){let r=new We(e,t,n?.triggerData);n?.occurred&&(r.occurred=n.occurred),Te.get(Ve).sendEvent(r)}static updateProfile(e){for(let t in e)if(t.toLowerCase().startsWith("ce "))throw new Error("User property name cannot start with 'CE '");Te.get(Ve).updateProfile(e)}static setPageName(e){if(!e)return;let t=Oe.get(),n=t.pageName;if(e===n)return;if(t.pageName=e,e==="cart"&&Te.get(Gr).loadOrRenderWidgetsAfterCartChange(),k.BLACKLISTED_PAGE_NAMES.some(s=>e.includes(s))){Te.get(mc).resetScrollID();return}let r={};n&&(r.ps=n);let i=new We(k.EVENT_SCREEN_VIEW,r);i.occurred=t.jsLoadTime,Te.get(Ve).sendEvent(i),Te.get(mc).resetScrollID(i.occurred)}static previewPopup(e,t){new yc(t).render(e)}static previewWidget(e){new Kn(new Hn(e)).render()}static setupPreviewListeners(){if(window.opener){try{window.opener.postMessage({action:"COOEE_READY_FOR_PREVIEW"},"*")}catch(e){C.error(e)}window.addEventListener("message",e=>{if(C.debug("Received event",e),!e.origin.includes("letscooee.com")&&!e.origin.includes("localhost"))return;let t=e.data;typeof t=="object"&&(t.action==="POPUP_PREVIEW"?(this.previewPopup(t.engagementTrigger),e.source?.postMessage({action:"PREVIEW_SUCCESSFUL"},e.origin)):t.action==="WIDGET_PREVIEW"&&(this.previewWidget(t.engagementTrigger),e.source?.postMessage({action:"PREVIEW_SUCCESSFUL"},e.origin)))})}}static attachGoKwikListeners(){let e=Oe.get();window.addEventListener("kp-modal:opened",()=>{e.isGoKwikPopupOpen=!0}),window.addEventListener("user-loggedin",t=>{let{token:n}=t.detail;n&&this.updateProfile({goKwikToken:n})}),window.gokwikSdk?Jl.attachCheckoutListener():window.addEventListener("gokwikLoaded",Jl.attachCheckoutListener)}static storePreviewParams(){let e=Oe.get(),t=new URLSearchParams(location.search),n=t.get("cooee-preview");n&&(e.previewIDs=n.trim().split(",").filter(i=>Number.isInteger(+i)));let r=t.get("cooee-variant");r&&(e.previewVariant=r)}},lh=class FD{static INSTANCE;constructor(){this.init()}static getInstance(){return this.INSTANCE||(this.INSTANCE=new FD),this.INSTANCE}init(){Nl.get(ge.APP_CONFIG,{}).then(t=>this.updateGlobalConfig(t))}async processAppConfigurations(t){C.log("Received app configuration",t),t.currencyCount=t.currencies?.length;let n=this.updateGlobalConfig(t);Nl.set(ge.APP_CONFIG,n).catch(r=>C.error(r)),op.processConfiguration(),n.website&&(Nt.injectRawScript(n.website.commonJS),Nt.injectRawCSS(n.website.commonCSS)),Gt.get().onToggle().subscribe(async({open:r})=>{C.info("Cart drawer is now",r?"open":"closed"),r&&(Te.get(Gr).loadOrRenderWidgetsAfterCartChange(),await this.trackViewCartEvent())})}updateGlobalConfig(t){let n=gt.globalRef.config.update(t);return Gt.forceUpdate(),C.debug("App configurations",n),n}async trackViewCartEvent(){let t=await Ge.getCurrent().getNormalisedCart(),n={value:t.amount,currency:t.currency},r={items:t.items,amount:n,drawer:!0};Ve.getInstance().sendEvent(new We(k.EVENT_VIEW_CART,r))}},ux=Re(b_()),uh=class Vf{static META_REQUIRED_FIELDS=["ad_id"];static GOOGLE_REQUIRED_FIELDS=["gad_source","gclid"];source;adID;campaignID;adName;campaignName;constructor(t){this.adID=t.adID,this.campaignID=t.campaignID,this.source=t.source}static getAdParams(){let t;try{t=new ux.URLBuilder(location.href)}catch{return{}}let n={};if(this.META_REQUIRED_FIELDS.every(r=>Array.from(t.getParams().keys()).includes(r)))return n={source:"META",adID:t.getQueryParam("ad_id")?.trim(),campaignID:t.getQueryParam("campaign_id")?.trim()},new Vf(n);if(this.GOOGLE_REQUIRED_FIELDS.every(r=>Array.from(t.getParams().keys()).includes(r)))return n={source:"GOOGLE"},new Vf(n)}},Ps=class jD{static INSTANCE;httpAPIService=On.getInstance();coreService=lh.getInstance();sentryService=_t.getInstance();sdkToken="";userID="";deviceID="";appID="";shopifyShop="";constructor(){}static getInstance(){return this.INSTANCE||(this.INSTANCE=new jD),this.INSTANCE}init(t){this.appID=t.appID,this.shopifyShop=t.shopifyShop}async storeAndPopulateAuthData(t){t&&(t.userID&&(this.userID=t.userID,await rt.set(ge.ID,t.userID)),t.deviceID&&(this.deviceID=t.deviceID,await rt.set(ge.DEVICE_ID,t.deviceID)),t.sdkToken&&(this.sdkToken=t.sdkToken,await rt.set(ge.SDK_TOKEN,t.sdkToken)),this.updateAPIClient())}async validateSession(t){await this.populateFirstSeen(),await this.populateUserDataFromStorage(),C.log("Validating session with server");let n=await this.getSessionValidateData(t);try{let r=await this.httpAPIService.validateSession(n);C.log("Validating session Response",r),await this.coreService.processAppConfigurations(r.appSettings),await this.storeAndPopulateAuthData(r)}catch(r){throw C.error(r),r}}async populateUserDataFromStorage(){if(this.sdkToken=await rt.get(ge.SDK_TOKEN),!this.sdkToken){C.warn("No SDK token found in local storage");return}this.userID=await rt.get(ge.ID),this.deviceID=await rt.get(ge.DEVICE_ID),this.updateAPIClient()}updateAPIClient(){C.debug("SDK Token:",this.sdkToken),C.log("Device ID:",this.deviceID),C.log("User ID:",this.userID),Ga.trackDeviceID(this.deviceID),Dr.prepend(`Device ID: <strong>${this.deviceID}</strong>`),this.httpAPIService.setAPIToken(this.sdkToken),this.sentryService.setGlobalContext("Visitor Info",{device_id:this.deviceID,user_id:this.userID}),this.sentryService.setUser({id:this.deviceID})}async getSessionValidateData(t){let n=await new rp().get();n.host=location.origin;try{(await _T())?.isPrivate&&(n.private=!0)}catch(i){dx.default.error("Unable to detect private/incognito window",i)}let r=await rt.get(ge.DEVICE_ID);return r||(r=new un().toHexString(),await rt.set(ge.DEVICE_ID,r)),te(w({deviceID:r,deviceProps:n,appID:this.appID,shopifyShop:this.shopifyShop},t),{sdk:k.SDK,page:hi.parseFromCurrent(),ad:uh.getAdParams(),occurred:this.getSessionStartTime(Oe.get().jsLoadTime),currentItem:Oe.get().getCurrentItem(),cart:await Ge.getCurrent().getNormalisedCart(),properties:{}})}async populateFirstSeen(){let t=await rt.get(ge.FIRST_SEEN),n=t?new Date(t):new Date;t||await rt.set(ge.FIRST_SEEN,n.toISOString()),this.httpAPIService.setFirstSeen(n),this.sentryService.setGlobalContext("Visitor Info",{first_seen:n.toISOString()})}getSessionStartTime(t){return(new Date().getTime()-t.getTime())/1e3>k.IDLE_TIME_IN_SECONDS?new Date:t}},zt=class Ic{static replaySubject=new Bo(1);static INSTANCE;sentryService=Te.get(_t);lock=new Wa;constructor(){}static getInstance(){return this.INSTANCE||(this.INSTANCE=new Ic),this.INSTANCE}init(t){if(C.debug("Initialising SDK",t),vT(navigator.userAgent)){C.info("This seems to be a bot. Disabling SDK");return}Ps.getInstance().init(t),Ic.INSTANCE.checkForNewSession(!0).then(async()=>{Ic.replaySubject.next(!0),Ic.replaySubject.complete()}).catch(n=>{C.error("Unable to initiate session",n)})}getCurrentSessionID(){return yn.set(ge.SESSION_LAST_USED_TIME,new Date().getTime()),yn.get(ge.ID,"")}async checkSessionAndGetContext(){return await this.checkForNewSession(),this.getContext()}async getContext(){let t=await Promise.all([this.getCurrentSessionID(),this.getCurrentSessionNumber(),this.getLandingPage()]);return this.sentryService.setGlobalContext("Visitor Session",{id:t[0],number:t[1],landing_page:t[2]}),t}async checkForNewSession(t){await this.lock.acquire();let n=!1;if(await this.isNewSessionRequired()?(await this.startNewSession(),t=!0,n=!0):await this.notSynced()&&(n=!0),t){let r=await this.getContext();await Ps.getInstance().validateSession({sessionID:r[0],sessionNumber:r[1],landingPage:r[2],newSession:n}),await yn.set(ge.SESSION_SYNCED,!0)}this.lock.release()}async startNewSession(){C.debug("Starting new session"),await yn.clear(),C.debug("Cleared SessionStorage before starting new session");let t=new Date,n=new un().toHexString();C.debug("New session ID to be used",n);let r=await rt.get(ge.SESSION_NUMBER,0)+1;Dr.prepend(`New Session ID: <strong>${n}</strong> & number: ${r}`),await Promise.all([rt.set(ge.SESSION_NUMBER,r),yn.set(ge.ID,n),yn.set(ge.SESSION_LAST_USED_TIME,t.getTime()),yn.set(ge.SESSION_LANDING_PAGE,hi.parseFromCurrent())])}getLandingPage(){return yn.get(ge.SESSION_LANDING_PAGE,{})}getCurrentSessionNumber(){return rt.get(ge.SESSION_NUMBER,1)}async isNewSessionRequired(){if(!await yn.get(ge.ID))return!0;let t=await yn.get(ge.SESSION_LAST_USED_TIME,0);return t?(new Date().getTime()-t)/1e3>k.IDLE_TIME_IN_SECONDS:!0}async notSynced(){return!await yn.get(ge.SESSION_SYNCED,!1)}},hx=Re(qn()),fx=Re(qn()),px=Re(Ta()),dh=class{triggerData;safeHttpService=Ve.getInstance();render(e){e.contentSource===fx.EngagementContentSource.KLAVIYO&&(this.triggerData=e,window.addEventListener("klaviyoForms",this.handleKlaviyoEvents.bind(this)),window._klOnsite=window._klOnsite||[],window._klOnsite.push(["openForm",e.klaviyoFormID]))}handleKlaviyoEvents(e){if(e.type!=="klaviyoForms")return;let t=e.detail;if(t.formId!==this.triggerData.klaviyoFormID){C.warn("Received invalid trigger callback");return}switch(t.type){case"open":this.safeHttpService.sendEvent(new We(k.EVENT_TRIGGER_DISPLAYED,{form:{id:t.formId}},this.triggerData));break;case"stepSubmit":{let n=this.getFormDetails(t);this.safeHttpService.sendEvent(new We(k.EVENT_FORM_SUBMITTED,{form:n},this.triggerData)),this.safeHttpService.updateProfile(n);break}case"close":window.removeEventListener("klaviyoForms",this.handleKlaviyoEvents.bind(this)),this.safeHttpService.sendEvent(new We(k.EVENT_TRIGGER_CLOSED,{form:{id:t.formId}},this.triggerData));break}}getFormDetails(e){let t={id:e.formId},n=e.metaData;if(px.JSUtils.hasKeys(n)){let r=["email","phone_number","first_name","last_name","$email","$phone_number","$first_name","$last_name"];Object.keys(n).forEach(o=>{r.includes(o)||(t[o]=n[o])}),t.email=n.$email??n.email,t.mobile=n.$phone_number??n.phone_number;let i=n.$first_name??n.first_name,s=n.$last_name??n.last_name;(i?.length||s?.length)&&(t.name=i+" "+s)}return t}},fh=class{static trackIntent(e){if(!this.isInstalled()){C.log("Facebook pixel not installed");return}if(!vt.get().pixelPush){C.log("Facebook pixel push not enabled");return}let t=Is[e.intent]?.toLowerCase(),n=e.segmentName;!t&&!n||(C.debug(`Sending ${t} intent and ${n} segment to Facebook Pixel`),window.fbq("trackCustom","CooeeIntent",{intent_value:t,segment_value:e.segmentName}))}static isInstalled(){return window.fbq&&typeof window.fbq=="function"}},ph=class HD{static INSTANCE;httpService=Te.get(On);sentryService=Te.get(_t);sessionManager=Te.get(zt);runtime=Oe.get();constructor(){}static getInstance(){return this.INSTANCE||(this.INSTANCE=new HD),this.INSTANCE}sendSilently(t){this.send(t).catch(n=>C.error(`Failed to send ${t.name}`,n))}async send(t){if(C.debug(`Sending event ${t.name}`),Dr.prepend(`Sending event <strong>${t.name}</strong> with id ${t.id}`),this.shouldReject(t)){C.warn(`Rejecting event ${t.name}`);return}await Promise.all([this.addSessionContext(t),this.addShopifyContext(t)]),this.addShopifyAttributes(),t.name!==k.EVENT_APP_BACKGROUND&&this.runtime.setActive(),t.currentItem=this.runtime.getCurrentItem(),t.locale=this.runtime.locale,this.httpService.post("/v1/event/track",t).then(async n=>{C.log("\u2705 Event tracked:",t.name),Dr.prepend(`\u2705 Event <strong>${n.eventName}</strong> tracked`),this.processEventResponse(t,n)}).catch(n=>{C.error(`Error sending event ${t.name} to server`,n)})}shouldReject(t){return t.trigger?.triggerID==="test"||t.trigger?.triggerID==="preview"?(C.warn("Not sending event as this is a test trigger"),!0):!1}async addSessionContext(t){let n=await this.sessionManager.checkSessionAndGetContext();t.sessionID=n[0],t.sessionNumber=n[1],t.landingPage=n[2],t.page=hi.parseFromCurrent()}async addShopifyContext(t){if(Dt.isShopify())try{t.cart=await Ge.getCurrent().getNormalisedCart()}catch(n){C.error("Error fetching Shopify cart before sending the event",n)}}processEventResponse(t,n){this.renderWidgetIfAny(t,n).catch(r=>{C.error("Failed to display a campaign",r,t,n),this.sentryService.captureException(r,{event:t,response:n})}),this.utiliseIntentIfCalculated(n)}async renderWidgetIfAny(t,n){if(!n.triggerData){C.log(`Nothing to engage after ${t.name}`);return}C.log(`\u{1F4E3} Engagement(id=${n.triggerData.shortID}) will be shown`,n.triggerData);let r=new Hn(n.triggerData);r.occurred=t.occurred;let i;try{i=await lc.refreshItems(r)}catch(s){C.error("Failed to refresh the products",s);return}if(r.items=i,r.contentSource===hx.EngagementContentSource.KLAVIYO){new dh().render(r);return}new yc().renderEngagement(r).catch(s=>{C.error("Failed to render popup",s),this.sentryService.captureException(s,{event:t,triggerData:r})})}utiliseIntentIfCalculated(t){t.intent&&(Ga.trackIntent(t.intent),fh.trackIntent(t),Dr.prepend(`Intent is <strong>${Is[t.intent]}</strong>`))}addShopifyAttributes(){Dt.isShopify()&&Ge.getCurrent().addCooeeAttributes().catch(t=>{C.error("Fail to add attributes in cart",t)})}},Ve=class $D{static INSTANCE;httpApiService=On.getInstance();eventAPIService=ph.getInstance();constructor(){}static getInstance(){return this.INSTANCE||(this.INSTANCE=new $D),this.INSTANCE}sendEvent(t){C.debug(`Waiting for auth to send event ${t.name}`),zt.replaySubject.subscribe(async()=>{this.eventAPIService.sendSilently(t)})}updateProfile(t){zt.replaySubject.subscribe(()=>{this.httpApiService.updateUserData(t??{})})}trackOrder(t){zt.replaySubject.subscribe(()=>{this.httpApiService.trackOrder(t)})}updateDeviceProps(t){zt.replaySubject.subscribe(()=>{this.httpApiService.updateDeviceProps({props:t})})}generateDiscount(t){return this.httpApiService.generateDiscount(t)}},Ro=class{constructor(e,t){this.triggerContext=e,this.element=t}safeHTTP=Ve.getInstance();async execute(e){let t=Oe.get().getCurrentItem(),n=e.clickAction||this.element?.clc;if(!n)return;let r=e.item,i=this.triggerContext,s=new Mo,o=i.triggerData.redirectBehaviour,a=!!i.triggerData.discount.type&&!!n?.applyDiscount,l={selectedVariants:i.triggerData.nonMutableItems.map(b=>({itemMID:b.mID,mID:b.selectedOrFirstVariant.value.mID})),eID:i.triggerData.engagementID,cID:i.triggerData.contentID},c="",h=[],d=[];if(r?d=[r.toEmbed()]:e.embeddedItem&&(d=[e.embeddedItem]),n.at===108){let b=i.selectedItems;if(d=e.embeddedItems??b.map(x=>x.toEmbed()),i.shouldGiveFBTDiscount||e.embeddedItems?.length){let x;e.embeddedItems?x=e.embeddedItems.map(F=>({itemMID:F.mID,mID:F.vID,quantity:F.quantity})):x=b.map(F=>({itemMID:F.mID,mID:F.selectedOrFirstVariant.value.mID}));let A=i.triggerData.bundleFrom;i.triggerData.isBundleOnCartDrawer()&&A&&(x.push({itemMID:A.mID,mID:A.selectedOrFirstVariant.value.mID,isPrimary:!0}),d.unshift(A.toEmbed())),l.selectedVariants=x,i.triggerData.isBundleOnPDP()&&l.selectedVariants.forEach(F=>{F.mID===t.vID&&(F.isPrimary=!0)})}else l=void 0;h=e.embeddedItems??b}else if(n.at===107){let b=await Ge.getCurrent().getNormalisedCart();d=b.items,l.selectedVariants=b.items.map(x=>({itemMID:x.mID,mID:x.vID}))}else if(n.at===102)h=r?[r]:[e.embeddedItem];else if(n.at===101)c=r?Dt.getRootPrefix()+"products/"+r.slug:e.embeddedItem?.link;else if(n.at===4){let b=ce.isValidURL(n.gu?.u);b&&(c=b.href)}else if(n.at===109){let b=await s.upgradeToSubscription(r,i.triggerData);this.triggerContext.triggerData.skipSubscribedItems&&this.triggerContext.renderer.destroy(),Gt.get().refreshUI(b)}else if(n.at===104){let b=this.triggerContext.triggerData.collections?.[0];b&&(c="collections/"+b.handle)}if(this.sendTriggerClicked(d,{from:"button"},e.video),C.debug({redirectPath:c,redirectBehaviour:o,hasDiscount:a}),!a&&c){location.href=c;return}let f,g=!1;try{f=await this.getOrGenerateDiscountCode(l),C.debug("Discount code (if any) to apply",f)}catch(b){if(!this.triggerContext.triggerData.isBYOB()){gx.default.error("Unable to get a discount code",b);return}}if(f&&n.at===103)await s.performCopyCoupon(f);else if(n.at===110){let b=await s.performCartCreate(t,f,i.triggerData);b&&(location.href=b);return}try{f&&await Ao.applyWithStorefront(f)}catch(b){C.error(b),g=!0}let m;if(h?.length&&(m=await s.performAddToCart(h,i.triggerData)),g&&f){Ao.navigate(f,o,c);return}if(c){location.href=c;return}Ao.navigateWithoutDiscount(o,m)}sendTriggerClicked(e,t,n){let r=k.EVENT_TRIGGER_CLICKED,i=new We(r,t,this.triggerContext.triggerData);i.items=e,n?.id&&(i.videos=[n.id]),this.safeHTTP.sendEvent(i)}async getOrGenerateDiscountCode(e){let t=this.triggerContext.triggerData.discount;if(!t?.type)return;let n="";if(t.type===mx.DiscountType.STATIC){if(!t.code)throw _t.getInstance().captureMessage("No discount code found","warning",{triggerContext:this.triggerContext}),new Error("No discount code found");return t.code}if(e){if(n=await this.generateDiscount(e),!n)throw C.error("No discount code found",e),new Error("Discount code not found or generated");return n}}async generateDiscount(e){try{return(await this.safeHTTP.generateDiscount(e))?.code}catch(t){throw ce.showSnackbar("Failed to generate a discount code"),C.error("Error generating discount code",t,e),_t.getInstance().captureMessage("Failed to generate discount code","error",{discountData:JSON.stringify(e),triggerContext:this.triggerContext,error:t}),t}}},Po=class{static getBestSources(e){if(!e)return[];let t=[],n=e.filter(i=>i.format==="mp4").sort((i,s)=>s.width-i.width)[0];n&&t.push(n);let r=e.filter(i=>i.format==="m3u8").sort((i,s)=>s.width-i.width)[0];return r&&t.push(r),t}},lE;function FV(){if(lE==null){let e=typeof document<"u"?document.head:null;lE=!!(e&&(e.createShadowRoot||e.attachShadow))}return lE}function _c(e){if(FV()){let t=e.getRootNode?e.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&t instanceof ShadowRoot)return t}return null}function hh(){let e=typeof document<"u"&&document?document.activeElement:null;for(;e&&e.shadowRoot;){let t=e.shadowRoot.activeElement;if(t===e)break;e=t}return e}function Zn(e){return e.composedPath?e.composedPath()[0]:e.target}function mh(e){return e.buttons===0||e.detail===0}function gh(e){let t=e.touches&&e.touches[0]||e.changedTouches&&e.changedTouches[0];return!!t&&t.identifier===-1&&(t.radiusX==null||t.radiusX===1)&&(t.radiusY==null||t.radiusY===1)}function uE(e,t=0){return BV(e)?Number(e):arguments.length===2?t:0}function BV(e){return!isNaN(parseFloat(e))&&!isNaN(Number(e))}function Xn(e){return e instanceof Ct?e.nativeElement:e}function Tn(e,t,n,r,i){let s=parseInt(Cy.major),o=parseInt(Cy.minor);return s>19||s===19&&o>0||s===0&&o===0?e.listen(t,n,r,i):(t.addEventListener(n,r,i),()=>{t.removeEventListener(n,r,i)})}var yh=new WeakMap,Bs=(()=>{class e{_appRef;_injector=O(ht);_environmentInjector=O(Gn);load(n){let r=this._appRef=this._appRef||this._injector.get(yr),i=yh.get(r);i||(i={loaders:new Set,refs:[]},yh.set(r,i),r.onDestroy(()=>{yh.get(r)?.refs.forEach(s=>s.destroy()),yh.delete(r)})),i.loaders.has(n)||(i.loaders.add(n),i.refs.push(Ud(n,{environmentInjector:this._environmentInjector})))}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),dE;try{dE=typeof Intl<"u"&&Intl.v8BreakIterator}catch{dE=!1}var Jn=(()=>{class e{_platformId=O(is);isBrowser=this._platformId?yD(this._platformId):typeof document=="object"&&!!document;EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent);TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent);BLINK=this.isBrowser&&!!(window.chrome||dE)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT;WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT;IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window);FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent);ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT;SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT;constructor(){}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),VV=new pe("cdk-dir-doc",{providedIn:"root",factory:UV});function UV(){return O(Qe)}var HV=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;function jV(e){let t=e?.toLowerCase()||"";return t==="auto"&&typeof navigator<"u"&&navigator?.language?HV.test(navigator.language)?"rtl":"ltr":t==="rtl"?"rtl":"ltr"}var Vs=(()=>{class e{value="ltr";change=new Je;constructor(){let n=O(VV,{optional:!0});if(n){let r=n.body?n.body.dir:null,i=n.documentElement?n.documentElement.dir:null;this.value=jV(r||i||"ltr")}}ngOnDestroy(){this.change.complete()}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Us;function yx(){if(Us==null){if(typeof document!="object"||!document||typeof Element!="function"||!Element)return Us=!1,Us;if("scrollBehavior"in document.documentElement.style)Us=!0;else{let e=Element.prototype.scrollTo;e?Us=!/\{\s*\[native code\]\s*\}/.test(e.toString()):Us=!1}}return Us}var $V=20,fE=(()=>{class e{_ngZone=O(Le);_platform=O(Jn);_renderer=O(hn).createRenderer(null,null);_cleanupGlobalListener;constructor(){}_scrolled=new J;_scrolledCount=0;scrollContainers=new Map;register(n){this.scrollContainers.has(n)||this.scrollContainers.set(n,n.elementScrolled().subscribe(()=>this._scrolled.next(n)))}deregister(n){let r=this.scrollContainers.get(n);r&&(r.unsubscribe(),this.scrollContainers.delete(n))}scrolled(n=$V){return this._platform.isBrowser?new nt(r=>{this._cleanupGlobalListener||(this._cleanupGlobalListener=this._ngZone.runOutsideAngular(()=>this._renderer.listen("document","scroll",()=>this._scrolled.next())));let i=n>0?this._scrolled.pipe(Lu(n)).subscribe(r):this._scrolled.subscribe(r);return this._scrolledCount++,()=>{i.unsubscribe(),this._scrolledCount--,this._scrolledCount||(this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0)}}):jo()}ngOnDestroy(){this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0,this.scrollContainers.forEach((n,r)=>this.deregister(r)),this._scrolled.complete()}ancestorScrolled(n,r){let i=this.getAncestorScrollContainers(n);return this.scrolled(r).pipe($o(s=>!s||i.indexOf(s)>-1))}getAncestorScrollContainers(n){let r=[];return this.scrollContainers.forEach((i,s)=>{this._scrollableContainsElement(s,n)&&r.push(s)}),r}_scrollableContainsElement(n,r){let i=Xn(r),s=n.getElementRef().nativeElement;do if(i==s)return!0;while(i=i.parentElement);return!1}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),WV=20,Ql=(()=>{class e{_platform=O(Jn);_listeners;_viewportSize;_change=new J;_document=O(Qe,{optional:!0});constructor(){let n=O(Le),r=O(hn).createRenderer(null,null);n.runOutsideAngular(()=>{if(this._platform.isBrowser){let i=s=>this._change.next(s);this._listeners=[r.listen("window","resize",i),r.listen("window","orientationchange",i)]}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){this._listeners?.forEach(n=>n()),this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();let n={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),n}getViewportRect(){let n=this.getViewportScrollPosition(),{width:r,height:i}=this.getViewportSize();return{top:n.top,left:n.left,bottom:n.top+i,right:n.left+r,height:i,width:r}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};let n=this._document,r=this._getWindow(),i=n.documentElement,s=i.getBoundingClientRect(),o=-s.top||n.body.scrollTop||r.scrollY||i.scrollTop||0,a=-s.left||n.body.scrollLeft||r.scrollX||i.scrollLeft||0;return{top:o,left:a}}change(n=WV){return n>0?this._change.pipe(Lu(n)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){let n=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:n.innerWidth,height:n.innerHeight}:{width:0,height:0}}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),pE={},vh=(()=>{class e{_appId=O(nl);getId(n){return this._appId!=="ng"&&(n+=this._appId),pE.hasOwnProperty(n)||(pE[n]=0),`${n}${pE[n]++}`}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function hE(e){return Array.isArray(e)?e:[e]}function Mx(e){let t=e.cloneNode(!0),n=t.querySelectorAll("[id]"),r=e.nodeName.toLowerCase();t.removeAttribute("id");for(let i=0;i<n.length;i++)n[i].removeAttribute("id");return r==="canvas"?Ex(e,t):(r==="input"||r==="select"||r==="textarea")&&_x(e,t),vx("canvas",e,t,Ex),vx("input, textarea, select",e,t,_x),t}function vx(e,t,n,r){let i=t.querySelectorAll(e);if(i.length){let s=n.querySelectorAll(e);for(let o=0;o<i.length;o++)r(i[o],s[o])}}var GV=0;function _x(e,t){t.type!=="file"&&(t.value=e.value),t.type==="radio"&&t.name&&(t.name=`mat-clone-${t.name}-${GV++}`)}function Ex(e,t){let n=t.getContext("2d");if(n)try{n.drawImage(e,0,0)}catch{}}function bE(e){let t=e.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 yE(e,t,n){let{top:r,bottom:i,left:s,right:o}=e;return n>=r&&n<=i&&t>=s&&t<=o}function nu(e,t,n){e.top+=t,e.bottom=e.top+e.height,e.left+=n,e.right=e.left+e.width}function wx(e,t,n,r){let{top:i,right:s,bottom:o,left:a,width:l,height:c}=e,h=l*t,d=c*t;return r>i-d&&r<o+d&&n>a-h&&n<s+h}var _h=class{_document;positions=new Map;constructor(e){this._document=e}clear(){this.positions.clear()}cache(e){this.clear(),this.positions.set(this._document,{scrollPosition:this.getViewportScrollPosition()}),e.forEach(t=>{this.positions.set(t,{scrollPosition:{top:t.scrollTop,left:t.scrollLeft},clientRect:bE(t)})})}handleScroll(e){let t=Zn(e),n=this.positions.get(t);if(!n)return null;let r=n.scrollPosition,i,s;if(t===this._document){let l=this.getViewportScrollPosition();i=l.top,s=l.left}else i=t.scrollTop,s=t.scrollLeft;let o=r.top-i,a=r.left-s;return this.positions.forEach((l,c)=>{l.clientRect&&t!==c&&t.contains(c)&&nu(l.clientRect,o,a)}),r.top=i,r.left=s,{top:o,left:a}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}};function Ox(e,t){let n=e.rootNodes;if(n.length===1&&n[0].nodeType===t.ELEMENT_NODE)return n[0];let r=t.createElement("div");return n.forEach(i=>r.appendChild(i)),r}function CE(e,t,n){for(let r in t)if(t.hasOwnProperty(r)){let i=t[r];i?e.setProperty(r,i,n?.has(r)?"important":""):e.removeProperty(r)}return e}function Ec(e,t){let n=t?"":"none";CE(e.style,{"touch-action":t?"":"none","-webkit-user-drag":t?"":"none","-webkit-tap-highlight-color":t?"":"transparent","user-select":n,"-ms-user-select":n,"-webkit-user-select":n,"-moz-user-select":n})}function bx(e,t,n){CE(e.style,{position:t?"":"fixed",top:t?"":"0",opacity:t?"":"0",left:t?"":"-999em"},n)}function Eh(e,t){return t&&t!="none"?e+" "+t:e}function Cx(e,t){e.style.width=`${t.width}px`,e.style.height=`${t.height}px`,e.style.transform=wh(t.left,t.top)}function wh(e,t){return`translate3d(${Math.round(e)}px, ${Math.round(t)}px, 0)`}function Sx(e){let t=e.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(e)*t}function zV(e){let t=getComputedStyle(e),n=mE(t,"transition-property"),r=n.find(a=>a==="transform"||a==="all");if(!r)return 0;let i=n.indexOf(r),s=mE(t,"transition-duration"),o=mE(t,"transition-delay");return Sx(s[i])+Sx(o[i])}function mE(e,t){return e.getPropertyValue(t).split(",").map(n=>n.trim())}var qV=new Set(["position"]),vE=class{_document;_rootElement;_direction;_initialDomRect;_previewTemplate;_previewClass;_pickupPositionOnPage;_initialTransform;_zIndex;_renderer;_previewEmbeddedView;_preview;get element(){return this._preview}constructor(e,t,n,r,i,s,o,a,l,c){this._document=e,this._rootElement=t,this._direction=n,this._initialDomRect=r,this._previewTemplate=i,this._previewClass=s,this._pickupPositionOnPage=o,this._initialTransform=a,this._zIndex=l,this._renderer=c}attach(e){this._preview=this._createPreview(),e.appendChild(this._preview),Dx(this._preview)&&this._preview.showPopover()}destroy(){this._preview.remove(),this._previewEmbeddedView?.destroy(),this._preview=this._previewEmbeddedView=null}setTransform(e){this._preview.style.transform=e}getBoundingClientRect(){return this._preview.getBoundingClientRect()}addClass(e){this._preview.classList.add(e)}getTransitionDuration(){return zV(this._preview)}addEventListener(e,t){return this._renderer.listen(this._preview,e,t)}_createPreview(){let e=this._previewTemplate,t=this._previewClass,n=e?e.template:null,r;if(n&&e){let i=e.matchSize?this._initialDomRect:null,s=e.viewContainer.createEmbeddedView(n,e.context);s.detectChanges(),r=Ox(s,this._document),this._previewEmbeddedView=s,e.matchSize?Cx(r,i):r.style.transform=wh(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else r=Mx(this._rootElement),Cx(r,this._initialDomRect),this._initialTransform&&(r.style.transform=this._initialTransform);return CE(r.style,{"pointer-events":"none",margin:Dx(r)?"0 auto 0 0":"0",position:"fixed",top:"0",left:"0","z-index":this._zIndex+""},qV),Ec(r,!1),r.classList.add("cdk-drag-preview"),r.setAttribute("popover","manual"),r.setAttribute("dir",this._direction),t&&(Array.isArray(t)?t.forEach(i=>r.classList.add(i)):r.classList.add(t)),r}};function Dx(e){return"showPopover"in e}var YV={passive:!0},Ix={passive:!1},KV={passive:!1,capture:!0},ZV=800,Tx=new Set(["position"]),_E=class{_config;_document;_ngZone;_viewportRuler;_dragDropRegistry;_renderer;_rootElementCleanups;_cleanupShadowRootSelectStart;_preview;_previewContainer;_placeholderRef;_placeholder;_pickupPositionInElement;_pickupPositionOnPage;_anchor;_passiveTransform={x:0,y:0};_activeTransform={x:0,y:0};_initialTransform;_hasStartedDragging=Vi(!1);_hasMoved;_initialContainer;_initialIndex;_parentPositions;_moveEvents=new J;_pointerDirectionDelta;_pointerPositionAtLastDirectionChange;_lastKnownPointerPosition;_rootElement;_ownerSVGElement;_rootElementTapHighlight;_pointerMoveSubscription=ot.EMPTY;_pointerUpSubscription=ot.EMPTY;_scrollSubscription=ot.EMPTY;_resizeSubscription=ot.EMPTY;_lastTouchEventTime;_dragStartTime;_boundaryElement=null;_nativeInteractionsEnabled=!0;_initialDomRect;_previewRect;_boundaryRect;_previewTemplate;_placeholderTemplate;_handles=[];_disabledHandles=new Set;_dropContainer;_direction="ltr";_parentDragRef;_cachedShadowRoot;lockAxis;dragStartDelay=0;previewClass;scale=1;get disabled(){return this._disabled||!!(this._dropContainer&&this._dropContainer.disabled)}set disabled(e){e!==this._disabled&&(this._disabled=e,this._toggleNativeDragInteractions(),this._handles.forEach(t=>Ec(t,e)))}_disabled=!1;beforeStarted=new J;started=new J;released=new J;ended=new J;entered=new J;exited=new J;dropped=new J;moved=this._moveEvents;data;constrainPosition;constructor(e,t,n,r,i,s,o){this._config=t,this._document=n,this._ngZone=r,this._viewportRuler=i,this._dragDropRegistry=s,this._renderer=o,this.withRootElement(e).withParent(t.parentDragRef||null),this._parentPositions=new _h(n),s.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(e){this._handles=e.map(n=>Xn(n)),this._handles.forEach(n=>Ec(n,this.disabled)),this._toggleNativeDragInteractions();let t=new Set;return this._disabledHandles.forEach(n=>{this._handles.indexOf(n)>-1&&t.add(n)}),this._disabledHandles=t,this}withPreviewTemplate(e){return this._previewTemplate=e,this}withPlaceholderTemplate(e){return this._placeholderTemplate=e,this}withRootElement(e){let t=Xn(e);return t!==this._rootElement&&(this._removeRootElementListeners(),this._rootElementCleanups=this._ngZone.runOutsideAngular(()=>[Tn(this._renderer,t,"mousedown",this._pointerDown,Ix),Tn(this._renderer,t,"touchstart",this._pointerDown,YV),Tn(this._renderer,t,"dragstart",this._nativeDragStart,Ix)]),this._initialTransform=void 0,this._rootElement=t),typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(e){return this._boundaryElement=e?Xn(e):null,this._resizeSubscription.unsubscribe(),e&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(e){return this._parentDragRef=e,this}dispose(){this._removeRootElementListeners(),this.isDragging()&&this._rootElement?.remove(),this._anchor?.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeListeners(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._anchor=this._parentDragRef=null}isDragging(){return this._hasStartedDragging()&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}disableHandle(e){!this._disabledHandles.has(e)&&this._handles.indexOf(e)>-1&&(this._disabledHandles.add(e),Ec(e,!0))}enableHandle(e){this._disabledHandles.has(e)&&(this._disabledHandles.delete(e),Ec(e,this.disabled))}withDirection(e){return this._direction=e,this}_withDropContainer(e){this._dropContainer=e}getFreeDragPosition(){let e=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:e.x,y:e.y}}setFreeDragPosition(e){return this._activeTransform={x:0,y:0},this._passiveTransform.x=e.x,this._passiveTransform.y=e.y,this._dropContainer||this._applyRootElementTransform(e.x,e.y),this}withPreviewContainer(e){return this._previewContainer=e,this}_sortFromLastPointerPosition(){let e=this._lastKnownPointerPosition;e&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(e),e)}_removeListeners(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe(),this._cleanupShadowRootSelectStart?.(),this._cleanupShadowRootSelectStart=void 0}_destroyPreview(){this._preview?.destroy(),this._preview=null}_destroyPlaceholder(){this._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._placeholderRef=null}_pointerDown=e=>{if(this.beforeStarted.next(),this._handles.length){let t=this._getTargetHandle(e);t&&!this._disabledHandles.has(t)&&!this.disabled&&this._initializeDragSequence(t,e)}else this.disabled||this._initializeDragSequence(this._rootElement,e)};_pointerMove=e=>{let t=this._getPointerPositionOnPage(e);if(!this._hasStartedDragging()){let r=Math.abs(t.x-this._pickupPositionOnPage.x),i=Math.abs(t.y-this._pickupPositionOnPage.y);if(r+i>=this._config.dragStartThreshold){let s=Date.now()>=this._dragStartTime+this._getDragStartDelay(e),o=this._dropContainer;if(!s){this._endDragSequence(e);return}(!o||!o.isDragging()&&!o.isReceiving())&&(e.cancelable&&e.preventDefault(),this._hasStartedDragging.set(!0),this._ngZone.run(()=>this._startDragSequence(e)))}return}e.cancelable&&e.preventDefault();let n=this._getConstrainedPointerPosition(t);if(this._hasMoved=!0,this._lastKnownPointerPosition=t,this._updatePointerDirectionDelta(n),this._dropContainer)this._updateActiveDropContainer(n,t);else{let r=this.constrainPosition?this._initialDomRect:this._pickupPositionOnPage,i=this._activeTransform;i.x=n.x-r.x+this._passiveTransform.x,i.y=n.y-r.y+this._passiveTransform.y,this._applyRootElementTransform(i.x,i.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:n,event:e,distance:this._getDragDistance(n),delta:this._pointerDirectionDelta})})};_pointerUp=e=>{this._endDragSequence(e)};_endDragSequence(e){if(this._dragDropRegistry.isDragging(this)&&(this._removeListeners(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),!!this._hasStartedDragging()))if(this.released.next({source:this,event:e}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(e),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;let t=this._getPointerPositionOnPage(e);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(t),dropPoint:t,event:e})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(e){eu(e)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();let t=this._getShadowRoot(),n=this._dropContainer;if(t&&this._ngZone.runOutsideAngular(()=>{this._cleanupShadowRootSelectStart=Tn(this._renderer,t,"selectstart",XV,KV)}),n){let r=this._rootElement,i=r.parentNode,s=this._placeholder=this._createPlaceholderElement(),o=this._anchor=this._anchor||this._document.createComment("");i.insertBefore(o,r),this._initialTransform=r.style.transform||"",this._preview=new vE(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(i,t)),bx(r,!1,Tx),this._document.body.appendChild(i.replaceChild(s,r)),this.started.next({source:this,event:e}),n.start(),this._initialContainer=n,this._initialIndex=n.getItemIndex(this)}else this.started.next({source:this,event:e}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(n?n.getScrollableParents():[])}_initializeDragSequence(e,t){this._parentDragRef&&t.stopPropagation();let n=this.isDragging(),r=eu(t),i=!r&&t.button!==0,s=this._rootElement,o=Zn(t),a=!r&&this._lastTouchEventTime&&this._lastTouchEventTime+ZV>Date.now(),l=r?gh(t):mh(t);if(o&&o.draggable&&t.type==="mousedown"&&t.preventDefault(),n||i||a||l)return;if(this._handles.length){let d=s.style;this._rootElementTapHighlight=d.webkitTapHighlightColor||"",d.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(d=>this._updateOnScroll(d)),this._boundaryElement&&(this._boundaryRect=bE(this._boundaryElement));let c=this._previewTemplate;this._pickupPositionInElement=c&&c.template&&!c.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialDomRect,e,t);let h=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(t);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:h.x,y:h.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,t)}_cleanupDragArtifacts(e){bx(this._rootElement,!0,Tx),this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._initialDomRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{let t=this._dropContainer,n=t.getItemIndex(this),r=this._getPointerPositionOnPage(e),i=this._getDragDistance(r),s=t._isOverContainer(r.x,r.y);this.ended.next({source:this,distance:i,dropPoint:r,event:e}),this.dropped.next({item:this,currentIndex:n,previousIndex:this._initialIndex,container:t,previousContainer:this._initialContainer,isPointerOverContainer:s,distance:i,dropPoint:r,event:e}),t.drop(this,n,this._initialIndex,this._initialContainer,s,i,r,e),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:e,y:t},{x:n,y:r}){let i=this._initialContainer._getSiblingContainerFromPosition(this,e,t);!i&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(e,t)&&(i=this._initialContainer),i&&i!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=i,this._dropContainer.enter(this,e,t,i===this._initialContainer&&i.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:i,currentIndex:i.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(n,r),this._dropContainer._sortItem(this,e,t,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(e,t):this._applyPreviewTransform(e-this._pickupPositionInElement.x,t-this._pickupPositionInElement.y))}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();let e=this._placeholder.getBoundingClientRect();this._preview.addClass("cdk-drag-animating"),this._applyPreviewTransform(e.left,e.top);let t=this._preview.getTransitionDuration();return t===0?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(n=>{let r=o=>{(!o||this._preview&&Zn(o)===this._preview.element&&o.propertyName==="transform")&&(s(),n(),clearTimeout(i))},i=setTimeout(r,t*1.5),s=this._preview.addEventListener("transitionend",r)}))}_createPlaceholderElement(){let e=this._placeholderTemplate,t=e?e.template:null,n;return t?(this._placeholderRef=e.viewContainer.createEmbeddedView(t,e.context),this._placeholderRef.detectChanges(),n=Ox(this._placeholderRef,this._document)):n=Mx(this._rootElement),n.style.pointerEvents="none",n.classList.add("cdk-drag-placeholder"),n}_getPointerPositionInElement(e,t,n){let r=t===this._rootElement?null:t,i=r?r.getBoundingClientRect():e,s=eu(n)?n.targetTouches[0]:n,o=this._getViewportScrollPosition(),a=s.pageX-i.left-o.left,l=s.pageY-i.top-o.top;return{x:i.left-e.left+a,y:i.top-e.top+l}}_getPointerPositionOnPage(e){let t=this._getViewportScrollPosition(),n=eu(e)?e.touches[0]||e.changedTouches[0]||{pageX:0,pageY:0}:e,r=n.pageX-t.left,i=n.pageY-t.top;if(this._ownerSVGElement){let s=this._ownerSVGElement.getScreenCTM();if(s){let o=this._ownerSVGElement.createSVGPoint();return o.x=r,o.y=i,o.matrixTransform(s.inverse())}}return{x:r,y:i}}_getConstrainedPointerPosition(e){let t=this._dropContainer?this._dropContainer.lockAxis:null,{x:n,y:r}=this.constrainPosition?this.constrainPosition(e,this,this._initialDomRect,this._pickupPositionInElement):e;if(this.lockAxis==="x"||t==="x"?r=this._pickupPositionOnPage.y-(this.constrainPosition?this._pickupPositionInElement.y:0):(this.lockAxis==="y"||t==="y")&&(n=this._pickupPositionOnPage.x-(this.constrainPosition?this._pickupPositionInElement.x:0)),this._boundaryRect){let{x:i,y:s}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,o=this._boundaryRect,{width:a,height:l}=this._getPreviewRect(),c=o.top+s,h=o.bottom-(l-s),d=o.left+i,f=o.right-(a-i);n=xx(n,d,f),r=xx(r,c,h)}return{x:n,y:r}}_updatePointerDirectionDelta(e){let{x:t,y:n}=e,r=this._pointerDirectionDelta,i=this._pointerPositionAtLastDirectionChange,s=Math.abs(t-i.x),o=Math.abs(n-i.y);return s>this._config.pointerDirectionChangeThreshold&&(r.x=t>i.x?1:-1,i.x=t),o>this._config.pointerDirectionChangeThreshold&&(r.y=n>i.y?1:-1,i.y=n),r}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;let e=this._handles.length>0||!this.isDragging();e!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=e,Ec(this._rootElement,e))}_removeRootElementListeners(){this._rootElementCleanups?.forEach(e=>e()),this._rootElementCleanups=void 0}_applyRootElementTransform(e,t){let n=1/this.scale,r=wh(e*n,t*n),i=this._rootElement.style;this._initialTransform==null&&(this._initialTransform=i.transform&&i.transform!="none"?i.transform:""),i.transform=Eh(r,this._initialTransform)}_applyPreviewTransform(e,t){let n=this._previewTemplate?.template?void 0:this._initialTransform,r=wh(e,t);this._preview.setTransform(Eh(r,n))}_getDragDistance(e){let t=this._pickupPositionOnPage;return t?{x:e.x-t.x,y:e.y-t.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:e,y:t}=this._passiveTransform;if(e===0&&t===0||this.isDragging()||!this._boundaryElement)return;let n=this._rootElement.getBoundingClientRect(),r=this._boundaryElement.getBoundingClientRect();if(r.width===0&&r.height===0||n.width===0&&n.height===0)return;let i=r.left-n.left,s=n.right-r.right,o=r.top-n.top,a=n.bottom-r.bottom;r.width>n.width?(i>0&&(e+=i),s>0&&(e-=s)):e=0,r.height>n.height?(o>0&&(t+=o),a>0&&(t-=a)):t=0,(e!==this._passiveTransform.x||t!==this._passiveTransform.y)&&this.setFreeDragPosition({y:t,x:e})}_getDragStartDelay(e){let t=this.dragStartDelay;return typeof t=="number"?t:eu(e)?t.touch:t?t.mouse:0}_updateOnScroll(e){let t=this._parentPositions.handleScroll(e);if(t){let n=Zn(e);this._boundaryRect&&n!==this._boundaryElement&&n.contains(this._boundaryElement)&&nu(this._boundaryRect,t.top,t.left),this._pickupPositionOnPage.x+=t.left,this._pickupPositionOnPage.y+=t.top,this._dropContainer||(this._activeTransform.x-=t.left,this._activeTransform.y-=t.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=_c(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(e,t){let n=this._previewContainer||"global";if(n==="parent")return e;if(n==="global"){let r=this._document;return t||r.fullscreenElement||r.webkitFullscreenElement||r.mozFullScreenElement||r.msFullscreenElement||r.body}return Xn(n)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialDomRect),this._previewRect}_nativeDragStart=e=>{if(this._handles.length){let t=this._getTargetHandle(e);t&&!this._disabledHandles.has(t)&&!this.disabled&&e.preventDefault()}else this.disabled||e.preventDefault()};_getTargetHandle(e){return this._handles.find(t=>e.target&&(e.target===t||t.contains(e.target)))}};function xx(e,t,n){return Math.max(t,Math.min(n,e))}function eu(e){return e.type[0]==="t"}function XV(e){e.preventDefault()}function Px(e,t,n){let r=Rx(t,e.length-1),i=Rx(n,e.length-1);if(r===i)return;let s=e[r],o=i<r?-1:1;for(let a=r;a!==i;a+=o)e[a]=e[a+o];e[i]=s}function Rx(e,t){return Math.max(0,Math.min(t,e))}var bh=class{_dragDropRegistry;_element;_sortPredicate;_itemPositions=[];_activeDraggables;orientation="vertical";direction;constructor(e){this._dragDropRegistry=e}_previousSwap={drag:null,delta:0,overlaps:!1};start(e){this.withItems(e)}sort(e,t,n,r){let i=this._itemPositions,s=this._getItemIndexFromPointerPosition(e,t,n,r);if(s===-1&&i.length>0)return null;let o=this.orientation==="horizontal",a=i.findIndex(b=>b.drag===e),l=i[s],c=i[a].clientRect,h=l.clientRect,d=a>s?1:-1,f=this._getItemOffsetPx(c,h,d),g=this._getSiblingOffsetPx(a,i,d),m=i.slice();return Px(i,a,s),i.forEach((b,x)=>{if(m[x]===b)return;let A=b.drag===e,F=A?f:g,V=A?e.getPlaceholderElement():b.drag.getRootElement();b.offset+=F;let M=Math.round(b.offset*(1/b.drag.scale));o?(V.style.transform=Eh(`translate3d(${M}px, 0, 0)`,b.initialTransform),nu(b.clientRect,0,F)):(V.style.transform=Eh(`translate3d(0, ${M}px, 0)`,b.initialTransform),nu(b.clientRect,F,0))}),this._previousSwap.overlaps=yE(h,t,n),this._previousSwap.drag=l.drag,this._previousSwap.delta=o?r.x:r.y,{previousIndex:a,currentIndex:s}}enter(e,t,n,r){let i=r==null||r<0?this._getItemIndexFromPointerPosition(e,t,n):r,s=this._activeDraggables,o=s.indexOf(e),a=e.getPlaceholderElement(),l=s[i];if(l===e&&(l=s[i+1]),!l&&(i==null||i===-1||i<s.length-1)&&this._shouldEnterAsFirstChild(t,n)&&(l=s[0]),o>-1&&s.splice(o,1),l&&!this._dragDropRegistry.isDragging(l)){let c=l.getRootElement();c.parentElement.insertBefore(a,c),s.splice(i,0,e)}else this._element.appendChild(a),s.push(e);a.style.transform="",this._cacheItemPositions()}withItems(e){this._activeDraggables=e.slice(),this._cacheItemPositions()}withSortPredicate(e){this._sortPredicate=e}reset(){this._activeDraggables?.forEach(e=>{let t=e.getRootElement();if(t){let n=this._itemPositions.find(r=>r.drag===e)?.initialTransform;t.style.transform=n||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(e){return(this.orientation==="horizontal"&&this.direction==="rtl"?this._itemPositions.slice().reverse():this._itemPositions).findIndex(t=>t.drag===e)}updateOnScroll(e,t){this._itemPositions.forEach(({clientRect:n})=>{nu(n,e,t)}),this._itemPositions.forEach(({drag:n})=>{this._dragDropRegistry.isDragging(n)&&n._sortFromLastPointerPosition()})}withElementContainer(e){this._element=e}_cacheItemPositions(){let e=this.orientation==="horizontal";this._itemPositions=this._activeDraggables.map(t=>{let n=t.getVisibleElement();return{drag:t,offset:0,initialTransform:n.style.transform||"",clientRect:bE(n)}}).sort((t,n)=>e?t.clientRect.left-n.clientRect.left:t.clientRect.top-n.clientRect.top)}_getItemOffsetPx(e,t,n){let r=this.orientation==="horizontal",i=r?t.left-e.left:t.top-e.top;return n===-1&&(i+=r?t.width-e.width:t.height-e.height),i}_getSiblingOffsetPx(e,t,n){let r=this.orientation==="horizontal",i=t[e].clientRect,s=t[e+n*-1],o=i[r?"width":"height"]*n;if(s){let a=r?"left":"top",l=r?"right":"bottom";n===-1?o-=s.clientRect[a]-i[l]:o+=i[a]-s.clientRect[l]}return o}_shouldEnterAsFirstChild(e,t){if(!this._activeDraggables.length)return!1;let n=this._itemPositions,r=this.orientation==="horizontal";if(n[0].drag!==this._activeDraggables[0]){let i=n[n.length-1].clientRect;return r?e>=i.right:t>=i.bottom}else{let i=n[0].clientRect;return r?e<=i.left:t<=i.top}}_getItemIndexFromPointerPosition(e,t,n,r){let i=this.orientation==="horizontal",s=this._itemPositions.findIndex(({drag:o,clientRect:a})=>{if(o===e)return!1;if(r){let l=i?r.x:r.y;if(o===this._previousSwap.drag&&this._previousSwap.overlaps&&l===this._previousSwap.delta)return!1}return i?t>=Math.floor(a.left)&&t<Math.floor(a.right):n>=Math.floor(a.top)&&n<Math.floor(a.bottom)});return s===-1||!this._sortPredicate(s,e)?-1:s}},EE=class{_document;_dragDropRegistry;_element;_sortPredicate;_rootNode;_activeItems;_previousSwap={drag:null,deltaX:0,deltaY:0,overlaps:!1};_relatedNodes=[];constructor(e,t){this._document=e,this._dragDropRegistry=t}start(e){let t=this._element.childNodes;this._relatedNodes=[];for(let n=0;n<t.length;n++){let r=t[n];this._relatedNodes.push([r,r.nextSibling])}this.withItems(e)}sort(e,t,n,r){let i=this._getItemIndexFromPointerPosition(e,t,n),s=this._previousSwap;if(i===-1||this._activeItems[i]===e)return null;let o=this._activeItems[i];if(s.drag===o&&s.overlaps&&s.deltaX===r.x&&s.deltaY===r.y)return null;let a=this.getItemIndex(e),l=e.getPlaceholderElement(),c=o.getRootElement();i>a?c.after(l):c.before(l),Px(this._activeItems,a,i);let h=this._getRootNode().elementFromPoint(t,n);return s.deltaX=r.x,s.deltaY=r.y,s.drag=o,s.overlaps=c===h||c.contains(h),{previousIndex:a,currentIndex:i}}enter(e,t,n,r){let i=r==null||r<0?this._getItemIndexFromPointerPosition(e,t,n):r;i===-1&&(i=this._getClosestItemIndexToPointer(e,t,n));let s=this._activeItems[i],o=this._activeItems.indexOf(e);o>-1&&this._activeItems.splice(o,1),s&&!this._dragDropRegistry.isDragging(s)?(this._activeItems.splice(i,0,e),s.getRootElement().before(e.getPlaceholderElement())):(this._activeItems.push(e),this._element.appendChild(e.getPlaceholderElement()))}withItems(e){this._activeItems=e.slice()}withSortPredicate(e){this._sortPredicate=e}reset(){let e=this._element,t=this._previousSwap;for(let n=this._relatedNodes.length-1;n>-1;n--){let[r,i]=this._relatedNodes[n];r.parentNode===e&&r.nextSibling!==i&&(i===null?e.appendChild(r):i.parentNode===e&&e.insertBefore(r,i))}this._relatedNodes=[],this._activeItems=[],t.drag=null,t.deltaX=t.deltaY=0,t.overlaps=!1}getActiveItemsSnapshot(){return this._activeItems}getItemIndex(e){return this._activeItems.indexOf(e)}updateOnScroll(){this._activeItems.forEach(e=>{this._dragDropRegistry.isDragging(e)&&e._sortFromLastPointerPosition()})}withElementContainer(e){e!==this._element&&(this._element=e,this._rootNode=void 0)}_getItemIndexFromPointerPosition(e,t,n){let r=this._getRootNode().elementFromPoint(Math.floor(t),Math.floor(n)),i=r?this._activeItems.findIndex(s=>{let o=s.getRootElement();return r===o||o.contains(r)}):-1;return i===-1||!this._sortPredicate(i,e)?-1:i}_getRootNode(){return this._rootNode||(this._rootNode=_c(this._element)||this._document),this._rootNode}_getClosestItemIndexToPointer(e,t,n){if(this._activeItems.length===0)return-1;if(this._activeItems.length===1)return 0;let r=1/0,i=-1;for(let s=0;s<this._activeItems.length;s++){let o=this._activeItems[s];if(o!==e){let{x:a,y:l}=o.getRootElement().getBoundingClientRect(),c=Math.hypot(t-a,n-l);c<r&&(r=c,i=s)}}return i}},Nx=.05,kx=.05,xr=function(e){return e[e.NONE=0]="NONE",e[e.UP=1]="UP",e[e.DOWN=2]="DOWN",e}(xr||{}),jn=function(e){return e[e.NONE=0]="NONE",e[e.LEFT=1]="LEFT",e[e.RIGHT=2]="RIGHT",e}(jn||{}),wE=class{_dragDropRegistry;_ngZone;_viewportRuler;element;disabled=!1;sortingDisabled=!1;lockAxis;autoScrollDisabled=!1;autoScrollStep=2;enterPredicate=()=>!0;sortPredicate=()=>!0;beforeStarted=new J;entered=new J;exited=new J;dropped=new J;sorted=new J;receivingStarted=new J;receivingStopped=new J;data;_container;_isDragging=!1;_parentPositions;_sortStrategy;_domRect;_draggables=[];_siblings=[];_activeSiblings=new Set;_viewportScrollSubscription=ot.EMPTY;_verticalScrollDirection=xr.NONE;_horizontalScrollDirection=jn.NONE;_scrollNode;_stopScrollTimers=new J;_cachedShadowRoot=null;_document;_scrollableElements=[];_initialScrollSnap;_direction="ltr";constructor(e,t,n,r,i){this._dragDropRegistry=t,this._ngZone=r,this._viewportRuler=i;let s=this.element=Xn(e);this._document=n,this.withOrientation("vertical").withElementContainer(s),t.registerDropContainer(this),this._parentPositions=new _h(n)}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this.receivingStarted.complete(),this.receivingStopped.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(e,t,n,r){this._draggingStarted(),r==null&&this.sortingDisabled&&(r=this._draggables.indexOf(e)),this._sortStrategy.enter(e,t,n,r),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:e,container:this,currentIndex:this.getItemIndex(e)})}exit(e){this._reset(),this.exited.next({item:e,container:this})}drop(e,t,n,r,i,s,o,a={}){this._reset(),this.dropped.next({item:e,currentIndex:t,previousIndex:n,container:this,previousContainer:r,isPointerOverContainer:i,distance:s,dropPoint:o,event:a})}withItems(e){let t=this._draggables;return this._draggables=e,e.forEach(n=>n._withDropContainer(this)),this.isDragging()&&(t.filter(n=>n.isDragging()).every(n=>e.indexOf(n)===-1)?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(e){return this._direction=e,this._sortStrategy instanceof bh&&(this._sortStrategy.direction=e),this}connectedTo(e){return this._siblings=e.slice(),this}withOrientation(e){if(e==="mixed")this._sortStrategy=new EE(this._document,this._dragDropRegistry);else{let t=new bh(this._dragDropRegistry);t.direction=this._direction,t.orientation=e,this._sortStrategy=t}return this._sortStrategy.withElementContainer(this._container),this._sortStrategy.withSortPredicate((t,n)=>this.sortPredicate(t,n,this)),this}withScrollableParents(e){let t=this._container;return this._scrollableElements=e.indexOf(t)===-1?[t,...e]:e.slice(),this}withElementContainer(e){if(e===this._container)return this;let t=Xn(this.element),n=this._scrollableElements.indexOf(this._container),r=this._scrollableElements.indexOf(e);return n>-1&&this._scrollableElements.splice(n,1),r>-1&&this._scrollableElements.splice(r,1),this._sortStrategy&&this._sortStrategy.withElementContainer(e),this._cachedShadowRoot=null,this._scrollableElements.unshift(e),this._container=e,this}getScrollableParents(){return this._scrollableElements}getItemIndex(e){return this._isDragging?this._sortStrategy.getItemIndex(e):this._draggables.indexOf(e)}isReceiving(){return this._activeSiblings.size>0}_sortItem(e,t,n,r){if(this.sortingDisabled||!this._domRect||!wx(this._domRect,Nx,t,n))return;let i=this._sortStrategy.sort(e,t,n,r);i&&this.sorted.next({previousIndex:i.previousIndex,currentIndex:i.currentIndex,container:this,item:e})}_startScrollingIfNecessary(e,t){if(this.autoScrollDisabled)return;let n,r=xr.NONE,i=jn.NONE;if(this._parentPositions.positions.forEach((s,o)=>{o===this._document||!s.clientRect||n||wx(s.clientRect,Nx,e,t)&&([r,i]=JV(o,s.clientRect,this._direction,e,t),(r||i)&&(n=o))}),!r&&!i){let{width:s,height:o}=this._viewportRuler.getViewportSize(),a={width:s,height:o,top:0,right:s,bottom:o,left:0};r=Lx(a,t),i=Fx(a,e),n=window}n&&(r!==this._verticalScrollDirection||i!==this._horizontalScrollDirection||n!==this._scrollNode)&&(this._verticalScrollDirection=r,this._horizontalScrollDirection=i,this._scrollNode=n,(r||i)&&n?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){let e=this._container.style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=e.msScrollSnapType||e.scrollSnapType||"",e.scrollSnapType=e.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){this._parentPositions.cache(this._scrollableElements),this._domRect=this._parentPositions.positions.get(this._container).clientRect}_reset(){this._isDragging=!1;let e=this._container.style;e.scrollSnapType=e.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(t=>t._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_startScrollInterval=()=>{this._stopScrolling(),om(0,wu).pipe(hr(this._stopScrollTimers)).subscribe(()=>{let e=this._scrollNode,t=this.autoScrollStep;this._verticalScrollDirection===xr.UP?e.scrollBy(0,-t):this._verticalScrollDirection===xr.DOWN&&e.scrollBy(0,t),this._horizontalScrollDirection===jn.LEFT?e.scrollBy(-t,0):this._horizontalScrollDirection===jn.RIGHT&&e.scrollBy(t,0)})};_isOverContainer(e,t){return this._domRect!=null&&yE(this._domRect,e,t)}_getSiblingContainerFromPosition(e,t,n){return this._siblings.find(r=>r._canReceive(e,t,n))}_canReceive(e,t,n){if(!this._domRect||!yE(this._domRect,t,n)||!this.enterPredicate(e,this))return!1;let r=this._getShadowRoot().elementFromPoint(t,n);return r?r===this._container||this._container.contains(r):!1}_startReceiving(e,t){let n=this._activeSiblings;!n.has(e)&&t.every(r=>this.enterPredicate(r,this)||this._draggables.indexOf(r)>-1)&&(n.add(e),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:e,receiver:this,items:t}))}_stopReceiving(e){this._activeSiblings.delete(e),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:e,receiver:this})}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(e=>{if(this.isDragging()){let t=this._parentPositions.handleScroll(e);t&&this._sortStrategy.updateOnScroll(t.top,t.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){let e=_c(this._container);this._cachedShadowRoot=e||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){let e=this._sortStrategy.getActiveItemsSnapshot().filter(t=>t.isDragging());this._siblings.forEach(t=>t._startReceiving(this,e))}};function Lx(e,t){let{top:n,bottom:r,height:i}=e,s=i*kx;return t>=n-s&&t<=n+s?xr.UP:t>=r-s&&t<=r+s?xr.DOWN:xr.NONE}function Fx(e,t){let{left:n,right:r,width:i}=e,s=i*kx;return t>=n-s&&t<=n+s?jn.LEFT:t>=r-s&&t<=r+s?jn.RIGHT:jn.NONE}function JV(e,t,n,r,i){let s=Lx(t,i),o=Fx(t,r),a=xr.NONE,l=jn.NONE;if(s){let c=e.scrollTop;s===xr.UP?c>0&&(a=xr.UP):e.scrollHeight-c>e.clientHeight&&(a=xr.DOWN)}if(o){let c=e.scrollLeft;n==="rtl"?o===jn.RIGHT?c<0&&(l=jn.RIGHT):e.scrollWidth+c>e.clientWidth&&(l=jn.LEFT):o===jn.LEFT?c>0&&(l=jn.LEFT):e.scrollWidth-c>e.clientWidth&&(l=jn.RIGHT)}return[a,l]}var tu={capture:!0},gE={passive:!1,capture:!0},QV=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275cmp=yt({type:e,selectors:[["ng-component"]],hostAttrs:["cdk-drag-resets-container",""],decls:0,vars:0,template:function(n,r){},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}
76
76
  `],encapsulation:2,changeDetection:0})}return e})(),Bx=(()=>{class e{_ngZone=O(Le);_document=O(Qe);_styleLoader=O(Bs);_renderer=O(hn).createRenderer(null,null);_cleanupDocumentTouchmove;_dropInstances=new Set;_dragInstances=new Set;_activeDragInstances=Vi([]);_globalListeners;_draggingPredicate=n=>n.isDragging();_domNodesToDirectives=null;pointerMove=new J;pointerUp=new J;scroll=new J;constructor(){}registerDropContainer(n){this._dropInstances.has(n)||this._dropInstances.add(n)}registerDragItem(n){this._dragInstances.add(n),this._dragInstances.size===1&&this._ngZone.runOutsideAngular(()=>{this._cleanupDocumentTouchmove?.(),this._cleanupDocumentTouchmove=Tn(this._renderer,this._document,"touchmove",this._persistentTouchmoveListener,gE)})}removeDropContainer(n){this._dropInstances.delete(n)}removeDragItem(n){this._dragInstances.delete(n),this.stopDragging(n),this._dragInstances.size===0&&this._cleanupDocumentTouchmove?.()}startDragging(n,r){if(!(this._activeDragInstances().indexOf(n)>-1)&&(this._styleLoader.load(QV),this._activeDragInstances.update(i=>[...i,n]),this._activeDragInstances().length===1)){let i=r.type.startsWith("touch"),s=a=>this.pointerUp.next(a),o=[["scroll",a=>this.scroll.next(a),tu],["selectstart",this._preventDefaultWhileDragging,gE]];i?o.push(["touchend",s,tu],["touchcancel",s,tu]):o.push(["mouseup",s,tu]),i||o.push(["mousemove",a=>this.pointerMove.next(a),gE]),this._ngZone.runOutsideAngular(()=>{this._globalListeners=o.map(([a,l,c])=>Tn(this._renderer,this._document,a,l,c))})}}stopDragging(n){this._activeDragInstances.update(r=>{let i=r.indexOf(n);return i>-1?(r.splice(i,1),[...r]):r}),this._activeDragInstances().length===0&&this._clearGlobalListeners()}isDragging(n){return this._activeDragInstances().indexOf(n)>-1}scrolled(n){let r=[this.scroll];return n&&n!==this._document&&r.push(new nt(i=>this._ngZone.runOutsideAngular(()=>{let s=Tn(this._renderer,n,"scroll",o=>{this._activeDragInstances().length&&i.next(o)},tu);return()=>{s()}}))),io(...r)}registerDirectiveNode(n,r){this._domNodesToDirectives??=new WeakMap,this._domNodesToDirectives.set(n,r)}removeDirectiveNode(n){this._domNodesToDirectives?.delete(n)}getDragDirectiveForNode(n){return this._domNodesToDirectives?.get(n)||null}ngOnDestroy(){this._dragInstances.forEach(n=>this.removeDragItem(n)),this._dropInstances.forEach(n=>this.removeDropContainer(n)),this._domNodesToDirectives=null,this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_preventDefaultWhileDragging=n=>{this._activeDragInstances().length>0&&n.preventDefault()};_persistentTouchmoveListener=n=>{this._activeDragInstances().length>0&&(this._activeDragInstances().some(this._draggingPredicate)&&n.preventDefault(),this.pointerMove.next(n))};_clearGlobalListeners(){this._globalListeners?.forEach(n=>n()),this._globalListeners=void 0}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),eU={dragStartThreshold:5,pointerDirectionChangeThreshold:5},tU=(()=>{class e{_document=O(Qe);_ngZone=O(Le);_viewportRuler=O(Ql);_dragDropRegistry=O(Bx);_renderer=O(hn).createRenderer(null,null);constructor(){}createDrag(n,r=eU){return new _E(n,r,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry,this._renderer)}createDropList(n){return new wE(n,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Ax=new pe("CDK_DRAG_PARENT"),nU=new pe("CdkDragHandle"),rU=new pe("CDK_DRAG_CONFIG"),iU=new pe("CdkDropList"),Vx=(()=>{class e{element=O(Ct);dropContainer=O(iU,{optional:!0,skipSelf:!0});_ngZone=O(Le);_viewContainerRef=O(Br);_dir=O(Vs,{optional:!0});_changeDetectorRef=O(rr);_selfHandle=O(nU,{optional:!0,self:!0});_parentDrag=O(Ax,{optional:!0,skipSelf:!0});_dragDropRegistry=O(Bx);_destroyed=new J;_handles=new Nr([]);_previewTemplate;_placeholderTemplate;_dragRef;data;lockAxis;rootElementSelector;boundaryElement;dragStartDelay;freeDragPosition;get disabled(){return this._disabled||!!(this.dropContainer&&this.dropContainer.disabled)}set disabled(n){this._disabled=n,this._dragRef.disabled=this._disabled}_disabled;constrainPosition;previewClass;previewContainer;scale=1;started=new Je;released=new Je;ended=new Je;entered=new Je;exited=new Je;dropped=new Je;moved=new nt(n=>{let r=this._dragRef.moved.pipe(pr(i=>({source:this,pointerPosition:i.pointerPosition,event:i.event,delta:i.delta,distance:i.distance}))).subscribe(n);return()=>{r.unsubscribe()}});_injector=O(ht);constructor(){let n=this.dropContainer,r=O(rU,{optional:!0}),i=O(tU);this._dragRef=i.createDrag(this.element,{dragStartThreshold:r&&r.dragStartThreshold!=null?r.dragStartThreshold:5,pointerDirectionChangeThreshold:r&&r.pointerDirectionChangeThreshold!=null?r.pointerDirectionChangeThreshold:5,zIndex:r?.zIndex}),this._dragRef.data=this,this._dragDropRegistry.registerDirectiveNode(this.element.nativeElement,this),r&&this._assignDefaults(r),n&&(this._dragRef._withDropContainer(n._dropListRef),n.addItem(this),n._dropListRef.beforeStarted.pipe(hr(this._destroyed)).subscribe(()=>{this._dragRef.scale=this.scale})),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}getPlaceholderElement(){return this._dragRef.getPlaceholderElement()}getRootElement(){return this._dragRef.getRootElement()}reset(){this._dragRef.reset()}getFreeDragPosition(){return this._dragRef.getFreeDragPosition()}setFreeDragPosition(n){this._dragRef.setFreeDragPosition(n)}ngAfterViewInit(){Jr(()=>{this._updateRootElement(),this._setupHandlesListener(),this._dragRef.scale=this.scale,this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)},{injector:this._injector})}ngOnChanges(n){let r=n.rootElementSelector,i=n.freeDragPosition;r&&!r.firstChange&&this._updateRootElement(),this._dragRef.scale=this.scale,i&&!i.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this),this._dragDropRegistry.removeDirectiveNode(this.element.nativeElement),this._ngZone.runOutsideAngular(()=>{this._handles.complete(),this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()})}_addHandle(n){let r=this._handles.getValue();r.push(n),this._handles.next(r)}_removeHandle(n){let r=this._handles.getValue(),i=r.indexOf(n);i>-1&&(r.splice(i,1),this._handles.next(r))}_setPreviewTemplate(n){this._previewTemplate=n}_resetPreviewTemplate(n){n===this._previewTemplate&&(this._previewTemplate=null)}_setPlaceholderTemplate(n){this._placeholderTemplate=n}_resetPlaceholderTemplate(n){n===this._placeholderTemplate&&(this._placeholderTemplate=null)}_updateRootElement(){let n=this.element.nativeElement,r=n;this.rootElementSelector&&(r=n.closest!==void 0?n.closest(this.rootElementSelector):n.parentElement?.closest(this.rootElementSelector)),this._dragRef.withRootElement(r||n)}_getBoundaryElement(){let n=this.boundaryElement;return n?typeof n=="string"?this.element.nativeElement.closest(n):Xn(n):null}_syncInputs(n){n.beforeStarted.subscribe(()=>{if(!n.isDragging()){let r=this._dir,i=this.dragStartDelay,s=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;n.disabled=this.disabled,n.lockAxis=this.lockAxis,n.scale=this.scale,n.dragStartDelay=typeof i=="object"&&i?i:uE(i),n.constrainPosition=this.constrainPosition,n.previewClass=this.previewClass,n.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(s).withPreviewTemplate(o).withPreviewContainer(this.previewContainer||"global"),r&&n.withDirection(r.value)}}),n.beforeStarted.pipe(sm(1)).subscribe(()=>{if(this._parentDrag){n.withParent(this._parentDrag._dragRef);return}let r=this.element.nativeElement.parentElement;for(;r;){let i=this._dragDropRegistry.getDragDirectiveForNode(r);if(i){n.withParent(i._dragRef);break}r=r.parentElement}})}_handleEvents(n){n.started.subscribe(r=>{this.started.emit({source:this,event:r.event}),this._changeDetectorRef.markForCheck()}),n.released.subscribe(r=>{this.released.emit({source:this,event:r.event})}),n.ended.subscribe(r=>{this.ended.emit({source:this,distance:r.distance,dropPoint:r.dropPoint,event:r.event}),this._changeDetectorRef.markForCheck()}),n.entered.subscribe(r=>{this.entered.emit({container:r.container.data,item:this,currentIndex:r.currentIndex})}),n.exited.subscribe(r=>{this.exited.emit({container:r.container.data,item:this})}),n.dropped.subscribe(r=>{this.dropped.emit({previousIndex:r.previousIndex,currentIndex:r.currentIndex,previousContainer:r.previousContainer.data,container:r.container.data,isPointerOverContainer:r.isPointerOverContainer,item:this,distance:r.distance,dropPoint:r.dropPoint,event:r.event})})}_assignDefaults(n){let{lockAxis:r,dragStartDelay:i,constrainPosition:s,previewClass:o,boundaryElement:a,draggingDisabled:l,rootElementSelector:c,previewContainer:h}=n;this.disabled=l??!1,this.dragStartDelay=i||0,r&&(this.lockAxis=r),s&&(this.constrainPosition=s),o&&(this.previewClass=o),a&&(this.boundaryElement=a),c&&(this.rootElementSelector=c),h&&(this.previewContainer=h)}_setupHandlesListener(){this._handles.pipe(cm(n=>{let r=n.map(i=>i.element);this._selfHandle&&this.rootElementSelector&&r.push(this.element),this._dragRef.withHandles(r)}),ea(n=>io(...n.map(r=>r._stateChanges.pipe(Ii(r))))),hr(this._destroyed)).subscribe(n=>{let r=this._dragRef,i=n.element.nativeElement;n.disabled?r.disableHandle(i):r.enableHandle(i)})}static \u0275fac=function(n){return new(n||e)};static \u0275dir=Vr({type:e,selectors:[["","cdkDrag",""]],hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(n,r){n&2&&go("cdk-drag-disabled",r.disabled)("cdk-drag-dragging",r._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",Sa],constrainPosition:[0,"cdkDragConstrainPosition","constrainPosition"],previewClass:[0,"cdkDragPreviewClass","previewClass"],previewContainer:[0,"cdkDragPreviewContainer","previewContainer"],scale:[2,"cdkDragScale","scale",Dy]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],features:[Vd([{provide:Ax,useExisting:e}]),ns]})}return e})(),oU=e=>({"lc:cursor-grab":e}),Ux=(e,t)=>t.url;function sU(e,t){if(e&1&&Ne(0,"source",11),e&2){let n=t.$implicit;zn("type",n.mimeType),ji("media","(max-width: ",n.width,"px)"),Be("src",n.url,an)}}function aU(e,t){if(e&1&&Ne(0,"source",12),e&2){let n=t.$implicit;zn("type",n.mimeType),Be("src",n.url,an)}}var Ch=class jf{constructor(t){this.elementRef=t}video;closeClicked=new Je;videoClicked=new Je;isDragging=!1;VideoUtils=Po;ngOnInit(){let t=this.elementRef.nativeElement.parentElement.parentElement;t.style.zIndex="2147483647"}close(){this.closeClicked.emit()}onVideoClick(){if(this.isDragging){this.isDragging=!1;return}this.videoClicked.emit()}static \u0275fac=function(t){return new(t||jf)(Ot(Ct))};static \u0275cmp=yt({type:jf,selectors:[["cooee-draggable-video-popup"]],inputs:{video:"video"},outputs:{closeClicked:"closeClicked",videoClicked:"videoClicked"},decls:16,vars:5,consts:[["role","button","tabindex","0","cdkDrag","",1,"lc-popup-inner","lc:shadow-2xl","lc:rounded-lg","lc:flex","lc:justify-center","lc:items-center",3,"click","keyup","cdkDragMoved","ngClass","cdkDragBoundary"],[1,"lc-close-button","lc:absolute","lc:-top-3.5","lc:-right-3.5","lc:bg-black/50","lc:rounded-full","lc:w-8","lc:h-8","lc:border-none","lc:z-10","lc:flex","lc:justify-center","lc:items-center",3,"click"],["xmlns","http://www.w3.org/2000/svg","height","24px","viewBox","0 0 24 24","width","24px","fill","#fff"],["d","M0 0h24v24H0V0z","fill","none"],["d","M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"],[1,"lc-play-button"],[1,"lc-icon"],["viewBox","0 0 28.31 30"],["d","M19.15,1.29A1.24,1.24,0,0,0,17.82.15a1.36,1.36,0,0,0-.35.07,3.2,3.2,0,0,0-.65.46l-5.06,4.6a1.24,1.24,0,0,0,0,1.75l0,0a1.22,1.22,0,0,0,.89.39,1.25,1.25,0,0,0,.85-.32l3-2.78.17-.13v8l2.44,2.62ZM26.79,26.6l-7.64-7.93-2.5-2.58-6-6.34L8.9,8,5.23,4.15a1.17,1.17,0,0,0-1.66,0h0a1.18,1.18,0,0,0,0,1.66h0L6.1,8.47H3.32a2.94,2.94,0,0,0-2.45,3v7.16a3,3,0,0,0,2.86,3.08H8.07a.44.44,0,0,1,.33.13C9.7,23,11,24.19,12.26,25.36L17,29.7a1.24,1.24,0,0,0,2.17-1V22.21l5.95,6.15a1.2,1.2,0,0,0,1.67,0,1.17,1.17,0,0,0,.08-1.66Zm-10.14-.67-.18-.11L9.75,19.67a1.72,1.72,0,0,0-1.16-.45H4c-.48,0-.59-.11-.59-.61V11.55c0-.49,0-.6.59-.6H8.29l8.29,8.55ZM29.09,15.07A9.9,9.9,0,0,1,26.33,22l-.11.13a1.24,1.24,0,0,1-2-.28,1.29,1.29,0,0,1,.24-1.52h0a6.77,6.77,0,0,0,1.32-1.89,7.41,7.41,0,0,0-1.37-8.55,1.24,1.24,0,0,1-.08-1.75,1.33,1.33,0,0,1,.41-.29,1.19,1.19,0,0,1,1.34.2A8.88,8.88,0,0,1,28,10.36a10,10,0,0,1,1.17,4.17A3.35,3.35,0,0,1,29.09,15.07Z","transform","translate(-0.86 -0.14)","fill","#191919"],[1,"lc-text"],["loop","","preload","auto","playsinline","","autoplay","",1,"lc:rounded-lg","lc:w-full",3,"muted"],[3,"src","type","media"],[3,"src","type"]],template:function(t,n){t&1&&(re(0,"div",0),Rt("click",function(){return n.onVideoClick()})("keyup",function(){return n.onVideoClick()})("cdkDragMoved",function(){return n.isDragging=!0}),re(1,"button",1),Rt("click",function(r){return r.stopPropagation(),n.close()}),vr(),re(2,"svg",2),Ne(3,"path",3)(4,"path",4),ie()(),rs(),re(5,"div",5)(6,"div",6),vr(),re(7,"svg",7),Ne(8,"path",8),ie()(),rs(),re(9,"div",9),tn(10,"Tap to unmute"),ie()(),re(11,"video",10),Qt(12,sU,1,4,"source",11,Ux),Qt(14,aU,1,2,"source",12,Ux),ie()()),t&2&&(Be("ngClass",XS(3,oU,n.isDragging))("cdkDragBoundary","body"),X(11),Be("muted",!0),X(),en(n.video.sources),X(2),en(n.VideoUtils.getBestSources(n.video.sources)))},dependencies:[mD,Vx],styles:["[_nghost-%COMP%]{position:fixed;display:block;right:24px;bottom:24px;max-width:150px}.lc-play-button[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%) scale(1);transition:all .1s ease-in-out;z-index:999;flex-wrap:wrap;width:100%;max-width:130px;border-radius:5px;padding:5px 10px;background-color:#97979761;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.lc-play-button[_ngcontent-%COMP%] .lc-icon[_ngcontent-%COMP%]{width:14px;height:14px}.lc-play-button[_ngcontent-%COMP%] path[_ngcontent-%COMP%]{fill:#fff}.lc-play-button[_ngcontent-%COMP%] .lc-text[_ngcontent-%COMP%]{font-size:11px;line-height:1;color:#fff;font-weight:400;margin-left:5px;text-align:center}"]})},ru=class{_attachedHost;attach(e){return this._attachedHost=e,e.attach(this)}detach(){let e=this._attachedHost;e!=null&&(this._attachedHost=null,e.detach())}get isAttached(){return this._attachedHost!=null}setAttachedHost(e){this._attachedHost=e}},wc=class extends ru{component;viewContainerRef;injector;componentFactoryResolver;projectableNodes;constructor(e,t,n,r,i){super(),this.component=e,this.viewContainerRef=t,this.injector=n,this.projectableNodes=i}},bc=class extends ru{templateRef;viewContainerRef;context;injector;constructor(e,t,n,r){super(),this.templateRef=e,this.viewContainerRef=t,this.context=n,this.injector=r}get origin(){return this.templateRef.elementRef}attach(e,t=this.context){return this.context=t,super.attach(e)}detach(){return this.context=void 0,super.detach()}},SE=class extends ru{element;constructor(e){super(),this.element=e instanceof Ct?e.nativeElement:e}},Cc=class{_attachedPortal;_disposeFn;_isDisposed=!1;hasAttached(){return!!this._attachedPortal}attach(e){if(e instanceof wc)return this._attachedPortal=e,this.attachComponentPortal(e);if(e instanceof bc)return this._attachedPortal=e,this.attachTemplatePortal(e);if(this.attachDomPortal&&e instanceof SE)return this._attachedPortal=e,this.attachDomPortal(e)}attachDomPortal=null;detach(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}dispose(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}setDisposeFn(e){this._disposeFn=e}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}},Sh=class extends Cc{outletElement;_appRef;_defaultInjector;_document;constructor(e,t,n,r,i){super(),this.outletElement=e,this._appRef=n,this._defaultInjector=r,this._document=i}attachComponentPortal(e){let t;if(e.viewContainerRef){let n=e.injector||e.viewContainerRef.injector,r=n.get(ki,null,{optional:!0})||void 0;t=e.viewContainerRef.createComponent(e.component,{index:e.viewContainerRef.length,injector:n,ngModuleRef:r,projectableNodes:e.projectableNodes||void 0}),this.setDisposeFn(()=>t.destroy())}else{let n=this._appRef,r=e.injector||this._defaultInjector||ht.NULL,i=r.get(Gn,n.injector);t=Ud(e.component,{elementInjector:r,environmentInjector:i,projectableNodes:e.projectableNodes||void 0}),n.attachView(t.hostView),this.setDisposeFn(()=>{n.viewCount>0&&n.detachView(t.hostView),t.destroy()})}return this.outletElement.appendChild(this._getComponentRootNode(t)),this._attachedPortal=e,t}attachTemplatePortal(e){let t=e.viewContainerRef,n=t.createEmbeddedView(e.templateRef,e.context,{injector:e.injector});return n.rootNodes.forEach(r=>this.outletElement.appendChild(r)),n.detectChanges(),this.setDisposeFn(()=>{let r=t.indexOf(n);r!==-1&&t.remove(r)}),this._attachedPortal=e,n}attachDomPortal=e=>{let t=e.element;t.parentNode;let n=this._document.createComment("dom-portal");t.parentNode.insertBefore(n,t),this.outletElement.appendChild(t),this._attachedPortal=e,super.setDisposeFn(()=>{n.parentNode&&n.parentNode.replaceChild(t,n)})};dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(e){return e.hostView.rootNodes[0]}},DE=(()=>{class e extends Cc{_moduleRef=O(ki,{optional:!0});_document=O(Qe);_viewContainerRef=O(Br);_isInitialized=!1;_attachedRef;constructor(){super()}get portal(){return this._attachedPortal}set portal(n){this.hasAttached()&&!n&&!this._isInitialized||(this.hasAttached()&&super.detach(),n&&super.attach(n),this._attachedPortal=n||null)}attached=new Je;get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedRef=this._attachedPortal=null}attachComponentPortal(n){n.setAttachedHost(this);let r=n.viewContainerRef!=null?n.viewContainerRef:this._viewContainerRef,i=r.createComponent(n.component,{index:r.length,injector:n.injector||r.injector,projectableNodes:n.projectableNodes||void 0,ngModuleRef:this._moduleRef||void 0});return r!==this._viewContainerRef&&this._getRootNode().appendChild(i.hostView.rootNodes[0]),super.setDisposeFn(()=>i.destroy()),this._attachedPortal=n,this._attachedRef=i,this.attached.emit(i),i}attachTemplatePortal(n){n.setAttachedHost(this);let r=this._viewContainerRef.createEmbeddedView(n.templateRef,n.context,{injector:n.injector});return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=n,this._attachedRef=r,this.attached.emit(r),r}attachDomPortal=n=>{let r=n.element;r.parentNode;let i=this._document.createComment("dom-portal");n.setAttachedHost(this),r.parentNode.insertBefore(i,r),this._getRootNode().appendChild(r),this._attachedPortal=n,super.setDisposeFn(()=>{i.parentNode&&i.parentNode.replaceChild(r,i)})};_getRootNode(){let n=this._viewContainerRef.element.nativeElement;return n.nodeType===n.ELEMENT_NODE?n:n.parentNode}static \u0275fac=function(n){return new(n||e)};static \u0275dir=Vr({type:e,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:[0,"cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[ho]})}return e})(),iu;function cU(){if(iu==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>iu=!0}))}finally{iu=iu||!1}return iu}function Hx(e){return cU()?e:!!e.capture}var lU=new pe("cdk-input-modality-detector-options"),uU={ignoreKeys:[18,17,224,91,16]},jx=650,IE={passive:!0,capture:!0},dU=(()=>{class e{_platform=O(Jn);_listenerCleanups;modalityDetected;modalityChanged;get mostRecentModality(){return this._modality.value}_mostRecentTarget=null;_modality=new Nr(null);_options;_lastTouchMs=0;_onKeydown=n=>{this._options?.ignoreKeys?.some(r=>r===n.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=Zn(n))};_onMousedown=n=>{Date.now()-this._lastTouchMs<jx||(this._modality.next(mh(n)?"keyboard":"mouse"),this._mostRecentTarget=Zn(n))};_onTouchstart=n=>{if(gh(n)){this._modality.next("keyboard");return}this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=Zn(n)};constructor(){let n=O(Le),r=O(Qe),i=O(lU,{optional:!0});if(this._options=w(w({},uU),i),this.modalityDetected=this._modality.pipe(am(1)),this.modalityChanged=this.modalityDetected.pipe(Fu()),this._platform.isBrowser){let s=O(hn).createRenderer(null,null);this._listenerCleanups=n.runOutsideAngular(()=>[Tn(s,r,"keydown",this._onKeydown,IE),Tn(s,r,"mousedown",this._onMousedown,IE),Tn(s,r,"touchstart",this._onTouchstart,IE)])}}ngOnDestroy(){this._modality.complete(),this._listenerCleanups?.forEach(n=>n())}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Ih=function(e){return e[e.IMMEDIATE=0]="IMMEDIATE",e[e.EVENTUAL=1]="EVENTUAL",e}(Ih||{}),fU=new pe("cdk-focus-monitor-default-options"),Dh=Hx({passive:!0,capture:!0}),$x=(()=>{class e{_ngZone=O(Le);_platform=O(Jn);_inputModalityDetector=O(dU);_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=O(Qe,{optional:!0});_stopInputModalityDetector=new J;constructor(){let n=O(fU,{optional:!0});this._detectionMode=n?.detectionMode||Ih.IMMEDIATE}_rootNodeFocusAndBlurListener=n=>{let r=Zn(n);for(let i=r;i;i=i.parentElement)n.type==="focus"?this._onFocus(n,i):this._onBlur(n,i)};monitor(n,r=!1){let i=Xn(n);if(!this._platform.isBrowser||i.nodeType!==1)return jo();let s=_c(i)||this._getDocument(),o=this._elementInfo.get(i);if(o)return r&&(o.checkChildren=!0),o.subject;let a={checkChildren:r,subject:new J,rootNode:s};return this._elementInfo.set(i,a),this._registerGlobalListeners(a),a.subject}stopMonitoring(n){let r=Xn(n),i=this._elementInfo.get(r);i&&(i.subject.complete(),this._setClasses(r),this._elementInfo.delete(r),this._removeGlobalListeners(i))}focusVia(n,r,i){let s=Xn(n),o=this._getDocument().activeElement;s===o?this._getClosestElementsInfo(s).forEach(([a,l])=>this._originChanged(a,r,l)):(this._setOrigin(r),typeof s.focus=="function"&&s.focus(i))}ngOnDestroy(){this._elementInfo.forEach((n,r)=>this.stopMonitoring(r))}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_getFocusOrigin(n){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(n)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:n&&this._isLastInteractionFromInputLabel(n)?"mouse":"program"}_shouldBeAttributedToTouch(n){return this._detectionMode===Ih.EVENTUAL||!!n?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(n,r){n.classList.toggle("cdk-focused",!!r),n.classList.toggle("cdk-touch-focused",r==="touch"),n.classList.toggle("cdk-keyboard-focused",r==="keyboard"),n.classList.toggle("cdk-mouse-focused",r==="mouse"),n.classList.toggle("cdk-program-focused",r==="program")}_setOrigin(n,r=!1){this._ngZone.runOutsideAngular(()=>{if(this._origin=n,this._originFromTouchInteraction=n==="touch"&&r,this._detectionMode===Ih.IMMEDIATE){clearTimeout(this._originTimeoutId);let i=this._originFromTouchInteraction?jx:1;this._originTimeoutId=setTimeout(()=>this._origin=null,i)}})}_onFocus(n,r){let i=this._elementInfo.get(r),s=Zn(n);!i||!i.checkChildren&&r!==s||this._originChanged(r,this._getFocusOrigin(s),i)}_onBlur(n,r){let i=this._elementInfo.get(r);!i||i.checkChildren&&n.relatedTarget instanceof Node&&r.contains(n.relatedTarget)||(this._setClasses(r),this._emitOrigin(i,null))}_emitOrigin(n,r){n.subject.observers.length&&this._ngZone.run(()=>n.subject.next(r))}_registerGlobalListeners(n){if(!this._platform.isBrowser)return;let r=n.rootNode,i=this._rootNodeFocusListenerCount.get(r)||0;i||this._ngZone.runOutsideAngular(()=>{r.addEventListener("focus",this._rootNodeFocusAndBlurListener,Dh),r.addEventListener("blur",this._rootNodeFocusAndBlurListener,Dh)}),this._rootNodeFocusListenerCount.set(r,i+1),++this._monitoredElementCount===1&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(hr(this._stopInputModalityDetector)).subscribe(s=>{this._setOrigin(s,!0)}))}_removeGlobalListeners(n){let r=n.rootNode;if(this._rootNodeFocusListenerCount.has(r)){let i=this._rootNodeFocusListenerCount.get(r);i>1?this._rootNodeFocusListenerCount.set(r,i-1):(r.removeEventListener("focus",this._rootNodeFocusAndBlurListener,Dh),r.removeEventListener("blur",this._rootNodeFocusAndBlurListener,Dh),this._rootNodeFocusListenerCount.delete(r))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(n,r,i){this._setClasses(n,r),this._emitOrigin(i,r),this._lastFocusOrigin=r}_getClosestElementsInfo(n){let r=[];return this._elementInfo.forEach((i,s)=>{(s===n||i.checkChildren&&s.contains(n))&&r.push([s,i])}),r}_isLastInteractionFromInputLabel(n){let{_mostRecentTarget:r,mostRecentModality:i}=this._inputModalityDetector;if(i!=="mouse"||!r||r===n||n.nodeName!=="INPUT"&&n.nodeName!=="TEXTAREA"||n.disabled)return!1;let s=n.labels;if(s){for(let o=0;o<s.length;o++)if(s[o].contains(r))return!0}return!1}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Wx=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275cmp=yt({type:e,selectors:[["ng-component"]],exportAs:["cdkVisuallyHidden"],decls:0,vars:0,template:function(n,r){},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}
77
77
  `],encapsulation:2,changeDetection:0})}return e})(),xE=(()=>{class e{_platform=O(Jn);constructor(){}isDisabled(n){return n.hasAttribute("disabled")}isVisible(n){return hU(n)&&getComputedStyle(n).visibility==="visible"}isTabbable(n){if(!this._platform.isBrowser)return!1;let r=pU(bU(n));if(r&&(Gx(r)===-1||!this.isVisible(r)))return!1;let i=n.nodeName.toLowerCase(),s=Gx(n);return n.hasAttribute("contenteditable")?s!==-1:i==="iframe"||i==="object"||this._platform.WEBKIT&&this._platform.IOS&&!EU(n)?!1:i==="audio"?n.hasAttribute("controls")?s!==-1:!1:i==="video"?s===-1?!1:s!==null?!0:this._platform.FIREFOX||n.hasAttribute("controls"):n.tabIndex>=0}isFocusable(n,r){return wU(n)&&!this.isDisabled(n)&&(r?.ignoreVisibility||this.isVisible(n))}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function pU(e){try{return e.frameElement}catch{return null}}function hU(e){return!!(e.offsetWidth||e.offsetHeight||typeof e.getClientRects=="function"&&e.getClientRects().length)}function mU(e){let t=e.nodeName.toLowerCase();return t==="input"||t==="select"||t==="button"||t==="textarea"}function gU(e){return vU(e)&&e.type=="hidden"}function yU(e){return _U(e)&&e.hasAttribute("href")}function vU(e){return e.nodeName.toLowerCase()=="input"}function _U(e){return e.nodeName.toLowerCase()=="a"}function zx(e){if(!e.hasAttribute("tabindex")||e.tabIndex===void 0)return!1;let t=e.getAttribute("tabindex");return!!(t&&!isNaN(parseInt(t,10)))}function Gx(e){if(!zx(e))return null;let t=parseInt(e.getAttribute("tabindex")||"",10);return isNaN(t)?-1:t}function EU(e){let t=e.nodeName.toLowerCase(),n=t==="input"&&e.type;return n==="text"||n==="password"||t==="select"||t==="textarea"}function wU(e){return gU(e)?!1:mU(e)||yU(e)||e.hasAttribute("contenteditable")||zx(e)}function bU(e){return e.ownerDocument&&e.ownerDocument.defaultView||window}var TE=class{_element;_checker;_ngZone;_document;_injector;_startAnchor;_endAnchor;_hasAttached=!1;startAnchorListener=()=>this.focusLastTabbableElement();endAnchorListener=()=>this.focusFirstTabbableElement();get enabled(){return this._enabled}set enabled(e){this._enabled=e,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(e,this._startAnchor),this._toggleAnchorTabIndex(e,this._endAnchor))}_enabled=!0;constructor(e,t,n,r,i=!1,s){this._element=e,this._checker=t,this._ngZone=n,this._document=r,this._injector=s,i||this.attachAnchors()}destroy(){let e=this._startAnchor,t=this._endAnchor;e&&(e.removeEventListener("focus",this.startAnchorListener),e.remove()),t&&(t.removeEventListener("focus",this.endAnchorListener),t.remove()),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return this._hasAttached?!0:(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(e){return new Promise(t=>{this._executeOnStable(()=>t(this.focusInitialElement(e)))})}focusFirstTabbableElementWhenReady(e){return new Promise(t=>{this._executeOnStable(()=>t(this.focusFirstTabbableElement(e)))})}focusLastTabbableElementWhenReady(e){return new Promise(t=>{this._executeOnStable(()=>t(this.focusLastTabbableElement(e)))})}_getRegionBoundary(e){let t=this._element.querySelectorAll(`[cdk-focus-region-${e}], [cdkFocusRegion${e}], [cdk-focus-${e}]`);return e=="start"?t.length?t[0]:this._getFirstTabbableElement(this._element):t.length?t[t.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(e){let t=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(t){if(!this._checker.isFocusable(t)){let n=this._getFirstTabbableElement(t);return n?.focus(e),!!n}return t.focus(e),!0}return this.focusFirstTabbableElement(e)}focusFirstTabbableElement(e){let t=this._getRegionBoundary("start");return t&&t.focus(e),!!t}focusLastTabbableElement(e){let t=this._getRegionBoundary("end");return t&&t.focus(e),!!t}hasAttached(){return this._hasAttached}_getFirstTabbableElement(e){if(this._checker.isFocusable(e)&&this._checker.isTabbable(e))return e;let t=e.children;for(let n=0;n<t.length;n++){let r=t[n].nodeType===this._document.ELEMENT_NODE?this._getFirstTabbableElement(t[n]):null;if(r)return r}return null}_getLastTabbableElement(e){if(this._checker.isFocusable(e)&&this._checker.isTabbable(e))return e;let t=e.children;for(let n=t.length-1;n>=0;n--){let r=t[n].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(t[n]):null;if(r)return r}return null}_createAnchor(){let e=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,e),e.classList.add("cdk-visually-hidden"),e.classList.add("cdk-focus-trap-anchor"),e.setAttribute("aria-hidden","true"),e}_toggleAnchorTabIndex(e,t){e?t.setAttribute("tabindex","0"):t.removeAttribute("tabindex")}toggleAnchors(e){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(e,this._startAnchor),this._toggleAnchorTabIndex(e,this._endAnchor))}_executeOnStable(e){this._injector?Jr(e,{injector:this._injector}):setTimeout(e)}},qx=(()=>{class e{_checker=O(xE);_ngZone=O(Le);_document=O(Qe);_injector=O(ht);constructor(){O(Bs).load(Wx)}create(n,r=!1){return new TE(n,this._checker,this._ngZone,this._document,r,this._injector)}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function RE(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}function qt(e){return e==null?"":typeof e=="string"?e:`${e}px`}function Yx(e,...t){return t.length?t.some(n=>e[n]):e.altKey||e.shiftKey||e.ctrlKey||e.metaKey}var Kx=yx(),NE=class{_viewportRuler;_previousHTMLStyles={top:"",left:""};_previousScrollPosition;_isEnabled=!1;_document;constructor(e,t){this._viewportRuler=e,this._document=t}attach(){}enable(){if(this._canBeEnabled()){let e=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=e.style.left||"",this._previousHTMLStyles.top=e.style.top||"",e.style.left=qt(-this._previousScrollPosition.left),e.style.top=qt(-this._previousScrollPosition.top),e.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){let e=this._document.documentElement,t=this._document.body,n=e.style,r=t.style,i=n.scrollBehavior||"",s=r.scrollBehavior||"";this._isEnabled=!1,n.left=this._previousHTMLStyles.left,n.top=this._previousHTMLStyles.top,e.classList.remove("cdk-global-scrollblock"),Kx&&(n.scrollBehavior=r.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),Kx&&(n.scrollBehavior=i,r.scrollBehavior=s)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;let e=this._document.documentElement,t=this._viewportRuler.getViewportSize();return e.scrollHeight>t.height||e.scrollWidth>t.width}},AE=class{_scrollDispatcher;_ngZone;_viewportRuler;_config;_scrollSubscription=null;_overlayRef;_initialScrollPosition;constructor(e,t,n,r){this._scrollDispatcher=e,this._ngZone=t,this._viewportRuler=n,this._config=r}attach(e){this._overlayRef,this._overlayRef=e}enable(){if(this._scrollSubscription)return;let e=this._scrollDispatcher.scrolled(0).pipe($o(t=>!t||!this._overlayRef.overlayElement.contains(t.getElementRef().nativeElement)));this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=e.subscribe(()=>{let t=this._viewportRuler.getViewportScrollPosition().top;Math.abs(t-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=e.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}_detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}},Th=class{enable(){}disable(){}attach(){}};function ME(e,t){return t.some(n=>{let r=e.bottom<n.top,i=e.top>n.bottom,s=e.right<n.left,o=e.left>n.right;return r||i||s||o})}function Zx(e,t){return t.some(n=>{let r=e.top<n.top,i=e.bottom>n.bottom,s=e.left<n.left,o=e.right>n.right;return r||i||s||o})}var OE=class{_scrollDispatcher;_viewportRuler;_ngZone;_config;_scrollSubscription=null;_overlayRef;constructor(e,t,n,r){this._scrollDispatcher=e,this._viewportRuler=t,this._ngZone=n,this._config=r}attach(e){this._overlayRef,this._overlayRef=e}enable(){if(!this._scrollSubscription){let e=this._config?this._config.scrollThrottle:0;this._scrollSubscription=this._scrollDispatcher.scrolled(e).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){let t=this._overlayRef.overlayElement.getBoundingClientRect(),{width:n,height:r}=this._viewportRuler.getViewportSize();ME(t,[{width:n,height:r,bottom:r,right:n,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}})}}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}},SU=(()=>{class e{_scrollDispatcher=O(fE);_viewportRuler=O(Ql);_ngZone=O(Le);_document=O(Qe);constructor(){}noop=()=>new Th;close=n=>new AE(this._scrollDispatcher,this._ngZone,this._viewportRuler,n);block=()=>new NE(this._viewportRuler,this._document);reposition=n=>new OE(this._scrollDispatcher,this._viewportRuler,this._ngZone,n);static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),ou=class{positionStrategy;scrollStrategy=new Th;panelClass="";hasBackdrop=!1;backdropClass="cdk-overlay-dark-backdrop";width;height;minWidth;minHeight;maxWidth;maxHeight;direction;disposeOnNavigation=!1;constructor(e){if(e){let t=Object.keys(e);for(let n of t)e[n]!==void 0&&(this[n]=e[n])}}},PE=class{connectionPair;scrollableViewProperties;constructor(e,t){this.connectionPair=e,this.scrollableViewProperties=t}},nR=(()=>{class e{_attachedOverlays=[];_document=O(Qe);_isAttached;constructor(){}ngOnDestroy(){this.detach()}add(n){this.remove(n),this._attachedOverlays.push(n)}remove(n){let r=this._attachedOverlays.indexOf(n);r>-1&&this._attachedOverlays.splice(r,1),this._attachedOverlays.length===0&&this.detach()}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),DU=(()=>{class e extends nR{_ngZone=O(Le);_renderer=O(hn).createRenderer(null,null);_cleanupKeydown;add(n){super.add(n),this._isAttached||(this._ngZone.runOutsideAngular(()=>{this._cleanupKeydown=this._renderer.listen("body","keydown",this._keydownListener)}),this._isAttached=!0)}detach(){this._isAttached&&(this._cleanupKeydown?.(),this._isAttached=!1)}_keydownListener=n=>{let r=this._attachedOverlays;for(let i=r.length-1;i>-1;i--)if(r[i]._keydownEvents.observers.length>0){this._ngZone.run(()=>r[i]._keydownEvents.next(n));break}};static \u0275fac=(()=>{let n;return function(r){return(n||(n=Dd(e)))(r||e)}})();static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),IU=(()=>{class e extends nR{_platform=O(Jn);_ngZone=O(Le);_renderer=O(hn).createRenderer(null,null);_cursorOriginalValue;_cursorStyleIsSet=!1;_pointerDownEventTarget;_cleanups;add(n){if(super.add(n),!this._isAttached){let r=this._document.body,i={capture:!0};this._cleanups=this._ngZone.runOutsideAngular(()=>[Tn(this._renderer,r,"pointerdown",this._pointerDownListener,i),Tn(this._renderer,r,"click",this._clickListener,i),Tn(this._renderer,r,"auxclick",this._clickListener,i),Tn(this._renderer,r,"contextmenu",this._clickListener,i)]),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=r.style.cursor,r.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}detach(){this._isAttached&&(this._cleanups?.forEach(n=>n()),this._cleanups=void 0,this._platform.IOS&&this._cursorStyleIsSet&&(this._document.body.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1)}_pointerDownListener=n=>{this._pointerDownEventTarget=Zn(n)};_clickListener=n=>{let r=Zn(n),i=n.type==="click"&&this._pointerDownEventTarget?this._pointerDownEventTarget:r;this._pointerDownEventTarget=null;let s=this._attachedOverlays.slice();for(let o=s.length-1;o>-1;o--){let a=s[o];if(a._outsidePointerEvents.observers.length<1||!a.hasAttached())continue;if(Xx(a.overlayElement,r)||Xx(a.overlayElement,i))break;let l=a._outsidePointerEvents;this._ngZone?this._ngZone.run(()=>l.next(n)):l.next(n)}};static \u0275fac=(()=>{let n;return function(r){return(n||(n=Dd(e)))(r||e)}})();static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function Xx(e,t){let n=typeof ShadowRoot<"u"&&ShadowRoot,r=t;for(;r;){if(r===e)return!0;r=n&&r instanceof ShadowRoot?r.host:r.parentNode}return!1}var rR=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275cmp=yt({type:e,selectors:[["ng-component"]],hostAttrs:["cdk-overlay-style-loader",""],decls:0,vars:0,template:function(n,r){},styles:[`.cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed}@layer cdk-overlay{.cdk-overlay-container{z-index:1000}}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute}@layer cdk-overlay{.cdk-global-overlay-wrapper{z-index:1000}}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;display:flex;max-width:100%;max-height:100%}@layer cdk-overlay{.cdk-overlay-pane{z-index:1000}}.cdk-overlay-backdrop{position:absolute;top:0;bottom:0;left:0;right:0;pointer-events:auto;-webkit-tap-highlight-color:rgba(0,0,0,0);opacity:0}@layer cdk-overlay{.cdk-overlay-backdrop{z-index:1000;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}}@media(prefers-reduced-motion){.cdk-overlay-backdrop{transition-duration:1ms}}.cdk-overlay-backdrop-showing{opacity:1}@media(forced-colors: active){.cdk-overlay-backdrop-showing{opacity:.6}}@layer cdk-overlay{.cdk-overlay-dark-backdrop{background:rgba(0,0,0,.32)}}.cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing,.cdk-high-contrast-active .cdk-overlay-transparent-backdrop{opacity:0;visibility:visible}.cdk-overlay-backdrop-noop-animation{transition:none}.cdk-overlay-connected-position-bounding-box{position:absolute;display:flex;flex-direction:column;min-width:1px;min-height:1px}@layer cdk-overlay{.cdk-overlay-connected-position-bounding-box{z-index:1000}}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}
78
78
  `],encapsulation:2,changeDetection:0})}return e})(),xh=(()=>{class e{_platform=O(Jn);_containerElement;_document=O(Qe);_styleLoader=O(Bs);constructor(){}ngOnDestroy(){this._containerElement?.remove()}getContainerElement(){return this._loadStyles(),this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let n="cdk-overlay-container";if(this._platform.isBrowser||RE()){let i=this._document.querySelectorAll(`.${n}[platform="server"], .${n}[platform="test"]`);for(let s=0;s<i.length;s++)i[s].remove()}let r=this._document.createElement("div");r.classList.add(n),RE()?r.setAttribute("platform","test"):this._platform.isBrowser||r.setAttribute("platform","server"),this._document.body.appendChild(r),this._containerElement=r}_loadStyles(){this._styleLoader.load(rR)}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),kE=class{_renderer;_ngZone;element;_cleanupClick;_cleanupTransitionEnd;_fallbackTimeout;constructor(e,t,n,r){this._renderer=t,this._ngZone=n,this.element=e.createElement("div"),this.element.classList.add("cdk-overlay-backdrop"),this._cleanupClick=t.listen(this.element,"click",r)}detach(){this._ngZone.runOutsideAngular(()=>{let e=this.element;clearTimeout(this._fallbackTimeout),this._cleanupTransitionEnd?.(),this._cleanupTransitionEnd=this._renderer.listen(e,"transitionend",this.dispose),this._fallbackTimeout=setTimeout(this.dispose,500),e.style.pointerEvents="none",e.classList.remove("cdk-overlay-backdrop-showing")})}dispose=()=>{clearTimeout(this._fallbackTimeout),this._cleanupClick?.(),this._cleanupTransitionEnd?.(),this._cleanupClick=this._cleanupTransitionEnd=this._fallbackTimeout=void 0,this.element.remove()}},Sc=class{_portalOutlet;_host;_pane;_config;_ngZone;_keyboardDispatcher;_document;_location;_outsideClickDispatcher;_animationsDisabled;_injector;_renderer;_backdropClick=new J;_attachments=new J;_detachments=new J;_positionStrategy;_scrollStrategy;_locationChanges=ot.EMPTY;_backdropRef=null;_previousHostParent;_keydownEvents=new J;_outsidePointerEvents=new J;_renders=new J;_afterRenderRef;_afterNextRenderRef;constructor(e,t,n,r,i,s,o,a,l,c=!1,h,d){this._portalOutlet=e,this._host=t,this._pane=n,this._config=r,this._ngZone=i,this._keyboardDispatcher=s,this._document=o,this._location=a,this._outsideClickDispatcher=l,this._animationsDisabled=c,this._injector=h,this._renderer=d,r.scrollStrategy&&(this._scrollStrategy=r.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=r.positionStrategy,this._afterRenderRef=Iy(()=>ry(()=>{this._renders.next()},{injector:this._injector}))}get overlayElement(){return this._pane}get backdropElement(){return this._backdropRef?.element||null}get hostElement(){return this._host}attach(e){!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host);let t=this._portalOutlet.attach(e);return this._positionStrategy&&this._positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._afterNextRenderRef?.destroy(),this._afterNextRenderRef=Jr(()=>{this.hasAttached()&&this.updatePosition()},{injector:this._injector}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),typeof t?.onDestroy=="function"&&t.onDestroy(()=>{this.hasAttached()&&this._ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>this.detach()))}),t}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();let e=this._portalOutlet.detach();return this._detachments.next(),this._keyboardDispatcher.remove(this),this._detachContentWhenEmpty(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),e}dispose(){let e=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this._backdropRef?.dispose(),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),this._host?.remove(),this._afterNextRenderRef?.destroy(),this._previousHostParent=this._pane=this._host=this._backdropRef=null,e&&this._detachments.next(),this._detachments.complete(),this._afterRenderRef.destroy(),this._renders.complete()}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(e){e!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=e,this.hasAttached()&&(e.attach(this),this.updatePosition()))}updateSize(e){this._config=w(w({},this._config),e),this._updateElementSize()}setDirection(e){this._config=te(w({},this._config),{direction:e}),this._updateElementDirection()}addPanelClass(e){this._pane&&this._toggleClasses(this._pane,e,!0)}removePanelClass(e){this._pane&&this._toggleClasses(this._pane,e,!1)}getDirection(){let e=this._config.direction;return e?typeof e=="string"?e:e.value:"ltr"}updateScrollStrategy(e){e!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=e,this.hasAttached()&&(e.attach(this),e.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;let e=this._pane.style;e.width=qt(this._config.width),e.height=qt(this._config.height),e.minWidth=qt(this._config.minWidth),e.minHeight=qt(this._config.minHeight),e.maxWidth=qt(this._config.maxWidth),e.maxHeight=qt(this._config.maxHeight)}_togglePointerEvents(e){this._pane.style.pointerEvents=e?"":"none"}_attachBackdrop(){let e="cdk-overlay-backdrop-showing";this._backdropRef?.dispose(),this._backdropRef=new kE(this._document,this._renderer,this._ngZone,t=>{this._backdropClick.next(t)}),this._animationsDisabled&&this._backdropRef.element.classList.add("cdk-overlay-backdrop-noop-animation"),this._config.backdropClass&&this._toggleClasses(this._backdropRef.element,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropRef.element,this._host),!this._animationsDisabled&&typeof requestAnimationFrame<"u"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>this._backdropRef?.element.classList.add(e))}):this._backdropRef.element.classList.add(e)}_updateStackingOrder(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){this._animationsDisabled?(this._backdropRef?.dispose(),this._backdropRef=null):this._backdropRef?.detach()}_toggleClasses(e,t,n){let r=hE(t||[]).filter(i=>!!i);r.length&&(n?e.classList.add(...r):e.classList.remove(...r))}_detachContentWhenEmpty(){this._ngZone.runOutsideAngular(()=>{let e=this._renders.pipe(hr(io(this._attachments,this._detachments))).subscribe(()=>{(!this._pane||!this._host||this._pane.children.length===0)&&(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._host.remove()),e.unsubscribe())})})}_disposeScrollStrategy(){let e=this._scrollStrategy;e?.disable(),e?.detach?.()}},Jx="cdk-overlay-connected-position-bounding-box",TU=/([A-Za-z%]+)$/,LE=class{_viewportRuler;_document;_platform;_overlayContainer;_overlayRef;_isInitialRender;_lastBoundingBoxSize={width:0,height:0};_isPushed=!1;_canPush=!0;_growAfterOpen=!1;_hasFlexibleDimensions=!0;_positionLocked=!1;_originRect;_overlayRect;_viewportRect;_containerRect;_viewportMargin=0;_scrollables=[];_preferredPositions=[];_origin;_pane;_isDisposed;_boundingBox;_lastPosition;_lastScrollVisibility;_positionChanges=new J;_resizeSubscription=ot.EMPTY;_offsetX=0;_offsetY=0;_transformOriginSelector;_appliedPanelClasses=[];_previousPushAmount;positionChanges=this._positionChanges;get positions(){return this._preferredPositions}constructor(e,t,n,r,i){this._viewportRuler=t,this._document=n,this._platform=r,this._overlayContainer=i,this.setOrigin(e)}attach(e){this._overlayRef&&this._overlayRef,this._validatePositions(),e.hostElement.classList.add(Jx),this._overlayRef=e,this._boundingBox=e.hostElement,this._pane=e.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition){this.reapplyLastPosition();return}this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let e=this._originRect,t=this._overlayRect,n=this._viewportRect,r=this._containerRect,i=[],s;for(let o of this._preferredPositions){let a=this._getOriginPoint(e,r,o),l=this._getOverlayPoint(a,t,o),c=this._getOverlayFit(l,t,n,o);if(c.isCompletelyWithinViewport){this._isPushed=!1,this._applyPosition(o,a);return}if(this._canFitWithFlexibleDimensions(c,l,n)){i.push({position:o,origin:a,overlayRect:t,boundingBoxRect:this._calculateBoundingBoxRect(a,o)});continue}(!s||s.overlayFit.visibleArea<c.visibleArea)&&(s={overlayFit:c,overlayPoint:l,originPoint:a,position:o,overlayRect:t})}if(i.length){let o=null,a=-1;for(let l of i){let c=l.boundingBoxRect.width*l.boundingBoxRect.height*(l.position.weight||1);c>a&&(a=c,o=l)}this._isPushed=!1,this._applyPosition(o.position,o.origin);return}if(this._canPush){this._isPushed=!0,this._applyPosition(s.position,s.originPoint);return}this._applyPosition(s.position,s.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&Hs(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(Jx),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(this._isDisposed||!this._platform.isBrowser)return;let e=this._lastPosition;if(e){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let t=this._getOriginPoint(this._originRect,this._containerRect,e);this._applyPosition(e,t)}else this.apply()}withScrollableContainers(e){return this._scrollables=e,this}withPositions(e){return this._preferredPositions=e,e.indexOf(this._lastPosition)===-1&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(e){return this._viewportMargin=e,this}withFlexibleDimensions(e=!0){return this._hasFlexibleDimensions=e,this}withGrowAfterOpen(e=!0){return this._growAfterOpen=e,this}withPush(e=!0){return this._canPush=e,this}withLockedPosition(e=!0){return this._positionLocked=e,this}setOrigin(e){return this._origin=e,this}withDefaultOffsetX(e){return this._offsetX=e,this}withDefaultOffsetY(e){return this._offsetY=e,this}withTransformOriginOn(e){return this._transformOriginSelector=e,this}_getOriginPoint(e,t,n){let r;if(n.originX=="center")r=e.left+e.width/2;else{let s=this._isRtl()?e.right:e.left,o=this._isRtl()?e.left:e.right;r=n.originX=="start"?s:o}t.left<0&&(r-=t.left);let i;return n.originY=="center"?i=e.top+e.height/2:i=n.originY=="top"?e.top:e.bottom,t.top<0&&(i-=t.top),{x:r,y:i}}_getOverlayPoint(e,t,n){let r;n.overlayX=="center"?r=-t.width/2:n.overlayX==="start"?r=this._isRtl()?-t.width:0:r=this._isRtl()?0:-t.width;let i;return n.overlayY=="center"?i=-t.height/2:i=n.overlayY=="top"?0:-t.height,{x:e.x+r,y:e.y+i}}_getOverlayFit(e,t,n,r){let i=eR(t),{x:s,y:o}=e,a=this._getOffset(r,"x"),l=this._getOffset(r,"y");a&&(s+=a),l&&(o+=l);let c=0-s,h=s+i.width-n.width,d=0-o,f=o+i.height-n.height,g=this._subtractOverflows(i.width,c,h),m=this._subtractOverflows(i.height,d,f),b=g*m;return{visibleArea:b,isCompletelyWithinViewport:i.width*i.height===b,fitsInViewportVertically:m===i.height,fitsInViewportHorizontally:g==i.width}}_canFitWithFlexibleDimensions(e,t,n){if(this._hasFlexibleDimensions){let r=n.bottom-t.y,i=n.right-t.x,s=Qx(this._overlayRef.getConfig().minHeight),o=Qx(this._overlayRef.getConfig().minWidth),a=e.fitsInViewportVertically||s!=null&&s<=r,l=e.fitsInViewportHorizontally||o!=null&&o<=i;return a&&l}return!1}_pushOverlayOnScreen(e,t,n){if(this._previousPushAmount&&this._positionLocked)return{x:e.x+this._previousPushAmount.x,y:e.y+this._previousPushAmount.y};let r=eR(t),i=this._viewportRect,s=Math.max(e.x+r.width-i.width,0),o=Math.max(e.y+r.height-i.height,0),a=Math.max(i.top-n.top-e.y,0),l=Math.max(i.left-n.left-e.x,0),c=0,h=0;return r.width<=i.width?c=l||-s:c=e.x<this._viewportMargin?i.left-n.left-e.x:0,r.height<=i.height?h=a||-o:h=e.y<this._viewportMargin?i.top-n.top-e.y:0,this._previousPushAmount={x:c,y:h},{x:e.x+c,y:e.y+h}}_applyPosition(e,t){if(this._setTransformOrigin(e),this._setOverlayElementStyles(t,e),this._setBoundingBoxStyles(t,e),e.panelClass&&this._addPanelClasses(e.panelClass),this._positionChanges.observers.length){let n=this._getScrollVisibility();if(e!==this._lastPosition||!this._lastScrollVisibility||!xU(this._lastScrollVisibility,n)){let r=new PE(e,n);this._positionChanges.next(r)}this._lastScrollVisibility=n}this._lastPosition=e,this._isInitialRender=!1}_setTransformOrigin(e){if(!this._transformOriginSelector)return;let t=this._boundingBox.querySelectorAll(this._transformOriginSelector),n,r=e.overlayY;e.overlayX==="center"?n="center":this._isRtl()?n=e.overlayX==="start"?"right":"left":n=e.overlayX==="start"?"left":"right";for(let i=0;i<t.length;i++)t[i].style.transformOrigin=`${n} ${r}`}_calculateBoundingBoxRect(e,t){let n=this._viewportRect,r=this._isRtl(),i,s,o;if(t.overlayY==="top")s=e.y,i=n.height-s+this._viewportMargin;else if(t.overlayY==="bottom")o=n.height-e.y+this._viewportMargin*2,i=n.height-o+this._viewportMargin;else{let f=Math.min(n.bottom-e.y+n.top,e.y),g=this._lastBoundingBoxSize.height;i=f*2,s=e.y-f,i>g&&!this._isInitialRender&&!this._growAfterOpen&&(s=e.y-g/2)}let a=t.overlayX==="start"&&!r||t.overlayX==="end"&&r,l=t.overlayX==="end"&&!r||t.overlayX==="start"&&r,c,h,d;if(l)d=n.width-e.x+this._viewportMargin*2,c=e.x-this._viewportMargin;else if(a)h=e.x,c=n.right-e.x;else{let f=Math.min(n.right-e.x+n.left,e.x),g=this._lastBoundingBoxSize.width;c=f*2,h=e.x-f,c>g&&!this._isInitialRender&&!this._growAfterOpen&&(h=e.x-g/2)}return{top:s,left:h,bottom:o,right:d,width:c,height:i}}_setBoundingBoxStyles(e,t){let n=this._calculateBoundingBoxRect(e,t);!this._isInitialRender&&!this._growAfterOpen&&(n.height=Math.min(n.height,this._lastBoundingBoxSize.height),n.width=Math.min(n.width,this._lastBoundingBoxSize.width));let r={};if(this._hasExactPosition())r.top=r.left="0",r.bottom=r.right=r.maxHeight=r.maxWidth="",r.width=r.height="100%";else{let i=this._overlayRef.getConfig().maxHeight,s=this._overlayRef.getConfig().maxWidth;r.height=qt(n.height),r.top=qt(n.top),r.bottom=qt(n.bottom),r.width=qt(n.width),r.left=qt(n.left),r.right=qt(n.right),t.overlayX==="center"?r.alignItems="center":r.alignItems=t.overlayX==="end"?"flex-end":"flex-start",t.overlayY==="center"?r.justifyContent="center":r.justifyContent=t.overlayY==="bottom"?"flex-end":"flex-start",i&&(r.maxHeight=qt(i)),s&&(r.maxWidth=qt(s))}this._lastBoundingBoxSize=n,Hs(this._boundingBox.style,r)}_resetBoundingBoxStyles(){Hs(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){Hs(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(e,t){let n={},r=this._hasExactPosition(),i=this._hasFlexibleDimensions,s=this._overlayRef.getConfig();if(r){let c=this._viewportRuler.getViewportScrollPosition();Hs(n,this._getExactOverlayY(t,e,c)),Hs(n,this._getExactOverlayX(t,e,c))}else n.position="static";let o="",a=this._getOffset(t,"x"),l=this._getOffset(t,"y");a&&(o+=`translateX(${a}px) `),l&&(o+=`translateY(${l}px)`),n.transform=o.trim(),s.maxHeight&&(r?n.maxHeight=qt(s.maxHeight):i&&(n.maxHeight="")),s.maxWidth&&(r?n.maxWidth=qt(s.maxWidth):i&&(n.maxWidth="")),Hs(this._pane.style,n)}_getExactOverlayY(e,t,n){let r={top:"",bottom:""},i=this._getOverlayPoint(t,this._overlayRect,e);if(this._isPushed&&(i=this._pushOverlayOnScreen(i,this._overlayRect,n)),e.overlayY==="bottom"){let s=this._document.documentElement.clientHeight;r.bottom=`${s-(i.y+this._overlayRect.height)}px`}else r.top=qt(i.y);return r}_getExactOverlayX(e,t,n){let r={left:"",right:""},i=this._getOverlayPoint(t,this._overlayRect,e);this._isPushed&&(i=this._pushOverlayOnScreen(i,this._overlayRect,n));let s;if(this._isRtl()?s=e.overlayX==="end"?"left":"right":s=e.overlayX==="end"?"right":"left",s==="right"){let o=this._document.documentElement.clientWidth;r.right=`${o-(i.x+this._overlayRect.width)}px`}else r.left=qt(i.x);return r}_getScrollVisibility(){let e=this._getOriginRect(),t=this._pane.getBoundingClientRect(),n=this._scrollables.map(r=>r.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:Zx(e,n),isOriginOutsideView:ME(e,n),isOverlayClipped:Zx(t,n),isOverlayOutsideView:ME(t,n)}}_subtractOverflows(e,...t){return t.reduce((n,r)=>n-Math.max(r,0),e)}_getNarrowedViewportRect(){let e=this._document.documentElement.clientWidth,t=this._document.documentElement.clientHeight,n=this._viewportRuler.getViewportScrollPosition();return{top:n.top+this._viewportMargin,left:n.left+this._viewportMargin,right:n.left+e-this._viewportMargin,bottom:n.top+t-this._viewportMargin,width:e-2*this._viewportMargin,height:t-2*this._viewportMargin}}_isRtl(){return this._overlayRef.getDirection()==="rtl"}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(e,t){return t==="x"?e.offsetX==null?this._offsetX:e.offsetX:e.offsetY==null?this._offsetY:e.offsetY}_validatePositions(){}_addPanelClasses(e){this._pane&&hE(e).forEach(t=>{t!==""&&this._appliedPanelClasses.indexOf(t)===-1&&(this._appliedPanelClasses.push(t),this._pane.classList.add(t))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(e=>{this._pane.classList.remove(e)}),this._appliedPanelClasses=[])}_getOriginRect(){let e=this._origin;if(e instanceof Ct)return e.nativeElement.getBoundingClientRect();if(e instanceof Element)return e.getBoundingClientRect();let t=e.width||0,n=e.height||0;return{top:e.y,bottom:e.y+n,left:e.x,right:e.x+t,height:n,width:t}}};function Hs(e,t){for(let n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function Qx(e){if(typeof e!="number"&&e!=null){let[t,n]=e.split(TU);return!n||n==="px"?parseFloat(t):null}return e||null}function eR(e){return{top:Math.floor(e.top),right:Math.floor(e.right),bottom:Math.floor(e.bottom),left:Math.floor(e.left),width:Math.floor(e.width),height:Math.floor(e.height)}}function xU(e,t){return e===t?!0:e.isOriginClipped===t.isOriginClipped&&e.isOriginOutsideView===t.isOriginOutsideView&&e.isOverlayClipped===t.isOverlayClipped&&e.isOverlayOutsideView===t.isOverlayOutsideView}var tR="cdk-global-overlay-wrapper",FE=class{_overlayRef;_cssPosition="static";_topOffset="";_bottomOffset="";_alignItems="";_xPosition="";_xOffset="";_width="";_height="";_isDisposed=!1;attach(e){let t=e.getConfig();this._overlayRef=e,this._width&&!t.width&&e.updateSize({width:this._width}),this._height&&!t.height&&e.updateSize({height:this._height}),e.hostElement.classList.add(tR),this._isDisposed=!1}top(e=""){return this._bottomOffset="",this._topOffset=e,this._alignItems="flex-start",this}left(e=""){return this._xOffset=e,this._xPosition="left",this}bottom(e=""){return this._topOffset="",this._bottomOffset=e,this._alignItems="flex-end",this}right(e=""){return this._xOffset=e,this._xPosition="right",this}start(e=""){return this._xOffset=e,this._xPosition="start",this}end(e=""){return this._xOffset=e,this._xPosition="end",this}width(e=""){return this._overlayRef?this._overlayRef.updateSize({width:e}):this._width=e,this}height(e=""){return this._overlayRef?this._overlayRef.updateSize({height:e}):this._height=e,this}centerHorizontally(e=""){return this.left(e),this._xPosition="center",this}centerVertically(e=""){return this.top(e),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;let e=this._overlayRef.overlayElement.style,t=this._overlayRef.hostElement.style,n=this._overlayRef.getConfig(),{width:r,height:i,maxWidth:s,maxHeight:o}=n,a=(r==="100%"||r==="100vw")&&(!s||s==="100%"||s==="100vw"),l=(i==="100%"||i==="100vh")&&(!o||o==="100%"||o==="100vh"),c=this._xPosition,h=this._xOffset,d=this._overlayRef.getConfig().direction==="rtl",f="",g="",m="";a?m="flex-start":c==="center"?(m="center",d?g=h:f=h):d?c==="left"||c==="end"?(m="flex-end",f=h):(c==="right"||c==="start")&&(m="flex-start",g=h):c==="left"||c==="start"?(m="flex-start",f=h):(c==="right"||c==="end")&&(m="flex-end",g=h),e.position=this._cssPosition,e.marginLeft=a?"0":f,e.marginTop=l?"0":this._topOffset,e.marginBottom=this._bottomOffset,e.marginRight=a?"0":g,t.justifyContent=m,t.alignItems=l?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;let e=this._overlayRef.overlayElement.style,t=this._overlayRef.hostElement,n=t.style;t.classList.remove(tR),n.justifyContent=n.alignItems=e.marginTop=e.marginBottom=e.marginLeft=e.marginRight=e.position="",this._overlayRef=null,this._isDisposed=!0}},RU=(()=>{class e{_viewportRuler=O(Ql);_document=O(Qe);_platform=O(Jn);_overlayContainer=O(xh);constructor(){}global(){return new FE}flexibleConnectedTo(n){return new LE(n,this._viewportRuler,this._document,this._platform,this._overlayContainer)}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),BE=(()=>{class e{scrollStrategies=O(SU);_overlayContainer=O(xh);_positionBuilder=O(RU);_keyboardDispatcher=O(DU);_injector=O(ht);_ngZone=O(Le);_document=O(Qe);_directionality=O(Vs);_location=O(Oy);_outsideClickDispatcher=O(IU);_animationsModuleType=O($C,{optional:!0});_idGenerator=O(vh);_renderer=O(hn).createRenderer(null,null);_appRef;_styleLoader=O(Bs);constructor(){}create(n){this._styleLoader.load(rR);let r=this._createHostElement(),i=this._createPaneElement(r),s=this._createPortalOutlet(i),o=new ou(n);return o.direction=o.direction||this._directionality.value,new Sc(s,r,i,o,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher,this._animationsModuleType==="NoopAnimations",this._injector.get(Gn),this._renderer)}position(){return this._positionBuilder}_createPaneElement(n){let r=this._document.createElement("div");return r.id=this._idGenerator.getId("cdk-overlay-"),r.classList.add("cdk-overlay-pane"),n.appendChild(r),r}_createHostElement(){let n=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(n),n}_createPortalOutlet(n){return this._appRef||(this._appRef=this._injector.get(yr)),new Sh(n,null,this._appRef,this._injector,this._document)}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ne({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function NU(e,t){}var Dc=class{viewContainerRef;injector;id;role="dialog";panelClass="";hasBackdrop=!0;backdropClass="";disableClose=!1;width="";height="";minWidth;minHeight;maxWidth;maxHeight;positionStrategy;data=null;direction;ariaDescribedBy=null;ariaLabelledBy=null;ariaLabel=null;ariaModal=!1;autoFocus="first-tabbable";restoreFocus=!0;scrollStrategy;closeOnNavigation=!0;closeOnDestroy=!0;closeOnOverlayDetachments=!0;componentFactoryResolver;providers;container;templateContext},AU=(()=>{class e extends Cc{_elementRef=O(Ct);_focusTrapFactory=O(qx);_config;_interactivityChecker=O(xE);_ngZone=O(Le);_overlayRef=O(Sc);_focusMonitor=O($x);_renderer=O(ya);_platform=O(Jn);_document=O(Qe,{optional:!0});_portalOutlet;_focusTrap=null;_elementFocusedBeforeDialogWasOpened=null;_closeInteractionType=null;_ariaLabelledByQueue=[];_changeDetectorRef=O(rr);_injector=O(ht);_isDestroyed=!1;constructor(){super(),this._config=O(Dc,{optional:!0})||new Dc,this._config.ariaLabelledBy&&this._ariaLabelledByQueue.push(this._config.ariaLabelledBy)}_addAriaLabelledBy(n){this._ariaLabelledByQueue.push(n),this._changeDetectorRef.markForCheck()}_removeAriaLabelledBy(n){let r=this._ariaLabelledByQueue.indexOf(n);r>-1&&(this._ariaLabelledByQueue.splice(r,1),this._changeDetectorRef.markForCheck())}_contentAttached(){this._initializeFocusTrap(),this._handleBackdropClicks(),this._captureInitialFocus()}_captureInitialFocus(){this._trapFocus()}ngOnDestroy(){this._isDestroyed=!0,this._restoreFocus()}attachComponentPortal(n){this._portalOutlet.hasAttached();let r=this._portalOutlet.attachComponentPortal(n);return this._contentAttached(),r}attachTemplatePortal(n){this._portalOutlet.hasAttached();let r=this._portalOutlet.attachTemplatePortal(n);return this._contentAttached(),r}attachDomPortal=n=>{this._portalOutlet.hasAttached();let r=this._portalOutlet.attachDomPortal(n);return this._contentAttached(),r};_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(n,r){this._interactivityChecker.isFocusable(n)||(n.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{let i=()=>{s(),o(),n.removeAttribute("tabindex")},s=this._renderer.listen(n,"blur",i),o=this._renderer.listen(n,"mousedown",i)})),n.focus(r)}_focusByCssSelector(n,r){let i=this._elementRef.nativeElement.querySelector(n);i&&this._forceFocus(i,r)}_trapFocus(n){this._isDestroyed||Jr(()=>{let r=this._elementRef.nativeElement;switch(this._config.autoFocus){case!1:case"dialog":this._containsFocus()||r.focus(n);break;case!0:case"first-tabbable":this._focusTrap?.focusInitialElement(n)||this._focusDialogContainer(n);break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]',n);break;default:this._focusByCssSelector(this._config.autoFocus,n);break}},{injector:this._injector})}_restoreFocus(){let n=this._config.restoreFocus,r=null;if(typeof n=="string"?r=this._document.querySelector(n):typeof n=="boolean"?r=n?this._elementFocusedBeforeDialogWasOpened:null:n&&(r=n),this._config.restoreFocus&&r&&typeof r.focus=="function"){let i=hh(),s=this._elementRef.nativeElement;(!i||i===this._document.body||i===s||s.contains(i))&&(this._focusMonitor?(this._focusMonitor.focusVia(r,this._closeInteractionType),this._closeInteractionType=null):r.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(n){this._elementRef.nativeElement.focus&&this._elementRef.nativeElement.focus(n)}_containsFocus(){let n=this._elementRef.nativeElement,r=hh();return n===r||n.contains(r)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=hh()))}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=yt({type:e,selectors:[["cdk-dialog-container"]],viewQuery:function(n,r){if(n&1&&Ea(DE,7),n&2){let i;wa(i=ba())&&(r._portalOutlet=i.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(n,r){n&2&&va("id",r._config.id||null)("role",r._config.role)("aria-modal",r._config.ariaModal)("aria-labelledby",r._config.ariaLabel?null:r._ariaLabelledByQueue[0])("aria-label",r._config.ariaLabel)("aria-describedby",r._config.ariaDescribedBy||null)},features:[ho],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(n,r){n&1&&xt(0,NU,0,0,"ng-template",0)},dependencies:[DE],styles:[`.cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}