>Tl)]|=i}function Do(e,t){let n=bl(e,t);if(n!==-1)return n;let r=t[y];r.firstCreatePass&&(e.injectorIndex=t.length,Ms(r.data,e),Ms(t,null),Ms(r.blueprint,null));let o=la(e,t),i=e.injectorIndex;if(Cl(o)){let s=mo(o),a=yo(o,t),c=a[y].data;for(let u=0;u<8;u++)t[i+u]=a[s+u]|c[s+u]}return t[i+8]=o,i}function Ms(e,t){e.push(0,0,0,0,0,0,0,0,t)}function bl(e,t){return e.injectorIndex===-1||e.parent&&e.parent.injectorIndex===e.injectorIndex||t[e.injectorIndex+8]===null?-1:e.injectorIndex}function la(e,t){if(e.parent&&e.parent.injectorIndex!==-1)return e.parent.injectorIndex;let n=0,r=null,o=t;for(;o!==null;){if(r=Al(o),r===null)return vn;if(n++,o=o[et],r.injectorIndex!==-1)return r.injectorIndex|n<<16}return vn}function js(e,t,n){sh(e,t,n)}function _l(e,t,n){if(n&8||e!==void 0)return e;$r(t,"NodeInjector")}function Sl(e,t,n,r){if(n&8&&r===void 0&&(r=null),(n&3)===0){let o=e[Ze],i=se(void 0);try{return o?o.get(t,r,n&8):Qi(t,r,n&8)}finally{se(i)}}return _l(r,t,n)}function Ml(e,t,n,r=0,o){if(e!==null){if(t[v]&2048&&!(r&2)){let s=dh(e,t,n,r,je);if(s!==je)return s}let i=Nl(e,t,n,r,je);if(i!==je)return i}return Sl(t,n,r,o)}function Nl(e,t,n,r,o){let i=uh(n);if(typeof i=="function"){if(!Ds(t,e,r))return r&1?_l(o,n,r):Sl(t,n,r,o);try{let s;if(s=i(r),s==null&&!(r&8))$r(n);else return s}finally{vs()}}else if(typeof i=="number"){let s=null,a=bl(e,t),c=vn,u=r&1?t[ae][re]:null;for((a===-1||r&4)&&(c=a===-1?la(e,t):t[a+8],c===vn||!Uu(r,!1)?a=-1:(s=t[y],a=mo(c),t=yo(c,t)));a!==-1;){let l=t[y];if($u(i,a,l.data)){let d=ah(a,t,n,s,r,u);if(d!==je)return d}c=t[a+8],c!==vn&&Uu(r,t[y].data[a+8]===u)&&$u(i,a,t)?(s=l,a=mo(c),t=yo(c,t)):a=-1}}return o}function ah(e,t,n,r,o,i){let s=t[y],a=s.data[e+8],c=r==null?nt(a)&&Ps:r!=s&&(a.type&3)!==0,u=o&1&&i===a,l=ch(a,s,n,c,u);return l!==null?vo(t,s,l,a,o):je}function ch(e,t,n,r,o){let i=e.providerIndexes,s=t.data,a=i&1048575,c=e.directiveStart,u=e.directiveEnd,l=i>>20,d=r?a:a+l,p=o?a+l:u;for(let f=d;f=c&&h.type===n)return f}if(o){let f=s[c];if(f&&rt(f)&&f.type===n)return c}return null}function vo(e,t,n,r,o){let i=e[n],s=t.data;if(i instanceof Ft){let a=i;if(a.resolving)throw Yi("");let c=Hu(a.canSeeViewProviders);a.resolving=!0;let u=s[n].type||s[n],l,d=a.injectImpl?se(a.injectImpl):null,p=Ds(e,r,0);try{i=e[n]=a.factory(void 0,o,s,e,r),t.firstCreatePass&&n>=r.directiveStart&&Qp(n,s[n],t)}finally{d!==null&&se(d),Hu(c),a.resolving=!1,vs()}}return i}function uh(e){if(typeof e=="string")return e.charCodeAt(0)||0;let t=Object.hasOwn(e,wt)?e[wt]:void 0;return typeof t=="number"?t>=0?t&wl:lh:t}function $u(e,t,n){let r=1<>Tl)]&r)}function Uu(e,t){return!(e&2)&&!(e&1&&t)}var at=class{_tNode;_lView;constructor(t,n){this._tNode=t,this._lView=n}get(t,n,r){return Ml(this._tNode,this._lView,t,Et(r),n)}};function lh(){return new at(oe(),b())}function dh(e,t,n,r,o){let i=e,s=t;for(;i!==null&&s!==null&&s[v]&2048&&!pn(s);){let a=Nl(i,s,n,r|2,je);if(a!==je)return a;r&=-5;let c=i.parent;if(!c){let u=s[os];if(u){let l=u.get(n,je,r);if(l!==je)return l}c=Al(s),s=s[et]}i=c}return o}function Al(e){let t=e[y],n=t.type;return n===2?t.declTNode:n===1?e[re]:null}function Vt(e){return{token:e.token,providedIn:e.autoProvided===!1?null:"root",factory:e.factory,value:void 0}}function fh(){return Ao(oe(),b())}function Ao(e,t){return new rr(Se(e,t))}var rr=(()=>{class e{nativeElement;constructor(n){this.nativeElement=n}static __NG_ELEMENT_ID__=fh}return e})();function xl(e){return(e.flags&128)===128}var da=(function(e){return e[e.OnPush=0]="OnPush",e[e.Eager=1]="Eager",e[e.Default=1]="Default",e})(da||{}),Rl=new Map,ph=0;function hh(){return ph++}function gh(e){Rl.set(e[Vn],e)}function Vs(e){Rl.delete(e[Vn])}var Gu="__ngContext__";function En(e,t){tt(t)?(e[Gu]=t[Vn],gh(t)):e[Gu]=t}function Ol(e){return Ll(e[ln])}function kl(e){return Ll(e[he])}function Ll(e){for(;e!==null&&!ge(e);)e=e[he];return e}var Bs;function fa(e){Bs=e}function Fl(){if(Bs!==void 0)return Bs;if(typeof document<"u")return document;throw new E(210,!1)}var Pl="r";var jl="di";var Vl=!1,Bl=new T("",{factory:()=>Vl});var zu=new WeakMap;function mh(e,t){if(e==null||typeof e!="object")return;let n=zu.get(e);n||(n=new WeakSet,zu.set(e,n)),n.add(t)}var yh=(e,t,n,r)=>{};function Dh(e,t,n,r){yh(e,t,n,r)}function pa(e){return(e.flags&32)===32}var vh=()=>null;function Hl(e,t,n=!1){return vh(e,t,n)}function $l(e,t){let n=e.contentQueries;if(n!==null){let r=g(null);try{for(let o=0;o|^->||--!>|)/g,wh="\u200B$1\u200B";function Th(e){return e.replace(Ih,t=>t.replace(Ch,wh))}function bh(e,t){return e.createText(t)}function _h(e,t,n){e.setValue(t,n)}function Sh(e,t){return e.createComment(Th(t))}function Wl(e,t,n){return e.createElement(t,n)}function Lt(e,t,n,r,o){e.insertBefore(t,n,r,o)}function ql(e,t,n){e.appendChild(t,n)}function Wu(e,t,n,r,o){r!==null?Lt(e,t,n,r,o):ql(e,t,n)}function Zl(e,t,n,r){e.removeChild(null,t,n,r)}function Mh(e,t,n){e.setAttribute(t,"style",n)}function Nh(e,t,n){n===""?e.removeAttribute(t,"class"):e.setAttribute(t,"class",n)}function Yl(e,t,n){let{mergedAttrs:r,classes:o,styles:i}=n;r!==null&&eh(e,t,r),o!==null&&Nh(e,t,o),i!==null&&Mh(e,t,i)}function xo(e){let t=Ah();return t?t.sanitize(Zr.URL,e)||"":Ul(e,"URL")?Yn(e):zl(Hr(e))}function Ah(){let e=b();return e&&e[_e].sanitizer}function xh(e,t,n){let r=e.length;for(;;){let o=e.indexOf(t,n);if(o===-1)return o;if(o===0||e.charCodeAt(o-1)<=32){let i=t.length;if(o+i===r||e.charCodeAt(o+i)<=32)return o}n=o+1}}var Ql="ng-template";function Rh(e,t,n,r){let o=0;if(r){for(;o-1){let i;for(;++oi?d="":d=o[l+1].toLowerCase(),r&2&&u!==d){if(Me(r))return!1;s=!0}}}}return Me(r)||s}function Me(e){return(e&1)===0}function Lh(e,t,n,r){if(t===null)return-1;let o=0;if(r||!n){let i=!1;for(;o-1)for(n++;n0?'="'+a+'"':"")+"]"}else r&8?o+="."+s:r&4&&(o+=" "+s);else o!==""&&!Me(s)&&(t+=qu(i,o),o=""),r=s,i=i||!Me(r);n++}return o!==""&&(t+=qu(i,o)),t}function Bh(e){return e.map(Vh).join(",")}function Hh(e){let t=[],n=[],r=1,o=2;for(;r=0;a--){let{el:c,declarationView:u}=r[a],l=c.parentNode;c===t?(r.splice(a,1),yn.add(c),c.dispatchEvent(new CustomEvent("animationend",{detail:{cancel:!0}}))):i&&c===i?(r.splice(a,1),c.dispatchEvent(new CustomEvent("animationend",{detail:{cancel:!0}})),c.parentNode?.removeChild(c)):l&&o&&l!==o&&(s===null||u===null||s===u)&&(r.splice(a,1),c.dispatchEvent(new CustomEvent("animationend",{detail:{cancel:!0}})),c.parentNode?.removeChild(c))}}function Gh(e,t,n){let r=Kl(n),o=$s.get(e);o?o.some(i=>i.el===t)||o.push({el:t,declarationView:r}):$s.set(e,[{el:t,declarationView:r}])}var Ro=(function(e){return e[e.CHANGE_DETECTION=0]="CHANGE_DETECTION",e[e.AFTER_NEXT_RENDER=1]="AFTER_NEXT_RENDER",e})(Ro||{}),Ye=new T(""),Zu=new Set;function Bt(e){Zu.has(e)||(Zu.add(e),performance?.mark?.("mark_feature_usage",{detail:{feature:e}}))}var Da=(()=>{class e{impl=null;execute(){this.impl?.execute()}static \u0275prov=Z({token:e,providedIn:"root",factory:()=>new e})}return e})(),va=[0,1,2,3],Jl=(()=>{class e{ngZone=m(V);scheduler=m(qe);errorHandler=m(pe,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){m(Ye,{optional:!0})}execute(){let n=this.sequences.size>0;n&&x(_.AfterRenderHooksStart),this.executing=!0;for(let r of va)for(let o of this.sequences)if(!(o.erroredOrDestroyed||!o.hooks[r]))try{o.pipelinedValue=this.ngZone.runOutsideAngular(()=>this.maybeTrace(()=>{let i=o.hooks[r];return i(o.pipelinedValue)},o.snapshot))}catch(i){o.erroredOrDestroyed=!0,this.errorHandler?.handleError(i)}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&&x(_.AfterRenderHooksEnd)}register(n){let{view:r}=n;r!==void 0?((r[At]??=[]).push(n),hn(r),r[v]|=8192):this.addSequence(n)}addSequence(n){this.executing?this.deferredRegistrations.add(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(Ro.AFTER_NEXT_RENDER,n):n()}static \u0275prov=Z({token:e,providedIn:"root",factory:()=>new e})}return e})(),Io=class{impl;hooks;view;once;snapshot;erroredOrDestroyed=!1;pipelinedValue=void 0;unregisterOnDestroy;constructor(t,n,r,o,i,s=null){this.impl=t,this.hooks=n,this.view=r,this.once=o,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 t=this.view?.[At];t&&(this.view[At]=t.filter(n=>n!==this))}};var Us=null,Xl=null;function Yu(e,t,n,r){Us?.maybeQueueEnterAnimation(e,t,n,r)}function Qu(e,t,n,r){Us===null?r(!1):Us.runLeaveAnimationsWithCallback(e,t,n,r)}function zh(e){Xl?.initViewDetachAnimations(e)}function Wh(e){Xl?.clearViewDetachAnimations(e)}function Dn(e,t,n,r,o,i,s,a){if(o!=null){let c,u=!1;ge(o)?c=o:tt(o)&&(u=!0,o=o[be]);let l=Q(o);e===0&&r!==null?(Yu(a,r,i,n),s==null?ql(t,r,l):Lt(t,r,l,s||null,!0)):e===1&&r!==null?(Lt(t,r,l,s||null,!0),Uh(i,l,a),yn.has(l)||Yu(a,r,i,n)):e===2?(a?.[nu]?.leave?.has(i.index)&&Gh(i,l,a),yn.delete(l),Qu(a,i,n,d=>{if(yn.has(l)){yn.delete(l);return}Zl(t,l,u,d)})):e===3&&(yn.delete(l),Qu(a,i,n,()=>{t.destroyNode(l)})),c!=null&&ig(t,e,n,c,i,r,s)}}function qh(e,t){ed(e,t),t[be]=null,t[re]=null}function Zh(e,t,n,r,o,i){r[be]=o,r[re]=t,ko(e,r,n,1,o,i)}function ed(e,t){t[_e].changeDetectionScheduler?.notify(9),ko(e,t,t[F],2,null,null)}function Yh(e){let t=e[ln];if(!t)return Ns(e[y],e);for(;t;){let n=null;if(tt(t))n=t[ln];else{let r=t[B];r&&(n=r)}if(!n){for(;t&&!t[he]&&t!==e;)tt(t)&&Ns(t[y],t),t=t[U];t===null&&(t=e),tt(t)&&Ns(t[y],t),n=t&&t[he]}t=n}}function Ea(e,t){let n=e[$n],r=n.indexOf(t);n.splice(r,1)}function Oo(e,t){if(Rt(t))return;let n=t[F];n.destroyNode&&ko(e,t,n,3,null,null),Yh(t)}function Ns(e,t){if(Rt(t))return;let n=g(null);try{t[v]&=-129,t[v]|=256,t[ce]&&Zt(t[ce]),Kh(e,t),Qh(e,t),t[y].type===1&&t[F].destroy();let r=t[St];if(r!==null&&ge(t[U])){r!==t[U]&&Ea(r,t);let o=t[Nt];o!==null&&o.detachView(e)}Vs(t)}finally{g(n)}}function Qh(e,t){let n=e.cleanup,r=t[un];if(n!==null)for(let s=0;s=0?r[a]():r[-a].unsubscribe(),s+=2}else{let a=r[n[s+1]];n[s].call(a)}r!==null&&(t[un]=null);let o=t[Ge];if(o!==null){t[Ge]=null;for(let s=0;sG&&od(e,t,G,!1);let a=s?_.TemplateUpdateStart:_.TemplateCreateStart;x(a,o,n),n(r,o)}finally{it(i);let a=s?_.TemplateUpdateEnd:_.TemplateCreateEnd;x(a,o,n)}}function Fo(e,t,n){mg(e,t,n),(n.flags&64)===64&&yg(e,t,n)}function or(e,t,n=Se){let r=t.localNames;if(r!==null){let o=t.index+1;for(let i=0;inull;function pg(e){return e==="class"?"className":e==="for"?"htmlFor":e==="formaction"?"formAction":e==="innerHtml"?"innerHTML":e==="readonly"?"readOnly":e==="tabindex"?"tabIndex":e}function hg(e,t,n,r,o,i){let s=t[y];if(Na(e,s,t,n,r)){nt(e)&&gg(t,e.index);return}e.type&3&&(n=pg(n)),sd(e,t,n,r,o,i)}function sd(e,t,n,r,o,i){if(e.type&3){let s=Se(e,t);r=i!=null?i(r,e.value||"",n):r,r=ad(n,s,r),o.setProperty(s,n,r)}else e.type&12}function ad(e,t,n){return e==="src"&&(t.tagName==="IMG"||t.tagName==="VIDEO")?n==null?"":Yn(n):n}function gg(e,t){let n=Pe(t,e);n[v]&16||(n[v]|=64)}function mg(e,t,n){let r=n.directiveStart,o=n.directiveEnd;nt(n)&&ug(t,n,e.data[r+n.componentOffset]),e.firstCreatePass||Do(n,t);let i=n.initialInputs;for(let s=r;s{hn(e.lView)},consumerOnSignalRead(){this.lView[ce]=this}});function Ag(e){let t=e[ce]??Object.create(xg);return t.lView=e,t}var xg=X(q({},Wt),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:e=>{let t=ze(e.lView);for(;t&&!dd(t[y]);)t=ze(t);t&&us(t)},consumerOnSignalRead(){this.lView[ce]=this}});function dd(e){return e.type!==2}function fd(e){if(e[dn]===null)return;let t=!0;for(;t;){let n=!1;for(let r of e[dn])if(r.dirty&&(n=!0,r.zone===null||Zone.current===r.zone?r.run():r.zone.run(()=>r.run()),e[dn]===null))return;t=n&&!!(e[v]&8192)}}var Rg=100;function pd(e,t=0){let r=e[_e].rendererFactory,o=!1;o||r.begin?.();try{Og(e,t)}finally{o||r.end?.()}}function Og(e,t){let n=gs();try{ms(!0),Ws(e,t);let r=0;for(;Un(e);){if(r===Rg)throw new E(103,!1);r++,Ws(e,1)}}finally{ms(n)}}function kg(e,t,n,r){if(Rt(t))return;let o=t[v],i=!1,s=!1;to(t);let a=!0,c=null,u=null;i||(dd(e)?(u=_g(t),c=gt(u)):wr()===null?(a=!1,u=Ag(t),c=gt(u)):t[ce]&&(Zt(t[ce]),t[ce]=null));try{cs(t),vu(e.bindingStartIndex),n!==null&&id(e,t,n,2,r);let l=(o&3)===3;if(!i)if(l){let f=e.preOrderCheckHooks;f!==null&&lo(t,f,null)}else{let f=e.preOrderHooks;f!==null&&fo(t,f,0,null),Ss(t,0)}if(s||Lg(t),fd(t),gd(t,0),e.contentQueries!==null&&$l(e,t),!i)if(l){let f=e.contentCheckHooks;f!==null&&lo(t,f)}else{let f=e.contentHooks;f!==null&&fo(t,f,1),Ss(t,1)}Pg(e,t);let d=e.components;d!==null&&yd(t,d,0);let p=e.viewQuery;if(p!==null&&Hs(2,p,r),!i)if(l){let f=e.viewCheckHooks;f!==null&&lo(t,f)}else{let f=e.viewHooks;f!==null&&fo(t,f,2),Ss(t,2)}if(e.firstUpdatePass===!0&&(e.firstUpdatePass=!1),t[qr]){for(let f of t[qr])f();t[qr]=null}i||(ud(t),t[v]&=-73)}catch(l){hd(t,l,i)}finally{u!==null&&(qt(u,c),a&&Mg(u)),no()}}function hd(e,t,n){let r=!1,o=t,i=e,s=g(null);try{for(;i!==null;){if(ge(i)){i=i[U];continue}let a=i[Bn];if(a)try{let c=e[ae][P],u=c?.constructor,l={declarationInstance:c,declarationType:u,caughtBy:a},d=g(null);try{a(ku(o),l)}finally{g(d)}r=!0;break}catch(c){o=c}i=i[U]}}finally{g(s)}if(!r)throw n||hn(e),o}function gd(e,t){for(let n=Ol(e);n!==null;n=kl(n))for(let r=B;r0&&(e[n-1][he]=r[he]);let i=Fn(e,B+t);qh(r[y],r);let s=i[Nt];s!==null&&s.detachView(i[y]),r[U]=null,r[he]=null,r[v]&=-129}return r}function jg(e,t,n,r){let o=B+r,i=n.length;r>0&&(n[o-1][he]=t),r-1&&(Jn(t,r),Fn(n,r))}this._attachedToViewContainer=!1}Oo(this._lView[y],this._lView)}onDestroy(t){Jr(this._lView,t)}markForCheck(){xa(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[v]&=-129}reattach(){Kr(this._lView),this._lView[v]|=128}detectChanges(){this._lView[v]|=1024,pd(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new E(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let t=pn(this._lView),n=this._lView[St];n!==null&&!t&&Ea(n,this._lView),ed(this._lView[y],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new E(902,!1);this._appRef=t;let n=pn(this._lView),r=this._lView[St];r!==null&&!n&&Id(r,this._lView),Kr(this._lView)}};var Ra=(()=>{class e{_declarationLView;_declarationTContainer;elementRef;static __NG_ELEMENT_ID__=Vg;constructor(n,r,o){this._declarationLView=n,this._declarationTContainer=r,this.elementRef=o}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(n,r){return this.createEmbeddedViewImpl(n,r)}createEmbeddedViewImpl(n,r,o){let i=Po(this._declarationLView,this._declarationTContainer,n,{embeddedViewInjector:r,dehydratedView:o});return new In(i)}}return e})();function Vg(){return Cd(oe(),b())}function Cd(e,t){return e.type&4?new Ra(t,e,Ao(e,t)):null}function ir(e,t,n,r,o){let i=e.data[t];if(i===null)i=Bg(e,t,n,r,o),Iu()&&(i.flags|=32);else if(i.type&64){i.type=n,i.value=r,i.attrs=o;let s=gu();i.injectorIndex=s===null?-1:s.injectorIndex}return gn(i,!0),i}function Bg(e,t,n,r,o){let i=ps(),s=hs(),a=s?i:i&&i.parent,c=e.data[t]=$g(e,a,n,t,r,o);return Hg(e,c,i,s),c}function Hg(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 $g(e,t,n,r,o,i){let s=t?t.injectorIndex:-1,a=0;return hu()&&(a|=128),{type:n,index:r,insertBeforeIndex:null,injectorIndex:s,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,controlDirectiveIndex:-1,customControlIndex:-1,propertyBindings:null,flags:a,providerIndexes:0,value:o,namespace:Es(),attrs:i,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}}function Ug(e){let t=e[is]??[],r=e[U][F],o=[];for(let i of t)i.data[jl]!==void 0?o.push(i):Gg(i,r);e[is]=o}function Gg(e,t){let n=0,r=e.firstChild;if(r){let o=e.data[Pl];for(;nnull,Wg=()=>null;function qs(e,t){return zg(e,t)}function wd(e,t,n){return Wg(e,t,n)}var Td=class{},Pt=class{};var bd=(()=>{class e{static \u0275prov=Z({token:e,providedIn:"root",factory:()=>null})}return e})();function _d(e){return e.debugInfo?.className||e.type.name||null}var po={},Co=class{injector;parentInjector;constructor(t,n){this.injector=t,this.parentInjector=n}get(t,n,r){let o=this.injector.get(t,po,r);return o!==po||n===po?o:this.parentInjector.get(t,n,r)}};function qg(e,t,n){return e[t]=n}function ct(e,t,n){if(n===Be)return!1;let r=e[t];return Object.is(r,n)?!1:(e[t]=n,!0)}function ho(e,t,n){return function r(o){let i=r.__ngNativeEl__;i!==void 0&&mh(o,i);let s=nt(e)?Pe(e.index,t):t;xa(s,5);let a=t[P],c=Ju(t,a,n,o),u=r.__ngNextListenerFn__;for(;u;)c=Ju(t,a,u,o)&&c,u=u.__ngNextListenerFn__;return c}}function Ju(e,t,n,r){let o=g(null);try{return x(_.OutputStart,t,n),n(r)!==!1}catch(i){return Cg(e,i),!1}finally{x(_.OutputEnd,t,n),g(o)}}function Sd(e,t,n,r,o,i,s,a){let c=fn(e),u=!1,l=null;if(!r&&c&&(l=Yg(t,n,i,e.index)),l!==null){let d=l.__ngLastListenerFn__||l;d.__ngNextListenerFn__=s,l.__ngLastListenerFn__=s,u=!0}else{let d=Se(e,n),p=r?r(d):d;Dh(n,p,i,a),r||(a.__ngNativeEl__=d);let f=o.listen(p,i,a);if(!Zg(i)){let h=r?L=>r(Q(L[e.index])):e.index;Md(h,t,n,i,a,f,!1)}}return u}function Zg(e){return e.startsWith("animation")||e.startsWith("transition")}function Yg(e,t,n,r){let o=e.cleanup;if(o!=null)for(let i=0;ic?a[c]:null}typeof s=="string"&&(i+=2)}return null}function Md(e,t,n,r,o,i,s){let a=t.firstCreatePass?du(t):null,c=lu(n),u=c.length;c.push(o,i),a&&a.push(r,e,u,(u+1)*(s?-1:1))}function Xu(e,t,n,r,o,i){let s=t[n],a=t[y],u=a.data[n].outputs[r],d=s[u].subscribe(i);Md(e.index,a,t,o,i,d,!0)}var Zs=Symbol("BINDING");var Ht=new T("");function wo(e,t,n){let r=n?e.styles:null,o=n?e.classes:null,i=0;if(t!==null)for(let s=0;s0&&(n.directiveToIndex=new Map);for(let p=0;p0;){let n=e[--t];if(typeof n=="number"&&n<0)return n}return 0}function rm(e,t,n){if(n){if(t.exportAs)for(let r=0;r{let[n,r,o]=e[t],i={propName:n,templateName:t,isSignal:(r&Lo.SignalBased)!==0};return o&&(i.transform=o),i})}function cm(e){return Object.keys(e).map(t=>({propName:e[t],templateName:t}))}function um(e,t,n){let r=t instanceof we?t:t?.injector;return r&&e.getStandaloneInjector!==null&&(r=e.getStandaloneInjector(r)||r),r?new Co(n,r):n}function lm(e){let t=e.get(Pt,null);if(t===null)throw new E(407,!1);let n=e.get(bd,null),r=e.get(qe,null),o=e.get(Ye,null,{optional:!0});return{rendererFactory:t,sanitizer:n,changeDetectionScheduler:r,ngReflect:!1,tracingService:o}}function dm(e,t,n){let r=Rd(e);return Wl(t,r,r==="svg"?ou:r==="math"?iu:n)}function fm(e){if((e&&"localName"in e&&typeof e.localName=="string"?e.localName:e?.tagName)?.toLowerCase()==="script")throw new E(905,!1)}function Rd(e){return(e.selectors[0][0]||"div").toLowerCase()}var Xn=class{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=am(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=cm(this.componentDef.outputs),this.cachedOutputs}constructor(t,n){this.componentDef=t,this.ngModule=n,this.componentType=t.type,this.selector=Bh(t.selectors),this.ngContentSelectors=t.ngContentSelectors??[],this.isBoundToModule=!!n}create(t,n,r,o,i,s,a,c){x(_.DynamicComponentStart);let u=g(null);try{let l=this.componentDef,d=um(l,o||this.ngModule,t),p=lm(d),f=p.tracingService;return f&&f.componentCreate?f.componentCreate(_d(l),()=>this.createComponentRef(p,d,n,r,i,s,a,c)):this.createComponentRef(p,d,n,r,i,s,a,c)}finally{g(u)}}createComponentRef(t,n,r,o,i,s,a,c){let u=this.componentDef,l=pm(o,u,s,i,c),d=t.rendererFactory.createRenderer(null,u),p=o?lg(d,o,u.encapsulation,n):dm(u,d,a??null);fm(p);let f=n.get(Ht,null),h=hm(p,()=>n.get(ye,null)??Fl());f&&f.addHost(h);let L=s?.some(rl)||i?.some(j=>typeof j!="function"&&j.bindings.some(rl)),N=Ta(null,l,null,512|nd(u),null,null,t,d,n,null,Hl(p,n,!0));f&&xd&&h instanceof ShadowRoot&&Jr(N,()=>{f.removeHost(h)}),N[G]=p,to(N);let W=null;try{let j=Oa(G,N,2,"#host",()=>l.directiveRegistry,!0,0);Yl(d,p,j),En(p,N),Fo(l,N,j),ha(l,j,N),ka(l,j),r!==void 0&&mm(j,this.ngContentSelectors,r),W=Pe(j.index,N),N[P]=W[P],Aa(l,N,null)}catch(j){throw W!==null&&Vs(W),Vs(N),j}finally{x(_.DynamicComponentEnd),no()}return new To(this.componentType,N,!!L)}};function pm(e,t,n,r,o){let i=e?["ng-version","22.2.4"]:Hh(t.selectors[0]),s=null,a=null,c=0;if(n)for(let d of n)c+=d[Zs].requiredVars,d.create&&(d.targetIdx=0,(s??=[]).push(d)),d.update&&(d.targetIdx=0,(a??=[]).push(d));if(r)for(let d=0;d{if(n&1&&e)for(let r of e)r.create();if(n&2&&t)for(let r of t)r.update()}}function rl(e){let t=e[Zs].kind;return t==="input"||t==="twoWay"}var To=class extends Td{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(t,n,r){super(),this._rootLView=n,this._hasInputBindings=r,this._tNode=Yr(n[y],G),this.location=Ao(this._tNode,n),this.instance=Pe(this._tNode.index,n)[P],this.hostView=this.changeDetectorRef=new In(n,void 0),this.componentType=t}setInput(t,n){this._hasInputBindings;let r=this._tNode;if(this.previousInputValues??=new Map,this.previousInputValues.has(t)&&Object.is(this.previousInputValues.get(t),n))return;let o=this._rootLView,i=Na(r,o[y],o,t,n);this.previousInputValues.set(t,n);let s=Pe(r.index,o);xa(s,1)}get injector(){return new at(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(t){this.hostView.onDestroy(t)}};function mm(e,t,n){let r=e.projection=[];for(let o=0;o{class e{static __NG_ELEMENT_ID__=ym}return e})();function ym(){let e=oe();return Dm(e,b())}var Ys=class e extends Vo{_lContainer;_hostTNode;_hostLView;constructor(t,n,r){super(),this._lContainer=t,this._hostTNode=n,this._hostLView=r}get element(){return Ao(this._hostTNode,this._hostLView)}get injector(){return new at(this._hostTNode,this._hostLView)}get parentInjector(){let t=la(this._hostTNode,this._hostLView);if(Cl(t)){let n=yo(t,this._hostLView),r=mo(t),o=n[y].data[r+8];return new at(o,n)}else return new at(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){let n=ol(this._lContainer);return n!==null&&n[t]||null}get length(){return this._lContainer.length-B}createEmbeddedView(t,n,r){let o,i,s;typeof r=="number"?o=r:r!=null&&(o=r.index,i=r.injector,s=r.onError);let a=qs(this._lContainer,t.ssrId),c=t.createEmbeddedViewImpl(n||{},i,a);return s&&(c._lView[Bn]=s),this.insertImpl(c,o,Qn(this._hostTNode,a)),c}createComponent(t,n,r,o,i,s,a){let c,u,l=n||{};c=l.index,r=l.injector,o=l.projectableNodes,i=l.environmentInjector||l.ngModuleRef,s=l.directives,a=l.bindings,u=l.onError;let d=new Xn(Tt(t)),p=r||this.parentInjector;if(!i&&d.ngModule==null){let j=this.parentInjector.get(we,null);j&&(i=j)}let f=Tt(d.componentType??{}),h=qs(this._lContainer,f?.id??null),L=h?.firstChild??null,N=d.create(p,o,L,i,s,a,this._getHostElementNamespace());return u&&(N.hostView._lView[Bn]=u),this.insertImpl(N.hostView,c,Qn(this._hostTNode,h)),N}_getHostElementNamespace(){if(this._hostTNode.type&2){let t=this._hostTNode.parent??this._hostLView[re];return t!==null&&t.type&2&&typeof t.value=="string"&&t.value.toLowerCase()==="foreignobject"?null:t?.namespace??null}return this._hostTNode.namespace}insert(t,n){return this.insertImpl(t,n,!0)}insertImpl(t,n,r){let o=t._lView;if(au(o)){let a=this.indexOf(t);if(a!==-1)this.detach(a);else{let c=o[U],u=new e(c,c[re],c[U]);u.detach(u.indexOf(t))}}let i=this._adjustIndex(n),s=this._lContainer;return jo(s,o,i,r),t.attachToViewContainerRef(),Ki(As(s),i,t),t}move(t,n){return this.insert(t,n)}indexOf(t){let n=ol(this._lContainer);return n!==null?n.indexOf(t):-1}remove(t){let n=this._adjustIndex(t,-1),r=Jn(this._lContainer,n);r&&(Fn(As(this._lContainer),n),Oo(r[y],r))}detach(t){let n=this._adjustIndex(t,-1),r=Jn(this._lContainer,n);return r&&Fn(As(this._lContainer),n)!=null?new In(r):null}_adjustIndex(t,n=0){return t??this.length+n}};function ol(e){return e[Hn]}function As(e){return e[Hn]||(e[Hn]=[])}function Dm(e,t){let n,r=t[e.index];return ge(r)?n=r:(n=Dd(r,t,null,e),t[e.index]=n,ba(t,n)),Em(n,t,e,r),new Ys(n,e,t)}function vm(e,t){let n=e[F],r=n.createComment(""),o=Se(t,e),i=n.parentNode(o);return Lt(n,i,r,n.nextSibling(o),!1),r}var Em=wm,Im=()=>!1;function Cm(e,t,n){return Im(e,t,n)}function wm(e,t,n,r){if(e[xt])return;let o;n.type&8?o=Q(r):o=vm(t,n),e[xt]=o}function Bo(e){return!!e&&typeof e.then=="function"}function La(e){return!!e&&typeof e.subscribe=="function"}var er=class{};var tr=class extends er{injector;instance=null;constructor(t){super();let n=new Ct([...t.providers,{provide:er,useValue:this}],t.parent||jn(),t.debugName,new Set(["environment"]));this.injector=n,t.runEnvironmentInitializers&&n.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(t){this.injector.onDestroy(t)}};function Od(e,t,n=null){return new tr({providers:e,parent:t,debugName:n,runEnvironmentInitializers:!0}).injector}var Tm=(()=>{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=es(!1,n.type),o=r.length>0?Od([r],this._injector,""):null;this.cachedInjectors.set(n,o)}return this.cachedInjectors.get(n)}ngOnDestroy(){try{for(let n of this.cachedInjectors.values())n!==null&&n.destroy()}finally{this.cachedInjectors.clear()}}static \u0275prov=Z({token:e,providedIn:"environment",factory:()=>new e(A(we))})}return e})();function J(e){return ca(()=>{let t=kd(e),n=X(q({},t),{decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection!==da.Eager,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:t.standalone?o=>o.get(Tm).getOrCreateStandaloneInjector(n):null,getExternalStyles:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||Ne.Emulated,styles:e.styles||Xe,_:null,schemas:e.schemas||null,tView:null,id:""});t.standalone&&Bt("NgStandalone"),Ld(n);let r=e.dependencies;return n.directiveDefs=il(r,bm),n.pipeDefs=il(r,zc),n.id=Mm(n),n})}function bm(e){return Tt(e)||Br(e)}function _m(e,t){if(e==null)return bt;let n={};for(let r in e)if(Object.hasOwn(e,r)){let o=e[r],i,s,a,c;Array.isArray(o)?(a=o[0],i=o[1],s=o[2]??i,c=o[3]||null):(i=o,s=o,a=Lo.None,c=null),n[i]=[r,a,c],t[i]=s}return n}function Sm(e){if(e==null)return bt;let t={};for(let n in e)Object.hasOwn(e,n)&&(t[e[n]]=n);return t}function Fa(e){return ca(()=>{let t=kd(e);return Ld(t),t})}function kd(e){let t={};return{type:e.type,providersResolver:null,viewProvidersResolver:null,factory:null,hostBindings:e.hostBindings||null,hostVars:e.hostVars||0,hostAttrs:e.hostAttrs||null,contentQueries:e.contentQueries||null,declaredInputs:t,inputConfig:e.inputs||bt,exportAs:e.exportAs||null,standalone:e.standalone??!0,signals:e.signals===!0,selectors:e.selectors||Xe,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,controlDef:null,signalFormsInputPresence:null,inputs:_m(e.inputs,t),outputs:Sm(e.outputs),debugInfo:null}}function Ld(e){e.features?.forEach(t=>t(e))}function il(e,t){return e?()=>{let n=typeof e=="function"?e():e,r=[];for(let o of n){let i=t(o);i!==null&&r.push(i)}return r}:null}function Mm(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}var Fd=new T("");var Pa=(()=>{class e{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((n,r)=>{this.resolve=n,this.reject=r});appInits=m(Fd,{optional:!0})??[];injector=m(Te);constructor(){}runInitializers(){if(this.initialized)return;let n=[];for(let o of this.appInits){let i=Wr(this.injector,o);if(Bo(i))n.push(i);else if(La(i)){let s=new Promise((a,c)=>{i.subscribe({complete:a,error:c})});n.push(s)}}let r=()=>{this.done=!0,this.resolve()};Promise.all(n).then(()=>{r()}).catch(o=>{this.reject(o)}),n.length===0&&r(),this.initialized=!0}static \u0275fac=function(r){return new(r||e)};static \u0275prov=Vt({token:e,factory:e.\u0275fac})}return e})();function Pd(e,t,n,r,o,i,s,a){if(n.firstCreatePass){e.mergedAttrs=No(e.mergedAttrs,e.attrs);let l=e.tView=wa(2,e,o,i,s,n.directiveRegistry,n.pipeRegistry,null,n.schemas,n.consts,null);n.queries!==null&&(n.queries.template(n,e),l.queries=n.queries.embeddedTView(e))}a&&(e.flags|=a),gn(e,!1);let c=Am(n,t,e,r);oo()&&Ia(n,t,c,e),En(c,t);let u=Dd(c,t,c,e);t[r+G]=u,ba(t,u),Cm(u,e,t)}function Nm(e,t,n,r,o,i,s,a,c,u,l){let d=n+G,p;return t.firstCreatePass?(p=ir(t,d,4,s||null,a||null),Xr()&&Nd(t,e,p,me(t.consts,u),_a),El(t,p)):p=t.data[d],Pd(p,e,t,n,r,o,i,c),fn(p)&&Fo(t,e,p),u!=null&&or(e,p,l),p}function bo(e,t,n,r,o,i,s,a,c,u,l){let d=n+G,p;if(t.firstCreatePass){if(p=ir(t,d,4,s||null,a||null),u!=null){let f=me(t.consts,u);p.localNames=[];for(let h=0;h{let t="";throw new E(-600,t)})}var Rm=10;var sr=(()=>{class e{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=m(st);afterRenderManager=m(Da);zonelessEnabled=m(mn);rootEffectScheduler=m(_s);dirtyFlags=0;tracingSnapshot=null;allTestViews=new Set;autoDetectTestViews=new Set;includeAllTestViews=!1;afterTick=new Ce;get allViews(){return[...(this.includeAllTestViews?this.allTestViews:this.autoDetectTestViews).keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];internalPendingTask=m(kt);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(bi(n=>!n))}constructor(){m(Ye,{optional:!0})}whenStable(){let n;return new Promise(r=>{n=this.isStable.subscribe({next:o=>{o&&r()}})}).finally(()=>{n.unsubscribe()})}_injector=m(we);_rendererFactory=null;get injector(){return this._injector}bootstrap(n,r){return this.bootstrapImpl(n,r)}bootstrapImpl(n,r,o=Te.NULL){return this._injector.get(V).run(()=>{if(x(_.BootstrapComponentStart),!this._injector.get(Pa).done){let W="";throw new E(405,W)}let a=Tt(n),c=this._injector.get(er),u=new Xn(a,c);this.componentTypes.push(n);let{hostElement:l,directives:d,bindings:p}=Om(r),f=l||u.selector,h=u.create(o,[],f,c.injector,d,p),L=h.location.nativeElement,N=h.injector.get(ja,null);return N?.registerApplication(L),h.onDestroy(()=>{this.detachView(h.hostView),Zn(this.components,h),N?.unregisterApplication(L)}),this._loadComponent(h),x(_.BootstrapComponentEnd,h),h})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){x(_.ChangeDetectionStart),this.tracingSnapshot!==null?this.tracingSnapshot.run(Ro.CHANGE_DETECTION,this.tickImpl):this.tickImpl()}tickImpl=()=>{if(this._runningTick)throw x(_.ChangeDetectionEnd),new E(101,!1);let n=g(null);try{this._runningTick=!0,this.synchronize()}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,g(n),this.afterTick.next(),x(_.ChangeDetectionEnd)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(Pt,null,{optional:!0}));let n=0;for(;this.dirtyFlags!==0&&n++Un(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;Zn(this._views,r),r.detachFromAppRef()}_loadComponent(n){this.attachView(n.hostView);try{this.tick()}catch(o){this.internalErrorHandler(o)}this.components.push(n),this._injector.get(jd,[]).forEach(o=>o(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),()=>Zn(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(r){return new(r||e)};static \u0275prov=Vt({token:e,factory:e.\u0275fac})}return e})();function Om(e){return e===void 0||typeof e=="string"||e instanceof Element?{hostElement:e}:e}function Zn(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function He(e,t,n,r){let o=b(),i=Ot();if(ct(o,i,t)){let s=K(),a=ro();vg(a,o,e,t,n,r)}return He}var Qs=class{destroy(t){}updateValue(t,n){}swap(t,n){let r=Math.min(t,n),o=Math.max(t,n),i=this.detach(o);if(o-r>1){let s=this.detach(r);this.attach(r,i),this.attach(o,s)}else this.attach(r,i)}move(t,n){this.attach(n,this.detach(t))}};function xs(e,t,n,r,o){return e===n&&Object.is(t,r)?1:Object.is(o(e,t),o(n,r))?-1:0}function km(e,t,n,r){let o,i,s=0,a=e.length-1,c=void 0;if(Array.isArray(t)){g(r);let u=t.length-1;for(g(null);s<=a&&s<=u;){let l=e.at(s),d=t[s],p=xs(s,l,s,d,n);if(p!==0){p<0&&e.updateValue(s,d),s++;continue}let f=e.at(a),h=t[u],L=xs(a,f,u,h,n);if(L!==0){L<0&&e.updateValue(a,h),a--,u--;continue}let N=n(s,l),W=n(a,f),j=n(s,d);if(Object.is(j,W)){let li=n(u,h);Object.is(li,N)?(e.swap(s,a),e.updateValue(a,h),u--,a--):e.move(a,s),e.updateValue(s,d),s++;continue}if(o??=new _o,i??=al(e,s,a,n),Ks(e,o,s,j))e.updateValue(s,d),s++,a++;else if(i.has(j))o.set(N,e.detach(s)),a--;else{let li=e.create(s,t[s]);e.attach(s,li),s++,a++}}for(;s<=u;)sl(e,o,n,s,t[s]),s++}else if(t!=null){g(r);let u=t[Symbol.iterator]();g(null);let l=u.next();for(;!l.done&&s<=a;){let d=e.at(s),p=l.value,f=xs(s,d,s,p,n);if(f!==0)f<0&&e.updateValue(s,p),s++,l=u.next();else{o??=new _o,i??=al(e,s,a,n);let h=n(s,p);if(Ks(e,o,s,h))e.updateValue(s,p),s++,a++,l=u.next();else if(!i.has(h))e.attach(s,e.create(s,p)),s++,a++,l=u.next();else{let L=n(s,d);o.set(L,e.detach(s)),a--}}}for(;!l.done;)sl(e,o,n,e.length,l.value),l=u.next()}for(;s<=a;)e.destroy(e.detach(a--));o?.forEach(u=>{e.destroy(u)})}function Ks(e,t,n,r){return t!==void 0&&t.has(r)?(e.attach(n,t.get(r)),t.delete(r),!0):!1}function sl(e,t,n,r,o){if(Ks(e,t,r,n(r,o)))e.updateValue(r,o);else{let i=e.create(r,o);e.attach(r,i)}}function al(e,t,n,r){let o=new Set;for(let i=t;i<=n;i++)o.add(r(i,e.at(i)));return o}var _o=class{kvMap=new Map;_vMap=void 0;has(t){return this.kvMap.has(t)}delete(t){if(!this.has(t))return!1;let n=this.kvMap.get(t);return this._vMap!==void 0&&this._vMap.has(n)?(this.kvMap.set(t,this._vMap.get(n)),this._vMap.delete(n)):this.kvMap.delete(t),!0}get(t){return this.kvMap.get(t)}set(t,n){if(this.kvMap.has(t)){let r=this.kvMap.get(t);this._vMap===void 0&&(this._vMap=new Map);let o=this._vMap;for(;o.has(r);)r=o.get(r);o.set(r,n)}else this.kvMap.set(t,n)}forEach(t){for(let[n,r]of this.kvMap)if(t(r,n),this._vMap!==void 0){let o=this._vMap;for(;o.has(r);)r=o.get(r),t(r,n)}}};function Ae(e,t,n,r,o,i,s,a){Bt("NgControlFlow");let c=b(),u=K(),l=me(u.consts,i);return bo(c,u,e,t,n,r,o,l,256,s,a),Va}function Va(e,t,n,r,o,i,s,a){return Bt("NgControlFlow"),Lm(e,t,n,r,o,i,s,a),Va}function Lm(e,t,n,r,o,i,s,a){let c=b(),u=K(),l=me(u.consts,i);bo(c,u,e,t,n,r,o,l,512,s,a)}function xe(e,t){Bt("NgControlFlow");let n=b(),r=Ot(),o=n[r]!==Be?n[r]:-1,i=o!==-1?So(n,G+o):void 0,s=0;if(ct(n,r,e)){let a=g(null);try{if(i!==void 0&&Ed(i,s),e!==-1){let c=G+e,u=So(n,c),l=ta(n[y],c),d=wd(u,l,n),p=Po(n,l,t,{dehydratedView:d});jo(u,p,s,Qn(l,d))}}finally{g(a)}}else if(i!==void 0){let a=vd(i,s);a!==void 0&&(a[P]=t)}}var Js=class{lContainer;$implicit;$index;constructor(t,n,r){this.lContainer=t,this.$implicit=n,this.$index=r}get $count(){return this.lContainer.length-B}};function ar(e){return e}var Xs=class{hasEmptyBlock;trackByFn;liveCollection;constructor(t,n,r){this.hasEmptyBlock=t,this.trackByFn=n,this.liveCollection=r}};function de(e,t,n,r,o,i,s,a,c,u,l,d,p){Bt("NgControlFlow");let f=b(),h=K(),L=c!==void 0,N=b(),W=a?s.bind(N[ae][P]):s,j=new Xs(L,W);N[G+e]=j,bo(f,h,e+1,t,n,r,o,me(h.consts,i),256),L&&bo(f,h,e+2,c,u,l,d,me(h.consts,p),512)}var ea=class extends Qs{lContainer;hostLView;templateTNode;operationsCounter=void 0;needsIndexUpdate=!1;constructor(t,n,r){super(),this.lContainer=t,this.hostLView=n,this.templateTNode=r}get length(){return this.lContainer.length-B}at(t){return this.getLView(t)[P].$implicit}attach(t,n){let r=n[cn];this.needsIndexUpdate||=t!==this.length,jo(this.lContainer,n,t,Qn(this.templateTNode,r)),Fm(this.lContainer,t)}detach(t){return this.needsIndexUpdate||=t!==this.length-1,Pm(this.lContainer,t),jm(this.lContainer,t)}create(t,n){let r=qs(this.lContainer,this.templateTNode.tView.ssrId);return Po(this.hostLView,this.templateTNode,new Js(this.lContainer,n,t),{dehydratedView:r})}destroy(t){Oo(t[y],t)}updateValue(t,n){this.getLView(t)[P].$implicit=n}reset(){this.needsIndexUpdate=!1}updateIndexes(){if(this.needsIndexUpdate)for(let t=0;t(ul(e,t,o,a,r),I))}}return ul(e,t,o,a,r),I}function ul(e,t,n,r,o){if(Sa(r,n,e,t,Bd),fn(r)){let i=n[y];Fo(i,n,r),ha(i,r,n)}o!=null&&or(n,r)}function w(){let e=K(),t=oe(),n=Ma(t);return e.firstCreatePass&&ka(e,n),ds(n)&&fs(),ls(),n.classesWithoutHost!=null&&Jp(n)&&cl(e,n,b(),n.classesWithoutHost,!0),n.stylesWithoutHost!=null&&Xp(n)&&cl(e,n,b(),n.stylesWithoutHost,!1),w}function De(e,t,n,r){return I(e,t,n,r),w(),De}function ve(e,t,n,r){let o=b(),i=o[y],s=e+G,a=i.firstCreatePass?im(s,i,2,t,n,r):i.data[s];return Sa(a,o,e,t,Bd),r!=null&&or(o,a),ve}function Ee(){let e=oe(),t=Ma(e);return ds(t)&&fs(),ls(),Ee}var Bd=(e,t,n,r,o)=>(Gn(!0),Wl(t[F],r,Es()));function cr(e,t,n){let r=b(),o=r[y],i=e+G,s=o.firstCreatePass?Oa(i,r,8,"ng-container",_a,Xr(),t,n):o.data[i];if(Sa(s,r,e,"ng-container",Bm),fn(s)){let a=r[y];Fo(a,r,s),ha(a,s,r)}return n!=null&&or(r,s),cr}function ur(){let e=K(),t=oe(),n=Ma(t);return e.firstCreatePass&&ka(e,n),ur}function Tn(e,t,n){return cr(e,t,n),ur(),Tn}var Bm=(e,t,n,r,o)=>(Gn(!0),Sh(t[F],""));function Re(){return b()}function Ut(e,t,n){let r=b(),o=Ot();if(ct(r,o,t)){let i=K(),s=ro();sd(s,r,e,t,r[F],n)}return Ut}var lr="en-US";var Hm=lr;function Hd(e){typeof e=="string"&&(Hm=e.toLowerCase().replace(/_/g,"-"))}function z(e,t,n){let r=b(),o=K(),i=oe();return $m(o,r,r[F],i,e,t,n),z}function Ho(e,t,n){let r=b(),o=K(),i=oe();return(i.type&3||n)&&Sd(i,o,r,n,r[F],e,t,ho(i,r,t)),Ho}function $m(e,t,n,r,o,i,s){let a=!0,c=null;if((r.type&3||s)&&(c??=ho(r,t,i),Sd(r,e,t,s,n,o,i,c)&&(a=!1)),a){let u=r.outputs?.[o],l=r.hostDirectiveOutputs?.[o];if(l&&l.length)for(let d=0;d>17&32767}function Um(e){return(e&2)==2}function Gm(e,t){return e&131071|t<<17}function na(e){return e|2}function Cn(e){return(e&131068)>>2}function Rs(e,t){return e&-131069|t<<2}function zm(e){return(e&1)===1}function ra(e){return e|1}function Wm(e,t,n,r,o,i){let s=i?t.classBindings:t.styleBindings,a=jt(s),c=Cn(s);e[r]=n;let u=!1,l;if(Array.isArray(n)){let d=n;l=d[1],(l===null||an(d,l)>0)&&(u=!0)}else l=n;if(o)if(c!==0){let p=jt(e[a+1]);e[r+1]=uo(p,a),p!==0&&(e[p+1]=Rs(e[p+1],r)),e[a+1]=Gm(e[a+1],r)}else e[r+1]=uo(a,0),a!==0&&(e[a+1]=Rs(e[a+1],r)),a=r;else e[r+1]=uo(c,0),a===0?a=r:e[c+1]=Rs(e[c+1],r),c=r;u&&(e[r+1]=na(e[r+1])),ll(e,l,r,!0),ll(e,l,r,!1),qm(t,l,e,r,i),s=uo(a,c),i?t.classBindings=s:t.styleBindings=s}function qm(e,t,n,r,o){let i=o?e.residualClasses:e.residualStyles;i!=null&&typeof t=="string"&&an(i,t)>=0&&(n[r+1]=ra(n[r+1]))}function ll(e,t,n,r){let o=e[n+1],i=t===null,s=r?jt(o):Cn(o),a=!1;for(;s!==0&&(a===!1||i);){let c=e[s],u=e[s+1];Zm(c,t)&&(a=!0,e[s+1]=r?ra(u):na(u)),s=r?jt(u):Cn(u)}a&&(e[n+1]=r?na(o):ra(o))}function Zm(e,t){return e===null||t==null||(Array.isArray(e)?e[1]:e)===t?!0:Array.isArray(e)&&typeof t=="string"?an(e,t)>=0:!1}function Ke(e,t,n){return $d(e,t,n,!1),Ke}function ut(e,t){return $d(e,t,null,!0),ut}function $d(e,t,n,r){let o=b(),i=K(),s=Eu(2);if(i.firstUpdatePass&&Qm(i,e,s,r),t!==Be&&ct(o,s,t)){let a=i.data[ot()];ty(i,a,o,o[F],e,o[s+1]=ny(t,n),r,s)}}function Ym(e,t){return t>=e.expandoStartIndex}function Qm(e,t,n,r){let o=e.data;if(o[n+1]===null){let i=o[ot()],s=Ym(e,n);ry(i,r)&&t===null&&!s&&(t=!1),t=Km(o,i,t,r),Wm(o,i,t,n,s,r)}}function Km(e,t,n,r){let o=Tu(e),i=r?t.residualClasses:t.residualStyles;if(o===null)(r?t.classBindings:t.styleBindings)===0&&(n=Os(null,e,t,n,r),n=nr(n,t.attrs,r),i=null);else{let s=t.directiveStylingLast;if(s===-1||e[s]!==o)if(n=Os(o,e,t,n,r),i===null){let c=Jm(e,t,r);c!==void 0&&Array.isArray(c)&&(c=Os(null,e,t,c[1],r),c=nr(c,t.attrs,r),Xm(e,t,r,c))}else i=ey(e,t,r)}return i!==void 0&&(r?t.residualClasses=i:t.residualStyles=i),n}function Jm(e,t,n){let r=n?t.classBindings:t.styleBindings;if(Cn(r)!==0)return e[jt(r)]}function Xm(e,t,n,r){let o=n?t.classBindings:t.styleBindings;e[jt(o)]=r}function ey(e,t,n){let r,o=t.directiveEnd;for(let i=1+t.directiveStylingLast;i0;){let c=e[o],u=Array.isArray(c),l=u?c[1]:c,d=l===null,p=n[o+1];p===Be&&(p=d?Xe:void 0);let f=d?Gr(p,r):l===r?p:void 0;if(u&&!Mo(f)&&(f=Gr(c,r)),Mo(f)&&(a=f,s))return a;let h=e[o+1];o=s?jt(h):Cn(h)}if(t!==null){let c=i?t.residualClasses:t.residualStyles;c!=null&&(a=Gr(c,r))}return a}function Mo(e){return e!==void 0}function ny(e,t){return e==null||e===""||(typeof t=="string"?e=Yn(e)+t:typeof e=="object"&&(e=Pr(Yn(e)))),e}function ry(e,t){return(e.flags&(t?8:16))!==0}function M(e,t=""){let n=b(),r=K(),o=e+G,i=r.firstCreatePass?ir(r,o,1,t,null):r.data[o],s=oy(r,n,i,t);n[o]=s,oo()&&Ia(r,n,s,i),gn(i,!1)}var oy=(e,t,n,r)=>(Gn(!0),bh(t[F],r));function iy(e,t,n,r=""){return ct(e,Ot(),n)?t+Hr(n)+r:Be}function O(e){return bn("",e),O}function bn(e,t,n){let r=b(),o=iy(r,e,t,n);return o!==Be&&sy(r,ot(),o),bn}function sy(e,t,n){let r=as(t,e);_h(e[F],r,n)}function fl(e,t,n){let r=K();r.firstCreatePass&&Ud(t,r.data,r.blueprint,rt(e),n)}function Ud(e,t,n,r,o){if(e=te(e),Array.isArray(e))for(let i=0;i>20;if(It(e)||!e.multi){let f=new Ft(u,o,wn,null),h=Ls(c,t,o?l:l+p,d);h===-1?(js(Do(a,s),i,c),ks(i,e,t.length),t.push(c),a.directiveStart++,a.directiveEnd++,o&&(a.providerIndexes+=1048576),n.push(f),s.push(f)):(n[h]=f,s[h]=f)}else{let f=Ls(c,t,l+p,d),h=Ls(c,t,l,l+p),L=f>=0&&n[f],N=h>=0&&n[h];if(o&&!N||!o&&!L){js(Do(a,s),i,c);let W=uy(o?cy:ay,n.length,o,r,u,e);!o&&N&&(n[h].providerFactory=W),ks(i,e,t.length,0),t.push(c),a.directiveStart++,a.directiveEnd++,o&&(a.providerIndexes+=1048576),n.push(W),s.push(W)}else{let W=Gd(n[o?h:f],u,!o&&r);ks(i,e,f>-1?f:h,W)}!o&&r&&N&&n[h].componentProviders++}}}function ks(e,t,n,r){let o=It(t),i=eu(t);if(o||i){let c=(i?te(t.useClass):t).prototype.ngOnDestroy;if(c){let u=e.destroyHooks||(e.destroyHooks=[]);if(!o&&t.multi){let l=u.indexOf(n);l===-1?u.push(n,[r,c]):u[l+1].push(r,c)}else u.push(n,c)}}}function Gd(e,t,n){return n&&e.componentProviders++,e.multi.push(t)-1}function Ls(e,t,n,r){for(let o=n;o{n.providersResolver=(r,o)=>fl(r,o?o(e):e,!1),t&&(n.viewProvidersResolver=(r,o)=>fl(r,o?o(t):t,!0))}}function Gt(e,t,n){return dy(b(),Du(),e,t,n)}function ly(e,t){let n=e[t];return n===Be?void 0:n}function dy(e,t,n,r,o,i){let s=t+n;return ct(e,s,o)?qg(e,s+1,i?r.call(i,o):r(o)):ly(e,s+1)}function Ha(e,t){return Cd(e,t)}var zd=(()=>{class e{applicationErrorHandler=m(st);appRef=m(sr);taskService=m(kt);ngZone=m(V);zonelessEnabled=m(mn);tracing=m(Ye,{optional:!0});zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new Y;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(kn):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(m(co,{optional:!0})??!1);cancelScheduledCallback=null;useMicrotaskScheduler=!1;runningTick=!1;pendingRenderTaskId=null;constructor(){this.subscriptions.add(this.appRef.afterTick.subscribe(()=>{let n=this.taskService.add();if(!this.runningTick&&(this.cleanup(),!this.zonelessEnabled||this.appRef.includeAllTestViews)){this.taskService.remove(n);return}this.switchToMicrotaskScheduler(),this.taskService.remove(n)})),this.subscriptions.add(this.ngZone.onUnstable.subscribe(()=>{this.runningTick||this.cleanup()}))}switchToMicrotaskScheduler(){this.ngZone.runOutsideAngular(()=>{let n=this.taskService.add();this.useMicrotaskScheduler=!0,queueMicrotask(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(n)})})}notify(n){if(!this.zonelessEnabled&&n===5)return;switch(n){case 0:case 2:{this.appRef.dirtyFlags|=2;break}case 3:case 4:case 5:case 1:{this.appRef.dirtyFlags|=4;break}case 6:{this.appRef.dirtyFlags|=2;break}case 12:{this.appRef.dirtyFlags|=16;break}case 13:{this.appRef.dirtyFlags|=2;break}case 11:break;default:this.appRef.dirtyFlags|=8}if(this.appRef.tracingSnapshot=this.tracing?.snapshot(this.appRef.tracingSnapshot)??null,!this.shouldScheduleTick())return;let r=this.useMicrotaskScheduler?Ru:Cs;this.pendingRenderTaskId=this.taskService.add(),this.scheduleInRootZone?this.cancelScheduledCallback=Zone.root.run(()=>r(()=>this.tick())):this.cancelScheduledCallback=this.ngZone.runOutsideAngular(()=>r(()=>this.tick()))}shouldScheduleTick(){return!(this.appRef.destroyed||this.pendingRenderTaskId!==null||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Zone.current.get(kn+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){this.applicationErrorHandler(r)}finally{this.taskService.remove(n),this.cleanup()}}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(r){return new(r||e)};static \u0275prov=Vt({token:e,factory:e.\u0275fac})}return e})();function Wd(){return[{provide:qe,useExisting:zd},{provide:V,useClass:Ln},{provide:mn,useValue:!0}]}function fy(){return typeof $localize<"u"&&$localize.locale||lr}var $o=new T("",{factory:()=>m($o,{optional:!0,skipSelf:!0})||fy()});var Uo=class{destroyed=!1;listeners=null;errorHandler=m(pe,{optional:!0});isEmitting=!1;hasNullListeners=!1;destroyRef=m(We);constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.listeners=null})}subscribe(t){if(this.destroyed)throw new E(953,!1);return(this.listeners??=[]).push(t),{unsubscribe:()=>{let n=this.listeners?this.listeners.indexOf(t):-1;n>-1&&(this.isEmitting?(this.hasNullListeners=!0,this.listeners[n]=null):this.listeners.splice(n,1))}}}emit(t){if(this.destroyed){console.warn(on(953,!1));return}if(this.listeners===null)return;this.isEmitting=!0;let n=g(null);try{for(let r of this.listeners)try{r!==null&&r(t)}catch(o){this.errorHandler?.handleError(o)}}finally{this.hasNullListeners&&(this.hasNullListeners=!1,this.listeners&&hy(this.listeners)),g(n),this.isEmitting=!1}}};function hy(e){let t=e.length-1;for(;t>-1;)e[t]===null&&e.splice(t,1),t--}function Oe(e,t){return _r(e,t?.equal)}function Go(e){return _c(e)}var qd=class e extends Error{_brand;constructor(t){super(t)}static IDLE=new e("IDLE");static LOADING=new e("LOADING")};function Qd(e,t){let n=Object.create(ml);n.value=e,n.transformFn=t?.transform;function r(){if(Je(n),n.value===aa){let o=null;throw new E(-950,o)}return n.value}return r[ee]=n,r}function _n(e){return new Uo}function Zd(e,t){return Qd(e,t)}function Ay(e){return Qd(aa,e)}var $=(Zd.required=Ay,Zd);var xy=1e4;var LN=xy-1e3;var Ry=(()=>{class e{zone=m(V);changeDetectionScheduler=m(qe);applicationRef=m(sr);applicationErrorHandler=m(st);_onMicrotaskEmptySubscription;initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.changeDetectionScheduler.runningTick||this.applicationRef._runningTick||this.zone.run(()=>{try{this.applicationRef.dirtyFlags|=1,this.applicationRef._tick()}catch(n){this.applicationErrorHandler(n)}})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}static \u0275fac=function(r){return new(r||e)};static \u0275prov=Vt({token:e,factory:e.\u0275fac})}return e})(),Oy=new T("",{factory:()=>!1});function ky({ngZoneFactory:e,scheduleInRootZone:t}){return e??=()=>new V(X(q({},Jd()),{scheduleInRootZone:t})),[{provide:mn,useValue:!1},{provide:V,useFactory:e},{provide:_t,multi:!0,useFactory:()=>{let n=m(Ry,{optional:!0});return()=>n.initialize()}},{provide:_t,multi:!0,useFactory:()=>{let n=m(Ly);return()=>{n.initialize()}}},{provide:co,useValue:t??Is}]}function Kd(e){let t=e?.scheduleInRootZone,n=ky({ngZoneFactory:()=>{let r=Jd(e);return r.scheduleInRootZone=t,r.shouldCoalesceEventChangeDetection&&Bt("NgZone_CoalesceEvent"),new V(r)},scheduleInRootZone:t});return zr([{provide:Oy,useValue:!0},n])}function Jd(e){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:e?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:e?.runCoalescing??!1}}var Ly=(()=>{class e{subscription=new Y;initialized=!1;zone=m(V);pendingTasks=m(kt);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(()=>{V.assertNotInAngularZone(),queueMicrotask(()=>{n!==null&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(n),n=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{V.assertInAngularZone(),n??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static \u0275fac=function(r){return new(r||e)};static \u0275prov=Vt({token:e,factory:e.\u0275fac})}return e})();var Ua=new T(""),Fy=new T("");function dr(e){return!e.moduleRef}function Py(e){let t=dr(e)?e.r3Injector:e.moduleRef.injector,n=t.get(V);return n.run(()=>{dr(e)?e.r3Injector.resolveInjectorInitializers():e.moduleRef.resolveInjectorInitializers();let r=t.get(st),o;if(n.runOutsideAngular(()=>{o=n.onError.subscribe({next:r})}),dr(e)){let i=()=>t.destroy(),s=e.platformInjector.get(Ua);s.add(i),t.onDestroy(()=>{o.unsubscribe(),s.delete(i)})}else{let i=()=>e.moduleRef.destroy(),s=e.platformInjector.get(Ua);s.add(i),e.moduleRef.onDestroy(()=>{Zn(e.allPlatformModules,e.moduleRef),o.unsubscribe(),s.delete(i)})}return Vy(r,n,()=>{let i=t.get(kt),s=i.add(),a=t.get(Pa);return a.runInitializers(),a.donePromise.then(()=>{let c=t.get($o,lr);if(Hd(c||lr),!t.get(Fy,!0))return dr(e)?t.get(sr):(e.allPlatformModules.push(e.moduleRef),e.moduleRef);if(dr(e)){let l=t.get(sr);return e.rootComponent!==void 0&&l.bootstrap(e.rootComponent),l}else return jy?.(e.moduleRef,e.allPlatformModules),e.moduleRef}).finally(()=>{i.remove(s)})})})}var jy;function Vy(e,t,n){try{let r=n();return Bo(r)?r.catch(o=>{throw t.runOutsideAngular(()=>e(o)),o}):r}catch(r){throw t.runOutsideAngular(()=>e(r)),r}}var zo=null;function By(e=[],t){return Te.create({name:t,providers:[{provide:Pn,useValue:"platform"},{provide:Ua,useValue:new Set([()=>zo=null])},...e]})}function Hy(e=[]){if(zo)return zo;let t=By(e);return zo=t,Vd(),$y(t),t}function $y(e){let t=e.get(io,null);Wr(e,()=>{t?.forEach(n=>n())})}function Xd(e){let{rootComponent:t,appProviders:n,platformProviders:r,platformRef:o}=e;x(_.BootstrapApplicationStart);try{let i=o?.injector??Hy(r),s=[Wd(),Fu,...n||[]],a=new tr({providers:s,parent:i,debugName:"",runEnvironmentInitializers:!1});return Py({r3Injector:a.injector,platformInjector:i,rootComponent:t})}catch(i){return Promise.reject(i)}finally{x(_.BootstrapApplicationEnd)}}var $a=Symbol("NOT_SET"),ef=new Set,Uy=X(q({},Qt),{kind:"afterRenderEffectPhase",consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,value:$a,cleanup:null,consumerMarkedDirty(){if(this.sequence.impl.executing){if(this.sequence.lastPhase===null||this.sequence.lastPhase(Je(l),l.value),l.signal[ee]=l,l.registerCleanupFn=d=>(l.cleanup??=new Set).add(d),this.nodes[c]=l,this.hooks[c]=d=>l.phaseFn(d)}}afterRun(){super.afterRun(),this.lastPhase=null}destroy(){if(this.onDestroyFns!==null)for(let t of this.onDestroyFns)t();super.destroy();for(let t of this.nodes)if(t)try{for(let n of t.cleanup??ef)n()}finally{Zt(t)}}};function tf(e,t){let n=t?.injector??m(Te),r=n.get(qe),o=n.get(Da),i=n.get(Ye,null,{optional:!0});o.impl??=n.get(Jl);let s=e;typeof s=="function"&&(s={mixedReadWrite:e});let a=n.get(ao,null,{optional:!0}),c=new Ga(o.impl,[s.earlyRead,s.write,s.mixedReadWrite,s.read],a?.view,r,n,i?.snapshot(null),void 0);return o.impl.register(c),c}var nf=null;function pr(){return nf}function Wa(e){nf??=e}var fr=class{};var qa=(()=>{class e{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;injector=m(Te);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 o=this._createContextForwardProxy();this._viewRef=r.createEmbeddedView(this.ngTemplateOutlet,o,{injector:this._getInjector()})}}_getInjector(){return this.ngTemplateOutletInjector==="outlet"?this.injector:this.ngTemplateOutletInjector??void 0}_shouldRecreateView(n){return!!n.ngTemplateOutlet||!!n.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(n,r,o)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,r,o):!1,get:(n,r,o)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,r,o)}})}static \u0275fac=function(r){return new(r||e)(wn(Vo))};static \u0275dir=Fa({type:e,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},features:[ua]})}return e})();function Za(e,t){t=encodeURIComponent(t);for(let n of e.split(";")){let r=n.indexOf("="),[o,i]=r==-1?[n,""]:[n.slice(0,r),n.slice(r+1)];if(o.trim()!==t)continue;let s=i;try{s=decodeURIComponent(i)}catch(a){}return s.length>1&&s[0]==='"'&&s[s.length-1]==='"'&&(s=s.slice(1,-1)),s}return null}var rf="browser";var hr=class{_doc;constructor(t){this._doc=t}manager},Wo=(()=>{class e extends hr{constructor(n){super(n)}supports(n){return!0}addEventListener(n,r,o,i){return n.addEventListener(r,o,i),()=>this.removeEventListener(n,r,o,i)}removeEventListener(n,r,o,i){return n.removeEventListener(r,o,i)}static \u0275fac=function(r){return new(r||e)(A(ye))};static \u0275prov=Z({token:e,factory:e.\u0275fac})}return e})(),Yo=new T(""),Ja=(()=>{class e{_zone;_plugins;_eventNameToPlugin=new Map;constructor(n,r){this._zone=r,n.forEach(s=>{s.manager=this});let o=n.filter(s=>!(s instanceof Wo));this._plugins=o.slice().reverse();let i=n.find(s=>s instanceof Wo);i&&this._plugins.push(i)}addEventListener(n,r,o,i){return this._findPluginFor(r).addEventListener(n,r,o,i)}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(r){return new(r||e)(A(Yo),A(V))};static \u0275prov=Z({token:e,factory:e.\u0275fac})}return e})(),Ya="ng-app-id";function of(e){for(let t of e)t.remove()}function sf(e,t){let n=t.createElement("style");return n.textContent=e,n}function Wy(e,t,n,r){let o=e.head?.querySelectorAll(`style[${Ya}="${t}"],link[${Ya}="${t}"]`);if(!o||o.length===0)return!1;for(let i of o)i.removeAttribute(Ya),i instanceof HTMLLinkElement?r.set(i.href.slice(i.href.lastIndexOf("/")+1),{usage:0,elements:[i]}):i.textContent&&n.set(i.textContent,{usage:0,elements:[i]});return!0}function Ka(e,t){let n=t.createElement("link");return n.setAttribute("rel","stylesheet"),n.setAttribute("href",e),n}var Xa=(()=>{class e{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;constructor(n,r,o,i={}){this.doc=n,this.appId=r,this.nonce=o,Wy(n,r,this.inline,this.external)&&this.hosts.add(n.head)}addStyles(n,r){for(let o of n)this.addUsage(o,this.inline,sf);r?.forEach(o=>this.addUsage(o,this.external,Ka))}removeStyles(n,r){for(let o of n)this.removeUsage(o,this.inline);r?.forEach(o=>this.removeUsage(o,this.external))}addUsage(n,r,o){let i=r.get(n);i?i.usage++:r.set(n,{usage:1,elements:[...this.hosts].map(s=>this.addElement(s,o(n,this.doc)))})}removeUsage(n,r){let o=r.get(n);o&&(o.usage--,o.usage<=0&&(of(o.elements),r.delete(n)))}ngOnDestroy(){for(let[,{elements:n}]of[...this.inline,...this.external])of(n);this.hosts.clear()}addHost(n){if(!this.hosts.has(n)){this.hosts.add(n);for(let[r,{elements:o}]of this.inline)o.push(this.addElement(n,sf(r,this.doc)));for(let[r,{elements:o}]of this.external)o.push(this.addElement(n,Ka(r,this.doc)))}}removeHost(n){this.hosts.delete(n);for(let r of[...this.inline.values(),...this.external.values()]){let o=[];for(let i of r.elements)i.parentNode===n?i.remove():o.push(i);r.elements=o}}addElement(n,r){return this.nonce&&r.setAttribute("nonce",this.nonce),n.appendChild(r)}static \u0275fac=function(r){return new(r||e)(A(ye),A(zn),A(so,8),A(Wn))};static \u0275prov=Z({token:e,factory:e.\u0275fac})}return e})(),Qa={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"},ec=/%COMP%/g;var cf="%COMP%",qy=`_nghost-${cf}`,Zy=`_ngcontent-${cf}`,Yy=!0,Qy=new T("",{factory:()=>Yy}),Ky=new T("");function Jy(e){return Zy.replace(ec,e)}function Xy(e){return qy.replace(ec,e)}function uf(e,t){return t.map(n=>n.replace(ec,e))}var tc=(()=>{class e{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;cssVarNamespace;constructor(n,r,o,i,s,a,c=null,u=null,l=null){this.eventManager=n,this.sharedStylesHost=r,this.appId=o,this.removeStylesOnCompDestroy=i,this.doc=s,this.ngZone=a,this.nonce=c,this.tracingService=u,this.cssVarNamespace=l??"",this.defaultRenderer=new gr(n,s,a,this.tracingService,this.cssVarNamespace)}createRenderer(n,r){if(!n||!r)return this.defaultRenderer;let o=this.getOrCreateRenderer(n,r);return o instanceof Zo?o.applyToHost(n):o instanceof mr&&o.applyStyles(),o}getOrCreateRenderer(n,r){let o=this.rendererByCompId,i=o.get(r.id);if(!i){let s=this.doc,a=this.ngZone,c=this.eventManager,u=this.sharedStylesHost,l=this.removeStylesOnCompDestroy,d=this.tracingService;switch(r.encapsulation){case Ne.Emulated:i=new Zo(c,u,r,this.appId,l,s,a,d,this.cssVarNamespace);break;case Ne.ShadowDom:return new qo(c,n,r,s,a,this.nonce,d,this.cssVarNamespace,u);case Ne.ExperimentalIsolatedShadowDom:return new qo(c,n,r,s,a,this.nonce,d,this.cssVarNamespace);default:i=new mr(c,u,r,l,s,a,d,this.cssVarNamespace);break}o.set(r.id,i)}return i}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(n){this.rendererByCompId.delete(n)}static \u0275fac=function(r){return new(r||e)(A(Ja),A(Ht),A(zn),A(Qy),A(ye),A(V),A(so),A(Ye,8),A(Ky,8))};static \u0275prov=Z({token:e,factory:e.\u0275fac})}return e})(),gr=class{eventManager;doc;ngZone;tracingService;cssVarNamespace;data=Object.create(null);throwOnSyntheticProps=!0;constructor(t,n,r,o,i=""){this.eventManager=t,this.doc=n,this.ngZone=r,this.tracingService=o,this.cssVarNamespace=i}destroy(){}destroyNode=null;createElement(t,n){return n?this.doc.createElementNS(Qa[n]||n,t):this.doc.createElement(t)}createComment(t){return this.doc.createComment(t)}createText(t){return this.doc.createTextNode(t)}appendChild(t,n){(af(t)?t.content:t).appendChild(n)}insertBefore(t,n,r){if(t){let o=af(t)?t.content:t;if(r!=null&&r.parentNode!==o)throw new E(-5106,!1);o.insertBefore(n,r)}}removeChild(t,n){n.remove()}selectRootElement(t,n){let r=typeof t=="string"?this.doc.querySelector(t):t;if(!r)throw new E(-5104,!1);return n||(r.textContent=""),r}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,n,r,o){if(o){n=o+":"+n;let i=Qa[o];i?t.setAttributeNS(i,n,r):t.setAttribute(n,r)}else t.setAttribute(n,r)}removeAttribute(t,n,r){if(r){let o=Qa[r];o?t.removeAttributeNS(o,n):t.removeAttribute(`${r}:${n}`)}else t.removeAttribute(n)}addClass(t,n){t.classList.add(n)}removeClass(t,n){t.classList.remove(n)}setStyle(t,n,r,o){let i=n.startsWith("--");i&&(n=n.replace("%NS%",this.cssVarNamespace)),i||o&(Ve.DashCase|Ve.Important)?t.style.setProperty(n,r,o&Ve.Important?"important":""):t.style[n]=r}removeStyle(t,n,r){let o=n.startsWith("--");o&&(n=n.replace("%NS%",this.cssVarNamespace)),o||r&Ve.DashCase?t.style.removeProperty(n):t.style[n]=""}setProperty(t,n,r){t!=null&&(t[n]=r)}setValue(t,n){t.nodeValue=n}listen(t,n,r,o){if(typeof t=="string"&&(t=pr().getGlobalEventTarget(this.doc,t),!t))throw new E(-5102,!1);let i=this.decoratePreventDefault(r);return this.tracingService?.wrapEventListener&&(i=this.tracingService.wrapEventListener(t,n,i)),this.eventManager.addEventListener(t,n,i,o)}decoratePreventDefault(t){return n=>{if(n==="__ngUnwrap__")return t;t(n)===!1&&n.preventDefault()}}};function af(e){return e.tagName==="TEMPLATE"&&e.content!==void 0}var qo=class extends gr{hostEl;sharedStylesHost;shadowRoot;constructor(t,n,r,o,i,s,a,c,u){super(t,o,i,a,c),this.hostEl=n,this.sharedStylesHost=u,this.shadowRoot=n.attachShadow({mode:"open"}),this.sharedStylesHost&&this.sharedStylesHost.addHost(this.shadowRoot);let l=r.styles;l=uf(r.id,l).map(p=>p.replace(/%NS%/g,c));for(let p of l){let f=document.createElement("style");s&&f.setAttribute("nonce",s),f.textContent=p,this.shadowRoot.appendChild(f)}let d=r.getExternalStyles?.();if(d)for(let p of d){let f=Ka(p,o);s&&f.setAttribute("nonce",s),this.shadowRoot.appendChild(f)}}nodeOrShadowRoot(t){return t===this.hostEl?this.shadowRoot:t}appendChild(t,n){return super.appendChild(this.nodeOrShadowRoot(t),n)}insertBefore(t,n,r){return super.insertBefore(this.nodeOrShadowRoot(t),n,r)}removeChild(t,n){return super.removeChild(null,n)}parentNode(t){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(t)))}destroy(){this.sharedStylesHost&&this.sharedStylesHost.removeHost(this.shadowRoot)}},mr=class extends gr{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(t,n,r,o,i,s,a,c,u){super(t,i,s,a,c),this.sharedStylesHost=n,this.removeStylesOnCompDestroy=o;let l=r.styles,d=u?uf(u,l):l;this.styles=d.map(p=>p.replace(/%NS%/g,c)),this.styleUrls=r.getExternalStyles?.(u)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&ya.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},Zo=class extends mr{contentAttr;hostAttr;constructor(t,n,r,o,i,s,a,c,u){let l=o+"-"+r.id;super(t,n,r,i,s,a,c,u,l),this.contentAttr=Jy(l),this.hostAttr=Xy(l)}applyToHost(t){this.applyStyles(),this.setAttribute(t,this.hostAttr,"")}createElement(t,n){let r=super.createElement(t,n);return super.setAttribute(r,this.contentAttr,""),r}};var Qo=class e extends fr{supportsDOMEvents=!0;static makeCurrent(){Wa(new e)}onAndCancel(t,n,r,o){return t.addEventListener(n,r,o),()=>{t.removeEventListener(n,r,o)}}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=eD();return n==null?null:tD(n)}resetBaseElement(){yr=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return Za(document.cookie,t)}},yr=null;function eD(){return yr=yr||document.head.querySelector("base"),yr?yr.getAttribute("href"):null}function tD(e){return new URL(e,document.baseURI).pathname}var lf=["alt","control","meta","shift"],nD={"\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"},rD={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey},df=(()=>{class e extends hr{constructor(n){super(n)}supports(n){return e.parseEventName(n)!=null}addEventListener(n,r,o,i){let s=e.parseEventName(r),a=e.eventCallback(s.fullKey,o,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>pr().onAndCancel(n,s.domEventName,a,i))}static parseEventName(n){let r=n.toLowerCase().split("."),o=r.shift();if(r.length===0||!(o==="keydown"||o==="keyup"))return null;let i=e._normalizeKey(r.pop()),s="",a=r.indexOf("code");if(a>-1&&(r.splice(a,1),s="code."),lf.forEach(u=>{let l=r.indexOf(u);l>-1&&(r.splice(l,1),s+=u+".")}),s+=i,r.length!=0||i.length===0)return null;let c={};return c.domEventName=o,c.fullKey=s,c}static matchEventFullKeyCode(n,r){let o=nD[n.key]||n.key,i="";return r.indexOf("code.")>-1&&(o=n.code,i="code."),o==null||!o?!1:(o=o.toLowerCase(),o===" "?o="space":o==="."&&(o="dot"),lf.forEach(s=>{if(s!==o){let a=rD[s];a(n)&&(i+=s+".")}}),i+=o,i===r)}static eventCallback(n,r,o){return i=>{e.matchEventFullKeyCode(i,n)&&o.runGuarded(()=>r(i))}}static _normalizeKey(n){return n==="esc"?"escape":n}static \u0275fac=function(r){return new(r||e)(A(ye))};static \u0275prov=Z({token:e,factory:e.\u0275fac})}return e})();function nc(e,t,n){return zt(this,null,function*(){let r=q({rootComponent:e},oD(t,n));return Xd(r)})}function oD(e,t){return{platformRef:t?.platformRef,appProviders:[...uD,...e?.providers??[]],platformProviders:cD}}function iD(){Qo.makeCurrent()}function sD(){return new pe}function aD(){return fa(document),document}var cD=[{provide:Wn,useValue:rf},{provide:io,useValue:iD,multi:!0},{provide:ye,useFactory:aD}];var uD=[{provide:Pn,useValue:"root"},{provide:pe,useFactory:sD},{provide:Yo,useClass:Wo,multi:!0},{provide:Yo,useClass:df,multi:!0},tc,{provide:Ht,useClass:Xa},{provide:Xa,useExisting:Ht},Ja,{provide:Pt,useExisting:tc},[]];var Ko=class e{roomName=$.required();send=_n();draft=ie("");placeholder=Oe(()=>`Message #${this.roomName().toLowerCase().replace(/ /g,"-")}`);submit(t){t.preventDefault();let n=this.draft().trim();n&&(this.send.emit(n),this.draft.set(""))}handleKeyDown(t){t.key==="Enter"&&!t.shiftKey&&this.submit(t)}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=J({type:e,selectors:[["form","chat-composer",""]],hostAttrs:[1,"composer"],hostBindings:function(n,r){n&1&&z("submit",function(i){return r.submit(i)})},inputs:{roomName:[1,"roomName"]},outputs:{send:"send"},decls:4,vars:4,consts:[["input",""],["id","composer-input","type","text","autocomplete","off",1,"composer-input",3,"input","keydown","placeholder","value"],["id","composer-send","type","submit",1,"composer-send",3,"disabled"]],template:function(n,r){if(n&1){let o=Re();ve(0,"input",1,0),Ho("input",function(){ue(o);let s=Qe(1);return le(r.draft.set(s.value))})("keydown",function(s){return r.handleKeyDown(s)}),Ee(),ve(2,"button",2),M(3,"Send"),Ee()}n&2&&(Ut("placeholder",r.placeholder())("value",r.draft()),He("aria-label","Message "+r.roomName()),D(2),Ut("disabled",r.draft().trim().length===0))},encapsulation:2})};var ff=[["#3b82f6","#bfdbfe"],["#a855f7","#f0d9ff"],["#10b981","#b7f5da"],["#ef4444","#ffd5d5"],["#f59e0b","#ffeab0"],["#06b6d4","#b8f2fb"],["#6366f1","#d5daff"],["#84cc16","#e3fab3"]];function lD(e,t,n){let r=t,o=n;switch(e){case 0:return` `;case 1:return` `;case 2:{let i=[.35,.62,.45,.8,.55];return i.map((s,a)=>{let c=r*.9/i.length-6;return` `}).join("")}default:return` `}}var pf=new Map;function rc(e,t,n,r){let o=e%ff.length,i=t%4,s=`${o}-${i}-${n}x${r}`,a=pf.get(s);if(a)return a;let[c,u]=ff[o],l=`g${o}${i}`,d=` ${lD(i,n,r)} `,p=`data:image/svg+xml,${encodeURIComponent(d)}`;return pf.set(s,p),p}var If=40,Dr=1500,ac=8,dD=56,Jo=["General","Random","Announcements","Engineering","Design","Product","Support","Off Topic","Releases","Incidents","Frontend","Backend","Infra","Mobile","Performance","Security","Docs","Hiring","Watercooler","Standup"],dt=["Ada Lovelace","Alan Turing","Grace Hopper","Linus Pauling","Marie Curie","Nikola Tesla","Rosalind Franklin","Carl Sagan","Katherine Johnson","Tim Berners-Lee"],Sn=["#368bd6","#ac3ba8","#03b381","#e64f7a","#ff812d","#2dc2c5","#5c56f5","#74d12c"],uc=Sn.length,oc=["the","benchmark","switching","between","rooms","should","feel","instant","even","when","the","timeline","is","long","and","full","of","rich","messages","with","avatars","and","timestamps","rendering","performance","matters","a","lot","here","lets","measure","it","carefully","and","compare","across","browsers","over","time"],ei=["\u{1F600}","\u{1F602}","\u{1F389}","\u{1F525}","\u2764\uFE0F","\u{1F64F}","\u{1F440}","\u{1F680}","\u{1F605}","\u{1F914}","\u{1F4AF}","\u2728","\u{1F64C}\u{1F3FD}","\u{1F44D}\u{1F3FB}","\u{1F60D}","\u{1F973}","\u{1F62D}","\u{1F92F}","\u{1F44F}","\u{1F4AA}\u{1F3FE}","\u{1F9E0}","\u2615","\u{1F41B}","\u{1F4C8}","\u{1F469}\u200D\u{1F4BB}","\u{1F9D1}\u200D\u{1F680}","\u{1F468}\u200D\u{1F469}\u200D\u{1F467}\u200D\u{1F466}","\u{1F3F3}\uFE0F\u200D\u{1F308}","\u{1F937}\u200D\u2640\uFE0F","\u{1F64B}\u200D\u2642\uFE0F","\u{1FAE0}","\u{1FAF6}"],hf=["\u{1F44D}","\u2764\uFE0F","\u{1F602}","\u{1F389}","\u{1F525}","\u2705","\u{1F440}","\u{1F64F}","\u{1F4AF}","\u{1F680}","\u{1F605}","\u{1F92F}"],fD=dt.map(e=>e.split(" ")[0].toLowerCase()),Cf=["scrollTop","scrollHeight","flushSync","requestAnimationFrame","IntersectionObserver","overflow-anchor","content-visibility","useLayoutEffect","getBoundingClientRect","will-change","ResizeObserver","queueMicrotask","clientHeight","offsetHeight"],pD=["the trace","last night's run","this regression","the profile","the spec text","my notes","the dashboard","that comparison"],wf=["traces/2f9c","runs/nightly","profiles/hot-path","spec/scroll-anchoring","notes/timeline","dashboards/perf","reports/42","compare/main"],hD=[{site:"example.com",title:"Scroll anchoring, and why feeds jump",description:"How browsers pin a scroll position while content is inserted above the viewport, and where it gives up."},{site:"perf.example.com",title:"Nightly run 482 vs 481",description:"Geomean moved 1.8% on the chat suites. Row measurement dominates the profile."},{site:"docs.example.com",title:"Windowing a variable-height list",description:"Estimate, measure, cache, correct. The four steps every hand-rolled virtualizer ends up with."},{site:"bugs.example.com",title:"Timeline jumps when the panel opens",description:"Narrowing the scroller re-wraps every row, so the cached heights are all stale at once."}],gD=["can we get a number on how bad the jank is before we start moving code around","the window only recycles about twenty rows, so the mount cost should be flat","every row height changes when the panel opens, which invalidates the cache","please do not use smooth scrolling anywhere inside a timed step","prepending history without pinning the anchor makes the viewport jump"],ic=["estimate the row height first, then correct after measuring","cache measured heights per message id","keep the mounted window small and bounded","assign scroll offsets explicitly instead of animating","recycle rows rather than remounting them","break the group when a reply quote is present","re-measure only the rows the resize actually touched"],mD=[{lang:"js",lines:["const scroller = scrollerRef.current;","scroller.scrollTop = scroller.scrollHeight;"]},{lang:"js",lines:["requestAnimationFrame(() => {"," for (const row of mounted)"," heights.set(row.id, row.offsetHeight);","});"]},{lang:"css",lines:[".timeline {"," overflow-anchor: none;"," content-visibility: auto;","}"]},{lang:"sh",lines:["npm run build","node debugging/e2e-chatroom.mjs --browser chrome"]},{lang:"json",lines:["{",' "iterationCount": 10,',' "suites": ["ChatRoom-React"]',"}"]},{lang:"js",lines:["for (const row of rows) {"," if (!heights.has(row.id))"," heights.set(row.id, estimate);","}"]},{lang:"diff",lines:['- scroller.scrollTo({ top, behavior: "smooth" });',"+ scroller.scrollTop = top;"]},{lang:"js",lines:["export function anchorToBottom(node) {"," node.scrollTop = node.scrollHeight;","}"]}];function k(e,t){let n=Math.imul(e+1,2654435761)^Math.imul(t+1,40503);return n^=n>>>15,n=Math.imul(n,2246822519),n^=n>>>13,n=Math.imul(n,3266489917),n^=n>>>16,n>>>0}function $e(e,t,n){return e[k(t,n)%e.length]}function lc(e){return e.split(" ").map(t=>t[0]).join("").slice(0,2).toUpperCase()}function Tf(e){let t=Jo[e%Jo.length];return e{if(!n.length)return;let s=r?" ":"",a=i?" ":"";t.push({type:"text",text:`${s}${n.join(" ")}${a}`}),n=[],r=!1};for(let i of e){if(typeof i=="string"){n.push(i);continue}o(!0),t.push(i),r=!0}return o(!1),t}function DD(e,t,n){if(n===0)return{type:"code",text:$e(Cf,e,t+11)};if(n===1)return{type:"link",text:$e(pD,e,t+12),href:`https://example.com/${$e(wf,e,t+13)}`};if(n===2)return{type:"mention",name:$e(fD,e,t+14)};let r=k(e,t+15)%If;return{type:"room",name:yD(r),roomId:`room-${r}`}}function Xo(e,t){let n=6+k(e,t)%22,r=k(e,t+1)%oc.length,o=[],i=!1;for(let l=0;l0&&lString(o).padStart(2,"0");return`${r(t)}:${r(n)}`}var dc=1440,fc=[];for(let e=0;e[e,t%uc])),RD=new Map(dt.map(e=>[e,lc(e)]));function OD(e,t){let n=[],r=0;for(;n.length0&&k(i,201)%100<18){let u=k(i,203)%4===0?1+k(i,204)%Math.min(o,400):1+k(i,202)%6,l=r[Math.max(0,o-u)];c={id:l.id,sender:l.sender,excerpt:ND(l.blocks)}}r.push({id:`room-${e}-msg-${o}`,sender:s,senderInitials:RD.get(s),colorIndex:xD.get(s),time:fc[i%dc],dayIndex:n[o],blocks:a,replyTo:c,grouped:o>0&&t[o-1]===s&&!c,reactions:Af[i%Nf]})}return r}var LD=12;function FD(){let e=[];for(let t=0;t0,reactions:[]}}var ti=Rf,kf=Of;var ni=class e{index=$.required();room=$.required();selected=$.required();avatarColors=Sn;static \u0275fac=function(n){return new(n||e)};static \u0275cmp=J({type:e,selectors:[["button","chat-room-list-item",""]],hostAttrs:["type","button",1,"room-list-item"],hostVars:3,hostBindings:function(n,r){n&2&&(Ut("id","room-list-item-"+r.index()),ut("room-list-item-selected",r.selected()))},inputs:{index:[1,"index"],room:[1,"room"],selected:[1,"selected"]},decls:7,vars:5,consts:[[1,"avatar"],[1,"room-list-item-text"],[1,"room-list-item-name"],[1,"room-list-item-preview"]],template:function(n,r){n&1&&(ve(0,"span",0),M(1),Ee(),ve(2,"span",1)(3,"span",2),M(4),Ee(),ve(5,"span",3),M(6),Ee()()),n&2&&(Ke("background-color",r.avatarColors[r.room().colorIndex]),D(),O(r.room().initials),D(3),O(r.room().name),D(2),O(r.room().lastMessage))},encapsulation:2})};var PD=(e,t)=>t.id;function jD(e,t){if(e&1){let n=Re();I(0,"button",1),z("click",function(){let o=ue(n).$implicit,i=S();return le(i.roomSelected.emit(o.id))}),w()}if(e&2){let n=t.$implicit,r=t.$index,o=S();H("index",r)("room",n)("selected",n.id===o.selectedRoomId())}}var ri=class e{rooms=$.required();selectedRoomId=$.required();roomSelected=_n();static \u0275fac=function(n){return new(n||e)};static \u0275cmp=J({type:e,selectors:[["nav","chat-room-list",""]],hostAttrs:["aria-label","Rooms",1,"room-list"],inputs:{rooms:[1,"rooms"],selectedRoomId:[1,"selectedRoomId"]},outputs:{roomSelected:"roomSelected"},decls:2,vars:0,consts:[["chat-room-list-item","",3,"index","room","selected"],["chat-room-list-item","",3,"click","index","room","selected"]],template:function(n,r){n&1&&de(0,jD,1,3,"button",0,PD),n&2&&fe(r.rooms())},dependencies:[ni],encapsulation:2})};var ft=class{};var oi=class{#s;#e;#o;#n;#r;#t;constructor(t,n,r){this.#s=r,this.#e=t,this.#r=n,this.#o=new Float64Array(t).fill(-1),this.#n=new Float64Array(t+1),this.#t=n}get count(){return this.#e}get first(){return this.#r}extendTo(t){t>=this.#r||(this.#r=t,this.#t=t)}grow(t){if(t<=this.#e)return;let n=new Float64Array(t);n.set(this.#o),n.fill(-1,this.#e);let r=new Float64Array(t+1);r.set(this.#n),this.#t=Math.min(this.#t,this.#e),this.#o=n,this.#n=r,this.#e=t}heightAt(t){let n=this.#o[t];return n===-1?this.#s:n}measure(t,n){return this.#o[t]===n?!1:(this.#o[t]=n,t>1;n[i]<=t?r=i:o=i-1}return Math.max(this.#r,r)}#i(){if(this.#t>this.#e)return;let t=this.#n;t[this.#r]=0;for(let n=this.#t;n({$implicit:e});function VD(e,t){if(e&1&&(I(0,"code",1),M(1),w()),e&2){let n=S().$implicit;D(),O(n.text)}}function BD(e,t){if(e&1&&(I(0,"a",5),z("click",function(r){return r.preventDefault()}),M(1),w()),e&2){let n=S().$implicit;H("href",n.href,xo),D(),O(n.text)}}function HD(e,t){if(e&1&&(I(0,"span",3),M(1),w()),e&2){let n=S().$implicit;D(),bn("@",n.name)}}function $D(e,t){if(e&1){let n=Re();I(0,"button",6),z("click",function(){ue(n);let o=S().$implicit,i=S(2);return le(i.actions.selectRoom(o.roomId))}),M(1),w()}if(e&2){let n=S().$implicit;D(),bn("#",n.name)}}function UD(e,t){if(e&1&&(cr(0),M(1),ur()),e&2){let n=S().$implicit;D(),O(n.text)}}function GD(e,t){if(e&1&&Ae(0,VD,2,1,"code",1)(1,BD,2,2,"a",2)(2,HD,2,1,"span",3)(3,$D,2,1,"button",4)(4,UD,2,1,"ng-container"),e&2){let n,r=t.$implicit;xe((n=r.type)==="code"?0:n==="link"?1:n==="mention"?2:n==="room"?3:4)}}function zD(e,t){if(e&1&&de(0,GD,5,1,null,null,ar),e&2){let n=t.$implicit;fe(n)}}function WD(e,t){if(e&1&&(I(0,"pre",7)(1,"code"),M(2),w()()),e&2){let n=S().$implicit;He("data-lang",n.lang),D(2),O(n.lines.join(`
+`))}}function qD(e,t){e&1&&Tn(0)}function ZD(e,t){if(e&1&&(I(0,"blockquote",8),$t(1,qD,1,0,"ng-container",13),w()),e&2){let n=S().$implicit;S();let r=Qe(1);D(),H("ngTemplateOutlet",r)("ngTemplateOutletContext",Gt(2,hc,n.spans))}}function YD(e,t){if(e&1&&De(0,"img",9),e&2){let n=S().$implicit;H("src",n.src)("width",n.width)("height",n.height)("alt",n.alt)}}function QD(e,t){if(e&1&&(I(0,"a",14),z("click",function(r){return r.preventDefault()}),De(1,"img",15),I(2,"span",16)(3,"span",17),M(4),w(),I(5,"span",18),M(6),w(),I(7,"span",19),M(8),w()()()),e&2){let n=S().$implicit;H("href",n.href,xo),D(),H("src",n.thumbSrc)("width",n.thumbWidth)("height",n.thumbHeight),D(3),O(n.site),D(2),O(n.title),D(2),O(n.description)}}function KD(e,t){e&1&&Tn(0)}function JD(e,t){if(e&1&&(I(0,"li"),$t(1,KD,1,0,"ng-container",13),w()),e&2){let n=t.$implicit;S(3);let r=Qe(1);D(),H("ngTemplateOutlet",r)("ngTemplateOutletContext",Gt(2,hc,n))}}function XD(e,t){if(e&1&&(I(0,"ul",11),de(1,JD,2,4,"li",null,ar),w()),e&2){let n=S().$implicit;D(),fe(n.items)}}function ev(e,t){e&1&&Tn(0)}function tv(e,t){if(e&1&&(I(0,"p",12),$t(1,ev,1,0,"ng-container",13),w()),e&2){let n=S().$implicit;S();let r=Qe(1);D(),H("ngTemplateOutlet",r)("ngTemplateOutletContext",Gt(2,hc,n.spans))}}function nv(e,t){if(e&1&&Ae(0,WD,3,2,"pre",7)(1,ZD,2,4,"blockquote",8)(2,YD,1,4,"img",9)(3,QD,9,7,"a",10)(4,XD,3,0,"ul",11)(5,tv,2,4,"p",12),e&2){let n,r=t.$implicit;xe((n=r.type)==="code"?0:n==="quote"?1:n==="image"?2:n==="unfurl"?3:n==="list"?4:5)}}var si=class e{blocks=$.required();actions=m(ft);static \u0275fac=function(n){return new(n||e)};static \u0275cmp=J({type:e,selectors:[["div","chat-rich-text",""]],inputs:{blocks:[1,"blocks"]},decls:4,vars:0,consts:[["spans",""],[1,"rich-code"],[1,"rich-link",3,"href"],[1,"rich-pill","rich-pill-mention"],["type","button",1,"rich-pill","rich-pill-room"],[1,"rich-link",3,"click","href"],["type","button",1,"rich-pill","rich-pill-room",3,"click"],[1,"rich-code-block"],[1,"rich-quote"],["decoding","sync",1,"rich-image",3,"src","width","height","alt"],[1,"rich-unfurl",3,"href"],[1,"rich-list"],[1,"rich-paragraph"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"rich-unfurl",3,"click","href"],["alt","","decoding","sync",1,"rich-unfurl-thumb",3,"src","width","height"],[1,"rich-unfurl-body"],[1,"rich-unfurl-site"],[1,"rich-unfurl-title"],[1,"rich-unfurl-description"]],template:function(n,r){n&1&&($t(0,zD,2,0,"ng-template",null,0,Ha),de(2,nv,6,1,null,null,ar)),n&2&&(D(2),fe(r.blocks()))},dependencies:[qa],encapsulation:2})};var rv=(e,t)=>t.emoji;function ov(e,t){if(e&1&&(I(0,"div",0)(1,"span",10),M(2),w()()),e&2){let n=S();D(2),O(n.dateLabel())}}function iv(e,t){e&1&&(I(0,"div",1)(1,"span",11),M(2,"New"),w()())}function sv(e,t){if(e&1&&(I(0,"span",3),M(1),w()),e&2){let n=S();D(),O(n.message().time)}}function av(e,t){if(e&1&&(I(0,"span",12),M(1),w()),e&2){let n=S();Ke("background-color",n.avatarColors[n.message().colorIndex]),D(),O(n.message().senderInitials)}}function cv(e,t){if(e&1){let n=Re();I(0,"button",13),z("click",function(){let o=ue(n),i=S();return le(i.actions.jumpToMessage(o.id))}),I(1,"span",14),M(2),w(),I(3,"span",15),M(4),w()()}if(e&2){let n=t;D(2),O(n.sender),D(2),O(n.excerpt)}}function uv(e,t){if(e&1&&(I(0,"div",7)(1,"span",16),M(2),w(),I(3,"span",17),M(4),w()()),e&2){let n=S();D(2),O(n.message().sender),D(2),O(n.message().time)}}function lv(e,t){if(e&1&&De(0,"button",18),e&2){let n=t.$implicit;H("reaction",n)}}function dv(e,t){if(e&1&&(I(0,"div",9),de(1,lv,1,1,"button",18,rv),w()),e&2){let n=S();D(),fe(n.message().reactions)}}var ai=class e{index=$.required();message=$.required();highlighted=$.required();dateLabel=$.required();unreadBelow=$.required();actions=m(ft);avatarColors=Sn;static \u0275fac=function(n){return new(n||e)};static \u0275cmp=J({type:e,selectors:[["li","chat-message",""]],hostAttrs:[1,"timeline-message"],hostVars:6,hostBindings:function(n,r){n&2&&(He("data-message-id",r.message().id)("data-index",r.index()),ut("timeline-message-grouped",r.message().grouped)("timeline-message-highlighted",r.highlighted()))},inputs:{index:[1,"index"],message:[1,"message"],highlighted:[1,"highlighted"],dateLabel:[1,"dateLabel"],unreadBelow:[1,"unreadBelow"]},decls:10,vars:7,consts:[[1,"timeline-date-separator"],["aria-label","Unread messages",1,"timeline-unread-divider"],[1,"timeline-message-row"],[1,"timeline-message-gutter"],[1,"avatar",3,"background-color"],[1,"timeline-message-body"],["type","button",1,"timeline-message-reply"],[1,"timeline-message-meta"],["chat-rich-text","",1,"timeline-message-text",3,"blocks"],[1,"timeline-message-reactions"],[1,"timeline-date-separator-label"],[1,"timeline-unread-divider-label"],[1,"avatar"],["type","button",1,"timeline-message-reply",3,"click"],[1,"timeline-message-reply-sender"],[1,"timeline-message-reply-excerpt"],[1,"timeline-message-sender"],[1,"timeline-message-time"],["chat-reaction","",3,"reaction"]],template:function(n,r){if(n&1&&(Ae(0,ov,3,1,"div",0),Ae(1,iv,3,0,"div",1),I(2,"div",2),Ae(3,sv,2,1,"span",3)(4,av,2,3,"span",4),I(5,"div",5),Ae(6,cv,5,2,"button",6),Ae(7,uv,5,2,"div",7),De(8,"div",8),Ae(9,dv,3,0,"div",9),w()()),n&2){let o;xe(r.dateLabel()!==null?0:-1),D(),xe(r.unreadBelow()?1:-1),D(2),xe(r.message().grouped?3:4),D(3),xe((o=r.message().replyTo)?6:-1,o),D(),xe(r.message().grouped?-1:7),D(),H("blocks",r.message().blocks),D(),xe(r.message().reactions.length>0?9:-1)}},dependencies:[ii,si],encapsulation:2})};var fv=(e,t)=>t.message.id;function pv(e,t){if(e&1&&De(0,"li",1),e&2){let n=t.$implicit,r=S();H("index",n.index)("message",n.message)("highlighted",n.message.id===r.highlightedId())("dateLabel",n.dateLabel)("unreadBelow",n.unreadBelow)}}var gc=4,hv=100,gv=4,mv=300,yv=120,ci=class e{room=$.required();roomSelected=_n();scroller=m(rr).nativeElement;highlightedId=ie(null);sent=ie([]);messages=Oe(()=>{let t=this.sent();return t.length?[...this.room().messages,...t]:this.room().messages});heights=Oe(()=>{let t=this.room().messages.length;return new oi(t,Math.max(0,t-mv),hv)});heightsVersion=ie(0);indexById=Oe(()=>{let t=this.messages(),n=null;return r=>(n===null&&(n=new Map(t.map((o,i)=>[o.id,i]))),n.get(r))});range=ie({start:0,end:0},{equal:(t,n)=>t.start===n.start&&t.end===n.end});pinnedToBottom=!0;jumpTarget=null;anchor=null;rows=Oe(()=>{let t=this.messages(),{start:n,end:r}=this.range(),o=this.room().readUpToIndex,i=t[t.length-1].dayIndex,s=[];for(let a=n;a0?t[a-1]:null,l=u===null||u.dayIndex!==c.dayIndex;s.push({index:a,message:c,dateLabel:l?pc(c.dayIndex,i):null,unreadBelow:a===o+1})}return s});spacers=Oe(()=>{this.heightsVersion();let t=this.heights(),{start:n,end:r}=this.range();return{top:t.offsetAt(n),bottom:t.totalHeight-t.offsetAt(r)}});constructor(){tf(()=>{this.rows(),this.spacers(),this.highlightedId(),Go(()=>this.settle())})}selectRoom(t){this.roomSelected.emit(t)}jumpToMessage(t){let n=this.indexById()(t);if(n===void 0)return;let r=this.heights();this.highlightedId.set(t),this.pinnedToBottom=!1,this.jumpTarget=n,no+1)),this.scroller.scrollTop=this.centeredOffset(n,this.scroller.clientHeight),this.range.set(this.rangeFor(this.scroller.scrollTop,this.scroller.clientHeight))}send(t){this.pinnedToBottom=!0,this.jumpTarget=null,this.sent.update(n=>[...n,kf(this.room(),n.length,t)]),this.heights().grow(this.messages().length),this.heightsVersion.update(n=>n+1)}handleScroll(){let t=this.scroller,n=this.heights();if(this.pinnedToBottom=t.scrollHeight-(t.scrollTop+t.clientHeight)<=gv,n.first>0&&t.scrollTopr+1);return}this.range.set(this.rangeFor(t.scrollTop,t.clientHeight))}settle(){let t=this.scroller,n=this.heights(),r=t.clientHeight,o=this.anchor,i=o??this.captureAnchor(t.scrollTop),s=!1;for(let a of t.querySelectorAll(".timeline-message"))n.measure(Number(a.dataset.index),a.getBoundingClientRect().height)&&(s=!0);if(s){this.anchor=i,this.heightsVersion.update(a=>a+1);return}this.anchor=null,this.jumpTarget!==null?(t.scrollTop=this.centeredOffset(this.jumpTarget,r),this.jumpTarget=null):this.pinnedToBottom?t.scrollTop=t.scrollHeight:o&&(t.scrollTop=n.offsetAt(o.index)+o.offset),this.range.set(this.rangeFor(t.scrollTop,r))}rangeFor(t,n){let r=this.heights(),o=r.indexAt(t),i=t+n,s=o;for(;s+1e)}])],decls:4,vars:4,consts:[["aria-hidden","true",1,"timeline-spacer"],["chat-message","",3,"index","message","highlighted","dateLabel","unreadBelow"]],template:function(n,r){n&1&&(De(0,"li",0),de(1,pv,1,5,"li",1,fv),De(3,"li",0)),n&2&&(Ke("height",r.spacers().top,"px"),D(),fe(r.rows()),D(2),Ke("height",r.spacers().bottom,"px"))},dependencies:[ai],encapsulation:2})};var Dv=e=>[e],vv=(e,t)=>t.id;function Ev(e,t){if(e&1){let n=Re();I(0,"ol",6,0),z("roomSelected",function(o){ue(n);let i=S();return le(i.select(o))}),w(),I(2,"form",7),z("send",function(o){ue(n);let i=Qe(1);return le(i.send(o))}),w()}if(e&2){let n=t.$implicit;H("room",n),D(2),H("roomName",n.name)}}var ui=class e{rooms=ti;selectedRoomId=ie(ti[0].id);selectedRoom=Oe(()=>ti.find(t=>t.id===this.selectedRoomId()));select(t){this.selectedRoomId.set(t)}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=J({type:e,selectors:[["div","chat-app",""]],hostAttrs:[1,"app"],decls:9,vars:6,consts:[["timeline",""],["chat-room-list","",3,"roomSelected","rooms","selectedRoomId"],[1,"room"],[1,"room-header"],["id","room-header-name",1,"room-header-name"],[1,"room-header-topic"],["chat-timeline","",3,"roomSelected","room"],["chat-composer","",3,"send","roomName"]],template:function(n,r){n&1&&(I(0,"nav",1),z("roomSelected",function(i){return r.select(i)}),w(),I(1,"main",2)(2,"header",3)(3,"h1",4),M(4),w(),I(5,"p",5),M(6),w()(),de(7,Ev,3,2,null,null,vv),w()),n&2&&(H("rooms",r.rooms)("selectedRoomId",r.selectedRoomId()),D(4),O(r.selectedRoom().name),D(2),O(r.selectedRoom().topic),D(),fe(Gt(4,Dv,r.selectedRoom())))},dependencies:[Ko,ri,ci],encapsulation:2})};nc(ui,{providers:[Kd()]}).catch(e=>console.error(e));
+/*! Bundled license information:
+
+@angular/core/fesm2022/_effect-chunk.mjs:
+@angular/core/fesm2022/_not_found-chunk.mjs:
+@angular/core/fesm2022/primitives-di.mjs:
+@angular/core/fesm2022/_untracked-chunk.mjs:
+@angular/core/fesm2022/primitives-signals.mjs:
+@angular/core/fesm2022/_pending_tasks-chunk.mjs:
+@angular/core/fesm2022/_debug_node-chunk.mjs:
+@angular/core/fesm2022/_resource-chunk.mjs:
+@angular/core/fesm2022/core.mjs:
+@angular/common/fesm2022/_platform_location-chunk.mjs:
+@angular/common/fesm2022/_common_module-chunk.mjs:
+@angular/common/fesm2022/_xhr-chunk.mjs:
+@angular/common/fesm2022/common.mjs:
+@angular/platform-browser/fesm2022/_dom_renderer-chunk.mjs:
+@angular/platform-browser/fesm2022/_browser-chunk.mjs:
+@angular/platform-browser/fesm2022/platform-browser.mjs:
+ (**
+ * @license Angular v22.2.4
+ * (c) 2010-2026 Google LLC. https://angular.dev/
+ * License: MIT
+ *)
+*/
+//# debugId=ed51910e-9cb1-5788-a015-9c114d78cc74
+//# sourceMappingURL=main.js.map
diff --git a/suites-experimental/chat-room-angular/dist/main.js.map b/suites-experimental/chat-room-angular/dist/main.js.map
new file mode 100644
index 000000000..5130505ab
--- /dev/null
+++ b/suites-experimental/chat-room-angular/dist/main.js.map
@@ -0,0 +1 @@
+{"x_google_ignoreList":[6,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40],"version":3,"sources":["../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/core/primitives/signals/src/graph.ts","../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/core/primitives/signals/src/equality.ts","../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/core/primitives/signals/src/computed.ts","../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/core/primitives/signals/src/errors.ts","../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/core/primitives/signals/src/signal.ts","../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/core/primitives/signals/src/effect.ts","node_modules/@angular/core/fesm2022/_not_found-chunk.mjs","../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/core/primitives/signals/src/linked_signal.ts","../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/core/primitives/signals/src/untracked.ts","node_modules/rxjs/dist/esm/internal/util/isFunction.js","node_modules/rxjs/dist/esm/internal/util/createErrorClass.js","node_modules/rxjs/dist/esm/internal/util/UnsubscriptionError.js","node_modules/rxjs/dist/esm/internal/util/arrRemove.js","node_modules/rxjs/dist/esm/internal/Subscription.js","node_modules/rxjs/dist/esm/internal/config.js","node_modules/rxjs/dist/esm/internal/scheduler/timeoutProvider.js","node_modules/rxjs/dist/esm/internal/util/reportUnhandledError.js","node_modules/rxjs/dist/esm/internal/util/noop.js","node_modules/rxjs/dist/esm/internal/NotificationFactories.js","node_modules/rxjs/dist/esm/internal/util/errorContext.js","node_modules/rxjs/dist/esm/internal/Subscriber.js","node_modules/rxjs/dist/esm/internal/symbol/observable.js","node_modules/rxjs/dist/esm/internal/util/identity.js","node_modules/rxjs/dist/esm/internal/util/pipe.js","node_modules/rxjs/dist/esm/internal/Observable.js","node_modules/rxjs/dist/esm/internal/util/lift.js","node_modules/rxjs/dist/esm/internal/operators/OperatorSubscriber.js","node_modules/rxjs/dist/esm/internal/util/ObjectUnsubscribedError.js","node_modules/rxjs/dist/esm/internal/Subject.js","node_modules/rxjs/dist/esm/internal/BehaviorSubject.js","node_modules/rxjs/dist/esm/internal/operators/map.js","node_modules/@angular/core/fesm2022/_pending_tasks-chunk.mjs","node_modules/@angular/core/fesm2022/_debug_node-chunk.mjs","node_modules/@angular/core/fesm2022/_resource-chunk.mjs","node_modules/@angular/core/fesm2022/core.mjs","node_modules/@angular/common/fesm2022/_platform_location-chunk.mjs","node_modules/@angular/common/fesm2022/_common_module-chunk.mjs","node_modules/@angular/common/fesm2022/_xhr-chunk.mjs","node_modules/@angular/common/fesm2022/common.mjs","node_modules/@angular/platform-browser/fesm2022/_dom_renderer-chunk.mjs","node_modules/@angular/platform-browser/fesm2022/_browser-chunk.mjs","src/components/composer.ts","src/data/graphics.js","src/data/rooms.js","src/data.ts","src/components/room-list-item.ts","src/components/room-list.ts","src/actions.ts","src/row-heights.js","src/components/reaction.ts","src/components/rich-text.ts","src/components/message.ts","src/components/timeline.ts","src/app.ts","src/main.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n// Required as the signals library is in a separate package, so we need to explicitly ensure the\n// global `ngDevMode` type is defined.\ndeclare const ngDevMode: boolean | undefined;\n\n/**\n * The currently active consumer `ReactiveNode`, if running code in a reactive context.\n *\n * Change this via `setActiveConsumer`.\n *\n * Safari 16-17 have a JIT bug where assigning to a module-level let/var can\n * sometimes fail to write the value. We wrap in an array to keep a constant\n * variable with a mutable internal value.\n */\nconst activeConsumer: [ReactiveNode | null] = [null];\nconst inNotificationPhase: [boolean] = [false];\n\nexport type Version = number & {__brand: 'Version'};\n\n/**\n * Global epoch counter. Incremented whenever a source signal is set.\n */\nlet epoch: Version = 1 as Version;\n\nexport type ReactiveHookFn = (node: ReactiveNode) => void;\n\n/**\n * If set, called after a producer `ReactiveNode` is created.\n */\nlet postProducerCreatedFn: ReactiveHookFn | null = null;\n\n/**\n * Symbol used to tell `Signal`s apart from other functions.\n *\n * This can be used to auto-unwrap signals in various cases, or to auto-wrap non-signal values.\n */\nexport const SIGNAL: unique symbol = /* @__PURE__ */ Symbol('SIGNAL');\n\nexport function setActiveConsumer(consumer: ReactiveNode | null): ReactiveNode | null {\n const prev = activeConsumer[0];\n activeConsumer[0] = consumer;\n return prev;\n}\n\nexport function getActiveConsumer(): ReactiveNode | null {\n return activeConsumer[0];\n}\n\nexport function isInNotificationPhase(): boolean {\n return inNotificationPhase[0];\n}\n\nexport interface Reactive {\n [SIGNAL]: ReactiveNode;\n}\n\nexport function isReactive(value: unknown): value is Reactive {\n return (value as Partial)[SIGNAL] !== undefined;\n}\n\nexport const REACTIVE_NODE: ReactiveNode = {\n version: 0 as Version,\n lastCleanEpoch: 0 as Version,\n dirty: false,\n producers: undefined,\n producersTail: undefined,\n consumers: undefined,\n consumersTail: undefined,\n recomputing: false,\n consumerAllowSignalWrites: false,\n consumerIsAlwaysLive: false,\n kind: 'unknown',\n producerMustRecompute: () => false,\n producerRecomputeValue: () => {},\n consumerMarkedDirty: () => {},\n consumerOnSignalRead: () => {},\n};\n\ninterface ReactiveLink {\n producer: ReactiveNode;\n consumer: ReactiveNode;\n\n /**\n * Stores the epoch that holds when this link was observed, allowing subsequent observations of the same producer to\n * realize that there's an existing link, avoiding the creation of a new, redundant link. A value of `null` indicates\n * that the link cannot be assumed to be valid based on the epoch counter.\n */\n knownValidAtEpoch: Version | null;\n lastReadVersion: number;\n prevConsumer: ReactiveLink | undefined;\n nextConsumer: ReactiveLink | undefined;\n nextProducer: ReactiveLink | undefined;\n}\n\nexport type ReactiveNodeKind =\n | 'signal'\n | 'computed'\n | 'effect'\n | 'template'\n | 'linkedSignal'\n | 'afterRenderEffectPhase'\n | 'childSignalProp' // Represents a signal passed as a prop to a child component in a CoW app\n | 'unknown';\n\n/**\n * A producer and/or consumer which participates in the reactive graph.\n *\n * Producer `ReactiveNode`s which are accessed when a consumer `ReactiveNode` is the\n * `activeConsumer` are tracked as dependencies of that consumer.\n *\n * Certain consumers are also tracked as \"live\" consumers and create edges in the other direction,\n * from producer to consumer. These edges are used to propagate change notifications when a\n * producer's value is updated.\n *\n * A `ReactiveNode` may be both a producer and consumer.\n */\nexport interface ReactiveNode {\n /**\n * Version of the value that this node produces.\n *\n * This is incremented whenever a new value is produced by this node which is not equal to the\n * previous value (by whatever definition of equality is in use).\n */\n version: Version;\n\n /**\n * Epoch at which this node is verified to be clean.\n *\n * This allows skipping of some polling operations in the case where no signals have been set\n * since this node was last read.\n */\n lastCleanEpoch: Version;\n\n /**\n * Whether this node (in its consumer capacity) is dirty.\n *\n * Only live consumers become dirty, when receiving a change notification from a dependency\n * producer.\n */\n dirty: boolean;\n\n /**\n * Whether this node is currently rebuilding its producer list.\n */\n recomputing: boolean;\n\n /**\n * Producers which are dependencies of this consumer.\n */\n producers: ReactiveLink | undefined;\n\n /**\n * Points to the last linked list node in the `producers` linked list.\n *\n * When this node is recomputing, this is used to track the producers that we have accessed so far.\n */\n producersTail: ReactiveLink | undefined;\n\n /**\n * Linked list of consumers of this producer that are \"live\" (they require push notifications).\n *\n * The length of this list is effectively our reference count for this node.\n */\n consumers: ReactiveLink | undefined;\n consumersTail: ReactiveLink | undefined;\n\n /**\n * Whether writes to signals are allowed when this consumer is the `activeConsumer`.\n *\n * This is used to enforce guardrails such as preventing writes to writable signals in the\n * computation function of computed signals, which is supposed to be pure.\n */\n consumerAllowSignalWrites: boolean;\n\n readonly consumerIsAlwaysLive: boolean;\n\n /**\n * Tracks whether producers need to recompute their value independently of the reactive graph (for\n * example, if no initial value has been computed).\n */\n producerMustRecompute(node: unknown): boolean;\n producerRecomputeValue(node: unknown): void;\n consumerMarkedDirty(node: unknown): void;\n\n /**\n * Called when a signal is read within this consumer.\n */\n consumerOnSignalRead(node: unknown): void;\n\n /**\n * A debug name for the reactive node. Used in Angular DevTools to identify the node.\n */\n debugName?: string;\n\n /**\n * Kind of node. Example: 'signal', 'computed', 'input', 'effect'.\n *\n * ReactiveNode has this as 'unknown' by default, but derived node types should override this to\n * make available the kind of signal that particular instance of a ReactiveNode represents.\n *\n * Used in Angular DevTools to identify the kind of signal.\n */\n kind: ReactiveNodeKind;\n}\n\n/**\n * Called by implementations when a producer's signal is read.\n */\nexport function producerAccessed(node: ReactiveNode): void {\n if (inNotificationPhase[0]) {\n throw new Error(\n typeof ngDevMode !== 'undefined' && ngDevMode\n ? `Assertion error: signal read during notification phase`\n : '',\n );\n }\n\n const consumer = activeConsumer[0];\n if (consumer === null) {\n // Accessed outside of a reactive context, so nothing to record.\n return;\n }\n\n consumer.consumerOnSignalRead(node);\n\n const prevProducerLink = consumer.producersTail;\n\n // If the last producer we accessed is the same as the current one, we can skip adding a new\n // link\n if (prevProducerLink !== undefined && prevProducerLink.producer === node) {\n return;\n }\n\n let nextProducerLink: ReactiveLink | undefined = undefined;\n const isRecomputing = consumer.recomputing;\n if (isRecomputing) {\n // If we're incrementally rebuilding the producers list, we want to check if the next producer\n // in the list is the same as the one we're trying to add.\n\n // If the previous producer is defined, then the next producer is just the one that follows it.\n // Otherwise, we should check the head of the producers list (the first node that we accessed the last time this consumer was run).\n nextProducerLink =\n prevProducerLink !== undefined ? prevProducerLink.nextProducer : consumer.producers;\n if (nextProducerLink !== undefined && nextProducerLink.producer === node) {\n // If the next producer is the same as the one we're trying to add, we can just update the\n // last read version, update the tail of the producers list of this rerun, and return.\n consumer.producersTail = nextProducerLink;\n nextProducerLink.lastReadVersion = node.version;\n nextProducerLink.knownValidAtEpoch = epoch;\n return;\n }\n }\n\n const prevConsumerLink = node.consumersTail;\n\n // If the producer we're accessing already has a link to this consumer, we can skip adding a new\n // link. This can short circuit the creation of a new link in the case where the consumer reads alternating ReactiveNodes\n if (\n prevConsumerLink !== undefined &&\n prevConsumerLink.consumer === consumer &&\n (!isRecomputing || prevConsumerLink.knownValidAtEpoch === epoch)\n ) {\n return;\n }\n\n // If we got here, it means that we need to create a new link between the producer and the consumer.\n const isLive = consumerIsLive(consumer);\n const newLink: ReactiveLink = {\n producer: node,\n consumer: consumer,\n // instead of eagerly destroying the previous link, we delay until we've finished recomputing\n // the producers list, so that we can destroy all of the old links at once.\n nextProducer: nextProducerLink,\n // Don't set prevConsumer here โ it's only meaningful when the link is part of\n // the producer's consumer list. producerAddLiveConsumer sets it correctly when\n // the link is actually inserted. Setting it eagerly would create a dangling\n // reference into the consumer list that prevents GC of removed entries.\n prevConsumer: undefined,\n knownValidAtEpoch: epoch,\n lastReadVersion: node.version,\n nextConsumer: undefined,\n };\n consumer.producersTail = newLink;\n if (prevProducerLink !== undefined) {\n prevProducerLink.nextProducer = newLink;\n } else {\n consumer.producers = newLink;\n }\n\n if (isLive) {\n producerAddLiveConsumer(node, newLink);\n }\n}\n\n/**\n * Increment the global epoch counter.\n *\n * Called by source producers (that is, not computeds) whenever their values change.\n */\nexport function producerIncrementEpoch(): void {\n epoch++;\n}\n\n/**\n * Ensure this producer's `version` is up-to-date.\n */\nexport function producerUpdateValueVersion(node: ReactiveNode): void {\n if (consumerIsLive(node) && !node.dirty) {\n // A live consumer will be marked dirty by producers, so a clean state means that its version\n // is guaranteed to be up-to-date.\n return;\n }\n\n if (!node.dirty && node.lastCleanEpoch === epoch) {\n // Even non-live consumers can skip polling if they previously found themselves to be clean at\n // the current epoch, since their dependencies could not possibly have changed (such a change\n // would've increased the epoch).\n return;\n }\n\n if (!node.producerMustRecompute(node) && !consumerPollProducersForChange(node)) {\n // None of our producers report a change since the last time they were read, so no\n // recomputation of our value is necessary, and we can consider ourselves clean.\n producerMarkClean(node);\n return;\n }\n\n node.producerRecomputeValue(node);\n\n // After recomputing the value, we're no longer dirty.\n producerMarkClean(node);\n}\n\n/**\n * Propagate a dirty notification to live consumers of this producer.\n */\nexport function producerNotifyConsumers(node: ReactiveNode): void {\n if (node.consumers === undefined) {\n return;\n }\n\n // Prevent signal reads when we're updating the graph\n const prev = inNotificationPhase[0];\n inNotificationPhase[0] = true;\n try {\n for (\n let link: ReactiveLink | undefined = node.consumers;\n link !== undefined;\n link = link.nextConsumer\n ) {\n const consumer = link.consumer;\n if (!consumer.dirty) {\n consumerMarkDirty(consumer);\n }\n }\n } finally {\n inNotificationPhase[0] = prev;\n }\n}\n\n/**\n * Whether this `ReactiveNode` in its producer capacity is currently allowed to initiate updates,\n * based on the current consumer context.\n */\nexport function producerUpdatesAllowed(): boolean {\n return activeConsumer[0]?.consumerAllowSignalWrites !== false;\n}\n\nexport function consumerMarkDirty(node: ReactiveNode): void {\n node.dirty = true;\n producerNotifyConsumers(node);\n node.consumerMarkedDirty?.(node);\n}\n\nexport function producerMarkClean(node: ReactiveNode): void {\n node.dirty = false;\n node.lastCleanEpoch = epoch;\n}\n\n/**\n * Prepare this consumer to run a computation in its reactive context and set\n * it as the active consumer.\n *\n * Must be called by subclasses which represent reactive computations, before those computations\n * begin.\n */\nexport function consumerBeforeComputation(node: ReactiveNode | null): ReactiveNode | null {\n if (node) resetConsumerBeforeComputation(node);\n\n return setActiveConsumer(node);\n}\n\n/**\n * Prepare this consumer to run a computation in its reactive context.\n *\n * We expose this mainly for code where we manually batch effects into a single\n * consumer. In those cases we may wish to \"reopen\" a consumer multiple times\n * in initial render before finalizing it. Most code should just call\n * `consumerBeforeComputation` instead of calling this directly.\n */\nexport function resetConsumerBeforeComputation(node: ReactiveNode): void {\n // Clear link validity state before running a computation, such that links that were captured in a prior computation\n // (which may have happened in the same epoch) are not mistakenly considered valid. This is only necessary if any of\n // the links has `knownValidAtEpoch` equal to the current epoch, for which the producer that was accessed last is used\n // as proxy: any earlier producers cannot exceed its epoch.\n if (node.producersTail?.knownValidAtEpoch === epoch) {\n let producer = node.producers;\n while (producer !== undefined) {\n producer.knownValidAtEpoch = null;\n producer = producer.nextProducer;\n }\n }\n\n node.producersTail = undefined;\n node.recomputing = true;\n}\n\n/**\n * Finalize this consumer's state and set previous consumer as the active consumer after a\n * reactive computation has run.\n *\n * Must be called by subclasses which represent reactive computations, after those computations\n * have finished.\n */\nexport function consumerAfterComputation(\n node: ReactiveNode | null,\n prevConsumer: ReactiveNode | null,\n): void {\n setActiveConsumer(prevConsumer);\n\n if (node) finalizeConsumerAfterComputation(node);\n}\n\n/**\n * Finalize this consumer's state after a reactive computation has run.\n *\n * We expose this mainly for code where we manually batch effects into a single\n * consumer. In those cases we may wish to \"reopen\" a consumer multiple times\n * in initial render before finalizing it. Most code should just call\n * `consumerAfterComputation` instead of calling this directly.\n */\nexport function finalizeConsumerAfterComputation(node: ReactiveNode): void {\n node.recomputing = false;\n\n // We've finished incrementally rebuilding the producers list, now if there are any producers\n // that are after producersTail, they are stale and should be removed.\n const producersTail = node.producersTail as ReactiveLink | undefined;\n let toRemove = producersTail !== undefined ? producersTail.nextProducer : node.producers;\n if (toRemove !== undefined) {\n if (consumerIsLive(node)) {\n // For each stale link, we first unlink it from the producers list of consumers\n do {\n toRemove = producerRemoveLiveConsumerLink(toRemove);\n } while (toRemove !== undefined);\n }\n\n // Now, we can truncate the producers list to remove all stale links.\n if (producersTail !== undefined) {\n producersTail.nextProducer = undefined;\n } else {\n node.producers = undefined;\n }\n }\n}\n\n/**\n * Determine whether this consumer has any dependencies which have changed since the last time\n * they were read.\n */\nexport function consumerPollProducersForChange(node: ReactiveNode): boolean {\n // Poll producers for change.\n for (let link = node.producers; link !== undefined; link = link.nextProducer) {\n const producer = link.producer;\n const seenVersion = link.lastReadVersion;\n\n // First check the versions. A mismatch means that the producer's value is known to have\n // changed since the last time we read it.\n if (seenVersion !== producer.version) {\n return true;\n }\n\n // The producer's version is the same as the last time we read it, but it might itself be\n // stale. Force the producer to recompute its version (calculating a new value if necessary).\n producerUpdateValueVersion(producer);\n\n // Now when we do this check, `producer.version` is guaranteed to be up to date, so if the\n // versions still match then it has not changed since the last time we read it.\n if (seenVersion !== producer.version) {\n return true;\n }\n }\n\n return false;\n}\n\n/**\n * Disconnect this consumer from the graph.\n */\nexport function consumerDestroy(node: ReactiveNode): void {\n if (consumerIsLive(node)) {\n // Drop all connections from the graph to this node.\n let link = node.producers;\n while (link !== undefined) {\n link = producerRemoveLiveConsumerLink(link);\n }\n }\n\n // Truncate all the linked lists to drop all connection from this node to the graph.\n node.producers = undefined;\n node.producersTail = undefined;\n node.consumers = undefined;\n node.consumersTail = undefined;\n}\n\n/**\n * Add `consumer` as a live consumer of this node.\n *\n * Note that this operation is potentially transitive. If this node becomes live, then it becomes\n * a live consumer of all of its current producers.\n */\nfunction producerAddLiveConsumer(node: ReactiveNode, link: ReactiveLink): void {\n const consumersTail = node.consumersTail;\n const wasLive = consumerIsLive(node);\n if (consumersTail !== undefined) {\n link.nextConsumer = consumersTail.nextConsumer;\n consumersTail.nextConsumer = link;\n } else {\n link.nextConsumer = undefined;\n node.consumers = link;\n }\n link.prevConsumer = consumersTail;\n node.consumersTail = link;\n if (!wasLive) {\n for (\n let link: ReactiveLink | undefined = node.producers;\n link !== undefined;\n link = link.nextProducer\n ) {\n producerAddLiveConsumer(link.producer, link);\n }\n }\n}\n\nfunction producerRemoveLiveConsumerLink(link: ReactiveLink): ReactiveLink | undefined {\n const producer = link.producer;\n const nextProducer = link.nextProducer;\n const nextConsumer = link.nextConsumer;\n const prevConsumer = link.prevConsumer;\n link.nextConsumer = undefined;\n link.prevConsumer = undefined;\n if (nextConsumer !== undefined) {\n nextConsumer.prevConsumer = prevConsumer;\n } else {\n producer.consumersTail = prevConsumer;\n }\n if (prevConsumer !== undefined) {\n prevConsumer.nextConsumer = nextConsumer;\n } else {\n producer.consumers = nextConsumer;\n if (!consumerIsLive(producer)) {\n let producerLink = producer.producers;\n while (producerLink !== undefined) {\n producerLink = producerRemoveLiveConsumerLink(producerLink);\n }\n }\n }\n return nextProducer;\n}\n\nfunction consumerIsLive(node: ReactiveNode): boolean {\n return node.consumerIsAlwaysLive || node.consumers !== undefined;\n}\n\nexport function runPostProducerCreatedFn(node: ReactiveNode): void {\n postProducerCreatedFn?.(node);\n}\n\nexport function setPostProducerCreatedFn(fn: ReactiveHookFn | null): ReactiveHookFn | null {\n const prev = postProducerCreatedFn;\n postProducerCreatedFn = fn;\n return prev;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/**\n * A comparison function which can determine if two values are equal.\n */\nexport type ValueEqualityFn = (a: T, b: T) => boolean;\n\n/**\n * The default equality function used for `signal` and `computed`, which uses referential equality.\n */\nexport function defaultEquals(a: T, b: T) {\n return Object.is(a, b);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {defaultEquals, ValueEqualityFn} from './equality';\nimport {\n consumerAfterComputation,\n consumerBeforeComputation,\n producerAccessed,\n producerUpdateValueVersion,\n REACTIVE_NODE,\n ReactiveNode,\n runPostProducerCreatedFn,\n setActiveConsumer,\n SIGNAL,\n} from './graph';\n\n// Required as the signals library is in a separate package, so we need to explicitly ensure the\n// global `ngDevMode` type is defined.\ndeclare const ngDevMode: boolean | undefined;\n\n/**\n * A computation, which derives a value from a declarative reactive expression.\n *\n * `Computed`s are both producers and consumers of reactivity.\n */\nexport interface ComputedNode extends ReactiveNode {\n /**\n * Current value of the computation, or one of the sentinel values above (`UNSET`, `COMPUTING`,\n * `ERROR`).\n */\n value: T;\n\n /**\n * If `value` is `ERRORED`, the error caught from the last computation attempt which will\n * be re-thrown.\n */\n error: unknown;\n\n /**\n * The computation function which will produce a new value.\n */\n computation: () => T;\n\n equal: ValueEqualityFn;\n}\n\nexport type ComputedGetter = (() => T) & {\n [SIGNAL]: ComputedNode;\n};\n\n/**\n * Create a computed signal which derives a reactive value from an expression.\n */\nexport function createComputed(\n computation: () => T,\n equal?: ValueEqualityFn,\n): ComputedGetter {\n const node: ComputedNode = Object.create(COMPUTED_NODE);\n node.computation = computation;\n\n if (equal !== undefined) {\n node.equal = equal;\n }\n\n const computed = () => {\n // Check if the value needs updating before returning it.\n producerUpdateValueVersion(node);\n\n // Record that someone looked at this signal.\n producerAccessed(node);\n\n if (node.value === ERRORED) {\n throw node.error;\n }\n\n return node.value;\n };\n\n (computed as ComputedGetter)[SIGNAL] = node;\n if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n computed.toString = () =>\n `[Computed${node.debugName ? ' (' + node.debugName + ')' : ''}: ${String(node.value)}]`;\n }\n\n runPostProducerCreatedFn(node);\n\n return computed as unknown as ComputedGetter;\n}\n\n/**\n * A dedicated symbol used before a computed value has been calculated for the first time.\n * Explicitly typed as `any` so we can use it as signal's value.\n */\nexport const UNSET: any = /* @__PURE__ */ Symbol('UNSET');\n\n/**\n * A dedicated symbol used in place of a computed signal value to indicate that a given computation\n * is in progress. Used to detect cycles in computation chains.\n * Explicitly typed as `any` so we can use it as signal's value.\n */\nexport const COMPUTING: any = /* @__PURE__ */ Symbol('COMPUTING');\n\n/**\n * A dedicated symbol used in place of a computed signal value to indicate that a given computation\n * failed. The thrown error is cached until the computation gets dirty again.\n * Explicitly typed as `any` so we can use it as signal's value.\n */\nexport const ERRORED: any = /* @__PURE__ */ Symbol('ERRORED');\n\n// Note: Using an IIFE here to ensure that the spread assignment is not considered\n// a side-effect, ending up preserving `COMPUTED_NODE` and `REACTIVE_NODE`.\nconst COMPUTED_NODE: Omit, 'computation'> = /* @__PURE__ */ (() => {\n return {\n ...REACTIVE_NODE,\n value: UNSET,\n dirty: true,\n error: null,\n equal: defaultEquals,\n kind: 'computed',\n\n producerMustRecompute(node: ComputedNode): boolean {\n // Force a recomputation if there's no current value, or if the current value is in the\n // process of being calculated (which should throw an error).\n return node.value === UNSET || node.value === COMPUTING;\n },\n\n producerRecomputeValue(node: ComputedNode): void {\n if (node.value === COMPUTING) {\n // Our computation somehow led to a cyclic read of itself.\n throw new Error(\n typeof ngDevMode !== 'undefined' && ngDevMode ? 'Detected cycle in computations.' : '',\n );\n }\n\n const oldValue = node.value;\n node.value = COMPUTING;\n\n const prevConsumer = consumerBeforeComputation(node);\n let newValue: unknown;\n let wasEqual = false;\n try {\n newValue = node.computation();\n // We want to mark this node as errored if calling `equal` throws; however, we don't want\n // to track any reactive reads inside `equal`.\n setActiveConsumer(null);\n wasEqual =\n oldValue !== UNSET &&\n oldValue !== ERRORED &&\n newValue !== ERRORED &&\n node.equal(oldValue, newValue);\n } catch (err) {\n newValue = ERRORED;\n node.error = err;\n } finally {\n consumerAfterComputation(node, prevConsumer);\n }\n\n if (wasEqual) {\n // No change to `valueVersion` - old and new values are\n // semantically equivalent.\n node.value = oldValue;\n return;\n }\n\n node.value = newValue;\n node.version++;\n },\n };\n})();\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport type {SignalNode} from './signal';\n\nfunction defaultThrowError(): never {\n throw new Error();\n}\n\nlet throwInvalidWriteToSignalErrorFn: (node: SignalNode) => never = defaultThrowError;\n\nexport function throwInvalidWriteToSignalError(node: SignalNode) {\n throwInvalidWriteToSignalErrorFn(node);\n}\n\nexport function setThrowInvalidWriteToSignalError(fn: (node: SignalNode) => never): void {\n throwInvalidWriteToSignalErrorFn = fn;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {defaultEquals, ValueEqualityFn} from './equality';\nimport {throwInvalidWriteToSignalError} from './errors';\nimport {\n producerAccessed,\n producerIncrementEpoch,\n producerNotifyConsumers,\n producerUpdatesAllowed,\n REACTIVE_NODE,\n ReactiveNode,\n ReactiveHookFn,\n runPostProducerCreatedFn,\n SIGNAL,\n} from './graph';\n\n// Required as the signals library is in a separate package, so we need to explicitly ensure the\n// global `ngDevMode` type is defined.\ndeclare const ngDevMode: boolean | undefined;\n\n/**\n * If set, called after `WritableSignal`s are updated.\n *\n * This hook can be used to achieve various effects, such as running effects synchronously as part\n * of setting a signal.\n */\nlet postSignalSetFn: ReactiveHookFn | null = null;\n\nexport interface SignalNode extends ReactiveNode {\n value: T;\n equal: ValueEqualityFn;\n}\n\nexport type SignalBaseGetter = (() => T) & {readonly [SIGNAL]: unknown};\nexport type SignalSetter = (newValue: T) => void;\nexport type SignalUpdater = (updateFn: (value: T) => T) => void;\n\n// Note: Closure *requires* this to be an `interface` and not a type, which is why the\n// `SignalBaseGetter` type exists to provide the correct shape.\nexport interface SignalGetter extends SignalBaseGetter {\n readonly [SIGNAL]: SignalNode;\n}\n\n/**\n * Creates a `Signal` getter, setter, and updater function.\n */\nexport function createSignal(\n initialValue: T,\n equal?: ValueEqualityFn,\n): [SignalGetter, SignalSetter, SignalUpdater] {\n const node: SignalNode = Object.create(SIGNAL_NODE);\n node.value = initialValue;\n if (equal !== undefined) {\n node.equal = equal;\n }\n const getter = (() => signalGetFn(node)) as SignalGetter;\n (getter as any)[SIGNAL] = node;\n if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n getter.toString = () =>\n `[Signal${node.debugName ? ' (' + node.debugName + ')' : ''}: ${String(node.value)}]`;\n }\n\n runPostProducerCreatedFn(node);\n const set = (newValue: T) => signalSetFn(node, newValue);\n const update = (updateFn: (value: T) => T) => signalUpdateFn(node, updateFn);\n return [getter, set, update];\n}\n\nexport function setPostSignalSetFn(fn: ReactiveHookFn | null): ReactiveHookFn | null {\n const prev = postSignalSetFn;\n postSignalSetFn = fn;\n return prev;\n}\n\nexport function signalGetFn(node: SignalNode): T {\n producerAccessed(node);\n return node.value;\n}\n\nexport function signalSetFn(node: SignalNode, newValue: T) {\n if (!producerUpdatesAllowed()) {\n throwInvalidWriteToSignalError(node);\n }\n\n if (!node.equal(node.value, newValue)) {\n node.value = newValue;\n signalValueChanged(node);\n }\n}\n\nexport function signalUpdateFn(node: SignalNode, updater: (value: T) => T): void {\n if (!producerUpdatesAllowed()) {\n throwInvalidWriteToSignalError(node);\n }\n\n signalSetFn(node, updater(node.value));\n}\n\nexport function runPostSignalSetFn(node: SignalNode): void {\n postSignalSetFn?.(node);\n}\n\n// Note: Using an IIFE here to ensure that the spread assignment is not considered\n// a side-effect, ending up preserving `COMPUTED_NODE` and `REACTIVE_NODE`.\nexport const SIGNAL_NODE: SignalNode = /* @__PURE__ */ (() => {\n return {\n ...REACTIVE_NODE,\n equal: defaultEquals,\n value: undefined,\n kind: 'signal',\n };\n})();\n\nfunction signalValueChanged(node: SignalNode): void {\n node.version++;\n producerIncrementEpoch();\n producerNotifyConsumers(node);\n postSignalSetFn?.(node);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n consumerAfterComputation,\n consumerBeforeComputation,\n consumerPollProducersForChange,\n REACTIVE_NODE,\n ReactiveNode,\n} from './graph';\n\n/**\n * An effect can, optionally, register a cleanup function. If registered, the cleanup is executed\n * before the next effect run. The cleanup function makes it possible to \"cancel\" any work that the\n * previous effect run might have started.\n */\nexport type EffectCleanupFn = () => void;\n\n/**\n * A callback passed to the effect function that makes it possible to register cleanup logic.\n */\nexport type EffectCleanupRegisterFn = (cleanupFn: EffectCleanupFn) => void;\n\nexport interface BaseEffectNode extends ReactiveNode {\n fn: () => void;\n destroy(): void;\n cleanup(): void;\n run(): void;\n}\n\nexport const BASE_EFFECT_NODE: Omit =\n /* @__PURE__ */ (() => ({\n ...REACTIVE_NODE,\n consumerIsAlwaysLive: true,\n consumerAllowSignalWrites: true,\n dirty: true,\n kind: 'effect',\n }))();\n\nexport function runEffect(node: BaseEffectNode) {\n node.dirty = false;\n if (node.version > 0 && !consumerPollProducersForChange(node)) {\n return;\n }\n node.version++;\n const prevNode = consumerBeforeComputation(node);\n try {\n node.cleanup();\n node.fn();\n } finally {\n consumerAfterComputation(node, prevNode);\n }\n}\n","/**\n * @license Angular v22.2.4\n * (c) 2010-2026 Google LLC. https://angular.dev/\n * License: MIT\n */\n\nconst _currentInjector = [undefined];\nfunction getCurrentInjector() {\n return _currentInjector[0];\n}\nfunction setCurrentInjector(injector) {\n const former = _currentInjector[0];\n _currentInjector[0] = injector;\n return former;\n}\nfunction inject(token, options) {\n const currentInjector = getCurrentInjector();\n if (!currentInjector) {\n throw new Error('Current injector is not set.');\n }\n if (!token.ษตprov) {\n throw new Error('Token is not an injectable');\n }\n return currentInjector.retrieve(token, options);\n}\n\nconst NOT_FOUND = /*#__PURE__*/ Symbol('NotFound');\nclass NotFoundError extends Error {\n name = 'ษตNotFound';\n constructor(message) {\n super(message);\n }\n}\nfunction isNotFound(e) {\n return e === NOT_FOUND || e?.name === 'ษตNotFound';\n}\n\nexport { NOT_FOUND, NotFoundError, getCurrentInjector, inject, isNotFound, setCurrentInjector };\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {COMPUTING, ERRORED, UNSET} from './computed';\nimport {defaultEquals, ValueEqualityFn} from './equality';\nimport {\n consumerAfterComputation,\n consumerBeforeComputation,\n producerAccessed,\n producerMarkClean,\n producerUpdateValueVersion,\n REACTIVE_NODE,\n ReactiveNode,\n runPostProducerCreatedFn,\n setActiveConsumer,\n SIGNAL,\n} from './graph';\nimport {signalSetFn, signalUpdateFn} from './signal';\n\n// Required as the signals library is in a separate package, so we need to explicitly ensure the\n// global `ngDevMode` type is defined.\ndeclare const ngDevMode: boolean | undefined;\n\nexport type ComputationFn = (source: S, previous?: PreviousValue) => D;\nexport type PreviousValue = {source: S; value: D};\n\nexport interface LinkedSignalNode extends ReactiveNode {\n /**\n * Value of the source signal that was used to derive the computed value.\n */\n sourceValue: S;\n\n /**\n * Current state value, or one of the sentinel values (`UNSET`, `COMPUTING`,\n * `ERROR`).\n */\n value: D;\n\n /**\n * If `value` is `ERRORED`, the error caught from the last computation attempt which will\n * be re-thrown.\n */\n error: unknown;\n\n /**\n * The source function represents reactive dependency based on which the linked state is reset.\n */\n source: () => S;\n\n /**\n * The computation function which will produce a new value based on the source and, optionally - previous values.\n */\n computation: ComputationFn;\n\n equal: ValueEqualityFn;\n}\n\nexport type LinkedSignalGetter = (() => D) & {\n [SIGNAL]: LinkedSignalNode;\n};\n\nexport function createLinkedSignal(\n sourceFn: () => S,\n computationFn: ComputationFn,\n equalityFn?: ValueEqualityFn,\n): LinkedSignalGetter {\n const node: LinkedSignalNode = Object.create(LINKED_SIGNAL_NODE);\n\n node.source = sourceFn;\n node.computation = computationFn;\n if (equalityFn != undefined) {\n node.equal = equalityFn;\n }\n\n const linkedSignalGetter = () => {\n // Check if the value needs updating before returning it.\n producerUpdateValueVersion(node);\n\n // Record that someone looked at this signal.\n producerAccessed(node);\n\n if (node.value === ERRORED) {\n throw node.error;\n }\n\n return node.value;\n };\n\n const getter = linkedSignalGetter as LinkedSignalGetter;\n getter[SIGNAL] = node;\n if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n getter.toString = () =>\n `[LinkedSignal${node.debugName ? ' (' + node.debugName + ')' : ''}: ${String(node.value)}]`;\n }\n\n runPostProducerCreatedFn(node);\n\n return getter;\n}\n\nexport function linkedSignalSetFn(node: LinkedSignalNode, newValue: D) {\n producerUpdateValueVersion(node);\n signalSetFn(node, newValue);\n producerMarkClean(node);\n}\n\nexport function linkedSignalUpdateFn(\n node: LinkedSignalNode,\n updater: (value: D) => D,\n): void {\n producerUpdateValueVersion(node);\n // update() on a linked signal can't work if the current state is ERRORED, as there's no value.\n if (node.value === ERRORED) {\n throw node.error;\n }\n signalUpdateFn(node, updater);\n producerMarkClean(node);\n}\n\n// Note: Using an IIFE here to ensure that the spread assignment is not considered\n// a side-effect, ending up preserving `LINKED_SIGNAL_NODE` and `REACTIVE_NODE`.\nexport const LINKED_SIGNAL_NODE: Omit<\n LinkedSignalNode,\n 'computation' | 'source' | 'sourceValue'\n> = /* @__PURE__ */ (() => {\n return {\n ...REACTIVE_NODE,\n value: UNSET,\n dirty: true,\n error: null,\n equal: defaultEquals,\n kind: 'linkedSignal',\n\n producerMustRecompute(node: LinkedSignalNode): boolean {\n // Force a recomputation if there's no current value, or if the current value is in the\n // process of being calculated (which should throw an error).\n return node.value === UNSET || node.value === COMPUTING;\n },\n\n producerRecomputeValue(node: LinkedSignalNode): void {\n if (node.value === COMPUTING) {\n // Our computation somehow led to a cyclic read of itself.\n throw new Error(\n typeof ngDevMode !== 'undefined' && ngDevMode ? 'Detected cycle in computations.' : '',\n );\n }\n\n const oldValue = node.value;\n node.value = COMPUTING;\n\n const prevConsumer = consumerBeforeComputation(node);\n let newValue: unknown;\n let wasEqual = false;\n try {\n const newSourceValue = node.source();\n const oldValueValid = oldValue !== UNSET && oldValue !== ERRORED;\n const prev = oldValueValid\n ? {\n source: node.sourceValue,\n value: oldValue,\n }\n : undefined;\n newValue = node.computation(newSourceValue, prev);\n node.sourceValue = newSourceValue;\n // We want to mark this node as errored if calling `equal` throws; however, we don't want\n // to track any reactive reads inside `equal`.\n setActiveConsumer(null);\n wasEqual = oldValueValid && newValue !== ERRORED && node.equal(oldValue, newValue);\n } catch (err) {\n newValue = ERRORED;\n node.error = err;\n } finally {\n consumerAfterComputation(node, prevConsumer);\n }\n\n if (wasEqual) {\n // No change to `valueVersion` - old and new values are\n // semantically equivalent.\n node.value = oldValue;\n return;\n }\n\n node.value = newValue;\n node.version++;\n },\n };\n})();\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {setActiveConsumer} from './graph';\n\n/**\n * Execute an arbitrary function in a non-reactive (non-tracking) context. The executed function\n * can, optionally, return a value.\n */\nexport function untracked(nonReactiveReadsFn: () => T): T {\n const prevConsumer = setActiveConsumer(null);\n // We are not trying to catch any particular errors here, just making sure that the consumers\n // stack is restored in case of errors.\n try {\n return nonReactiveReadsFn();\n } finally {\n setActiveConsumer(prevConsumer);\n }\n}\n","export function isFunction(value) {\n return typeof value === 'function';\n}\n","export function createErrorClass(createImpl) {\n const _super = (instance) => {\n Error.call(instance);\n instance.stack = new Error().stack;\n };\n const ctorFunc = createImpl(_super);\n ctorFunc.prototype = Object.create(Error.prototype);\n ctorFunc.prototype.constructor = ctorFunc;\n return ctorFunc;\n}\n","import { createErrorClass } from './createErrorClass';\nexport const UnsubscriptionError = createErrorClass((_super) => function UnsubscriptionErrorImpl(errors) {\n _super(this);\n this.message = errors\n ? `${errors.length} errors occurred during unsubscription:\n${errors.map((err, i) => `${i + 1}) ${err.toString()}`).join('\\n ')}`\n : '';\n this.name = 'UnsubscriptionError';\n this.errors = errors;\n});\n","export function arrRemove(arr, item) {\n if (arr) {\n const index = arr.indexOf(item);\n 0 <= index && arr.splice(index, 1);\n }\n}\n","import { isFunction } from './util/isFunction';\nimport { UnsubscriptionError } from './util/UnsubscriptionError';\nimport { arrRemove } from './util/arrRemove';\nexport class Subscription {\n constructor(initialTeardown) {\n this.initialTeardown = initialTeardown;\n this.closed = false;\n this._parentage = null;\n this._finalizers = null;\n }\n unsubscribe() {\n let errors;\n if (!this.closed) {\n this.closed = true;\n const { _parentage } = this;\n if (_parentage) {\n this._parentage = null;\n if (Array.isArray(_parentage)) {\n for (const parent of _parentage) {\n parent.remove(this);\n }\n }\n else {\n _parentage.remove(this);\n }\n }\n const { initialTeardown: initialFinalizer } = this;\n if (isFunction(initialFinalizer)) {\n try {\n initialFinalizer();\n }\n catch (e) {\n errors = e instanceof UnsubscriptionError ? e.errors : [e];\n }\n }\n const { _finalizers } = this;\n if (_finalizers) {\n this._finalizers = null;\n for (const finalizer of _finalizers) {\n try {\n execFinalizer(finalizer);\n }\n catch (err) {\n errors = errors !== null && errors !== void 0 ? errors : [];\n if (err instanceof UnsubscriptionError) {\n errors = [...errors, ...err.errors];\n }\n else {\n errors.push(err);\n }\n }\n }\n }\n if (errors) {\n throw new UnsubscriptionError(errors);\n }\n }\n }\n add(teardown) {\n var _a;\n if (teardown && teardown !== this) {\n if (this.closed) {\n execFinalizer(teardown);\n }\n else {\n if (teardown instanceof Subscription) {\n if (teardown.closed || teardown._hasParent(this)) {\n return;\n }\n teardown._addParent(this);\n }\n (this._finalizers = (_a = this._finalizers) !== null && _a !== void 0 ? _a : []).push(teardown);\n }\n }\n }\n _hasParent(parent) {\n const { _parentage } = this;\n return _parentage === parent || (Array.isArray(_parentage) && _parentage.includes(parent));\n }\n _addParent(parent) {\n const { _parentage } = this;\n this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent;\n }\n _removeParent(parent) {\n const { _parentage } = this;\n if (_parentage === parent) {\n this._parentage = null;\n }\n else if (Array.isArray(_parentage)) {\n arrRemove(_parentage, parent);\n }\n }\n remove(teardown) {\n const { _finalizers } = this;\n _finalizers && arrRemove(_finalizers, teardown);\n if (teardown instanceof Subscription) {\n teardown._removeParent(this);\n }\n }\n}\nSubscription.EMPTY = (() => {\n const empty = new Subscription();\n empty.closed = true;\n return empty;\n})();\nexport const EMPTY_SUBSCRIPTION = Subscription.EMPTY;\nexport function isSubscription(value) {\n return (value instanceof Subscription ||\n (value && 'closed' in value && isFunction(value.remove) && isFunction(value.add) && isFunction(value.unsubscribe)));\n}\nfunction execFinalizer(finalizer) {\n if (isFunction(finalizer)) {\n finalizer();\n }\n else {\n finalizer.unsubscribe();\n }\n}\n","export const config = {\n onUnhandledError: null,\n onStoppedNotification: null,\n Promise: undefined,\n useDeprecatedSynchronousErrorHandling: false,\n useDeprecatedNextContext: false,\n};\n","export const timeoutProvider = {\n setTimeout(handler, timeout, ...args) {\n const { delegate } = timeoutProvider;\n if (delegate === null || delegate === void 0 ? void 0 : delegate.setTimeout) {\n return delegate.setTimeout(handler, timeout, ...args);\n }\n return setTimeout(handler, timeout, ...args);\n },\n clearTimeout(handle) {\n const { delegate } = timeoutProvider;\n return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearTimeout) || clearTimeout)(handle);\n },\n delegate: undefined,\n};\n","import { config } from '../config';\nimport { timeoutProvider } from '../scheduler/timeoutProvider';\nexport function reportUnhandledError(err) {\n timeoutProvider.setTimeout(() => {\n const { onUnhandledError } = config;\n if (onUnhandledError) {\n onUnhandledError(err);\n }\n else {\n throw err;\n }\n });\n}\n","export function noop() { }\n","export const COMPLETE_NOTIFICATION = (() => createNotification('C', undefined, undefined))();\nexport function errorNotification(error) {\n return createNotification('E', undefined, error);\n}\nexport function nextNotification(value) {\n return createNotification('N', value, undefined);\n}\nexport function createNotification(kind, value, error) {\n return {\n kind,\n value,\n error,\n };\n}\n","import { config } from '../config';\nlet context = null;\nexport function errorContext(cb) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n const isRoot = !context;\n if (isRoot) {\n context = { errorThrown: false, error: null };\n }\n cb();\n if (isRoot) {\n const { errorThrown, error } = context;\n context = null;\n if (errorThrown) {\n throw error;\n }\n }\n }\n else {\n cb();\n }\n}\nexport function captureError(err) {\n if (config.useDeprecatedSynchronousErrorHandling && context) {\n context.errorThrown = true;\n context.error = err;\n }\n}\n","import { isFunction } from './util/isFunction';\nimport { isSubscription, Subscription } from './Subscription';\nimport { config } from './config';\nimport { reportUnhandledError } from './util/reportUnhandledError';\nimport { noop } from './util/noop';\nimport { nextNotification, errorNotification, COMPLETE_NOTIFICATION } from './NotificationFactories';\nimport { timeoutProvider } from './scheduler/timeoutProvider';\nimport { captureError } from './util/errorContext';\nexport class Subscriber extends Subscription {\n constructor(destination) {\n super();\n this.isStopped = false;\n if (destination) {\n this.destination = destination;\n if (isSubscription(destination)) {\n destination.add(this);\n }\n }\n else {\n this.destination = EMPTY_OBSERVER;\n }\n }\n static create(next, error, complete) {\n return new SafeSubscriber(next, error, complete);\n }\n next(value) {\n if (this.isStopped) {\n handleStoppedNotification(nextNotification(value), this);\n }\n else {\n this._next(value);\n }\n }\n error(err) {\n if (this.isStopped) {\n handleStoppedNotification(errorNotification(err), this);\n }\n else {\n this.isStopped = true;\n this._error(err);\n }\n }\n complete() {\n if (this.isStopped) {\n handleStoppedNotification(COMPLETE_NOTIFICATION, this);\n }\n else {\n this.isStopped = true;\n this._complete();\n }\n }\n unsubscribe() {\n if (!this.closed) {\n this.isStopped = true;\n super.unsubscribe();\n this.destination = null;\n }\n }\n _next(value) {\n this.destination.next(value);\n }\n _error(err) {\n try {\n this.destination.error(err);\n }\n finally {\n this.unsubscribe();\n }\n }\n _complete() {\n try {\n this.destination.complete();\n }\n finally {\n this.unsubscribe();\n }\n }\n}\nconst _bind = Function.prototype.bind;\nfunction bind(fn, thisArg) {\n return _bind.call(fn, thisArg);\n}\nclass ConsumerObserver {\n constructor(partialObserver) {\n this.partialObserver = partialObserver;\n }\n next(value) {\n const { partialObserver } = this;\n if (partialObserver.next) {\n try {\n partialObserver.next(value);\n }\n catch (error) {\n handleUnhandledError(error);\n }\n }\n }\n error(err) {\n const { partialObserver } = this;\n if (partialObserver.error) {\n try {\n partialObserver.error(err);\n }\n catch (error) {\n handleUnhandledError(error);\n }\n }\n else {\n handleUnhandledError(err);\n }\n }\n complete() {\n const { partialObserver } = this;\n if (partialObserver.complete) {\n try {\n partialObserver.complete();\n }\n catch (error) {\n handleUnhandledError(error);\n }\n }\n }\n}\nexport class SafeSubscriber extends Subscriber {\n constructor(observerOrNext, error, complete) {\n super();\n let partialObserver;\n if (isFunction(observerOrNext) || !observerOrNext) {\n partialObserver = {\n next: (observerOrNext !== null && observerOrNext !== void 0 ? observerOrNext : undefined),\n error: error !== null && error !== void 0 ? error : undefined,\n complete: complete !== null && complete !== void 0 ? complete : undefined,\n };\n }\n else {\n let context;\n if (this && config.useDeprecatedNextContext) {\n context = Object.create(observerOrNext);\n context.unsubscribe = () => this.unsubscribe();\n partialObserver = {\n next: observerOrNext.next && bind(observerOrNext.next, context),\n error: observerOrNext.error && bind(observerOrNext.error, context),\n complete: observerOrNext.complete && bind(observerOrNext.complete, context),\n };\n }\n else {\n partialObserver = observerOrNext;\n }\n }\n this.destination = new ConsumerObserver(partialObserver);\n }\n}\nfunction handleUnhandledError(error) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n captureError(error);\n }\n else {\n reportUnhandledError(error);\n }\n}\nfunction defaultErrorHandler(err) {\n throw err;\n}\nfunction handleStoppedNotification(notification, subscriber) {\n const { onStoppedNotification } = config;\n onStoppedNotification && timeoutProvider.setTimeout(() => onStoppedNotification(notification, subscriber));\n}\nexport const EMPTY_OBSERVER = {\n closed: true,\n next: noop,\n error: defaultErrorHandler,\n complete: noop,\n};\n","export const observable = (() => (typeof Symbol === 'function' && Symbol.observable) || '@@observable')();\n","export function identity(x) {\n return x;\n}\n","import { identity } from './identity';\nexport function pipe(...fns) {\n return pipeFromArray(fns);\n}\nexport function pipeFromArray(fns) {\n if (fns.length === 0) {\n return identity;\n }\n if (fns.length === 1) {\n return fns[0];\n }\n return function piped(input) {\n return fns.reduce((prev, fn) => fn(prev), input);\n };\n}\n","import { SafeSubscriber, Subscriber } from './Subscriber';\nimport { isSubscription } from './Subscription';\nimport { observable as Symbol_observable } from './symbol/observable';\nimport { pipeFromArray } from './util/pipe';\nimport { config } from './config';\nimport { isFunction } from './util/isFunction';\nimport { errorContext } from './util/errorContext';\nexport class Observable {\n constructor(subscribe) {\n if (subscribe) {\n this._subscribe = subscribe;\n }\n }\n lift(operator) {\n const observable = new Observable();\n observable.source = this;\n observable.operator = operator;\n return observable;\n }\n subscribe(observerOrNext, error, complete) {\n const subscriber = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error, complete);\n errorContext(() => {\n const { operator, source } = this;\n subscriber.add(operator\n ?\n operator.call(subscriber, source)\n : source\n ?\n this._subscribe(subscriber)\n :\n this._trySubscribe(subscriber));\n });\n return subscriber;\n }\n _trySubscribe(sink) {\n try {\n return this._subscribe(sink);\n }\n catch (err) {\n sink.error(err);\n }\n }\n forEach(next, promiseCtor) {\n promiseCtor = getPromiseCtor(promiseCtor);\n return new promiseCtor((resolve, reject) => {\n const subscriber = new SafeSubscriber({\n next: (value) => {\n try {\n next(value);\n }\n catch (err) {\n reject(err);\n subscriber.unsubscribe();\n }\n },\n error: reject,\n complete: resolve,\n });\n this.subscribe(subscriber);\n });\n }\n _subscribe(subscriber) {\n var _a;\n return (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber);\n }\n [Symbol_observable]() {\n return this;\n }\n pipe(...operations) {\n return pipeFromArray(operations)(this);\n }\n toPromise(promiseCtor) {\n promiseCtor = getPromiseCtor(promiseCtor);\n return new promiseCtor((resolve, reject) => {\n let value;\n this.subscribe((x) => (value = x), (err) => reject(err), () => resolve(value));\n });\n }\n}\nObservable.create = (subscribe) => {\n return new Observable(subscribe);\n};\nfunction getPromiseCtor(promiseCtor) {\n var _a;\n return (_a = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : config.Promise) !== null && _a !== void 0 ? _a : Promise;\n}\nfunction isObserver(value) {\n return value && isFunction(value.next) && isFunction(value.error) && isFunction(value.complete);\n}\nfunction isSubscriber(value) {\n return (value && value instanceof Subscriber) || (isObserver(value) && isSubscription(value));\n}\n","import { isFunction } from './isFunction';\nexport function hasLift(source) {\n return isFunction(source === null || source === void 0 ? void 0 : source.lift);\n}\nexport function operate(init) {\n return (source) => {\n if (hasLift(source)) {\n return source.lift(function (liftedSource) {\n try {\n return init(liftedSource, this);\n }\n catch (err) {\n this.error(err);\n }\n });\n }\n throw new TypeError('Unable to lift unknown Observable type');\n };\n}\n","import { Subscriber } from '../Subscriber';\nexport function createOperatorSubscriber(destination, onNext, onComplete, onError, onFinalize) {\n return new OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize);\n}\nexport class OperatorSubscriber extends Subscriber {\n constructor(destination, onNext, onComplete, onError, onFinalize, shouldUnsubscribe) {\n super(destination);\n this.onFinalize = onFinalize;\n this.shouldUnsubscribe = shouldUnsubscribe;\n this._next = onNext\n ? function (value) {\n try {\n onNext(value);\n }\n catch (err) {\n destination.error(err);\n }\n }\n : super._next;\n this._error = onError\n ? function (err) {\n try {\n onError(err);\n }\n catch (err) {\n destination.error(err);\n }\n finally {\n this.unsubscribe();\n }\n }\n : super._error;\n this._complete = onComplete\n ? function () {\n try {\n onComplete();\n }\n catch (err) {\n destination.error(err);\n }\n finally {\n this.unsubscribe();\n }\n }\n : super._complete;\n }\n unsubscribe() {\n var _a;\n if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) {\n const { closed } = this;\n super.unsubscribe();\n !closed && ((_a = this.onFinalize) === null || _a === void 0 ? void 0 : _a.call(this));\n }\n }\n}\n","import { createErrorClass } from './createErrorClass';\nexport const ObjectUnsubscribedError = createErrorClass((_super) => function ObjectUnsubscribedErrorImpl() {\n _super(this);\n this.name = 'ObjectUnsubscribedError';\n this.message = 'object unsubscribed';\n});\n","import { Observable } from './Observable';\nimport { Subscription, EMPTY_SUBSCRIPTION } from './Subscription';\nimport { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';\nimport { arrRemove } from './util/arrRemove';\nimport { errorContext } from './util/errorContext';\nexport class Subject extends Observable {\n constructor() {\n super();\n this.closed = false;\n this.currentObservers = null;\n this.observers = [];\n this.isStopped = false;\n this.hasError = false;\n this.thrownError = null;\n }\n lift(operator) {\n const subject = new AnonymousSubject(this, this);\n subject.operator = operator;\n return subject;\n }\n _throwIfClosed() {\n if (this.closed) {\n throw new ObjectUnsubscribedError();\n }\n }\n next(value) {\n errorContext(() => {\n this._throwIfClosed();\n if (!this.isStopped) {\n if (!this.currentObservers) {\n this.currentObservers = Array.from(this.observers);\n }\n for (const observer of this.currentObservers) {\n observer.next(value);\n }\n }\n });\n }\n error(err) {\n errorContext(() => {\n this._throwIfClosed();\n if (!this.isStopped) {\n this.hasError = this.isStopped = true;\n this.thrownError = err;\n const { observers } = this;\n while (observers.length) {\n observers.shift().error(err);\n }\n }\n });\n }\n complete() {\n errorContext(() => {\n this._throwIfClosed();\n if (!this.isStopped) {\n this.isStopped = true;\n const { observers } = this;\n while (observers.length) {\n observers.shift().complete();\n }\n }\n });\n }\n unsubscribe() {\n this.isStopped = this.closed = true;\n this.observers = this.currentObservers = null;\n }\n get observed() {\n var _a;\n return ((_a = this.observers) === null || _a === void 0 ? void 0 : _a.length) > 0;\n }\n _trySubscribe(subscriber) {\n this._throwIfClosed();\n return super._trySubscribe(subscriber);\n }\n _subscribe(subscriber) {\n this._throwIfClosed();\n this._checkFinalizedStatuses(subscriber);\n return this._innerSubscribe(subscriber);\n }\n _innerSubscribe(subscriber) {\n const { hasError, isStopped, observers } = this;\n if (hasError || isStopped) {\n return EMPTY_SUBSCRIPTION;\n }\n this.currentObservers = null;\n observers.push(subscriber);\n return new Subscription(() => {\n this.currentObservers = null;\n arrRemove(observers, subscriber);\n });\n }\n _checkFinalizedStatuses(subscriber) {\n const { hasError, thrownError, isStopped } = this;\n if (hasError) {\n subscriber.error(thrownError);\n }\n else if (isStopped) {\n subscriber.complete();\n }\n }\n asObservable() {\n const observable = new Observable();\n observable.source = this;\n return observable;\n }\n}\nSubject.create = (destination, source) => {\n return new AnonymousSubject(destination, source);\n};\nexport class AnonymousSubject extends Subject {\n constructor(destination, source) {\n super();\n this.destination = destination;\n this.source = source;\n }\n next(value) {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.next) === null || _b === void 0 ? void 0 : _b.call(_a, value);\n }\n error(err) {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.call(_a, err);\n }\n complete() {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.complete) === null || _b === void 0 ? void 0 : _b.call(_a);\n }\n _subscribe(subscriber) {\n var _a, _b;\n return (_b = (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber)) !== null && _b !== void 0 ? _b : EMPTY_SUBSCRIPTION;\n }\n}\n","import { Subject } from './Subject';\nexport class BehaviorSubject extends Subject {\n constructor(_value) {\n super();\n this._value = _value;\n }\n get value() {\n return this.getValue();\n }\n _subscribe(subscriber) {\n const subscription = super._subscribe(subscriber);\n !subscription.closed && subscriber.next(this._value);\n return subscription;\n }\n getValue() {\n const { hasError, thrownError, _value } = this;\n if (hasError) {\n throw thrownError;\n }\n this._throwIfClosed();\n return _value;\n }\n next(value) {\n super.next((this._value = value));\n }\n}\n","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function map(project, thisArg) {\n return operate((source, subscriber) => {\n let index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n subscriber.next(project.call(thisArg, value, index++));\n }));\n });\n}\n","/**\n * @license Angular v22.2.4\n * (c) 2010-2026 Google LLC. https://angular.dev/\n * License: MIT\n */\n\nimport { getActiveConsumer, setActiveConsumer as setActiveConsumer$1, createSignal, SIGNAL, consumerDestroy, BASE_EFFECT_NODE, isInNotificationPhase, runEffect } from './_effect-chunk.mjs';\nimport { isNotFound, getCurrentInjector, setCurrentInjector } from './_not_found-chunk.mjs';\nimport { isNotFound as isNotFound$1 } from '@angular/core/primitives/di';\nimport { setActiveConsumer } from '@angular/core/primitives/signals';\nimport { BehaviorSubject, Observable, Subject, Subscription } from 'rxjs';\n\nclass Version {\n full;\n major;\n minor;\n patch;\n constructor(full) {\n this.full = full;\n const parts = full.split('.');\n this.major = parts[0];\n this.minor = parts[1];\n this.patch = parts.slice(2).join('.');\n }\n}\nconst VERSION = /* @__PURE__ */new Version('22.2.4');\n\nconst DOC_PAGE_BASE_URL = /*#__PURE__*/ (() => {\n const full = VERSION.full;\n const isPreRelease = full.includes('-next') || full.includes('-rc') || full === '0.0.0' + '-PLACEHOLDER';\n const prefix = isPreRelease ? 'next' : `v${VERSION.major}`;\n return `https://${prefix}.angular.dev`;\n})();\nconst ERROR_DETAILS_PAGE_BASE_URL = /*#__PURE__*/ (() => {\n return `${DOC_PAGE_BASE_URL}/errors`;\n})();\nconst XSS_SECURITY_URL = 'https://angular.dev/best-practices/security#preventing-cross-site-scripting-xss';\n\nclass RuntimeError extends Error {\n code;\n constructor(code, message) {\n super(formatRuntimeError(code, message));\n this.code = code;\n }\n}\nfunction formatRuntimeErrorCode(code) {\n return `NG0${Math.abs(code)}`;\n}\nfunction formatRuntimeError(code, message) {\n const fullCode = formatRuntimeErrorCode(code);\n let errorMessage = `${fullCode}${message ? ': ' + message : ''}`;\n if (ngDevMode && code < 0) {\n const addPeriodSeparator = !errorMessage.match(/[.,;!?\\n]$/);\n const separator = addPeriodSeparator ? '.' : '';\n errorMessage = `${errorMessage}${separator} Find more at ${ERROR_DETAILS_PAGE_BASE_URL}/${fullCode}`;\n }\n return errorMessage;\n}\n\nfunction getClosureSafeProperty(objWithPropertyToExtract) {\n for (let key in objWithPropertyToExtract) {\n if (objWithPropertyToExtract[key] === getClosureSafeProperty) {\n return key;\n }\n }\n throw Error(typeof ngDevMode !== 'undefined' && ngDevMode ? 'Could not find renamed property on target object.' : '');\n}\nfunction fillProperties(target, source) {\n for (const key in source) {\n if (Object.hasOwn(source, key) && !Object.hasOwn(target, key)) {\n target[key] = source[key];\n }\n }\n}\n\nfunction stringify(token) {\n if (typeof token === 'string') {\n return token;\n }\n if (Array.isArray(token)) {\n return `[${token.map(stringify).join(', ')}]`;\n }\n if (token == null) {\n return '' + token;\n }\n const name = token.overriddenName || token.name;\n if (name) {\n return `${name}`;\n }\n const result = token.toString();\n if (result == null) {\n return '' + result;\n }\n const newLineIndex = result.indexOf('\\n');\n return newLineIndex >= 0 ? result.slice(0, newLineIndex) : result;\n}\nfunction concatStringsWithSpace(before, after) {\n if (!before) return after || '';\n if (!after) return before;\n return `${before} ${after}`;\n}\nfunction truncateMiddle(str, maxLength = 100) {\n if (!str || maxLength < 1 || str.length <= maxLength) return str;\n if (maxLength == 1) return str.substring(0, 1) + '...';\n const halfLimit = Math.round(maxLength / 2);\n return str.substring(0, halfLimit) + '...' + str.substring(str.length - halfLimit);\n}\n\nconst __forward_ref__ = /*#__PURE__*/ getClosureSafeProperty({\n __forward_ref__: getClosureSafeProperty\n});\nfunction forwardRef(forwardRefFn) {\n forwardRefFn.__forward_ref__ = forwardRef;\n if (ngDevMode) {\n forwardRefFn.toString = function () {\n return stringify(this());\n };\n }\n return forwardRefFn;\n}\nfunction resolveForwardRef(type) {\n return isForwardRef(type) ? type() : type;\n}\nfunction isForwardRef(fn) {\n return typeof fn === 'function' && Object.hasOwn(fn, __forward_ref__) && fn.__forward_ref__ === forwardRef;\n}\n\nfunction assertNumber(actual, msg) {\n if (!(typeof actual === 'number')) {\n throwError(msg, typeof actual, 'number', '===');\n }\n}\nfunction assertNumberInRange(actual, minInclusive, maxInclusive) {\n assertNumber(actual, 'Expected a number');\n assertLessThanOrEqual(actual, maxInclusive, 'Expected number to be less than or equal to');\n assertGreaterThanOrEqual(actual, minInclusive, 'Expected number to be greater than or equal to');\n}\nfunction assertString(actual, msg) {\n if (!(typeof actual === 'string')) {\n throwError(msg, actual === null ? 'null' : typeof actual, 'string', '===');\n }\n}\nfunction assertFunction(actual, msg) {\n if (!(typeof actual === 'function')) {\n throwError(msg, actual === null ? 'null' : typeof actual, 'function', '===');\n }\n}\nfunction assertEqual(actual, expected, msg) {\n if (!(actual == expected)) {\n throwError(msg, actual, expected, '==');\n }\n}\nfunction assertNotEqual(actual, expected, msg) {\n if (!(actual != expected)) {\n throwError(msg, actual, expected, '!=');\n }\n}\nfunction assertSame(actual, expected, msg) {\n if (!(actual === expected)) {\n throwError(msg, actual, expected, '===');\n }\n}\nfunction assertNotSame(actual, expected, msg) {\n if (!(actual !== expected)) {\n throwError(msg, actual, expected, '!==');\n }\n}\nfunction assertLessThan(actual, expected, msg) {\n if (!(actual < expected)) {\n throwError(msg, actual, expected, '<');\n }\n}\nfunction assertLessThanOrEqual(actual, expected, msg) {\n if (!(actual <= expected)) {\n throwError(msg, actual, expected, '<=');\n }\n}\nfunction assertGreaterThan(actual, expected, msg) {\n if (!(actual > expected)) {\n throwError(msg, actual, expected, '>');\n }\n}\nfunction assertGreaterThanOrEqual(actual, expected, msg) {\n if (!(actual >= expected)) {\n throwError(msg, actual, expected, '>=');\n }\n}\nfunction assertNotDefined(actual, msg) {\n if (actual != null) {\n throwError(msg, actual, null, '==');\n }\n}\nfunction assertDefined(actual, msg) {\n if (actual == null) {\n throwError(msg, actual, null, '!=');\n }\n}\nfunction throwError(msg, actual, expected, comparison) {\n throw new Error(`ASSERTION ERROR: ${msg}` + (comparison == null ? '' : ` [Expected=> ${expected} ${comparison} ${actual} <=Actual]`));\n}\nfunction assertDomNode(node) {\n if (!(node instanceof Node)) {\n throwError(`The provided value must be an instance of a DOM Node but got ${stringify(node)}`);\n }\n}\nfunction assertElement(node) {\n if (!(node instanceof Element)) {\n throwError(`The provided value must be an element but got ${stringify(node)}`);\n }\n}\nfunction assertIndexInRange(arr, index) {\n assertDefined(arr, 'Array must be defined.');\n const maxLen = arr.length;\n if (index < 0 || index >= maxLen) {\n throwError(`Index expected to be less than ${maxLen} but got ${index}`);\n }\n}\nfunction assertOneOf(value, ...validValues) {\n if (validValues.indexOf(value) !== -1) return true;\n throwError(`Expected value to be one of ${JSON.stringify(validValues)} but was ${JSON.stringify(value)}.`);\n}\nfunction assertNotReactive(fn) {\n if (getActiveConsumer() !== null) {\n throwError(`${fn}() should never be called in a reactive context.`);\n }\n}\n\nfunction ษตษตdefineInjectable(opts) {\n return {\n token: opts.token,\n providedIn: opts.providedIn || null,\n factory: opts.factory,\n value: undefined\n };\n}\nfunction ษตษตdefineInjector(options) {\n return {\n providers: options.providers || [],\n imports: options.imports || []\n };\n}\nfunction getInjectableDef(type) {\n return getOwnDefinition(type, NG_PROV_DEF);\n}\nfunction isInjectable(type) {\n return getInjectableDef(type) !== null;\n}\nfunction getOwnDefinition(type, field) {\n return Object.hasOwn(type, field) && type[field] || null;\n}\nfunction getInheritedInjectableDef(type) {\n const def = type?.[NG_PROV_DEF] ?? null;\n if (def) {\n ngDevMode && console.warn(`DEPRECATED: DI is instantiating a token \"${type.name}\" that inherits its @Injectable decorator but does not provide one itself.\\n` + `This will become an error in a future version of Angular. Please add @Injectable() to the \"${type.name}\" class.`);\n return def;\n } else {\n return null;\n }\n}\nfunction getInjectorDef(type) {\n return type && Object.hasOwn(type, NG_INJ_DEF) ? type[NG_INJ_DEF] : null;\n}\nconst NG_PROV_DEF = /*#__PURE__*/ getClosureSafeProperty({\n ษตprov: getClosureSafeProperty\n});\nconst NG_INJ_DEF = /*#__PURE__*/ getClosureSafeProperty({\n ษตinj: getClosureSafeProperty\n});\n\nclass InjectionToken {\n _desc;\n ngMetadataName = 'InjectionToken';\n ษตprov;\n constructor(_desc, options) {\n this._desc = _desc;\n this.ษตprov = undefined;\n if (typeof options == 'number') {\n (typeof ngDevMode === 'undefined' || ngDevMode) && assertLessThan(options, 0, 'Only negative numbers are supported here');\n this.__NG_ELEMENT_ID__ = options;\n } else if (options !== undefined) {\n this.ษตprov = ษตษตdefineInjectable({\n token: this,\n providedIn: options.providedIn || 'root',\n factory: options.factory\n });\n }\n }\n get multi() {\n return this;\n }\n toString() {\n return `InjectionToken ${this._desc}`;\n }\n}\n\nlet _injectorProfilerContext;\nfunction getInjectorProfilerContext() {\n !ngDevMode && throwError('getInjectorProfilerContext should never be called in production mode');\n return _injectorProfilerContext;\n}\nfunction setInjectorProfilerContext(context) {\n !ngDevMode && throwError('setInjectorProfilerContext should never be called in production mode');\n const previous = _injectorProfilerContext;\n _injectorProfilerContext = context;\n return previous;\n}\nconst injectorProfilerCallbacks = [];\nconst NOOP_PROFILER_REMOVAL = () => {};\nfunction removeProfiler(profiler) {\n const profilerIdx = injectorProfilerCallbacks.indexOf(profiler);\n if (profilerIdx !== -1) {\n injectorProfilerCallbacks.splice(profilerIdx, 1);\n }\n}\nfunction setInjectorProfiler(injectorProfiler) {\n !ngDevMode && throwError('setInjectorProfiler should never be called in production mode');\n if (injectorProfiler !== null) {\n if (!injectorProfilerCallbacks.includes(injectorProfiler)) {\n injectorProfilerCallbacks.push(injectorProfiler);\n }\n return () => removeProfiler(injectorProfiler);\n } else {\n injectorProfilerCallbacks.length = 0;\n return NOOP_PROFILER_REMOVAL;\n }\n}\nfunction injectorProfiler(event) {\n !ngDevMode && throwError('Injector profiler should never be called in production mode');\n for (let i = 0; i < injectorProfilerCallbacks.length; i++) {\n const injectorProfilerCallback = injectorProfilerCallbacks[i];\n injectorProfilerCallback(event);\n }\n}\nfunction emitProviderConfiguredEvent(eventProvider, isViewProvider = false) {\n !ngDevMode && throwError('Injector profiler should never be called in production mode');\n let token;\n if (typeof eventProvider === 'function') {\n token = eventProvider;\n } else if (eventProvider instanceof InjectionToken) {\n token = eventProvider;\n } else {\n token = resolveForwardRef(eventProvider.provide);\n }\n let provider = eventProvider;\n if (eventProvider instanceof InjectionToken) {\n provider = eventProvider.ษตprov || eventProvider;\n }\n injectorProfiler({\n type: 2,\n context: getInjectorProfilerContext(),\n providerRecord: {\n token,\n provider,\n isViewProvider\n }\n });\n}\nfunction emitInjectorToCreateInstanceEvent(token) {\n !ngDevMode && throwError('Injector profiler should never be called in production mode');\n injectorProfiler({\n type: 5,\n context: getInjectorProfilerContext(),\n token: token\n });\n}\nfunction emitInstanceCreatedByInjectorEvent(instance) {\n !ngDevMode && throwError('Injector profiler should never be called in production mode');\n injectorProfiler({\n type: 1,\n context: getInjectorProfilerContext(),\n instance: {\n value: instance\n }\n });\n}\nfunction emitInjectEvent(token, value, flags) {\n !ngDevMode && throwError('Injector profiler should never be called in production mode');\n injectorProfiler({\n type: 0,\n context: getInjectorProfilerContext(),\n service: {\n token,\n value,\n flags\n }\n });\n}\nfunction emitEffectCreatedEvent(effect) {\n !ngDevMode && throwError('Injector profiler should never be called in production mode');\n injectorProfiler({\n type: 3,\n context: getInjectorProfilerContext(),\n effect\n });\n}\nfunction emitAfterRenderEffectPhaseCreatedEvent(effectPhase) {\n !ngDevMode && throwError('Injector profiler should never be called in production mode');\n injectorProfiler({\n type: 4,\n context: getInjectorProfilerContext(),\n effectPhase\n });\n}\nfunction runInInjectorProfilerContext(injector, token, callback) {\n !ngDevMode && throwError('runInInjectorProfilerContext should never be called in production mode');\n const prevInjectContext = setInjectorProfilerContext({\n injector,\n token\n });\n try {\n callback();\n } finally {\n setInjectorProfilerContext(prevInjectContext);\n }\n}\n\nfunction isEnvironmentProviders(value) {\n return value && !!value.ษตproviders;\n}\n\nconst NG_COMP_DEF = /*#__PURE__*/ getClosureSafeProperty({\n ษตcmp: getClosureSafeProperty\n});\nconst NG_DIR_DEF = /*#__PURE__*/ getClosureSafeProperty({\n ษตdir: getClosureSafeProperty\n});\nconst NG_PIPE_DEF = /*#__PURE__*/ getClosureSafeProperty({\n ษตpipe: getClosureSafeProperty\n});\nconst NG_MOD_DEF = /*#__PURE__*/ getClosureSafeProperty({\n ษตmod: getClosureSafeProperty\n});\nconst NG_FACTORY_DEF = /*#__PURE__*/ getClosureSafeProperty({\n ษตfac: getClosureSafeProperty\n});\nconst NG_ELEMENT_ID = /*#__PURE__*/ getClosureSafeProperty({\n __NG_ELEMENT_ID__: getClosureSafeProperty\n});\nconst NG_ENV_ID = /*#__PURE__*/ getClosureSafeProperty({\n __NG_ENV_ID__: getClosureSafeProperty\n});\n\nfunction getNgModuleDef(type) {\n assertTypeDefined(type, '@NgModule');\n return type[NG_MOD_DEF] || null;\n}\nfunction getNgModuleDefOrThrow(type) {\n const ngModuleDef = getNgModuleDef(type);\n if (!ngModuleDef) {\n throw new RuntimeError(915, (typeof ngDevMode === 'undefined' || ngDevMode) && `Type ${stringify(type)} does not have 'ษตmod' property.`);\n }\n return ngModuleDef;\n}\nfunction getComponentDef(type) {\n assertTypeDefined(type, '@Component');\n return type[NG_COMP_DEF] || null;\n}\nfunction getDirectiveDefOrThrow(type) {\n const def = getDirectiveDef(type);\n if (!def) {\n throw new RuntimeError(916, (typeof ngDevMode === 'undefined' || ngDevMode) && `Type ${stringify(type)} does not have 'ษตdir' property.`);\n }\n return def;\n}\nfunction getDirectiveDef(type) {\n assertTypeDefined(type, '@Directive');\n return type[NG_DIR_DEF] || null;\n}\nfunction getPipeDef(type) {\n assertTypeDefined(type, '@Pipe');\n return type[NG_PIPE_DEF] || null;\n}\nfunction assertTypeDefined(type, symbolType) {\n if (type == null) {\n throw new RuntimeError(-919, (typeof ngDevMode === 'undefined' || ngDevMode) && `Cannot read ${symbolType} metadata. This can indicate a runtime ` + `circular dependency in your app that needs to be resolved.`);\n }\n}\nfunction isStandalone(type) {\n const def = getComponentDef(type) || getDirectiveDef(type) || getPipeDef(type);\n return def !== null && def.standalone;\n}\n\nfunction renderStringify(value) {\n if (typeof value === 'string') return value;\n if (value == null) return '';\n return String(value);\n}\nfunction stringifyForError(value) {\n if (typeof value === 'function') return value.name || value.toString();\n if (typeof value === 'object' && value != null && typeof value.type === 'function') {\n return value.type.name || value.type.toString();\n }\n return renderStringify(value);\n}\nfunction debugStringifyTypeForError(type) {\n const componentDef = getComponentDef(type);\n if (componentDef !== null && componentDef.debugInfo) {\n return stringifyTypeFromDebugInfo(componentDef.debugInfo);\n }\n return stringifyForError(type);\n}\nfunction stringifyTypeFromDebugInfo(debugInfo) {\n if (!debugInfo.filePath || !debugInfo.lineNumber) {\n return debugInfo.className;\n } else {\n return `${debugInfo.className} (at ${debugInfo.filePath}:${debugInfo.lineNumber})`;\n }\n}\n\nconst NG_RUNTIME_ERROR_CODE = /*#__PURE__*/ getClosureSafeProperty({\n 'ngErrorCode': getClosureSafeProperty\n});\nconst NG_RUNTIME_ERROR_MESSAGE = /*#__PURE__*/ getClosureSafeProperty({\n 'ngErrorMessage': getClosureSafeProperty\n});\nconst NG_TOKEN_PATH = /*#__PURE__*/ getClosureSafeProperty({\n 'ngTokenPath': getClosureSafeProperty\n});\nfunction cyclicDependencyError(token, path) {\n const message = ngDevMode ? `Circular dependency detected for \\`${token}\\`.` : '';\n return createRuntimeError(message, -200, path);\n}\nfunction cyclicDependencyErrorWithDetails(token, path) {\n return augmentRuntimeError(cyclicDependencyError(token, path), null);\n}\nfunction throwMixedMultiProviderError() {\n throw new Error(`Cannot mix multi providers and regular providers`);\n}\nfunction throwInvalidProviderError(ngModuleType, providers, provider) {\n if (ngModuleType && providers) {\n const providerDetail = providers.map(v => v == provider ? '?' + provider + '?' : '...');\n throw new Error(`Invalid provider for the NgModule '${stringify(ngModuleType)}' - only instances of Provider and Type are allowed, got: [${providerDetail.join(', ')}]`);\n } else if (isEnvironmentProviders(provider)) {\n if (provider.ษตfromNgModule) {\n throw new RuntimeError(-207, `Invalid providers from 'importProvidersFrom' present in a non-environment injector. 'importProvidersFrom' can't be used for component providers.`);\n } else {\n throw new RuntimeError(-207, `Invalid providers present in a non-environment injector. 'EnvironmentProviders' can't be used for component providers.`);\n }\n } else {\n throw new Error('Invalid provider');\n }\n}\nfunction throwProviderNotFoundError(token, injectorName) {\n const errorMessage = ngDevMode && `No provider for ${stringifyForError(token)} found${injectorName ? ` in ${injectorName}` : ''}`;\n throw new RuntimeError(-201, errorMessage);\n}\nfunction prependTokenToDependencyPath(error, token) {\n error[NG_TOKEN_PATH] ??= [];\n const currentPath = error[NG_TOKEN_PATH];\n let pathStr;\n if (typeof token === 'object' && 'multi' in token && token?.multi === true) {\n assertDefined(token.provide, 'Token with multi: true should have a provide property');\n pathStr = stringifyForError(token.provide);\n } else {\n pathStr = stringifyForError(token);\n }\n if (currentPath[0] !== pathStr) {\n error[NG_TOKEN_PATH].unshift(pathStr);\n }\n}\nfunction augmentRuntimeError(error, source) {\n const tokenPath = error[NG_TOKEN_PATH];\n const errorCode = error[NG_RUNTIME_ERROR_CODE];\n const message = error[NG_RUNTIME_ERROR_MESSAGE] || error.message;\n error.message = formatErrorMessage(message, errorCode, tokenPath, source);\n return error;\n}\nfunction createRuntimeError(message, code, path) {\n const error = new RuntimeError(code, message);\n error[NG_RUNTIME_ERROR_CODE] = code;\n error[NG_RUNTIME_ERROR_MESSAGE] = message;\n if (path) {\n error[NG_TOKEN_PATH] = path;\n }\n return error;\n}\nfunction getRuntimeErrorCode(error) {\n return error[NG_RUNTIME_ERROR_CODE];\n}\nfunction formatErrorMessage(text, code, path = [], source = null) {\n let pathDetails = '';\n if (path && path.length > 1) {\n pathDetails = ` Path: ${path.join(' -> ')}.`;\n }\n const sourceDetails = source ? ` Source: ${source}.` : '';\n return formatRuntimeError(code, `${text}${sourceDetails}${pathDetails}`);\n}\n\nlet _injectImplementation;\nfunction getInjectImplementation() {\n return _injectImplementation;\n}\nfunction setInjectImplementation(impl) {\n const previous = _injectImplementation;\n _injectImplementation = impl;\n return previous;\n}\nfunction injectRootLimpMode(token, notFoundValue, flags) {\n const injectableDef = getInjectableDef(token);\n if (injectableDef && injectableDef.providedIn == 'root') {\n return injectableDef.value === undefined ? injectableDef.value = injectableDef.factory() : injectableDef.value;\n }\n if (flags & 8) return null;\n if (notFoundValue !== undefined) return notFoundValue;\n throwProviderNotFoundError(token, typeof ngDevMode !== 'undefined' && ngDevMode ? 'Injector' : '');\n}\nfunction assertInjectImplementationNotEqual(fn) {\n ngDevMode && assertNotEqual(_injectImplementation, fn, 'Calling ษตษตinject would cause infinite recursion');\n}\n\nconst _global = globalThis;\n\nfunction ngDevModeResetPerfCounters() {\n const locationString = typeof location !== 'undefined' ? location.toString() : '';\n const newCounters = {\n hydratedNodes: 0,\n hydratedComponents: 0,\n dehydratedViewsRemoved: 0,\n dehydratedViewsCleanupRuns: 0,\n componentsSkippedHydration: 0,\n deferBlocksWithIncrementalHydration: 0\n };\n const allowNgDevModeTrue = locationString.indexOf('ngDevMode=false') === -1;\n if (!allowNgDevModeTrue) {\n _global['ngDevMode'] = false;\n } else {\n if (typeof _global['ngDevMode'] !== 'object') {\n _global['ngDevMode'] = {};\n }\n Object.assign(_global['ngDevMode'], newCounters);\n }\n return newCounters;\n}\nfunction initNgDevMode() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (typeof ngDevMode !== 'object' || Object.keys(ngDevMode).length === 0) {\n ngDevModeResetPerfCounters();\n }\n return typeof ngDevMode !== 'undefined' && !!ngDevMode;\n }\n return false;\n}\n\nconst _THROW_IF_NOT_FOUND = {};\nconst THROW_IF_NOT_FOUND = _THROW_IF_NOT_FOUND;\nconst DI_DECORATOR_FLAG = '__NG_DI_FLAG__';\nclass RetrievingInjector {\n injector;\n constructor(injector) {\n this.injector = injector;\n }\n retrieve(token, options) {\n const flags = convertToBitFlags(options) || 0;\n try {\n return this.injector.get(token, flags & 8 ? null : THROW_IF_NOT_FOUND, flags);\n } catch (e) {\n if (isNotFound(e)) {\n return e;\n }\n throw e;\n }\n }\n}\nfunction injectInjectorOnly(token, flags = 0) {\n const currentInjector = getCurrentInjector();\n if (currentInjector === undefined) {\n throw new RuntimeError(-203, ngDevMode && `The \\`${stringify(token)}\\` token injection failed. \\`inject()\\` function must be called from an injection context such as a constructor, a factory function, a field initializer, or a function used with \\`runInInjectionContext\\`.`);\n } else if (currentInjector === null) {\n return injectRootLimpMode(token, undefined, flags);\n } else {\n const options = convertToInjectOptions(flags);\n const value = currentInjector.retrieve(token, options);\n ngDevMode && emitInjectEvent(token, value, flags);\n if (isNotFound(value)) {\n if (options.optional) {\n return null;\n }\n throw value;\n }\n return value;\n }\n}\nfunction ษตษตinject(token, flags = 0) {\n return (getInjectImplementation() || injectInjectorOnly)(resolveForwardRef(token), flags);\n}\nfunction ษตษตinvalidFactoryDep(index) {\n throw new RuntimeError(202, ngDevMode && `This constructor is not compatible with Angular Dependency Injection because its dependency at index ${index} of the parameter list is invalid.\nThis can happen if the dependency type is a primitive like a string or if an ancestor of this class is missing an Angular decorator.\n\nPlease check that 1) the type for the parameter at index ${index} is correct and 2) the correct Angular decorators are defined for this class and its ancestors.`);\n}\nfunction inject(token, options) {\n return ษตษตinject(token, convertToBitFlags(options));\n}\nfunction convertToBitFlags(flags) {\n if (typeof flags === 'undefined' || typeof flags === 'number') {\n return flags;\n }\n return 0 | (flags.optional && 8) | (flags.host && 1) | (flags.self && 2) | (flags.skipSelf && 4);\n}\nfunction convertToInjectOptions(flags) {\n return {\n optional: !!(flags & 8),\n host: !!(flags & 1),\n self: !!(flags & 2),\n skipSelf: !!(flags & 4)\n };\n}\nfunction injectArgs(types) {\n const args = [];\n for (let i = 0; i < types.length; i++) {\n const arg = resolveForwardRef(types[i]);\n if (Array.isArray(arg)) {\n if (arg.length === 0) {\n throw new RuntimeError(900, ngDevMode && 'Arguments array must have arguments.');\n }\n let type = undefined;\n let flags = 0;\n for (let j = 0; j < arg.length; j++) {\n const meta = arg[j];\n const flag = getInjectFlag(meta);\n if (typeof flag === 'number') {\n if (flag === -1) {\n type = meta.token;\n } else {\n flags |= flag;\n }\n } else {\n type = meta;\n }\n }\n args.push(ษตษตinject(type, flags));\n } else {\n args.push(ษตษตinject(arg));\n }\n }\n return args;\n}\nfunction attachInjectFlag(decorator, flag) {\n decorator[DI_DECORATOR_FLAG] = flag;\n decorator.prototype[DI_DECORATOR_FLAG] = flag;\n return decorator;\n}\nfunction getInjectFlag(token) {\n return token[DI_DECORATOR_FLAG];\n}\n\nfunction getFactoryDef(type, throwNotFound) {\n const hasFactoryDef = Object.hasOwn(type, NG_FACTORY_DEF);\n if (!hasFactoryDef && throwNotFound === true && ngDevMode) {\n throw new Error(`Type ${stringify(type)} does not have 'ษตfac' property.`);\n }\n return hasFactoryDef ? type[NG_FACTORY_DEF] : null;\n}\n\nfunction arrayEquals(a, b, identityAccessor) {\n if (a.length !== b.length) return false;\n for (let i = 0; i < a.length; i++) {\n let valueA = a[i];\n let valueB = b[i];\n if (identityAccessor) {\n valueA = identityAccessor(valueA);\n valueB = identityAccessor(valueB);\n }\n if (valueB !== valueA) {\n return false;\n }\n }\n return true;\n}\nfunction flatten(list) {\n return list.flat(Number.POSITIVE_INFINITY);\n}\nfunction deepForEach(input, fn) {\n input.forEach(value => Array.isArray(value) ? deepForEach(value, fn) : fn(value));\n}\nfunction addToArray(arr, index, value) {\n if (index >= arr.length) {\n arr.push(value);\n } else {\n arr.splice(index, 0, value);\n }\n}\nfunction removeFromArray(arr, index) {\n if (index >= arr.length - 1) {\n return arr.pop();\n } else {\n return arr.splice(index, 1)[0];\n }\n}\nfunction newArray(size, value) {\n const list = [];\n for (let i = 0; i < size; i++) {\n list.push(value);\n }\n return list;\n}\nfunction arraySplice(array, index, count) {\n const length = array.length - count;\n while (index < length) {\n array[index] = array[index + count];\n index++;\n }\n while (count--) {\n array.pop();\n }\n}\nfunction arrayInsert2(array, index, value1, value2) {\n ngDevMode && assertLessThanOrEqual(index, array.length, \"Can't insert past array end.\");\n let end = array.length;\n if (end == index) {\n array.push(value1, value2);\n } else if (end === 1) {\n array.push(value2, array[0]);\n array[0] = value1;\n } else {\n end--;\n array.push(array[end - 1], array[end]);\n while (end > index) {\n const previousEnd = end - 2;\n array[end] = array[previousEnd];\n end--;\n }\n array[index] = value1;\n array[index + 1] = value2;\n }\n}\nfunction keyValueArraySet(keyValueArray, key, value) {\n let index = keyValueArrayIndexOf(keyValueArray, key);\n if (index >= 0) {\n keyValueArray[index | 1] = value;\n } else {\n index = ~index;\n arrayInsert2(keyValueArray, index, key, value);\n }\n return index;\n}\nfunction keyValueArrayGet(keyValueArray, key) {\n const index = keyValueArrayIndexOf(keyValueArray, key);\n if (index >= 0) {\n return keyValueArray[index | 1];\n }\n return undefined;\n}\nfunction keyValueArrayIndexOf(keyValueArray, key) {\n return _arrayIndexOfSorted(keyValueArray, key, 1);\n}\nfunction _arrayIndexOfSorted(array, value, shift) {\n ngDevMode && assertEqual(Array.isArray(array), true, 'Expecting an array');\n let start = 0;\n let end = array.length >> shift;\n while (end !== start) {\n const middle = start + (end - start >> 1);\n const current = array[middle << shift];\n if (value === current) {\n return middle << shift;\n } else if (current > value) {\n end = middle;\n } else {\n start = middle + 1;\n }\n }\n return ~(end << shift);\n}\n\nconst EMPTY_OBJ = {};\nconst EMPTY_ARRAY = [];\nif ((typeof ngDevMode === 'undefined' || ngDevMode) && /*#__PURE__*/ initNgDevMode()) {\n /*#__PURE__*/ Object.freeze(EMPTY_OBJ);\n /*#__PURE__*/ Object.freeze(EMPTY_ARRAY);\n}\n\nconst ENVIRONMENT_INITIALIZER = /*#__PURE__*/ new InjectionToken(typeof ngDevMode !== 'undefined' && ngDevMode ? 'ENVIRONMENT_INITIALIZER' : '');\n\nconst INJECTOR$1 = /*#__PURE__*/ new InjectionToken(typeof ngDevMode !== 'undefined' && ngDevMode ? 'INJECTOR' : '', -1);\n\nconst INJECTOR_DEF_TYPES = /*#__PURE__*/ new InjectionToken(typeof ngDevMode !== 'undefined' && ngDevMode ? 'INJECTOR_DEF_TYPES' : '');\n\nclass NullInjector {\n get(token, notFoundValue = THROW_IF_NOT_FOUND) {\n if (notFoundValue === THROW_IF_NOT_FOUND) {\n const message = ngDevMode ? `No provider found for \\`${stringify(token)}\\`.` : '';\n const error = createRuntimeError(message, -201);\n error.name = 'ษตNotFound';\n throw error;\n }\n return notFoundValue;\n }\n}\n\nfunction makeEnvironmentProviders(providers) {\n return {\n ษตproviders: providers\n };\n}\nfunction provideEnvironmentInitializer(initializerFn) {\n return makeEnvironmentProviders([{\n provide: ENVIRONMENT_INITIALIZER,\n multi: true,\n useValue: initializerFn\n }]);\n}\nfunction importProvidersFrom(...sources) {\n return {\n ษตproviders: internalImportProvidersFrom(true, sources),\n ษตfromNgModule: true\n };\n}\nfunction internalImportProvidersFrom(checkForStandaloneCmp, ...sources) {\n const providersOut = [];\n const dedup = new Set();\n let injectorTypesWithProviders;\n const collectProviders = provider => {\n providersOut.push(provider);\n };\n deepForEach(sources, source => {\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && checkForStandaloneCmp) {\n const cmpDef = getComponentDef(source);\n if (cmpDef?.standalone) {\n throw new RuntimeError(800, `Importing providers supports NgModule or ModuleWithProviders but got a standalone component \"${stringifyForError(source)}\"`);\n }\n }\n const internalSource = source;\n if (walkProviderTree(internalSource, collectProviders, [], dedup)) {\n injectorTypesWithProviders ||= [];\n injectorTypesWithProviders.push(internalSource);\n }\n });\n if (injectorTypesWithProviders !== undefined) {\n processInjectorTypesWithProviders(injectorTypesWithProviders, collectProviders);\n }\n return providersOut;\n}\nfunction processInjectorTypesWithProviders(typesWithProviders, visitor) {\n for (let i = 0; i < typesWithProviders.length; i++) {\n const {\n ngModule,\n providers\n } = typesWithProviders[i];\n deepForEachProvider(providers, provider => {\n ngDevMode && validateProvider(provider, providers || EMPTY_ARRAY, ngModule);\n visitor(provider, ngModule);\n });\n }\n}\nfunction walkProviderTree(container, visitor, parents, dedup) {\n container = resolveForwardRef(container);\n if (!container) return false;\n let defType = null;\n let injDef = getInjectorDef(container);\n const cmpDef = !injDef && getComponentDef(container);\n if (!injDef && !cmpDef) {\n const ngModule = container.ngModule;\n injDef = getInjectorDef(ngModule);\n if (injDef) {\n defType = ngModule;\n } else {\n return false;\n }\n } else if (cmpDef && !cmpDef.standalone) {\n return false;\n } else {\n defType = container;\n }\n if (ngDevMode && parents.indexOf(defType) !== -1) {\n const defName = stringify(defType);\n const path = parents.map(stringify).concat(defName);\n throw cyclicDependencyErrorWithDetails(defName, path);\n }\n const isDuplicate = dedup.has(defType);\n if (cmpDef) {\n if (isDuplicate) {\n return false;\n }\n dedup.add(defType);\n if (cmpDef.dependencies) {\n const deps = typeof cmpDef.dependencies === 'function' ? cmpDef.dependencies() : cmpDef.dependencies;\n for (const dep of deps) {\n walkProviderTree(dep, visitor, parents, dedup);\n }\n }\n } else if (injDef) {\n if (injDef.imports != null && !isDuplicate) {\n ngDevMode && parents.push(defType);\n dedup.add(defType);\n let importTypesWithProviders;\n try {\n deepForEach(injDef.imports, imported => {\n if (walkProviderTree(imported, visitor, parents, dedup)) {\n importTypesWithProviders ||= [];\n importTypesWithProviders.push(imported);\n }\n });\n } finally {\n ngDevMode && parents.pop();\n }\n if (importTypesWithProviders !== undefined) {\n processInjectorTypesWithProviders(importTypesWithProviders, visitor);\n }\n }\n if (!isDuplicate) {\n const factory = getFactoryDef(defType) || (() => new defType());\n visitor({\n provide: defType,\n useFactory: factory,\n deps: EMPTY_ARRAY\n }, defType);\n visitor({\n provide: INJECTOR_DEF_TYPES,\n useValue: defType,\n multi: true\n }, defType);\n visitor({\n provide: ENVIRONMENT_INITIALIZER,\n useValue: () => ษตษตinject(defType),\n multi: true\n }, defType);\n }\n const defProviders = injDef.providers;\n if (defProviders != null && !isDuplicate) {\n const injectorType = container;\n deepForEachProvider(defProviders, provider => {\n ngDevMode && validateProvider(provider, defProviders, injectorType);\n visitor(provider, injectorType);\n });\n }\n } else {\n return false;\n }\n return defType !== container && container.providers !== undefined;\n}\nfunction validateProvider(provider, providers, containerType) {\n if (isTypeProvider(provider) || isValueProvider(provider) || isFactoryProvider(provider) || isExistingProvider(provider)) {\n return;\n }\n const classRef = resolveForwardRef(provider && (provider.useClass || provider.provide));\n if (!classRef) {\n throwInvalidProviderError(containerType, providers, provider);\n }\n}\nfunction deepForEachProvider(providers, fn) {\n for (let provider of providers) {\n if (isEnvironmentProviders(provider)) {\n provider = provider.ษตproviders;\n }\n if (Array.isArray(provider)) {\n deepForEachProvider(provider, fn);\n } else {\n fn(provider);\n }\n }\n}\nconst USE_VALUE = /*#__PURE__*/ getClosureSafeProperty({\n provide: String,\n useValue: getClosureSafeProperty\n});\nfunction isValueProvider(value) {\n return value !== null && typeof value == 'object' && USE_VALUE in value;\n}\nfunction isExistingProvider(value) {\n return !!(value && value.useExisting);\n}\nfunction isFactoryProvider(value) {\n return !!(value && value.useFactory);\n}\nfunction isTypeProvider(value) {\n return typeof value === 'function';\n}\nfunction isClassProvider(value) {\n return !!value.useClass;\n}\n\nconst INJECTOR_SCOPE = /*#__PURE__*/ new InjectionToken(typeof ngDevMode !== 'undefined' && ngDevMode ? 'Set Injector scope.' : '');\n\nconst NOT_YET = {};\nconst CIRCULAR = {};\nlet NULL_INJECTOR = undefined;\nfunction getNullInjector() {\n if (NULL_INJECTOR === undefined) {\n NULL_INJECTOR = new NullInjector();\n }\n return NULL_INJECTOR;\n}\nclass EnvironmentInjector {}\nclass R3Injector extends EnvironmentInjector {\n parent;\n source;\n scopes;\n records = new Map();\n _ngOnDestroyHooks = new Set();\n _onDestroyHooks = [];\n get destroyed() {\n return this._destroyed;\n }\n _destroyed = false;\n injectorDefTypes;\n constructor(providers, parent, source, scopes) {\n super();\n this.parent = parent;\n this.source = source;\n this.scopes = scopes;\n forEachSingleProvider(providers, provider => this.processProvider(provider));\n this.records.set(INJECTOR$1, makeRecord(undefined, this));\n if (scopes.has('environment')) {\n this.records.set(EnvironmentInjector, makeRecord(undefined, this));\n }\n const record = this.records.get(INJECTOR_SCOPE);\n if (record != null && typeof record.value === 'string') {\n this.scopes.add(record.value);\n }\n this.injectorDefTypes = new Set(this.get(INJECTOR_DEF_TYPES, EMPTY_ARRAY, {\n self: true\n }));\n }\n retrieve(token, options) {\n const flags = convertToBitFlags(options) || 0;\n try {\n return this.get(token, THROW_IF_NOT_FOUND, flags);\n } catch (e) {\n if (isNotFound$1(e)) {\n return e;\n }\n throw e;\n }\n }\n destroy() {\n assertNotDestroyed(this);\n this._destroyed = true;\n const prevConsumer = setActiveConsumer(null);\n try {\n for (const service of this._ngOnDestroyHooks) {\n service.ngOnDestroy();\n }\n const onDestroyHooks = this._onDestroyHooks;\n this._onDestroyHooks = [];\n for (const hook of onDestroyHooks) {\n hook();\n }\n } finally {\n this.records.clear();\n this._ngOnDestroyHooks.clear();\n this.injectorDefTypes.clear();\n setActiveConsumer(prevConsumer);\n }\n }\n onDestroy(callback) {\n assertNotDestroyed(this);\n this._onDestroyHooks.push(callback);\n return () => this.removeOnDestroy(callback);\n }\n runInContext(fn) {\n assertNotDestroyed(this);\n const previousInjector = setCurrentInjector(this);\n const previousInjectImplementation = setInjectImplementation(undefined);\n let prevInjectContext;\n if (ngDevMode) {\n prevInjectContext = setInjectorProfilerContext({\n injector: this,\n token: null\n });\n }\n try {\n return fn();\n } finally {\n setCurrentInjector(previousInjector);\n setInjectImplementation(previousInjectImplementation);\n ngDevMode && setInjectorProfilerContext(prevInjectContext);\n }\n }\n get(token, notFoundValue = THROW_IF_NOT_FOUND, options) {\n assertNotDestroyed(this);\n if (Object.hasOwn(token, NG_ENV_ID)) {\n return token[NG_ENV_ID](this);\n }\n const flags = convertToBitFlags(options);\n let prevInjectContext;\n if (ngDevMode) {\n prevInjectContext = setInjectorProfilerContext({\n injector: this,\n token: token\n });\n }\n const previousInjector = setCurrentInjector(this);\n const previousInjectImplementation = setInjectImplementation(undefined);\n try {\n if (!(flags & 4)) {\n let record = this.records.get(token);\n if (record === undefined) {\n const def = couldBeInjectableType(token) && getInjectableDef(token);\n if (def && this.injectableDefInScope(def)) {\n if (ngDevMode) {\n runInInjectorProfilerContext(this, token, () => {\n emitProviderConfiguredEvent(token);\n });\n }\n record = makeRecord(injectableDefOrInjectorDefFactory(token), NOT_YET);\n } else {\n record = null;\n }\n this.records.set(token, record);\n }\n if (record != null) {\n return this.hydrate(token, record, flags);\n }\n }\n const nextInjector = !(flags & 2) ? this.parent : getNullInjector();\n notFoundValue = flags & 8 && notFoundValue === THROW_IF_NOT_FOUND ? null : notFoundValue;\n return nextInjector.get(token, notFoundValue);\n } catch (error) {\n const errorCode = getRuntimeErrorCode(error);\n if (errorCode === -200 || errorCode === -201) {\n if (ngDevMode) {\n prependTokenToDependencyPath(error, token);\n if (previousInjector) {\n throw error;\n } else {\n throw augmentRuntimeError(error, this.source);\n }\n } else {\n throw new RuntimeError(errorCode, null);\n }\n } else {\n throw error;\n }\n } finally {\n setInjectImplementation(previousInjectImplementation);\n setCurrentInjector(previousInjector);\n ngDevMode && setInjectorProfilerContext(prevInjectContext);\n }\n }\n resolveInjectorInitializers() {\n const prevConsumer = setActiveConsumer(null);\n const previousInjector = setCurrentInjector(this);\n const previousInjectImplementation = setInjectImplementation(undefined);\n let prevInjectContext;\n if (ngDevMode) {\n prevInjectContext = setInjectorProfilerContext({\n injector: this,\n token: null\n });\n }\n try {\n const initializers = this.get(ENVIRONMENT_INITIALIZER, EMPTY_ARRAY, {\n self: true\n });\n if (ngDevMode && !Array.isArray(initializers)) {\n throw new RuntimeError(-209, 'Unexpected type of the `ENVIRONMENT_INITIALIZER` token value ' + `(expected an array, but got ${typeof initializers}). ` + 'Please check that the `ENVIRONMENT_INITIALIZER` token is configured as a ' + '`multi: true` provider.');\n }\n for (const initializer of initializers) {\n initializer();\n }\n } finally {\n setCurrentInjector(previousInjector);\n setInjectImplementation(previousInjectImplementation);\n ngDevMode && setInjectorProfilerContext(prevInjectContext);\n setActiveConsumer(prevConsumer);\n }\n }\n toString() {\n if (ngDevMode) {\n const tokens = [];\n const records = this.records;\n for (const token of records.keys()) {\n tokens.push(stringify(token));\n }\n return `R3Injector[${tokens.join(', ')}]`;\n }\n return 'R3Injector[...]';\n }\n processProvider(provider) {\n provider = resolveForwardRef(provider);\n let token = isTypeProvider(provider) ? provider : resolveForwardRef(provider && provider.provide);\n const record = providerToRecord(provider);\n if (ngDevMode) {\n runInInjectorProfilerContext(this, token, () => {\n if (isValueProvider(provider)) {\n emitInjectorToCreateInstanceEvent(token);\n emitInstanceCreatedByInjectorEvent(provider.useValue);\n }\n emitProviderConfiguredEvent(provider);\n });\n }\n if (!isTypeProvider(provider) && provider.multi === true) {\n let multiRecord = this.records.get(token);\n if (multiRecord) {\n if (ngDevMode && multiRecord.multi === undefined) {\n throwMixedMultiProviderError();\n }\n } else {\n multiRecord = makeRecord(undefined, NOT_YET, true);\n multiRecord.factory = () => injectArgs(multiRecord.multi);\n this.records.set(token, multiRecord);\n }\n token = provider;\n multiRecord.multi.push(provider);\n } else {\n if (ngDevMode) {\n const existing = this.records.get(token);\n if (existing && existing.multi !== undefined) {\n throwMixedMultiProviderError();\n }\n }\n }\n this.records.set(token, record);\n }\n hydrate(token, record, flags) {\n const prevConsumer = setActiveConsumer(null);\n try {\n if (record.value === CIRCULAR) {\n throw cyclicDependencyError(ngDevMode ? stringify(token) : '');\n } else if (record.value === NOT_YET) {\n record.value = CIRCULAR;\n if (ngDevMode) {\n runInInjectorProfilerContext(this, token, () => {\n emitInjectorToCreateInstanceEvent(token);\n record.value = record.factory(undefined, flags);\n emitInstanceCreatedByInjectorEvent(record.value);\n });\n } else {\n record.value = record.factory(undefined, flags);\n }\n }\n if (typeof record.value === 'object' && record.value && hasOnDestroy(record.value)) {\n this._ngOnDestroyHooks.add(record.value);\n }\n return record.value;\n } finally {\n setActiveConsumer(prevConsumer);\n }\n }\n injectableDefInScope(def) {\n if (!def.providedIn) {\n return false;\n }\n const providedIn = resolveForwardRef(def.providedIn);\n if (typeof providedIn === 'string') {\n return providedIn === 'any' || this.scopes.has(providedIn);\n } else {\n return this.injectorDefTypes.has(providedIn);\n }\n }\n removeOnDestroy(callback) {\n const destroyCBIdx = this._onDestroyHooks.indexOf(callback);\n if (destroyCBIdx !== -1) {\n this._onDestroyHooks.splice(destroyCBIdx, 1);\n }\n }\n}\nfunction injectableDefOrInjectorDefFactory(token) {\n const injectableDef = getInjectableDef(token);\n const factory = injectableDef !== null ? injectableDef.factory : getFactoryDef(token);\n if (factory !== null) {\n return factory;\n }\n if (token instanceof InjectionToken) {\n throw new RuntimeError(-204, ngDevMode && `Token ${stringify(token)} is missing a ษตprov definition.`);\n }\n if (token instanceof Function) {\n return getUndecoratedInjectableFactory(token);\n }\n throw new RuntimeError(-204, ngDevMode && 'unreachable');\n}\nfunction getUndecoratedInjectableFactory(token) {\n const paramLength = token.length;\n if (paramLength > 0) {\n throw new RuntimeError(-204, ngDevMode && `Can't resolve all parameters for ${stringify(token)}: (${newArray(paramLength, '?').join(', ')}).`);\n }\n const inheritedInjectableDef = getInheritedInjectableDef(token);\n if (inheritedInjectableDef !== null) {\n return () => inheritedInjectableDef.factory(token);\n } else {\n return () => new token();\n }\n}\nfunction providerToRecord(provider) {\n if (isValueProvider(provider)) {\n return makeRecord(undefined, provider.useValue);\n } else {\n const factory = providerToFactory(provider);\n return makeRecord(factory, NOT_YET);\n }\n}\nfunction providerToFactory(provider, ngModuleType, providers) {\n let factory = undefined;\n if (ngDevMode && isEnvironmentProviders(provider)) {\n throwInvalidProviderError(undefined, providers, provider);\n }\n if (isTypeProvider(provider)) {\n const unwrappedProvider = resolveForwardRef(provider);\n return getFactoryDef(unwrappedProvider) || injectableDefOrInjectorDefFactory(unwrappedProvider);\n } else {\n if (isValueProvider(provider)) {\n factory = () => resolveForwardRef(provider.useValue);\n } else if (isFactoryProvider(provider)) {\n factory = () => provider.useFactory(...injectArgs(provider.deps || []));\n } else if (isExistingProvider(provider)) {\n factory = (_, flags) => ษตษตinject(resolveForwardRef(provider.useExisting), flags !== undefined && flags & 8 ? 8 : undefined);\n } else {\n const classRef = resolveForwardRef(provider && (provider.useClass || provider.provide));\n if (ngDevMode && !classRef) {\n throwInvalidProviderError(ngModuleType, providers, provider);\n }\n if (hasDeps(provider)) {\n factory = () => new classRef(...injectArgs(provider.deps));\n } else {\n return getFactoryDef(classRef) || injectableDefOrInjectorDefFactory(classRef);\n }\n }\n }\n return factory;\n}\nfunction assertNotDestroyed(injector) {\n if (injector.destroyed) {\n throw new RuntimeError(-205, ngDevMode && 'Injector has already been destroyed.');\n }\n}\nfunction makeRecord(factory, value, multi = false) {\n return {\n factory: factory,\n value: value,\n multi: multi ? [] : undefined\n };\n}\nfunction hasDeps(value) {\n return !!value.deps;\n}\nfunction hasOnDestroy(value) {\n return value !== null && typeof value === 'object' && typeof value.ngOnDestroy === 'function';\n}\nfunction couldBeInjectableType(value) {\n return typeof value === 'function' || typeof value === 'object' && value.ngMetadataName === 'InjectionToken';\n}\nfunction forEachSingleProvider(providers, fn) {\n for (const provider of providers) {\n if (Array.isArray(provider)) {\n forEachSingleProvider(provider, fn);\n } else if (provider && isEnvironmentProviders(provider)) {\n forEachSingleProvider(provider.ษตproviders, fn);\n } else {\n fn(provider);\n }\n }\n}\n\nfunction runInInjectionContext(injector, fn) {\n let internalInjector;\n if (injector instanceof R3Injector) {\n assertNotDestroyed(injector);\n internalInjector = injector;\n } else {\n internalInjector = new RetrievingInjector(injector);\n }\n let prevInjectorProfilerContext;\n if (ngDevMode) {\n prevInjectorProfilerContext = setInjectorProfilerContext({\n injector,\n token: null\n });\n }\n const prevInjector = setCurrentInjector(internalInjector);\n const previousInjectImplementation = setInjectImplementation(undefined);\n try {\n return fn();\n } finally {\n setCurrentInjector(prevInjector);\n ngDevMode && setInjectorProfilerContext(prevInjectorProfilerContext);\n setInjectImplementation(previousInjectImplementation);\n }\n}\nfunction isInInjectionContext() {\n return getInjectImplementation() !== undefined || getCurrentInjector() != null;\n}\nfunction assertInInjectionContext(debugFn) {\n if (!isInInjectionContext()) {\n throw new RuntimeError(-203, ngDevMode && debugFn.name + '() can only be used within an injection context such as a constructor, a factory function, a field initializer, or a function used with `runInInjectionContext`');\n }\n}\n\nconst HOST = 0;\nconst TVIEW = 1;\nconst FLAGS = 2;\nconst PARENT = 3;\nconst NEXT = 4;\nconst T_HOST = 5;\nconst HYDRATION = 6;\nconst CLEANUP = 7;\nconst CONTEXT = 8;\nconst INJECTOR = 9;\nconst ENVIRONMENT = 10;\nconst RENDERER = 11;\nconst CHILD_HEAD = 12;\nconst CHILD_TAIL = 13;\nconst DECLARATION_VIEW = 14;\nconst DECLARATION_COMPONENT_VIEW = 15;\nconst DECLARATION_LCONTAINER = 16;\nconst PREORDER_HOOK_FLAGS = 17;\nconst QUERIES = 18;\nconst ID = 19;\nconst EMBEDDED_VIEW_INJECTOR = 20;\nconst ON_DESTROY_HOOKS = 21;\nconst EFFECTS_TO_SCHEDULE = 22;\nconst EFFECTS = 23;\nconst REACTIVE_TEMPLATE_CONSUMER = 24;\nconst AFTER_RENDER_SEQUENCES_TO_ADD = 25;\nconst ANIMATIONS = 26;\nconst ON_ERROR = 27;\nconst HEADER_OFFSET = 28;\n\nconst TYPE = 1;\nconst DEHYDRATED_VIEWS = 6;\nconst NATIVE = 7;\nconst VIEW_REFS = 8;\nconst MOVED_VIEWS = 9;\nconst CONTAINER_HEADER_OFFSET = 10;\n\nfunction isLView(value) {\n return Array.isArray(value) && typeof value[TYPE] === 'object';\n}\nfunction isLContainer(value) {\n return Array.isArray(value) && value[TYPE] === true;\n}\nfunction isContentQueryHost(tNode) {\n return (tNode.flags & 4) !== 0;\n}\nfunction isComponentHost(tNode) {\n return tNode.componentOffset > -1;\n}\nfunction isDirectiveHost(tNode) {\n return (tNode.flags & 1) === 1;\n}\nfunction isComponentDef(def) {\n return !!def.template;\n}\nfunction isRootView(target) {\n return (target[FLAGS] & 512) !== 0;\n}\nfunction isProjectionTNode(tNode) {\n return (tNode.type & 16) === 16;\n}\nfunction hasI18n(lView) {\n return (lView[FLAGS] & 32) === 32;\n}\nfunction isDestroyed(lView) {\n return (lView[FLAGS] & 256) === 256;\n}\n\nfunction assertTNodeForLView(tNode, lView) {\n assertTNodeForTView(tNode, lView[TVIEW]);\n}\nfunction assertTNodeCreationIndex(lView, index) {\n const adjustedIndex = index + HEADER_OFFSET;\n assertIndexInRange(lView, adjustedIndex);\n assertLessThan(adjustedIndex, lView[TVIEW].bindingStartIndex, 'TNodes should be created before any bindings');\n}\nfunction assertTNodeForTView(tNode, tView) {\n assertTNode(tNode);\n const tData = tView.data;\n for (let i = HEADER_OFFSET; i < tData.length; i++) {\n if (tData[i] === tNode) {\n return;\n }\n }\n throwError('This TNode does not belong to this TView.');\n}\nfunction assertTNode(tNode) {\n assertDefined(tNode, 'TNode must be defined');\n if (!(tNode && typeof tNode === 'object' && Object.hasOwn(tNode, 'directiveStylingLast'))) {\n throwError('Not of type TNode, got: ' + tNode);\n }\n}\nfunction assertTIcu(tIcu) {\n assertDefined(tIcu, 'Expected TIcu to be defined');\n if (!(typeof tIcu.currentCaseLViewIndex === 'number')) {\n throwError('Object is not of TIcu type.');\n }\n}\nfunction assertNgModuleType(actual, msg = \"Type passed in is not NgModuleType, it does not have 'ษตmod' property.\") {\n if (!getNgModuleDef(actual)) {\n throwError(msg);\n }\n}\nfunction assertHasParent(tNode) {\n assertDefined(tNode, 'currentTNode should exist!');\n assertDefined(tNode.parent, 'currentTNode should have a parent');\n}\nfunction assertLContainer(value) {\n assertDefined(value, 'LContainer must be defined');\n assertEqual(isLContainer(value), true, 'Expecting LContainer');\n}\nfunction assertLViewOrUndefined(value) {\n value && assertEqual(isLView(value), true, 'Expecting LView or undefined or null');\n}\nfunction assertLView(value) {\n assertDefined(value, 'LView must be defined');\n assertEqual(isLView(value), true, 'Expecting LView');\n}\nfunction assertFirstCreatePass(tView, errMessage) {\n assertEqual(tView.firstCreatePass, true, errMessage || 'Should only be called in first create pass.');\n}\nfunction assertFirstUpdatePass(tView, errMessage) {\n assertEqual(tView.firstUpdatePass, true, 'Should only be called in first update pass.');\n}\nfunction assertDirectiveDef(obj) {\n if (obj.type === undefined || obj.selectors == undefined || obj.inputs === undefined) {\n throwError(`Expected a DirectiveDef/ComponentDef and this object does not seem to have the expected shape.`);\n }\n}\nfunction assertIndexInDeclRange(tView, index) {\n assertBetween(HEADER_OFFSET, tView.bindingStartIndex, index);\n}\nfunction assertIndexInExpandoRange(lView, index) {\n const tView = lView[1];\n assertBetween(tView.expandoStartIndex, lView.length, index);\n}\nfunction assertBetween(lower, upper, index) {\n if (!(lower <= index && index < upper)) {\n throwError(`Index out of range (expecting ${lower} <= ${index} < ${upper})`);\n }\n}\nfunction assertProjectionSlots(lView, errMessage) {\n assertDefined(lView[DECLARATION_COMPONENT_VIEW], 'Component views should exist.');\n assertDefined(lView[DECLARATION_COMPONENT_VIEW][T_HOST].projection, 'Components with projection nodes () must have projection slots defined.');\n}\nfunction assertParentView(lView, errMessage) {\n assertDefined(lView, \"Component views should always have a parent view (component's host view)\");\n}\nfunction assertNodeInjector(lView, injectorIndex) {\n assertIndexInExpandoRange(lView, injectorIndex);\n assertIndexInExpandoRange(lView, injectorIndex + 8);\n assertNumber(lView[injectorIndex + 0], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 1], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 2], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 3], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 4], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 5], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 6], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 7], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 8], 'injectorIndex should point to parent injector');\n}\n\nvar SecurityContext = /*#__PURE__*/ (function (SecurityContext) {\n SecurityContext[SecurityContext[\"NONE\"] = 0] = \"NONE\";\n SecurityContext[SecurityContext[\"HTML\"] = 1] = \"HTML\";\n SecurityContext[SecurityContext[\"STYLE\"] = 2] = \"STYLE\";\n SecurityContext[SecurityContext[\"SCRIPT\"] = 3] = \"SCRIPT\";\n SecurityContext[SecurityContext[\"URL\"] = 4] = \"URL\";\n SecurityContext[SecurityContext[\"RESOURCE_URL\"] = 5] = \"RESOURCE_URL\";\n SecurityContext[SecurityContext[\"ATTRIBUTE_NO_BINDING\"] = 6] = \"ATTRIBUTE_NO_BINDING\";\n; return SecurityContext;})(SecurityContext || {});\n\nlet _SECURITY_SCHEMA;\nconst SVG_NAMESPACE = 'svg';\nconst MATH_ML_NAMESPACE = 'math';\nconst NO_NAMESPACE = '';\nconst MATCH_ALL_ELEMENTS = '*';\nconst createNullObj = () => Object.create(null);\nfunction SECURITY_SCHEMA() {\n if (_SECURITY_SCHEMA) {\n return _SECURITY_SCHEMA;\n }\n _SECURITY_SCHEMA = createNullObj();\n registerContext(SecurityContext.HTML, undefined, [['iframe', ['srcdoc']], ['*', ['innerHTML', 'outerHTML']]]);\n registerContext(SecurityContext.STYLE, undefined, [['*', ['style']]]);\n registerContext(SecurityContext.URL, undefined, [['*', ['formAction']], ['area', ['href']], ['a', ['href', 'xlink:href']], ['form', ['action']]]);\n registerContext(SecurityContext.URL, MATH_ML_NAMESPACE, [['*', ['href', 'xlink:href']]]);\n registerContext(SecurityContext.RESOURCE_URL, undefined, [['base', ['href']], ['embed', ['src']], ['frame', ['src']], ['iframe', ['src']], ['link', ['href']], ['object', ['codebase', 'data']]]);\n registerContext(SecurityContext.URL, SVG_NAMESPACE, [['a', ['href', 'xlink:href']]]);\n registerContext(SecurityContext.ATTRIBUTE_NO_BINDING, SVG_NAMESPACE, [['animate', ['attributeName', 'values', 'to', 'from']], ['set', ['to', 'attributeName']], ['animateMotion', ['attributeName']], ['animateTransform', ['attributeName']]]);\n registerContext(SecurityContext.ATTRIBUTE_NO_BINDING, undefined, [['unknown', ['attributeName', 'values', 'to', 'from', 'sandbox', 'allow', 'allowFullscreen', 'referrerPolicy', 'csp', 'fetchPriority', 'credentialless']], ['iframe', ['sandbox', 'allow', 'allowFullscreen', 'referrerPolicy', 'csp', 'fetchPriority', 'credentialless']]]);\n return _SECURITY_SCHEMA;\n}\nfunction registerContext(ctx, namespace, specs) {\n const nsKey = namespace ?? NO_NAMESPACE;\n for (const [element, attributeNames] of specs) {\n const tagName = element.toLowerCase();\n for (const attr of attributeNames) {\n const attrLower = attr.toLowerCase();\n const attrSchema = _SECURITY_SCHEMA[attrLower] ??= createNullObj();\n const nsSchema = attrSchema[nsKey] ??= createNullObj();\n nsSchema[tagName] = ctx;\n }\n }\n}\nfunction checkSecurityContext(tagName, propName, namespace) {\n const securitySchema = SECURITY_SCHEMA();\n const attrSchema = securitySchema[propName.toLowerCase()];\n if (!attrSchema) {\n return SecurityContext.NONE;\n }\n const tagLower = tagName.toLowerCase();\n let context;\n if (namespace) {\n const nsSchema = attrSchema[namespace];\n if (nsSchema) {\n context = nsSchema[tagLower] ?? nsSchema[MATCH_ALL_ELEMENTS];\n }\n }\n if (context === undefined) {\n const defaultSchema = attrSchema[NO_NAMESPACE];\n if (defaultSchema) {\n context = defaultSchema[tagLower] ?? defaultSchema[MATCH_ALL_ELEMENTS];\n }\n }\n if (context === undefined && (!namespace || namespace === NO_NAMESPACE)) {\n const svgSchema = attrSchema[SVG_NAMESPACE];\n if (svgSchema) {\n context = svgSchema[tagLower];\n }\n }\n return context ?? SecurityContext.NONE;\n}\n\nfunction unwrapRNode(value) {\n while (Array.isArray(value)) {\n value = value[HOST];\n }\n return value;\n}\nfunction unwrapLView(value) {\n while (Array.isArray(value)) {\n if (typeof value[TYPE] === 'object') return value;\n value = value[HOST];\n }\n return null;\n}\nfunction getNativeByIndex(index, lView) {\n ngDevMode && assertIndexInRange(lView, index);\n ngDevMode && assertGreaterThanOrEqual(index, HEADER_OFFSET, 'Expected to be past HEADER_OFFSET');\n return unwrapRNode(lView[index]);\n}\nfunction getNativeByTNode(tNode, lView) {\n ngDevMode && assertTNodeForLView(tNode, lView);\n ngDevMode && assertIndexInRange(lView, tNode.index);\n const node = unwrapRNode(lView[tNode.index]);\n return node;\n}\nfunction getNativeByTNodeOrNull(tNode, lView) {\n const index = tNode === null ? -1 : tNode.index;\n if (index !== -1) {\n ngDevMode && assertTNodeForLView(tNode, lView);\n const node = unwrapRNode(lView[index]);\n return node;\n }\n return null;\n}\nfunction getTNode(tView, index) {\n ngDevMode && assertGreaterThan(index, -1, 'wrong index for TNode');\n ngDevMode && assertLessThan(index, tView.data.length, 'wrong index for TNode');\n const tNode = tView.data[index];\n ngDevMode && tNode !== null && assertTNode(tNode);\n return tNode;\n}\nfunction load(view, index) {\n ngDevMode && assertIndexInRange(view, index);\n return view[index];\n}\nfunction store(tView, lView, index, value) {\n if (index >= tView.data.length) {\n tView.data[index] = null;\n tView.blueprint[index] = null;\n }\n lView[index] = value;\n}\nfunction getComponentLViewByIndex(nodeIndex, hostView) {\n ngDevMode && assertIndexInRange(hostView, nodeIndex);\n const slotValue = hostView[nodeIndex];\n const lView = isLView(slotValue) ? slotValue : slotValue[HOST];\n return lView;\n}\nfunction isCreationMode(view) {\n return (view[FLAGS] & 4) === 4;\n}\nfunction viewAttachedToChangeDetector(view) {\n return (view[FLAGS] & 128) === 128;\n}\nfunction viewAttachedToContainer(view) {\n return isLContainer(view[PARENT]);\n}\nfunction getConstant(consts, index) {\n if (index === null || index === undefined) return null;\n ngDevMode && assertIndexInRange(consts, index);\n return consts[index];\n}\nfunction resetPreOrderHookFlags(lView) {\n lView[PREORDER_HOOK_FLAGS] = 0;\n}\nfunction markViewForRefresh(lView) {\n if (lView[FLAGS] & 1024) {\n return;\n }\n lView[FLAGS] |= 1024;\n if (viewAttachedToChangeDetector(lView)) {\n markAncestorsForTraversal(lView);\n }\n}\nfunction walkUpViews(nestingLevel, currentView) {\n while (nestingLevel > 0) {\n ngDevMode && assertDefined(currentView[DECLARATION_VIEW], 'Declaration view should be defined if nesting level is greater than 0.');\n currentView = currentView[DECLARATION_VIEW];\n nestingLevel--;\n }\n return currentView;\n}\nfunction requiresRefreshOrTraversal(lView) {\n return !!(lView[FLAGS] & (1024 | 8192) || lView[REACTIVE_TEMPLATE_CONSUMER]?.dirty);\n}\nfunction updateAncestorTraversalFlagsOnAttach(lView) {\n lView[ENVIRONMENT].changeDetectionScheduler?.notify(8);\n if (lView[FLAGS] & 64) {\n lView[FLAGS] |= 1024;\n }\n if (requiresRefreshOrTraversal(lView)) {\n markAncestorsForTraversal(lView);\n }\n}\nfunction markAncestorsForTraversal(lView) {\n lView[ENVIRONMENT].changeDetectionScheduler?.notify(0);\n let parent = getLViewParent(lView);\n while (parent !== null) {\n if (parent[FLAGS] & 8192) {\n break;\n }\n parent[FLAGS] |= 8192;\n if (!viewAttachedToChangeDetector(parent)) {\n break;\n }\n parent = getLViewParent(parent);\n }\n}\nfunction storeLViewOnDestroy(lView, onDestroyCallback) {\n if (isDestroyed(lView)) {\n throw new RuntimeError(911, ngDevMode && 'View has already been destroyed.');\n }\n if (lView[ON_DESTROY_HOOKS] === null) {\n lView[ON_DESTROY_HOOKS] = [];\n }\n lView[ON_DESTROY_HOOKS].push(onDestroyCallback);\n}\nfunction removeLViewOnDestroy(lView, onDestroyCallback) {\n if (lView[ON_DESTROY_HOOKS] === null) return;\n const destroyCBIdx = lView[ON_DESTROY_HOOKS].indexOf(onDestroyCallback);\n if (destroyCBIdx !== -1) {\n lView[ON_DESTROY_HOOKS].splice(destroyCBIdx, 1);\n }\n}\nfunction getLViewParent(lView) {\n ngDevMode && assertLView(lView);\n const parent = lView[PARENT];\n return isLContainer(parent) ? parent[PARENT] : parent;\n}\nfunction getOrCreateLViewCleanup(view) {\n return view[CLEANUP] ??= [];\n}\nfunction getOrCreateTViewCleanup(tView) {\n return tView.cleanup ??= [];\n}\nfunction storeCleanupWithContext(tView, lView, context, cleanupFn) {\n const lCleanup = getOrCreateLViewCleanup(lView);\n ngDevMode && assertDefined(context, 'Cleanup context is mandatory when registering framework-level destroy hooks');\n lCleanup.push(context);\n if (tView.firstCreatePass) {\n getOrCreateTViewCleanup(tView).push(cleanupFn, lCleanup.length - 1);\n } else {\n if (ngDevMode) {\n Object.freeze(getOrCreateTViewCleanup(tView));\n }\n }\n}\n\nconst instructionState = {\n lFrame: /*#__PURE__*/ createLFrame(null),\n bindingsEnabled: true,\n skipHydrationRootTNode: null\n};\nvar CheckNoChangesMode = /*#__PURE__*/ (function (CheckNoChangesMode) {\n CheckNoChangesMode[CheckNoChangesMode[\"Off\"] = 0] = \"Off\";\n CheckNoChangesMode[CheckNoChangesMode[\"Exhaustive\"] = 1] = \"Exhaustive\";\n CheckNoChangesMode[CheckNoChangesMode[\"OnlyDirtyViews\"] = 2] = \"OnlyDirtyViews\";\n; return CheckNoChangesMode;})(CheckNoChangesMode || {});\n\nlet _checkNoChangesMode = 0;\nlet _isRefreshingViews = false;\nfunction getElementDepthCount() {\n return instructionState.lFrame.elementDepthCount;\n}\nfunction increaseElementDepthCount() {\n instructionState.lFrame.elementDepthCount++;\n}\nfunction decreaseElementDepthCount() {\n instructionState.lFrame.elementDepthCount--;\n}\nfunction getBindingsEnabled() {\n return instructionState.bindingsEnabled;\n}\nfunction isInSkipHydrationBlock() {\n return instructionState.skipHydrationRootTNode !== null;\n}\nfunction isSkipHydrationRootTNode(tNode) {\n return instructionState.skipHydrationRootTNode === tNode;\n}\nfunction ษตษตenableBindings() {\n instructionState.bindingsEnabled = true;\n}\nfunction enterSkipHydrationBlock(tNode) {\n instructionState.skipHydrationRootTNode = tNode;\n}\nfunction ษตษตdisableBindings() {\n instructionState.bindingsEnabled = false;\n}\nfunction leaveSkipHydrationBlock() {\n instructionState.skipHydrationRootTNode = null;\n}\nfunction getLView() {\n return instructionState.lFrame.lView;\n}\nfunction getTView() {\n return instructionState.lFrame.tView;\n}\nfunction ษตษตrestoreView(viewToRestore) {\n instructionState.lFrame.contextLView = viewToRestore;\n return viewToRestore[CONTEXT];\n}\nfunction ษตษตresetView(value) {\n instructionState.lFrame.contextLView = null;\n return value;\n}\nfunction getCurrentTNode() {\n let currentTNode = getCurrentTNodePlaceholderOk();\n while (currentTNode !== null && currentTNode.type === 64) {\n currentTNode = currentTNode.parent;\n }\n return currentTNode;\n}\nfunction getCurrentTNodePlaceholderOk() {\n return instructionState.lFrame.currentTNode;\n}\nfunction getCurrentParentTNode() {\n const lFrame = instructionState.lFrame;\n const currentTNode = lFrame.currentTNode;\n return lFrame.isParent ? currentTNode : currentTNode.parent;\n}\nfunction setCurrentTNode(tNode, isParent) {\n ngDevMode && tNode && assertTNodeForTView(tNode, instructionState.lFrame.tView);\n const lFrame = instructionState.lFrame;\n lFrame.currentTNode = tNode;\n lFrame.isParent = isParent;\n}\nfunction isCurrentTNodeParent() {\n return instructionState.lFrame.isParent;\n}\nfunction setCurrentTNodeAsNotParent() {\n instructionState.lFrame.isParent = false;\n}\nfunction getContextLView() {\n const contextLView = instructionState.lFrame.contextLView;\n ngDevMode && assertDefined(contextLView, 'contextLView must be defined.');\n return contextLView;\n}\nfunction isInCheckNoChangesMode() {\n !ngDevMode && throwError('Must never be called in production mode');\n return _checkNoChangesMode !== CheckNoChangesMode.Off;\n}\nfunction isExhaustiveCheckNoChanges() {\n !ngDevMode && throwError('Must never be called in production mode');\n return _checkNoChangesMode === CheckNoChangesMode.Exhaustive;\n}\nfunction setIsInCheckNoChangesMode(mode) {\n !ngDevMode && throwError('Must never be called in production mode');\n _checkNoChangesMode = mode;\n}\nfunction isRefreshingViews() {\n return _isRefreshingViews;\n}\nfunction setIsRefreshingViews(mode) {\n const prev = _isRefreshingViews;\n _isRefreshingViews = mode;\n return prev;\n}\nfunction getBindingRoot() {\n const lFrame = instructionState.lFrame;\n let index = lFrame.bindingRootIndex;\n if (index === -1) {\n index = lFrame.bindingRootIndex = lFrame.tView.bindingStartIndex;\n }\n return index;\n}\nfunction getBindingIndex() {\n return instructionState.lFrame.bindingIndex;\n}\nfunction setBindingIndex(value) {\n return instructionState.lFrame.bindingIndex = value;\n}\nfunction nextBindingIndex() {\n return instructionState.lFrame.bindingIndex++;\n}\nfunction incrementBindingIndex(count) {\n const lFrame = instructionState.lFrame;\n const index = lFrame.bindingIndex;\n lFrame.bindingIndex = lFrame.bindingIndex + count;\n return index;\n}\nfunction isInI18nBlock() {\n return instructionState.lFrame.inI18n;\n}\nfunction setInI18nBlock(isInI18nBlock) {\n instructionState.lFrame.inI18n = isInI18nBlock;\n}\nfunction setBindingRootForHostBindings(bindingRootIndex, currentDirectiveIndex) {\n const lFrame = instructionState.lFrame;\n lFrame.bindingIndex = lFrame.bindingRootIndex = bindingRootIndex;\n setCurrentDirectiveIndex(currentDirectiveIndex);\n}\nfunction getCurrentDirectiveIndex() {\n return instructionState.lFrame.currentDirectiveIndex;\n}\nfunction setCurrentDirectiveIndex(currentDirectiveIndex) {\n instructionState.lFrame.currentDirectiveIndex = currentDirectiveIndex;\n}\nfunction getCurrentDirectiveDef(tData) {\n const currentDirectiveIndex = instructionState.lFrame.currentDirectiveIndex;\n return currentDirectiveIndex === -1 ? null : tData[currentDirectiveIndex];\n}\nfunction getCurrentQueryIndex() {\n return instructionState.lFrame.currentQueryIndex;\n}\nfunction setCurrentQueryIndex(value) {\n instructionState.lFrame.currentQueryIndex = value;\n}\nfunction getDeclarationTNode(lView) {\n const tView = lView[TVIEW];\n if (tView.type === 2) {\n ngDevMode && assertDefined(tView.declTNode, 'Embedded TNodes should have declaration parents.');\n return tView.declTNode;\n }\n if (tView.type === 1) {\n return lView[T_HOST];\n }\n return null;\n}\nfunction enterDI(lView, tNode, flags) {\n ngDevMode && assertLViewOrUndefined(lView);\n if (flags & 4) {\n ngDevMode && assertTNodeForTView(tNode, lView[TVIEW]);\n let parentTNode = tNode;\n let parentLView = lView;\n while (true) {\n ngDevMode && assertDefined(parentTNode, 'Parent TNode should be defined');\n parentTNode = parentTNode.parent;\n if (parentTNode === null && !(flags & 1)) {\n parentTNode = getDeclarationTNode(parentLView);\n if (parentTNode === null) break;\n ngDevMode && assertDefined(parentLView, 'Parent LView should be defined');\n parentLView = parentLView[DECLARATION_VIEW];\n if (parentTNode.type & (2 | 8)) {\n break;\n }\n } else {\n break;\n }\n }\n if (parentTNode === null) {\n return false;\n } else {\n tNode = parentTNode;\n lView = parentLView;\n }\n }\n ngDevMode && assertTNodeForLView(tNode, lView);\n const lFrame = instructionState.lFrame = allocLFrame();\n lFrame.currentTNode = tNode;\n lFrame.lView = lView;\n return true;\n}\nfunction enterView(newView) {\n ngDevMode && assertNotEqual(newView[0], newView[1], '????');\n ngDevMode && assertLViewOrUndefined(newView);\n const newLFrame = allocLFrame();\n if (ngDevMode) {\n assertEqual(newLFrame.isParent, true, 'Expected clean LFrame');\n assertEqual(newLFrame.lView, null, 'Expected clean LFrame');\n assertEqual(newLFrame.tView, null, 'Expected clean LFrame');\n assertEqual(newLFrame.selectedIndex, -1, 'Expected clean LFrame');\n assertEqual(newLFrame.elementDepthCount, 0, 'Expected clean LFrame');\n assertEqual(newLFrame.currentDirectiveIndex, -1, 'Expected clean LFrame');\n assertEqual(newLFrame.currentNamespace, null, 'Expected clean LFrame');\n assertEqual(newLFrame.bindingRootIndex, -1, 'Expected clean LFrame');\n assertEqual(newLFrame.currentQueryIndex, 0, 'Expected clean LFrame');\n }\n const tView = newView[TVIEW];\n instructionState.lFrame = newLFrame;\n ngDevMode && tView.firstChild && assertTNodeForTView(tView.firstChild, tView);\n newLFrame.currentTNode = tView.firstChild;\n newLFrame.lView = newView;\n newLFrame.tView = tView;\n newLFrame.contextLView = newView;\n newLFrame.bindingIndex = tView.bindingStartIndex;\n newLFrame.inI18n = false;\n}\nfunction allocLFrame() {\n const currentLFrame = instructionState.lFrame;\n const childLFrame = currentLFrame === null ? null : currentLFrame.child;\n const newLFrame = childLFrame === null ? createLFrame(currentLFrame) : childLFrame;\n return newLFrame;\n}\nfunction createLFrame(parent) {\n const lFrame = {\n currentTNode: null,\n isParent: true,\n lView: null,\n tView: null,\n selectedIndex: -1,\n contextLView: null,\n elementDepthCount: 0,\n currentNamespace: null,\n currentDirectiveIndex: -1,\n bindingRootIndex: -1,\n bindingIndex: -1,\n currentQueryIndex: 0,\n parent: parent,\n child: null,\n inI18n: false\n };\n parent !== null && (parent.child = lFrame);\n return lFrame;\n}\nfunction leaveViewLight() {\n const oldLFrame = instructionState.lFrame;\n instructionState.lFrame = oldLFrame.parent;\n oldLFrame.currentTNode = null;\n oldLFrame.lView = null;\n return oldLFrame;\n}\nconst leaveDI = leaveViewLight;\nfunction leaveView() {\n const oldLFrame = leaveViewLight();\n oldLFrame.isParent = true;\n oldLFrame.tView = null;\n oldLFrame.selectedIndex = -1;\n oldLFrame.contextLView = null;\n oldLFrame.elementDepthCount = 0;\n oldLFrame.currentDirectiveIndex = -1;\n oldLFrame.currentNamespace = null;\n oldLFrame.bindingRootIndex = -1;\n oldLFrame.bindingIndex = -1;\n oldLFrame.currentQueryIndex = 0;\n}\nfunction nextContextImpl(level) {\n const contextLView = instructionState.lFrame.contextLView = walkUpViews(level, instructionState.lFrame.contextLView);\n return contextLView[CONTEXT];\n}\nfunction getSelectedIndex() {\n return instructionState.lFrame.selectedIndex;\n}\nfunction setSelectedIndex(index) {\n ngDevMode && index !== -1 && assertGreaterThanOrEqual(index, HEADER_OFFSET, 'Index must be past HEADER_OFFSET (or -1).');\n ngDevMode && assertLessThan(index, instructionState.lFrame.lView.length, \"Can't set index passed end of LView\");\n instructionState.lFrame.selectedIndex = index;\n}\nfunction getSelectedTNode() {\n const lFrame = instructionState.lFrame;\n return getTNode(lFrame.tView, lFrame.selectedIndex);\n}\nfunction ษตษตnamespaceSVG() {\n instructionState.lFrame.currentNamespace = SVG_NAMESPACE;\n}\nfunction ษตษตnamespaceMathML() {\n instructionState.lFrame.currentNamespace = MATH_ML_NAMESPACE;\n}\nfunction ษตษตnamespaceHTML() {\n namespaceHTMLInternal();\n}\nfunction namespaceHTMLInternal() {\n instructionState.lFrame.currentNamespace = null;\n}\nfunction getNamespace() {\n return instructionState.lFrame.currentNamespace;\n}\nlet _wasLastNodeCreated = true;\nfunction wasLastNodeCreated() {\n return _wasLastNodeCreated;\n}\nfunction lastNodeWasCreated(flag) {\n _wasLastNodeCreated = flag;\n}\n\nfunction promiseWithResolvers() {\n let resolve;\n let reject;\n const promise = new Promise((res, rej) => {\n resolve = res;\n reject = rej;\n });\n return {\n promise,\n resolve,\n reject\n };\n}\n\nfunction createInjector(defType, parent = null, additionalProviders = null, name) {\n const injector = createInjectorWithoutInjectorInstances(defType, parent, additionalProviders, name);\n injector.resolveInjectorInitializers();\n return injector;\n}\nfunction createInjectorWithoutInjectorInstances(defType, parent = null, additionalProviders = null, name, scopes = new Set()) {\n const providers = [additionalProviders || EMPTY_ARRAY, importProvidersFrom(defType)];\n let source = undefined;\n if (ngDevMode) {\n source = name || (typeof defType === 'object' ? undefined : stringify(defType));\n }\n return new R3Injector(providers, parent || getNullInjector(), source || null, scopes);\n}\n\nconst specialProviders = /*#__PURE__*/ new Set();\nfunction registerSpecialProvider(clazz) {\n if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n specialProviders.add(clazz);\n }\n}\nfunction getAllSpecialProviders() {\n return specialProviders;\n}\n\nclass Injector {\n static THROW_IF_NOT_FOUND = THROW_IF_NOT_FOUND;\n static NULL = new NullInjector();\n static create(options, parent) {\n if (Array.isArray(options)) {\n return createInjector({\n name: ''\n }, parent, options, '');\n } else {\n const name = options.name ?? '';\n return createInjector({\n name\n }, options.parent, options.providers, name);\n }\n }\n static ษตprov =\n /* @__PURE__ */\n ษตษตdefineInjectable({\n token: Injector,\n providedIn: 'any',\n factory: () => ษตษตinject(INJECTOR$1)\n });\n static __NG_ELEMENT_ID__ = -1;\n}\nif (typeof ngDevMode === 'undefined' || ngDevMode) {\n /*#__PURE__*/ registerSpecialProvider(Injector);\n}\n\nconst DOCUMENT = /*#__PURE__*/ new InjectionToken(typeof ngDevMode !== 'undefined' && ngDevMode ? 'DocumentToken' : '');\n\nclass DestroyRef {\n static __NG_ELEMENT_ID__ = injectDestroyRef;\n static __NG_ENV_ID__ = injector => injector;\n}\nif (typeof ngDevMode === 'undefined' || ngDevMode) {\n /*#__PURE__*/ registerSpecialProvider(DestroyRef);\n}\nclass NodeInjectorDestroyRef extends DestroyRef {\n _lView;\n constructor(_lView) {\n super();\n this._lView = _lView;\n }\n get destroyed() {\n return isDestroyed(this._lView);\n }\n onDestroy(callback) {\n const lView = this._lView;\n storeLViewOnDestroy(lView, callback);\n return () => removeLViewOnDestroy(lView, callback);\n }\n}\nfunction injectDestroyRef() {\n return new NodeInjectorDestroyRef(getLView());\n}\n\nconst SCHEDULE_IN_ROOT_ZONE_DEFAULT = false;\n\nconst DEBUG_TASK_TRACKER = /*#__PURE__*/ new InjectionToken(typeof ngDevMode !== 'undefined' && ngDevMode ? 'DEBUG_TASK_TRACKER' : '');\n\nlet PendingTasksInternal = /*#__PURE__*/ (() => {\nclass PendingTasksInternal {\n taskId = 0;\n pendingTasks = new Set();\n destroyed = false;\n pendingTask = new BehaviorSubject(false);\n debugTaskTracker = inject(DEBUG_TASK_TRACKER, {\n optional: true\n });\n get hasPendingTasks() {\n return this.destroyed ? false : this.pendingTask.value;\n }\n get hasPendingTasksObservable() {\n if (this.destroyed) {\n return new Observable(subscriber => {\n subscriber.next(false);\n subscriber.complete();\n });\n }\n return this.pendingTask;\n }\n add() {\n if (!this.hasPendingTasks && !this.destroyed) {\n this.pendingTask.next(true);\n }\n const taskId = this.taskId++;\n this.pendingTasks.add(taskId);\n this.debugTaskTracker?.add(taskId);\n return taskId;\n }\n has(taskId) {\n return this.pendingTasks.has(taskId);\n }\n remove(taskId) {\n this.pendingTasks.delete(taskId);\n this.debugTaskTracker?.remove(taskId);\n if (this.pendingTasks.size === 0 && this.hasPendingTasks) {\n this.pendingTask.next(false);\n }\n }\n ngOnDestroy() {\n this.pendingTasks.clear();\n if (this.hasPendingTasks) {\n this.pendingTask.next(false);\n }\n this.destroyed = true;\n this.pendingTask.unsubscribe();\n }\n static ษตprov =\n /* @__PURE__ */\n ษตษตdefineInjectable({\n token: PendingTasksInternal,\n providedIn: 'root',\n factory: () => new PendingTasksInternal()\n });\n}\nreturn PendingTasksInternal;\n})();\n\nclass EventEmitter_ extends Subject {\n __isAsync;\n destroyRef = undefined;\n pendingTasks = undefined;\n constructor(isAsync = false) {\n super();\n this.__isAsync = isAsync;\n if (isInInjectionContext()) {\n this.destroyRef = inject(DestroyRef, {\n optional: true\n }) ?? undefined;\n this.pendingTasks = inject(PendingTasksInternal, {\n optional: true\n }) ?? undefined;\n }\n }\n emit(value) {\n const prevConsumer = setActiveConsumer$1(null);\n try {\n super.next(value);\n } finally {\n setActiveConsumer$1(prevConsumer);\n }\n }\n subscribe(observerOrNext, error, complete) {\n let nextFn = observerOrNext;\n let errorFn = error || (() => null);\n let completeFn = complete;\n if (observerOrNext && typeof observerOrNext === 'object') {\n const observer = observerOrNext;\n nextFn = observer.next?.bind(observer);\n errorFn = observer.error?.bind(observer);\n completeFn = observer.complete?.bind(observer);\n }\n if (this.__isAsync) {\n errorFn = this.wrapInTimeout(errorFn);\n if (nextFn) {\n nextFn = this.wrapInTimeout(nextFn);\n }\n if (completeFn) {\n completeFn = this.wrapInTimeout(completeFn);\n }\n }\n const sink = super.subscribe({\n next: nextFn,\n error: errorFn,\n complete: completeFn\n });\n if (observerOrNext instanceof Subscription) {\n observerOrNext.add(sink);\n }\n return sink;\n }\n wrapInTimeout(fn) {\n return value => {\n const taskId = this.pendingTasks?.add();\n setTimeout(() => {\n try {\n fn(value);\n } finally {\n if (taskId !== undefined) {\n this.pendingTasks?.remove(taskId);\n }\n }\n });\n };\n }\n}\nconst EventEmitter = EventEmitter_;\n\nfunction noop(...args) {}\n\nfunction scheduleCallbackWithRafRace(callback) {\n let timeoutId;\n let animationFrameId;\n function cleanup() {\n callback = noop;\n try {\n if (animationFrameId !== undefined && typeof cancelAnimationFrame === 'function') {\n cancelAnimationFrame(animationFrameId);\n }\n if (timeoutId !== undefined) {\n clearTimeout(timeoutId);\n }\n } catch {}\n }\n timeoutId = setTimeout(() => {\n callback();\n cleanup();\n });\n if (typeof requestAnimationFrame === 'function') {\n animationFrameId = requestAnimationFrame(() => {\n callback();\n cleanup();\n });\n }\n return () => cleanup();\n}\nfunction scheduleCallbackWithMicrotask(callback) {\n queueMicrotask(() => callback());\n return () => {\n callback = noop;\n };\n}\n\nclass AsyncStackTaggingZoneSpec {\n createTask;\n constructor(namePrefix, consoleAsyncStackTaggingImpl = console) {\n this.name = 'asyncStackTagging for ' + namePrefix;\n this.createTask = consoleAsyncStackTaggingImpl?.createTask ?? (() => null);\n }\n name;\n onScheduleTask(delegate, _current, target, task) {\n task.consoleTask = this.createTask(`Zone - ${task.source || task.type}`);\n return delegate.scheduleTask(target, task);\n }\n onInvokeTask(delegate, _currentZone, targetZone, task, applyThis, applyArgs) {\n let ret;\n if (task.consoleTask) {\n ret = task.consoleTask.run(() => delegate.invokeTask(targetZone, task, applyThis, applyArgs));\n } else {\n ret = delegate.invokeTask(targetZone, task, applyThis, applyArgs);\n }\n return ret;\n }\n}\n\nconst isAngularZoneProperty = 'isAngularZone';\nconst angularZoneInstanceIdProperty = isAngularZoneProperty + '_ID';\nlet ngZoneInstanceId = 0;\nclass NgZone {\n hasPendingMacrotasks = false;\n hasPendingMicrotasks = false;\n isStable = true;\n onUnstable = new EventEmitter(false);\n onMicrotaskEmpty = new EventEmitter(false);\n onStable = new EventEmitter(false);\n onError = new EventEmitter(false);\n constructor(options) {\n const {\n enableLongStackTrace = false,\n shouldCoalesceEventChangeDetection = false,\n shouldCoalesceRunChangeDetection = false,\n scheduleInRootZone = SCHEDULE_IN_ROOT_ZONE_DEFAULT\n } = options;\n if (typeof Zone == 'undefined') {\n throw new RuntimeError(908, ngDevMode && `In this configuration Angular requires Zone.js`);\n }\n Zone.assertZonePatched();\n const self = this;\n self._nesting = 0;\n self._outer = self._inner = Zone.current;\n if (ngDevMode) {\n self._inner = self._inner.fork(new AsyncStackTaggingZoneSpec('Angular'));\n }\n if (Zone['TaskTrackingZoneSpec']) {\n self._inner = self._inner.fork(new Zone['TaskTrackingZoneSpec']());\n }\n if (enableLongStackTrace && Zone['longStackTraceZoneSpec']) {\n self._inner = self._inner.fork(Zone['longStackTraceZoneSpec']);\n }\n self.shouldCoalesceEventChangeDetection = !shouldCoalesceRunChangeDetection && shouldCoalesceEventChangeDetection;\n self.shouldCoalesceRunChangeDetection = shouldCoalesceRunChangeDetection;\n self.callbackScheduled = false;\n self.scheduleInRootZone = scheduleInRootZone;\n forkInnerZoneWithAngularBehavior(self);\n }\n static isInAngularZone() {\n return typeof Zone !== 'undefined' && Zone.current.get(isAngularZoneProperty) === true;\n }\n static assertInAngularZone() {\n if (!NgZone.isInAngularZone()) {\n throw new RuntimeError(909, ngDevMode && 'Expected to be in Angular Zone, but it is not!');\n }\n }\n static assertNotInAngularZone() {\n if (NgZone.isInAngularZone()) {\n throw new RuntimeError(909, ngDevMode && 'Expected to not be in Angular Zone, but it is!');\n }\n }\n run(fn, applyThis, applyArgs) {\n return this._inner.run(fn, applyThis, applyArgs);\n }\n runTask(fn, applyThis, applyArgs, name) {\n const zone = this._inner;\n const task = zone.scheduleEventTask('NgZoneEvent: ' + name, fn, EMPTY_PAYLOAD, noop, noop);\n try {\n return zone.runTask(task, applyThis, applyArgs);\n } finally {\n zone.cancelTask(task);\n }\n }\n runGuarded(fn, applyThis, applyArgs) {\n return this._inner.runGuarded(fn, applyThis, applyArgs);\n }\n runOutsideAngular(fn) {\n return this._outer.run(fn);\n }\n}\nconst EMPTY_PAYLOAD = {};\nfunction checkStable(zone) {\n if (zone._nesting == 0 && !zone.hasPendingMicrotasks && !zone.isStable) {\n try {\n zone._nesting++;\n zone.onMicrotaskEmpty.emit(null);\n } finally {\n zone._nesting--;\n if (!zone.hasPendingMicrotasks) {\n try {\n zone.runOutsideAngular(() => zone.onStable.emit(null));\n } finally {\n zone.isStable = true;\n }\n }\n }\n }\n}\nfunction delayChangeDetectionForEvents(zone) {\n if (zone.isCheckStableRunning || zone.callbackScheduled) {\n return;\n }\n zone.callbackScheduled = true;\n function scheduleCheckStable() {\n scheduleCallbackWithRafRace(() => {\n zone.callbackScheduled = false;\n updateMicroTaskStatus(zone);\n zone.isCheckStableRunning = true;\n checkStable(zone);\n zone.isCheckStableRunning = false;\n });\n }\n if (zone.scheduleInRootZone) {\n Zone.root.run(() => {\n scheduleCheckStable();\n });\n } else {\n zone._outer.run(() => {\n scheduleCheckStable();\n });\n }\n updateMicroTaskStatus(zone);\n}\nfunction forkInnerZoneWithAngularBehavior(zone) {\n const delayChangeDetectionForEventsDelegate = () => {\n delayChangeDetectionForEvents(zone);\n };\n const instanceId = ngZoneInstanceId++;\n zone._inner = zone._inner.fork({\n name: 'angular',\n properties: {\n [isAngularZoneProperty]: true,\n [angularZoneInstanceIdProperty]: instanceId,\n [angularZoneInstanceIdProperty + instanceId]: true\n },\n onInvokeTask: (delegate, current, target, task, applyThis, applyArgs) => {\n if (shouldBeIgnoredByZone(applyArgs)) {\n return delegate.invokeTask(target, task, applyThis, applyArgs);\n }\n try {\n onEnter(zone);\n return delegate.invokeTask(target, task, applyThis, applyArgs);\n } finally {\n if (zone.shouldCoalesceEventChangeDetection && task.type === 'eventTask' || zone.shouldCoalesceRunChangeDetection) {\n delayChangeDetectionForEventsDelegate();\n }\n onLeave(zone);\n }\n },\n onInvoke: (delegate, current, target, callback, applyThis, applyArgs, source) => {\n try {\n onEnter(zone);\n return delegate.invoke(target, callback, applyThis, applyArgs, source);\n } finally {\n if (zone.shouldCoalesceRunChangeDetection && !zone.callbackScheduled && !isSchedulerTick(applyArgs)) {\n delayChangeDetectionForEventsDelegate();\n }\n onLeave(zone);\n }\n },\n onHasTask: (delegate, current, target, hasTaskState) => {\n delegate.hasTask(target, hasTaskState);\n if (current === target) {\n if (hasTaskState.change == 'microTask') {\n zone._hasPendingMicrotasks = hasTaskState.microTask;\n updateMicroTaskStatus(zone);\n checkStable(zone);\n } else if (hasTaskState.change == 'macroTask') {\n zone.hasPendingMacrotasks = hasTaskState.macroTask;\n }\n }\n },\n onHandleError: (delegate, current, target, error) => {\n delegate.handleError(target, error);\n zone.runOutsideAngular(() => zone.onError.emit(error));\n return false;\n }\n });\n}\nfunction updateMicroTaskStatus(zone) {\n if (zone._hasPendingMicrotasks || (zone.shouldCoalesceEventChangeDetection || zone.shouldCoalesceRunChangeDetection) && zone.callbackScheduled === true) {\n zone.hasPendingMicrotasks = true;\n } else {\n zone.hasPendingMicrotasks = false;\n }\n}\nfunction onEnter(zone) {\n zone._nesting++;\n if (zone.isStable) {\n zone.isStable = false;\n zone.onUnstable.emit(null);\n }\n}\nfunction onLeave(zone) {\n zone._nesting--;\n checkStable(zone);\n}\nclass NoopNgZone {\n hasPendingMicrotasks = false;\n hasPendingMacrotasks = false;\n isStable = true;\n onUnstable = new EventEmitter();\n onMicrotaskEmpty = new EventEmitter();\n onStable = new EventEmitter();\n onError = new EventEmitter();\n run(fn, applyThis, applyArgs) {\n return fn.apply(applyThis, applyArgs);\n }\n runGuarded(fn, applyThis, applyArgs) {\n return fn.apply(applyThis, applyArgs);\n }\n runOutsideAngular(fn) {\n return fn();\n }\n runTask(fn, applyThis, applyArgs, name) {\n return fn.apply(applyThis, applyArgs);\n }\n}\nfunction shouldBeIgnoredByZone(applyArgs) {\n return hasApplyArgsData(applyArgs, '__ignore_ng_zone__');\n}\nfunction isSchedulerTick(applyArgs) {\n return hasApplyArgsData(applyArgs, '__scheduler_tick__');\n}\nfunction hasApplyArgsData(applyArgs, key) {\n if (!Array.isArray(applyArgs)) {\n return false;\n }\n if (applyArgs.length !== 1) {\n return false;\n }\n return applyArgs[0]?.data?.[key] === true;\n}\n\nclass ErrorHandler {\n _console = console;\n handleError(error) {\n this._console.error('ERROR', error);\n }\n}\nfunction encapsulateBoundaryError(error) {\n if (isErrorLike(error)) {\n return error;\n }\n return new ErrorBoundaryWrappedError(error);\n}\nfunction isErrorLike(error) {\n return error instanceof Error || typeof error === 'object' && error !== null && typeof error.name === 'string' && typeof error.message === 'string';\n}\nclass ErrorBoundaryWrappedError extends Error {\n constructor(error) {\n super(typeof ngDevMode !== 'undefined' && ngDevMode ? `Error boundary caught an error that's not an Error instance: ${String(error)}. Check this error's .cause for the actual error.` : String(error), {\n cause: error\n });\n this.name = 'ErrorBoundaryWrappedError';\n }\n}\nconst INTERNAL_APPLICATION_ERROR_HANDLER = /*#__PURE__*/ new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'internal error handler' : '', {\n factory: () => {\n const zone = inject(NgZone);\n const injector = inject(EnvironmentInjector);\n let userErrorHandler;\n return e => {\n zone.runOutsideAngular(() => {\n if (injector.destroyed && !userErrorHandler) {\n setTimeout(() => {\n throw e;\n });\n } else {\n userErrorHandler ??= injector.get(ErrorHandler);\n userErrorHandler.handleError(e);\n }\n });\n };\n }\n});\nconst errorHandlerEnvironmentInitializer = {\n provide: ENVIRONMENT_INITIALIZER,\n useValue: () => {\n const handler = inject(ErrorHandler, {\n optional: true\n });\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && handler === null) {\n throw new RuntimeError(402, `A required Injectable was not found in the dependency injection tree. ` + 'If you are bootstrapping an NgModule, make sure that the `BrowserModule` is imported.');\n }\n },\n multi: true\n};\nconst globalErrorListeners = /*#__PURE__*/ new InjectionToken(typeof ngDevMode !== 'undefined' && ngDevMode ? 'GlobalErrorListeners' : '', {\n factory: () => {\n if (typeof ngServerMode !== 'undefined' && ngServerMode) {\n return;\n }\n const window = inject(DOCUMENT).defaultView;\n if (!window) {\n return;\n }\n const errorHandler = inject(INTERNAL_APPLICATION_ERROR_HANDLER);\n const rejectionListener = e => {\n errorHandler(e.reason);\n e.preventDefault();\n };\n const errorListener = e => {\n if (e.error) {\n errorHandler(e.error);\n } else {\n errorHandler(new Error(ngDevMode ? `An ErrorEvent with no error occurred. See Error.cause for details: ${e.message}` : e.message, {\n cause: e\n }));\n }\n e.preventDefault();\n };\n const setupEventListeners = () => {\n window.addEventListener('unhandledrejection', rejectionListener);\n window.addEventListener('error', errorListener);\n };\n if (typeof Zone !== 'undefined') {\n Zone.root.run(setupEventListeners);\n } else {\n setupEventListeners();\n }\n inject(DestroyRef).onDestroy(() => {\n window.removeEventListener('error', errorListener);\n window.removeEventListener('unhandledrejection', rejectionListener);\n });\n }\n});\nfunction provideBrowserGlobalErrorListeners() {\n return makeEnvironmentProviders([provideEnvironmentInitializer(() => void inject(globalErrorListeners))]);\n}\n\nfunction ษตunwrapWritableSignal(value) {\n return null;\n}\nfunction signal(initialValue, options) {\n const [get, set, update] = createSignal(initialValue, options?.equal);\n const signalFn = get;\n const node = signalFn[SIGNAL];\n signalFn.set = set;\n signalFn.update = update;\n signalFn.asReadonly = signalAsReadonlyFn.bind(signalFn);\n if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n const debugName = options?.debugName;\n node.debugName = debugName;\n signalFn.toString = () => `[Signal${debugName ? ' (' + debugName + ')' : ''}: ${signalFn()}]`;\n }\n return signalFn;\n}\nfunction signalAsReadonlyFn() {\n const node = this[SIGNAL];\n if (node.readonlyFn === undefined) {\n const readonlyFn = () => this();\n readonlyFn[SIGNAL] = node;\n node.readonlyFn = readonlyFn;\n }\n return node.readonlyFn;\n}\n\nconst APP_ID = /*#__PURE__*/ new InjectionToken(typeof ngDevMode !== 'undefined' && ngDevMode ? 'AppId' : '', {\n factory: () => DEFAULT_APP_ID\n});\nconst DEFAULT_APP_ID = 'ng';\nconst validAppIdInitializer = {\n provide: ENVIRONMENT_INITIALIZER,\n multi: true,\n useValue: () => {\n const appId = inject(APP_ID);\n const isAlphanumeric = /^[a-zA-Z0-9\\-_]+$/.test(appId);\n if (!isAlphanumeric) {\n throw new RuntimeError(211, `APP_ID value \"${appId}\" is not alphanumeric. ` + `The APP_ID must be a string of alphanumeric characters. (a-zA-Z0-9), hyphens (-) and underscores (_) are allowed.`);\n }\n }\n};\nconst PLATFORM_INITIALIZER = /*#__PURE__*/ new InjectionToken(typeof ngDevMode !== 'undefined' && ngDevMode ? 'Platform Initializer' : '');\nconst PLATFORM_ID = /*#__PURE__*/ new InjectionToken(typeof ngDevMode !== 'undefined' && ngDevMode ? 'Platform ID' : '', {\n providedIn: 'platform',\n factory: () => 'unknown'\n});\nconst ANIMATION_MODULE_TYPE = /*#__PURE__*/ new InjectionToken(typeof ngDevMode !== 'undefined' && ngDevMode ? 'AnimationModuleType' : '');\nconst CSP_NONCE = /*#__PURE__*/ new InjectionToken(typeof ngDevMode !== 'undefined' && ngDevMode ? 'CSP nonce' : '', {\n factory: () => {\n return inject(DOCUMENT).body?.querySelector('[ngCspNonce]')?.getAttribute('ngCspNonce') || null;\n }\n});\nconst IMAGE_CONFIG_DEFAULTS = {\n breakpoints: [16, 32, 48, 64, 96, 128, 256, 384, 640, 750, 828, 1080, 1200, 1920, 2048, 3840],\n placeholderResolution: 30,\n disableImageSizeWarning: false,\n disableImageLazyLoadWarning: false\n};\nconst IMAGE_CONFIG = /*#__PURE__*/ new InjectionToken(typeof ngDevMode !== 'undefined' && ngDevMode ? 'ImageConfig' : '', {\n factory: () => IMAGE_CONFIG_DEFAULTS\n});\n\nfunction makeStateKey(key) {\n return key;\n}\nfunction createDictionary() {\n return Object.create(null);\n}\nlet TransferState = /*#__PURE__*/ (() => {\nclass TransferState {\n static ษตprov =\n /* @__PURE__ */\n ษตษตdefineInjectable({\n token: TransferState,\n providedIn: 'root',\n factory: () => {\n const transferState = new TransferState();\n if (typeof ngServerMode === 'undefined' || !ngServerMode) {\n transferState.store = retrieveTransferredState(inject(DOCUMENT), inject(APP_ID));\n }\n return transferState;\n }\n });\n store = createDictionary();\n onSerializeCallbacks = createDictionary();\n get(key, defaultValue) {\n if (!Object.hasOwn(this.store, key)) {\n return defaultValue;\n }\n const value = this.store[key];\n return value !== undefined ? value : defaultValue;\n }\n set(key, value) {\n this.store[key] = value;\n }\n remove(key) {\n delete this.store[key];\n }\n hasKey(key) {\n return Object.hasOwn(this.store, key);\n }\n get isEmpty() {\n return Object.keys(this.store).length === 0;\n }\n onSerialize(key, callback) {\n this.onSerializeCallbacks[key] = callback;\n }\n toJson() {\n for (const key in this.onSerializeCallbacks) {\n if (Object.hasOwn(this.onSerializeCallbacks, key)) {\n try {\n this.store[key] = this.onSerializeCallbacks[key]();\n } catch (e) {\n console.warn('Exception in onSerialize callback: ', e);\n }\n }\n }\n return JSON.stringify(this.store).replace(/ {\nclass ViewContext {\n view;\n node;\n constructor(view, node) {\n this.view = view;\n this.node = node;\n }\n static __NG_ELEMENT_ID__ = injectViewContext;\n}\nreturn ViewContext;\n})();\nfunction injectViewContext() {\n return new ViewContext(getLView(), getCurrentTNode());\n}\n\nclass ChangeDetectionScheduler {}\nconst ZONELESS_ENABLED = /*#__PURE__*/ new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'Zoneless enabled' : '', {\n factory: () => true\n});\nconst PROVIDED_ZONELESS = /*#__PURE__*/ new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'Zoneless provided' : '', {\n factory: () => false\n});\nconst SCHEDULE_IN_ROOT_ZONE = /*#__PURE__*/ new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'run changes outside zone in root' : '');\n\nlet EffectScheduler = /*#__PURE__*/ (() => {\nclass EffectScheduler {\n static ษตprov =\n /* @__PURE__ */\n ษตษตdefineInjectable({\n token: EffectScheduler,\n providedIn: 'root',\n factory: () => new ZoneAwareEffectScheduler()\n });\n}\nreturn EffectScheduler;\n})();\nclass ZoneAwareEffectScheduler {\n dirtyEffectCount = 0;\n queues = new Map();\n add(handle) {\n this.enqueue(handle);\n this.schedule(handle);\n }\n schedule(handle) {\n if (!handle.dirty) {\n return;\n }\n this.dirtyEffectCount++;\n }\n remove(handle) {\n const zone = handle.zone;\n const queue = this.queues.get(zone);\n if (!queue.has(handle)) {\n return;\n }\n queue.delete(handle);\n if (handle.dirty) {\n this.dirtyEffectCount--;\n }\n }\n enqueue(handle) {\n const zone = handle.zone;\n if (!this.queues.has(zone)) {\n this.queues.set(zone, new Set());\n }\n const queue = this.queues.get(zone);\n if (queue.has(handle)) {\n return;\n }\n queue.add(handle);\n }\n flush() {\n while (this.dirtyEffectCount > 0) {\n let ranOneEffect = false;\n for (const [zone, queue] of this.queues) {\n if (zone === null) {\n ranOneEffect ||= this.flushQueue(queue);\n } else {\n ranOneEffect ||= zone.run(() => this.flushQueue(queue));\n }\n }\n if (!ranOneEffect) {\n this.dirtyEffectCount = 0;\n }\n }\n }\n flushQueue(queue) {\n let ranOneEffect = false;\n for (const handle of queue) {\n if (!handle.dirty) {\n continue;\n }\n this.dirtyEffectCount--;\n ranOneEffect = true;\n handle.run();\n }\n return ranOneEffect;\n }\n}\n\nclass EffectRefImpl {\n [SIGNAL];\n constructor(node) {\n this[SIGNAL] = node;\n }\n destroy() {\n this[SIGNAL].destroy();\n }\n}\nfunction effect(effectFn, options) {\n ngDevMode && assertNotInReactiveContext(effect, 'Call `effect` outside of a reactive context. For example, schedule the ' + 'effect inside the component constructor.');\n if (ngDevMode && !options?.injector) {\n assertInInjectionContext(effect);\n }\n if (ngDevMode && options?.allowSignalWrites !== undefined) {\n console.warn(`The 'allowSignalWrites' flag is deprecated and no longer impacts effect() (writes are always allowed)`);\n }\n const injector = options?.injector ?? inject(Injector);\n let destroyRef = options?.manualCleanup !== true ? injector.get(DestroyRef) : null;\n let node;\n const viewContext = injector.get(ViewContext, null, {\n optional: true\n });\n const notifier = injector.get(ChangeDetectionScheduler);\n if (viewContext !== null) {\n node = createViewEffect(viewContext.view, notifier, effectFn);\n if (destroyRef instanceof NodeInjectorDestroyRef && destroyRef._lView === viewContext.view) {\n destroyRef = null;\n }\n } else {\n node = createRootEffect(effectFn, injector.get(EffectScheduler), notifier);\n }\n node.injector = injector;\n if (destroyRef !== null) {\n node.onDestroyFns = [destroyRef.onDestroy(() => node.destroy())];\n }\n const effectRef = new EffectRefImpl(node);\n if (ngDevMode) {\n node.debugName = options?.debugName ?? '';\n const prevInjectorProfilerContext = setInjectorProfilerContext({\n injector,\n token: null\n });\n try {\n emitEffectCreatedEvent(effectRef);\n } finally {\n setInjectorProfilerContext(prevInjectorProfilerContext);\n }\n }\n return effectRef;\n}\nconst EFFECT_NODE = /* @__PURE__ */(() => ({\n ...BASE_EFFECT_NODE,\n cleanupFns: undefined,\n zone: null,\n onDestroyFns: null,\n run() {\n if (ngDevMode && isInNotificationPhase()) {\n throw new Error(`Schedulers cannot synchronously execute watches while scheduling.`);\n }\n const prevRefreshingViews = setIsRefreshingViews(false);\n try {\n runEffect(this);\n } finally {\n setIsRefreshingViews(prevRefreshingViews);\n }\n },\n cleanup() {\n if (!this.cleanupFns?.length) {\n return;\n }\n const prevConsumer = setActiveConsumer$1(null);\n try {\n while (this.cleanupFns.length) {\n this.cleanupFns.pop()();\n }\n } finally {\n this.cleanupFns = [];\n setActiveConsumer$1(prevConsumer);\n }\n }\n}))();\nconst ROOT_EFFECT_NODE = /* @__PURE__ */(() => ({\n ...EFFECT_NODE,\n consumerMarkedDirty() {\n this.scheduler.schedule(this);\n this.notifier.notify(12);\n },\n destroy() {\n consumerDestroy(this);\n if (this.onDestroyFns !== null) {\n for (const fn of this.onDestroyFns) {\n fn();\n }\n }\n this.cleanup();\n this.scheduler.remove(this);\n }\n}))();\nconst VIEW_EFFECT_NODE = /* @__PURE__ */(() => ({\n ...EFFECT_NODE,\n consumerMarkedDirty() {\n this.view[FLAGS] |= 8192;\n markAncestorsForTraversal(this.view);\n this.notifier.notify(13);\n },\n destroy() {\n consumerDestroy(this);\n if (this.onDestroyFns !== null) {\n for (const fn of this.onDestroyFns) {\n fn();\n }\n }\n this.cleanup();\n this.view[EFFECTS]?.delete(this);\n }\n}))();\nfunction createViewEffect(view, notifier, fn) {\n const node = Object.create(VIEW_EFFECT_NODE);\n node.view = view;\n node.zone = typeof Zone !== 'undefined' ? Zone.current : null;\n node.notifier = notifier;\n node.userFn = fn;\n node.fn = createEffectFn(node, fn);\n view[EFFECTS] ??= new Set();\n view[EFFECTS].add(node);\n node.consumerMarkedDirty(node);\n return node;\n}\nfunction createRootEffect(fn, scheduler, notifier) {\n const node = Object.create(ROOT_EFFECT_NODE);\n node.userFn = fn;\n node.fn = createEffectFn(node, fn);\n node.scheduler = scheduler;\n node.notifier = notifier;\n node.zone = typeof Zone !== 'undefined' ? Zone.current : null;\n node.scheduler.add(node);\n node.notifier.notify(12);\n return node;\n}\nfunction createEffectFn(node, fn) {\n return () => {\n fn(cleanupFn => (node.cleanupFns ??= []).push(cleanupFn));\n };\n}\n\nfunction isSignal(value) {\n return typeof value === 'function' && value[SIGNAL] !== undefined;\n}\nfunction isWritableSignal(value) {\n return isSignal(value) && typeof value.set === 'function';\n}\n\nlet PendingTasks = /*#__PURE__*/ (() => {\nclass PendingTasks {\n internalPendingTasks = inject(PendingTasksInternal);\n scheduler = inject(ChangeDetectionScheduler);\n errorHandler = inject(INTERNAL_APPLICATION_ERROR_HANDLER);\n add() {\n const taskId = this.internalPendingTasks.add();\n return () => {\n if (!this.internalPendingTasks.has(taskId)) {\n return;\n }\n this.scheduler.notify(11);\n this.internalPendingTasks.remove(taskId);\n };\n }\n run(fn) {\n const removeTask = this.add();\n try {\n fn().catch(this.errorHandler).finally(removeTask);\n } catch (err) {\n this.errorHandler(err);\n removeTask();\n }\n }\n static ษตprov =\n /* @__PURE__ */\n ษตษตdefineInjectable({\n token: PendingTasks,\n providedIn: 'root',\n factory: () => new PendingTasks()\n });\n}\nreturn PendingTasks;\n})();\n\nexport { AFTER_RENDER_SEQUENCES_TO_ADD, ANIMATIONS, ANIMATION_MODULE_TYPE, APP_ID, CHILD_HEAD, CHILD_TAIL, CLEANUP, CONTAINER_HEADER_OFFSET, CONTEXT, CSP_NONCE, ChangeDetectionScheduler, CheckNoChangesMode, DEBUG_TASK_TRACKER, DECLARATION_COMPONENT_VIEW, DECLARATION_LCONTAINER, DECLARATION_VIEW, DEHYDRATED_VIEWS, DOCUMENT, DOC_PAGE_BASE_URL, DestroyRef, EFFECTS, EFFECTS_TO_SCHEDULE, EMBEDDED_VIEW_INJECTOR, EMPTY_ARRAY, EMPTY_OBJ, ENVIRONMENT, ENVIRONMENT_INITIALIZER, ERROR_DETAILS_PAGE_BASE_URL, EffectRefImpl, EffectScheduler, EnvironmentInjector, ErrorHandler, EventEmitter, FLAGS, HEADER_OFFSET, HOST, HYDRATION, ID, IMAGE_CONFIG, IMAGE_CONFIG_DEFAULTS, INJECTOR, INJECTOR$1, INJECTOR_DEF_TYPES, INJECTOR_SCOPE, INTERNAL_APPLICATION_ERROR_HANDLER, InjectionToken, Injector, MATH_ML_NAMESPACE, MOVED_VIEWS, NATIVE, NEXT, NG_COMP_DEF, NG_DIR_DEF, NG_ELEMENT_ID, NG_FACTORY_DEF, NG_INJ_DEF, NG_MOD_DEF, NG_PIPE_DEF, NG_PROV_DEF, NgZone, NoopNgZone, NullInjector, ON_DESTROY_HOOKS, ON_ERROR, PARENT, PLATFORM_ID, PLATFORM_INITIALIZER, PREORDER_HOOK_FLAGS, PROVIDED_ZONELESS, PendingTasks, PendingTasksInternal, QUERIES, R3Injector, REACTIVE_TEMPLATE_CONSUMER, RENDERER, RuntimeError, SCHEDULE_IN_ROOT_ZONE, SCHEDULE_IN_ROOT_ZONE_DEFAULT, SVG_NAMESPACE, SecurityContext, TVIEW, T_HOST, TransferState, VERSION, VIEW_REFS, Version, ViewContext, XSS_SECURITY_URL, ZONELESS_ENABLED, _global, addToArray, angularZoneInstanceIdProperty, arrayEquals, arrayInsert2, arraySplice, assertDefined, assertDirectiveDef, assertDomNode, assertElement, assertEqual, assertFirstCreatePass, assertFirstUpdatePass, assertFunction, assertGreaterThan, assertGreaterThanOrEqual, assertHasParent, assertInInjectionContext, assertIndexInDeclRange, assertIndexInExpandoRange, assertIndexInRange, assertInjectImplementationNotEqual, assertLContainer, assertLView, assertLessThan, assertNgModuleType, assertNodeInjector, assertNotDefined, assertNotEqual, assertNotInReactiveContext, assertNotReactive, assertNotSame, assertNumber, assertNumberInRange, assertOneOf, assertParentView, assertProjectionSlots, assertSame, assertString, assertTIcu, assertTNode, assertTNodeCreationIndex, assertTNodeForLView, assertTNodeForTView, attachInjectFlag, checkSecurityContext, concatStringsWithSpace, convertToBitFlags, createDictionary, createInjector, createInjectorWithoutInjectorInstances, createViewEffect, cyclicDependencyError, cyclicDependencyErrorWithDetails, debugStringifyTypeForError, decreaseElementDepthCount, deepForEach, effect, emitAfterRenderEffectPhaseCreatedEvent, emitInjectEvent, emitInjectorToCreateInstanceEvent, emitInstanceCreatedByInjectorEvent, emitProviderConfiguredEvent, encapsulateBoundaryError, enterDI, enterSkipHydrationBlock, enterView, errorHandlerEnvironmentInitializer, fillProperties, flatten, formatRuntimeError, forwardRef, getAllSpecialProviders, getBindingIndex, getBindingRoot, getBindingsEnabled, getClosureSafeProperty, getComponentDef, getComponentLViewByIndex, getConstant, getContextLView, getCurrentDirectiveDef, getCurrentDirectiveIndex, getCurrentParentTNode, getCurrentQueryIndex, getCurrentTNode, getCurrentTNodePlaceholderOk, getDirectiveDef, getDirectiveDefOrThrow, getElementDepthCount, getFactoryDef, getInjectableDef, getInjectorDef, getLView, getLViewParent, getNamespace, getNativeByIndex, getNativeByTNode, getNativeByTNodeOrNull, getNgModuleDef, getNgModuleDefOrThrow, getNullInjector, getOrCreateLViewCleanup, getOrCreateTViewCleanup, getPipeDef, getSelectedIndex, getSelectedTNode, getTNode, getTView, hasI18n, importProvidersFrom, increaseElementDepthCount, incrementBindingIndex, initNgDevMode, inject, injectRootLimpMode, internalImportProvidersFrom, isClassProvider, isComponentDef, isComponentHost, isContentQueryHost, isCreationMode, isCurrentTNodeParent, isDestroyed, isDirectiveHost, isEnvironmentProviders, isErrorLike, isExhaustiveCheckNoChanges, isForwardRef, isInCheckNoChangesMode, isInI18nBlock, isInInjectionContext, isInSkipHydrationBlock, isInjectable, isLContainer, isLView, isProjectionTNode, isRefreshingViews, isRootView, isSignal, isSkipHydrationRootTNode, isStandalone, isTypeProvider, isWritableSignal, keyValueArrayGet, keyValueArrayIndexOf, keyValueArraySet, lastNodeWasCreated, leaveDI, leaveSkipHydrationBlock, leaveView, load, makeEnvironmentProviders, makeStateKey, markAncestorsForTraversal, markViewForRefresh, newArray, nextBindingIndex, nextContextImpl, promiseWithResolvers, provideBrowserGlobalErrorListeners, provideEnvironmentInitializer, providerToFactory, registerSpecialProvider, removeFromArray, removeLViewOnDestroy, renderStringify, requiresRefreshOrTraversal, resetPreOrderHookFlags, resolveForwardRef, retrieveTransferredState, runInInjectionContext, runInInjectorProfilerContext, scheduleCallbackWithMicrotask, scheduleCallbackWithRafRace, setBindingIndex, setBindingRootForHostBindings, setCurrentDirectiveIndex, setCurrentQueryIndex, setCurrentTNode, setCurrentTNodeAsNotParent, setInI18nBlock, setInjectImplementation, setInjectorProfiler, setInjectorProfilerContext, setIsInCheckNoChangesMode, setIsRefreshingViews, setSelectedIndex, signal, signalAsReadonlyFn, store, storeCleanupWithContext, storeLViewOnDestroy, stringify, stringifyForError, throwError, throwProviderNotFoundError, truncateMiddle, unwrapLView, unwrapRNode, updateAncestorTraversalFlagsOnAttach, validAppIdInitializer, viewAttachedToChangeDetector, viewAttachedToContainer, walkProviderTree, walkUpViews, wasLastNodeCreated, ษตunwrapWritableSignal, ษตษตdefineInjectable, ษตษตdefineInjector, ษตษตdisableBindings, ษตษตenableBindings, ษตษตinject, ษตษตinvalidFactoryDep, ษตษตnamespaceHTML, ษตษตnamespaceMathML, ษตษตnamespaceSVG, ษตษตresetView, ษตษตrestoreView };\n","/**\n * @license Angular v22.2.4\n * (c) 2010-2026 Google LLC. https://angular.dev/\n * License: MIT\n */\n\nimport { assertString, EMPTY_OBJ, assertFirstCreatePass, assertDefined, assertNotEqual, FLAGS, assertEqual, isInCheckNoChangesMode, PREORDER_HOOK_FLAGS, throwError, assertNumber, assertGreaterThan, HEADER_OFFSET, DECLARATION_VIEW, NG_FACTORY_DEF, isForwardRef, resolveForwardRef, getFactoryDef, convertToBitFlags, isRootView, assertTNodeForLView, enterDI, runInInjectorProfilerContext, getCurrentTNode, getLView, emitInjectorToCreateInstanceEvent, emitInstanceCreatedByInjectorEvent, throwProviderNotFoundError, leaveDI, assertNodeInjector, setInjectImplementation, injectRootLimpMode, stringifyForError, cyclicDependencyErrorWithDetails, cyclicDependencyError, setInjectorProfilerContext, assertDirectiveDef, EMBEDDED_VIEW_INJECTOR, T_HOST, assertIndexInRange, INJECTOR, TVIEW as TVIEW$1, NG_ELEMENT_ID, isComponentDef, isComponentHost, DECLARATION_COMPONENT_VIEW, makeEnvironmentProviders, InjectionToken, _global, ษตษตinvalidFactoryDep as __invalidFactoryDep, ษตษตinject as __inject, ษตษตdefineInjector as __defineInjector, ษตษตdefineInjectable as __defineInjectable, newArray, attachInjectFlag, RuntimeError, NG_PROV_DEF, getClosureSafeProperty, getNativeByTNode, registerSpecialProvider, flatten, arrayEquals, ID, isLView, assertDomNode, EMPTY_ARRAY, getComponentLViewByIndex, CONTEXT, unwrapRNode, assertLView, HOST, getLViewParent, isLContainer, CONTAINER_HEADER_OFFSET, CHILD_HEAD, NEXT, Injector, CLEANUP, getComponentDef, getDirectiveDef, APP_ID, inject, makeStateKey, formatRuntimeError, TransferState, isInSkipHydrationBlock as isInSkipHydrationBlock$1, HYDRATION, isContentQueryHost, setCurrentQueryIndex, XSS_SECURITY_URL, isDirectiveHost, MATH_ML_NAMESPACE, SVG_NAMESPACE, RENDERER, SecurityContext, renderStringify, getSelectedTNode, checkSecurityContext, getSelectedIndex, ENVIRONMENT, stringify, ANIMATIONS, AFTER_RENDER_SEQUENCES_TO_ADD, markAncestorsForTraversal, NgZone, ChangeDetectionScheduler, ErrorHandler, assertNotInReactiveContext, assertInInjectionContext, DestroyRef, ViewContext, EnvironmentInjector, isDestroyed, assertLContainer, MOVED_VIEWS, assertProjectionSlots, PARENT, NATIVE, REACTIVE_TEMPLATE_CONSUMER, DECLARATION_LCONTAINER, QUERIES, assertParentView, assertNotReactive, ON_DESTROY_HOOKS, assertFunction, EFFECTS, resetPreOrderHookFlags, CHILD_TAIL, assertSame, assertFirstUpdatePass, getTView, assertIndexInDeclRange, setSelectedIndex, INTERNAL_APPLICATION_ERROR_HANDLER, assertNotSame, isCurrentTNodeParent, setCurrentTNodeAsNotParent, assertHasParent, setCurrentTNode, getElementDepthCount, increaseElementDepthCount, wasLastNodeCreated, setCurrentDirectiveIndex, getCurrentDirectiveIndex, unwrapLView, enterView, leaveView, isCreationMode, markViewForRefresh, setIsInCheckNoChangesMode, setIsRefreshingViews, isExhaustiveCheckNoChanges, requiresRefreshOrTraversal, setBindingIndex, EFFECTS_TO_SCHEDULE, ON_ERROR, encapsulateBoundaryError, setBindingRootForHostBindings, viewAttachedToChangeDetector, CheckNoChangesMode, isRefreshingViews, removeFromArray, addToArray, updateAncestorTraversalFlagsOnAttach, storeLViewOnDestroy, VIEW_REFS, DOC_PAGE_BASE_URL, assertGreaterThanOrEqual, isInI18nBlock, assertTNodeForTView, getCurrentParentTNode, getNamespace, getCurrentTNodePlaceholderOk, assertTIcu, assertTNode, assertNumberInRange, DEHYDRATED_VIEWS, getNgModuleDef, getPipeDef as getPipeDef$1, getNgModuleDefOrThrow, isStandalone, getTNode, assertLessThan, getOrCreateTViewCleanup, getOrCreateLViewCleanup, debugStringifyTypeForError, assertNotDefined, nextBindingIndex, concatStringsWithSpace, assertInjectImplementationNotEqual, emitInjectEvent, getConstant, getDirectiveDefOrThrow, DOCUMENT as DOCUMENT$1, viewAttachedToContainer, storeCleanupWithContext, signal, createInjectorWithoutInjectorInstances, R3Injector, getNullInjector, internalImportProvidersFrom, initNgDevMode, runInInjectionContext, fillProperties, NG_COMP_DEF, NG_DIR_DEF, getBindingsEnabled, lastNodeWasCreated, arrayInsert2, arraySplice, removeLViewOnDestroy, walkUpViews, getNativeByIndex, assertElement, setInjectorProfiler, EffectRefImpl, NullInjector, getAllSpecialProviders, ENVIRONMENT_INITIALIZER, INJECTOR_DEF_TYPES, walkProviderTree, deepForEach, getInjectorDef, isTypeProvider, VERSION, retrieveTransferredState, createDictionary, isSignal, isInInjectionContext, PendingTasksInternal, ZONELESS_ENABLED, EffectScheduler, PendingTasks, promiseWithResolvers, decreaseElementDepthCount, assertTNodeCreationIndex, enterSkipHydrationBlock, isSkipHydrationRootTNode, leaveSkipHydrationBlock, createViewEffect, getCurrentDirectiveDef, getBindingIndex, assertIndexInExpandoRange, assertOneOf, setInI18nBlock, nextContextImpl, getCurrentQueryIndex, getContextLView, load, keyValueArrayIndexOf, incrementBindingIndex, keyValueArrayGet, keyValueArraySet, isWritableSignal, store, getBindingRoot, providerToFactory, emitProviderConfiguredEvent, isClassProvider, forwardRef, ษตษตrestoreView as __restoreView, ษตษตdisableBindings as __disableBindings, ษตษตenableBindings as __enableBindings, ษตษตnamespaceSVG as __namespaceSVG, ษตษตnamespaceMathML as __namespaceMathML, ษตษตnamespaceHTML as __namespaceHTML, ษตษตresetView as __resetView, NG_MOD_DEF, NG_INJ_DEF, NG_PIPE_DEF, PROVIDED_ZONELESS, NoopNgZone, angularZoneInstanceIdProperty, scheduleCallbackWithMicrotask, scheduleCallbackWithRafRace, SCHEDULE_IN_ROOT_ZONE, getNativeByTNodeOrNull } from './_pending_tasks-chunk.mjs';\nimport { setActiveConsumer as setActiveConsumer$1 } from '@angular/core/primitives/signals';\nimport { SIGNAL_NODE, signalSetFn, setActiveConsumer, consumerDestroy, SIGNAL, REACTIVE_NODE, consumerPollProducersForChange, consumerBeforeComputation, getActiveConsumer, consumerAfterComputation, createComputed, producerUpdateValueVersion, producerAccessed, ERRORED, setThrowInvalidWriteToSignalError } from './_effect-chunk.mjs';\nimport { Subject, Subscription } from 'rxjs';\nimport { map } from 'rxjs/operators';\nimport { Attribute as Attribute$1 } from './_attribute-chunk.mjs';\n\nconst REQUIRED_UNSET_VALUE = /* @__PURE__ */Symbol('InputSignalNode#UNSET');\nconst INPUT_SIGNAL_NODE = /* @__PURE__ */(() => {\n return {\n ...SIGNAL_NODE,\n transformFn: undefined,\n applyValueToInputSignal(node, value) {\n signalSetFn(node, value);\n }\n };\n})();\n\nfunction noSideEffects(fn) {\n return {\n toString: fn\n }.toString();\n}\n\nvar ProfilerEvent = /*#__PURE__*/ (function (ProfilerEvent) {\n ProfilerEvent[ProfilerEvent[\"TemplateCreateStart\"] = 0] = \"TemplateCreateStart\";\n ProfilerEvent[ProfilerEvent[\"TemplateCreateEnd\"] = 1] = \"TemplateCreateEnd\";\n ProfilerEvent[ProfilerEvent[\"TemplateUpdateStart\"] = 2] = \"TemplateUpdateStart\";\n ProfilerEvent[ProfilerEvent[\"TemplateUpdateEnd\"] = 3] = \"TemplateUpdateEnd\";\n ProfilerEvent[ProfilerEvent[\"LifecycleHookStart\"] = 4] = \"LifecycleHookStart\";\n ProfilerEvent[ProfilerEvent[\"LifecycleHookEnd\"] = 5] = \"LifecycleHookEnd\";\n ProfilerEvent[ProfilerEvent[\"OutputStart\"] = 6] = \"OutputStart\";\n ProfilerEvent[ProfilerEvent[\"OutputEnd\"] = 7] = \"OutputEnd\";\n ProfilerEvent[ProfilerEvent[\"BootstrapApplicationStart\"] = 8] = \"BootstrapApplicationStart\";\n ProfilerEvent[ProfilerEvent[\"BootstrapApplicationEnd\"] = 9] = \"BootstrapApplicationEnd\";\n ProfilerEvent[ProfilerEvent[\"BootstrapComponentStart\"] = 10] = \"BootstrapComponentStart\";\n ProfilerEvent[ProfilerEvent[\"BootstrapComponentEnd\"] = 11] = \"BootstrapComponentEnd\";\n ProfilerEvent[ProfilerEvent[\"ChangeDetectionStart\"] = 12] = \"ChangeDetectionStart\";\n ProfilerEvent[ProfilerEvent[\"ChangeDetectionEnd\"] = 13] = \"ChangeDetectionEnd\";\n ProfilerEvent[ProfilerEvent[\"ChangeDetectionSyncStart\"] = 14] = \"ChangeDetectionSyncStart\";\n ProfilerEvent[ProfilerEvent[\"ChangeDetectionSyncEnd\"] = 15] = \"ChangeDetectionSyncEnd\";\n ProfilerEvent[ProfilerEvent[\"AfterRenderHooksStart\"] = 16] = \"AfterRenderHooksStart\";\n ProfilerEvent[ProfilerEvent[\"AfterRenderHooksEnd\"] = 17] = \"AfterRenderHooksEnd\";\n ProfilerEvent[ProfilerEvent[\"ComponentStart\"] = 18] = \"ComponentStart\";\n ProfilerEvent[ProfilerEvent[\"ComponentEnd\"] = 19] = \"ComponentEnd\";\n ProfilerEvent[ProfilerEvent[\"DeferBlockStateStart\"] = 20] = \"DeferBlockStateStart\";\n ProfilerEvent[ProfilerEvent[\"DeferBlockStateEnd\"] = 21] = \"DeferBlockStateEnd\";\n ProfilerEvent[ProfilerEvent[\"DynamicComponentStart\"] = 22] = \"DynamicComponentStart\";\n ProfilerEvent[ProfilerEvent[\"DynamicComponentEnd\"] = 23] = \"DynamicComponentEnd\";\n ProfilerEvent[ProfilerEvent[\"HostBindingsUpdateStart\"] = 24] = \"HostBindingsUpdateStart\";\n ProfilerEvent[ProfilerEvent[\"HostBindingsUpdateEnd\"] = 25] = \"HostBindingsUpdateEnd\";\n; return ProfilerEvent;})(ProfilerEvent || {});\n\n\nclass SimpleChange {\n previousValue;\n currentValue;\n firstChange;\n constructor(previousValue, currentValue, firstChange) {\n this.previousValue = previousValue;\n this.currentValue = currentValue;\n this.firstChange = firstChange;\n }\n isFirstChange() {\n return this.firstChange;\n }\n}\n\nfunction applyValueToInputField(instance, inputSignalNode, privateName, value) {\n if (inputSignalNode !== null) {\n inputSignalNode.applyValueToInputSignal(inputSignalNode, value);\n } else {\n instance[privateName] = value;\n }\n}\n\nlet _ngOnChangesFeatureImpl = null;\nconst ษตษตNgOnChangesFeature = /* @__PURE__ */(() => {\n _ngOnChangesFeatureImpl = NgOnChangesFeatureImpl;\n const ษตษตNgOnChangesFeatureImpl = () => NgOnChangesFeatureImpl;\n ษตษตNgOnChangesFeatureImpl.ngInherit = true;\n return ษตษตNgOnChangesFeatureImpl;\n})();\nfunction getNgOnChangesFeatureImpl() {\n return _ngOnChangesFeatureImpl;\n}\nfunction NgOnChangesFeatureImpl(definition) {\n if (definition.type.prototype.ngOnChanges) {\n definition.setInput = ngOnChangesSetInput;\n }\n return rememberChangeHistoryAndInvokeOnChangesHook;\n}\nfunction rememberChangeHistoryAndInvokeOnChangesHook() {\n const simpleChangesStore = getSimpleChangesStore(this);\n const current = simpleChangesStore?.current;\n if (current) {\n const previous = simpleChangesStore.previous;\n if (previous === EMPTY_OBJ) {\n simpleChangesStore.previous = current;\n } else {\n for (let key in current) {\n previous[key] = current[key];\n }\n }\n simpleChangesStore.current = null;\n this.ngOnChanges(current);\n }\n}\nfunction ngOnChangesSetInput(instance, inputSignalNode, value, publicName, privateName) {\n const declaredName = this.declaredInputs[publicName];\n ngDevMode && assertString(declaredName, 'Name of input in ngOnChanges has to be a string');\n const simpleChangesStore = getSimpleChangesStore(instance) || setSimpleChangesStore(instance, {\n previous: EMPTY_OBJ,\n current: null\n });\n const current = simpleChangesStore.current || (simpleChangesStore.current = {});\n const previous = simpleChangesStore.previous;\n const previousChange = previous[declaredName];\n current[declaredName] = new SimpleChange(previousChange && previousChange.currentValue, value, previous === EMPTY_OBJ);\n applyValueToInputField(instance, inputSignalNode, privateName, value);\n}\nconst SIMPLE_CHANGES_STORE = '__ngSimpleChanges__';\nfunction getSimpleChangesStore(instance) {\n return Object.hasOwn(instance, SIMPLE_CHANGES_STORE) ? instance[SIMPLE_CHANGES_STORE] || null : null;\n}\nfunction setSimpleChangesStore(instance, store) {\n return instance[SIMPLE_CHANGES_STORE] = store;\n}\n\nconst profilerCallbacks = [];\nconst NOOP_PROFILER_REMOVAL = () => {};\nfunction removeProfiler(profiler) {\n const profilerIdx = profilerCallbacks.indexOf(profiler);\n if (profilerIdx !== -1) {\n profilerCallbacks.splice(profilerIdx, 1);\n }\n}\nfunction setProfiler(profiler) {\n if (profiler !== null) {\n if (!profilerCallbacks.includes(profiler)) {\n profilerCallbacks.push(profiler);\n }\n return () => removeProfiler(profiler);\n } else {\n profilerCallbacks.length = 0;\n return NOOP_PROFILER_REMOVAL;\n }\n}\nconst profiler = function (event, instance = null, eventFn) {\n for (let i = 0; i < profilerCallbacks.length; i++) {\n const profilerCallback = profilerCallbacks[i];\n profilerCallback(event, instance, eventFn);\n }\n};\n\nfunction registerPreOrderHooks(directiveIndex, directiveDef, tView) {\n ngDevMode && assertFirstCreatePass(tView);\n const {\n ngOnChanges,\n ngOnInit,\n ngDoCheck\n } = directiveDef.type.prototype;\n if (ngOnChanges) {\n const wrappedOnChanges = getNgOnChangesFeatureImpl()(directiveDef);\n (tView.preOrderHooks ??= []).push(directiveIndex, wrappedOnChanges);\n (tView.preOrderCheckHooks ??= []).push(directiveIndex, wrappedOnChanges);\n }\n if (ngOnInit) {\n (tView.preOrderHooks ??= []).push(0 - directiveIndex, ngOnInit);\n }\n if (ngDoCheck) {\n (tView.preOrderHooks ??= []).push(directiveIndex, ngDoCheck);\n (tView.preOrderCheckHooks ??= []).push(directiveIndex, ngDoCheck);\n }\n}\nfunction registerPostOrderHooks(tView, tNode) {\n ngDevMode && assertFirstCreatePass(tView);\n for (let i = tNode.directiveStart, end = tNode.directiveEnd; i < end; i++) {\n const directiveDef = tView.data[i];\n ngDevMode && assertDefined(directiveDef, 'Expecting DirectiveDef');\n const lifecycleHooks = directiveDef.type.prototype;\n const {\n ngAfterContentInit,\n ngAfterContentChecked,\n ngAfterViewInit,\n ngAfterViewChecked,\n ngOnDestroy\n } = lifecycleHooks;\n if (ngAfterContentInit) {\n (tView.contentHooks ??= []).push(-i, ngAfterContentInit);\n }\n if (ngAfterContentChecked) {\n (tView.contentHooks ??= []).push(i, ngAfterContentChecked);\n (tView.contentCheckHooks ??= []).push(i, ngAfterContentChecked);\n }\n if (ngAfterViewInit) {\n (tView.viewHooks ??= []).push(-i, ngAfterViewInit);\n }\n if (ngAfterViewChecked) {\n (tView.viewHooks ??= []).push(i, ngAfterViewChecked);\n (tView.viewCheckHooks ??= []).push(i, ngAfterViewChecked);\n }\n if (ngOnDestroy != null) {\n (tView.destroyHooks ??= []).push(i, ngOnDestroy);\n }\n }\n}\nfunction executeCheckHooks(lView, hooks, nodeIndex) {\n callHooks(lView, hooks, 3, nodeIndex);\n}\nfunction executeInitAndCheckHooks(lView, hooks, initPhase, nodeIndex) {\n ngDevMode && assertNotEqual(initPhase, 3, 'Init pre-order hooks should not be called more than once');\n if ((lView[FLAGS] & 3) === initPhase) {\n callHooks(lView, hooks, initPhase, nodeIndex);\n }\n}\nfunction incrementInitPhaseFlags(lView, initPhase) {\n ngDevMode && assertNotEqual(initPhase, 3, 'Init hooks phase should not be incremented after all init hooks have been run.');\n let flags = lView[FLAGS];\n if ((flags & 3) === initPhase) {\n flags &= 16383;\n flags += 1;\n lView[FLAGS] = flags;\n }\n}\nfunction callHooks(currentView, arr, initPhase, currentNodeIndex) {\n ngDevMode && assertEqual(isInCheckNoChangesMode(), false, 'Hooks should never be run when in check no changes mode.');\n const startIndex = currentNodeIndex !== undefined ? currentView[PREORDER_HOOK_FLAGS] & 65535 : 0;\n const nodeIndexLimit = currentNodeIndex != null ? currentNodeIndex : -1;\n const max = arr.length - 1;\n let lastNodeIndexFound = 0;\n for (let i = startIndex; i < max; i++) {\n const hook = arr[i + 1];\n if (typeof hook === 'number') {\n lastNodeIndexFound = arr[i];\n if (currentNodeIndex != null && lastNodeIndexFound >= currentNodeIndex) {\n break;\n }\n } else {\n const isInitHook = arr[i] < 0;\n if (isInitHook) {\n currentView[PREORDER_HOOK_FLAGS] += 65536;\n }\n if (lastNodeIndexFound < nodeIndexLimit || nodeIndexLimit == -1) {\n callHook(currentView, initPhase, arr, i);\n currentView[PREORDER_HOOK_FLAGS] = (currentView[PREORDER_HOOK_FLAGS] & 4294901760) + i + 2;\n }\n i++;\n }\n }\n}\nfunction callHookInternal(directive, hook) {\n profiler(ProfilerEvent.LifecycleHookStart, directive, hook);\n const prevConsumer = setActiveConsumer(null);\n try {\n hook.call(directive);\n } finally {\n setActiveConsumer(prevConsumer);\n profiler(ProfilerEvent.LifecycleHookEnd, directive, hook);\n }\n}\nfunction callHook(currentView, initPhase, arr, i) {\n const isInitHook = arr[i] < 0;\n const hook = arr[i + 1];\n const directiveIndex = isInitHook ? -arr[i] : arr[i];\n const directive = currentView[directiveIndex];\n if (isInitHook) {\n const indexWithintInitPhase = currentView[FLAGS] >> 14;\n if (indexWithintInitPhase < currentView[PREORDER_HOOK_FLAGS] >> 16 && (currentView[FLAGS] & 3) === initPhase) {\n currentView[FLAGS] += 16384;\n callHookInternal(directive, hook);\n }\n } else {\n callHookInternal(directive, hook);\n }\n}\n\nconst NO_PARENT_INJECTOR = -1;\nclass NodeInjectorFactory {\n factory;\n name;\n injectImpl;\n resolving = false;\n canSeeViewProviders;\n multi;\n componentProviders;\n index;\n providerFactory;\n constructor(factory, isViewProvider, injectImplementation, name) {\n this.factory = factory;\n this.name = name;\n ngDevMode && assertDefined(factory, 'Factory not specified');\n ngDevMode && assertEqual(typeof factory, 'function', 'Expected factory function.');\n this.canSeeViewProviders = isViewProvider;\n this.injectImpl = injectImplementation;\n }\n}\n\nfunction toTNodeTypeAsString(tNodeType) {\n let text = '';\n tNodeType & 1 && (text += '|Text');\n tNodeType & 2 && (text += '|Element');\n tNodeType & 4 && (text += '|Container');\n tNodeType & 8 && (text += '|ElementContainer');\n tNodeType & 16 && (text += '|Projection');\n tNodeType & 32 && (text += '|IcuContainer');\n tNodeType & 64 && (text += '|Placeholder');\n tNodeType & 128 && (text += '|LetDeclaration');\n return text.length > 0 ? text.substring(1) : text;\n}\nfunction isTNodeShape(value) {\n return value != null && typeof value === 'object' && (value.insertBeforeIndex === null || typeof value.insertBeforeIndex === 'number' || Array.isArray(value.insertBeforeIndex));\n}\nfunction isLetDeclaration(tNode) {\n return !!(tNode.type & 128);\n}\nfunction hasClassInput(tNode) {\n return (tNode.flags & 8) !== 0;\n}\nfunction hasStyleInput(tNode) {\n return (tNode.flags & 16) !== 0;\n}\n\nfunction assertTNodeType(tNode, expectedTypes, message) {\n assertDefined(tNode, 'should be called with a TNode');\n if ((tNode.type & expectedTypes) === 0) {\n throwError(message || `Expected [${toTNodeTypeAsString(expectedTypes)}] but got ${toTNodeTypeAsString(tNode.type)}.`);\n }\n}\nfunction assertPureTNodeType(type) {\n if (!(type === 2 || type === 1 || type === 4 || type === 8 || type === 32 || type === 16 || type === 64 || type === 128)) {\n throwError(`Expected TNodeType to have only a single type selected, but got ${toTNodeTypeAsString(type)}.`);\n }\n}\n\nfunction setUpAttributes(renderer, native, attrs) {\n let i = 0;\n while (i < attrs.length) {\n const value = attrs[i];\n if (typeof value === 'number') {\n if (value !== 0) {\n break;\n }\n i++;\n const namespaceURI = attrs[i++];\n const attrName = attrs[i++];\n const attrVal = attrs[i++];\n renderer.setAttribute(native, attrName, attrVal, namespaceURI);\n } else {\n const attrName = value;\n const attrVal = attrs[++i];\n if (isAnimationProp(attrName)) {\n renderer.setProperty(native, attrName, attrVal);\n } else {\n renderer.setAttribute(native, attrName, attrVal);\n }\n i++;\n }\n }\n return i;\n}\nfunction isNameOnlyAttributeMarker(marker) {\n return marker === 3 || marker === 4 || marker === 6;\n}\nfunction isAnimationProp(name) {\n return name.charCodeAt(0) === 64;\n}\nfunction mergeHostAttrs(dst, src) {\n if (src === null || src.length === 0) ; else if (dst === null || dst.length === 0) {\n dst = src.slice();\n } else {\n let srcMarker = -1;\n for (let i = 0; i < src.length; i++) {\n const item = src[i];\n if (typeof item === 'number') {\n srcMarker = item;\n } else {\n if (srcMarker === 0) ; else if (srcMarker === -1 || srcMarker === 2) {\n mergeHostAttribute(dst, srcMarker, item, null, src[++i]);\n } else {\n mergeHostAttribute(dst, srcMarker, item, null, null);\n }\n }\n }\n }\n return dst;\n}\nfunction mergeHostAttribute(dst, marker, key1, key2, value) {\n let i = 0;\n let markerInsertPosition = dst.length;\n if (marker === -1) {\n markerInsertPosition = -1;\n } else {\n while (i < dst.length) {\n const dstValue = dst[i++];\n if (typeof dstValue === 'number') {\n if (dstValue === marker) {\n markerInsertPosition = -1;\n break;\n } else if (dstValue > marker) {\n markerInsertPosition = i - 1;\n break;\n }\n }\n }\n }\n while (i < dst.length) {\n const item = dst[i];\n if (typeof item === 'number') {\n break;\n } else if (item === key1) {\n {\n if (value !== null) {\n dst[i + 1] = value;\n }\n return;\n }\n }\n i++;\n if (value !== null) i++;\n }\n if (markerInsertPosition !== -1) {\n dst.splice(markerInsertPosition, 0, marker);\n i = markerInsertPosition + 1;\n }\n dst.splice(i++, 0, key1);\n if (value !== null) {\n dst.splice(i++, 0, value);\n }\n}\n\nfunction hasParentInjector(parentLocation) {\n return parentLocation !== NO_PARENT_INJECTOR;\n}\nfunction getParentInjectorIndex(parentLocation) {\n if (ngDevMode) {\n assertNumber(parentLocation, 'Number expected');\n assertNotEqual(parentLocation, -1, 'Not a valid state.');\n const parentInjectorIndex = parentLocation & 32767;\n assertGreaterThan(parentInjectorIndex, HEADER_OFFSET, 'Parent injector must be pointing past HEADER_OFFSET.');\n }\n return parentLocation & 32767;\n}\nfunction getParentInjectorViewOffset(parentLocation) {\n return parentLocation >> 16;\n}\nfunction getParentInjectorView(location, startView) {\n let viewOffset = getParentInjectorViewOffset(location);\n let parentView = startView;\n while (viewOffset > 0) {\n parentView = parentView[DECLARATION_VIEW];\n viewOffset--;\n }\n return parentView;\n}\n\nlet includeViewProviders = true;\nfunction setIncludeViewProviders(v) {\n const oldValue = includeViewProviders;\n includeViewProviders = v;\n return oldValue;\n}\nconst BLOOM_SIZE = 256;\nconst BLOOM_MASK = BLOOM_SIZE - 1;\nconst BLOOM_BUCKET_BITS = 5;\nlet nextNgElementId = 0;\nconst NOT_FOUND = {};\nfunction bloomAdd(injectorIndex, tView, type) {\n ngDevMode && assertEqual(tView.firstCreatePass, true, 'expected firstCreatePass to be true');\n let id;\n if (typeof type === 'string') {\n id = type.charCodeAt(0) || 0;\n } else if (Object.hasOwn(type, NG_ELEMENT_ID)) {\n id = type[NG_ELEMENT_ID];\n }\n if (id == null) {\n id = type[NG_ELEMENT_ID] = nextNgElementId++;\n }\n const bloomHash = id & BLOOM_MASK;\n const mask = 1 << bloomHash;\n tView.data[injectorIndex + (bloomHash >> BLOOM_BUCKET_BITS)] |= mask;\n}\nfunction getOrCreateNodeInjectorForNode(tNode, lView) {\n const existingInjectorIndex = getInjectorIndex(tNode, lView);\n if (existingInjectorIndex !== -1) {\n return existingInjectorIndex;\n }\n const tView = lView[TVIEW$1];\n if (tView.firstCreatePass) {\n tNode.injectorIndex = lView.length;\n insertBloom(tView.data, tNode);\n insertBloom(lView, null);\n insertBloom(tView.blueprint, null);\n }\n const parentLoc = getParentInjectorLocation(tNode, lView);\n const injectorIndex = tNode.injectorIndex;\n if (hasParentInjector(parentLoc)) {\n const parentIndex = getParentInjectorIndex(parentLoc);\n const parentLView = getParentInjectorView(parentLoc, lView);\n const parentData = parentLView[TVIEW$1].data;\n for (let i = 0; i < 8; i++) {\n lView[injectorIndex + i] = parentLView[parentIndex + i] | parentData[parentIndex + i];\n }\n }\n lView[injectorIndex + 8] = parentLoc;\n return injectorIndex;\n}\nfunction insertBloom(arr, footer) {\n arr.push(0, 0, 0, 0, 0, 0, 0, 0, footer);\n}\nfunction getInjectorIndex(tNode, lView) {\n if (tNode.injectorIndex === -1 || tNode.parent && tNode.parent.injectorIndex === tNode.injectorIndex || lView[tNode.injectorIndex + 8] === null) {\n return -1;\n } else {\n ngDevMode && assertIndexInRange(lView, tNode.injectorIndex);\n return tNode.injectorIndex;\n }\n}\nfunction getParentInjectorLocation(tNode, lView) {\n if (tNode.parent && tNode.parent.injectorIndex !== -1) {\n return tNode.parent.injectorIndex;\n }\n let declarationViewOffset = 0;\n let parentTNode = null;\n let lViewCursor = lView;\n while (lViewCursor !== null) {\n parentTNode = getTNodeFromLView(lViewCursor);\n if (parentTNode === null) {\n return NO_PARENT_INJECTOR;\n }\n ngDevMode && parentTNode && assertTNodeForLView(parentTNode, lViewCursor[DECLARATION_VIEW]);\n declarationViewOffset++;\n lViewCursor = lViewCursor[DECLARATION_VIEW];\n if (parentTNode.injectorIndex !== -1) {\n return parentTNode.injectorIndex | declarationViewOffset << 16;\n }\n }\n return NO_PARENT_INJECTOR;\n}\nfunction diPublicInInjector(injectorIndex, tView, token) {\n bloomAdd(injectorIndex, tView, token);\n}\nfunction injectAttributeImpl(tNode, attrNameToInject) {\n ngDevMode && assertTNodeType(tNode, 12 | 3);\n ngDevMode && assertDefined(tNode, 'expecting tNode');\n if (attrNameToInject === 'class') {\n return tNode.classes;\n }\n if (attrNameToInject === 'style') {\n return tNode.styles;\n }\n const attrs = tNode.attrs;\n if (attrs) {\n const attrsLength = attrs.length;\n let i = 0;\n while (i < attrsLength) {\n const value = attrs[i];\n if (isNameOnlyAttributeMarker(value)) break;\n if (value === 0) {\n i = i + 2;\n } else if (typeof value === 'number') {\n i++;\n while (i < attrsLength && typeof attrs[i] === 'string') {\n i++;\n }\n } else if (value === attrNameToInject) {\n return attrs[i + 1];\n } else {\n i = i + 2;\n }\n }\n }\n return null;\n}\nfunction notFoundValueOrThrow(notFoundValue, token, flags) {\n if (flags & 8 || notFoundValue !== undefined) {\n return notFoundValue;\n } else {\n throwProviderNotFoundError(token, 'NodeInjector');\n }\n}\nfunction lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue) {\n if (flags & 8 && notFoundValue === undefined) {\n notFoundValue = null;\n }\n if ((flags & (2 | 1)) === 0) {\n const moduleInjector = lView[INJECTOR];\n const previousInjectImplementation = setInjectImplementation(undefined);\n try {\n if (moduleInjector) {\n return moduleInjector.get(token, notFoundValue, flags & 8);\n } else {\n return injectRootLimpMode(token, notFoundValue, flags & 8);\n }\n } finally {\n setInjectImplementation(previousInjectImplementation);\n }\n }\n return notFoundValueOrThrow(notFoundValue, token, flags);\n}\nfunction getOrCreateInjectable(tNode, lView, token, flags = 0, notFoundValue) {\n if (tNode !== null) {\n if (lView[FLAGS] & 2048 && !(flags & 2)) {\n const embeddedInjectorValue = lookupTokenUsingEmbeddedInjector(tNode, lView, token, flags, NOT_FOUND);\n if (embeddedInjectorValue !== NOT_FOUND) {\n return embeddedInjectorValue;\n }\n }\n const value = lookupTokenUsingNodeInjector(tNode, lView, token, flags, NOT_FOUND);\n if (value !== NOT_FOUND) {\n return value;\n }\n }\n return lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue);\n}\nfunction lookupTokenUsingNodeInjector(tNode, lView, token, flags, notFoundValue) {\n const bloomHash = bloomHashBitOrFactory(token);\n if (typeof bloomHash === 'function') {\n if (!enterDI(lView, tNode, flags)) {\n return flags & 1 ? notFoundValueOrThrow(notFoundValue, token, flags) : lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue);\n }\n try {\n let value;\n if (ngDevMode) {\n runInInjectorProfilerContext(new NodeInjector(getCurrentTNode(), getLView()), token, () => {\n emitInjectorToCreateInstanceEvent(token);\n value = bloomHash(flags);\n emitInstanceCreatedByInjectorEvent(value);\n });\n } else {\n value = bloomHash(flags);\n }\n if (value == null && !(flags & 8)) {\n throwProviderNotFoundError(token);\n } else {\n return value;\n }\n } finally {\n leaveDI();\n }\n } else if (typeof bloomHash === 'number') {\n let previousTView = null;\n let injectorIndex = getInjectorIndex(tNode, lView);\n let parentLocation = NO_PARENT_INJECTOR;\n let hostTElementNode = flags & 1 ? lView[DECLARATION_COMPONENT_VIEW][T_HOST] : null;\n if (injectorIndex === -1 || flags & 4) {\n parentLocation = injectorIndex === -1 ? getParentInjectorLocation(tNode, lView) : lView[injectorIndex + 8];\n if (parentLocation === NO_PARENT_INJECTOR || !shouldSearchParent(flags, false)) {\n injectorIndex = -1;\n } else {\n previousTView = lView[TVIEW$1];\n injectorIndex = getParentInjectorIndex(parentLocation);\n lView = getParentInjectorView(parentLocation, lView);\n }\n }\n while (injectorIndex !== -1) {\n ngDevMode && assertNodeInjector(lView, injectorIndex);\n const tView = lView[TVIEW$1];\n ngDevMode && assertTNodeForLView(tView.data[injectorIndex + 8], lView);\n if (bloomHasToken(bloomHash, injectorIndex, tView.data)) {\n const instance = searchTokensOnInjector(injectorIndex, lView, token, previousTView, flags, hostTElementNode);\n if (instance !== NOT_FOUND) {\n return instance;\n }\n }\n parentLocation = lView[injectorIndex + 8];\n if (parentLocation !== NO_PARENT_INJECTOR && shouldSearchParent(flags, lView[TVIEW$1].data[injectorIndex + 8] === hostTElementNode) && bloomHasToken(bloomHash, injectorIndex, lView)) {\n previousTView = tView;\n injectorIndex = getParentInjectorIndex(parentLocation);\n lView = getParentInjectorView(parentLocation, lView);\n } else {\n injectorIndex = -1;\n }\n }\n }\n return notFoundValue;\n}\nfunction searchTokensOnInjector(injectorIndex, lView, token, previousTView, flags, hostTElementNode) {\n const currentTView = lView[TVIEW$1];\n const tNode = currentTView.data[injectorIndex + 8];\n const canAccessViewProviders = previousTView == null ? isComponentHost(tNode) && includeViewProviders : previousTView != currentTView && (tNode.type & 3) !== 0;\n const isHostSpecialCase = flags & 1 && hostTElementNode === tNode;\n const injectableIdx = locateDirectiveOrProvider(tNode, currentTView, token, canAccessViewProviders, isHostSpecialCase);\n if (injectableIdx !== null) {\n return getNodeInjectable(lView, currentTView, injectableIdx, tNode, flags);\n } else {\n return NOT_FOUND;\n }\n}\nfunction locateDirectiveOrProvider(tNode, tView, token, canAccessViewProviders, isHostSpecialCase) {\n const nodeProviderIndexes = tNode.providerIndexes;\n const tInjectables = tView.data;\n const injectablesStart = nodeProviderIndexes & 1048575;\n const directivesStart = tNode.directiveStart;\n const directiveEnd = tNode.directiveEnd;\n const cptViewProvidersCount = nodeProviderIndexes >> 20;\n const startingIndex = canAccessViewProviders ? injectablesStart : injectablesStart + cptViewProvidersCount;\n const endIndex = isHostSpecialCase ? injectablesStart + cptViewProvidersCount : directiveEnd;\n for (let i = startingIndex; i < endIndex; i++) {\n const providerTokenOrDef = tInjectables[i];\n if (i < directivesStart && token === providerTokenOrDef || i >= directivesStart && providerTokenOrDef.type === token) {\n return i;\n }\n }\n if (isHostSpecialCase) {\n const dirDef = tInjectables[directivesStart];\n if (dirDef && isComponentDef(dirDef) && dirDef.type === token) {\n return directivesStart;\n }\n }\n return null;\n}\nlet injectionPath = [];\nfunction getNodeInjectable(lView, tView, index, tNode, flags) {\n let value = lView[index];\n const tData = tView.data;\n if (value instanceof NodeInjectorFactory) {\n const factory = value;\n ngDevMode && injectionPath.push(factory.name ?? 'unknown');\n if (factory.resolving) {\n let token = '';\n if (ngDevMode) {\n token = stringifyForError(tData[index]);\n throw cyclicDependencyErrorWithDetails(token, injectionPath);\n } else {\n throw cyclicDependencyError(token);\n }\n }\n const previousIncludeViewProviders = setIncludeViewProviders(factory.canSeeViewProviders);\n factory.resolving = true;\n const token = tData[index].type || tData[index];\n let prevInjectContext;\n if (ngDevMode) {\n const injector = new NodeInjector(tNode, lView);\n prevInjectContext = setInjectorProfilerContext({\n injector,\n token\n });\n }\n const previousInjectImplementation = factory.injectImpl ? setInjectImplementation(factory.injectImpl) : null;\n const success = enterDI(lView, tNode, 0);\n ngDevMode && assertEqual(success, true, \"Because flags do not contain `SkipSelf' we expect this to always succeed.\");\n try {\n ngDevMode && emitInjectorToCreateInstanceEvent(token);\n value = lView[index] = factory.factory(undefined, flags, tData, lView, tNode);\n ngDevMode && emitInstanceCreatedByInjectorEvent(value);\n if (tView.firstCreatePass && index >= tNode.directiveStart) {\n ngDevMode && assertDirectiveDef(tData[index]);\n registerPreOrderHooks(index, tData[index], tView);\n }\n } finally {\n ngDevMode && setInjectorProfilerContext(prevInjectContext);\n previousInjectImplementation !== null && setInjectImplementation(previousInjectImplementation);\n setIncludeViewProviders(previousIncludeViewProviders);\n factory.resolving = false;\n leaveDI();\n ngDevMode && (injectionPath = []);\n }\n }\n return value;\n}\nfunction bloomHashBitOrFactory(token) {\n ngDevMode && assertDefined(token, 'token must be defined');\n if (typeof token === 'string') {\n return token.charCodeAt(0) || 0;\n }\n const tokenId = Object.hasOwn(token, NG_ELEMENT_ID) ? token[NG_ELEMENT_ID] : undefined;\n if (typeof tokenId === 'number') {\n if (tokenId >= 0) {\n return tokenId & BLOOM_MASK;\n } else {\n ngDevMode && assertEqual(tokenId, -1, 'Expecting to get Special Injector Id');\n return createNodeInjector;\n }\n } else {\n return tokenId;\n }\n}\nfunction bloomHasToken(bloomHash, injectorIndex, injectorView) {\n const mask = 1 << bloomHash;\n const value = injectorView[injectorIndex + (bloomHash >> BLOOM_BUCKET_BITS)];\n return !!(value & mask);\n}\nfunction shouldSearchParent(flags, isFirstHostTNode) {\n return !(flags & 2) && !(flags & 1 && isFirstHostTNode);\n}\nfunction getNodeInjectorLView(nodeInjector) {\n return nodeInjector._lView;\n}\nfunction getNodeInjectorTNode(nodeInjector) {\n return nodeInjector._tNode;\n}\nclass NodeInjector {\n _tNode;\n _lView;\n constructor(_tNode, _lView) {\n this._tNode = _tNode;\n this._lView = _lView;\n }\n get(token, notFoundValue, flags) {\n return getOrCreateInjectable(this._tNode, this._lView, token, convertToBitFlags(flags), notFoundValue);\n }\n}\nfunction createNodeInjector() {\n return new NodeInjector(getCurrentTNode(), getLView());\n}\nfunction ษตษตgetInheritedFactory(type) {\n return noSideEffects(() => {\n const ownConstructor = type.prototype.constructor;\n const ownFactory = ownConstructor[NG_FACTORY_DEF] || getFactoryOf(ownConstructor);\n const objectPrototype = Object.prototype;\n let parent = Object.getPrototypeOf(type.prototype).constructor;\n while (parent && parent !== objectPrototype) {\n const factory = parent[NG_FACTORY_DEF] || getFactoryOf(parent);\n if (factory && factory !== ownFactory) {\n return factory;\n }\n parent = Object.getPrototypeOf(parent);\n }\n return t => new t();\n });\n}\nfunction getFactoryOf(type) {\n if (isForwardRef(type)) {\n return () => {\n const factory = getFactoryOf(resolveForwardRef(type));\n return factory && factory();\n };\n }\n return getFactoryDef(type);\n}\nfunction lookupTokenUsingEmbeddedInjector(tNode, lView, token, flags, notFoundValue) {\n let currentTNode = tNode;\n let currentLView = lView;\n while (currentTNode !== null && currentLView !== null && currentLView[FLAGS] & 2048 && !isRootView(currentLView)) {\n ngDevMode && assertTNodeForLView(currentTNode, currentLView);\n const nodeInjectorValue = lookupTokenUsingNodeInjector(currentTNode, currentLView, token, flags | 2, NOT_FOUND);\n if (nodeInjectorValue !== NOT_FOUND) {\n return nodeInjectorValue;\n }\n flags &= -5;\n let parentTNode = currentTNode.parent;\n if (!parentTNode) {\n const embeddedViewInjector = currentLView[EMBEDDED_VIEW_INJECTOR];\n if (embeddedViewInjector) {\n const embeddedViewInjectorValue = embeddedViewInjector.get(token, NOT_FOUND, flags);\n if (embeddedViewInjectorValue !== NOT_FOUND) {\n return embeddedViewInjectorValue;\n }\n }\n parentTNode = getTNodeFromLView(currentLView);\n currentLView = currentLView[DECLARATION_VIEW];\n }\n currentTNode = parentTNode;\n }\n return notFoundValue;\n}\nfunction getTNodeFromLView(lView) {\n const tView = lView[TVIEW$1];\n const tViewType = tView.type;\n if (tViewType === 2) {\n ngDevMode && assertDefined(tView.declTNode, 'Embedded TNodes should have declaration parents.');\n return tView.declTNode;\n } else if (tViewType === 1) {\n return lView[T_HOST];\n }\n return null;\n}\n\nfunction ษตษตinjectAttribute(attrNameToInject) {\n return injectAttributeImpl(getCurrentTNode(), attrNameToInject);\n}\n\nconst _requestIdleCallback = () => (typeof requestIdleCallback !== 'undefined' ? requestIdleCallback : cb => setTimeout(cb)).bind(globalThis);\nconst _cancelIdleCallback = () => (typeof requestIdleCallback !== 'undefined' ? cancelIdleCallback : clearTimeout).bind(globalThis);\nconst IDLE_SERVICE = /*#__PURE__*/ new InjectionToken(ngDevMode ? 'IDLE_SERVICE' : '', {\n factory: () => new RequestIdleCallbackService()\n});\nfunction provideIdleServiceWith(useExisting) {\n return makeEnvironmentProviders([{\n provide: IDLE_SERVICE,\n useExisting\n }]);\n}\nclass RequestIdleCallbackService {\n requestIdleCallback = _requestIdleCallback();\n cancelIdleCallback = _cancelIdleCallback();\n requestOnIdle(callback, options) {\n return this.requestIdleCallback(callback, options);\n }\n cancelOnIdle(id) {\n return this.cancelIdleCallback(id);\n }\n}\n\nconst ANNOTATIONS = '__annotations__';\nconst PARAMETERS = '__parameters__';\nconst PROP_METADATA = '__prop__metadata__';\nfunction makeDecorator(name, props, parentClass, additionalProcessing, typeFn) {\n return noSideEffects(() => {\n const metaCtor = makeMetadataCtor(props);\n function DecoratorFactory(...args) {\n if (this instanceof DecoratorFactory) {\n metaCtor.call(this, ...args);\n return this;\n }\n const annotationInstance = new DecoratorFactory(...args);\n return function TypeDecorator(cls) {\n if (typeFn) typeFn(cls, ...args);\n const annotations = Object.hasOwn(cls, ANNOTATIONS) ? cls[ANNOTATIONS] : Object.defineProperty(cls, ANNOTATIONS, {\n value: []\n })[ANNOTATIONS];\n annotations.push(annotationInstance);\n return cls;\n };\n }\n if (parentClass) {\n DecoratorFactory.prototype = Object.create(parentClass.prototype);\n }\n DecoratorFactory.prototype.ngMetadataName = name;\n DecoratorFactory.annotationCls = DecoratorFactory;\n return DecoratorFactory;\n });\n}\nfunction makeMetadataCtor(props) {\n return function ctor(...args) {\n if (props) {\n const values = props(...args);\n for (const propName in values) {\n this[propName] = values[propName];\n }\n }\n };\n}\nfunction makeParamDecorator(name, props, parentClass) {\n return noSideEffects(() => {\n const metaCtor = makeMetadataCtor(props);\n function ParamDecoratorFactory(...args) {\n if (this instanceof ParamDecoratorFactory) {\n metaCtor.apply(this, args);\n return this;\n }\n const annotationInstance = new ParamDecoratorFactory(...args);\n ParamDecorator.annotation = annotationInstance;\n return ParamDecorator;\n function ParamDecorator(cls, unusedKey, index) {\n const parameters = Object.hasOwn(cls, PARAMETERS) ? cls[PARAMETERS] : Object.defineProperty(cls, PARAMETERS, {\n value: []\n })[PARAMETERS];\n while (parameters.length <= index) {\n parameters.push(null);\n }\n (parameters[index] = parameters[index] || []).push(annotationInstance);\n return cls;\n }\n }\n ParamDecoratorFactory.prototype.ngMetadataName = name;\n ParamDecoratorFactory.annotationCls = ParamDecoratorFactory;\n return ParamDecoratorFactory;\n });\n}\nfunction makePropDecorator(name, props, parentClass, additionalProcessing) {\n return noSideEffects(() => {\n const metaCtor = makeMetadataCtor(props);\n function PropDecoratorFactory(...args) {\n if (this instanceof PropDecoratorFactory) {\n metaCtor.apply(this, args);\n return this;\n }\n const decoratorInstance = new PropDecoratorFactory(...args);\n function PropDecorator(target, name) {\n if (target === undefined) {\n throw new Error('Standard Angular field decorators are not supported in JIT mode.');\n }\n const constructor = target.constructor;\n const meta = Object.hasOwn(constructor, PROP_METADATA) ? constructor[PROP_METADATA] : Object.defineProperty(constructor, PROP_METADATA, {\n value: {}\n })[PROP_METADATA];\n meta[name] = Object.hasOwn(meta, name) && meta[name] || [];\n meta[name].unshift(decoratorInstance);\n }\n return PropDecorator;\n }\n if (parentClass) {\n PropDecoratorFactory.prototype = Object.create(parentClass.prototype);\n }\n PropDecoratorFactory.prototype.ngMetadataName = name;\n PropDecoratorFactory.annotationCls = PropDecoratorFactory;\n return PropDecoratorFactory;\n });\n}\n\nfunction getCompilerFacade(request) {\n const globalNg = _global['ng'];\n if (globalNg && globalNg.ษตcompilerFacade) {\n return globalNg.ษตcompilerFacade;\n }\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n console.error(`JIT compilation failed for ${request.kind}`, request.type);\n let message = `The ${request.kind} '${request.type.name}' needs to be compiled using the JIT compiler, but '@angular/compiler' is not available.\\n\\n`;\n if (request.usage === 1) {\n message += `The ${request.kind} is part of a library that has been partially compiled.\\n`;\n message += `However, the Angular Linker has not processed the library such that JIT compilation is used as fallback.\\n`;\n message += '\\n';\n message += `Ideally, the library is processed using the Angular Linker to become fully AOT compiled.\\n`;\n } else {\n message += `JIT compilation is discouraged for production use-cases! Consider using AOT mode instead.\\n`;\n }\n message += `Alternatively, the JIT compiler should be loaded by bootstrapping using '@angular/platform-browser-dynamic' or '@angular/platform-server',\\n`;\n message += `or manually provide the compiler with 'import \"@angular/compiler\";' before bootstrapping.`;\n throw new Error(message);\n } else {\n throw new Error('JIT compiler unavailable');\n }\n}\n\nfunction ษตษตdefineService(opts) {\n return {\n token: opts.token,\n providedIn: opts.autoProvided === false ? null : 'root',\n factory: opts.factory,\n value: undefined\n };\n}\n\nconst angularCoreDiEnv = {\n 'ษตษตdefineInjectable': __defineInjectable,\n 'ษตษตdefineInjector': __defineInjector,\n 'ษตษตdefineService': ษตษตdefineService,\n 'ษตษตinject': __inject,\n 'ษตษตinvalidFactoryDep': __invalidFactoryDep,\n 'resolveForwardRef': resolveForwardRef\n};\n\nconst Type = Function;\nfunction isType(v) {\n return typeof v === 'function';\n}\n\nconst ES5_DELEGATE_CTOR = /^function\\s+\\S+\\(\\)\\s*{[\\s\\S]+\\.apply\\(this,\\s*(arguments|(?:[^()]+\\(\\[\\],)?[^()]+\\(arguments\\).*)\\)/;\nconst ES2015_INHERITED_CLASS = /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[^{]+{/;\nconst ES2015_INHERITED_CLASS_WITH_CTOR = /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[^{]+{[\\s\\S]*constructor\\s*\\(/;\nconst ES2015_INHERITED_CLASS_WITH_DELEGATE_CTOR = /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[^{]+{[\\s\\S]*constructor\\s*\\(\\)\\s*{[^}]*super\\(\\.\\.\\.arguments\\)/;\nfunction isDelegateCtor(typeStr) {\n return ES5_DELEGATE_CTOR.test(typeStr) || ES2015_INHERITED_CLASS_WITH_DELEGATE_CTOR.test(typeStr) || ES2015_INHERITED_CLASS.test(typeStr) && !ES2015_INHERITED_CLASS_WITH_CTOR.test(typeStr);\n}\nclass ReflectionCapabilities {\n _reflect;\n constructor(reflect) {\n this._reflect = reflect || _global['Reflect'];\n }\n factory(t) {\n return (...args) => new t(...args);\n }\n _zipTypesAndAnnotations(paramTypes, paramAnnotations) {\n let result;\n if (typeof paramTypes === 'undefined') {\n result = newArray(paramAnnotations.length);\n } else {\n result = newArray(paramTypes.length);\n }\n for (let i = 0; i < result.length; i++) {\n if (typeof paramTypes === 'undefined') {\n result[i] = [];\n } else if (paramTypes[i] && paramTypes[i] != Object) {\n result[i] = [paramTypes[i]];\n } else {\n result[i] = [];\n }\n if (paramAnnotations && paramAnnotations[i] != null) {\n result[i] = result[i].concat(paramAnnotations[i]);\n }\n }\n return result;\n }\n _ownParameters(type, parentCtor) {\n const typeStr = type.toString();\n if (isDelegateCtor(typeStr)) {\n return null;\n }\n if (type.parameters && type.parameters !== parentCtor.parameters) {\n return type.parameters;\n }\n const tsickleCtorParams = type.ctorParameters;\n if (tsickleCtorParams && tsickleCtorParams !== parentCtor.ctorParameters) {\n const ctorParameters = typeof tsickleCtorParams === 'function' ? tsickleCtorParams() : tsickleCtorParams;\n const paramTypes = ctorParameters.map(ctorParam => ctorParam && ctorParam.type);\n const paramAnnotations = ctorParameters.map(ctorParam => ctorParam && convertTsickleDecoratorIntoMetadata(ctorParam.decorators));\n return this._zipTypesAndAnnotations(paramTypes, paramAnnotations);\n }\n const paramAnnotations = Object.hasOwn(type, PARAMETERS) && type[PARAMETERS];\n const paramTypes = this._reflect && this._reflect.getOwnMetadata && this._reflect.getOwnMetadata('design:paramtypes', type);\n if (paramTypes || paramAnnotations) {\n return this._zipTypesAndAnnotations(paramTypes, paramAnnotations);\n }\n return newArray(type.length);\n }\n parameters(type) {\n if (!isType(type)) {\n return [];\n }\n const parentCtor = getParentCtor(type);\n let parameters = this._ownParameters(type, parentCtor);\n if (!parameters && parentCtor !== Object) {\n parameters = this.parameters(parentCtor);\n }\n return parameters || [];\n }\n _ownAnnotations(typeOrFunc, parentCtor) {\n if (typeOrFunc.annotations && typeOrFunc.annotations !== parentCtor.annotations) {\n let annotations = typeOrFunc.annotations;\n if (typeof annotations === 'function' && annotations.annotations) {\n annotations = annotations.annotations;\n }\n return annotations;\n }\n if (typeOrFunc.decorators && typeOrFunc.decorators !== parentCtor.decorators) {\n return convertTsickleDecoratorIntoMetadata(typeOrFunc.decorators);\n }\n if (Object.hasOwn(typeOrFunc, ANNOTATIONS)) {\n return typeOrFunc[ANNOTATIONS];\n }\n return null;\n }\n annotations(typeOrFunc) {\n if (!isType(typeOrFunc)) {\n return [];\n }\n const parentCtor = getParentCtor(typeOrFunc);\n const ownAnnotations = this._ownAnnotations(typeOrFunc, parentCtor) || [];\n const parentAnnotations = parentCtor !== Object ? this.annotations(parentCtor) : [];\n return parentAnnotations.concat(ownAnnotations);\n }\n _ownPropMetadata(typeOrFunc, parentCtor) {\n if (typeOrFunc.propMetadata && typeOrFunc.propMetadata !== parentCtor.propMetadata) {\n let propMetadata = typeOrFunc.propMetadata;\n if (typeof propMetadata === 'function' && propMetadata.propMetadata) {\n propMetadata = propMetadata.propMetadata;\n }\n return propMetadata;\n }\n if (typeOrFunc.propDecorators && typeOrFunc.propDecorators !== parentCtor.propDecorators) {\n const propDecorators = typeOrFunc.propDecorators;\n const propMetadata = {};\n Object.keys(propDecorators).forEach(prop => {\n propMetadata[prop] = convertTsickleDecoratorIntoMetadata(propDecorators[prop]);\n });\n return propMetadata;\n }\n if (Object.hasOwn(typeOrFunc, PROP_METADATA)) {\n return typeOrFunc[PROP_METADATA];\n }\n return null;\n }\n propMetadata(typeOrFunc) {\n if (!isType(typeOrFunc)) {\n return {};\n }\n const parentCtor = getParentCtor(typeOrFunc);\n const propMetadata = {};\n if (parentCtor !== Object) {\n const parentPropMetadata = this.propMetadata(parentCtor);\n Object.keys(parentPropMetadata).forEach(propName => {\n propMetadata[propName] = parentPropMetadata[propName];\n });\n }\n const ownPropMetadata = this._ownPropMetadata(typeOrFunc, parentCtor);\n if (ownPropMetadata) {\n Object.keys(ownPropMetadata).forEach(propName => {\n const decorators = [];\n if (Object.hasOwn(propMetadata, propName)) {\n decorators.push(...propMetadata[propName]);\n }\n decorators.push(...ownPropMetadata[propName]);\n propMetadata[propName] = decorators;\n });\n }\n return propMetadata;\n }\n ownPropMetadata(typeOrFunc) {\n if (!isType(typeOrFunc)) {\n return {};\n }\n return this._ownPropMetadata(typeOrFunc, getParentCtor(typeOrFunc)) || {};\n }\n hasLifecycleHook(type, lcProperty) {\n return type instanceof Type && lcProperty in type.prototype;\n }\n}\nfunction convertTsickleDecoratorIntoMetadata(decoratorInvocations) {\n if (!decoratorInvocations) {\n return [];\n }\n return decoratorInvocations.map(decoratorInvocation => {\n const decoratorType = decoratorInvocation.type;\n const annotationCls = decoratorType.annotationCls;\n const annotationArgs = decoratorInvocation.args ? decoratorInvocation.args : [];\n return new annotationCls(...annotationArgs);\n });\n}\nfunction getParentCtor(ctor) {\n const parentProto = ctor.prototype ? Object.getPrototypeOf(ctor.prototype) : null;\n const parentCtor = parentProto ? parentProto.constructor : null;\n return parentCtor || Object;\n}\n\nconst Inject = /*#__PURE__*/ attachInjectFlag(/*#__PURE__*/ makeParamDecorator('Inject', token => ({\n token\n})), -1);\nconst Optional = /*#__PURE__*/ attachInjectFlag(/*#__PURE__*/ makeParamDecorator('Optional'), 8);\nconst Self = /*#__PURE__*/ attachInjectFlag(/*#__PURE__*/ makeParamDecorator('Self'), 2);\nconst SkipSelf = /*#__PURE__*/ attachInjectFlag(/*#__PURE__*/ makeParamDecorator('SkipSelf'), 4);\nconst Host = /*#__PURE__*/ attachInjectFlag(/*#__PURE__*/ makeParamDecorator('Host'), 1);\n\nconst Attribute = /*#__PURE__*/ makeParamDecorator('Attribute', attributeName => ({\n attributeName,\n __NG_ELEMENT_ID__: () => ษตษตinjectAttribute(attributeName)\n}));\n\nlet _reflect = null;\nfunction getReflect() {\n return _reflect = _reflect || new ReflectionCapabilities();\n}\nfunction reflectDependencies(type) {\n return convertDependencies(getReflect().parameters(type));\n}\nfunction convertDependencies(deps) {\n return deps.map(dep => reflectDependency(dep));\n}\nfunction reflectDependency(dep) {\n const meta = {\n token: null,\n attribute: null,\n host: false,\n optional: false,\n self: false,\n skipSelf: false\n };\n if (Array.isArray(dep) && dep.length > 0) {\n for (let j = 0; j < dep.length; j++) {\n const param = dep[j];\n if (param === undefined) {\n continue;\n }\n const proto = Object.getPrototypeOf(param);\n if (param instanceof Optional || proto.ngMetadataName === 'Optional') {\n meta.optional = true;\n } else if (param instanceof SkipSelf || proto.ngMetadataName === 'SkipSelf') {\n meta.skipSelf = true;\n } else if (param instanceof Self || proto.ngMetadataName === 'Self') {\n meta.self = true;\n } else if (param instanceof Host || proto.ngMetadataName === 'Host') {\n meta.host = true;\n } else if (param instanceof Inject) {\n meta.token = param.token;\n } else if (param instanceof Attribute) {\n if (param.attributeName === undefined) {\n throw new RuntimeError(-204, ngDevMode && `Attribute name must be defined.`);\n }\n meta.attribute = param.attributeName;\n } else {\n meta.token = param;\n }\n }\n } else if (dep === undefined || Array.isArray(dep) && dep.length === 0) {\n meta.token = null;\n } else {\n meta.token = dep;\n }\n return meta;\n}\n\nfunction compileInjectable(type, meta) {\n let ngInjectableDef = null;\n let ngFactoryDef = null;\n if (!Object.hasOwn(type, NG_PROV_DEF)) {\n Object.defineProperty(type, NG_PROV_DEF, {\n get: () => {\n if (ngInjectableDef === null) {\n const compiler = getCompilerFacade({\n usage: 0,\n kind: 'injectable',\n type\n });\n ngInjectableDef = compiler.compileInjectable(angularCoreDiEnv, `ng:///${type.name}/ษตprov.js`, getInjectableMetadata(type, meta));\n }\n return ngInjectableDef;\n }\n });\n }\n if (!Object.hasOwn(type, NG_FACTORY_DEF)) {\n Object.defineProperty(type, NG_FACTORY_DEF, {\n get: () => {\n if (ngFactoryDef === null) {\n const compiler = getCompilerFacade({\n usage: 0,\n kind: 'injectable',\n type\n });\n ngFactoryDef = compiler.compileFactory(angularCoreDiEnv, `ng:///${type.name}/ษตfac.js`, {\n name: type.name,\n type,\n typeArgumentCount: 0,\n deps: reflectDependencies(type),\n target: compiler.FactoryTarget.Injectable\n });\n }\n return ngFactoryDef;\n },\n configurable: true\n });\n }\n}\nconst USE_VALUE = /*#__PURE__*/ getClosureSafeProperty({\n provide: String,\n useValue: getClosureSafeProperty\n});\nfunction isUseClassProvider(meta) {\n return meta.useClass !== undefined;\n}\nfunction isUseValueProvider(meta) {\n return USE_VALUE in meta;\n}\nfunction isUseFactoryProvider(meta) {\n return meta.useFactory !== undefined;\n}\nfunction isUseExistingProvider(meta) {\n return meta.useExisting !== undefined;\n}\nfunction getInjectableMetadata(type, srcMeta) {\n const meta = srcMeta || {\n providedIn: null\n };\n const compilerMeta = {\n name: type.name,\n type: type,\n typeArgumentCount: 0,\n providedIn: meta.providedIn\n };\n if ((isUseClassProvider(meta) || isUseFactoryProvider(meta)) && meta.deps !== undefined) {\n compilerMeta.deps = convertDependencies(meta.deps);\n }\n if (isUseClassProvider(meta)) {\n compilerMeta.useClass = meta.useClass;\n } else if (isUseValueProvider(meta)) {\n compilerMeta.useValue = meta.useValue;\n } else if (isUseFactoryProvider(meta)) {\n compilerMeta.useFactory = meta.useFactory;\n } else if (isUseExistingProvider(meta)) {\n compilerMeta.useExisting = meta.useExisting;\n }\n return compilerMeta;\n}\n\nconst Injectable = /*#__PURE__*/ makeDecorator('Injectable', undefined, undefined, undefined, (type, meta) => compileInjectable(type, meta));\n\nfunction compileService(type, meta) {\n let def = null;\n let factoryDef = null;\n if (!Object.hasOwn(type, NG_PROV_DEF)) {\n Object.defineProperty(type, NG_PROV_DEF, {\n get: () => {\n if (def === null) {\n const compiler = getCompilerFacade({\n usage: 0,\n kind: 'service',\n type\n });\n def = compiler.compileService(angularCoreDiEnv, `ng:///${type.name}/ษตprov.js`, getServiceMetadata(type, meta));\n }\n return def;\n }\n });\n }\n if (!Object.hasOwn(type, NG_FACTORY_DEF)) {\n Object.defineProperty(type, NG_FACTORY_DEF, {\n get: () => {\n if (factoryDef === null) {\n const compiler = getCompilerFacade({\n usage: 0,\n kind: 'service',\n type\n });\n factoryDef = compiler.compileFactory(angularCoreDiEnv, `ng:///${type.name}/ษตfac.js`, {\n name: type.name,\n type,\n typeArgumentCount: 0,\n deps: reflectDependencies(type),\n target: compiler.FactoryTarget.Service\n });\n }\n return factoryDef;\n },\n configurable: true\n });\n }\n}\nfunction getServiceMetadata(type, srcMeta) {\n const compilerMeta = {\n name: type.name,\n type: type,\n typeArgumentCount: 0,\n autoProvided: srcMeta?.autoProvided,\n factory: srcMeta?.factory\n };\n return compilerMeta;\n}\n\nconst Service = /*#__PURE__*/ makeDecorator('Service', undefined, undefined, undefined, (type, meta) => compileService(type, meta));\n\nfunction injectElementRef() {\n return createElementRef(getCurrentTNode(), getLView());\n}\nfunction createElementRef(tNode, lView) {\n return new ElementRef(getNativeByTNode(tNode, lView));\n}\nlet ElementRef = /*#__PURE__*/ (() => {\nclass ElementRef {\n nativeElement;\n constructor(nativeElement) {\n this.nativeElement = nativeElement;\n }\n static __NG_ELEMENT_ID__ = injectElementRef;\n}\nreturn ElementRef;\n})();\nif (typeof ngDevMode === 'undefined' || ngDevMode) {\n /*#__PURE__*/ registerSpecialProvider(ElementRef);\n}\nfunction unwrapElementRef(value) {\n return value instanceof ElementRef ? value.nativeElement : value;\n}\n\nfunction symbolIterator() {\n return this._results[Symbol.iterator]();\n}\nclass QueryList {\n _emitDistinctChangesOnly;\n dirty = true;\n _onDirty = undefined;\n _results = [];\n _changesDetected = false;\n _changes = undefined;\n length = 0;\n first = undefined;\n last = undefined;\n get changes() {\n return this._changes ??= new Subject();\n }\n constructor(_emitDistinctChangesOnly = false) {\n this._emitDistinctChangesOnly = _emitDistinctChangesOnly;\n }\n get(index) {\n return this._results[index];\n }\n map(fn) {\n return this._results.map(fn);\n }\n filter(fn) {\n return this._results.filter(fn);\n }\n find(fn) {\n return this._results.find(fn);\n }\n reduce(fn, init) {\n return this._results.reduce(fn, init);\n }\n forEach(fn) {\n this._results.forEach(fn);\n }\n some(fn) {\n return this._results.some(fn);\n }\n toArray() {\n return this._results.slice();\n }\n toString() {\n return this._results.toString();\n }\n reset(resultsTree, identityAccessor) {\n this.dirty = false;\n const newResultFlat = flatten(resultsTree);\n if (this._changesDetected = !arrayEquals(this._results, newResultFlat, identityAccessor)) {\n this._results = newResultFlat;\n this.length = newResultFlat.length;\n this.last = newResultFlat[this.length - 1];\n this.first = newResultFlat[0];\n }\n }\n notifyOnChanges() {\n if (this._changes !== undefined && (this._changesDetected || !this._emitDistinctChangesOnly)) this._changes.next(this);\n }\n onDirty(cb) {\n this._onDirty = cb;\n }\n setDirty() {\n this.dirty = true;\n this._onDirty?.();\n }\n destroy() {\n if (this._changes !== undefined) {\n this._changes.complete();\n this._changes.unsubscribe();\n }\n }\n [Symbol.iterator] = (() => symbolIterator)();\n}\n\nconst SKIP_HYDRATION_ATTR_NAME = 'ngSkipHydration';\nconst SKIP_HYDRATION_ATTR_NAME_LOWER_CASE = 'ngskiphydration';\nfunction hasSkipHydrationAttrOnTNode(tNode) {\n const attrs = tNode.mergedAttrs;\n if (attrs === null) return false;\n for (let i = 0; i < attrs.length; i += 2) {\n const value = attrs[i];\n if (typeof value === 'number') return false;\n if (typeof value === 'string' && value.toLowerCase() === SKIP_HYDRATION_ATTR_NAME_LOWER_CASE) {\n return true;\n }\n }\n return false;\n}\nfunction hasSkipHydrationAttrOnRElement(rNode) {\n return rNode.hasAttribute(SKIP_HYDRATION_ATTR_NAME);\n}\nfunction hasInSkipHydrationBlockFlag(tNode) {\n return (tNode.flags & 128) === 128;\n}\nfunction isInSkipHydrationBlock(tNode) {\n if (hasInSkipHydrationBlockFlag(tNode)) {\n return true;\n }\n let currentTNode = tNode.parent;\n while (currentTNode) {\n if (hasInSkipHydrationBlockFlag(tNode) || hasSkipHydrationAttrOnTNode(currentTNode)) {\n return true;\n }\n currentTNode = currentTNode.parent;\n }\n return false;\n}\nfunction isI18nInSkipHydrationBlock(parentTNode) {\n return hasInSkipHydrationBlockFlag(parentTNode) || hasSkipHydrationAttrOnTNode(parentTNode) || isInSkipHydrationBlock(parentTNode);\n}\n\nvar ChangeDetectionStrategy = /*#__PURE__*/ (function (ChangeDetectionStrategy) {\n ChangeDetectionStrategy[ChangeDetectionStrategy[\"OnPush\"] = 0] = \"OnPush\";\n ChangeDetectionStrategy[ChangeDetectionStrategy[\"Eager\"] = 1] = \"Eager\";\n ChangeDetectionStrategy[ChangeDetectionStrategy[\"Default\"] = 1] = \"Default\";\n; return ChangeDetectionStrategy;})(ChangeDetectionStrategy || {});\n\n\nconst TRACKED_LVIEWS = /*#__PURE__*/ new Map();\nlet uniqueIdCounter = 0;\nfunction getUniqueLViewId() {\n return uniqueIdCounter++;\n}\nfunction registerLView(lView) {\n ngDevMode && assertNumber(lView[ID], 'LView must have an ID in order to be registered');\n TRACKED_LVIEWS.set(lView[ID], lView);\n}\nfunction getLViewById(id) {\n ngDevMode && assertNumber(id, 'ID used for LView lookup must be a number');\n return TRACKED_LVIEWS.get(id) || null;\n}\nfunction unregisterLView(lView) {\n ngDevMode && assertNumber(lView[ID], 'Cannot stop tracking an LView that does not have an ID');\n TRACKED_LVIEWS.delete(lView[ID]);\n}\nfunction getTrackedLViews() {\n return TRACKED_LVIEWS;\n}\n\nclass LContext {\n lViewId;\n nodeIndex;\n native;\n component;\n directives;\n localRefs;\n get lView() {\n return getLViewById(this.lViewId);\n }\n constructor(lViewId, nodeIndex, native) {\n this.lViewId = lViewId;\n this.nodeIndex = nodeIndex;\n this.native = native;\n }\n}\n\nfunction getLContext(target) {\n let mpValue = readPatchedData(target);\n if (mpValue) {\n if (isLView(mpValue)) {\n const lView = mpValue;\n let nodeIndex;\n let component = undefined;\n let directives = undefined;\n if (isComponentInstance(target)) {\n nodeIndex = findViaComponent(lView, target);\n if (nodeIndex == -1) {\n throw new Error('The provided component was not found in the application');\n }\n component = target;\n } else if (isDirectiveInstance(target)) {\n nodeIndex = findViaDirective(lView, target);\n if (nodeIndex == -1) {\n throw new Error('The provided directive was not found in the application');\n }\n directives = getDirectivesAtNodeIndex(nodeIndex, lView);\n } else {\n nodeIndex = findViaNativeElement(lView, target);\n if (nodeIndex == -1) {\n return null;\n }\n }\n const native = unwrapRNode(lView[nodeIndex]);\n const existingCtx = readPatchedData(native);\n const context = existingCtx && !Array.isArray(existingCtx) ? existingCtx : createLContext(lView, nodeIndex, native);\n if (component && context.component === undefined) {\n context.component = component;\n attachPatchData(context.component, context);\n }\n if (directives && context.directives === undefined) {\n context.directives = directives;\n for (let i = 0; i < directives.length; i++) {\n attachPatchData(directives[i], context);\n }\n }\n attachPatchData(context.native, context);\n mpValue = context;\n }\n } else {\n const rElement = target;\n ngDevMode && assertDomNode(rElement);\n let parent = rElement;\n while (parent = parent.parentNode) {\n const parentContext = readPatchedData(parent);\n if (parentContext) {\n const lView = Array.isArray(parentContext) ? parentContext : parentContext.lView;\n if (!lView) {\n return null;\n }\n const index = findViaNativeElement(lView, rElement);\n if (index >= 0) {\n const native = unwrapRNode(lView[index]);\n const context = createLContext(lView, index, native);\n attachPatchData(native, context);\n mpValue = context;\n break;\n }\n }\n }\n }\n return mpValue || null;\n}\nfunction createLContext(lView, nodeIndex, native) {\n return new LContext(lView[ID], nodeIndex, native);\n}\nfunction getComponentViewByInstance(componentInstance) {\n let patchedData = readPatchedData(componentInstance);\n let lView;\n if (isLView(patchedData)) {\n const contextLView = patchedData;\n const nodeIndex = findViaComponent(contextLView, componentInstance);\n lView = getComponentLViewByIndex(nodeIndex, contextLView);\n const context = createLContext(contextLView, nodeIndex, lView[HOST]);\n context.component = componentInstance;\n attachPatchData(componentInstance, context);\n attachPatchData(context.native, context);\n } else {\n const context = patchedData;\n const contextLView = context.lView;\n ngDevMode && assertLView(contextLView);\n lView = getComponentLViewByIndex(context.nodeIndex, contextLView);\n }\n return lView;\n}\nconst MONKEY_PATCH_KEY_NAME = '__ngContext__';\nfunction attachPatchData(target, data) {\n ngDevMode && assertDefined(target, 'Target expected');\n if (isLView(data)) {\n target[MONKEY_PATCH_KEY_NAME] = data[ID];\n registerLView(data);\n } else {\n target[MONKEY_PATCH_KEY_NAME] = data;\n }\n}\nfunction readPatchedData(target) {\n ngDevMode && assertDefined(target, 'Target expected');\n const data = target[MONKEY_PATCH_KEY_NAME];\n return typeof data === 'number' ? getLViewById(data) : data || null;\n}\nfunction readPatchedLView(target) {\n const value = readPatchedData(target);\n if (value) {\n return isLView(value) ? value : value.lView;\n }\n return null;\n}\nfunction isComponentInstance(instance) {\n return instance && instance.constructor && instance.constructor.ษตcmp;\n}\nfunction isDirectiveInstance(instance) {\n return instance && instance.constructor && instance.constructor.ษตdir;\n}\nfunction findViaNativeElement(lView, target) {\n const tView = lView[TVIEW$1];\n for (let i = HEADER_OFFSET; i < tView.bindingStartIndex; i++) {\n if (unwrapRNode(lView[i]) === target) {\n return i;\n }\n }\n return -1;\n}\nfunction traverseNextElement(tNode) {\n if (tNode.child) {\n return tNode.child;\n } else if (tNode.next) {\n return tNode.next;\n } else {\n while (tNode.parent && !tNode.parent.next) {\n tNode = tNode.parent;\n }\n return tNode.parent && tNode.parent.next;\n }\n}\nfunction findViaComponent(lView, componentInstance) {\n const componentIndices = lView[TVIEW$1].components;\n if (componentIndices) {\n for (let i = 0; i < componentIndices.length; i++) {\n const elementComponentIndex = componentIndices[i];\n const componentView = getComponentLViewByIndex(elementComponentIndex, lView);\n if (componentView[CONTEXT] === componentInstance) {\n return elementComponentIndex;\n }\n }\n } else {\n const rootComponentView = getComponentLViewByIndex(HEADER_OFFSET, lView);\n const rootComponent = rootComponentView[CONTEXT];\n if (rootComponent === componentInstance) {\n return HEADER_OFFSET;\n }\n }\n return -1;\n}\nfunction findViaDirective(lView, directiveInstance) {\n let tNode = lView[TVIEW$1].firstChild;\n while (tNode) {\n const directiveIndexStart = tNode.directiveStart;\n const directiveIndexEnd = tNode.directiveEnd;\n for (let i = directiveIndexStart; i < directiveIndexEnd; i++) {\n if (lView[i] === directiveInstance) {\n return tNode.index;\n }\n }\n tNode = traverseNextElement(tNode);\n }\n return -1;\n}\nfunction getDirectivesAtNodeIndex(nodeIndex, lView) {\n const tNode = lView[TVIEW$1].data[nodeIndex];\n if (tNode.directiveStart === 0) return EMPTY_ARRAY;\n const results = [];\n for (let i = tNode.directiveStart; i < tNode.directiveEnd; i++) {\n const directiveInstance = lView[i];\n if (!isComponentInstance(directiveInstance)) {\n results.push(directiveInstance);\n }\n }\n return results;\n}\nfunction getComponentAtNodeIndex(nodeIndex, lView) {\n const tNode = lView[TVIEW$1].data[nodeIndex];\n return isComponentHost(tNode) ? lView[tNode.directiveStart + tNode.componentOffset] : null;\n}\nfunction discoverLocalRefs(lView, nodeIndex) {\n const tNode = lView[TVIEW$1].data[nodeIndex];\n if (tNode && tNode.localNames) {\n const result = {};\n let localIndex = tNode.index + 1;\n for (let i = 0; i < tNode.localNames.length; i += 2) {\n result[tNode.localNames[i]] = lView[localIndex];\n localIndex++;\n }\n return result;\n }\n return null;\n}\n\nfunction getRootView(componentOrLView) {\n ngDevMode && assertDefined(componentOrLView, 'component');\n let lView = isLView(componentOrLView) ? componentOrLView : readPatchedLView(componentOrLView);\n while (lView && !isRootView(lView)) {\n lView = getLViewParent(lView);\n }\n ngDevMode && assertLView(lView);\n return lView;\n}\nfunction getRootContext(viewOrComponent) {\n const rootView = getRootView(viewOrComponent);\n ngDevMode && assertDefined(rootView[CONTEXT], 'Root view has no context. Perhaps it is disconnected?');\n return rootView[CONTEXT];\n}\nfunction getFirstLContainer(lView) {\n return getNearestLContainer(lView[CHILD_HEAD]);\n}\nfunction getNextLContainer(container) {\n return getNearestLContainer(container[NEXT]);\n}\nfunction getNearestLContainer(viewOrContainer) {\n while (viewOrContainer !== null && !isLContainer(viewOrContainer)) {\n viewOrContainer = viewOrContainer[NEXT];\n }\n return viewOrContainer;\n}\nfunction* walkLViewChildren(tNode, lView) {\n let child = tNode.child;\n while (child) {\n yield [child, lView];\n child = child.next;\n }\n if (tNode.componentOffset > -1) {\n const componentLView = getComponentLViewByIndex(tNode.index, lView);\n if (isLView(componentLView)) {\n const componentTView = componentLView[TVIEW$1];\n let componentChild = componentTView.firstChild;\n while (componentChild) {\n yield [componentChild, componentLView];\n componentChild = componentChild.next;\n }\n }\n }\n const slot = lView[tNode.index];\n if (isLContainer(slot)) {\n for (let i = CONTAINER_HEADER_OFFSET; i < slot.length; i++) {\n const embeddedLView = slot[i];\n const embeddedTView = embeddedLView[TVIEW$1];\n let embeddedChild = embeddedTView.firstChild;\n while (embeddedChild) {\n yield [embeddedChild, embeddedLView];\n embeddedChild = embeddedChild.next;\n }\n }\n }\n}\nfunction* walkLViewDescendants(lView) {\n const tView = lView[TVIEW$1];\n let child = tView.firstChild;\n while (child) {\n yield* walkTNodeDescendants(child, lView);\n child = child.next;\n }\n}\nfunction* walkTNodeDescendants(tNode, lView) {\n yield [tNode, lView];\n for (const [childTNode, childLView] of walkLViewChildren(tNode, lView)) {\n yield* walkTNodeDescendants(childTNode, childLView);\n }\n}\nfunction* walkLViewDirectives(lView) {\n for (const [tNode, currentLView] of walkLViewDescendants(lView)) {\n if (tNode.directiveEnd > tNode.directiveStart) {\n yield [tNode, currentLView];\n }\n }\n}\n\nfunction getComponent(element) {\n ngDevMode && assertDomElement(element);\n const context = getLContext(element);\n if (context === null) return null;\n if (context.component === undefined) {\n const lView = context.lView;\n if (lView === null) {\n return null;\n }\n context.component = getComponentAtNodeIndex(context.nodeIndex, lView);\n }\n return context.component;\n}\nfunction getContext(element) {\n assertDomElement(element);\n const context = getLContext(element);\n const lView = context ? context.lView : null;\n return lView === null ? null : lView[CONTEXT];\n}\nfunction getOwningComponent(elementOrDir) {\n const context = getLContext(elementOrDir);\n let lView = context ? context.lView : null;\n if (lView === null) return null;\n let parent;\n while (lView[TVIEW$1].type === 2 && (parent = getLViewParent(lView))) {\n lView = parent;\n }\n return isRootView(lView) ? null : lView[CONTEXT];\n}\nfunction getRootComponents(elementOrDir) {\n const lView = readPatchedLView(elementOrDir);\n return lView !== null ? [getRootContext(lView)] : [];\n}\nfunction getInjector(elementOrDir) {\n const context = getLContext(elementOrDir);\n const lView = context ? context.lView : null;\n if (lView === null) return Injector.NULL;\n const tNode = lView[TVIEW$1].data[context.nodeIndex];\n return new NodeInjector(tNode, lView);\n}\nfunction getInjectionTokens(element) {\n const context = getLContext(element);\n const lView = context ? context.lView : null;\n if (lView === null) return [];\n const tView = lView[TVIEW$1];\n const tNode = tView.data[context.nodeIndex];\n const providerTokens = [];\n const startIndex = tNode.providerIndexes & 1048575;\n const endIndex = tNode.directiveEnd;\n for (let i = startIndex; i < endIndex; i++) {\n let value = tView.data[i];\n if (isDirectiveDefHack(value)) {\n value = value.type;\n }\n providerTokens.push(value);\n }\n return providerTokens;\n}\nfunction getDirectives(node) {\n if (node instanceof Text) {\n return [];\n }\n const context = getLContext(node);\n const lView = context ? context.lView : null;\n if (lView === null) {\n return [];\n }\n const tView = lView[TVIEW$1];\n const nodeIndex = context.nodeIndex;\n if (!tView?.data[nodeIndex]) {\n return [];\n }\n if (context.directives === undefined) {\n context.directives = getDirectivesAtNodeIndex(nodeIndex, lView);\n }\n return context.directives === null ? [] : [...context.directives];\n}\nvar AcxChangeDetectionStrategy = /*#__PURE__*/ (function (AcxChangeDetectionStrategy) {\n AcxChangeDetectionStrategy[AcxChangeDetectionStrategy[\"Default\"] = 0] = \"Default\";\n AcxChangeDetectionStrategy[AcxChangeDetectionStrategy[\"OnPush\"] = 1] = \"OnPush\";\n; return AcxChangeDetectionStrategy;})(AcxChangeDetectionStrategy || {});\n\nvar AcxViewEncapsulation = /*#__PURE__*/ (function (AcxViewEncapsulation) {\n AcxViewEncapsulation[AcxViewEncapsulation[\"Emulated\"] = 0] = \"Emulated\";\n AcxViewEncapsulation[AcxViewEncapsulation[\"None\"] = 1] = \"None\";\n; return AcxViewEncapsulation;})(AcxViewEncapsulation || {});\n\nfunction getDirectiveMetadata$1(directiveOrComponentInstance) {\n if (!directiveOrComponentInstance) {\n return null;\n }\n const {\n constructor\n } = directiveOrComponentInstance;\n if (!constructor) {\n throw new Error('Unable to find the instance constructor');\n }\n const componentDef = getComponentDef(constructor);\n if (componentDef) {\n const inputs = extractInputDebugMetadata(componentDef.inputs);\n return {\n inputs,\n outputs: componentDef.outputs,\n encapsulation: componentDef.encapsulation,\n changeDetection: componentDef.onPush ? ChangeDetectionStrategy.OnPush : ChangeDetectionStrategy.Eager\n };\n }\n const directiveDef = getDirectiveDef(constructor);\n if (directiveDef) {\n const inputs = extractInputDebugMetadata(directiveDef.inputs);\n return {\n inputs,\n outputs: directiveDef.outputs\n };\n }\n return null;\n}\nfunction getLocalRefs(target) {\n const context = getLContext(target);\n if (context === null) return {};\n if (context.localRefs === undefined) {\n const lView = context.lView;\n if (lView === null) {\n return {};\n }\n context.localRefs = discoverLocalRefs(lView, context.nodeIndex);\n }\n return context.localRefs || {};\n}\nfunction getHostElement(componentOrDirective) {\n return getLContext(componentOrDirective).native;\n}\nfunction getListeners(element) {\n ngDevMode && assertDomElement(element);\n const lContext = getLContext(element);\n const lView = lContext === null ? null : lContext.lView;\n if (lView === null) return [];\n const tView = lView[TVIEW$1];\n const lCleanup = lView[CLEANUP];\n const tCleanup = tView.cleanup;\n const listeners = [];\n if (tCleanup && lCleanup) {\n for (let i = 0; i < tCleanup.length;) {\n const firstParam = tCleanup[i++];\n const secondParam = tCleanup[i++];\n if (typeof firstParam === 'string') {\n const name = firstParam;\n const listenerElement = unwrapRNode(lView[secondParam]);\n const callback = lCleanup[tCleanup[i++]];\n const useCaptureOrIndx = tCleanup[i++];\n const type = typeof useCaptureOrIndx === 'boolean' || useCaptureOrIndx >= 0 ? 'dom' : 'output';\n const useCapture = typeof useCaptureOrIndx === 'boolean' ? useCaptureOrIndx : false;\n if (element == listenerElement) {\n listeners.push({\n element,\n name,\n callback,\n useCapture,\n type\n });\n }\n }\n }\n }\n listeners.sort(sortListeners);\n return listeners;\n}\nfunction sortListeners(a, b) {\n if (a.name == b.name) return 0;\n return a.name < b.name ? -1 : 1;\n}\nfunction isDirectiveDefHack(obj) {\n return obj.type !== undefined && obj.declaredInputs !== undefined && obj.resolveHostDirectives !== undefined;\n}\nfunction assertDomElement(value) {\n if (typeof Element !== 'undefined' && !(value instanceof Element)) {\n throw new Error('Expecting instance of DOM Element');\n }\n}\nfunction extractInputDebugMetadata(inputs) {\n const res = {};\n for (const key in inputs) {\n if (Object.hasOwn(inputs, key)) {\n const value = inputs[key];\n if (value !== undefined) {\n res[key] = value[0];\n }\n }\n }\n return res;\n}\n\nlet DOCUMENT = undefined;\nfunction setDocument(document) {\n DOCUMENT = document;\n}\nfunction getDocument() {\n if (DOCUMENT !== undefined) {\n return DOCUMENT;\n } else if (typeof document !== 'undefined') {\n return document;\n }\n throw new RuntimeError(210, (typeof ngDevMode === 'undefined' || ngDevMode) && `The document object is not available in this context. Make sure the DOCUMENT injection token is provided.`);\n}\n\nconst REFERENCE_NODE_HOST = 'h';\nconst REFERENCE_NODE_BODY = 'b';\nconst NODE_NAVIGATION_STEP_FIRST_CHILD = 'f';\nconst NODE_NAVIGATION_STEP_NEXT_SIBLING = 'n';\nconst ELEMENT_CONTAINERS = 'e';\nconst TEMPLATES = 't';\nconst CONTAINERS = 'c';\nconst MULTIPLIER = 'x';\nconst NUM_ROOT_NODES = 'r';\nconst TEMPLATE_ID = 'i';\nconst NODES = 'n';\nconst DISCONNECTED_NODES = 'd';\nconst I18N_DATA = 'l';\nconst DEFER_BLOCK_ID = 'di';\nconst DEFER_BLOCK_STATE$1 = 's';\nconst DEFER_PARENT_BLOCK_ID = 'p';\nconst DEFER_HYDRATE_TRIGGERS = 't';\n\nconst IS_HYDRATION_DOM_REUSE_ENABLED = /*#__PURE__*/ new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'IS_HYDRATION_DOM_REUSE_ENABLED' : '');\nconst PRESERVE_HOST_CONTENT_DEFAULT = false;\nconst PRESERVE_HOST_CONTENT = /*#__PURE__*/ new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'PRESERVE_HOST_CONTENT' : '', {\n factory: () => PRESERVE_HOST_CONTENT_DEFAULT\n});\nconst IS_I18N_HYDRATION_ENABLED = /*#__PURE__*/ new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'IS_I18N_HYDRATION_ENABLED' : '');\nconst IS_EVENT_REPLAY_ENABLED = /*#__PURE__*/ new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'IS_EVENT_REPLAY_ENABLED' : '');\nconst EVENT_REPLAY_ENABLED_DEFAULT = false;\nconst EVENT_REPLAY_QUEUE = /*#__PURE__*/ new InjectionToken(typeof ngDevMode !== 'undefined' && ngDevMode ? 'EVENT_REPLAY_QUEUE' : '', {\n factory: () => []\n});\nconst IS_INCREMENTAL_HYDRATION_ENABLED = /*#__PURE__*/ new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'IS_INCREMENTAL_HYDRATION_ENABLED' : '');\nconst JSACTION_BLOCK_ELEMENT_MAP = /*#__PURE__*/ new InjectionToken(typeof ngDevMode !== 'undefined' && ngDevMode ? 'JSACTION_BLOCK_ELEMENT_MAP' : '', {\n factory: () => new Map()\n});\nconst IS_ENABLED_BLOCKING_INITIAL_NAVIGATION = /*#__PURE__*/ new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'IS_ENABLED_BLOCKING_INITIAL_NAVIGATION' : '');\n\nconst eventListenerOptions = {\n passive: true,\n capture: true\n};\nconst hoverTriggers = /*#__PURE__*/ new WeakMap();\nconst interactionTriggers = /*#__PURE__*/ new WeakMap();\nconst viewportTriggers = /*#__PURE__*/ new WeakMap();\nconst interactionEventNames = ['click', 'keydown'];\nconst hoverEventNames = ['mouseenter', 'mouseover', 'focusin'];\nconst intersectionObservers = /*#__PURE__*/ new Map();\nclass DeferEventEntry {\n callbacks = new Set();\n listener = () => {\n for (const callback of this.callbacks) {\n callback();\n }\n };\n}\nfunction onInteraction(trigger, callback) {\n let entry = interactionTriggers.get(trigger);\n if (!entry) {\n entry = new DeferEventEntry();\n interactionTriggers.set(trigger, entry);\n for (const name of interactionEventNames) {\n trigger.addEventListener(name, entry.listener, eventListenerOptions);\n }\n }\n entry.callbacks.add(callback);\n return () => {\n const {\n callbacks,\n listener\n } = entry;\n callbacks.delete(callback);\n if (callbacks.size === 0) {\n interactionTriggers.delete(trigger);\n for (const name of interactionEventNames) {\n trigger.removeEventListener(name, listener, eventListenerOptions);\n }\n }\n };\n}\nfunction onHover(trigger, callback) {\n let entry = hoverTriggers.get(trigger);\n if (!entry) {\n entry = new DeferEventEntry();\n hoverTriggers.set(trigger, entry);\n for (const name of hoverEventNames) {\n trigger.addEventListener(name, entry.listener, eventListenerOptions);\n }\n }\n entry.callbacks.add(callback);\n return () => {\n const {\n callbacks,\n listener\n } = entry;\n callbacks.delete(callback);\n if (callbacks.size === 0) {\n for (const name of hoverEventNames) {\n trigger.removeEventListener(name, listener, eventListenerOptions);\n }\n hoverTriggers.delete(trigger);\n }\n };\n}\nfunction createIntersectionObserver(options) {\n const key = getIntersectionObserverKey(options);\n return new IntersectionObserver(entries => {\n for (const current of entries) {\n if (current.isIntersecting && viewportTriggers.has(current.target)) {\n viewportTriggers.get(current.target)?.get(key)?.listener();\n }\n }\n }, options);\n}\nfunction onViewport(trigger, callback, observerFactoryFn, options) {\n const key = getIntersectionObserverKey(options);\n let entry = viewportTriggers.get(trigger)?.get(key);\n if (!intersectionObservers.has(key)) {\n intersectionObservers.set(key, {\n observer: observerFactoryFn(options),\n count: 0\n });\n }\n const config = intersectionObservers.get(key);\n if (!entry) {\n entry = new DeferEventEntry();\n config.observer.observe(trigger);\n let triggerConfig = viewportTriggers.get(trigger);\n if (triggerConfig) {\n triggerConfig.set(key, entry);\n } else {\n triggerConfig = new Map();\n viewportTriggers.set(trigger, triggerConfig);\n }\n triggerConfig.set(key, entry);\n config.count++;\n }\n entry.callbacks.add(callback);\n return () => {\n if (!viewportTriggers.get(trigger)?.has(key)) {\n return;\n }\n entry.callbacks.delete(callback);\n if (entry.callbacks.size === 0) {\n config.observer.unobserve(trigger);\n config.count--;\n const triggerConfig = viewportTriggers.get(trigger);\n if (triggerConfig) {\n triggerConfig.delete(key);\n if (triggerConfig.size === 0) {\n viewportTriggers.delete(trigger);\n }\n }\n }\n if (config.count === 0) {\n config.observer.disconnect();\n intersectionObservers.delete(key);\n }\n };\n}\nfunction getIntersectionObserverKey(options) {\n if (!options) {\n return '';\n }\n return `${options.rootMargin}/${typeof options.threshold === 'number' ? options.threshold : options.threshold?.join('\\n')}`;\n}\n\nconst DEFER_BLOCK_SSR_ID_ATTRIBUTE = 'ngb';\nfunction setJSActionAttributes(nativeElement, eventTypes, parentDeferBlockId = null) {\n if (eventTypes.length === 0 || nativeElement.nodeType !== Node.ELEMENT_NODE) {\n return;\n }\n const existingAttr = nativeElement.getAttribute(Attribute$1.JSACTION);\n const parts = eventTypes.reduce((prev, curr) => {\n return (existingAttr?.indexOf(curr) ?? -1) === -1 ? prev + curr + ':;' : prev;\n }, '');\n nativeElement.setAttribute(Attribute$1.JSACTION, `${existingAttr ?? ''}${parts}`);\n const blockName = parentDeferBlockId ?? '';\n if (blockName !== '' && parts.length > 0) {\n nativeElement.setAttribute(DEFER_BLOCK_SSR_ID_ATTRIBUTE, blockName);\n }\n}\nconst sharedStashFunction = (rEl, eventType, listenerFn) => {\n const el = rEl;\n const eventListenerMap = el.__jsaction_fns ?? new Map();\n const eventListeners = eventListenerMap.get(eventType) ?? [];\n eventListeners.push(listenerFn);\n eventListenerMap.set(eventType, eventListeners);\n el.__jsaction_fns = eventListenerMap;\n};\nconst sharedMapFunction = (rEl, jsActionMap) => {\n const el = rEl;\n let blockName = el.getAttribute(DEFER_BLOCK_SSR_ID_ATTRIBUTE) ?? '';\n const blockSet = jsActionMap.get(blockName) ?? new Set();\n if (!blockSet.has(el)) {\n blockSet.add(el);\n }\n jsActionMap.set(blockName, blockSet);\n};\nfunction removeListenersFromBlocks(blockNames, jsActionMap) {\n if (blockNames.length > 0) {\n let blockList = [];\n for (let blockName of blockNames) {\n if (jsActionMap.has(blockName)) {\n blockList = [...blockList, ...jsActionMap.get(blockName)];\n }\n }\n const replayList = new Set(blockList);\n replayList.forEach(removeListeners);\n }\n}\nconst removeListeners = el => {\n el.removeAttribute(Attribute$1.JSACTION);\n el.removeAttribute(DEFER_BLOCK_SSR_ID_ATTRIBUTE);\n el.__jsaction_fns = undefined;\n};\nconst JSACTION_EVENT_CONTRACT = /*#__PURE__*/ new InjectionToken(typeof ngDevMode !== 'undefined' && ngDevMode ? 'EVENT_CONTRACT_DETAILS' : '', {\n factory: () => ({})\n});\nconst handledEventElements = /*#__PURE__*/ new WeakMap();\nfunction markEventHandledForElement(event, element) {\n if (event == null || typeof event !== 'object') return;\n let elements = handledEventElements.get(event);\n if (!elements) {\n elements = new WeakSet();\n handledEventElements.set(event, elements);\n }\n elements.add(element);\n}\nfunction invokeListeners(event, currentTarget) {\n const handlerFns = currentTarget?.__jsaction_fns?.get(event.type);\n if (!handlerFns || !currentTarget?.isConnected) {\n return;\n }\n if (currentTarget && handledEventElements.get(event)?.has(currentTarget)) {\n return;\n }\n for (const handler of handlerFns) {\n handler(event);\n }\n}\nconst stashEventListeners = /*#__PURE__*/ new Map();\nfunction setStashFn(appId, fn) {\n stashEventListeners.set(appId, fn);\n return () => stashEventListeners.delete(appId);\n}\nlet isStashEventListenerImplEnabled = false;\nlet _stashEventListenerImpl = (lView, target, eventName, wrappedListener) => {};\nfunction stashEventListenerImpl(lView, target, eventName, wrappedListener) {\n _stashEventListenerImpl(lView, target, eventName, wrappedListener);\n}\nfunction enableStashEventListenerImpl() {\n if (!isStashEventListenerImplEnabled) {\n _stashEventListenerImpl = (lView, target, eventName, wrappedListener) => {\n const appId = lView[INJECTOR].get(APP_ID);\n const stashEventListener = stashEventListeners.get(appId);\n stashEventListener?.(target, eventName, wrappedListener);\n };\n isStashEventListenerImplEnabled = true;\n }\n}\n\nconst DEHYDRATED_BLOCK_REGISTRY = /*#__PURE__*/ new InjectionToken(typeof ngDevMode !== 'undefined' && ngDevMode ? 'DEHYDRATED_BLOCK_REGISTRY' : '');\nlet DehydratedBlockRegistry = /*#__PURE__*/ (() => {\nclass DehydratedBlockRegistry {\n registry = new Map();\n cleanupFns = new Map();\n jsActionMap = inject(JSACTION_BLOCK_ELEMENT_MAP);\n contract = inject(JSACTION_EVENT_CONTRACT);\n add(blockId, info) {\n this.registry.set(blockId, info);\n if (this.awaitingCallbacks.has(blockId)) {\n const awaitingCallbacks = this.awaitingCallbacks.get(blockId);\n for (const cb of awaitingCallbacks) {\n cb();\n }\n }\n }\n get(blockId) {\n return this.registry.get(blockId) ?? null;\n }\n has(blockId) {\n return this.registry.has(blockId);\n }\n cleanup(hydratedBlocks) {\n removeListenersFromBlocks(hydratedBlocks, this.jsActionMap);\n for (let blockId of hydratedBlocks) {\n this.registry.delete(blockId);\n this.jsActionMap.delete(blockId);\n this.invokeTriggerCleanupFns(blockId);\n this.hydrating.delete(blockId);\n this.awaitingCallbacks.delete(blockId);\n }\n if (this.size === 0) {\n this.contract.instance?.cleanUp();\n }\n }\n get size() {\n return this.registry.size;\n }\n addCleanupFn(blockId, fn) {\n let cleanupFunctions = [];\n if (this.cleanupFns.has(blockId)) {\n cleanupFunctions = this.cleanupFns.get(blockId);\n }\n cleanupFunctions.push(fn);\n this.cleanupFns.set(blockId, cleanupFunctions);\n }\n invokeTriggerCleanupFns(blockId) {\n const fns = this.cleanupFns.get(blockId) ?? [];\n for (let fn of fns) {\n fn();\n }\n this.cleanupFns.delete(blockId);\n }\n hydrating = new Map();\n awaitingCallbacks = new Map();\n awaitParentBlock(topmostParentBlock, callback) {\n const parentBlockAwaitCallbacks = this.awaitingCallbacks.get(topmostParentBlock) ?? [];\n parentBlockAwaitCallbacks.push(callback);\n this.awaitingCallbacks.set(topmostParentBlock, parentBlockAwaitCallbacks);\n }\n static ษตprov =\n /* @__PURE__ */\n __defineInjectable({\n token: DehydratedBlockRegistry,\n providedIn: null,\n factory: () => new DehydratedBlockRegistry()\n });\n}\nreturn DehydratedBlockRegistry;\n})();\n\nfunction isDetachedByI18n(tNode) {\n return (tNode.flags & 32) === 32;\n}\n\nconst TRANSFER_STATE_TOKEN_ID = '__nghData__';\nconst NGH_DATA_KEY = /*#__PURE__*/ makeStateKey(TRANSFER_STATE_TOKEN_ID);\nconst TRANSFER_STATE_DEFER_BLOCKS_INFO = '__nghDeferData__';\nconst NGH_DEFER_BLOCKS_KEY = /*#__PURE__*/ makeStateKey(TRANSFER_STATE_DEFER_BLOCKS_INFO);\nfunction isInternalHydrationTransferStateKey(key) {\n return key === TRANSFER_STATE_TOKEN_ID || key === TRANSFER_STATE_DEFER_BLOCKS_INFO;\n}\nconst NGH_ATTR_NAME = 'ngh';\nconst SSR_CONTENT_INTEGRITY_MARKER = 'nghm';\nlet _retrieveHydrationInfoImpl = () => null;\nfunction retrieveHydrationInfoImpl(rNode, injector, isRootView = false) {\n let nghAttrValue = rNode.getAttribute(NGH_ATTR_NAME);\n if (nghAttrValue == null) return null;\n const [componentViewNgh, rootViewNgh] = nghAttrValue.split('|');\n nghAttrValue = isRootView ? rootViewNgh : componentViewNgh;\n if (!nghAttrValue) return null;\n const rootNgh = rootViewNgh ? `|${rootViewNgh}` : '';\n const remainingNgh = isRootView ? componentViewNgh : rootNgh;\n let data = {};\n if (nghAttrValue !== '') {\n const transferState = injector.get(TransferState, null, {\n optional: true\n });\n if (transferState !== null) {\n const nghData = transferState.get(NGH_DATA_KEY, []);\n data = nghData[Number(nghAttrValue)];\n ngDevMode && assertDefined(data, 'Unable to retrieve hydration info from the TransferState.');\n }\n }\n const dehydratedView = {\n data,\n firstChild: rNode.firstChild ?? null\n };\n if (isRootView) {\n dehydratedView.firstChild = rNode;\n setSegmentHead(dehydratedView, 0, rNode.nextSibling);\n }\n if (remainingNgh) {\n rNode.setAttribute(NGH_ATTR_NAME, remainingNgh);\n } else {\n rNode.removeAttribute(NGH_ATTR_NAME);\n }\n ngDevMode && markRNodeAsClaimedByHydration(rNode, false);\n ngDevMode && ngDevMode.hydratedComponents++;\n return dehydratedView;\n}\nfunction enableRetrieveHydrationInfoImpl() {\n _retrieveHydrationInfoImpl = retrieveHydrationInfoImpl;\n}\nfunction retrieveHydrationInfo(rNode, injector, isRootView = false) {\n return _retrieveHydrationInfoImpl(rNode, injector, isRootView);\n}\nfunction getLNodeForHydration(viewRef) {\n let lView = viewRef._lView;\n const tView = lView[TVIEW$1];\n if (tView.type === 2) {\n return null;\n }\n if (isRootView(lView)) {\n lView = lView[HEADER_OFFSET];\n }\n return lView;\n}\nfunction getTextNodeContent(node) {\n return node.textContent?.replace(/\\s/gm, '');\n}\nfunction processTextNodeMarkersBeforeHydration(node) {\n const doc = getDocument();\n const commentNodesIterator = doc.createNodeIterator(node, NodeFilter.SHOW_COMMENT, {\n acceptNode(node) {\n const content = getTextNodeContent(node);\n const isTextNodeMarker = content === \"ngetn\" || content === \"ngtns\";\n return isTextNodeMarker ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_REJECT;\n }\n });\n let currentNode;\n const nodes = [];\n while (currentNode = commentNodesIterator.nextNode()) {\n nodes.push(currentNode);\n }\n for (const node of nodes) {\n if (node.textContent === \"ngetn\") {\n node.replaceWith(doc.createTextNode(''));\n } else {\n node.remove();\n }\n }\n}\nvar HydrationStatus = /*#__PURE__*/ (function (HydrationStatus) {\n HydrationStatus[\"Hydrated\"] = \"hydrated\";\n HydrationStatus[\"Skipped\"] = \"skipped\";\n HydrationStatus[\"Mismatched\"] = \"mismatched\";\n; return HydrationStatus;})(HydrationStatus || {});\n\nconst HYDRATION_INFO_KEY = '__ngDebugHydrationInfo__';\nfunction patchHydrationInfo(node, info) {\n node[HYDRATION_INFO_KEY] = info;\n}\nfunction readHydrationInfo(node) {\n return node[HYDRATION_INFO_KEY] ?? null;\n}\nfunction markRNodeAsClaimedByHydration(node, checkIfAlreadyClaimed = true) {\n if (!ngDevMode) {\n throw new Error('Calling `markRNodeAsClaimedByHydration` in prod mode ' + 'is not supported and likely a mistake.');\n }\n if (checkIfAlreadyClaimed && isRNodeClaimedForHydration(node)) {\n throw new Error('Trying to claim a node, which was claimed already.');\n }\n patchHydrationInfo(node, {\n status: HydrationStatus.Hydrated\n });\n ngDevMode.hydratedNodes++;\n}\nfunction markRNodeAsSkippedByHydration(node) {\n if (!ngDevMode) {\n throw new Error('Calling `markRNodeAsSkippedByHydration` in prod mode ' + 'is not supported and likely a mistake.');\n }\n patchHydrationInfo(node, {\n status: HydrationStatus.Skipped\n });\n ngDevMode.componentsSkippedHydration++;\n}\nfunction countBlocksSkippedByHydration(injector) {\n const transferState = injector.get(TransferState);\n const nghDeferData = transferState.get(NGH_DEFER_BLOCKS_KEY, {});\n if (ngDevMode) {\n ngDevMode.deferBlocksWithIncrementalHydration = Object.keys(nghDeferData).length;\n }\n}\nfunction markRNodeAsHavingHydrationMismatch(node, expectedNodeDetails = null, actualNodeDetails = null) {\n if (!ngDevMode) {\n throw new Error('Calling `markRNodeAsMismatchedByHydration` in prod mode ' + 'is not supported and likely a mistake.');\n }\n while (node && !getComponent(node)) {\n node = node?.parentNode;\n }\n if (node) {\n patchHydrationInfo(node, {\n status: HydrationStatus.Mismatched,\n expectedNodeDetails,\n actualNodeDetails\n });\n }\n}\nfunction isRNodeClaimedForHydration(node) {\n return readHydrationInfo(node)?.status === HydrationStatus.Hydrated;\n}\nfunction setSegmentHead(hydrationInfo, index, node) {\n hydrationInfo.segmentHeads ??= {};\n hydrationInfo.segmentHeads[index] = node;\n}\nfunction getSegmentHead(hydrationInfo, index) {\n return hydrationInfo.segmentHeads?.[index] ?? null;\n}\nfunction isIncrementalHydrationEnabled(injector) {\n return injector.get(IS_INCREMENTAL_HYDRATION_ENABLED, false, {\n optional: true\n });\n}\nlet incrementalHydrationEnabledWarned = false;\nfunction resetIncrementalHydrationEnabledWarnedForTests() {\n incrementalHydrationEnabledWarned = false;\n}\nfunction warnIncrementalHydrationNotConfigured() {\n if (!incrementalHydrationEnabledWarned) {\n incrementalHydrationEnabledWarned = true;\n console.warn(formatRuntimeError(508, 'Angular has detected that some `@defer` blocks use `hydrate` triggers, ' + 'but incremental hydration was not enabled. Incremental hydration is enabled by default ' + 'with `provideClientHydration()`. Make sure `provideClientHydration()` is included in ' + 'your application config and that you have not opted out using `withNoIncrementalHydration()`.'));\n }\n}\nfunction assertSsrIdDefined(ssrUniqueId) {\n assertDefined(ssrUniqueId, 'Internal error: expecting an SSR id for a defer block that should be hydrated, but the id is not present');\n}\nfunction getNgContainerSize(hydrationInfo, index) {\n const data = hydrationInfo.data;\n let size = data[ELEMENT_CONTAINERS]?.[index] ?? null;\n if (size === null && data[CONTAINERS]?.[index]) {\n size = calcSerializedContainerSize(hydrationInfo, index);\n }\n return size;\n}\nfunction isSerializedElementContainer(hydrationInfo, index) {\n return hydrationInfo.data[ELEMENT_CONTAINERS]?.[index] !== undefined;\n}\nfunction getSerializedContainerViews(hydrationInfo, index) {\n return hydrationInfo.data[CONTAINERS]?.[index] ?? null;\n}\nfunction calcSerializedContainerSize(hydrationInfo, index) {\n const views = getSerializedContainerViews(hydrationInfo, index) ?? [];\n let numNodes = 0;\n for (let view of views) {\n numNodes += view[NUM_ROOT_NODES] * (view[MULTIPLIER] ?? 1);\n }\n return numNodes;\n}\nfunction initDisconnectedNodes(hydrationInfo) {\n if (typeof hydrationInfo.disconnectedNodes === 'undefined') {\n const nodeIds = hydrationInfo.data[DISCONNECTED_NODES];\n hydrationInfo.disconnectedNodes = nodeIds ? new Set(nodeIds) : null;\n }\n return hydrationInfo.disconnectedNodes;\n}\nfunction isDisconnectedNode$1(hydrationInfo, index) {\n if (typeof hydrationInfo.disconnectedNodes === 'undefined') {\n const nodeIds = hydrationInfo.data[DISCONNECTED_NODES];\n hydrationInfo.disconnectedNodes = nodeIds ? new Set(nodeIds) : null;\n }\n return !!initDisconnectedNodes(hydrationInfo)?.has(index);\n}\nfunction canHydrateNode(lView, tNode) {\n const hydrationInfo = lView[HYDRATION];\n return hydrationInfo !== null && !isInSkipHydrationBlock$1() && !isDetachedByI18n(tNode) && !isDisconnectedNode$1(hydrationInfo, tNode.index - HEADER_OFFSET);\n}\nfunction processTextNodeBeforeSerialization(context, node) {\n const el = node;\n const corruptedTextNodes = context.corruptedTextNodes;\n if (el.textContent === '') {\n corruptedTextNodes.set(el, \"ngetn\");\n } else if (el.nextSibling?.nodeType === Node.TEXT_NODE) {\n corruptedTextNodes.set(el, \"ngtns\");\n }\n}\nfunction convertHydrateTriggersToJsAction(triggers) {\n let actionList = [];\n if (triggers !== null) {\n if (triggers.has(4)) {\n actionList.push(...hoverEventNames);\n }\n if (triggers.has(3)) {\n actionList.push(...interactionEventNames);\n }\n }\n return actionList;\n}\nfunction getParentBlockHydrationQueue(deferBlockId, injector) {\n const dehydratedBlockRegistry = injector.get(DEHYDRATED_BLOCK_REGISTRY);\n const transferState = injector.get(TransferState);\n const deferBlockParents = transferState.get(NGH_DEFER_BLOCKS_KEY, {});\n let isTopMostDeferBlock = false;\n let currentBlockId = deferBlockId;\n let parentBlockPromise = null;\n const hydrationQueue = [];\n while (!isTopMostDeferBlock && currentBlockId) {\n ngDevMode && assertEqual(hydrationQueue.indexOf(currentBlockId), -1, 'Internal error: defer block hierarchy has a cycle.');\n isTopMostDeferBlock = dehydratedBlockRegistry.has(currentBlockId);\n const hydratingParentBlock = dehydratedBlockRegistry.hydrating.get(currentBlockId);\n if (parentBlockPromise === null && hydratingParentBlock != null) {\n parentBlockPromise = hydratingParentBlock.promise;\n break;\n }\n hydrationQueue.unshift(currentBlockId);\n currentBlockId = deferBlockParents[currentBlockId][DEFER_PARENT_BLOCK_ID];\n }\n return {\n parentBlockPromise,\n hydrationQueue\n };\n}\nfunction gatherDeferBlocksByJSActionAttribute(doc) {\n const jsactionNodes = doc.body.querySelectorAll('[jsaction]');\n const blockMap = new Set();\n const eventTypes = [hoverEventNames.join(':;'), interactionEventNames.join(':;')].join('|');\n for (let node of jsactionNodes) {\n const attr = node.getAttribute('jsaction');\n const blockId = node.getAttribute('ngb');\n if (attr?.match(eventTypes) && blockId !== null) {\n blockMap.add(node);\n }\n }\n return blockMap;\n}\nfunction appendDeferBlocksToJSActionMap(doc, injector) {\n const blockMap = gatherDeferBlocksByJSActionAttribute(doc);\n const jsActionMap = injector.get(JSACTION_BLOCK_ELEMENT_MAP);\n for (let rNode of blockMap) {\n sharedMapFunction(rNode, jsActionMap);\n }\n}\nlet _retrieveDeferBlockDataImpl = () => {\n return {};\n};\nfunction retrieveDeferBlockDataImpl(injector) {\n const transferState = injector.get(TransferState, null, {\n optional: true\n });\n if (transferState !== null) {\n const nghDeferData = transferState.get(NGH_DEFER_BLOCKS_KEY, {});\n ngDevMode && assertDefined(nghDeferData, 'Unable to retrieve defer block info from the TransferState.');\n return nghDeferData;\n }\n return {};\n}\nfunction enableRetrieveDeferBlockDataImpl() {\n _retrieveDeferBlockDataImpl = retrieveDeferBlockDataImpl;\n}\nfunction retrieveDeferBlockData(injector) {\n return _retrieveDeferBlockDataImpl(injector);\n}\nfunction isTimerTrigger(triggerInfo) {\n return typeof triggerInfo === 'object' && triggerInfo.trigger === 5;\n}\nfunction getHydrateTimerTrigger(blockData) {\n const trigger = blockData[DEFER_HYDRATE_TRIGGERS]?.find(t => isTimerTrigger(t));\n return trigger?.delay ?? null;\n}\nfunction getHydrateViewportTrigger(blockData) {\n const details = blockData[DEFER_HYDRATE_TRIGGERS];\n if (details) {\n for (const current of details) {\n if (current === 2) {\n return true;\n } else if (typeof current === 'object' && current.trigger === 2) {\n return current.intersectionObserverOptions || true;\n }\n }\n }\n return null;\n}\nfunction hasHydrateTrigger(blockData, trigger) {\n return blockData[DEFER_HYDRATE_TRIGGERS]?.includes(trigger) ?? false;\n}\nfunction createBlockSummary(blockInfo) {\n return {\n data: blockInfo,\n hydrate: {\n idle: hasHydrateTrigger(blockInfo, 0),\n immediate: hasHydrateTrigger(blockInfo, 1),\n timer: getHydrateTimerTrigger(blockInfo),\n viewport: getHydrateViewportTrigger(blockInfo)\n }\n };\n}\nfunction processBlockData(injector) {\n const blockData = retrieveDeferBlockData(injector);\n let blockDetails = new Map();\n for (let blockId in blockData) {\n blockDetails.set(blockId, createBlockSummary(blockData[blockId]));\n }\n return blockDetails;\n}\nfunction isSsrContentsIntegrity(node) {\n return !!node && node.nodeType === Node.COMMENT_NODE && node.textContent?.trim() === SSR_CONTENT_INTEGRITY_MARKER;\n}\nfunction skipTextNodes(node) {\n while (node && node.nodeType === Node.TEXT_NODE) {\n node = node.previousSibling;\n }\n return node;\n}\nfunction verifySsrContentsIntegrity(doc) {\n for (const node of doc.body.childNodes) {\n if (isSsrContentsIntegrity(node)) {\n return;\n }\n }\n const beforeBody = skipTextNodes(doc.body.previousSibling);\n if (isSsrContentsIntegrity(beforeBody)) {\n return;\n }\n let endOfHead = skipTextNodes(doc.head.lastChild);\n if (isSsrContentsIntegrity(endOfHead)) {\n return;\n }\n throw new RuntimeError(-507, typeof ngDevMode !== 'undefined' && ngDevMode && 'Angular hydration logic detected that HTML content of this page was modified after it ' + 'was produced during server side rendering. Make sure that there are no optimizations ' + 'that remove comment nodes from HTML enabled on your CDN. Angular hydration ' + 'relies on HTML produced by the server, including whitespaces and comment nodes.');\n}\n\nfunction refreshContentQueries(tView, lView) {\n const contentQueries = tView.contentQueries;\n if (contentQueries !== null) {\n const prevConsumer = setActiveConsumer(null);\n try {\n for (let i = 0; i < contentQueries.length; i += 2) {\n const queryStartIdx = contentQueries[i];\n const directiveDefIdx = contentQueries[i + 1];\n if (directiveDefIdx !== -1) {\n const directiveDef = tView.data[directiveDefIdx];\n ngDevMode && assertDefined(directiveDef, 'DirectiveDef not found.');\n ngDevMode && assertDefined(directiveDef.contentQueries, 'contentQueries function should be defined');\n setCurrentQueryIndex(queryStartIdx);\n directiveDef.contentQueries(2, lView[directiveDefIdx], directiveDefIdx);\n }\n }\n } finally {\n setActiveConsumer(prevConsumer);\n }\n }\n}\nfunction executeViewQueryFn(flags, viewQueryFn, component) {\n ngDevMode && assertDefined(viewQueryFn, 'View queries function to execute must be defined.');\n setCurrentQueryIndex(0);\n const prevConsumer = setActiveConsumer(null);\n try {\n viewQueryFn(flags, component);\n } finally {\n setActiveConsumer(prevConsumer);\n }\n}\nfunction executeContentQueries(tView, tNode, lView) {\n if (isContentQueryHost(tNode)) {\n const prevConsumer = setActiveConsumer(null);\n try {\n const start = tNode.directiveStart;\n const end = tNode.directiveEnd;\n for (let directiveIndex = start; directiveIndex < end; directiveIndex++) {\n const def = tView.data[directiveIndex];\n if (def.contentQueries) {\n const directiveInstance = lView[directiveIndex];\n ngDevMode && assertDefined(directiveIndex, 'Incorrect reference to a directive defining a content query');\n def.contentQueries(1, directiveInstance, directiveIndex);\n }\n }\n } finally {\n setActiveConsumer(prevConsumer);\n }\n }\n}\n\nvar ViewEncapsulation = /*#__PURE__*/ (function (ViewEncapsulation) {\n ViewEncapsulation[ViewEncapsulation[\"Emulated\"] = 0] = \"Emulated\";\n ViewEncapsulation[ViewEncapsulation[\"None\"] = 2] = \"None\";\n ViewEncapsulation[ViewEncapsulation[\"ShadowDom\"] = 3] = \"ShadowDom\";\n ViewEncapsulation[ViewEncapsulation[\"ExperimentalIsolatedShadowDom\"] = 4] = \"ExperimentalIsolatedShadowDom\";\n; return ViewEncapsulation;})(ViewEncapsulation || {});\n\n\nclass SafeValueImpl {\n changingThisBreaksApplicationSecurity;\n constructor(changingThisBreaksApplicationSecurity) {\n this.changingThisBreaksApplicationSecurity = changingThisBreaksApplicationSecurity;\n }\n toString() {\n return `SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity}` + (ngDevMode ? ` (see ${XSS_SECURITY_URL})` : '');\n }\n}\nclass SafeHtmlImpl extends SafeValueImpl {\n getTypeName() {\n return \"HTML\";\n }\n}\nclass SafeStyleImpl extends SafeValueImpl {\n getTypeName() {\n return \"Style\";\n }\n}\nclass SafeScriptImpl extends SafeValueImpl {\n getTypeName() {\n return \"Script\";\n }\n}\nclass SafeUrlImpl extends SafeValueImpl {\n getTypeName() {\n return \"URL\";\n }\n}\nclass SafeResourceUrlImpl extends SafeValueImpl {\n getTypeName() {\n return \"ResourceURL\";\n }\n}\nfunction unwrapSafeValue(value) {\n return value instanceof SafeValueImpl ? value.changingThisBreaksApplicationSecurity : value;\n}\nfunction allowSanitizationBypassAndThrow(value, type) {\n const actualType = getSanitizationBypassType(value);\n if (actualType != null && actualType !== type) {\n if (actualType === \"ResourceURL\" && type === \"URL\") return true;\n throw new Error(`Required a safe ${type}, got a ${actualType} (see ${XSS_SECURITY_URL})`);\n }\n return actualType === type;\n}\nfunction getSanitizationBypassType(value) {\n return value instanceof SafeValueImpl && value.getTypeName() || null;\n}\nfunction bypassSanitizationTrustHtml(trustedHtml) {\n return new SafeHtmlImpl(trustedHtml);\n}\nfunction bypassSanitizationTrustStyle(trustedStyle) {\n return new SafeStyleImpl(trustedStyle);\n}\nfunction bypassSanitizationTrustScript(trustedScript) {\n return new SafeScriptImpl(trustedScript);\n}\nfunction bypassSanitizationTrustUrl(trustedUrl) {\n return new SafeUrlImpl(trustedUrl);\n}\nfunction bypassSanitizationTrustResourceUrl(trustedResourceUrl) {\n return new SafeResourceUrlImpl(trustedResourceUrl);\n}\n\nconst CUSTOM_ELEMENTS_SCHEMA = {\n name: 'custom-elements'\n};\nconst NO_ERRORS_SCHEMA = {\n name: 'no-errors-schema'\n};\n\nlet shouldThrowErrorOnUnknownElement = false;\nfunction ษตsetUnknownElementStrictMode(shouldThrow) {\n shouldThrowErrorOnUnknownElement = shouldThrow;\n}\nfunction ษตgetUnknownElementStrictMode() {\n return shouldThrowErrorOnUnknownElement;\n}\nlet shouldThrowErrorOnUnknownProperty = false;\nfunction ษตsetUnknownPropertyStrictMode(shouldThrow) {\n shouldThrowErrorOnUnknownProperty = shouldThrow;\n}\nfunction ษตgetUnknownPropertyStrictMode() {\n return shouldThrowErrorOnUnknownProperty;\n}\nfunction validateElementIsKnown(lView, tNode) {\n const tView = lView[TVIEW$1];\n if (tView.schemas === null) return;\n const tagName = tNode.value;\n if (!isDirectiveHost(tNode) && tagName !== null) {\n const isUnknown = typeof HTMLUnknownElement !== 'undefined' && HTMLUnknownElement && getNativeByTNode(tNode, lView) instanceof HTMLUnknownElement || typeof customElements !== 'undefined' && tagName.indexOf('-') > -1 && !customElements.get(tagName);\n if (isUnknown && !matchingSchemas(tView.schemas, tagName)) {\n const isHostStandalone = isHostComponentStandalone(lView);\n const templateLocation = getTemplateLocationDetails(lView);\n const schemas = `'${isHostStandalone ? '@Component' : '@NgModule'}.schemas'`;\n let message = `'${tagName}' is not a known element${templateLocation}:\\n`;\n message += `1. If '${tagName}' is an Angular component, then verify that it is ${isHostStandalone ? \"included in the '@Component.imports' of this component\" : 'a part of an @NgModule where this component is declared'}.\\n`;\n if (tagName && tagName.indexOf('-') > -1) {\n message += `2. If '${tagName}' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the ${schemas} of this component to suppress this message.`;\n } else {\n message += `2. To allow any element add 'NO_ERRORS_SCHEMA' to the ${schemas} of this component.`;\n }\n if (shouldThrowErrorOnUnknownElement) {\n throw new RuntimeError(304, message);\n } else {\n console.error(formatRuntimeError(304, message));\n }\n }\n }\n}\nfunction isPropertyValid(element, propName, tagName, schemas) {\n if (schemas === null) return true;\n if (matchingSchemas(schemas, tagName) || propName in element || isAnimationProp(propName)) {\n return true;\n }\n return typeof Node === 'undefined' || Node === null || !(element instanceof Node);\n}\nfunction handleUnknownPropertyError(propName, tagName, nodeType, lView) {\n if (!tagName && nodeType === 4) {\n tagName = 'ng-template';\n }\n const isHostStandalone = isHostComponentStandalone(lView);\n const templateLocation = getTemplateLocationDetails(lView);\n let message = `Can't bind to '${propName}' since it isn't a known property of '${tagName}'${templateLocation}.`;\n const schemas = `'${isHostStandalone ? '@Component' : '@NgModule'}.schemas'`;\n const importLocation = isHostStandalone ? \"included in the '@Component.imports' of this component\" : 'a part of an @NgModule where this component is declared';\n if (KNOWN_CONTROL_FLOW_DIRECTIVES.has(propName)) {\n const correspondingImport = KNOWN_CONTROL_FLOW_DIRECTIVES.get(propName);\n message += `\\nIf the '${propName}' is an Angular control flow directive, ` + `please make sure that either the '${correspondingImport}' directive or the 'CommonModule' is ${importLocation}.`;\n } else {\n message += `\\n1. If '${tagName}' is an Angular component and it has the ` + `'${propName}' input, then verify that it is ${importLocation}.`;\n if (tagName && tagName.indexOf('-') > -1) {\n message += `\\n2. If '${tagName}' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' ` + `to the ${schemas} of this component to suppress this message.`;\n message += `\\n3. To allow any property add 'NO_ERRORS_SCHEMA' to ` + `the ${schemas} of this component.`;\n } else {\n message += `\\n2. To allow any property add 'NO_ERRORS_SCHEMA' to ` + `the ${schemas} of this component.`;\n }\n }\n reportUnknownPropertyError(message);\n}\nfunction reportUnknownPropertyError(message) {\n if (shouldThrowErrorOnUnknownProperty) {\n throw new RuntimeError(303, message);\n } else {\n console.error(formatRuntimeError(303, message));\n }\n}\nfunction getDeclarationComponentDef(lView) {\n !ngDevMode && throwError('Must never be called in production mode');\n const declarationLView = lView[DECLARATION_COMPONENT_VIEW];\n const context = declarationLView[CONTEXT];\n if (!context) return null;\n return context.constructor ? getComponentDef(context.constructor) : null;\n}\nfunction isHostComponentStandalone(lView) {\n !ngDevMode && throwError('Must never be called in production mode');\n const componentDef = getDeclarationComponentDef(lView);\n return !!componentDef?.standalone;\n}\nfunction getTemplateLocationDetails(lView) {\n !ngDevMode && throwError('Must never be called in production mode');\n const hostComponentDef = getDeclarationComponentDef(lView);\n const componentClassName = hostComponentDef?.type?.name;\n return componentClassName ? ` (used in the '${componentClassName}' component template)` : '';\n}\nconst KNOWN_CONTROL_FLOW_DIRECTIVES = /*#__PURE__*/ new Map([['ngIf', 'NgIf'], ['ngFor', 'NgFor'], ['ngSwitchCase', 'NgSwitchCase'], ['ngSwitchDefault', 'NgSwitchDefault']]);\nfunction matchingSchemas(schemas, tagName) {\n if (schemas !== null) {\n for (let i = 0; i < schemas.length; i++) {\n const schema = schemas[i];\n if (schema === NO_ERRORS_SCHEMA || schema === CUSTOM_ELEMENTS_SCHEMA && tagName && tagName.indexOf('-') > -1) {\n return true;\n }\n }\n }\n return false;\n}\n\nconst NAMESPACE_URIS = {\n 'http://www.w3.org/2000/svg': SVG_NAMESPACE,\n 'http://www.w3.org/1998/Math/MathML': MATH_ML_NAMESPACE\n};\n\nlet policy$1;\nfunction getPolicy$1() {\n if (policy$1 === undefined) {\n policy$1 = null;\n if (_global.trustedTypes) {\n try {\n policy$1 = _global.trustedTypes.createPolicy('angular', {\n createHTML: s => s,\n createScript: s => s,\n createScriptURL: s => s\n });\n } catch {}\n }\n }\n return policy$1;\n}\nfunction trustedHTMLFromString(html) {\n return getPolicy$1()?.createHTML(html) || html;\n}\nfunction trustedScriptURLFromString(url) {\n return getPolicy$1()?.createScriptURL(url) || url;\n}\n\nlet policy;\nfunction getPolicy() {\n if (policy === undefined) {\n policy = null;\n if (_global.trustedTypes) {\n try {\n policy = _global.trustedTypes.createPolicy('angular#unsafe-bypass', {\n createHTML: s => s,\n createScript: s => s,\n createScriptURL: s => s\n });\n } catch {}\n }\n }\n return policy;\n}\nfunction trustedHTMLFromStringBypass(html) {\n return getPolicy()?.createHTML(html) || html;\n}\nfunction trustedScriptFromStringBypass(script) {\n return getPolicy()?.createScript(script) || script;\n}\nfunction trustedScriptURLFromStringBypass(url) {\n return getPolicy()?.createScriptURL(url) || url;\n}\n\nfunction getInertBodyHelper(defaultDoc) {\n const inertDocumentHelper = new InertDocumentHelper(defaultDoc);\n return isDOMParserAvailable() ? new DOMParserHelper(inertDocumentHelper) : inertDocumentHelper;\n}\nclass DOMParserHelper {\n inertDocumentHelper;\n constructor(inertDocumentHelper) {\n this.inertDocumentHelper = inertDocumentHelper;\n }\n getInertBodyElement(html) {\n html = ' ' + html;\n try {\n const body = new window.DOMParser().parseFromString(trustedHTMLFromString(html), 'text/html').body;\n if (body === null) {\n return this.inertDocumentHelper.getInertBodyElement(html);\n }\n body.firstChild?.remove();\n return body;\n } catch {\n return null;\n }\n }\n}\nclass InertDocumentHelper {\n defaultDoc;\n inertDocument;\n constructor(defaultDoc) {\n this.defaultDoc = defaultDoc;\n this.inertDocument = this.defaultDoc.implementation.createHTMLDocument('sanitization-inert');\n }\n getInertBodyElement(html) {\n const templateEl = this.inertDocument.createElement('template');\n templateEl.innerHTML = trustedHTMLFromString(html);\n return templateEl;\n }\n}\nfunction isDOMParserAvailable() {\n try {\n return !!new window.DOMParser().parseFromString(trustedHTMLFromString(''), 'text/html');\n } catch {\n return false;\n }\n}\n\nconst SAFE_URL_PATTERN = /^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\\/?#]*(?:[\\/?#]|$))/i;\nfunction _sanitizeUrl(url) {\n url = String(url);\n if (url.match(SAFE_URL_PATTERN)) return url;\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n console.warn(`WARNING: sanitizing unsafe URL value ${url} (see ${XSS_SECURITY_URL})`);\n }\n return 'unsafe:' + url;\n}\n\nfunction tagSet(tags) {\n const res = Object.create(null);\n for (const t of tags.split(',')) res[t] = true;\n return res;\n}\nfunction merge(...sets) {\n const res = Object.create(null);\n for (const s of sets) {\n for (const v in s) {\n if (Object.hasOwn(s, v)) res[v] = true;\n }\n }\n return res;\n}\nconst VOID_ELEMENTS = /*#__PURE__*/ tagSet('area,br,col,hr,img,wbr');\nconst OPTIONAL_END_TAG_BLOCK_ELEMENTS = /*#__PURE__*/ tagSet('colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr');\nconst OPTIONAL_END_TAG_INLINE_ELEMENTS = /*#__PURE__*/ tagSet('rp,rt');\nconst OPTIONAL_END_TAG_ELEMENTS = /*#__PURE__*/ merge(OPTIONAL_END_TAG_INLINE_ELEMENTS, OPTIONAL_END_TAG_BLOCK_ELEMENTS);\nconst BLOCK_ELEMENTS = /*#__PURE__*/ merge(OPTIONAL_END_TAG_BLOCK_ELEMENTS, /*#__PURE__*/ tagSet('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'));\nconst INLINE_ELEMENTS = /*#__PURE__*/ merge(OPTIONAL_END_TAG_INLINE_ELEMENTS, /*#__PURE__*/ tagSet('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'));\nconst VALID_ELEMENTS = /*#__PURE__*/ merge(VOID_ELEMENTS, BLOCK_ELEMENTS, INLINE_ELEMENTS, OPTIONAL_END_TAG_ELEMENTS);\nconst URI_ATTRS = /*#__PURE__*/ tagSet('background,cite,href,itemtype,longdesc,poster,src,xlink:href');\nconst HTML_ATTRS = /*#__PURE__*/ tagSet('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');\nconst ARIA_ATTRS = /*#__PURE__*/ tagSet('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');\nconst VALID_ATTRS = /*#__PURE__*/ merge(URI_ATTRS, HTML_ATTRS, ARIA_ATTRS);\nconst SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS = /*#__PURE__*/ tagSet('script,style,template');\nclass SanitizingHtmlSerializer {\n sanitizedSomething = false;\n buf = [];\n sanitizeChildren(el) {\n let current = el.firstChild;\n let traverseContent = true;\n let parentNodes = [];\n while (current) {\n if (current.nodeType === Node.ELEMENT_NODE) {\n traverseContent = this.startElement(current);\n } else if (current.nodeType === Node.TEXT_NODE) {\n this.chars(current.nodeValue);\n } else {\n this.sanitizedSomething = true;\n }\n if (traverseContent && current.firstChild) {\n parentNodes.push(current);\n current = getFirstChild(current);\n continue;\n }\n while (current) {\n if (current.nodeType === Node.ELEMENT_NODE) {\n this.endElement(current);\n }\n let next = getNextSibling(current);\n if (next) {\n current = next;\n break;\n }\n current = parentNodes.pop();\n }\n }\n return this.buf.join('');\n }\n startElement(element) {\n const tagName = getNodeName(element).toLowerCase();\n if (!Object.hasOwn(VALID_ELEMENTS, tagName)) {\n this.sanitizedSomething = true;\n return !Object.hasOwn(SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS, tagName);\n }\n this.buf.push('<');\n this.buf.push(tagName);\n const elAttrs = element.attributes;\n for (let i = 0; i < elAttrs.length; i++) {\n const elAttr = elAttrs.item(i);\n const attrName = elAttr.name;\n const lower = attrName.toLowerCase();\n if (!Object.hasOwn(VALID_ATTRS, lower)) {\n this.sanitizedSomething = true;\n continue;\n }\n let value = elAttr.value;\n if (URI_ATTRS[lower]) value = _sanitizeUrl(value);\n this.buf.push(' ', attrName, '=\"', encodeEntities(value), '\"');\n }\n this.buf.push('>');\n return true;\n }\n endElement(current) {\n const tagName = getNodeName(current).toLowerCase();\n if (Object.hasOwn(VALID_ELEMENTS, tagName) && !Object.hasOwn(VOID_ELEMENTS, tagName)) {\n this.buf.push('');\n this.buf.push(tagName);\n this.buf.push('>');\n }\n }\n chars(chars) {\n this.buf.push(encodeEntities(chars));\n }\n}\nfunction isClobberedElement(parentNode, childNode) {\n return (parentNode.compareDocumentPosition(childNode) & Node.DOCUMENT_POSITION_CONTAINED_BY) !== Node.DOCUMENT_POSITION_CONTAINED_BY;\n}\nfunction getNextSibling(node) {\n const nextSibling = node.nextSibling;\n if (nextSibling && node !== nextSibling.previousSibling) {\n throw clobberedElementError(nextSibling);\n }\n return nextSibling;\n}\nfunction getFirstChild(node) {\n const firstChild = node.firstChild;\n if (firstChild && isClobberedElement(node, firstChild)) {\n throw clobberedElementError(firstChild);\n }\n return firstChild;\n}\nfunction getNodeName(node) {\n const nodeName = node.nodeName;\n return typeof nodeName === 'string' ? nodeName : 'FORM';\n}\nfunction clobberedElementError(node) {\n return new Error(`Failed to sanitize html because the element is clobbered: ${node.outerHTML}`);\n}\nconst SURROGATE_PAIR_REGEXP = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g;\nconst NON_ALPHANUMERIC_REGEXP = /([^\\#-~ |!])/g;\nfunction encodeEntities(value) {\n return value.replace(/&/g, '&').replace(SURROGATE_PAIR_REGEXP, function (match) {\n const hi = match.charCodeAt(0);\n const low = match.charCodeAt(1);\n return '' + ((hi - 0xd800) * 0x400 + (low - 0xdc00) + 0x10000) + ';';\n }).replace(NON_ALPHANUMERIC_REGEXP, function (match) {\n return '' + match.charCodeAt(0) + ';';\n }).replace(//g, '>');\n}\nlet inertBodyHelper;\nfunction _sanitizeHtml(defaultDoc, unsafeHtmlInput) {\n let inertBodyElement = null;\n try {\n inertBodyHelper = inertBodyHelper || getInertBodyHelper(defaultDoc);\n let unsafeHtml = unsafeHtmlInput ? String(unsafeHtmlInput) : '';\n inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeHtml);\n let mXSSAttempts = 5;\n let parsedHtml = unsafeHtml;\n do {\n if (mXSSAttempts === 0) {\n throw new Error('Failed to sanitize html because the input is unstable');\n }\n mXSSAttempts--;\n unsafeHtml = parsedHtml;\n parsedHtml = inertBodyElement.innerHTML;\n inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeHtml);\n } while (unsafeHtml !== parsedHtml);\n const sanitizer = new SanitizingHtmlSerializer();\n const safeHtml = sanitizer.sanitizeChildren(getTemplateContent(inertBodyElement) || inertBodyElement);\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && sanitizer.sanitizedSomething) {\n console.warn(`WARNING: sanitizing HTML stripped some content, see ${XSS_SECURITY_URL}`);\n }\n return trustedHTMLFromString(safeHtml);\n } finally {\n if (inertBodyElement) {\n const parent = getTemplateContent(inertBodyElement) || inertBodyElement;\n while (parent.firstChild) {\n parent.firstChild.remove();\n }\n }\n }\n}\nfunction getTemplateContent(el) {\n return 'content' in el && isTemplateElement(el) ? el.content : null;\n}\nfunction isTemplateElement(el) {\n return el.nodeType === Node.ELEMENT_NODE && el.nodeName === 'TEMPLATE';\n}\n\nconst COMMENT_DISALLOWED = /^>|^->||--!>|)/g;\nconst COMMENT_DELIMITER_ESCAPED = '\\u200B$1\\u200B';\nfunction escapeCommentText(value) {\n return value.replace(COMMENT_DISALLOWED, text => text.replace(COMMENT_DELIMITER, COMMENT_DELIMITER_ESCAPED));\n}\n\nfunction createTextNode(renderer, value) {\n return renderer.createText(value);\n}\nfunction updateTextNode(renderer, rNode, value) {\n renderer.setValue(rNode, value);\n}\nfunction createCommentNode(renderer, value) {\n return renderer.createComment(escapeCommentText(value));\n}\nfunction createElementNode(renderer, name, namespace) {\n return renderer.createElement(name, namespace);\n}\nfunction nativeInsertBefore(renderer, parent, child, beforeNode, isMove) {\n renderer.insertBefore(parent, child, beforeNode, isMove);\n}\nfunction nativeAppendChild(renderer, parent, child) {\n ngDevMode && assertDefined(parent, 'parent node must be defined');\n renderer.appendChild(parent, child);\n}\nfunction nativeAppendOrInsertBefore(renderer, parent, child, beforeNode, isMove) {\n if (beforeNode !== null) {\n nativeInsertBefore(renderer, parent, child, beforeNode, isMove);\n } else {\n nativeAppendChild(renderer, parent, child);\n }\n}\nfunction nativeRemoveNode(renderer, rNode, isHostElement, requireSynchronousElementRemoval) {\n renderer.removeChild(null, rNode, isHostElement, requireSynchronousElementRemoval);\n}\nfunction clearElementContents(rElement) {\n rElement.textContent = '';\n}\nfunction writeDirectStyle(renderer, element, newValue) {\n ngDevMode && assertString(newValue, \"'newValue' should be a string\");\n renderer.setAttribute(element, 'style', newValue);\n}\nfunction writeDirectClass(renderer, element, newValue) {\n ngDevMode && assertString(newValue, \"'newValue' should be a string\");\n if (newValue === '') {\n renderer.removeAttribute(element, 'class');\n } else {\n renderer.setAttribute(element, 'class', newValue);\n }\n}\nfunction setupStaticAttributes(renderer, element, tNode) {\n const {\n mergedAttrs,\n classes,\n styles\n } = tNode;\n if (mergedAttrs !== null) {\n setUpAttributes(renderer, element, mergedAttrs);\n }\n if (classes !== null) {\n writeDirectClass(renderer, element, classes);\n }\n if (styles !== null) {\n writeDirectStyle(renderer, element, styles);\n }\n}\n\nfunction enforceIframeSecurity(iframe) {\n const lView = getLView();\n iframe.src = '';\n iframe.srcdoc = trustedHTMLFromString('');\n nativeRemoveNode(lView[RENDERER], iframe);\n}\n\nfunction splitNsName(elementName, fatal = true) {\n if (elementName[0] != ':') {\n return [null, elementName];\n }\n const colonIndex = elementName.indexOf(':', 1);\n if (colonIndex === -1) {\n if (fatal) {\n throw new Error(`Unsupported format \"${elementName}\" expecting \":namespace:name\"`);\n } else {\n return [null, elementName];\n }\n }\n return [elementName.slice(1, colonIndex), elementName.slice(colonIndex + 1)];\n}\n\nfunction ษตษตsanitizeHtml(unsafeHtml, tagName, propName) {\n if (tagName !== undefined && propName !== undefined && getSecurityContext(tagName, propName) !== SecurityContext.HTML) {\n return unsafeHtml;\n }\n const sanitizer = getSanitizer();\n if (sanitizer) {\n return trustedHTMLFromStringBypass(sanitizer.sanitize(SecurityContext.HTML, unsafeHtml) || '');\n }\n if (allowSanitizationBypassAndThrow(unsafeHtml, \"HTML\")) {\n return trustedHTMLFromStringBypass(unwrapSafeValue(unsafeHtml));\n }\n return _sanitizeHtml(getDocument(), renderStringify(unsafeHtml));\n}\nfunction ษตษตsanitizeStyle(unsafeStyle) {\n const sanitizer = getSanitizer();\n if (sanitizer) {\n return sanitizer.sanitize(SecurityContext.STYLE, unsafeStyle) || '';\n }\n if (allowSanitizationBypassAndThrow(unsafeStyle, \"Style\")) {\n return unwrapSafeValue(unsafeStyle);\n }\n return renderStringify(unsafeStyle);\n}\nfunction ษตษตsanitizeUrl(unsafeUrl) {\n const sanitizer = getSanitizer();\n if (sanitizer) {\n return sanitizer.sanitize(SecurityContext.URL, unsafeUrl) || '';\n }\n if (allowSanitizationBypassAndThrow(unsafeUrl, \"URL\")) {\n return unwrapSafeValue(unsafeUrl);\n }\n return _sanitizeUrl(renderStringify(unsafeUrl));\n}\nfunction ษตษตsanitizeResourceUrl(unsafeResourceUrl) {\n const sanitizer = getSanitizer();\n if (sanitizer) {\n return trustedScriptURLFromStringBypass(sanitizer.sanitize(SecurityContext.RESOURCE_URL, unsafeResourceUrl) || '');\n }\n if (allowSanitizationBypassAndThrow(unsafeResourceUrl, \"ResourceURL\")) {\n return trustedScriptURLFromStringBypass(unwrapSafeValue(unsafeResourceUrl));\n }\n throw new RuntimeError(-904, ngDevMode && `unsafe value used in a resource URL context (see ${XSS_SECURITY_URL})`);\n}\nfunction ษตษตsanitizeScript(unsafeScript) {\n const sanitizer = getSanitizer();\n if (sanitizer) {\n return trustedScriptFromStringBypass(sanitizer.sanitize(SecurityContext.SCRIPT, unsafeScript) || '');\n }\n if (allowSanitizationBypassAndThrow(unsafeScript, \"Script\")) {\n return trustedScriptFromStringBypass(unwrapSafeValue(unsafeScript));\n }\n throw new RuntimeError(905, ngDevMode && 'unsafe value used in a script context');\n}\nfunction ษตษตtrustConstantHtml(html) {\n if (ngDevMode && (!Array.isArray(html) || !Array.isArray(html.raw) || html.length !== 1)) {\n throw new Error(`Unexpected interpolation in trusted HTML constant: ${html.join('?')}`);\n }\n return trustedHTMLFromString(html[0]);\n}\nfunction ษตษตtrustConstantResourceUrl(url) {\n if (ngDevMode && (!Array.isArray(url) || !Array.isArray(url.raw) || url.length !== 1)) {\n throw new Error(`Unexpected interpolation in trusted URL constant: ${url.join('?')}`);\n }\n return trustedScriptURLFromString(url[0]);\n}\nfunction getUrlSanitizer(tag, prop) {\n switch (getSecurityContext(tag, prop)) {\n case SecurityContext.RESOURCE_URL:\n return ษตษตsanitizeResourceUrl;\n case SecurityContext.URL:\n return ษตษตsanitizeUrl;\n default:\n return null;\n }\n}\nfunction ษตษตsanitizeUrlOrResourceUrl(unsafeUrl, tag, prop) {\n return getUrlSanitizer(tag, prop)?.(unsafeUrl) ?? unsafeUrl;\n}\nfunction validateAgainstEventProperties(name) {\n if (name.toLowerCase().startsWith('on')) {\n const errorMessage = `Binding to event property '${name}' is disallowed for security reasons, ` + `please use (${name.slice(2)})=...` + `\\nIf '${name}' is a directive input, make sure the directive is imported by the` + ` current module.`;\n throw new RuntimeError(306, errorMessage);\n }\n}\nfunction getSanitizer() {\n const lView = getLView();\n return lView && lView[ENVIRONMENT].sanitizer;\n}\nfunction getSecurityContext(tagName, propName) {\n const [namespace, resolvedTagName] = resolveElement(tagName);\n return checkSecurityContext(resolvedTagName, propName, namespace);\n}\nfunction resolveElement(tagName) {\n tagName = tagName.toLowerCase();\n const splitResult = splitNsName(tagName, false);\n if (splitResult[0]) {\n return splitResult;\n }\n const index = getSelectedIndex();\n const tNode = index === -1 ? null : getSelectedTNode();\n let namespace = tNode?.namespace;\n if (tagName === \"#host\" && tNode?.type === 2) {\n const element = getNativeByTNode(tNode, getLView());\n if (element.tagName) {\n tagName = element.tagName.toLowerCase();\n }\n if (namespace == null) {\n const namespaceURI = element.namespaceURI;\n namespace = namespaceURI && NAMESPACE_URIS[namespaceURI];\n }\n }\n return [namespace, tagName];\n}\nconst SECURITY_SENSITIVE_ATTRIBUTE_NAMES = /*#__PURE__*/ new Set(['href', 'xlink:href']);\nconst SVG_ANIMATION_SENSITIVE_STATIC_VALUES = {\n 'animate': {\n 'to': SECURITY_SENSITIVE_ATTRIBUTE_NAMES,\n 'values': SECURITY_SENSITIVE_ATTRIBUTE_NAMES,\n 'from': SECURITY_SENSITIVE_ATTRIBUTE_NAMES\n },\n 'set': {\n 'to': SECURITY_SENSITIVE_ATTRIBUTE_NAMES\n }\n};\nfunction ษตษตvalidateAttribute(value, tagName, attributeName) {\n const index = getSelectedIndex();\n const tNode = index === -1 ? null : getSelectedTNode();\n if (tNode && tNode.type !== 2) {\n return value;\n }\n const [namespace, resolvedTagName] = resolveElement(tagName);\n const securityContext = checkSecurityContext(resolvedTagName, attributeName, namespace);\n if (securityContext !== SecurityContext.ATTRIBUTE_NO_BINDING) {\n return value;\n }\n const lView = getLView();\n if (tNode) {\n if (resolvedTagName === 'iframe') {\n const element = getNativeByTNode(tNode, lView);\n enforceIframeSecurity(element);\n } else if (namespace === SVG_NAMESPACE || !namespace) {\n const config = SVG_ANIMATION_SENSITIVE_STATIC_VALUES[resolvedTagName]?.[attributeName.toLowerCase()];\n if (config) {\n const element = getNativeByTNode(tNode, lView);\n const attributeNameValue = getSecuritySensitiveSVGAnimationAttributeName(element, config);\n if (attributeNameValue) {\n const errorMessage = ngDevMode && `Angular has detected that the \\`${attributeName}\\` was applied ` + `as a binding to the <${resolvedTagName}> element${getTemplateLocationDetails(lView)}. ` + `For security reasons, the \\`${attributeName}\\` can be set on the <${resolvedTagName}> element ` + `as a static attribute only when the \"attributeName\" is set to \\'${attributeNameValue}\\'. \\n` + `To fix this, switch the \\`${attributeNameValue}\\` binding to a static attribute ` + `in a template or in host bindings section.`;\n throw new RuntimeError(-910, errorMessage);\n }\n return value;\n }\n }\n }\n const errorMessage = ngDevMode && `Angular has detected that the \\`${attributeName}\\` was applied ` + `as a binding to the <${resolvedTagName}> element${tNode ? getTemplateLocationDetails(lView) : ''}. ` + `For security reasons, the \\`${attributeName}\\` can be set on the <${resolvedTagName}> element ` + `as a static attribute only. \\n` + `To fix this, switch the \\`${attributeName}\\` binding to a static attribute ` + `in a template or in host bindings section.`;\n throw new RuntimeError(-910, errorMessage);\n}\nfunction getSecuritySensitiveSVGAnimationAttributeName(element, validationConfig) {\n for (const attributeName of element.getAttributeNames()) {\n if (attributeName.toLowerCase() !== 'attributename') {\n continue;\n }\n const attributeNameValue = element.getAttribute(attributeName);\n if (attributeNameValue !== null && validationConfig.has(attributeNameValue.toLowerCase())) {\n return attributeNameValue;\n }\n }\n return null;\n}\n\nconst NG_REFLECT_ATTRS_FLAG_DEFAULT = false;\nconst NG_REFLECT_ATTRS_FLAG = /*#__PURE__*/ new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'NG_REFLECT_FLAG' : '', {\n factory: () => NG_REFLECT_ATTRS_FLAG_DEFAULT\n});\nfunction provideNgReflectAttributes() {\n const providers = typeof ngDevMode === 'undefined' || ngDevMode ? [{\n provide: NG_REFLECT_ATTRS_FLAG,\n useValue: true\n }] : [];\n return makeEnvironmentProviders(providers);\n}\nfunction normalizeDebugBindingName(name) {\n name = camelCaseToDashCase(name.replace(/[$@]/g, '_'));\n return `ng-reflect-${name}`;\n}\nconst CAMEL_CASE_REGEXP = /([A-Z])/g;\nfunction camelCaseToDashCase(input) {\n return input.replace(CAMEL_CASE_REGEXP, (...m) => '-' + m[1].toLowerCase());\n}\nfunction normalizeDebugBindingValue(value) {\n try {\n return value != null ? value.toString().slice(0, 30) : value;\n } catch (e) {\n return '[ERROR] Exception while trying to serialize the value';\n }\n}\n\nfunction ษตษตresolveWindow(element) {\n return element.ownerDocument.defaultView;\n}\nfunction ษตษตresolveDocument(element) {\n return element.ownerDocument;\n}\nfunction ษตษตresolveBody(element) {\n return element.ownerDocument.body;\n}\nconst INTERPOLATION_DELIMITER = `๏ฟฝ`;\nfunction maybeUnwrapFn(value) {\n if (value instanceof Function) {\n return value();\n } else {\n return value;\n }\n}\n\nconst VALUE_STRING_LENGTH_LIMIT = 200;\nfunction assertStandaloneComponentType(type) {\n assertComponentDef(type);\n const componentDef = getComponentDef(type);\n if (!componentDef.standalone) {\n throw new RuntimeError(907, `The ${stringifyForError(type)} component is not marked as standalone, ` + `but Angular expects to have a standalone component here. ` + `Please make sure the ${stringifyForError(type)} component does not have ` + `the \\`standalone: false\\` flag in the decorator.`);\n }\n}\nfunction assertComponentDef(type) {\n if (!getComponentDef(type)) {\n throw new RuntimeError(906, `The ${stringifyForError(type)} is not an Angular component, ` + `make sure it has the \\`@Component\\` decorator.`);\n }\n}\nfunction throwMultipleComponentError(tNode, first, second) {\n throw new RuntimeError(-300, `Multiple components match node with tagname ${tNode.value}: ` + `${stringifyForError(first)} and ` + `${stringifyForError(second)}`);\n}\nfunction throwErrorIfNoChangesMode(creationMode, oldValue, currValue, propName, lView) {\n const hostComponentDef = getDeclarationComponentDef(lView);\n const componentClassName = hostComponentDef?.type?.name;\n const field = propName ? ` for '${propName}'` : '';\n let msg = `ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value${field}: '${formatValue(oldValue)}'. Current value: '${formatValue(currValue)}'.${componentClassName ? ` Expression location: ${componentClassName} component` : ''}`;\n if (creationMode) {\n msg += ` It seems like the view has been created after its parent and its children have been dirty checked.` + ` Has it been created in a change detection hook?`;\n }\n throw new RuntimeError(-100, msg);\n}\nfunction formatValue(value) {\n let strValue = String(value);\n try {\n if (Array.isArray(value) || strValue === '[object Object]') {\n strValue = JSON.stringify(value);\n }\n } catch (error) {}\n return strValue.length > VALUE_STRING_LENGTH_LIMIT ? strValue.substring(0, VALUE_STRING_LENGTH_LIMIT) + 'โฆ' : strValue;\n}\nfunction constructDetailsForInterpolation(lView, rootIndex, expressionIndex, meta, changedValue) {\n const [propName, prefix, ...chunks] = meta.split(INTERPOLATION_DELIMITER);\n let oldValue = prefix,\n newValue = prefix;\n for (let i = 0; i < chunks.length; i++) {\n const slotIdx = rootIndex + i;\n oldValue += `${lView[slotIdx]}${chunks[i]}`;\n newValue += `${slotIdx === expressionIndex ? changedValue : lView[slotIdx]}${chunks[i]}`;\n }\n return {\n propName,\n oldValue,\n newValue\n };\n}\nfunction getExpressionChangedErrorDetails(lView, bindingIndex, oldValue, newValue) {\n const tData = lView[TVIEW$1].data;\n const metadata = tData[bindingIndex];\n if (typeof metadata === 'string') {\n if (metadata.indexOf(INTERPOLATION_DELIMITER) > -1) {\n return constructDetailsForInterpolation(lView, bindingIndex, bindingIndex, metadata, newValue);\n }\n return {\n propName: metadata,\n oldValue,\n newValue\n };\n }\n if (metadata === null) {\n let idx = bindingIndex - 1;\n while (typeof tData[idx] !== 'string' && tData[idx + 1] === null) {\n idx--;\n }\n const meta = tData[idx];\n if (typeof meta === 'string') {\n const matches = meta.match(new RegExp(INTERPOLATION_DELIMITER, 'g'));\n if (matches && matches.length - 1 > bindingIndex - idx) {\n return constructDetailsForInterpolation(lView, idx, bindingIndex, meta, newValue);\n }\n }\n }\n return {\n propName: undefined,\n oldValue,\n newValue\n };\n}\n\nfunction classIndexOf(className, classToSearch, startingIndex) {\n ngDevMode && assertNotEqual(classToSearch, '', 'can not look for \"\" string.');\n let end = className.length;\n while (true) {\n const foundIndex = className.indexOf(classToSearch, startingIndex);\n if (foundIndex === -1) return foundIndex;\n if (foundIndex === 0 || className.charCodeAt(foundIndex - 1) <= 32) {\n const length = classToSearch.length;\n if (foundIndex + length === end || className.charCodeAt(foundIndex + length) <= 32) {\n return foundIndex;\n }\n }\n startingIndex = foundIndex + 1;\n }\n}\n\nconst NG_TEMPLATE_SELECTOR = 'ng-template';\nfunction isCssClassMatching(tNode, attrs, cssClassToMatch, isProjectionMode) {\n ngDevMode && assertEqual(cssClassToMatch, cssClassToMatch.toLowerCase(), 'Class name expected to be lowercase.');\n let i = 0;\n if (isProjectionMode) {\n for (; i < attrs.length && typeof attrs[i] === 'string'; i += 2) {\n if (attrs[i] === 'class' && classIndexOf(attrs[i + 1].toLowerCase(), cssClassToMatch, 0) !== -1) {\n return true;\n }\n }\n } else if (isInlineTemplate(tNode)) {\n return false;\n }\n i = attrs.indexOf(1, i);\n if (i > -1) {\n let item;\n while (++i < attrs.length && typeof (item = attrs[i]) === 'string') {\n if (item.toLowerCase() === cssClassToMatch) {\n return true;\n }\n }\n }\n return false;\n}\nfunction isInlineTemplate(tNode) {\n return tNode.type === 4 && tNode.value !== NG_TEMPLATE_SELECTOR;\n}\nfunction hasTagAndTypeMatch(tNode, currentSelector, isProjectionMode) {\n const tagNameToCompare = tNode.type === 4 && !isProjectionMode ? NG_TEMPLATE_SELECTOR : tNode.value;\n return currentSelector === tagNameToCompare;\n}\nfunction isNodeMatchingSelector(tNode, selector, isProjectionMode) {\n ngDevMode && assertDefined(selector[0], 'Selector should have a tag name');\n let mode = 4;\n const nodeAttrs = tNode.attrs;\n const nameOnlyMarkerIdx = nodeAttrs !== null ? getNameOnlyMarkerIndex(nodeAttrs) : 0;\n let skipToNextSelector = false;\n for (let i = 0; i < selector.length; i++) {\n const current = selector[i];\n if (typeof current === 'number') {\n if (!skipToNextSelector && !isPositive(mode) && !isPositive(current)) {\n return false;\n }\n if (skipToNextSelector && isPositive(current)) continue;\n skipToNextSelector = false;\n mode = current | mode & 1;\n continue;\n }\n if (skipToNextSelector) continue;\n if (mode & 4) {\n mode = 2 | mode & 1;\n if (current !== '' && !hasTagAndTypeMatch(tNode, current, isProjectionMode) || current === '' && selector.length === 1) {\n if (isPositive(mode)) return false;\n skipToNextSelector = true;\n }\n } else if (mode & 8) {\n if (nodeAttrs === null || !isCssClassMatching(tNode, nodeAttrs, current, isProjectionMode)) {\n if (isPositive(mode)) return false;\n skipToNextSelector = true;\n }\n } else {\n const selectorAttrValue = selector[++i];\n const attrIndexInNode = findAttrIndexInNode(current, nodeAttrs, isInlineTemplate(tNode), isProjectionMode);\n if (attrIndexInNode === -1) {\n if (isPositive(mode)) return false;\n skipToNextSelector = true;\n continue;\n }\n if (selectorAttrValue !== '') {\n let nodeAttrValue;\n if (attrIndexInNode > nameOnlyMarkerIdx) {\n nodeAttrValue = '';\n } else {\n ngDevMode && assertNotEqual(nodeAttrs[attrIndexInNode], 0, 'We do not match directives on namespaced attributes');\n nodeAttrValue = nodeAttrs[attrIndexInNode + 1].toLowerCase();\n }\n if (mode & 2 && selectorAttrValue !== nodeAttrValue) {\n if (isPositive(mode)) return false;\n skipToNextSelector = true;\n }\n }\n }\n }\n return isPositive(mode) || skipToNextSelector;\n}\nfunction isPositive(mode) {\n return (mode & 1) === 0;\n}\nfunction findAttrIndexInNode(name, attrs, isInlineTemplate, isProjectionMode) {\n if (attrs === null) return -1;\n let i = 0;\n if (isProjectionMode || !isInlineTemplate) {\n let bindingsMode = false;\n while (i < attrs.length) {\n const maybeAttrName = attrs[i];\n if (maybeAttrName === name) {\n return i;\n } else if (maybeAttrName === 3 || maybeAttrName === 6) {\n bindingsMode = true;\n } else if (maybeAttrName === 1 || maybeAttrName === 2) {\n let value = attrs[++i];\n while (typeof value === 'string') {\n value = attrs[++i];\n }\n continue;\n } else if (maybeAttrName === 4) {\n break;\n } else if (maybeAttrName === 0) {\n i += 4;\n continue;\n }\n i += bindingsMode ? 1 : 2;\n }\n return -1;\n } else {\n return matchTemplateAttribute(attrs, name);\n }\n}\nfunction isNodeMatchingSelectorList(tNode, selector, isProjectionMode = false) {\n for (let i = 0; i < selector.length; i++) {\n if (isNodeMatchingSelector(tNode, selector[i], isProjectionMode)) {\n return true;\n }\n }\n return false;\n}\nfunction getProjectAsAttrValue(tNode) {\n const nodeAttrs = tNode.attrs;\n if (nodeAttrs != null) {\n const ngProjectAsAttrIdx = nodeAttrs.indexOf(5);\n if ((ngProjectAsAttrIdx & 1) === 0) {\n return nodeAttrs[ngProjectAsAttrIdx + 1];\n }\n }\n return null;\n}\nfunction getNameOnlyMarkerIndex(nodeAttrs) {\n for (let i = 0; i < nodeAttrs.length; i++) {\n const nodeAttr = nodeAttrs[i];\n if (isNameOnlyAttributeMarker(nodeAttr)) {\n return i;\n }\n }\n return nodeAttrs.length;\n}\nfunction matchTemplateAttribute(attrs, name) {\n let i = attrs.indexOf(4);\n if (i > -1) {\n i++;\n while (i < attrs.length) {\n const attr = attrs[i];\n if (typeof attr === 'number') return -1;\n if (attr === name) return i;\n i++;\n }\n }\n return -1;\n}\nfunction isSelectorInSelectorList(selector, list) {\n selectorListLoop: for (let i = 0; i < list.length; i++) {\n const currentSelectorInList = list[i];\n if (selector.length !== currentSelectorInList.length) {\n continue;\n }\n for (let j = 0; j < selector.length; j++) {\n if (selector[j] !== currentSelectorInList[j]) {\n continue selectorListLoop;\n }\n }\n return true;\n }\n return false;\n}\nfunction maybeWrapInNotSelector(isNegativeMode, chunk) {\n return isNegativeMode ? ':not(' + chunk.trim() + ')' : chunk;\n}\nfunction stringifyCSSSelector(selector) {\n let result = selector[0];\n let i = 1;\n let mode = 2;\n let currentChunk = '';\n let isNegativeMode = false;\n while (i < selector.length) {\n let valueOrMarker = selector[i];\n if (typeof valueOrMarker === 'string') {\n if (mode & 2) {\n const attrValue = selector[++i];\n currentChunk += '[' + valueOrMarker + (attrValue.length > 0 ? '=\"' + attrValue + '\"' : '') + ']';\n } else if (mode & 8) {\n currentChunk += '.' + valueOrMarker;\n } else if (mode & 4) {\n currentChunk += ' ' + valueOrMarker;\n }\n } else {\n if (currentChunk !== '' && !isPositive(valueOrMarker)) {\n result += maybeWrapInNotSelector(isNegativeMode, currentChunk);\n currentChunk = '';\n }\n mode = valueOrMarker;\n isNegativeMode = isNegativeMode || !isPositive(mode);\n }\n i++;\n }\n if (currentChunk !== '') {\n result += maybeWrapInNotSelector(isNegativeMode, currentChunk);\n }\n return result;\n}\nfunction stringifyCSSSelectorList(selectorList) {\n return selectorList.map(stringifyCSSSelector).join(',');\n}\nfunction extractAttrsAndClassesFromSelector(selector) {\n const attrs = [];\n const classes = [];\n let i = 1;\n let mode = 2;\n while (i < selector.length) {\n let valueOrMarker = selector[i];\n if (typeof valueOrMarker === 'string') {\n if (mode === 2) {\n if (valueOrMarker !== '') {\n attrs.push(valueOrMarker, selector[++i]);\n }\n } else if (mode === 8) {\n classes.push(valueOrMarker);\n }\n } else {\n if (!isPositive(mode)) break;\n mode = valueOrMarker;\n }\n i++;\n }\n if (classes.length) {\n attrs.push(1, ...classes);\n }\n return attrs;\n}\n\nconst NO_CHANGE = typeof ngDevMode === 'undefined' || ngDevMode ? {\n __brand__: 'NO_CHANGE'\n} : {};\n\nvar RendererStyleFlags2 = /*#__PURE__*/ (function (RendererStyleFlags2) {\n RendererStyleFlags2[RendererStyleFlags2[\"Important\"] = 1] = \"Important\";\n RendererStyleFlags2[RendererStyleFlags2[\"DashCase\"] = 2] = \"DashCase\";\n; return RendererStyleFlags2;})(RendererStyleFlags2 || {});\n\n\nlet _icuContainerIterate;\nfunction icuContainerIterate(tIcuContainerNode, lView) {\n return _icuContainerIterate(tIcuContainerNode, lView);\n}\nfunction ensureIcuContainerVisitorLoaded(loader) {\n if (_icuContainerIterate === undefined) {\n _icuContainerIterate = loader();\n }\n}\n\nconst ANIMATIONS_DISABLED = /*#__PURE__*/ new InjectionToken(typeof ngDevMode !== 'undefined' && ngDevMode ? 'AnimationsDisabled' : '', {\n factory: () => false\n});\nconst MAX_ANIMATION_TIMEOUT = /*#__PURE__*/ new InjectionToken(typeof ngDevMode !== 'undefined' && ngDevMode ? 'MaxAnimationTimeout' : '', {\n factory: () => MAX_ANIMATION_TIMEOUT_DEFAULT\n});\nconst MAX_ANIMATION_TIMEOUT_DEFAULT = 4000;\n\nfunction parseCssTimeUnitsToMs(value) {\n if (!value) return 0;\n const multiplier = value.toLowerCase().indexOf('ms') > -1 ? 1 : 1000;\n return parseFloat(value) * multiplier;\n}\nfunction parseCssPropertyValue(computedStyle, name) {\n const value = computedStyle.getPropertyValue(name);\n return value.split(',').map(part => part.trim());\n}\nfunction getLongestComputedTransition(computedStyle) {\n const transitionedProperties = parseCssPropertyValue(computedStyle, 'transition-property');\n const rawDurations = parseCssPropertyValue(computedStyle, 'transition-duration');\n const rawDelays = parseCssPropertyValue(computedStyle, 'transition-delay');\n const longest = {\n propertyName: '',\n duration: 0,\n animationName: undefined\n };\n for (let i = 0; i < transitionedProperties.length; i++) {\n const duration = parseCssTimeUnitsToMs(rawDelays[i]) + parseCssTimeUnitsToMs(rawDurations[i]);\n if (duration > longest.duration) {\n longest.propertyName = transitionedProperties[i];\n longest.duration = duration;\n }\n }\n return longest;\n}\nfunction getLongestComputedAnimation(computedStyle) {\n const rawNames = parseCssPropertyValue(computedStyle, 'animation-name');\n const rawDelays = parseCssPropertyValue(computedStyle, 'animation-delay');\n const rawDurations = parseCssPropertyValue(computedStyle, 'animation-duration');\n const rawIterationCounts = parseCssPropertyValue(computedStyle, 'animation-iteration-count');\n const longest = {\n animationName: '',\n propertyName: undefined,\n duration: 0\n };\n for (let i = 0; i < rawNames.length; i++) {\n const duration = parseCssTimeUnitsToMs(rawDelays[i]) + parseCssTimeUnitsToMs(rawDurations[i]);\n const iterationCount = rawIterationCounts[i];\n if (duration > longest.duration && iterationCount !== 'infinite') {\n longest.animationName = rawNames[i];\n longest.duration = duration;\n }\n }\n return longest;\n}\nfunction isShorterThanExistingAnimation(existing, longest) {\n return existing !== undefined && existing.duration > longest.duration;\n}\nfunction longestExists(longest) {\n return (longest.animationName != undefined || longest.propertyName != undefined) && longest.duration > 0;\n}\nfunction getAnimationDuration(animation) {\n const timing = animation.effect?.getTiming();\n if (timing === undefined) return undefined;\n const animationDuration = typeof timing.duration === 'number' ? timing.duration : 0;\n let duration = (timing.delay ?? 0) + animationDuration;\n const playbackRate = animation.playbackRate;\n if (playbackRate !== undefined && playbackRate !== 0 && playbackRate !== 1) {\n duration /= Math.abs(playbackRate);\n }\n return duration;\n}\nfunction determineLongestAnimationFromComputedStyles(el, animationsMap) {\n const computedStyle = getComputedStyle(el);\n const longestAnimation = getLongestComputedAnimation(computedStyle);\n const longestTransition = getLongestComputedTransition(computedStyle);\n const longest = longestAnimation.duration > longestTransition.duration ? longestAnimation : longestTransition;\n if (isShorterThanExistingAnimation(animationsMap.get(el), longest)) return;\n if (longestExists(longest)) {\n animationsMap.set(el, longest);\n }\n}\nfunction determineLongestAnimation(el, animationsMap, areAnimationSupported) {\n if (!areAnimationSupported) return;\n const animations = el.getAnimations();\n return animations.length === 0 ? determineLongestAnimationFromComputedStyles(el, animationsMap) : determineLongestAnimationFromElementAnimations(el, animationsMap, animations);\n}\nfunction determineLongestAnimationFromElementAnimations(el, animationsMap, animations) {\n let longest = {\n animationName: undefined,\n propertyName: undefined,\n duration: 0\n };\n for (const animation of animations) {\n const timing = animation.effect?.getTiming();\n if (timing?.iterations === Infinity) {\n continue;\n }\n const duration = getAnimationDuration(animation) ?? 0;\n let propertyName;\n let animationName;\n if (animation.animationName) {\n animationName = animation.animationName;\n } else {\n propertyName = animation.transitionProperty;\n }\n if (duration >= longest.duration) {\n longest = {\n animationName,\n propertyName,\n duration\n };\n }\n }\n if (isShorterThanExistingAnimation(animationsMap.get(el), longest)) return;\n if (longestExists(longest)) {\n animationsMap.set(el, longest);\n }\n}\nconst allLeavingAnimations = /*#__PURE__*/ new Set();\n\nconst DEFAULT_ANIMATIONS_DISABLED = false;\nconst ANIMATION_DURATION_TOLERANCE_MS = 1;\nconst areAnimationSupported = (typeof ngServerMode === 'undefined' || !ngServerMode) && typeof document !== 'undefined' && typeof document?.documentElement?.getAnimations === 'function';\nfunction areAnimationsDisabled(lView) {\n const injector = lView[INJECTOR];\n return injector.get(ANIMATIONS_DISABLED, DEFAULT_ANIMATIONS_DISABLED);\n}\nfunction assertAnimationTypes(value, instruction) {\n if (value == null || typeof value !== 'string' && typeof value !== 'function') {\n throw new RuntimeError(650, `'${instruction}' value must be a string of CSS classes or an animation function, got ${stringify(value)}`);\n }\n}\nfunction assertElementNodes(nativeElement, instruction) {\n if (nativeElement.nodeType !== Node.ELEMENT_NODE) {\n throw new RuntimeError(650, `'${instruction}' can only be used on an element node, got ${stringify(nativeElement.nodeType)}`);\n }\n}\nfunction trackEnterClasses(el, classList, cleanupFns) {\n const elementData = enterClassMap.get(el);\n if (elementData) {\n for (const klass of classList) {\n elementData.classList.push(klass);\n }\n for (const fn of cleanupFns) {\n elementData.cleanupFns.push(fn);\n }\n } else {\n enterClassMap.set(el, {\n classList,\n cleanupFns\n });\n }\n}\nfunction cleanupEnterClassData(element) {\n const elementData = enterClassMap.get(element);\n if (elementData) {\n for (const fn of elementData.cleanupFns) {\n fn();\n }\n enterClassMap.delete(element);\n }\n longestAnimations.delete(element);\n}\nconst noOpAnimationComplete = () => {};\nconst enterClassMap = /*#__PURE__*/ new WeakMap();\nconst longestAnimations = /*#__PURE__*/ new WeakMap();\nconst leavingNodes = /*#__PURE__*/ new WeakMap();\nfunction getDeclarationView(lView) {\n if (!lView) return null;\n return lView[DECLARATION_VIEW] ?? lView;\n}\nconst reusedNodes = /*#__PURE__*/ new WeakSet();\nfunction clearLeavingNodes(tNode, el) {\n const nodes = leavingNodes.get(tNode);\n if (nodes && nodes.length > 0) {\n const ix = nodes.findIndex(node => node.el === el);\n if (ix > -1) nodes.splice(ix, 1);\n }\n if (nodes?.length === 0) {\n leavingNodes.delete(tNode);\n }\n}\nfunction cancelLeavingNodes(tNode, newElement, newLView) {\n const nodes = leavingNodes.get(tNode);\n if (!nodes || nodes.length === 0) return;\n const newParent = newElement.parentNode;\n const prevSibling = newElement.previousSibling;\n const newDeclarationView = getDeclarationView(newLView);\n for (let i = nodes.length - 1; i >= 0; i--) {\n const {\n el: leavingEl,\n declarationView: leavingDeclarationView\n } = nodes[i];\n const leavingParent = leavingEl.parentNode;\n if (leavingEl === newElement) {\n nodes.splice(i, 1);\n reusedNodes.add(leavingEl);\n leavingEl.dispatchEvent(new CustomEvent('animationend', {\n detail: {\n cancel: true\n }\n }));\n } else if (prevSibling && leavingEl === prevSibling) {\n nodes.splice(i, 1);\n leavingEl.dispatchEvent(new CustomEvent('animationend', {\n detail: {\n cancel: true\n }\n }));\n leavingEl.parentNode?.removeChild(leavingEl);\n } else if (leavingParent && newParent && leavingParent !== newParent) {\n const sameLogicalView = newDeclarationView === null || leavingDeclarationView === null || newDeclarationView === leavingDeclarationView;\n if (sameLogicalView) {\n nodes.splice(i, 1);\n leavingEl.dispatchEvent(new CustomEvent('animationend', {\n detail: {\n cancel: true\n }\n }));\n leavingEl.parentNode?.removeChild(leavingEl);\n }\n }\n }\n}\nfunction trackLeavingNodes(tNode, el, lView) {\n const declarationView = getDeclarationView(lView);\n const nodes = leavingNodes.get(tNode);\n if (nodes) {\n if (!nodes.some(node => node.el === el)) {\n nodes.push({\n el,\n declarationView\n });\n }\n } else {\n leavingNodes.set(tNode, [{\n el,\n declarationView\n }]);\n }\n}\nfunction getLViewEnterAnimations(lView) {\n const animationData = lView[ANIMATIONS] ??= {};\n return animationData.enter ??= new Map();\n}\nfunction getLViewLeaveAnimations(lView) {\n const animationData = lView[ANIMATIONS] ??= {};\n return animationData.leave ??= new Map();\n}\nfunction getClassListFromValue(value) {\n let classes = typeof value === 'function' ? value() : value;\n while (typeof classes === 'function') {\n classes = classes();\n }\n let classList = Array.isArray(classes) ? classes : null;\n if (typeof classes === 'string') {\n classList = classes.trim().split(/\\s+/).filter(k => k);\n }\n return classList;\n}\nfunction removeClasses(renderer, el, classList) {\n for (const item of classList) {\n renderer.removeClass(el, item);\n }\n}\nfunction addClasses(renderer, el, classList) {\n for (const item of classList) {\n renderer.addClass(el, item);\n }\n}\nfunction cancelAnimationsIfRunning(element, renderer) {\n if (!areAnimationSupported) return;\n const elementData = enterClassMap.get(element);\n if (elementData && elementData.classList.length > 0 && elementHasClassList(element, elementData.classList)) {\n removeClasses(renderer, element, elementData.classList);\n }\n cleanupEnterClassData(element);\n}\nfunction elementHasClassList(element, classList) {\n for (const className of classList) {\n if (element.classList.contains(className)) return true;\n }\n return false;\n}\nfunction getEventTarget(event) {\n return event.composedPath ? event.composedPath()[0] : event.target;\n}\nfunction isLongestAnimation(event, nativeElement) {\n const longestAnimation = longestAnimations.get(nativeElement);\n if (longestAnimation === undefined) return true;\n if (nativeElement !== getEventTarget(event)) return false;\n const eventAnimation = event.animation;\n if (eventAnimation) {\n const eventAnimationDuration = getAnimationDuration(eventAnimation);\n if (eventAnimationDuration !== undefined && eventAnimationDuration + ANIMATION_DURATION_TOLERANCE_MS < longestAnimation.duration) {\n return false;\n }\n }\n if (longestAnimation.animationName !== undefined) {\n return event.animationName === longestAnimation.animationName;\n }\n if (longestAnimation.propertyName !== undefined) {\n return longestAnimation.propertyName === 'all' || event.propertyName === longestAnimation.propertyName;\n }\n return false;\n}\nfunction addAnimationToLView(animations, tNode, fn) {\n const nodeAnimations = animations.get(tNode.index) ?? {\n animateFns: []\n };\n nodeAnimations.animateFns.push(fn);\n animations.set(tNode.index, nodeAnimations);\n}\nfunction cleanupAfterLeaveAnimations(resolvers, cleanupFns) {\n if (resolvers) {\n for (const fn of resolvers) {\n fn();\n }\n }\n for (const fn of cleanupFns) {\n fn();\n }\n}\nfunction clearLViewNodeAnimationResolvers(lView, tNode) {\n const nodeAnimations = getLViewLeaveAnimations(lView).get(tNode.index);\n if (nodeAnimations) nodeAnimations.resolvers = undefined;\n}\nfunction leaveAnimationFunctionCleanup(lView, tNode, nativeElement, resolvers, cleanupFns) {\n clearLeavingNodes(tNode, nativeElement);\n cleanupAfterLeaveAnimations(resolvers, cleanupFns);\n clearLViewNodeAnimationResolvers(lView, tNode);\n}\n\nvar TracingAction = /*#__PURE__*/ (function (TracingAction) {\n TracingAction[TracingAction[\"CHANGE_DETECTION\"] = 0] = \"CHANGE_DETECTION\";\n TracingAction[TracingAction[\"AFTER_NEXT_RENDER\"] = 1] = \"AFTER_NEXT_RENDER\";\n; return TracingAction;})(TracingAction || {});\n\nconst TracingService = /*#__PURE__*/ new InjectionToken(typeof ngDevMode !== 'undefined' && ngDevMode ? 'TracingService' : '');\n\nconst markedFeatures = /*#__PURE__*/ new Set();\nfunction performanceMarkFeature(feature) {\n if (markedFeatures.has(feature)) {\n return;\n }\n markedFeatures.add(feature);\n performance?.mark?.('mark_feature_usage', {\n detail: {\n feature\n }\n });\n}\n\nlet AfterRenderManager = /*#__PURE__*/ (() => {\nclass AfterRenderManager {\n impl = null;\n execute() {\n this.impl?.execute();\n }\n static ษตprov =\n /* @__PURE__ */\n __defineInjectable({\n token: AfterRenderManager,\n providedIn: 'root',\n factory: () => new AfterRenderManager()\n });\n}\nreturn AfterRenderManager;\n})();\nconst AFTER_RENDER_PHASES = /* @__PURE__ **/(() => [0, 1, 2, 3])();\nlet AfterRenderImpl = /*#__PURE__*/ (() => {\nclass AfterRenderImpl {\n ngZone = inject(NgZone);\n scheduler = inject(ChangeDetectionScheduler);\n errorHandler = inject(ErrorHandler, {\n optional: true\n });\n sequences = new Set();\n deferredRegistrations = new Set();\n executing = false;\n constructor() {\n inject(TracingService, {\n optional: true\n });\n }\n execute() {\n const hasSequencesToExecute = this.sequences.size > 0;\n if (hasSequencesToExecute) {\n profiler(ProfilerEvent.AfterRenderHooksStart);\n }\n this.executing = true;\n for (const phase of AFTER_RENDER_PHASES) {\n for (const sequence of this.sequences) {\n if (sequence.erroredOrDestroyed || !sequence.hooks[phase]) {\n continue;\n }\n try {\n sequence.pipelinedValue = this.ngZone.runOutsideAngular(() => this.maybeTrace(() => {\n const hookFn = sequence.hooks[phase];\n const value = hookFn(sequence.pipelinedValue);\n return value;\n }, sequence.snapshot));\n } catch (err) {\n sequence.erroredOrDestroyed = true;\n this.errorHandler?.handleError(err);\n }\n }\n }\n this.executing = false;\n for (const sequence of this.sequences) {\n sequence.afterRun();\n if (sequence.once) {\n this.sequences.delete(sequence);\n sequence.destroy();\n }\n }\n for (const sequence of this.deferredRegistrations) {\n this.sequences.add(sequence);\n }\n if (this.deferredRegistrations.size > 0) {\n this.scheduler.notify(7);\n }\n this.deferredRegistrations.clear();\n if (hasSequencesToExecute) {\n profiler(ProfilerEvent.AfterRenderHooksEnd);\n }\n }\n register(sequence) {\n const {\n view\n } = sequence;\n if (view !== undefined) {\n (view[AFTER_RENDER_SEQUENCES_TO_ADD] ??= []).push(sequence);\n markAncestorsForTraversal(view);\n view[FLAGS] |= 8192;\n } else {\n this.addSequence(sequence);\n }\n }\n addSequence(sequence) {\n if (this.executing) {\n this.deferredRegistrations.add(sequence);\n } else {\n this.sequences.add(sequence);\n }\n this.scheduler.notify(7);\n }\n unregister(sequence) {\n if (this.executing && this.sequences.has(sequence)) {\n sequence.erroredOrDestroyed = true;\n sequence.pipelinedValue = undefined;\n sequence.once = true;\n } else {\n this.sequences.delete(sequence);\n this.deferredRegistrations.delete(sequence);\n }\n }\n maybeTrace(fn, snapshot) {\n return snapshot ? snapshot.run(TracingAction.AFTER_NEXT_RENDER, fn) : fn();\n }\n static ษตprov =\n /* @__PURE__ */\n __defineInjectable({\n token: AfterRenderImpl,\n providedIn: 'root',\n factory: () => new AfterRenderImpl()\n });\n}\nreturn AfterRenderImpl;\n})();\nclass AfterRenderSequence {\n impl;\n hooks;\n view;\n once;\n snapshot;\n erroredOrDestroyed = false;\n pipelinedValue = undefined;\n unregisterOnDestroy;\n constructor(impl, hooks, view, once, destroyRef, snapshot = null) {\n this.impl = impl;\n this.hooks = hooks;\n this.view = view;\n this.once = once;\n this.snapshot = snapshot;\n this.unregisterOnDestroy = destroyRef?.onDestroy(() => this.destroy());\n }\n afterRun() {\n this.erroredOrDestroyed = false;\n this.pipelinedValue = undefined;\n this.snapshot?.dispose();\n this.snapshot = null;\n }\n destroy() {\n this.impl.unregister(this);\n this.unregisterOnDestroy?.();\n const scheduled = this.view?.[AFTER_RENDER_SEQUENCES_TO_ADD];\n if (scheduled) {\n this.view[AFTER_RENDER_SEQUENCES_TO_ADD] = scheduled.filter(s => s !== this);\n }\n }\n}\n\nfunction afterEveryRender(callbackOrSpec, options) {\n ngDevMode && assertNotInReactiveContext(afterEveryRender, 'Call `afterEveryRender` outside of a reactive context. For example, schedule the render ' + 'callback inside the component constructor`.');\n if (ngDevMode && !options?.injector) {\n assertInInjectionContext(afterEveryRender);\n }\n const injector = options?.injector ?? inject(Injector);\n if (typeof ngServerMode !== 'undefined' && ngServerMode) {\n return NOOP_AFTER_RENDER_REF;\n }\n performanceMarkFeature('NgAfterRender');\n return afterEveryRenderImpl(callbackOrSpec, injector, options, false);\n}\nfunction afterNextRender(callbackOrSpec, options) {\n if (ngDevMode && !options?.injector) {\n assertInInjectionContext(afterNextRender);\n }\n const injector = options?.injector ?? inject(Injector);\n if (typeof ngServerMode !== 'undefined' && ngServerMode) {\n return NOOP_AFTER_RENDER_REF;\n }\n performanceMarkFeature('NgAfterNextRender');\n return afterEveryRenderImpl(callbackOrSpec, injector, options, true);\n}\nfunction getHooks(callbackOrSpec) {\n if (callbackOrSpec instanceof Function) {\n return [undefined, undefined, callbackOrSpec, undefined];\n } else {\n return [callbackOrSpec.earlyRead, callbackOrSpec.write, callbackOrSpec.mixedReadWrite, callbackOrSpec.read];\n }\n}\nfunction afterEveryRenderImpl(callbackOrSpec, injector, options, once) {\n const manager = injector.get(AfterRenderManager);\n manager.impl ??= injector.get(AfterRenderImpl);\n const tracing = injector.get(TracingService, null, {\n optional: true\n });\n const destroyRef = options?.manualCleanup !== true ? injector.get(DestroyRef) : null;\n const viewContext = injector.get(ViewContext, null, {\n optional: true\n });\n const sequence = new AfterRenderSequence(manager.impl, getHooks(callbackOrSpec), viewContext?.view, once, destroyRef, tracing?.snapshot(null));\n manager.impl.register(sequence);\n return sequence;\n}\nconst NOOP_AFTER_RENDER_REF = {\n destroy() {}\n};\n\nconst ANIMATION_QUEUE = /*#__PURE__*/ new InjectionToken(typeof ngDevMode !== 'undefined' && ngDevMode ? 'AnimationQueue' : '', {\n factory: () => {\n const injector = inject(EnvironmentInjector);\n const queue = new Set();\n injector.onDestroy(() => queue.clear());\n return {\n queue,\n isScheduled: false,\n scheduler: null,\n injector\n };\n }\n});\nfunction addToAnimationQueue(animationQueue, injector, animationFns, animationData) {\n if (Array.isArray(animationFns)) {\n for (const animateFn of animationFns) {\n animationQueue.queue.add(animateFn);\n animationData?.detachedLeaveAnimationFns?.push(animateFn);\n }\n } else {\n animationQueue.queue.add(animationFns);\n animationData?.detachedLeaveAnimationFns?.push(animationFns);\n }\n animationQueue.scheduler && animationQueue.scheduler(injector);\n}\nfunction removeAnimationsFromQueue(animationQueue, animationFns) {\n if (Array.isArray(animationFns)) {\n for (const animateFn of animationFns) {\n animationQueue.queue.delete(animateFn);\n }\n } else {\n animationQueue.queue.delete(animationFns);\n }\n}\nfunction removeFromAnimationQueue(injector, animationData) {\n const animationQueue = injector.get(ANIMATION_QUEUE);\n if (animationData.detachedLeaveAnimationFns) {\n for (const animationFn of animationData.detachedLeaveAnimationFns) {\n animationQueue.queue.delete(animationFn);\n }\n animationData.detachedLeaveAnimationFns = undefined;\n }\n}\nfunction scheduleAnimationQueue(injector) {\n const animationQueue = injector.get(ANIMATION_QUEUE);\n if (!animationQueue.isScheduled) {\n afterNextRender(() => {\n animationQueue.isScheduled = false;\n for (let animateFn of animationQueue.queue) {\n animateFn();\n }\n animationQueue.queue.clear();\n }, {\n injector: animationQueue.injector\n });\n animationQueue.isScheduled = true;\n }\n}\nfunction initializeAnimationQueueScheduler(injector) {\n const animationQueue = injector.get(ANIMATION_QUEUE);\n animationQueue.scheduler = scheduleAnimationQueue;\n animationQueue.scheduler(injector);\n}\nfunction queueEnterAnimations(injector, enterAnimations) {\n const queue = injector.get(ANIMATION_QUEUE);\n for (const [_, nodeAnimations] of enterAnimations) {\n addToAnimationQueue(queue, injector, nodeAnimations.animateFns);\n }\n}\n\nlet nodeAnimationRuntime = null;\nlet viewDetachAnimationRuntime = null;\nfunction maybeQueueEnterAnimation(parentLView, parent, tNode, injector) {\n nodeAnimationRuntime?.maybeQueueEnterAnimation(parentLView, parent, tNode, injector);\n}\nfunction runLeaveAnimationsWithCallback(lView, tNode, injector, callback) {\n if (nodeAnimationRuntime === null) {\n callback(false);\n } else {\n nodeAnimationRuntime.runLeaveAnimationsWithCallback(lView, tNode, injector, callback);\n }\n}\nfunction initViewDetachAnimations(view) {\n viewDetachAnimationRuntime?.initViewDetachAnimations(view);\n}\nfunction clearViewDetachAnimations(view) {\n viewDetachAnimationRuntime?.clearViewDetachAnimations(view);\n}\nfunction enableAnimationRuntimeSupport() {\n nodeAnimationRuntime ??= {\n maybeQueueEnterAnimation: maybeQueueEnterAnimationImpl,\n runLeaveAnimationsWithCallback: runLeaveAnimationsWithCallbackImpl\n };\n}\nfunction enableViewDetachAnimationsSupport() {\n viewDetachAnimationRuntime ??= {\n initViewDetachAnimations: initViewDetachAnimationsImpl,\n clearViewDetachAnimations: clearViewDetachAnimationsImpl\n };\n}\nfunction maybeQueueEnterAnimationImpl(parentLView, parent, tNode, injector) {\n const enterAnimations = parentLView?.[ANIMATIONS]?.enter;\n if (parent !== null && enterAnimations && enterAnimations.has(tNode.index)) {\n queueEnterAnimations(injector, enterAnimations);\n }\n}\nfunction runLeaveAnimationsWithCallbackImpl(lView, tNode, injector, callback) {\n let animationQueue;\n try {\n animationQueue = injector.get(ANIMATION_QUEUE);\n } catch {\n return callback(false);\n }\n const animations = lView ? lView[ANIMATIONS] ??= {} : undefined;\n if (animations?.enter?.has(tNode.index)) {\n removeAnimationsFromQueue(animationQueue, animations.enter.get(tNode.index).animateFns);\n }\n const nodesWithExitAnimations = aggregateDescendantAnimations(lView, tNode, animations);\n if (nodesWithExitAnimations.size === 0) {\n const hasNestedAnimations = lView ? hasNestedViewAnimations(lView, tNode) : false;\n if (!hasNestedAnimations) {\n return callback(false);\n }\n }\n if (lView) allLeavingAnimations.add(lView[ID]);\n addToAnimationQueue(animationQueue, injector, () => executeLeaveAnimations(lView, tNode, animations, nodesWithExitAnimations, callback), animations);\n}\nfunction aggregateDescendantAnimations(lView, tNode, animations) {\n const nodesWithExitAnimations = new Map();\n const leaveAnimations = animations?.leave;\n if (leaveAnimations && leaveAnimations.has(tNode.index)) {\n nodesWithExitAnimations.set(tNode.index, leaveAnimations.get(tNode.index));\n }\n if (lView && leaveAnimations) {\n for (const [index, animationData] of leaveAnimations) {\n if (nodesWithExitAnimations.has(index)) continue;\n const nestedTNode = lView[TVIEW$1].data[index];\n let parent = nestedTNode.parent;\n while (parent) {\n if (parent === tNode) {\n nodesWithExitAnimations.set(index, animationData);\n break;\n }\n parent = parent.parent;\n }\n }\n }\n return nodesWithExitAnimations;\n}\nfunction executeLeaveAnimations(lView, tNode, animations, nodesWithExitAnimations, callback) {\n const runningAnimations = [];\n if (animations && animations.leave) {\n for (const [index] of nodesWithExitAnimations) {\n if (!animations.leave.has(index)) continue;\n const currentAnimationData = animations.leave.get(index);\n for (const animationFn of currentAnimationData.animateFns) {\n const {\n promise\n } = animationFn();\n runningAnimations.push(promise);\n }\n animations.detachedLeaveAnimationFns = undefined;\n }\n }\n if (lView) {\n collectNestedViewAnimations(lView, tNode, runningAnimations);\n }\n if (runningAnimations.length > 0) {\n const currentAnimations = animations || lView?.[ANIMATIONS];\n if (currentAnimations) {\n const prevRunning = currentAnimations.running;\n if (prevRunning) {\n runningAnimations.push(prevRunning);\n }\n currentAnimations.running = Promise.allSettled(runningAnimations);\n runAfterLeaveAnimations(lView, currentAnimations.running, callback);\n } else {\n Promise.allSettled(runningAnimations).then(() => {\n if (lView) allLeavingAnimations.delete(lView[ID]);\n callback(true);\n });\n }\n } else {\n if (lView) allLeavingAnimations.delete(lView[ID]);\n callback(false);\n }\n}\nfunction hasNestedViewAnimations(lView, tNode) {\n if (tNode.type & 12) {\n const lContainer = lView[tNode.index];\n if (isLContainer(lContainer)) {\n for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n const subView = lContainer[i];\n if (subView[TVIEW$1].type === 2) {\n if (hasViewLeaveAnimations(subView)) {\n return true;\n }\n }\n }\n }\n }\n let child = tNode.child;\n while (child) {\n if (hasNestedViewAnimations(lView, child)) {\n return true;\n }\n child = child.next;\n }\n return false;\n}\nfunction hasViewLeaveAnimations(view) {\n const animations = view[ANIMATIONS];\n if (animations?.leave && animations.leave.size > 0) {\n return true;\n }\n let child = view[TVIEW$1].firstChild;\n while (child) {\n if (hasNestedViewAnimations(view, child)) {\n return true;\n }\n child = child.next;\n }\n return false;\n}\nfunction collectNestedViewAnimations(lView, tNode, collectedPromises) {\n if (tNode.type & 12) {\n const lContainer = lView[tNode.index];\n if (isLContainer(lContainer)) {\n for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n const subView = lContainer[i];\n if (subView[TVIEW$1].type === 2) {\n collectAllViewLeaveAnimations(subView, collectedPromises);\n }\n }\n }\n }\n let child = tNode.child;\n while (child) {\n collectNestedViewAnimations(lView, child, collectedPromises);\n child = child.next;\n }\n}\nfunction collectAllViewLeaveAnimations(view, collectedPromises) {\n const animations = view[ANIMATIONS];\n if (animations && animations.leave) {\n for (const animationData of animations.leave.values()) {\n for (const animationFn of animationData.animateFns) {\n const {\n promise\n } = animationFn();\n collectedPromises.push(promise);\n }\n }\n }\n let child = view[TVIEW$1].firstChild;\n while (child) {\n collectNestedViewAnimations(view, child, collectedPromises);\n child = child.next;\n }\n}\nfunction runAfterLeaveAnimations(lView, runningAnimations, callback) {\n runningAnimations.then(() => {\n if (lView[ANIMATIONS]?.running === runningAnimations) {\n lView[ANIMATIONS].running = undefined;\n allLeavingAnimations.delete(lView[ID]);\n }\n callback(true);\n });\n}\nfunction initViewDetachAnimationsImpl(view) {\n const animations = view[ANIMATIONS] ??= {};\n animations.detachedLeaveAnimationFns = [];\n let child = view[TVIEW$1].firstChild;\n while (child) {\n initNestedViewDetachAnimations(view, child);\n child = child.next;\n }\n}\nfunction initNestedViewDetachAnimations(lView, tNode) {\n if (tNode.type & 12) {\n const lContainer = lView[tNode.index];\n if (isLContainer(lContainer)) {\n for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n const subView = lContainer[i];\n if (subView[TVIEW$1].type === 2) {\n initViewDetachAnimationsImpl(subView);\n }\n }\n }\n }\n let child = tNode.child;\n while (child) {\n initNestedViewDetachAnimations(lView, child);\n child = child.next;\n }\n}\nfunction clearViewDetachAnimationsImpl(view) {\n const animations = view[ANIMATIONS];\n if (animations && animations.detachedLeaveAnimationFns && animations.detachedLeaveAnimationFns.length > 0) {\n const injector = view[INJECTOR];\n removeFromAnimationQueue(injector, animations);\n allLeavingAnimations.delete(view[ID]);\n animations.detachedLeaveAnimationFns = undefined;\n } else if (animations) {\n animations.detachedLeaveAnimationFns = undefined;\n }\n let child = view[TVIEW$1].firstChild;\n while (child) {\n clearNestedViewDetachAnimations(view, child);\n child = child.next;\n }\n}\nfunction clearNestedViewDetachAnimations(lView, tNode) {\n if (tNode.type & 12) {\n const lContainer = lView[tNode.index];\n if (isLContainer(lContainer)) {\n for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n const subView = lContainer[i];\n if (subView[TVIEW$1].type === 2) {\n clearViewDetachAnimationsImpl(subView);\n }\n }\n }\n }\n let child = tNode.child;\n while (child) {\n clearNestedViewDetachAnimations(lView, child);\n child = child.next;\n }\n}\n\nfunction applyToElementOrContainer(action, renderer, injector, parent, lNodeToHandle, tNode, beforeNode, parentLView) {\n if (lNodeToHandle != null) {\n let lContainer;\n let isComponent = false;\n if (isLContainer(lNodeToHandle)) {\n lContainer = lNodeToHandle;\n } else if (isLView(lNodeToHandle)) {\n isComponent = true;\n ngDevMode && assertDefined(lNodeToHandle[HOST], 'HOST must be defined for a component LView');\n lNodeToHandle = lNodeToHandle[HOST];\n }\n const rNode = unwrapRNode(lNodeToHandle);\n if (action === 0 && parent !== null) {\n maybeQueueEnterAnimation(parentLView, parent, tNode, injector);\n if (beforeNode == null) {\n nativeAppendChild(renderer, parent, rNode);\n } else {\n nativeInsertBefore(renderer, parent, rNode, beforeNode || null, true);\n }\n } else if (action === 1 && parent !== null) {\n nativeInsertBefore(renderer, parent, rNode, beforeNode || null, true);\n cancelLeavingNodes(tNode, rNode, parentLView);\n if (!reusedNodes.has(rNode)) {\n maybeQueueEnterAnimation(parentLView, parent, tNode, injector);\n }\n } else if (action === 2) {\n if (parentLView?.[ANIMATIONS]?.leave?.has(tNode.index)) {\n trackLeavingNodes(tNode, rNode, parentLView);\n }\n reusedNodes.delete(rNode);\n runLeaveAnimationsWithCallback(parentLView, tNode, injector, nodeHasLeaveAnimations => {\n if (reusedNodes.has(rNode)) {\n reusedNodes.delete(rNode);\n return;\n }\n nativeRemoveNode(renderer, rNode, isComponent, nodeHasLeaveAnimations);\n });\n } else if (action === 3) {\n reusedNodes.delete(rNode);\n runLeaveAnimationsWithCallback(parentLView, tNode, injector, () => {\n renderer.destroyNode(rNode);\n });\n }\n if (lContainer != null) {\n applyContainer(renderer, action, injector, lContainer, tNode, parent, beforeNode);\n }\n }\n}\nfunction removeViewFromDOM(tView, lView) {\n detachViewFromDOM(tView, lView);\n lView[HOST] = null;\n lView[T_HOST] = null;\n}\nfunction addViewToDOM(tView, parentTNode, renderer, lView, parentNativeNode, beforeNode) {\n lView[HOST] = parentNativeNode;\n lView[T_HOST] = parentTNode;\n applyView(tView, lView, renderer, 1, parentNativeNode, beforeNode);\n}\nfunction detachViewFromDOM(tView, lView) {\n lView[ENVIRONMENT].changeDetectionScheduler?.notify(9);\n applyView(tView, lView, lView[RENDERER], 2, null, null);\n}\nfunction destroyViewTree(rootView) {\n let lViewOrLContainer = rootView[CHILD_HEAD];\n if (!lViewOrLContainer) {\n return cleanUpView(rootView[TVIEW$1], rootView);\n }\n while (lViewOrLContainer) {\n let next = null;\n if (isLView(lViewOrLContainer)) {\n next = lViewOrLContainer[CHILD_HEAD];\n } else {\n ngDevMode && assertLContainer(lViewOrLContainer);\n const firstView = lViewOrLContainer[CONTAINER_HEADER_OFFSET];\n if (firstView) next = firstView;\n }\n if (!next) {\n while (lViewOrLContainer && !lViewOrLContainer[NEXT] && lViewOrLContainer !== rootView) {\n if (isLView(lViewOrLContainer)) {\n cleanUpView(lViewOrLContainer[TVIEW$1], lViewOrLContainer);\n }\n lViewOrLContainer = lViewOrLContainer[PARENT];\n }\n if (lViewOrLContainer === null) lViewOrLContainer = rootView;\n if (isLView(lViewOrLContainer)) {\n cleanUpView(lViewOrLContainer[TVIEW$1], lViewOrLContainer);\n }\n next = lViewOrLContainer && lViewOrLContainer[NEXT];\n }\n lViewOrLContainer = next;\n }\n}\nfunction detachMovedView(declarationContainer, lView) {\n ngDevMode && assertLContainer(declarationContainer);\n ngDevMode && assertDefined(declarationContainer[MOVED_VIEWS], 'A projected view should belong to a non-empty projected views collection');\n const movedViews = declarationContainer[MOVED_VIEWS];\n const declarationViewIndex = movedViews.indexOf(lView);\n movedViews.splice(declarationViewIndex, 1);\n}\nfunction destroyLView(tView, lView) {\n if (isDestroyed(lView)) {\n return;\n }\n const renderer = lView[RENDERER];\n if (renderer.destroyNode) {\n applyView(tView, lView, renderer, 3, null, null);\n }\n destroyViewTree(lView);\n}\nfunction cleanUpView(tView, lView) {\n if (isDestroyed(lView)) {\n return;\n }\n const prevConsumer = setActiveConsumer(null);\n try {\n lView[FLAGS] &= ~128;\n lView[FLAGS] |= 256;\n lView[REACTIVE_TEMPLATE_CONSUMER] && consumerDestroy(lView[REACTIVE_TEMPLATE_CONSUMER]);\n executeOnDestroys(tView, lView);\n processCleanups(tView, lView);\n if (lView[TVIEW$1].type === 1) {\n lView[RENDERER].destroy();\n }\n const declarationContainer = lView[DECLARATION_LCONTAINER];\n if (declarationContainer !== null && isLContainer(lView[PARENT])) {\n if (declarationContainer !== lView[PARENT]) {\n detachMovedView(declarationContainer, lView);\n }\n const lQueries = lView[QUERIES];\n if (lQueries !== null) {\n lQueries.detachView(tView);\n }\n }\n unregisterLView(lView);\n } finally {\n setActiveConsumer(prevConsumer);\n }\n}\nfunction processCleanups(tView, lView) {\n ngDevMode && assertNotReactive(processCleanups.name);\n const tCleanup = tView.cleanup;\n const lCleanup = lView[CLEANUP];\n if (tCleanup !== null) {\n for (let i = 0; i < tCleanup.length - 1; i += 2) {\n if (typeof tCleanup[i] === 'string') {\n const targetIdx = tCleanup[i + 3];\n ngDevMode && assertNumber(targetIdx, 'cleanup target must be a number');\n if (targetIdx >= 0) {\n lCleanup[targetIdx]();\n } else {\n lCleanup[-targetIdx].unsubscribe();\n }\n i += 2;\n } else {\n const context = lCleanup[tCleanup[i + 1]];\n tCleanup[i].call(context);\n }\n }\n }\n if (lCleanup !== null) {\n lView[CLEANUP] = null;\n }\n const destroyHooks = lView[ON_DESTROY_HOOKS];\n if (destroyHooks !== null) {\n lView[ON_DESTROY_HOOKS] = null;\n for (let i = 0; i < destroyHooks.length; i++) {\n const destroyHooksFn = destroyHooks[i];\n ngDevMode && assertFunction(destroyHooksFn, 'Expecting destroy hook to be a function.');\n destroyHooksFn();\n }\n }\n const effects = lView[EFFECTS];\n if (effects !== null) {\n lView[EFFECTS] = null;\n for (const effect of effects) {\n effect.destroy();\n }\n }\n}\nfunction executeOnDestroys(tView, lView) {\n ngDevMode && assertNotReactive(executeOnDestroys.name);\n let destroyHooks;\n if (tView != null && (destroyHooks = tView.destroyHooks) != null) {\n for (let i = 0; i < destroyHooks.length; i += 2) {\n const context = lView[destroyHooks[i]];\n if (!(context instanceof NodeInjectorFactory)) {\n const toCall = destroyHooks[i + 1];\n if (Array.isArray(toCall)) {\n for (let j = 0; j < toCall.length; j += 2) {\n const callContext = context[toCall[j]];\n const hook = toCall[j + 1];\n profiler(ProfilerEvent.LifecycleHookStart, callContext, hook);\n try {\n hook.call(callContext);\n } finally {\n profiler(ProfilerEvent.LifecycleHookEnd, callContext, hook);\n }\n }\n } else {\n profiler(ProfilerEvent.LifecycleHookStart, context, toCall);\n try {\n toCall.call(context);\n } finally {\n profiler(ProfilerEvent.LifecycleHookEnd, context, toCall);\n }\n }\n }\n }\n }\n}\nfunction getParentRElement(tView, tNode, lView) {\n if (tNode === null) {\n throw new RuntimeError(510, ngDevMode && 'getParentRElement() was called with a null TNode, so no parent element could be resolved. This usually means a TNode was never created for this node, or was already destroyed.');\n }\n return getClosestRElement(tView, tNode.parent, lView);\n}\nfunction getClosestRElement(tView, tNode, lView) {\n let parentTNode = tNode;\n while (parentTNode !== null && parentTNode.type & (8 | 32 | 128)) {\n tNode = parentTNode;\n parentTNode = tNode.parent;\n }\n if (parentTNode === null) {\n return lView[HOST];\n } else {\n ngDevMode && assertTNodeType(parentTNode, 3 | 4);\n if (isComponentHost(parentTNode)) {\n ngDevMode && assertTNodeForLView(parentTNode, lView);\n const {\n encapsulation\n } = tView.data[parentTNode.directiveStart + parentTNode.componentOffset];\n if (encapsulation === ViewEncapsulation.None || encapsulation === ViewEncapsulation.Emulated) {\n return null;\n }\n }\n return getNativeByTNode(parentTNode, lView);\n }\n}\nfunction getInsertInFrontOfRNode(parentTNode, currentTNode, lView) {\n return _getInsertInFrontOfRNodeWithI18n(parentTNode, currentTNode, lView);\n}\nfunction getInsertInFrontOfRNodeWithNoI18n(parentTNode, currentTNode, lView) {\n if (parentTNode.type & (8 | 32)) {\n return getNativeByTNode(parentTNode, lView);\n }\n return null;\n}\nlet _getInsertInFrontOfRNodeWithI18n = getInsertInFrontOfRNodeWithNoI18n;\nlet _processI18nInsertBefore;\nfunction setI18nHandling(getInsertInFrontOfRNodeWithI18n, processI18nInsertBefore) {\n _getInsertInFrontOfRNodeWithI18n = getInsertInFrontOfRNodeWithI18n;\n _processI18nInsertBefore = processI18nInsertBefore;\n}\nfunction appendChild(tView, lView, childRNode, childTNode) {\n const parentRNode = getParentRElement(tView, childTNode, lView);\n const renderer = lView[RENDERER];\n const parentTNode = childTNode.parent || lView[T_HOST];\n const anchorNode = getInsertInFrontOfRNode(parentTNode, childTNode, lView);\n if (parentRNode != null) {\n if (Array.isArray(childRNode)) {\n for (let i = 0; i < childRNode.length; i++) {\n nativeAppendOrInsertBefore(renderer, parentRNode, childRNode[i], anchorNode, false);\n }\n } else {\n nativeAppendOrInsertBefore(renderer, parentRNode, childRNode, anchorNode, false);\n }\n }\n _processI18nInsertBefore !== undefined && _processI18nInsertBefore(renderer, childTNode, lView, childRNode, parentRNode);\n}\nfunction getFirstNativeNode(lView, tNode) {\n if (tNode !== null) {\n ngDevMode && assertTNodeType(tNode, 3 | 12 | 32 | 16 | 128);\n const tNodeType = tNode.type;\n if (tNodeType & 3) {\n return getNativeByTNode(tNode, lView);\n } else if (tNodeType & 4) {\n return getBeforeNodeForView(-1, lView[tNode.index]);\n } else if (tNodeType & 8) {\n const elIcuContainerChild = tNode.child;\n if (elIcuContainerChild !== null) {\n return getFirstNativeNode(lView, elIcuContainerChild);\n } else {\n const rNodeOrLContainer = lView[tNode.index];\n if (isLContainer(rNodeOrLContainer)) {\n return getBeforeNodeForView(-1, rNodeOrLContainer);\n } else {\n return unwrapRNode(rNodeOrLContainer);\n }\n }\n } else if (tNodeType & 128) {\n return getFirstNativeNode(lView, tNode.next);\n } else if (tNodeType & 32) {\n let nextRNode = icuContainerIterate(tNode, lView);\n let rNode = nextRNode();\n return rNode || unwrapRNode(lView[tNode.index]);\n } else {\n const projectionNodes = getProjectionNodes(lView, tNode);\n if (projectionNodes !== null) {\n if (Array.isArray(projectionNodes)) {\n return projectionNodes[0];\n }\n const parentView = getLViewParent(lView[DECLARATION_COMPONENT_VIEW]);\n ngDevMode && assertParentView(parentView);\n return getFirstNativeNode(parentView, projectionNodes);\n } else {\n return getFirstNativeNode(lView, tNode.next);\n }\n }\n }\n return null;\n}\nfunction getProjectionNodes(lView, tNode) {\n if (tNode !== null) {\n const componentView = lView[DECLARATION_COMPONENT_VIEW];\n const componentHost = componentView[T_HOST];\n const slotIdx = tNode.projection;\n ngDevMode && assertProjectionSlots(lView);\n return componentHost.projection[slotIdx];\n }\n return null;\n}\nfunction getBeforeNodeForView(viewIndexInContainer, lContainer) {\n const nextViewIndex = CONTAINER_HEADER_OFFSET + viewIndexInContainer + 1;\n if (nextViewIndex < lContainer.length) {\n const lView = lContainer[nextViewIndex];\n const firstTNodeOfView = lView[TVIEW$1].firstChild;\n if (firstTNodeOfView !== null) {\n return getFirstNativeNode(lView, firstTNodeOfView);\n }\n }\n return lContainer[NATIVE];\n}\nfunction applyNodes(renderer, action, tNode, lView, parentRElement, beforeNode, isProjection) {\n while (tNode != null) {\n ngDevMode && assertTNodeForLView(tNode, lView);\n const injector = lView[INJECTOR];\n if (tNode.type === 128) {\n tNode = tNode.next;\n continue;\n }\n ngDevMode && assertTNodeType(tNode, 3 | 12 | 16 | 32);\n const rawSlotValue = lView[tNode.index];\n const tNodeType = tNode.type;\n if (isProjection) {\n if (action === 0) {\n rawSlotValue && attachPatchData(unwrapRNode(rawSlotValue), lView);\n tNode.flags |= 2;\n }\n }\n if (!isDetachedByI18n(tNode)) {\n if (tNodeType & 8) {\n applyNodes(renderer, action, tNode.child, lView, parentRElement, beforeNode, false);\n applyToElementOrContainer(action, renderer, injector, parentRElement, rawSlotValue, tNode, beforeNode, lView);\n } else if (tNodeType & 32) {\n const nextRNode = icuContainerIterate(tNode, lView);\n let rNode;\n while (rNode = nextRNode()) {\n applyToElementOrContainer(action, renderer, injector, parentRElement, rNode, tNode, beforeNode, lView);\n }\n applyToElementOrContainer(action, renderer, injector, parentRElement, rawSlotValue, tNode, beforeNode, lView);\n } else if (tNodeType & 16) {\n applyProjectionRecursive(renderer, action, lView, tNode, parentRElement, beforeNode);\n } else {\n ngDevMode && assertTNodeType(tNode, 3 | 4);\n applyToElementOrContainer(action, renderer, injector, parentRElement, rawSlotValue, tNode, beforeNode, lView);\n }\n }\n tNode = isProjection ? tNode.projectionNext : tNode.next;\n }\n}\nfunction applyView(tView, lView, renderer, action, parentRElement, beforeNode) {\n if (tView.type === 3) {\n applyForeignNodes(renderer, action, lView, parentRElement, beforeNode);\n } else {\n applyNodes(renderer, action, tView.firstChild, lView, parentRElement, beforeNode, false);\n }\n}\nfunction applyForeignNodes(renderer, action, lView, parent, beforeNode) {\n const tView = lView[TVIEW$1];\n const headTNode = tView.firstChild;\n const tailTNode = headTNode.next;\n const head = unwrapRNode(lView[headTNode.index]);\n const tail = unwrapRNode(lView[tailTNode.index]);\n const fragmentSlotIndex = tailTNode.index + 1;\n let fragment = lView[fragmentSlotIndex];\n if (action === 1 || action === 0) {\n if (parent !== null) {\n if (fragment && fragment.hasChildNodes()) {\n nativeInsertBefore(renderer, parent, fragment, beforeNode, true);\n } else {\n nativeInsertBefore(renderer, parent, head, beforeNode, true);\n nativeInsertBefore(renderer, parent, tail, beforeNode, true);\n }\n }\n } else if (action === 2) {\n if (!fragment) {\n fragment = document.createDocumentFragment();\n lView[fragmentSlotIndex] = fragment;\n }\n if (head && head.parentNode === fragment) {\n return;\n }\n let current = head;\n while (current !== null) {\n const next = current.nextSibling;\n fragment.appendChild(current);\n if (current === tail) break;\n current = next;\n }\n }\n}\nfunction applyProjection(tView, lView, tProjectionNode) {\n const renderer = lView[RENDERER];\n const parentRNode = getParentRElement(tView, tProjectionNode, lView);\n const parentTNode = tProjectionNode.parent || lView[T_HOST];\n let beforeNode = getInsertInFrontOfRNode(parentTNode, tProjectionNode, lView);\n applyProjectionRecursive(renderer, 0, lView, tProjectionNode, parentRNode, beforeNode);\n}\nfunction applyProjectionRecursive(renderer, action, lView, tProjectionNode, parentRElement, beforeNode) {\n const componentLView = lView[DECLARATION_COMPONENT_VIEW];\n const componentNode = componentLView[T_HOST];\n ngDevMode && assertEqual(typeof tProjectionNode.projection, 'number', 'expecting projection index');\n const nodeToProjectOrRNodes = componentNode.projection[tProjectionNode.projection];\n if (Array.isArray(nodeToProjectOrRNodes)) {\n for (let i = 0; i < nodeToProjectOrRNodes.length; i++) {\n const rNode = nodeToProjectOrRNodes[i];\n applyToElementOrContainer(action, renderer, lView[INJECTOR], parentRElement, rNode, tProjectionNode, beforeNode, lView);\n }\n } else {\n let nodeToProject = nodeToProjectOrRNodes;\n const projectedComponentLView = componentLView[PARENT];\n if (hasInSkipHydrationBlockFlag(tProjectionNode)) {\n nodeToProject.flags |= 128;\n }\n applyNodes(renderer, action, nodeToProject, projectedComponentLView, parentRElement, beforeNode, true);\n }\n}\nfunction applyContainer(renderer, action, injector, lContainer, tNode, parentRElement, beforeNode) {\n ngDevMode && assertLContainer(lContainer);\n const anchor = lContainer[NATIVE];\n const native = unwrapRNode(lContainer);\n if (anchor !== native) {\n applyToElementOrContainer(action, renderer, injector, parentRElement, anchor, tNode, beforeNode);\n }\n if ((lContainer[FLAGS] & 4) !== 0) {\n return;\n }\n for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n const lView = lContainer[i];\n applyView(lView[TVIEW$1], lView, renderer, action, parentRElement, anchor);\n }\n}\nfunction applyStyling(renderer, isClassBased, rNode, prop, value) {\n if (isClassBased) {\n if (!value) {\n renderer.removeClass(rNode, prop);\n } else {\n renderer.addClass(rNode, prop);\n }\n } else {\n let flags = prop.indexOf('-') === -1 ? undefined : RendererStyleFlags2.DashCase;\n if (value == null) {\n renderer.removeStyle(rNode, prop, flags);\n } else {\n const isImportant = typeof value === 'string' ? value.endsWith('!important') : false;\n if (isImportant) {\n value = value.slice(0, -10);\n flags |= RendererStyleFlags2.Important;\n }\n renderer.setStyle(rNode, prop, value, flags);\n }\n }\n}\n\nfunction createTView(type, declTNode, templateFn, decls, vars, directives, pipes, viewQuery, schemas, constsOrFactory, ssrId) {\n const bindingStartIndex = HEADER_OFFSET + decls;\n const initialViewLength = bindingStartIndex + vars;\n const blueprint = createViewBlueprint(bindingStartIndex, initialViewLength);\n const consts = typeof constsOrFactory === 'function' ? constsOrFactory() : constsOrFactory;\n const tView = blueprint[TVIEW$1] = {\n type: type,\n blueprint: blueprint,\n template: templateFn,\n queries: null,\n viewQuery: viewQuery,\n declTNode: declTNode,\n data: blueprint.slice().fill(null, bindingStartIndex),\n bindingStartIndex: bindingStartIndex,\n expandoStartIndex: initialViewLength,\n hostBindingOpCodes: null,\n firstCreatePass: true,\n firstUpdatePass: true,\n staticViewQueries: false,\n staticContentQueries: false,\n preOrderHooks: null,\n preOrderCheckHooks: null,\n contentHooks: null,\n contentCheckHooks: null,\n viewHooks: null,\n viewCheckHooks: null,\n destroyHooks: null,\n cleanup: null,\n contentQueries: null,\n components: null,\n directiveRegistry: typeof directives === 'function' ? directives() : directives,\n pipeRegistry: typeof pipes === 'function' ? pipes() : pipes,\n firstChild: null,\n schemas: schemas,\n consts: consts,\n incompleteFirstPass: false,\n ssrId\n };\n if (ngDevMode) {\n Object.seal(tView);\n }\n return tView;\n}\nfunction createViewBlueprint(bindingStartIndex, initialViewLength) {\n const blueprint = [];\n for (let i = 0; i < initialViewLength; i++) {\n blueprint.push(i < bindingStartIndex ? null : NO_CHANGE);\n }\n return blueprint;\n}\nfunction getOrCreateComponentTView(def) {\n const tView = def.tView;\n if (tView === null || tView.incompleteFirstPass) {\n const declTNode = null;\n return def.tView = createTView(1, declTNode, def.template, def.decls, def.vars, def.directiveDefs, def.pipeDefs, def.viewQuery, def.schemas, def.consts, def.id);\n }\n return tView;\n}\nfunction createLView(parentLView, tView, context, flags, host, tHostNode, environment, renderer, injector, embeddedViewInjector, hydrationInfo) {\n const lView = tView.blueprint.slice();\n lView[HOST] = host;\n lView[FLAGS] = flags | 4 | 128 | 8 | 64 | 1024;\n if (embeddedViewInjector !== null || parentLView && parentLView[FLAGS] & 2048) {\n lView[FLAGS] |= 2048;\n }\n resetPreOrderHookFlags(lView);\n ngDevMode && tView.declTNode && parentLView && assertTNodeForLView(tView.declTNode, parentLView);\n lView[PARENT] = lView[DECLARATION_VIEW] = parentLView;\n lView[CONTEXT] = context;\n lView[ENVIRONMENT] = environment || parentLView && parentLView[ENVIRONMENT];\n ngDevMode && assertDefined(lView[ENVIRONMENT], 'LViewEnvironment is required');\n lView[RENDERER] = renderer || parentLView && parentLView[RENDERER];\n ngDevMode && assertDefined(lView[RENDERER], 'Renderer is required');\n lView[INJECTOR] = injector || parentLView && parentLView[INJECTOR] || null;\n lView[T_HOST] = tHostNode;\n lView[ID] = getUniqueLViewId();\n lView[HYDRATION] = hydrationInfo;\n lView[EMBEDDED_VIEW_INJECTOR] = embeddedViewInjector;\n ngDevMode && assertEqual(tView.type == 2 ? parentLView !== null : true, true, 'Embedded views must have parentLView');\n lView[DECLARATION_COMPONENT_VIEW] = tView.type == 2 ? parentLView[DECLARATION_COMPONENT_VIEW] : lView;\n return lView;\n}\nfunction createComponentLView(lView, hostTNode, def) {\n const native = getNativeByTNode(hostTNode, lView);\n const tView = getOrCreateComponentTView(def);\n const rendererFactory = lView[ENVIRONMENT].rendererFactory;\n const componentView = addToEndOfViewTree(lView, createLView(lView, tView, null, getInitialLViewFlagsFromDef(def), native, hostTNode, null, rendererFactory.createRenderer(native, def), null, null, null));\n return lView[hostTNode.index] = componentView;\n}\nfunction getInitialLViewFlagsFromDef(def) {\n let flags = 16;\n if (def.signals) {\n flags = 4096;\n } else if (def.onPush) {\n flags = 64;\n }\n return flags;\n}\nfunction allocExpando(tView, lView, numSlotsToAlloc, initialValue) {\n if (numSlotsToAlloc === 0) return -1;\n if (ngDevMode) {\n assertFirstCreatePass(tView);\n assertSame(tView, lView[TVIEW$1], '`LView` must be associated with `TView`!');\n assertEqual(tView.data.length, lView.length, 'Expecting LView to be same size as TView');\n assertEqual(tView.data.length, tView.blueprint.length, 'Expecting Blueprint to be same size as TView');\n assertFirstUpdatePass(tView);\n }\n const allocIdx = lView.length;\n for (let i = 0; i < numSlotsToAlloc; i++) {\n lView.push(initialValue);\n tView.blueprint.push(initialValue);\n tView.data.push(null);\n }\n return allocIdx;\n}\nfunction addToEndOfViewTree(lView, lViewOrLContainer) {\n if (lView[CHILD_HEAD]) {\n lView[CHILD_TAIL][NEXT] = lViewOrLContainer;\n } else {\n lView[CHILD_HEAD] = lViewOrLContainer;\n }\n lView[CHILD_TAIL] = lViewOrLContainer;\n return lViewOrLContainer;\n}\n\nfunction ษตษตadvance(delta = 1) {\n ngDevMode && assertGreaterThan(delta, 0, 'Can only advance forward');\n selectIndexInternal(getTView(), getLView(), getSelectedIndex() + delta, !!ngDevMode && isInCheckNoChangesMode());\n}\nfunction selectIndexInternal(tView, lView, index, checkNoChangesMode) {\n ngDevMode && assertIndexInDeclRange(lView[TVIEW$1], index);\n if (!checkNoChangesMode) {\n const hooksInitPhaseCompleted = (lView[FLAGS] & 3) === 3;\n if (hooksInitPhaseCompleted) {\n const preOrderCheckHooks = tView.preOrderCheckHooks;\n if (preOrderCheckHooks !== null) {\n executeCheckHooks(lView, preOrderCheckHooks, index);\n }\n } else {\n const preOrderHooks = tView.preOrderHooks;\n if (preOrderHooks !== null) {\n executeInitAndCheckHooks(lView, preOrderHooks, 0, index);\n }\n }\n }\n setSelectedIndex(index);\n}\n\nvar InputFlags = /*#__PURE__*/ (function (InputFlags) {\n InputFlags[InputFlags[\"None\"] = 0] = \"None\";\n InputFlags[InputFlags[\"SignalBased\"] = 1] = \"SignalBased\";\n InputFlags[InputFlags[\"HasDecoratorInputTransform\"] = 2] = \"HasDecoratorInputTransform\";\n; return InputFlags;})(InputFlags || {});\n\n\nfunction writeToDirectiveInput(def, instance, publicName, value) {\n const prevConsumer = setActiveConsumer(null);\n try {\n if (ngDevMode) {\n if (!Object.hasOwn(def.inputs, publicName)) {\n throw new Error(`ASSERTION ERROR: Directive ${def.type.name} does not have an input with a public name of \"${publicName}\"`);\n }\n if (instance instanceof NodeInjectorFactory) {\n throw new Error(`ASSERTION ERROR: Cannot write input to factory for type ${def.type.name}. Directive has not been created yet.`);\n }\n }\n const [privateName, flags, transform] = def.inputs[publicName];\n let inputSignalNode = null;\n if ((flags & InputFlags.SignalBased) !== 0) {\n const field = instance[privateName];\n inputSignalNode = field[SIGNAL];\n }\n if (inputSignalNode !== null && inputSignalNode.transformFn !== undefined) {\n value = inputSignalNode.transformFn(value);\n } else if (transform !== null) {\n value = transform.call(instance, value);\n }\n if (def.setInput !== null) {\n def.setInput(instance, inputSignalNode, value, publicName, privateName);\n } else {\n applyValueToInputField(instance, inputSignalNode, privateName, value);\n }\n } finally {\n setActiveConsumer(prevConsumer);\n }\n}\n\nfunction executeTemplate(tView, lView, templateFn, rf, context) {\n const prevSelectedIndex = getSelectedIndex();\n const isUpdatePhase = rf & 2;\n try {\n setSelectedIndex(-1);\n if (isUpdatePhase && lView.length > HEADER_OFFSET) {\n selectIndexInternal(tView, lView, HEADER_OFFSET, !!ngDevMode && isInCheckNoChangesMode());\n }\n const preHookType = isUpdatePhase ? ProfilerEvent.TemplateUpdateStart : ProfilerEvent.TemplateCreateStart;\n profiler(preHookType, context, templateFn);\n templateFn(rf, context);\n } finally {\n setSelectedIndex(prevSelectedIndex);\n const postHookType = isUpdatePhase ? ProfilerEvent.TemplateUpdateEnd : ProfilerEvent.TemplateCreateEnd;\n profiler(postHookType, context, templateFn);\n }\n}\nfunction createDirectivesInstances(tView, lView, tNode) {\n instantiateAllDirectives(tView, lView, tNode);\n if ((tNode.flags & 64) === 64) {\n invokeDirectivesHostBindings(tView, lView, tNode);\n }\n}\nfunction saveResolvedLocalsInData(viewData, tNode, localRefExtractor = getNativeByTNode) {\n const localNames = tNode.localNames;\n if (localNames !== null) {\n let localIndex = tNode.index + 1;\n for (let i = 0; i < localNames.length; i += 2) {\n const index = localNames[i + 1];\n const value = index === -1 ? localRefExtractor(tNode, viewData) : viewData[index];\n viewData[localIndex++] = value;\n }\n }\n}\nfunction locateHostElement(renderer, elementOrSelector, encapsulation, injector) {\n const preserveHostContent = injector.get(PRESERVE_HOST_CONTENT, PRESERVE_HOST_CONTENT_DEFAULT);\n const preserveContent = preserveHostContent || encapsulation === ViewEncapsulation.ShadowDom || encapsulation === ViewEncapsulation.ExperimentalIsolatedShadowDom;\n const rootElement = renderer.selectRootElement(elementOrSelector, preserveContent);\n applyRootElementTransform(rootElement);\n return rootElement;\n}\nfunction applyRootElementTransform(rootElement) {\n _applyRootElementTransformImpl(rootElement);\n}\nlet _applyRootElementTransformImpl = () => null;\nfunction applyRootElementTransformImpl(rootElement) {\n if (hasSkipHydrationAttrOnRElement(rootElement)) {\n clearElementContents(rootElement);\n } else {\n processTextNodeMarkersBeforeHydration(rootElement);\n }\n}\nfunction enableApplyRootElementTransformImpl() {\n _applyRootElementTransformImpl = applyRootElementTransformImpl;\n}\nfunction mapPropName(name) {\n if (name === 'class') return 'className';\n if (name === 'for') return 'htmlFor';\n if (name === 'formaction') return 'formAction';\n if (name === 'innerHtml') return 'innerHTML';\n if (name === 'readonly') return 'readOnly';\n if (name === 'tabindex') return 'tabIndex';\n return name;\n}\nfunction setPropertyAndInputs(tNode, lView, propName, value, renderer, sanitizer) {\n ngDevMode && assertNotSame(value, NO_CHANGE, 'Incoming value should never be NO_CHANGE.');\n const tView = lView[TVIEW$1];\n const hasSetInput = setAllInputsForProperty(tNode, tView, lView, propName, value);\n if (hasSetInput) {\n isComponentHost(tNode) && markDirtyIfOnPush(lView, tNode.index);\n ngDevMode && setNgReflectProperties(lView, tView, tNode, propName, value);\n return;\n }\n if (tNode.type & 3) {\n propName = mapPropName(propName);\n }\n setDomProperty(tNode, lView, propName, value, renderer, sanitizer);\n}\nfunction setDomProperty(tNode, lView, propName, value, renderer, sanitizer) {\n if (tNode.type & 3) {\n const element = getNativeByTNode(tNode, lView);\n if (ngDevMode) {\n if (lView[TVIEW$1].firstUpdatePass) {\n validateAgainstEventProperties(propName);\n }\n if (!isPropertyValid(element, propName, tNode.value, lView[TVIEW$1].schemas)) {\n handleUnknownPropertyError(propName, tNode.value, tNode.type, lView);\n }\n }\n value = sanitizer != null ? sanitizer(value, tNode.value || '', propName) : value;\n value = unwrapImgVideoSrcValue(propName, element, value);\n renderer.setProperty(element, propName, value);\n } else if (tNode.type & 12) {\n if (ngDevMode && !matchingSchemas(lView[TVIEW$1].schemas, tNode.value)) {\n handleUnknownPropertyError(propName, tNode.value, tNode.type, lView);\n }\n }\n}\nfunction unwrapImgVideoSrcValue(propName, element, value) {\n if (propName === 'src' && (element.tagName === 'IMG' || element.tagName === 'VIDEO')) {\n if (value == null) {\n return '';\n }\n return unwrapSafeValue(value);\n }\n return value;\n}\nfunction markDirtyIfOnPush(lView, viewIndex) {\n ngDevMode && assertLView(lView);\n const childComponentLView = getComponentLViewByIndex(viewIndex, lView);\n if (!(childComponentLView[FLAGS] & 16)) {\n childComponentLView[FLAGS] |= 64;\n }\n}\nfunction setNgReflectProperty(lView, tNode, attrName, value) {\n const environment = lView[ENVIRONMENT];\n if (!environment.ngReflect) {\n return;\n }\n const element = getNativeByTNode(tNode, lView);\n const renderer = lView[RENDERER];\n attrName = normalizeDebugBindingName(attrName);\n const debugValue = normalizeDebugBindingValue(value);\n if (tNode.type & 3) {\n if (value == null) {\n renderer.removeAttribute(element, attrName);\n } else {\n renderer.setAttribute(element, attrName, debugValue);\n }\n } else {\n const textContent = escapeCommentText(`bindings=${JSON.stringify({\n [attrName]: debugValue\n }, null, 2)}`);\n renderer.setValue(element, textContent);\n }\n}\nfunction setNgReflectProperties(lView, tView, tNode, publicName, value) {\n const environment = lView[ENVIRONMENT];\n if (!environment.ngReflect || !(tNode.type & (3 | 4))) {\n return;\n }\n const inputConfig = tNode.inputs?.[publicName];\n const hostInputConfig = tNode.hostDirectiveInputs?.[publicName];\n if (hostInputConfig) {\n for (let i = 0; i < hostInputConfig.length; i += 2) {\n const index = hostInputConfig[i];\n const publicName = hostInputConfig[i + 1];\n const def = tView.data[index];\n setNgReflectProperty(lView, tNode, def.inputs[publicName][0], value);\n }\n }\n if (inputConfig) {\n for (const index of inputConfig) {\n const def = tView.data[index];\n setNgReflectProperty(lView, tNode, def.inputs[publicName][0], value);\n }\n }\n}\nfunction instantiateAllDirectives(tView, lView, tNode) {\n const start = tNode.directiveStart;\n const end = tNode.directiveEnd;\n if (isComponentHost(tNode)) {\n ngDevMode && assertTNodeType(tNode, 3);\n createComponentLView(lView, tNode, tView.data[start + tNode.componentOffset]);\n }\n if (!tView.firstCreatePass) {\n getOrCreateNodeInjectorForNode(tNode, lView);\n }\n const initialInputs = tNode.initialInputs;\n for (let i = start; i < end; i++) {\n const def = tView.data[i];\n const directive = getNodeInjectable(lView, tView, i, tNode);\n attachPatchData(directive, lView);\n if (initialInputs !== null) {\n setInputsFromAttrs(lView, i - start, directive, def, tNode, initialInputs);\n }\n if (isComponentDef(def)) {\n const componentView = getComponentLViewByIndex(tNode.index, lView);\n componentView[CONTEXT] = getNodeInjectable(lView, tView, i, tNode);\n }\n }\n}\nfunction invokeDirectivesHostBindings(tView, lView, tNode) {\n const start = tNode.directiveStart;\n const end = tNode.directiveEnd;\n const elementIndex = tNode.index;\n const currentDirectiveIndex = getCurrentDirectiveIndex();\n try {\n setSelectedIndex(elementIndex);\n for (let dirIndex = start; dirIndex < end; dirIndex++) {\n const def = tView.data[dirIndex];\n const directive = lView[dirIndex];\n setCurrentDirectiveIndex(dirIndex);\n if (def.hostBindings !== null || def.hostVars !== 0 || def.hostAttrs !== null) {\n invokeHostBindingsInCreationMode(def, directive);\n }\n }\n } finally {\n setSelectedIndex(-1);\n setCurrentDirectiveIndex(currentDirectiveIndex);\n }\n}\nfunction invokeHostBindingsInCreationMode(def, directive) {\n if (def.hostBindings !== null) {\n def.hostBindings(1, directive);\n }\n}\nfunction findDirectiveDefMatches(tView, tNode) {\n ngDevMode && assertFirstCreatePass(tView);\n ngDevMode && assertTNodeType(tNode, 3 | 12);\n const registry = tView.directiveRegistry;\n let matches = null;\n if (registry) {\n for (let i = 0; i < registry.length; i++) {\n const def = registry[i];\n if (isNodeMatchingSelectorList(tNode, def.selectors, false)) {\n matches ??= [];\n if (isComponentDef(def)) {\n if (ngDevMode) {\n assertTNodeType(tNode, 2, `\"${tNode.value}\" tags cannot be used as component hosts. ` + `Please use a different tag to activate the ${stringify(def.type)} component.`);\n if (matches.length && isComponentDef(matches[0])) {\n throwMultipleComponentError(tNode, matches.find(isComponentDef).type, def.type);\n }\n }\n matches.unshift(def);\n } else {\n matches.push(def);\n }\n }\n }\n }\n return matches;\n}\nfunction elementAttributeInternal(tNode, lView, name, value, sanitizer, namespace) {\n if (ngDevMode) {\n assertNotSame(value, NO_CHANGE, 'Incoming value should never be NO_CHANGE.');\n assertTNodeType(tNode, 2, `Attempted to set attribute \\`${name}\\` on a container node. ` + `Host bindings are not valid on ng-container or ng-template.`);\n }\n const element = getNativeByTNode(tNode, lView);\n value = unwrapImgVideoSrcValue(name, element, value);\n setElementAttribute(lView[RENDERER], element, namespace, tNode.value, name, value, sanitizer);\n}\nfunction setElementAttribute(renderer, element, namespace, tagName, name, value, sanitizer) {\n if (value == null) {\n if (sanitizer != null) {\n sanitizer(value, tagName || '', name);\n }\n renderer.removeAttribute(element, name, namespace);\n } else {\n const strValue = sanitizer == null ? renderStringify(value) : sanitizer(value, tagName || '', name);\n renderer.setAttribute(element, name, strValue, namespace);\n }\n}\nfunction setInputsFromAttrs(lView, directiveIndex, instance, def, tNode, initialInputData) {\n const initialInputs = initialInputData[directiveIndex];\n if (initialInputs !== null) {\n for (let i = 0; i < initialInputs.length; i += 2) {\n const lookupName = initialInputs[i];\n const value = initialInputs[i + 1];\n writeToDirectiveInput(def, instance, lookupName, value);\n if (ngDevMode) {\n setNgReflectProperty(lView, tNode, def.inputs[lookupName][0], value);\n }\n }\n }\n}\nfunction elementLikeStartShared(tNode, lView, index, name, locateOrCreateNativeNode) {\n const adjustedIndex = HEADER_OFFSET + index;\n const tView = lView[TVIEW$1];\n const native = locateOrCreateNativeNode(tView, lView, tNode, name, index);\n lView[adjustedIndex] = native;\n setCurrentTNode(tNode, true);\n const isElement = tNode.type === 2;\n if (isElement) {\n setupStaticAttributes(lView[RENDERER], native, tNode);\n if (getElementDepthCount() === 0 || isDirectiveHost(tNode)) {\n attachPatchData(native, lView);\n }\n increaseElementDepthCount();\n } else {\n attachPatchData(native, lView);\n }\n if (wasLastNodeCreated() && (!isElement || !isDetachedByI18n(tNode))) {\n appendChild(tView, lView, native, tNode);\n }\n return tNode;\n}\nfunction elementLikeEndShared(tNode) {\n let currentTNode = tNode;\n if (isCurrentTNodeParent()) {\n setCurrentTNodeAsNotParent();\n } else {\n ngDevMode && assertHasParent(getCurrentTNode());\n currentTNode = currentTNode.parent;\n setCurrentTNode(currentTNode, false);\n }\n return currentTNode;\n}\nfunction storePropertyBindingMetadata(tData, tNode, propertyName, bindingIndex, ...interpolationParts) {\n if (tData[bindingIndex] === null) {\n if (!tNode.inputs?.[propertyName] && !tNode.hostDirectiveInputs?.[propertyName]) {\n const propBindingIdxs = tNode.propertyBindings || (tNode.propertyBindings = []);\n propBindingIdxs.push(bindingIndex);\n let bindingMetadata = propertyName;\n if (interpolationParts.length > 0) {\n bindingMetadata += INTERPOLATION_DELIMITER + interpolationParts.join(INTERPOLATION_DELIMITER);\n }\n tData[bindingIndex] = bindingMetadata;\n }\n }\n}\nfunction loadComponentRenderer(currentDef, tNode, lView) {\n if (currentDef === null || isComponentDef(currentDef)) {\n lView = unwrapLView(lView[tNode.index]);\n }\n return lView[RENDERER];\n}\nfunction handleUncaughtError(lView, error) {\n const injector = lView[INJECTOR];\n if (!injector) {\n return;\n }\n let errorHandler;\n try {\n errorHandler = injector.get(INTERNAL_APPLICATION_ERROR_HANDLER, null);\n } catch {\n errorHandler = null;\n }\n errorHandler?.(error);\n}\nfunction setAllInputsForProperty(tNode, tView, lView, publicName, value) {\n const inputs = tNode.inputs?.[publicName];\n const hostDirectiveInputs = tNode.hostDirectiveInputs?.[publicName];\n let hasMatch = false;\n if (hostDirectiveInputs) {\n for (let i = 0; i < hostDirectiveInputs.length; i += 2) {\n const index = hostDirectiveInputs[i];\n ngDevMode && assertIndexInRange(lView, index);\n const publicName = hostDirectiveInputs[i + 1];\n const def = tView.data[index];\n writeToDirectiveInput(def, lView[index], publicName, value);\n hasMatch = true;\n }\n }\n if (inputs) {\n for (const index of inputs) {\n ngDevMode && assertIndexInRange(lView, index);\n const instance = lView[index];\n const def = tView.data[index];\n writeToDirectiveInput(def, instance, publicName, value);\n hasMatch = true;\n }\n }\n return hasMatch;\n}\nfunction setDirectiveInput(tNode, tView, lView, target, publicName, value) {\n let hostIndex = null;\n let hostDirectivesStart = null;\n let hostDirectivesEnd = null;\n let hasSet = false;\n if (ngDevMode && !tNode.directiveToIndex?.has(target.type)) {\n throw new Error(`Node does not have a directive with type ${target.type.name}`);\n }\n const data = tNode.directiveToIndex.get(target.type);\n if (typeof data === 'number') {\n hostIndex = data;\n } else {\n [hostIndex, hostDirectivesStart, hostDirectivesEnd] = data;\n }\n if (hostDirectivesStart !== null && hostDirectivesEnd !== null && tNode.hostDirectiveInputs && Object.hasOwn(tNode.hostDirectiveInputs, publicName)) {\n const hostDirectiveInputs = tNode.hostDirectiveInputs[publicName];\n for (let i = 0; i < hostDirectiveInputs.length; i += 2) {\n const index = hostDirectiveInputs[i];\n if (index >= hostDirectivesStart && index <= hostDirectivesEnd) {\n ngDevMode && assertIndexInRange(lView, index);\n const def = tView.data[index];\n const hostDirectivePublicName = hostDirectiveInputs[i + 1];\n writeToDirectiveInput(def, lView[index], hostDirectivePublicName, value);\n hasSet = true;\n } else if (index > hostDirectivesEnd) {\n break;\n }\n }\n }\n if (hostIndex !== null && Object.hasOwn(target.inputs, publicName)) {\n ngDevMode && assertIndexInRange(lView, hostIndex);\n writeToDirectiveInput(target, lView[hostIndex], publicName, value);\n hasSet = true;\n }\n return hasSet;\n}\n\nfunction renderComponent(hostLView, componentHostIdx) {\n ngDevMode && assertEqual(isCreationMode(hostLView), true, 'Should be run in creation mode');\n const componentView = getComponentLViewByIndex(componentHostIdx, hostLView);\n const componentTView = componentView[TVIEW$1];\n syncViewWithBlueprint(componentTView, componentView);\n const hostRNode = componentView[HOST];\n if (hostRNode !== null && componentView[HYDRATION] === null) {\n componentView[HYDRATION] = retrieveHydrationInfo(hostRNode, componentView[INJECTOR]);\n }\n profiler(ProfilerEvent.ComponentStart);\n try {\n renderView(componentTView, componentView, componentView[CONTEXT]);\n } finally {\n profiler(ProfilerEvent.ComponentEnd, componentView[CONTEXT]);\n }\n}\nfunction syncViewWithBlueprint(tView, lView) {\n for (let i = lView.length; i < tView.blueprint.length; i++) {\n lView.push(tView.blueprint[i]);\n }\n}\nfunction renderView(tView, lView, context) {\n ngDevMode && assertEqual(isCreationMode(lView), true, 'Should be run in creation mode');\n ngDevMode && assertNotReactive(renderView.name);\n enterView(lView);\n try {\n const viewQuery = tView.viewQuery;\n if (viewQuery !== null) {\n executeViewQueryFn(1, viewQuery, context);\n }\n const templateFn = tView.template;\n if (templateFn !== null) {\n executeTemplate(tView, lView, templateFn, 1, context);\n }\n if (tView.firstCreatePass) {\n tView.firstCreatePass = false;\n }\n lView[QUERIES]?.finishViewCreation(tView);\n if (tView.staticContentQueries) {\n refreshContentQueries(tView, lView);\n }\n if (tView.staticViewQueries) {\n executeViewQueryFn(2, tView.viewQuery, context);\n }\n const components = tView.components;\n if (components !== null) {\n renderChildComponents(lView, components);\n }\n } catch (error) {\n if (tView.firstCreatePass) {\n tView.incompleteFirstPass = true;\n tView.firstCreatePass = false;\n }\n throw error;\n } finally {\n lView[FLAGS] &= -5;\n leaveView();\n }\n}\nfunction renderChildComponents(hostLView, components) {\n for (let i = 0; i < components.length; i++) {\n renderComponent(hostLView, components[i]);\n }\n}\n\nfunction createAndRenderEmbeddedLView(declarationLView, templateTNode, context, options) {\n const prevConsumer = setActiveConsumer(null);\n try {\n const embeddedTView = templateTNode.tView;\n ngDevMode && assertDefined(embeddedTView, 'TView must be defined for a template node.');\n ngDevMode && assertTNodeForLView(templateTNode, declarationLView);\n const isSignalView = declarationLView[FLAGS] & 4096;\n const viewFlags = isSignalView ? 4096 : 16;\n const embeddedLView = createLView(declarationLView, embeddedTView, context, viewFlags, null, templateTNode, null, null, options?.injector ?? null, options?.embeddedViewInjector ?? null, options?.dehydratedView ?? null);\n const declarationLContainer = declarationLView[templateTNode.index];\n ngDevMode && assertLContainer(declarationLContainer);\n embeddedLView[DECLARATION_LCONTAINER] = declarationLContainer;\n const declarationViewLQueries = declarationLView[QUERIES];\n if (declarationViewLQueries !== null) {\n embeddedLView[QUERIES] = declarationViewLQueries.createEmbeddedView(embeddedTView);\n }\n renderView(embeddedTView, embeddedLView, context);\n return embeddedLView;\n } finally {\n setActiveConsumer(prevConsumer);\n }\n}\nfunction shouldAddViewToDom(tNode, dehydratedView) {\n return !dehydratedView || dehydratedView.firstChild === null || hasInSkipHydrationBlockFlag(tNode);\n}\n\nconst USE_EXHAUSTIVE_CHECK_NO_CHANGES_DEFAULT = false;\nconst UseExhaustiveCheckNoChanges = /*#__PURE__*/ new InjectionToken(typeof ngDevMode !== 'undefined' && ngDevMode ? 'exhaustive checkNoChanges' : '');\n\nfunction collectNativeNodes(tView, lView, tNode, result, isProjection = false) {\n if (tView.type === 3) {\n const headTNode = tView.firstChild;\n const tailTNode = headTNode.next;\n const head = unwrapRNode(lView[headTNode.index]);\n const tail = unwrapRNode(lView[tailTNode.index]);\n let current = head;\n while (current !== null) {\n result.push(current);\n if (current === tail) break;\n current = current.nextSibling;\n }\n return result;\n }\n while (tNode !== null) {\n if (tNode.type === 128) {\n tNode = isProjection ? tNode.projectionNext : tNode.next;\n continue;\n }\n ngDevMode && assertTNodeType(tNode, 3 | 12 | 16 | 32);\n const lNode = lView[tNode.index];\n if (lNode !== null) {\n if (isLContainer(lNode)) {\n const anchor = lNode[NATIVE];\n if (anchor !== lNode[HOST]) {\n result.push(unwrapRNode(lNode));\n }\n if (!(lNode[FLAGS] & 4)) {\n collectNativeNodesInLContainer(lNode, result);\n }\n result.push(anchor);\n } else {\n result.push(unwrapRNode(lNode));\n }\n }\n const tNodeType = tNode.type;\n if (tNodeType & 8) {\n collectNativeNodes(tView, lView, tNode.child, result);\n } else if (tNodeType & 32) {\n const nextRNode = icuContainerIterate(tNode, lView);\n let rNode;\n while (rNode = nextRNode()) {\n result.push(rNode);\n }\n } else if (tNodeType & 16) {\n const nodesInSlot = getProjectionNodes(lView, tNode);\n if (Array.isArray(nodesInSlot)) {\n result.push(...nodesInSlot);\n } else {\n const parentView = getLViewParent(lView[DECLARATION_COMPONENT_VIEW]);\n ngDevMode && assertParentView(parentView);\n collectNativeNodes(parentView[TVIEW$1], parentView, nodesInSlot, result, true);\n }\n }\n tNode = isProjection ? tNode.projectionNext : tNode.next;\n }\n return result;\n}\nfunction collectNativeNodesInLContainer(lContainer, result) {\n for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n const lViewInAContainer = lContainer[i];\n const lViewFirstChildTNode = lViewInAContainer[TVIEW$1].firstChild;\n if (lViewFirstChildTNode !== null) {\n collectNativeNodes(lViewInAContainer[TVIEW$1], lViewInAContainer, lViewFirstChildTNode, result);\n }\n }\n}\n\nfunction addAfterRenderSequencesForView(lView) {\n if (lView[AFTER_RENDER_SEQUENCES_TO_ADD] !== null) {\n for (const sequence of lView[AFTER_RENDER_SEQUENCES_TO_ADD]) {\n sequence.impl.addSequence(sequence);\n }\n lView[AFTER_RENDER_SEQUENCES_TO_ADD].length = 0;\n }\n}\n\nlet freeConsumers = [];\nfunction getOrBorrowReactiveLViewConsumer(lView) {\n return lView[REACTIVE_TEMPLATE_CONSUMER] ?? borrowReactiveLViewConsumer(lView);\n}\nfunction borrowReactiveLViewConsumer(lView) {\n const consumer = freeConsumers.pop() ?? Object.create(REACTIVE_LVIEW_CONSUMER_NODE);\n consumer.lView = lView;\n return consumer;\n}\nfunction maybeReturnReactiveLViewConsumer(consumer) {\n if (consumer.lView[REACTIVE_TEMPLATE_CONSUMER] === consumer) {\n return;\n }\n consumer.lView = null;\n freeConsumers.push(consumer);\n}\nconst REACTIVE_LVIEW_CONSUMER_NODE = {\n ...REACTIVE_NODE,\n consumerIsAlwaysLive: true,\n kind: 'template',\n consumerMarkedDirty: node => {\n markAncestorsForTraversal(node.lView);\n },\n consumerOnSignalRead() {\n this.lView[REACTIVE_TEMPLATE_CONSUMER] = this;\n }\n};\nfunction getOrCreateTemporaryConsumer(lView) {\n const consumer = lView[REACTIVE_TEMPLATE_CONSUMER] ?? Object.create(TEMPORARY_CONSUMER_NODE);\n consumer.lView = lView;\n return consumer;\n}\nconst TEMPORARY_CONSUMER_NODE = {\n ...REACTIVE_NODE,\n consumerIsAlwaysLive: true,\n kind: 'template',\n consumerMarkedDirty: node => {\n let parent = getLViewParent(node.lView);\n while (parent && !viewShouldHaveReactiveConsumer(parent[TVIEW$1])) {\n parent = getLViewParent(parent);\n }\n if (!parent) {\n return;\n }\n markViewForRefresh(parent);\n },\n consumerOnSignalRead() {\n this.lView[REACTIVE_TEMPLATE_CONSUMER] = this;\n }\n};\nfunction viewShouldHaveReactiveConsumer(tView) {\n return tView.type !== 2;\n}\nfunction isReactiveLViewConsumer(node) {\n return node.kind === 'template';\n}\n\nfunction runEffectsInView(view) {\n if (view[EFFECTS] === null) {\n return;\n }\n let tryFlushEffects = true;\n while (tryFlushEffects) {\n let foundDirtyEffect = false;\n for (const effect of view[EFFECTS]) {\n if (!effect.dirty) {\n continue;\n }\n foundDirtyEffect = true;\n if (effect.zone === null || Zone.current === effect.zone) {\n effect.run();\n } else {\n effect.zone.run(() => effect.run());\n }\n if (view[EFFECTS] === null) {\n return;\n }\n }\n tryFlushEffects = foundDirtyEffect && !!(view[FLAGS] & 8192);\n }\n}\n\nconst MAXIMUM_REFRESH_RERUNS$1 = 100;\nfunction detectChangesInternal(lView, mode = 0) {\n const environment = lView[ENVIRONMENT];\n const rendererFactory = environment.rendererFactory;\n const checkNoChangesMode = !!ngDevMode && isInCheckNoChangesMode();\n if (!checkNoChangesMode) {\n rendererFactory.begin?.();\n }\n try {\n detectChangesInViewWhileDirty(lView, mode);\n } finally {\n if (!checkNoChangesMode) {\n rendererFactory.end?.();\n }\n }\n}\nfunction detectChangesInViewWhileDirty(lView, mode) {\n const lastIsRefreshingViewsValue = isRefreshingViews();\n try {\n setIsRefreshingViews(true);\n detectChangesInView(lView, mode);\n if (ngDevMode && isExhaustiveCheckNoChanges()) {\n return;\n }\n let retries = 0;\n while (requiresRefreshOrTraversal(lView)) {\n if (retries === MAXIMUM_REFRESH_RERUNS$1) {\n throw new RuntimeError(103, ngDevMode && 'Infinite change detection while trying to refresh views. ' + 'There may be components which each cause the other to require a refresh, ' + 'causing an infinite loop.');\n }\n retries++;\n detectChangesInView(lView, 1);\n }\n } finally {\n setIsRefreshingViews(lastIsRefreshingViewsValue);\n }\n}\nfunction checkNoChangesInternal(lView, exhaustive) {\n setIsInCheckNoChangesMode(exhaustive ? CheckNoChangesMode.Exhaustive : CheckNoChangesMode.OnlyDirtyViews);\n try {\n detectChangesInternal(lView);\n } finally {\n setIsInCheckNoChangesMode(CheckNoChangesMode.Off);\n }\n}\nfunction refreshView(tView, lView, templateFn, context) {\n ngDevMode && assertEqual(isCreationMode(lView), false, 'Should be run in update mode');\n if (isDestroyed(lView)) return;\n const flags = lView[FLAGS];\n const isInCheckNoChangesPass = ngDevMode && isInCheckNoChangesMode();\n const isInExhaustiveCheckNoChangesPass = ngDevMode && isExhaustiveCheckNoChanges();\n enterView(lView);\n let returnConsumerToPool = true;\n let prevConsumer = null;\n let currentConsumer = null;\n if (!isInCheckNoChangesPass) {\n if (viewShouldHaveReactiveConsumer(tView)) {\n currentConsumer = getOrBorrowReactiveLViewConsumer(lView);\n prevConsumer = consumerBeforeComputation(currentConsumer);\n } else if (getActiveConsumer() === null) {\n returnConsumerToPool = false;\n currentConsumer = getOrCreateTemporaryConsumer(lView);\n prevConsumer = consumerBeforeComputation(currentConsumer);\n } else if (lView[REACTIVE_TEMPLATE_CONSUMER]) {\n consumerDestroy(lView[REACTIVE_TEMPLATE_CONSUMER]);\n lView[REACTIVE_TEMPLATE_CONSUMER] = null;\n }\n }\n try {\n resetPreOrderHookFlags(lView);\n setBindingIndex(tView.bindingStartIndex);\n if (templateFn !== null) {\n executeTemplate(tView, lView, templateFn, 2, context);\n }\n const hooksInitPhaseCompleted = (flags & 3) === 3;\n if (!isInCheckNoChangesPass) {\n if (hooksInitPhaseCompleted) {\n const preOrderCheckHooks = tView.preOrderCheckHooks;\n if (preOrderCheckHooks !== null) {\n executeCheckHooks(lView, preOrderCheckHooks, null);\n }\n } else {\n const preOrderHooks = tView.preOrderHooks;\n if (preOrderHooks !== null) {\n executeInitAndCheckHooks(lView, preOrderHooks, 0, null);\n }\n incrementInitPhaseFlags(lView, 0);\n }\n }\n if (!isInExhaustiveCheckNoChangesPass) {\n markTransplantedViewsForRefresh(lView);\n }\n runEffectsInView(lView);\n detectChangesInEmbeddedViews(lView, 0);\n if (tView.contentQueries !== null) {\n refreshContentQueries(tView, lView);\n }\n if (!isInCheckNoChangesPass) {\n if (hooksInitPhaseCompleted) {\n const contentCheckHooks = tView.contentCheckHooks;\n if (contentCheckHooks !== null) {\n executeCheckHooks(lView, contentCheckHooks);\n }\n } else {\n const contentHooks = tView.contentHooks;\n if (contentHooks !== null) {\n executeInitAndCheckHooks(lView, contentHooks, 1);\n }\n incrementInitPhaseFlags(lView, 1);\n }\n }\n processHostBindingOpCodes(tView, lView);\n const components = tView.components;\n if (components !== null) {\n detectChangesInChildComponents(lView, components, 0);\n }\n const viewQuery = tView.viewQuery;\n if (viewQuery !== null) {\n executeViewQueryFn(2, viewQuery, context);\n }\n if (!isInCheckNoChangesPass) {\n if (hooksInitPhaseCompleted) {\n const viewCheckHooks = tView.viewCheckHooks;\n if (viewCheckHooks !== null) {\n executeCheckHooks(lView, viewCheckHooks);\n }\n } else {\n const viewHooks = tView.viewHooks;\n if (viewHooks !== null) {\n executeInitAndCheckHooks(lView, viewHooks, 2);\n }\n incrementInitPhaseFlags(lView, 2);\n }\n }\n if (tView.firstUpdatePass === true) {\n tView.firstUpdatePass = false;\n }\n if (lView[EFFECTS_TO_SCHEDULE]) {\n for (const notifyEffect of lView[EFFECTS_TO_SCHEDULE]) {\n notifyEffect();\n }\n lView[EFFECTS_TO_SCHEDULE] = null;\n }\n if (!isInCheckNoChangesPass) {\n addAfterRenderSequencesForView(lView);\n lView[FLAGS] &= ~(64 | 8);\n }\n } catch (e) {\n handleViewError(lView, e, isInCheckNoChangesPass);\n } finally {\n if (currentConsumer !== null) {\n consumerAfterComputation(currentConsumer, prevConsumer);\n if (returnConsumerToPool) {\n maybeReturnReactiveLViewConsumer(currentConsumer);\n }\n }\n leaveView();\n }\n}\nfunction handleViewError(lView, e, isInCheckNoChangesPass) {\n let handled = false;\n let errorToHandle = e;\n let currentLView = lView;\n const prevConsumer = setActiveConsumer(null);\n try {\n while (currentLView !== null) {\n if (isLContainer(currentLView)) {\n currentLView = currentLView[PARENT];\n continue;\n }\n const onError = currentLView[ON_ERROR];\n if (onError) {\n try {\n const declarationInstance = lView[DECLARATION_COMPONENT_VIEW][CONTEXT];\n const declarationType = declarationInstance?.constructor;\n const details = {\n declarationInstance,\n declarationType,\n caughtBy: onError\n };\n const prevConsumer = setActiveConsumer(null);\n try {\n onError(encapsulateBoundaryError(errorToHandle), details);\n } finally {\n setActiveConsumer(prevConsumer);\n }\n handled = true;\n break;\n } catch (boundaryError) {\n errorToHandle = boundaryError;\n }\n }\n currentLView = currentLView[PARENT];\n }\n } finally {\n setActiveConsumer(prevConsumer);\n }\n if (!handled) {\n if (!isInCheckNoChangesPass) {\n markAncestorsForTraversal(lView);\n }\n throw errorToHandle;\n }\n}\nfunction detectChangesInEmbeddedViews(lView, mode) {\n for (let lContainer = getFirstLContainer(lView); lContainer !== null; lContainer = getNextLContainer(lContainer)) {\n for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n const embeddedLView = lContainer[i];\n detectChangesInViewIfAttached(embeddedLView, mode);\n }\n }\n}\nfunction markTransplantedViewsForRefresh(lView) {\n for (let lContainer = getFirstLContainer(lView); lContainer !== null; lContainer = getNextLContainer(lContainer)) {\n if (!(lContainer[FLAGS] & 2)) continue;\n const movedViews = lContainer[MOVED_VIEWS];\n ngDevMode && assertDefined(movedViews, 'Transplanted View flags set but missing MOVED_VIEWS');\n for (let i = 0; i < movedViews.length; i++) {\n const movedLView = movedViews[i];\n markViewForRefresh(movedLView);\n }\n }\n}\nfunction detectChangesInComponent(hostLView, componentHostIdx, mode) {\n ngDevMode && assertEqual(isCreationMode(hostLView), false, 'Should be run in update mode');\n profiler(ProfilerEvent.ComponentStart);\n const componentView = getComponentLViewByIndex(componentHostIdx, hostLView);\n try {\n detectChangesInViewIfAttached(componentView, mode);\n } finally {\n profiler(ProfilerEvent.ComponentEnd, componentView[CONTEXT]);\n }\n}\nfunction detectChangesInViewIfAttached(lView, mode) {\n if (!viewAttachedToChangeDetector(lView)) {\n return;\n }\n detectChangesInView(lView, mode);\n}\nfunction detectChangesInView(lView, mode) {\n const isInCheckNoChangesPass = ngDevMode && isInCheckNoChangesMode();\n const tView = lView[TVIEW$1];\n const flags = lView[FLAGS];\n const consumer = lView[REACTIVE_TEMPLATE_CONSUMER];\n let shouldRefreshView = !!(mode === 0 && flags & 16);\n shouldRefreshView ||= !!(flags & 64 && mode === 0 && !isInCheckNoChangesPass);\n shouldRefreshView ||= !!(flags & 1024);\n shouldRefreshView ||= !!(consumer?.dirty && consumerPollProducersForChange(consumer));\n shouldRefreshView ||= !!(ngDevMode && isExhaustiveCheckNoChanges());\n if (consumer) {\n consumer.dirty = false;\n }\n lView[FLAGS] &= -9217;\n if (shouldRefreshView) {\n refreshView(tView, lView, tView.template, lView[CONTEXT]);\n } else if (flags & 8192) {\n const prevConsumer = setActiveConsumer(null);\n try {\n if (!isInCheckNoChangesPass) {\n try {\n runEffectsInView(lView);\n } catch (e) {\n handleViewError(lView, e, isInCheckNoChangesPass);\n }\n }\n detectChangesInEmbeddedViews(lView, 1);\n const components = tView.components;\n if (components !== null) {\n detectChangesInChildComponents(lView, components, 1);\n }\n if (!isInCheckNoChangesPass) {\n addAfterRenderSequencesForView(lView);\n }\n } finally {\n setActiveConsumer(prevConsumer);\n }\n }\n}\nfunction detectChangesInChildComponents(hostLView, components, mode) {\n for (let i = 0; i < components.length; i++) {\n detectChangesInComponent(hostLView, components[i], mode);\n }\n}\nfunction processHostBindingOpCodes(tView, lView) {\n const hostBindingOpCodes = tView.hostBindingOpCodes;\n if (hostBindingOpCodes === null) return;\n try {\n for (let i = 0; i < hostBindingOpCodes.length; i++) {\n const opCode = hostBindingOpCodes[i];\n if (opCode < 0) {\n setSelectedIndex(~opCode);\n } else {\n const directiveIdx = opCode;\n const bindingRootIndx = hostBindingOpCodes[++i];\n const hostBindingFn = hostBindingOpCodes[++i];\n setBindingRootForHostBindings(bindingRootIndx, directiveIdx);\n const context = lView[directiveIdx];\n profiler(ProfilerEvent.HostBindingsUpdateStart, context);\n try {\n hostBindingFn(2, context);\n } finally {\n profiler(ProfilerEvent.HostBindingsUpdateEnd, context);\n }\n }\n }\n } finally {\n setSelectedIndex(-1);\n }\n}\n\nfunction markViewDirty(lView, source) {\n const dirtyBitsToUse = isRefreshingViews() ? 64 : 1024 | 64;\n lView[ENVIRONMENT].changeDetectionScheduler?.notify(source);\n while (lView) {\n lView[FLAGS] |= dirtyBitsToUse;\n const parent = getLViewParent(lView);\n if (isRootView(lView) && !parent) {\n return lView;\n }\n lView = parent;\n }\n return null;\n}\n\nfunction createLContainer(hostNative, currentView, native, tNode) {\n ngDevMode && assertLView(currentView);\n const lContainer = [hostNative, true, 0, currentView, null, tNode, null, native, null, null];\n ngDevMode && assertEqual(lContainer.length, CONTAINER_HEADER_OFFSET, 'Should allocate correct number of slots for LContainer header.');\n return lContainer;\n}\nfunction getLViewFromLContainer(lContainer, index) {\n const adjustedIndex = CONTAINER_HEADER_OFFSET + index;\n if (adjustedIndex < lContainer.length) {\n const lView = lContainer[adjustedIndex];\n ngDevMode && assertLView(lView);\n return lView;\n }\n return undefined;\n}\nfunction addLViewToLContainer(lContainer, lView, index, addToDOM = true) {\n const tView = lView[TVIEW$1];\n insertView(tView, lView, lContainer, index);\n if (addToDOM) {\n const beforeNode = getBeforeNodeForView(index, lContainer);\n const renderer = lView[RENDERER];\n const parentRNode = renderer.parentNode(lContainer[NATIVE]);\n if (parentRNode !== null) {\n addViewToDOM(tView, lContainer[T_HOST], renderer, lView, parentRNode, beforeNode);\n }\n }\n const hydrationInfo = lView[HYDRATION];\n if (hydrationInfo !== null && hydrationInfo.firstChild !== null) {\n hydrationInfo.firstChild = null;\n }\n}\nfunction removeLViewFromLContainer(lContainer, index) {\n const lView = detachView(lContainer, index);\n if (lView !== undefined) {\n destroyLView(lView[TVIEW$1], lView);\n }\n return lView;\n}\nfunction detachView(lContainer, removeIndex) {\n if (lContainer.length <= CONTAINER_HEADER_OFFSET) return;\n const indexInContainer = CONTAINER_HEADER_OFFSET + removeIndex;\n const viewToDetach = lContainer[indexInContainer];\n if (viewToDetach) {\n const declarationLContainer = viewToDetach[DECLARATION_LCONTAINER];\n if (declarationLContainer !== null && declarationLContainer !== lContainer) {\n detachMovedView(declarationLContainer, viewToDetach);\n }\n if (removeIndex > 0) {\n lContainer[indexInContainer - 1][NEXT] = viewToDetach[NEXT];\n }\n const removedLView = removeFromArray(lContainer, CONTAINER_HEADER_OFFSET + removeIndex);\n removeViewFromDOM(viewToDetach[TVIEW$1], viewToDetach);\n const lQueries = removedLView[QUERIES];\n if (lQueries !== null) {\n lQueries.detachView(removedLView[TVIEW$1]);\n }\n viewToDetach[PARENT] = null;\n viewToDetach[NEXT] = null;\n viewToDetach[FLAGS] &= -129;\n }\n return viewToDetach;\n}\nfunction insertView(tView, lView, lContainer, index) {\n ngDevMode && assertLView(lView);\n ngDevMode && assertLContainer(lContainer);\n const indexInContainer = CONTAINER_HEADER_OFFSET + index;\n const containerLength = lContainer.length;\n if (index > 0) {\n lContainer[indexInContainer - 1][NEXT] = lView;\n }\n if (index < containerLength - CONTAINER_HEADER_OFFSET) {\n lView[NEXT] = lContainer[indexInContainer];\n addToArray(lContainer, CONTAINER_HEADER_OFFSET + index, lView);\n } else {\n lContainer.push(lView);\n lView[NEXT] = null;\n }\n lView[PARENT] = lContainer;\n const declarationLContainer = lView[DECLARATION_LCONTAINER];\n if (declarationLContainer !== null && lContainer !== declarationLContainer) {\n trackMovedView(declarationLContainer, lView);\n }\n const lQueries = lView[QUERIES];\n if (lQueries !== null) {\n lQueries.insertView(tView);\n }\n updateAncestorTraversalFlagsOnAttach(lView);\n lView[FLAGS] |= 128;\n}\nfunction trackMovedView(declarationContainer, lView) {\n ngDevMode && assertDefined(lView, 'LView required');\n ngDevMode && assertLContainer(declarationContainer);\n const movedViews = declarationContainer[MOVED_VIEWS];\n const parent = lView[PARENT];\n ngDevMode && assertDefined(parent, 'missing parent');\n if (isLView(parent)) {\n declarationContainer[FLAGS] |= 2;\n } else {\n const insertedComponentLView = parent[PARENT][DECLARATION_COMPONENT_VIEW];\n ngDevMode && assertDefined(insertedComponentLView, 'Missing insertedComponentLView');\n const declaredComponentLView = lView[DECLARATION_COMPONENT_VIEW];\n ngDevMode && assertDefined(declaredComponentLView, 'Missing declaredComponentLView');\n if (declaredComponentLView !== insertedComponentLView) {\n declarationContainer[FLAGS] |= 2;\n }\n }\n if (movedViews === null) {\n declarationContainer[MOVED_VIEWS] = [lView];\n } else {\n movedViews.push(lView);\n }\n}\n\nclass ViewRef {\n _lView;\n _cdRefInjectingView;\n _appRef = null;\n _attachedToViewContainer = false;\n exhaustive;\n get rootNodes() {\n const lView = this._lView;\n const tView = lView[TVIEW$1];\n return collectNativeNodes(tView, lView, tView.firstChild, []);\n }\n constructor(_lView, _cdRefInjectingView) {\n this._lView = _lView;\n this._cdRefInjectingView = _cdRefInjectingView;\n }\n get context() {\n return this._lView[CONTEXT];\n }\n set context(value) {\n if (ngDevMode) {\n console.warn('Angular: Replacing the `context` object of an `EmbeddedViewRef` is deprecated.');\n }\n this._lView[CONTEXT] = value;\n }\n get destroyed() {\n return isDestroyed(this._lView);\n }\n destroy() {\n if (this._appRef) {\n this._appRef.detachView(this);\n } else if (this._attachedToViewContainer) {\n const parent = this._lView[PARENT];\n if (isLContainer(parent)) {\n const viewRefs = parent[VIEW_REFS];\n const index = viewRefs ? viewRefs.indexOf(this) : -1;\n if (index > -1) {\n ngDevMode && assertEqual(index, parent.indexOf(this._lView) - CONTAINER_HEADER_OFFSET, 'An attached view should be in the same position within its container as its ViewRef in the VIEW_REFS array.');\n detachView(parent, index);\n removeFromArray(viewRefs, index);\n }\n }\n this._attachedToViewContainer = false;\n }\n destroyLView(this._lView[TVIEW$1], this._lView);\n }\n onDestroy(callback) {\n storeLViewOnDestroy(this._lView, callback);\n }\n markForCheck() {\n markViewDirty(this._cdRefInjectingView || this._lView, 4);\n }\n detach() {\n this._lView[FLAGS] &= -129;\n }\n reattach() {\n updateAncestorTraversalFlagsOnAttach(this._lView);\n this._lView[FLAGS] |= 128;\n }\n detectChanges() {\n this._lView[FLAGS] |= 1024;\n detectChangesInternal(this._lView);\n }\n checkNoChanges() {\n if (ngDevMode) {\n try {\n this.exhaustive ??= this._lView[INJECTOR].get(UseExhaustiveCheckNoChanges, USE_EXHAUSTIVE_CHECK_NO_CHANGES_DEFAULT);\n } catch {\n this.exhaustive = USE_EXHAUSTIVE_CHECK_NO_CHANGES_DEFAULT;\n }\n checkNoChangesInternal(this._lView, this.exhaustive);\n }\n }\n attachToViewContainerRef() {\n if (this._appRef) {\n throw new RuntimeError(902, ngDevMode && 'This view is already attached directly to the ApplicationRef!');\n }\n this._attachedToViewContainer = true;\n }\n detachFromAppRef() {\n this._appRef = null;\n const isRoot = isRootView(this._lView);\n const declarationContainer = this._lView[DECLARATION_LCONTAINER];\n if (declarationContainer !== null && !isRoot) {\n detachMovedView(declarationContainer, this._lView);\n }\n detachViewFromDOM(this._lView[TVIEW$1], this._lView);\n }\n attachToAppRef(appRef) {\n if (this._attachedToViewContainer) {\n throw new RuntimeError(902, ngDevMode && 'This view is already attached to a ViewContainer!');\n }\n this._appRef = appRef;\n const isRoot = isRootView(this._lView);\n const declarationContainer = this._lView[DECLARATION_LCONTAINER];\n if (declarationContainer !== null && !isRoot) {\n trackMovedView(declarationContainer, this._lView);\n }\n updateAncestorTraversalFlagsOnAttach(this._lView);\n }\n}\nfunction isViewDirty(view) {\n return requiresRefreshOrTraversal(view._lView) || !!(view._lView[FLAGS] & 64);\n}\nfunction markForRefresh(view) {\n markViewForRefresh(view._lView);\n}\n\nlet TemplateRef = /*#__PURE__*/ (() => {\nclass TemplateRef {\n _declarationLView;\n _declarationTContainer;\n elementRef;\n static __NG_ELEMENT_ID__ = injectTemplateRef;\n constructor(_declarationLView, _declarationTContainer, elementRef) {\n this._declarationLView = _declarationLView;\n this._declarationTContainer = _declarationTContainer;\n this.elementRef = elementRef;\n }\n get ssrId() {\n return this._declarationTContainer.tView?.ssrId || null;\n }\n createEmbeddedView(context, injector) {\n return this.createEmbeddedViewImpl(context, injector);\n }\n createEmbeddedViewImpl(context, injector, dehydratedView) {\n const embeddedLView = createAndRenderEmbeddedLView(this._declarationLView, this._declarationTContainer, context, {\n embeddedViewInjector: injector,\n dehydratedView\n });\n return new ViewRef(embeddedLView);\n }\n}\nreturn TemplateRef;\n})();\nfunction injectTemplateRef() {\n return createTemplateRef(getCurrentTNode(), getLView());\n}\nfunction createTemplateRef(hostTNode, hostLView) {\n if (hostTNode.type & 4) {\n ngDevMode && assertDefined(hostTNode.tView, 'TView must be allocated');\n return new TemplateRef(hostLView, hostTNode, createElementRef(hostTNode, hostLView));\n }\n return null;\n}\n\nconst AT_THIS_LOCATION = '<-- AT THIS LOCATION';\nconst THIRD_PARTY_SCRIPTS_URL = `/guide/hydration#third-party-scripts-with-dom-manipulation`;\nfunction getFriendlyStringFromTNodeType(tNodeType) {\n switch (tNodeType) {\n case 4:\n return 'view container';\n case 2:\n return 'element';\n case 8:\n return 'ng-container';\n case 32:\n return 'icu';\n case 64:\n return 'i18n';\n case 16:\n return 'projection';\n case 1:\n return 'text';\n case 128:\n return '@let';\n default:\n return '';\n }\n}\nfunction validateMatchingNode(node, nodeType, tagName, lView, tNode, isViewContainerAnchor = false) {\n if (!node || node.nodeType !== nodeType || node.nodeType === Node.ELEMENT_NODE && node.tagName.toLowerCase() !== tagName?.toLowerCase()) {\n const expectedNode = shortRNodeDescription(nodeType, tagName, null);\n let header = `During hydration Angular expected ${expectedNode} but `;\n const hostComponentDef = getDeclarationComponentDef(lView);\n const componentClassName = hostComponentDef?.type?.name;\n const expectedDom = describeExpectedDom(lView, tNode, isViewContainerAnchor);\n const expected = `Angular expected this DOM:\\n\\n${expectedDom}\\n\\n`;\n let actual = '';\n const componentHostElement = unwrapRNode(lView[HOST]);\n if (!node) {\n header += `the node was not found.\\n\\n`;\n markRNodeAsHavingHydrationMismatch(componentHostElement, expectedDom);\n } else {\n const actualNode = shortRNodeDescription(node.nodeType, node.tagName ?? null, node.textContent ?? null);\n header += `found ${actualNode}.\\n\\n`;\n const actualDom = describeDomFromNode(node);\n actual = `Actual DOM is:\\n\\n${actualDom}\\n\\n`;\n markRNodeAsHavingHydrationMismatch(componentHostElement, expectedDom, actualDom);\n }\n const footer = getHydrationErrorFooter(componentClassName);\n let message = header + expected + actual + getHydrationAttributeNote() + footer;\n if (!node || node && isLikelyExternalSourceNode(node)) {\n message += `Note: It looks like this mismatch may have been caused by a third-party script or ` + `browser extension that modified the DOM outside of Angular's control. ` + `Angular hydration does not support nodes injected or removed outside of the Angular-managed DOM. ` + `Note: If you know which element in the DOM this will be inserted, consider adding ngSkipHydration to prevent this error. \\n\\n`;\n }\n throw new RuntimeError(-500, message);\n }\n}\nfunction validateSiblingNodeExists(node) {\n validateNodeExists(node);\n if (!node.nextSibling) {\n const header = 'During hydration Angular expected more sibling nodes to be present.\\n\\n';\n const actual = `Actual DOM is:\\n\\n${describeDomFromNode(node)}\\n\\n`;\n const footer = getHydrationErrorFooter();\n const message = header + actual + footer;\n markRNodeAsHavingHydrationMismatch(node, '', actual);\n throw new RuntimeError(-501, message);\n }\n}\nfunction validateNodeExists(node, lView = null, tNode = null) {\n if (!node) {\n const header = 'During hydration, Angular expected an element to be present at this location.\\n\\n';\n let expected = '';\n let footer = '';\n if (lView !== null && tNode !== null) {\n expected = describeExpectedDom(lView, tNode, false);\n footer = getHydrationErrorFooter();\n markRNodeAsHavingHydrationMismatch(unwrapRNode(lView[HOST]), expected, '');\n }\n throw new RuntimeError(-502, `${header}${expected}\\n\\n${footer}`);\n }\n}\nfunction nodeNotFoundError(lView, tNode) {\n const header = 'During serialization, Angular was unable to find an element in the DOM:\\n\\n';\n const expected = `${describeExpectedDom(lView, tNode, false)}\\n\\n`;\n const footer = getHydrationErrorFooter();\n throw new RuntimeError(-502, header + expected + footer);\n}\nfunction nodeNotFoundAtPathError(host, path) {\n const header = `During hydration Angular was unable to locate a node ` + `using the \"${path}\" path, starting from the ${describeRNode(host)} node.\\n\\n`;\n const footer = getHydrationErrorFooter();\n markRNodeAsHavingHydrationMismatch(host);\n throw new RuntimeError(-502, header + footer);\n}\nfunction unsupportedProjectionOfDomNodes(rNode) {\n const header = 'During serialization, Angular detected DOM nodes ' + 'that were created outside of Angular context and provided as projectable nodes ' + '(likely via `ViewContainerRef.createComponent` or `createComponent` APIs). ' + 'Hydration is not supported for such cases, consider refactoring the code to avoid ' + 'this pattern or using `ngSkipHydration` on the host element of the component.\\n\\n';\n const actual = `${describeDomFromNode(rNode)}\\n\\n`;\n const message = header + actual + getHydrationAttributeNote();\n return new RuntimeError(-503, message);\n}\nfunction invalidSkipHydrationHost(rNode) {\n const header = 'The `ngSkipHydration` flag is applied on a node ' + \"that doesn't act as a component host. Hydration can be \" + 'skipped only on per-component basis.\\n\\n';\n const actual = `${describeDomFromNode(rNode)}\\n\\n`;\n const footer = 'Please move the `ngSkipHydration` attribute to the component host element.\\n\\n';\n const message = header + actual + footer;\n return new RuntimeError(-504, message);\n}\nfunction stringifyTNodeAttrs(tNode) {\n const results = [];\n if (tNode.attrs) {\n for (let i = 0; i < tNode.attrs.length;) {\n const attrName = tNode.attrs[i++];\n if (typeof attrName == 'number') {\n break;\n }\n const attrValue = tNode.attrs[i++];\n results.push(`${attrName}=\"${shorten(attrValue)}\"`);\n }\n }\n return results.join(' ');\n}\nconst internalAttrs = /*#__PURE__*/ new Set(['ngh', 'ng-version', 'ng-server-context']);\nfunction stringifyRNodeAttrs(rNode) {\n const results = [];\n for (let i = 0; i < rNode.attributes.length; i++) {\n const attr = rNode.attributes[i];\n if (internalAttrs.has(attr.name)) continue;\n results.push(`${attr.name}=\"${shorten(attr.value)}\"`);\n }\n return results.join(' ');\n}\nfunction describeTNode(tNode, innerContent = 'โฆ') {\n switch (tNode.type) {\n case 1:\n const content = tNode.value ? `(${tNode.value})` : '';\n return `#text${content}`;\n case 2:\n const attrs = stringifyTNodeAttrs(tNode);\n const tag = tNode.value.toLowerCase();\n return `<${tag}${attrs ? ' ' + attrs : ''}>${innerContent}${tag}>`;\n case 8:\n return '';\n case 4:\n return '';\n default:\n const typeAsString = getFriendlyStringFromTNodeType(tNode.type);\n return `#node(${typeAsString})`;\n }\n}\nfunction describeRNode(rNode, innerContent = 'โฆ') {\n const node = rNode;\n switch (node.nodeType) {\n case Node.ELEMENT_NODE:\n const tag = node.tagName.toLowerCase();\n const attrs = stringifyRNodeAttrs(node);\n return `<${tag}${attrs ? ' ' + attrs : ''}>${innerContent}${tag}>`;\n case Node.TEXT_NODE:\n const content = node.textContent ? shorten(node.textContent) : '';\n return `#text${content ? `(${content})` : ''}`;\n case Node.COMMENT_NODE:\n return ``;\n default:\n return `#node(${node.nodeType})`;\n }\n}\nfunction describeExpectedDom(lView, tNode, isViewContainerAnchor) {\n const spacer = ' ';\n let content = '';\n if (tNode.prev) {\n content += spacer + 'โฆ\\n';\n content += spacer + describeTNode(tNode.prev) + '\\n';\n } else if (tNode.type && tNode.type & 12) {\n content += spacer + 'โฆ\\n';\n }\n if (isViewContainerAnchor) {\n content += spacer + describeTNode(tNode) + '\\n';\n content += spacer + ` ${AT_THIS_LOCATION}\\n`;\n } else {\n content += spacer + describeTNode(tNode) + ` ${AT_THIS_LOCATION}\\n`;\n }\n content += spacer + 'โฆ\\n';\n const parentRNode = tNode.type ? getParentRElement(lView[TVIEW$1], tNode, lView) : null;\n if (parentRNode) {\n content = describeRNode(parentRNode, '\\n' + content);\n }\n return content;\n}\nfunction describeDomFromNode(node) {\n const spacer = ' ';\n let content = '';\n const currentNode = node;\n if (currentNode.previousSibling) {\n content += spacer + 'โฆ\\n';\n content += spacer + describeRNode(currentNode.previousSibling) + '\\n';\n }\n content += spacer + describeRNode(currentNode) + ` ${AT_THIS_LOCATION}\\n`;\n if (node.nextSibling) {\n content += spacer + 'โฆ\\n';\n }\n if (node.parentNode) {\n content = describeRNode(currentNode.parentNode, '\\n' + content);\n }\n return content;\n}\nfunction shortRNodeDescription(nodeType, tagName, textContent) {\n switch (nodeType) {\n case Node.ELEMENT_NODE:\n return `<${tagName.toLowerCase()}>`;\n case Node.TEXT_NODE:\n const content = textContent ? ` (with the \"${shorten(textContent)}\" content)` : '';\n return `a text node${content}`;\n case Node.COMMENT_NODE:\n return 'a comment node';\n default:\n return `#node(nodeType=${nodeType})`;\n }\n}\nfunction getHydrationErrorFooter(componentClassName) {\n const componentInfo = componentClassName ? `the \"${componentClassName}\"` : 'corresponding';\n return `To fix this problem:\\n` + ` * check ${componentInfo} component for hydration-related issues\\n` + ` * check to see if your template has valid HTML structure\\n` + ` * check if there are any third-party scripts that manipulate the DOM. More info: ${DOC_PAGE_BASE_URL}${THIRD_PARTY_SCRIPTS_URL}\\n` + ` * or skip hydration by adding the \\`ngSkipHydration\\` attribute ` + `to its host node in a template\\n\\n`;\n}\nfunction isLikelyExternalSourceNode(rNode) {\n const node = rNode;\n if (node.nodeType !== Node.ELEMENT_NODE) {\n return false;\n }\n if (readPatchedData(node)) {\n return false;\n }\n return true;\n}\nfunction getHydrationAttributeNote() {\n return 'Note: attributes are only displayed to better represent the DOM' + ' but have no effect on hydration mismatches.\\n\\n';\n}\nfunction stripNewlines(input) {\n return input.replace(/\\s+/gm, '');\n}\nfunction shorten(input, maxLength = 50) {\n if (!input) {\n return '';\n }\n input = stripNewlines(input);\n return input.length > maxLength ? `${input.substring(0, maxLength - 1)}โฆ` : input;\n}\nfunction describeDomNode(node) {\n const textContent = node.textContent?.slice(0, 50);\n return textContent ? `${node.nodeName} (\"${textContent}\")` : node.nodeName;\n}\n\nfunction getInsertInFrontOfRNodeWithI18n(parentTNode, currentTNode, lView) {\n const tNodeInsertBeforeIndex = currentTNode.insertBeforeIndex;\n const insertBeforeIndex = Array.isArray(tNodeInsertBeforeIndex) ? tNodeInsertBeforeIndex[0] : tNodeInsertBeforeIndex;\n if (insertBeforeIndex === null) {\n return getInsertInFrontOfRNodeWithNoI18n(parentTNode, currentTNode, lView);\n } else {\n ngDevMode && assertIndexInRange(lView, insertBeforeIndex);\n return unwrapRNode(lView[insertBeforeIndex]);\n }\n}\nfunction processI18nInsertBefore(renderer, childTNode, lView, childRNode, parentRElement) {\n const tNodeInsertBeforeIndex = childTNode.insertBeforeIndex;\n if (Array.isArray(tNodeInsertBeforeIndex)) {\n ngDevMode && assertDomNode(childRNode);\n let i18nParent = childRNode;\n let anchorRNode = null;\n if (!(childTNode.type & 3)) {\n anchorRNode = i18nParent;\n i18nParent = parentRElement;\n }\n if (i18nParent !== null && childTNode.componentOffset === -1) {\n for (let i = 1; i < tNodeInsertBeforeIndex.length; i++) {\n const i18nChild = lView[tNodeInsertBeforeIndex[i]];\n nativeInsertBefore(renderer, i18nParent, i18nChild, anchorRNode, false);\n }\n }\n }\n}\n\nfunction getOrCreateTNode(tView, index, type, name, attrs) {\n ngDevMode && index !== 0 && assertGreaterThanOrEqual(index, HEADER_OFFSET, \"TNodes can't be in the LView header.\");\n ngDevMode && assertPureTNodeType(type);\n let tNode = tView.data[index];\n if (tNode === null) {\n tNode = createTNodeAtIndex(tView, index, type, name, attrs);\n if (isInI18nBlock()) {\n tNode.flags |= 32;\n }\n } else if (tNode.type & 64) {\n tNode.type = type;\n tNode.value = name;\n tNode.attrs = attrs;\n const parent = getCurrentParentTNode();\n tNode.injectorIndex = parent === null ? -1 : parent.injectorIndex;\n ngDevMode && assertTNodeForTView(tNode, tView);\n ngDevMode && assertEqual(index, tNode.index, 'Expecting same index');\n }\n setCurrentTNode(tNode, true);\n return tNode;\n}\nfunction createTNodeAtIndex(tView, index, type, name, attrs) {\n const currentTNode = getCurrentTNodePlaceholderOk();\n const isParent = isCurrentTNodeParent();\n const parent = isParent ? currentTNode : currentTNode && currentTNode.parent;\n const tNode = tView.data[index] = createTNode(tView, parent, type, index, name, attrs);\n linkTNodeInTView(tView, tNode, currentTNode, isParent);\n return tNode;\n}\nfunction linkTNodeInTView(tView, tNode, currentTNode, isParent) {\n if (tView.firstChild === null) {\n tView.firstChild = tNode;\n }\n if (currentTNode !== null) {\n if (isParent) {\n if (currentTNode.child == null && tNode.parent !== null) {\n currentTNode.child = tNode;\n }\n } else {\n if (currentTNode.next === null) {\n currentTNode.next = tNode;\n tNode.prev = currentTNode;\n }\n }\n }\n}\nfunction createTNode(tView, tParent, type, index, value, attrs) {\n ngDevMode && index !== 0 && assertGreaterThanOrEqual(index, HEADER_OFFSET, \"TNodes can't be in the LView header.\");\n ngDevMode && assertNotSame(attrs, undefined, \"'undefined' is not valid value for 'attrs'\");\n ngDevMode && tParent && assertTNodeForTView(tParent, tView);\n let injectorIndex = tParent ? tParent.injectorIndex : -1;\n let flags = 0;\n if (isInSkipHydrationBlock$1()) {\n flags |= 128;\n }\n const tNode = {\n type,\n index,\n insertBeforeIndex: null,\n injectorIndex,\n directiveStart: -1,\n directiveEnd: -1,\n directiveStylingLast: -1,\n componentOffset: -1,\n controlDirectiveIndex: -1,\n customControlIndex: -1,\n propertyBindings: null,\n flags,\n providerIndexes: 0,\n value: value,\n namespace: getNamespace(),\n attrs: attrs,\n mergedAttrs: null,\n localNames: null,\n initialInputs: null,\n inputs: null,\n hostDirectiveInputs: null,\n outputs: null,\n hostDirectiveOutputs: null,\n directiveToIndex: null,\n tView: null,\n next: null,\n prev: null,\n projectionNext: null,\n child: null,\n parent: tParent,\n projection: null,\n styles: null,\n stylesWithoutHost: null,\n residualStyles: undefined,\n classes: null,\n classesWithoutHost: null,\n residualClasses: undefined,\n classBindings: 0,\n styleBindings: 0\n };\n if (ngDevMode) {\n Object.seal(tNode);\n }\n return tNode;\n}\n\nfunction addTNodeAndUpdateInsertBeforeIndex(previousTNodes, newTNode) {\n ngDevMode && assertEqual(newTNode.insertBeforeIndex, null, 'We expect that insertBeforeIndex is not set');\n previousTNodes.push(newTNode);\n if (previousTNodes.length > 1) {\n for (let i = previousTNodes.length - 2; i >= 0; i--) {\n const existingTNode = previousTNodes[i];\n if (!isI18nText(existingTNode)) {\n if (isNewTNodeCreatedBefore(existingTNode, newTNode) && getInsertBeforeIndex(existingTNode) === null) {\n setInsertBeforeIndex(existingTNode, newTNode.index);\n }\n }\n }\n }\n}\nfunction isI18nText(tNode) {\n return !(tNode.type & 64);\n}\nfunction isNewTNodeCreatedBefore(existingTNode, newTNode) {\n return isI18nText(newTNode) || existingTNode.index > newTNode.index;\n}\nfunction getInsertBeforeIndex(tNode) {\n const index = tNode.insertBeforeIndex;\n return Array.isArray(index) ? index[0] : index;\n}\nfunction setInsertBeforeIndex(tNode, value) {\n const index = tNode.insertBeforeIndex;\n if (Array.isArray(index)) {\n index[0] = value;\n } else {\n setI18nHandling(getInsertInFrontOfRNodeWithI18n, processI18nInsertBefore);\n tNode.insertBeforeIndex = value;\n }\n}\n\nconst CURRENT_CASE_LVIEW_INDEX = /*#__PURE__*/ getClosureSafeProperty({\n currentCaseLViewIndex: getClosureSafeProperty\n});\nconst TVIEW = /*#__PURE__*/ getClosureSafeProperty({\n tView: getClosureSafeProperty\n});\nfunction getTIcu(tView, index) {\n const value = tView.data[index];\n if (value === null || typeof value === 'string') return null;\n if (ngDevMode && !(Object.hasOwn(value, TVIEW) || Object.hasOwn(value, CURRENT_CASE_LVIEW_INDEX))) {\n throwError(\"We expect to get 'null'|'TIcu'|'TIcuContainer', but got: \" + value);\n }\n const tIcu = Object.hasOwn(value, CURRENT_CASE_LVIEW_INDEX) ? value : value.value;\n ngDevMode && assertTIcu(tIcu);\n return tIcu;\n}\nfunction setTIcu(tView, index, tIcu) {\n const tNode = tView.data[index];\n ngDevMode && assertEqual(tNode === null || Object.hasOwn(tNode, TVIEW), true, \"We expect to get 'null'|'TIcuContainer'\");\n if (tNode === null) {\n tView.data[index] = tIcu;\n } else {\n ngDevMode && assertTNodeType(tNode, 32);\n tNode.value = tIcu;\n }\n}\nfunction setTNodeInsertBeforeIndex(tNode, index) {\n ngDevMode && assertTNode(tNode);\n let insertBeforeIndex = tNode.insertBeforeIndex;\n if (insertBeforeIndex === null) {\n setI18nHandling(getInsertInFrontOfRNodeWithI18n, processI18nInsertBefore);\n insertBeforeIndex = tNode.insertBeforeIndex = [null, index];\n } else {\n ngDevMode && assertEqual(Array.isArray(insertBeforeIndex), true, 'Expecting array here');\n insertBeforeIndex.push(index);\n }\n}\nfunction createTNodePlaceholder(tView, previousTNodes, index) {\n const tNode = createTNodeAtIndex(tView, index, 64, null, null);\n addTNodeAndUpdateInsertBeforeIndex(previousTNodes, tNode);\n return tNode;\n}\nfunction getCurrentICUCaseIndex(tIcu, lView) {\n const currentCase = lView[tIcu.currentCaseLViewIndex];\n return currentCase === null ? currentCase : currentCase < 0 ? ~currentCase : currentCase;\n}\nfunction getParentFromIcuCreateOpCode(mergedCode) {\n return mergedCode >>> 17;\n}\nfunction getRefFromIcuCreateOpCode(mergedCode) {\n return (mergedCode & 131070) >>> 1;\n}\nfunction getInstructionFromIcuCreateOpCode(mergedCode) {\n return mergedCode & 1;\n}\nfunction icuCreateOpCode(opCode, parentIdx, refIdx) {\n ngDevMode && assertGreaterThanOrEqual(parentIdx, 0, 'Missing parent index');\n ngDevMode && assertGreaterThan(refIdx, 0, 'Missing ref index');\n if (parentIdx > 32767 || refIdx > 65535) {\n throw new Error('ICU node index out of range (too many nodes in ICU case)');\n }\n return opCode | parentIdx << 17 | refIdx << 1;\n}\nfunction isRootTemplateMessage(subTemplateIndex) {\n return subTemplateIndex === -1;\n}\n\nfunction enterIcu(state, tIcu, lView) {\n state.index = 0;\n const currentCase = getCurrentICUCaseIndex(tIcu, lView);\n if (currentCase !== null) {\n ngDevMode && assertNumberInRange(currentCase, 0, tIcu.cases.length - 1);\n state.removes = tIcu.remove[currentCase];\n } else {\n state.removes = EMPTY_ARRAY;\n }\n}\nfunction icuContainerIteratorNext(state) {\n if (state.index < state.removes.length) {\n const removeOpCode = state.removes[state.index++];\n ngDevMode && assertNumber(removeOpCode, 'Expecting OpCode number');\n if (removeOpCode > 0) {\n const rNode = state.lView[removeOpCode];\n ngDevMode && assertDomNode(rNode);\n return rNode;\n } else {\n state.stack.push(state.index, state.removes);\n const tIcuIndex = ~removeOpCode;\n const tIcu = state.lView[TVIEW$1].data[tIcuIndex];\n ngDevMode && assertTIcu(tIcu);\n enterIcu(state, tIcu, state.lView);\n return icuContainerIteratorNext(state);\n }\n } else {\n if (state.stack.length === 0) {\n state.lView = undefined;\n return null;\n } else {\n state.removes = state.stack.pop();\n state.index = state.stack.pop();\n return icuContainerIteratorNext(state);\n }\n }\n}\nfunction loadIcuContainerVisitor() {\n const _state = {\n stack: [],\n index: -1\n };\n function icuContainerIteratorStart(tIcuContainerNode, lView) {\n _state.lView = lView;\n while (_state.stack.length) _state.stack.pop();\n ngDevMode && assertTNodeForLView(tIcuContainerNode, lView);\n enterIcu(_state, tIcuContainerNode.value, lView);\n return icuContainerIteratorNext.bind(null, _state);\n }\n return icuContainerIteratorStart;\n}\nfunction createIcuIterator(tIcu, lView) {\n const state = {\n stack: [],\n index: -1,\n lView\n };\n ngDevMode && assertTIcu(tIcu);\n enterIcu(state, tIcu, lView);\n return icuContainerIteratorNext.bind(null, state);\n}\n\nconst REF_EXTRACTOR_REGEXP = /* @__PURE__ */(() => {\n return new RegExp(`^(\\\\d+)*(${REFERENCE_NODE_BODY}|${REFERENCE_NODE_HOST})*(.*)`);\n})();\nfunction compressNodeLocation(referenceNode, path) {\n const result = [referenceNode];\n for (const segment of path) {\n const lastIdx = result.length - 1;\n if (lastIdx > 0 && result[lastIdx - 1] === segment) {\n const value = result[lastIdx] || 1;\n result[lastIdx] = value + 1;\n } else {\n result.push(segment, '');\n }\n }\n return result.join('');\n}\nfunction decompressNodeLocation(path) {\n const matches = path.match(REF_EXTRACTOR_REGEXP);\n const [_, refNodeId, refNodeName, rest] = matches;\n const ref = refNodeId ? parseInt(refNodeId, 10) : refNodeName;\n const steps = [];\n for (const [_, step, count] of rest.matchAll(/(f|n)(\\d*)/g)) {\n const repeat = parseInt(count, 10) || 1;\n steps.push(step, repeat);\n }\n return [ref, ...steps];\n}\n\nfunction isFirstElementInNgContainer(tNode) {\n return !tNode.prev && tNode.parent?.type === 8;\n}\nfunction getNoOffsetIndex(tNode) {\n return tNode.index - HEADER_OFFSET;\n}\nfunction isDisconnectedNode(tNode, lView) {\n return !(tNode.type & (16 | 128)) && !!lView[tNode.index] && isDisconnectedRNode(unwrapRNode(lView[tNode.index]));\n}\nfunction isDisconnectedRNode(rNode) {\n return !!rNode && !rNode.isConnected;\n}\nfunction locateI18nRNodeByIndex(hydrationInfo, noOffsetIndex) {\n const i18nNodes = hydrationInfo.i18nNodes;\n if (i18nNodes) {\n return i18nNodes.get(noOffsetIndex);\n }\n return undefined;\n}\nfunction tryLocateRNodeByPath(hydrationInfo, lView, noOffsetIndex) {\n const nodes = hydrationInfo.data[NODES];\n const path = nodes?.[noOffsetIndex];\n return path ? locateRNodeByPath(path, lView) : null;\n}\nfunction locateNextRNode(hydrationInfo, tView, lView, tNode) {\n const noOffsetIndex = getNoOffsetIndex(tNode);\n let native = locateI18nRNodeByIndex(hydrationInfo, noOffsetIndex);\n if (native === undefined) {\n const nodes = hydrationInfo.data[NODES];\n if (nodes?.[noOffsetIndex]) {\n native = locateRNodeByPath(nodes[noOffsetIndex], lView);\n } else if (tView.firstChild === tNode) {\n native = hydrationInfo.firstChild;\n } else {\n const previousTNodeParent = tNode.prev === null;\n const previousTNode = tNode.prev ?? tNode.parent;\n ngDevMode && assertDefined(previousTNode, 'Unexpected state: current TNode does not have a connection ' + 'to the previous node or a parent node.');\n if (isFirstElementInNgContainer(tNode)) {\n const noOffsetParentIndex = getNoOffsetIndex(tNode.parent);\n native = getSegmentHead(hydrationInfo, noOffsetParentIndex);\n } else {\n let previousRElement = getNativeByTNode(previousTNode, lView);\n if (previousTNodeParent) {\n native = previousRElement.firstChild;\n } else {\n const noOffsetPrevSiblingIndex = getNoOffsetIndex(previousTNode);\n const segmentHead = getSegmentHead(hydrationInfo, noOffsetPrevSiblingIndex);\n if (previousTNode.type === 2 && segmentHead) {\n const numRootNodesToSkip = calcSerializedContainerSize(hydrationInfo, noOffsetPrevSiblingIndex);\n const nodesToSkip = numRootNodesToSkip + 1;\n native = siblingAfter(nodesToSkip, segmentHead);\n } else {\n native = previousRElement.nextSibling;\n }\n }\n }\n }\n }\n return native;\n}\nfunction siblingAfter(skip, from) {\n let currentNode = from;\n for (let i = 0; i < skip; i++) {\n ngDevMode && validateSiblingNodeExists(currentNode);\n if (currentNode == null) {\n throw new RuntimeError(-501, ngDevMode && 'During hydration Angular expected more sibling nodes to be present. This usually means the client-rendered DOM no longer matches the server-rendered HTML.');\n }\n currentNode = currentNode.nextSibling;\n }\n return currentNode;\n}\nfunction stringifyNavigationInstructions(instructions) {\n const container = [];\n for (let i = 0; i < instructions.length; i += 2) {\n const step = instructions[i];\n const repeat = instructions[i + 1];\n for (let r = 0; r < repeat; r++) {\n container.push(step === NODE_NAVIGATION_STEP_FIRST_CHILD ? 'firstChild' : 'nextSibling');\n }\n }\n return container.join('.');\n}\nfunction navigateToNode(from, instructions) {\n let node = from;\n for (let i = 0; i < instructions.length; i += 2) {\n const step = instructions[i];\n const repeat = instructions[i + 1];\n for (let r = 0; r < repeat; r++) {\n if (ngDevMode && !node) {\n throw nodeNotFoundAtPathError(from, stringifyNavigationInstructions(instructions));\n }\n if (!node) {\n throw new RuntimeError(509, ngDevMode && 'During hydration Angular was unable to locate a node using a recorded navigation path. This usually means the client-rendered DOM no longer matches the server-rendered HTML.');\n }\n switch (step) {\n case NODE_NAVIGATION_STEP_FIRST_CHILD:\n node = node.firstChild;\n break;\n case NODE_NAVIGATION_STEP_NEXT_SIBLING:\n node = node.nextSibling;\n break;\n }\n }\n }\n if (ngDevMode && !node) {\n throw nodeNotFoundAtPathError(from, stringifyNavigationInstructions(instructions));\n }\n if (!node) {\n throw new RuntimeError(509, ngDevMode && 'During hydration Angular was unable to locate a node using a recorded navigation path. This usually means the client-rendered DOM no longer matches the server-rendered HTML.');\n }\n return node;\n}\nfunction locateRNodeByPath(path, lView) {\n const [referenceNode, ...navigationInstructions] = decompressNodeLocation(path);\n let ref;\n if (referenceNode === REFERENCE_NODE_HOST) {\n ref = lView[DECLARATION_COMPONENT_VIEW][HOST];\n } else if (referenceNode === REFERENCE_NODE_BODY) {\n ref = ษตษตresolveBody(lView[DECLARATION_COMPONENT_VIEW][HOST]);\n } else {\n const parentElementId = Number(referenceNode);\n ref = unwrapRNode(lView[parentElementId + HEADER_OFFSET]);\n }\n return navigateToNode(ref, navigationInstructions);\n}\nfunction navigateBetween(start, finish) {\n if (start === finish) {\n return [];\n } else if (start.parentElement == null || finish.parentElement == null) {\n return null;\n } else if (start.parentElement === finish.parentElement) {\n return navigateBetweenSiblings(start, finish);\n } else {\n const parent = finish.parentElement;\n const parentPath = navigateBetween(start, parent);\n const childPath = navigateBetween(parent.firstChild, finish);\n if (!parentPath || !childPath) return null;\n return [...parentPath, NODE_NAVIGATION_STEP_FIRST_CHILD, ...childPath];\n }\n}\nfunction navigateBetweenSiblings(start, finish) {\n const nav = [];\n let node = null;\n for (node = start; node != null && node !== finish; node = node.nextSibling) {\n nav.push(NODE_NAVIGATION_STEP_NEXT_SIBLING);\n }\n return node == null ? null : nav;\n}\nfunction calcPathBetween(from, to, fromNodeName) {\n const path = navigateBetween(from, to);\n return path === null ? null : compressNodeLocation(fromNodeName, path);\n}\nfunction calcPathForNode(tNode, lView, excludedParentNodes) {\n let parentTNode = tNode.parent;\n let parentIndex;\n let parentRNode;\n let referenceNodeName;\n while (parentTNode !== null && (isDisconnectedNode(parentTNode, lView) || excludedParentNodes?.has(parentTNode.index))) {\n parentTNode = parentTNode.parent;\n }\n if (parentTNode === null || !(parentTNode.type & 3)) {\n parentIndex = referenceNodeName = REFERENCE_NODE_HOST;\n parentRNode = lView[DECLARATION_COMPONENT_VIEW][HOST];\n } else {\n parentIndex = parentTNode.index;\n parentRNode = unwrapRNode(lView[parentIndex]);\n referenceNodeName = renderStringify(parentIndex - HEADER_OFFSET);\n }\n let rNode = unwrapRNode(lView[tNode.index]);\n if (tNode.type & (12 | 32)) {\n const firstRNode = getFirstNativeNode(lView, tNode);\n if (firstRNode) {\n rNode = firstRNode;\n }\n }\n let path = calcPathBetween(parentRNode, rNode, referenceNodeName);\n if (path === null && parentRNode !== rNode) {\n const body = parentRNode.ownerDocument.body;\n path = calcPathBetween(body, rNode, REFERENCE_NODE_BODY);\n if (path === null) {\n throw nodeNotFoundError(lView, tNode);\n }\n }\n return path;\n}\nfunction gatherDeferBlocksCommentNodes(doc, node) {\n const commentNodesIterator = doc.createNodeIterator(node, NodeFilter.SHOW_COMMENT, {\n acceptNode\n });\n let currentNode;\n const nodesByBlockId = new Map();\n while (currentNode = commentNodesIterator.nextNode()) {\n const nghPattern = 'ngh=';\n const content = currentNode?.textContent;\n const nghIdx = content?.indexOf(nghPattern) ?? -1;\n if (nghIdx > -1) {\n const nghValue = content.substring(nghIdx + nghPattern.length).trim();\n ngDevMode && assertEqual(nghValue.startsWith('d'), true, 'Invalid defer block id found in a comment node.');\n nodesByBlockId.set(nghValue, currentNode);\n }\n }\n return nodesByBlockId;\n}\nfunction acceptNode(node) {\n return node.textContent?.trimStart().startsWith('ngh=') ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_REJECT;\n}\n\nlet _isI18nHydrationSupportEnabled = false;\nlet _prepareI18nBlockForHydrationImpl = () => {};\nfunction setIsI18nHydrationSupportEnabled(enabled) {\n _isI18nHydrationSupportEnabled = enabled;\n}\nfunction isI18nHydrationSupportEnabled() {\n return _isI18nHydrationSupportEnabled;\n}\nfunction prepareI18nBlockForHydration(lView, index, parentTNode, subTemplateIndex) {\n _prepareI18nBlockForHydrationImpl(lView, index, parentTNode, subTemplateIndex);\n}\nfunction enablePrepareI18nBlockForHydrationImpl() {\n _prepareI18nBlockForHydrationImpl = prepareI18nBlockForHydrationImpl;\n}\nfunction isI18nHydrationEnabled(injector) {\n injector = injector ?? inject(Injector);\n return injector.get(IS_I18N_HYDRATION_ENABLED, false);\n}\nfunction getOrComputeI18nChildren(tView, context) {\n let i18nChildren = context.i18nChildren.get(tView);\n if (i18nChildren === undefined) {\n i18nChildren = collectI18nChildren(tView);\n context.i18nChildren.set(tView, i18nChildren);\n }\n return i18nChildren;\n}\nfunction collectI18nChildren(tView) {\n const children = new Set();\n function collectI18nViews(node) {\n children.add(node.index);\n switch (node.kind) {\n case 1:\n case 2:\n {\n for (const childNode of node.children) {\n collectI18nViews(childNode);\n }\n break;\n }\n case 3:\n {\n for (const caseNodes of node.cases) {\n for (const caseNode of caseNodes) {\n collectI18nViews(caseNode);\n }\n }\n break;\n }\n }\n }\n for (let i = HEADER_OFFSET; i < tView.bindingStartIndex; i++) {\n const tI18n = tView.data[i];\n if (!tI18n || !tI18n.ast) {\n continue;\n }\n for (const node of tI18n.ast) {\n collectI18nViews(node);\n }\n }\n return children.size === 0 ? null : children;\n}\nfunction trySerializeI18nBlock(lView, index, context) {\n if (!context.isI18nHydrationEnabled) {\n return null;\n }\n const tView = lView[TVIEW$1];\n const tI18n = tView.data[index];\n if (!tI18n || !tI18n.ast) {\n return null;\n }\n const parentTNode = tView.data[tI18n.parentTNodeIndex];\n if (parentTNode && isI18nInSkipHydrationBlock(parentTNode)) {\n return null;\n }\n const serializedI18nBlock = {\n caseQueue: [],\n disconnectedNodes: new Set(),\n disjointNodes: new Set()\n };\n serializeI18nBlock(lView, serializedI18nBlock, context, tI18n.ast);\n return serializedI18nBlock.caseQueue.length === 0 && serializedI18nBlock.disconnectedNodes.size === 0 && serializedI18nBlock.disjointNodes.size === 0 ? null : serializedI18nBlock;\n}\nfunction serializeI18nBlock(lView, serializedI18nBlock, context, nodes) {\n let prevRNode = null;\n for (const node of nodes) {\n const nextRNode = serializeI18nNode(lView, serializedI18nBlock, context, node);\n if (nextRNode) {\n if (isDisjointNode(prevRNode, nextRNode)) {\n serializedI18nBlock.disjointNodes.add(node.index - HEADER_OFFSET);\n }\n prevRNode = nextRNode;\n }\n }\n return prevRNode;\n}\nfunction isDisjointNode(prevNode, nextNode) {\n return prevNode && prevNode.nextSibling !== nextNode;\n}\nfunction serializeI18nNode(lView, serializedI18nBlock, context, node) {\n const maybeRNode = unwrapRNode(lView[node.index]);\n if (!maybeRNode || isDisconnectedRNode(maybeRNode)) {\n serializedI18nBlock.disconnectedNodes.add(node.index - HEADER_OFFSET);\n return null;\n }\n const rNode = maybeRNode;\n switch (node.kind) {\n case 0:\n {\n processTextNodeBeforeSerialization(context, rNode);\n break;\n }\n case 1:\n case 2:\n {\n serializeI18nBlock(lView, serializedI18nBlock, context, node.children);\n break;\n }\n case 3:\n {\n const currentCase = lView[node.currentCaseLViewIndex];\n if (currentCase != null) {\n const caseIdx = currentCase < 0 ? ~currentCase : currentCase;\n serializedI18nBlock.caseQueue.push(caseIdx);\n serializeI18nBlock(lView, serializedI18nBlock, context, node.cases[caseIdx]);\n }\n break;\n }\n }\n return getFirstNativeNodeForI18nNode(lView, node);\n}\nfunction getFirstNativeNodeForI18nNode(lView, node) {\n const tView = lView[TVIEW$1];\n const maybeTNode = tView.data[node.index];\n if (isTNodeShape(maybeTNode)) {\n return getFirstNativeNode(lView, maybeTNode);\n } else if (node.kind === 3) {\n const icuIterator = createIcuIterator(maybeTNode, lView);\n let rNode = icuIterator();\n return rNode ?? unwrapRNode(lView[node.index]);\n } else {\n return unwrapRNode(lView[node.index]) ?? null;\n }\n}\nfunction setCurrentNode(state, node) {\n state.currentNode = node;\n}\nfunction appendI18nNodeToCollection(context, state, astNode) {\n const noOffsetIndex = astNode.index - HEADER_OFFSET;\n const {\n disconnectedNodes\n } = context;\n const currentNode = state.currentNode;\n if (state.isConnected) {\n context.i18nNodes.set(noOffsetIndex, currentNode);\n disconnectedNodes.delete(noOffsetIndex);\n } else {\n disconnectedNodes.add(noOffsetIndex);\n }\n return currentNode;\n}\nfunction skipSiblingNodes(state, skip) {\n let currentNode = state.currentNode;\n for (let i = 0; i < skip; i++) {\n if (!currentNode) {\n break;\n }\n currentNode = currentNode?.nextSibling ?? null;\n }\n return currentNode;\n}\nfunction forkHydrationState(state, nextNode) {\n return {\n currentNode: nextNode,\n isConnected: state.isConnected\n };\n}\nfunction prepareI18nBlockForHydrationImpl(lView, index, parentTNode, subTemplateIndex) {\n const hydrationInfo = lView[HYDRATION];\n if (!hydrationInfo) {\n return;\n }\n if (!isI18nHydrationSupportEnabled() || parentTNode && (isI18nInSkipHydrationBlock(parentTNode) || isDisconnectedNode$1(hydrationInfo, parentTNode.index - HEADER_OFFSET))) {\n return;\n }\n const tView = lView[TVIEW$1];\n const tI18n = tView.data[index];\n ngDevMode && assertDefined(tI18n, 'Expected i18n data to be present in a given TView slot during hydration');\n function findHydrationRoot() {\n if (isRootTemplateMessage(subTemplateIndex)) {\n ngDevMode && assertDefined(parentTNode, 'Expected parent TNode while hydrating i18n root');\n const rootNode = locateNextRNode(hydrationInfo, tView, lView, parentTNode);\n return parentTNode.type & 8 ? rootNode : rootNode.firstChild;\n }\n return hydrationInfo?.firstChild;\n }\n const currentNode = findHydrationRoot();\n ngDevMode && assertDefined(currentNode, 'Expected root i18n node during hydration');\n const disconnectedNodes = initDisconnectedNodes(hydrationInfo) ?? new Set();\n const i18nNodes = hydrationInfo.i18nNodes ??= new Map();\n const caseQueue = [...(hydrationInfo.data[I18N_DATA]?.[index - HEADER_OFFSET] ?? [])];\n const dehydratedIcuData = hydrationInfo.dehydratedIcuData ??= new Map();\n collectI18nNodesFromDom({\n hydrationInfo,\n lView,\n i18nNodes,\n disconnectedNodes,\n caseQueue,\n dehydratedIcuData\n }, {\n currentNode,\n isConnected: true\n }, tI18n.ast);\n hydrationInfo.disconnectedNodes = disconnectedNodes.size === 0 ? null : disconnectedNodes;\n}\nfunction collectI18nNodesFromDom(context, state, nodeOrNodes) {\n if (Array.isArray(nodeOrNodes)) {\n let nextState = state;\n for (const node of nodeOrNodes) {\n const targetNode = tryLocateRNodeByPath(context.hydrationInfo, context.lView, node.index - HEADER_OFFSET);\n if (targetNode) {\n nextState = forkHydrationState(state, targetNode);\n }\n collectI18nNodesFromDom(context, nextState, node);\n }\n } else {\n if (context.disconnectedNodes.has(nodeOrNodes.index - HEADER_OFFSET)) {\n return;\n }\n switch (nodeOrNodes.kind) {\n case 0:\n {\n const currentNode = appendI18nNodeToCollection(context, state, nodeOrNodes);\n setCurrentNode(state, currentNode?.nextSibling ?? null);\n break;\n }\n case 1:\n {\n collectI18nNodesFromDom(context, forkHydrationState(state, state.currentNode?.firstChild ?? null), nodeOrNodes.children);\n const currentNode = appendI18nNodeToCollection(context, state, nodeOrNodes);\n setCurrentNode(state, currentNode?.nextSibling ?? null);\n break;\n }\n case 2:\n {\n const noOffsetIndex = nodeOrNodes.index - HEADER_OFFSET;\n const {\n hydrationInfo\n } = context;\n const containerSize = getNgContainerSize(hydrationInfo, noOffsetIndex);\n switch (nodeOrNodes.type) {\n case 0:\n {\n const currentNode = appendI18nNodeToCollection(context, state, nodeOrNodes);\n if (isSerializedElementContainer(hydrationInfo, noOffsetIndex)) {\n collectI18nNodesFromDom(context, state, nodeOrNodes.children);\n const nextNode = skipSiblingNodes(state, 1);\n setCurrentNode(state, nextNode);\n } else {\n collectI18nNodesFromDom(context, forkHydrationState(state, state.currentNode?.firstChild ?? null), nodeOrNodes.children);\n setCurrentNode(state, currentNode?.nextSibling ?? null);\n if (containerSize !== null) {\n const nextNode = skipSiblingNodes(state, containerSize + 1);\n setCurrentNode(state, nextNode);\n }\n }\n break;\n }\n case 1:\n {\n ngDevMode && assertNotEqual(containerSize, null, 'Expected a container size while hydrating i18n subtemplate');\n appendI18nNodeToCollection(context, state, nodeOrNodes);\n const nextNode = skipSiblingNodes(state, containerSize + 1);\n setCurrentNode(state, nextNode);\n break;\n }\n }\n break;\n }\n case 3:\n {\n const selectedCase = state.isConnected ? context.caseQueue.shift() : null;\n const childState = {\n currentNode: null,\n isConnected: false\n };\n for (let i = 0; i < nodeOrNodes.cases.length; i++) {\n collectI18nNodesFromDom(context, i === selectedCase ? state : childState, nodeOrNodes.cases[i]);\n }\n if (selectedCase !== null) {\n context.dehydratedIcuData.set(nodeOrNodes.index, {\n case: selectedCase,\n node: nodeOrNodes\n });\n }\n const currentNode = appendI18nNodeToCollection(context, state, nodeOrNodes);\n setCurrentNode(state, currentNode?.nextSibling ?? null);\n break;\n }\n }\n }\n}\nlet _claimDehydratedIcuCaseImpl = () => {};\nfunction claimDehydratedIcuCase(lView, icuIndex, caseIndex) {\n _claimDehydratedIcuCaseImpl(lView, icuIndex, caseIndex);\n}\nfunction enableClaimDehydratedIcuCaseImpl() {\n _claimDehydratedIcuCaseImpl = claimDehydratedIcuCaseImpl;\n}\nfunction claimDehydratedIcuCaseImpl(lView, icuIndex, caseIndex) {\n const dehydratedIcuDataMap = lView[HYDRATION]?.dehydratedIcuData;\n if (dehydratedIcuDataMap) {\n const dehydratedIcuData = dehydratedIcuDataMap.get(icuIndex);\n if (dehydratedIcuData?.case === caseIndex) {\n dehydratedIcuDataMap.delete(icuIndex);\n }\n }\n}\nfunction cleanupI18nHydrationData(lView) {\n const hydrationInfo = lView[HYDRATION];\n if (hydrationInfo) {\n const {\n i18nNodes,\n dehydratedIcuData: dehydratedIcuDataMap\n } = hydrationInfo;\n if (i18nNodes && dehydratedIcuDataMap) {\n const renderer = lView[RENDERER];\n for (const dehydratedIcuData of dehydratedIcuDataMap.values()) {\n cleanupDehydratedIcuData(renderer, i18nNodes, dehydratedIcuData);\n }\n }\n hydrationInfo.i18nNodes = undefined;\n hydrationInfo.dehydratedIcuData = undefined;\n }\n}\nfunction cleanupDehydratedIcuData(renderer, i18nNodes, dehydratedIcuData) {\n for (const node of dehydratedIcuData.node.cases[dehydratedIcuData.case]) {\n const rNode = i18nNodes.get(node.index - HEADER_OFFSET);\n if (rNode) {\n nativeRemoveNode(renderer, rNode, false);\n }\n }\n}\n\nfunction removeDehydratedViews(lContainer) {\n const views = lContainer[DEHYDRATED_VIEWS] ?? [];\n const parentLView = lContainer[PARENT];\n const renderer = parentLView[RENDERER];\n const retainedViews = [];\n for (const view of views) {\n if (view.data[DEFER_BLOCK_ID] !== undefined) {\n retainedViews.push(view);\n } else {\n removeDehydratedView(view, renderer);\n ngDevMode && ngDevMode.dehydratedViewsRemoved++;\n }\n }\n lContainer[DEHYDRATED_VIEWS] = retainedViews;\n}\nfunction removeDehydratedViewList(deferBlock) {\n const {\n lContainer\n } = deferBlock;\n const dehydratedViews = lContainer[DEHYDRATED_VIEWS];\n if (dehydratedViews === null) return;\n const parentLView = lContainer[PARENT];\n const renderer = parentLView[RENDERER];\n for (const view of dehydratedViews) {\n removeDehydratedView(view, renderer);\n ngDevMode && ngDevMode.dehydratedViewsRemoved++;\n }\n}\nfunction removeDehydratedView(dehydratedView, renderer) {\n let nodesRemoved = 0;\n let currentRNode = dehydratedView.firstChild;\n if (currentRNode) {\n const numNodes = dehydratedView.data[NUM_ROOT_NODES];\n while (nodesRemoved < numNodes) {\n ngDevMode && validateSiblingNodeExists(currentRNode);\n const nextSibling = currentRNode.nextSibling;\n nativeRemoveNode(renderer, currentRNode, false);\n currentRNode = nextSibling;\n nodesRemoved++;\n }\n }\n}\nfunction cleanupLContainer(lContainer) {\n removeDehydratedViews(lContainer);\n const hostLView = lContainer[HOST];\n if (isLView(hostLView)) {\n cleanupLView(hostLView);\n }\n for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n cleanupLView(lContainer[i]);\n }\n}\nfunction cleanupLView(lView) {\n cleanupI18nHydrationData(lView);\n const tView = lView[TVIEW$1];\n for (let i = HEADER_OFFSET; i < tView.bindingStartIndex; i++) {\n if (isLContainer(lView[i])) {\n const lContainer = lView[i];\n cleanupLContainer(lContainer);\n } else if (isLView(lView[i])) {\n cleanupLView(lView[i]);\n }\n }\n}\nfunction cleanupDehydratedViews(appRef) {\n const viewRefs = appRef._views;\n for (const viewRef of viewRefs) {\n const lNode = getLNodeForHydration(viewRef);\n if (lNode !== null && lNode[HOST] !== null) {\n if (isLView(lNode)) {\n cleanupLView(lNode);\n } else {\n cleanupLContainer(lNode);\n }\n ngDevMode && ngDevMode.dehydratedViewsCleanupRuns++;\n }\n }\n}\nfunction cleanupHydratedDeferBlocks(deferBlock, hydratedBlocks, registry, appRef) {\n if (deferBlock !== null) {\n registry.cleanup(hydratedBlocks);\n cleanupLContainer(deferBlock.lContainer);\n cleanupDehydratedViews(appRef);\n }\n}\n\nfunction locateDehydratedViewsInContainer(currentRNode, serializedViews) {\n const dehydratedViews = [];\n for (const serializedView of serializedViews) {\n for (let i = 0; i < (serializedView[MULTIPLIER] ?? 1); i++) {\n const view = {\n data: serializedView,\n firstChild: null\n };\n if (serializedView[NUM_ROOT_NODES] > 0) {\n view.firstChild = currentRNode;\n currentRNode = siblingAfter(serializedView[NUM_ROOT_NODES], currentRNode);\n }\n dehydratedViews.push(view);\n }\n }\n return [currentRNode, dehydratedViews];\n}\nlet _findMatchingDehydratedViewImpl = () => null;\nlet _findAndReconcileMatchingDehydratedViewsImpl = () => null;\nfunction enableFindMatchingDehydratedViewImpl() {\n _findMatchingDehydratedViewImpl = findMatchingDehydratedViewImpl;\n _findAndReconcileMatchingDehydratedViewsImpl = findAndReconcileMatchingDehydratedViewsImpl;\n}\nfunction findMatchingDehydratedViewImpl(lContainer, template) {\n if (hasMatchingDehydratedView(lContainer, template)) {\n return lContainer[DEHYDRATED_VIEWS].shift();\n } else {\n removeDehydratedViews(lContainer);\n return null;\n }\n}\nfunction findMatchingDehydratedView(lContainer, template) {\n return _findMatchingDehydratedViewImpl(lContainer, template);\n}\nfunction findAndReconcileMatchingDehydratedViewsImpl(lContainer, templateTNode, hostLView) {\n if (templateTNode.tView.ssrId === null) return null;\n const dehydratedView = findMatchingDehydratedView(lContainer, templateTNode.tView.ssrId);\n if (hostLView[TVIEW$1].firstUpdatePass && dehydratedView === null) {\n removeStaleDehydratedBranch(hostLView, templateTNode);\n }\n return dehydratedView;\n}\nfunction findAndReconcileMatchingDehydratedViews(lContainer, templateTNode, hostLView) {\n return _findAndReconcileMatchingDehydratedViewsImpl(lContainer, templateTNode, hostLView);\n}\nfunction removeStaleDehydratedBranch(hostLView, tNode) {\n let currentTNode = tNode;\n while (currentTNode) {\n if (cleanupMatchingDehydratedViews(hostLView, currentTNode)) return;\n if ((currentTNode.flags & 256) === 256) {\n break;\n }\n currentTNode = currentTNode.prev;\n }\n currentTNode = tNode.next;\n while (currentTNode) {\n if ((currentTNode.flags & 512) !== 512) {\n break;\n }\n if (cleanupMatchingDehydratedViews(hostLView, currentTNode)) return;\n currentTNode = currentTNode.next;\n }\n}\nfunction hasMatchingDehydratedView(lContainer, template) {\n const views = lContainer[DEHYDRATED_VIEWS];\n if (!template || views === null || views.length === 0) {\n return false;\n }\n return views[0].data[TEMPLATE_ID] === template;\n}\nfunction cleanupMatchingDehydratedViews(hostLView, currentTNode) {\n const ssrId = currentTNode.tView?.ssrId;\n if (ssrId == null) return false;\n const container = hostLView[currentTNode.index];\n if (isLContainer(container) && hasMatchingDehydratedView(container, ssrId)) {\n removeDehydratedViews(container);\n return true;\n }\n return false;\n}\n\nlet ComponentRef$1 = class ComponentRef {};\n\nclass RendererFactory2 {}\nclass Renderer2 {\n destroyNode = null;\n static __NG_ELEMENT_ID__ = () => injectRenderer2();\n}\nif (typeof ngDevMode === 'undefined' || ngDevMode) {\n /*#__PURE__*/ registerSpecialProvider(Renderer2);\n}\nfunction injectRenderer2() {\n const lView = getLView();\n const tNode = getCurrentTNode();\n const nodeAtIndex = getComponentLViewByIndex(tNode.index, lView);\n return (isLView(nodeAtIndex) ? nodeAtIndex : lView)[RENDERER];\n}\n\nlet Sanitizer = /*#__PURE__*/ (() => {\nclass Sanitizer {\n static ษตprov =\n /* @__PURE__ */\n __defineInjectable({\n token: Sanitizer,\n providedIn: 'root',\n factory: () => null\n });\n}\nreturn Sanitizer;\n})();\n\nconst RENDER = /*#__PURE__*/ Symbol('RENDER');\nconst ON_DESTROY = /*#__PURE__*/ Symbol('ON_DESTROY');\nconst CONTENT_ADAPTER = /*#__PURE__*/ Symbol('CONTENT_ADAPTER');\nconst GET_CONTEXT = /*#__PURE__*/ Symbol('GET_CONTEXT');\n\nfunction isForeignComponent(value) {\n return typeof value === 'object' && value !== null && RENDER in value;\n}\nfunction isModuleWithProviders(value) {\n return value.ngModule !== undefined;\n}\nfunction isNgModule(value) {\n return !!getNgModuleDef(value);\n}\nfunction isPipe(value) {\n return !!getPipeDef$1(value);\n}\nfunction isDirective(value) {\n return !!getDirectiveDef(value);\n}\nfunction isComponent(value) {\n return !!getComponentDef(value);\n}\nfunction getDependencyTypeForError(type) {\n if (getComponentDef(type)) return 'component';\n if (getDirectiveDef(type)) return 'directive';\n if (getPipeDef$1(type)) return 'pipe';\n return 'type';\n}\nfunction verifyStandaloneImport(depType, importingType) {\n if (isForwardRef(depType)) {\n depType = resolveForwardRef(depType);\n if (!depType) {\n throw new Error(`Expected forwardRef function, imported from \"${stringifyForError(importingType)}\", to return a standalone entity or NgModule but got \"${stringifyForError(depType) || depType}\".`);\n }\n }\n if (getNgModuleDef(depType) == null) {\n const def = getComponentDef(depType) || getDirectiveDef(depType) || getPipeDef$1(depType);\n if (def != null) {\n if (!def.standalone) {\n const type = getDependencyTypeForError(depType);\n throw new Error(`The \"${stringifyForError(depType)}\" ${type}, imported from \"${stringifyForError(importingType)}\", is not standalone. Does the ${type} have the standalone: false flag?`);\n }\n } else {\n if (isModuleWithProviders(depType)) {\n throw new Error(`A module with providers was imported from \"${stringifyForError(importingType)}\". Modules with providers are not supported in standalone components imports.`);\n } else if (isForeignComponent(depType)) {\n throw new Error(`A foreign component, imported from \"${stringifyForError(importingType)}\", cannot be imported using 'imports'. Foreign components are only supported in AOT mode and must be registered in 'foreignImports'.`);\n } else {\n throw new Error(`The \"${stringifyForError(depType)}\" type, imported from \"${stringifyForError(importingType)}\", must be a standalone component / directive / pipe or an NgModule. Did you forget to add the required @Component / @Directive / @Pipe or @NgModule annotation?`);\n }\n }\n }\n}\n\nclass DepsTracker {\n ownerNgModule = new WeakMap();\n ngModulesWithSomeUnresolvedDecls = new Set();\n ngModulesScopeCache = new WeakMap();\n standaloneComponentsScopeCache = new WeakMap();\n resolveNgModulesDecls() {\n if (this.ngModulesWithSomeUnresolvedDecls.size === 0) {\n return;\n }\n for (const moduleType of this.ngModulesWithSomeUnresolvedDecls) {\n const def = getNgModuleDef(moduleType);\n if (def?.declarations) {\n for (const decl of maybeUnwrapFn(def.declarations)) {\n if (isComponent(decl)) {\n this.ownerNgModule.set(decl, moduleType);\n }\n }\n }\n }\n this.ngModulesWithSomeUnresolvedDecls.clear();\n }\n getComponentDependencies(type, rawImports) {\n this.resolveNgModulesDecls();\n const def = getComponentDef(type);\n if (def === null) {\n throw new Error(`Attempting to get component dependencies for a type that is not a component: ${type}`);\n }\n if (def.standalone) {\n const scope = this.getStandaloneComponentScope(type, rawImports);\n if (scope.compilation.isPoisoned) {\n return {\n dependencies: []\n };\n }\n return {\n dependencies: [...scope.compilation.directives, ...scope.compilation.pipes, ...scope.compilation.ngModules]\n };\n } else {\n if (!this.ownerNgModule.has(type)) {\n return {\n dependencies: []\n };\n }\n const scope = this.getNgModuleScope(this.ownerNgModule.get(type));\n if (scope.compilation.isPoisoned) {\n return {\n dependencies: []\n };\n }\n return {\n dependencies: [...scope.compilation.directives, ...scope.compilation.pipes]\n };\n }\n }\n registerNgModule(type, scopeInfo) {\n if (!isNgModule(type)) {\n throw new Error(`Attempting to register a Type which is not NgModule as NgModule: ${type}`);\n }\n this.ngModulesWithSomeUnresolvedDecls.add(type);\n }\n clearScopeCacheFor(type) {\n this.ngModulesScopeCache.delete(type);\n this.standaloneComponentsScopeCache.delete(type);\n }\n getNgModuleScope(type) {\n if (this.ngModulesScopeCache.has(type)) {\n return this.ngModulesScopeCache.get(type);\n }\n const scope = this.computeNgModuleScope(type);\n this.ngModulesScopeCache.set(type, scope);\n return scope;\n }\n computeNgModuleScope(type) {\n const def = getNgModuleDefOrThrow(type);\n const scope = {\n exported: {\n directives: new Set(),\n pipes: new Set()\n },\n compilation: {\n directives: new Set(),\n pipes: new Set()\n }\n };\n for (const imported of maybeUnwrapFn(def.imports)) {\n if (isNgModule(imported)) {\n const importedScope = this.getNgModuleScope(imported);\n addSet(importedScope.exported.directives, scope.compilation.directives);\n addSet(importedScope.exported.pipes, scope.compilation.pipes);\n } else if (isStandalone(imported)) {\n if (isDirective(imported) || isComponent(imported)) {\n scope.compilation.directives.add(imported);\n } else if (isPipe(imported)) {\n scope.compilation.pipes.add(imported);\n } else {\n throw new RuntimeError(980, 'The standalone imported type is neither a component nor a directive nor a pipe');\n }\n } else {\n scope.compilation.isPoisoned = true;\n break;\n }\n }\n if (!scope.compilation.isPoisoned) {\n for (const decl of maybeUnwrapFn(def.declarations)) {\n if (isNgModule(decl) || isStandalone(decl)) {\n scope.compilation.isPoisoned = true;\n break;\n }\n if (isPipe(decl)) {\n scope.compilation.pipes.add(decl);\n } else {\n scope.compilation.directives.add(decl);\n }\n }\n }\n for (const exported of maybeUnwrapFn(def.exports)) {\n if (isNgModule(exported)) {\n const exportedScope = this.getNgModuleScope(exported);\n addSet(exportedScope.exported.directives, scope.exported.directives);\n addSet(exportedScope.exported.pipes, scope.exported.pipes);\n addSet(exportedScope.exported.directives, scope.compilation.directives);\n addSet(exportedScope.exported.pipes, scope.compilation.pipes);\n } else if (isPipe(exported)) {\n scope.exported.pipes.add(exported);\n } else {\n scope.exported.directives.add(exported);\n }\n }\n return scope;\n }\n getStandaloneComponentScope(type, rawImports) {\n if (this.standaloneComponentsScopeCache.has(type)) {\n return this.standaloneComponentsScopeCache.get(type);\n }\n const ans = this.computeStandaloneComponentScope(type, rawImports);\n this.standaloneComponentsScopeCache.set(type, ans);\n return ans;\n }\n computeStandaloneComponentScope(type, rawImports) {\n const ans = {\n compilation: {\n directives: new Set([type]),\n pipes: new Set(),\n ngModules: new Set()\n }\n };\n for (const rawImport of flatten(rawImports ?? [])) {\n const imported = resolveForwardRef(rawImport);\n if (imported && isNgModule(imported)) {\n ans.compilation.ngModules.add(imported);\n const importedScope = this.getNgModuleScope(imported);\n if (importedScope.exported.isPoisoned) {\n ans.compilation.isPoisoned = true;\n return ans;\n }\n addSet(importedScope.exported.directives, ans.compilation.directives);\n addSet(importedScope.exported.pipes, ans.compilation.pipes);\n } else if (imported && isStandalone(imported)) {\n if (isPipe(imported)) {\n ans.compilation.pipes.add(imported);\n } else if (isDirective(imported) || isComponent(imported)) {\n ans.compilation.directives.add(imported);\n } else {\n ans.compilation.isPoisoned = true;\n return ans;\n }\n } else {\n ans.compilation.isPoisoned = true;\n return ans;\n }\n }\n return ans;\n }\n isOrphanComponent(cmp) {\n const def = getComponentDef(cmp);\n if (!def || def.standalone) {\n return false;\n }\n this.resolveNgModulesDecls();\n return !this.ownerNgModule.has(cmp);\n }\n}\nfunction addSet(sourceSet, targetSet) {\n for (const m of sourceSet) {\n targetSet.add(m);\n }\n}\nconst depsTracker = /*#__PURE__*/ new DepsTracker();\n\nfunction getClosestComponentName(node, predicate) {\n let currentNode = node;\n while (currentNode) {\n const lView = readPatchedLView(currentNode);\n if (lView !== null) {\n for (let i = HEADER_OFFSET; i < lView.length; i++) {\n const current = lView[i];\n if (!isLView(current) && !isLContainer(current) || current[HOST] !== currentNode) {\n continue;\n }\n const tView = lView[TVIEW$1];\n const tNode = getTNode(tView, i);\n if (isComponentHost(tNode)) {\n const def = tView.data[tNode.directiveStart + tNode.componentOffset];\n const name = getComponentName(def);\n if (name !== null && (!predicate || predicate(currentNode, name))) {\n return name;\n } else {\n break;\n }\n }\n }\n }\n currentNode = currentNode.parentNode;\n }\n return null;\n}\nfunction getComponentName(def) {\n return def.debugInfo?.className || def.type.name || null;\n}\n\nconst NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR = {};\n\nclass ChainedInjector {\n injector;\n parentInjector;\n constructor(injector, parentInjector) {\n this.injector = injector;\n this.parentInjector = parentInjector;\n }\n get(token, notFoundValue, options) {\n const value = this.injector.get(token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, options);\n if (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR || notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) {\n return value;\n }\n return this.parentInjector.get(token, notFoundValue, options);\n }\n}\n\nfunction isListLikeIterable(obj) {\n if (!isJsObject(obj)) return false;\n return Array.isArray(obj) || !(obj instanceof Map) && Symbol.iterator in obj;\n}\nfunction areIterablesEqual(a, b, comparator) {\n const iterator1 = a[Symbol.iterator]();\n const iterator2 = b[Symbol.iterator]();\n while (true) {\n const item1 = iterator1.next();\n const item2 = iterator2.next();\n if (item1.done && item2.done) return true;\n if (item1.done || item2.done) return false;\n if (!comparator(item1.value, item2.value)) return false;\n }\n}\nfunction iterateListLike(obj, fn) {\n if (Array.isArray(obj)) {\n for (let i = 0; i < obj.length; i++) {\n fn(obj[i]);\n }\n } else {\n const iterator = obj[Symbol.iterator]();\n let item;\n while (!(item = iterator.next()).done) {\n fn(item.value);\n }\n }\n}\nfunction isJsObject(o) {\n return o !== null && (typeof o === 'function' || typeof o === 'object');\n}\n\nfunction devModeEqual(a, b) {\n const isListLikeIterableA = isListLikeIterable(a);\n const isListLikeIterableB = isListLikeIterable(b);\n if (isListLikeIterableA && isListLikeIterableB) {\n return areIterablesEqual(a, b, devModeEqual);\n } else {\n const isAObject = a && (typeof a === 'object' || typeof a === 'function');\n const isBObject = b && (typeof b === 'object' || typeof b === 'function');\n if (!isListLikeIterableA && isAObject && !isListLikeIterableB && isBObject) {\n return true;\n } else {\n return Object.is(a, b);\n }\n }\n}\n\nfunction updateBinding(lView, bindingIndex, value) {\n return lView[bindingIndex] = value;\n}\nfunction getBinding(lView, bindingIndex) {\n ngDevMode && assertIndexInRange(lView, bindingIndex);\n ngDevMode && assertNotSame(lView[bindingIndex], NO_CHANGE, 'Stored value should never be NO_CHANGE.');\n return lView[bindingIndex];\n}\nfunction bindingUpdated(lView, bindingIndex, value) {\n ngDevMode && assertLessThan(bindingIndex, lView.length, `Slot should have been initialized to NO_CHANGE`);\n if (value === NO_CHANGE) {\n return false;\n }\n const oldValue = lView[bindingIndex];\n if (Object.is(oldValue, value)) {\n return false;\n } else {\n if (ngDevMode && isInCheckNoChangesMode()) {\n const oldValueToCompare = oldValue !== NO_CHANGE ? oldValue : undefined;\n if (!devModeEqual(oldValueToCompare, value)) {\n const details = getExpressionChangedErrorDetails(lView, bindingIndex, oldValueToCompare, value);\n throwErrorIfNoChangesMode(oldValue === NO_CHANGE, details.oldValue, details.newValue, details.propName, lView);\n }\n return false;\n }\n lView[bindingIndex] = value;\n return true;\n }\n}\nfunction bindingUpdated2(lView, bindingIndex, exp1, exp2) {\n const different = bindingUpdated(lView, bindingIndex, exp1);\n return bindingUpdated(lView, bindingIndex + 1, exp2) || different;\n}\nfunction bindingUpdated3(lView, bindingIndex, exp1, exp2, exp3) {\n const different = bindingUpdated2(lView, bindingIndex, exp1, exp2);\n return bindingUpdated(lView, bindingIndex + 2, exp3) || different;\n}\nfunction bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4) {\n const different = bindingUpdated2(lView, bindingIndex, exp1, exp2);\n return bindingUpdated2(lView, bindingIndex + 2, exp3, exp4) || different;\n}\n\nfunction wrapListener(tNode, lView, listenerFn) {\n return function wrapListenerIn_markDirtyAndPreventDefault(event) {\n const nativeEl = wrapListenerIn_markDirtyAndPreventDefault.__ngNativeEl__;\n if (nativeEl !== undefined) {\n markEventHandledForElement(event, nativeEl);\n }\n const startView = isComponentHost(tNode) ? getComponentLViewByIndex(tNode.index, lView) : lView;\n markViewDirty(startView, 5);\n const context = lView[CONTEXT];\n let result = executeListenerWithErrorHandling(lView, context, listenerFn, event);\n let nextListenerFn = wrapListenerIn_markDirtyAndPreventDefault.__ngNextListenerFn__;\n while (nextListenerFn) {\n result = executeListenerWithErrorHandling(lView, context, nextListenerFn, event) && result;\n nextListenerFn = nextListenerFn.__ngNextListenerFn__;\n }\n return result;\n };\n}\nfunction executeListenerWithErrorHandling(lView, context, listenerFn, e) {\n const prevConsumer = setActiveConsumer$1(null);\n try {\n profiler(ProfilerEvent.OutputStart, context, listenerFn);\n return listenerFn(e) !== false;\n } catch (error) {\n handleUncaughtError(lView, error);\n return false;\n } finally {\n profiler(ProfilerEvent.OutputEnd, context, listenerFn);\n setActiveConsumer$1(prevConsumer);\n }\n}\nfunction listenToDomEvent(tNode, tView, lView, eventTargetResolver, renderer, eventName, originalListener, wrappedListener) {\n ngDevMode && assertNotSame(wrappedListener, originalListener, 'Expected wrapped and original listeners to be different.');\n const isTNodeDirectiveHost = isDirectiveHost(tNode);\n let hasCoalesced = false;\n let existingListener = null;\n if (!eventTargetResolver && isTNodeDirectiveHost) {\n existingListener = findExistingListener(tView, lView, eventName, tNode.index);\n }\n if (existingListener !== null) {\n const lastListenerFn = existingListener.__ngLastListenerFn__ || existingListener;\n lastListenerFn.__ngNextListenerFn__ = originalListener;\n existingListener.__ngLastListenerFn__ = originalListener;\n hasCoalesced = true;\n } else {\n const native = getNativeByTNode(tNode, lView);\n const target = eventTargetResolver ? eventTargetResolver(native) : native;\n stashEventListenerImpl(lView, target, eventName, wrappedListener);\n if (!eventTargetResolver) {\n wrappedListener.__ngNativeEl__ = native;\n }\n const cleanupFn = renderer.listen(target, eventName, wrappedListener);\n if (!isAnimationEventType(eventName)) {\n const idxOrTargetGetter = eventTargetResolver ? _lView => eventTargetResolver(unwrapRNode(_lView[tNode.index])) : tNode.index;\n storeListenerCleanup(idxOrTargetGetter, tView, lView, eventName, wrappedListener, cleanupFn, false);\n }\n }\n return hasCoalesced;\n}\nfunction isAnimationEventType(eventName) {\n return eventName.startsWith('animation') || eventName.startsWith('transition');\n}\nfunction findExistingListener(tView, lView, eventName, tNodeIndex) {\n const tCleanup = tView.cleanup;\n if (tCleanup != null) {\n for (let i = 0; i < tCleanup.length - 1; i += 2) {\n const cleanupEventName = tCleanup[i];\n if (cleanupEventName === eventName && tCleanup[i + 1] === tNodeIndex) {\n const lCleanup = lView[CLEANUP];\n const listenerIdxInLCleanup = tCleanup[i + 2];\n return lCleanup && lCleanup.length > listenerIdxInLCleanup ? lCleanup[listenerIdxInLCleanup] : null;\n }\n if (typeof cleanupEventName === 'string') {\n i += 2;\n }\n }\n }\n return null;\n}\nfunction storeListenerCleanup(indexOrTargetGetter, tView, lView, eventName, listenerFn, cleanup, isOutput) {\n const tCleanup = tView.firstCreatePass ? getOrCreateTViewCleanup(tView) : null;\n const lCleanup = getOrCreateLViewCleanup(lView);\n const index = lCleanup.length;\n lCleanup.push(listenerFn, cleanup);\n tCleanup && tCleanup.push(eventName, indexOrTargetGetter, index, (index + 1) * (isOutput ? -1 : 1));\n}\n\nfunction createOutputListener(tNode, lView, listenerFn, targetDef, eventName) {\n const wrappedListener = wrapListener(tNode, lView, listenerFn);\n const hasBound = listenToDirectiveOutput(tNode, lView, targetDef, eventName, wrappedListener);\n if (!hasBound && ngDevMode) {\n throw new RuntimeError(316, `${stringifyForError(targetDef.type)} does not have an output with a public name of \"${eventName}\".`);\n }\n}\nfunction listenToDirectiveOutput(tNode, lView, target, eventName, listenerFn) {\n let hostIndex = null;\n let hostDirectivesStart = null;\n let hostDirectivesEnd = null;\n let hasOutput = false;\n if (ngDevMode && !tNode.directiveToIndex?.has(target.type)) {\n throw new Error(`Node does not have a directive with type ${target.type.name}`);\n }\n const data = tNode.directiveToIndex.get(target.type);\n if (typeof data === 'number') {\n hostIndex = data;\n } else {\n [hostIndex, hostDirectivesStart, hostDirectivesEnd] = data;\n }\n if (hostDirectivesStart !== null && hostDirectivesEnd !== null && tNode.hostDirectiveOutputs && Object.hasOwn(tNode.hostDirectiveOutputs, eventName)) {\n const hostDirectiveOutputs = tNode.hostDirectiveOutputs[eventName];\n for (let i = 0; i < hostDirectiveOutputs.length; i += 2) {\n const index = hostDirectiveOutputs[i];\n if (index >= hostDirectivesStart && index <= hostDirectivesEnd) {\n ngDevMode && assertIndexInRange(lView, index);\n hasOutput = true;\n listenToOutput(tNode, lView, index, hostDirectiveOutputs[i + 1], eventName, listenerFn);\n } else if (index > hostDirectivesEnd) {\n break;\n }\n }\n }\n if (Object.hasOwn(target.outputs, eventName)) {\n ngDevMode && assertIndexInRange(lView, hostIndex);\n hasOutput = true;\n listenToOutput(tNode, lView, hostIndex, eventName, eventName, listenerFn);\n }\n return hasOutput;\n}\nfunction listenToOutput(tNode, lView, directiveIndex, lookupName, eventName, listenerFn) {\n ngDevMode && assertIndexInRange(lView, directiveIndex);\n const instance = lView[directiveIndex];\n const tView = lView[TVIEW$1];\n const def = tView.data[directiveIndex];\n const propertyName = def.outputs[lookupName];\n const output = instance[propertyName];\n if (ngDevMode && !isOutputSubscribable(output)) {\n throw new Error(`@Output ${propertyName} not initialized in '${instance.constructor.name}'.`);\n }\n const subscription = output.subscribe(listenerFn);\n storeListenerCleanup(tNode.index, tView, lView, eventName, listenerFn, subscription, true);\n}\nfunction isOutputSubscribable(value) {\n return value != null && typeof value.subscribe === 'function';\n}\n\nfunction ษตษตcontrolCreate() {\n controlCreateInternal();\n}\nfunction controlCreateInternal() {\n const lView = getLView();\n const tView = getTView();\n const tNode = getCurrentTNode();\n if (tView.firstCreatePass) {\n initializeControlFirstCreatePass(tView, tNode);\n }\n if (tNode.controlDirectiveIndex === -1) {\n return;\n }\n performanceMarkFeature('NgSignalForms');\n const instance = lView[tNode.controlDirectiveIndex];\n const controlDef = tView.data[tNode.controlDirectiveIndex].controlDef;\n controlDef.create(instance, new ControlDirectiveHostImpl(lView, tView, tNode));\n}\nfunction ษตษตcontrol() {\n controlUpdateInternal();\n}\nfunction controlUpdateInternal() {\n if (ngDevMode && isInCheckNoChangesMode()) {\n return;\n }\n const lView = getLView();\n const tView = getTView();\n const tNode = getSelectedTNode();\n if (tNode.controlDirectiveIndex === -1) {\n return;\n }\n const controlDef = tView.data[tNode.controlDirectiveIndex].controlDef;\n const instance = lView[tNode.controlDirectiveIndex];\n controlDef.update(instance, new ControlDirectiveHostImpl(lView, tView, tNode));\n}\nclass ControlDirectiveHostImpl {\n lView;\n tView;\n tNode;\n hasPassThrough;\n constructor(lView, tView, tNode) {\n this.lView = lView;\n this.tView = tView;\n this.tNode = tNode;\n this.hasPassThrough = !!(tNode.flags & 4096);\n }\n get customControl() {\n return this.tNode.customControlIndex !== -1 ? this.lView[this.tNode.customControlIndex] : undefined;\n }\n get nativeElement() {\n return getNativeByTNode(this.tNode, this.lView);\n }\n get descriptor() {\n if (ngDevMode && isComponentHost(this.tNode)) {\n const componentIndex = this.tNode.directiveStart + this.tNode.componentOffset;\n const componentDef = this.tView.data[componentIndex];\n return `Component ${debugStringifyTypeForError(componentDef.type)}`;\n }\n return `<${this.tNode.value}>`;\n }\n listenToCustomControlOutput(outputName, callback) {\n const directiveDef = this.tView.data[this.tNode.customControlIndex];\n listenToDirectiveOutput(this.tNode, this.lView, directiveDef, outputName, wrapListener(this.tNode, this.lView, callback));\n }\n listenToCustomControlModel(listener) {\n const modelName = this.tNode.flags & 1024 ? 'valueChange' : 'checkedChange';\n const directiveDef = this.tView.data[this.tNode.customControlIndex];\n listenToDirectiveOutput(this.tNode, this.lView, directiveDef, modelName, wrapListener(this.tNode, this.lView, listener));\n }\n setInputOnDirectives(inputName, value, writePredicate) {\n const directiveIndices = this.tNode.inputs?.[inputName];\n const hostDirectiveInputs = this.tNode.hostDirectiveInputs?.[inputName];\n if (!directiveIndices && !hostDirectiveInputs) {\n return false;\n }\n let wasSet = false;\n if (directiveIndices) {\n for (const index of directiveIndices) {\n if (index === this.tNode.controlDirectiveIndex) {\n continue;\n }\n const directive = this.lView[index];\n const directiveDef = this.tView.data[index];\n const matchesPredicate = !writePredicate || writePredicate(readInputFromDirective(directive, directiveDef, inputName));\n if (matchesPredicate) {\n writeToDirectiveInput(directiveDef, directive, inputName, value);\n wasSet = true;\n }\n }\n }\n if (hostDirectiveInputs) {\n for (let i = 0; i < hostDirectiveInputs.length; i += 2) {\n const index = hostDirectiveInputs[i];\n if (index === this.tNode.controlDirectiveIndex) {\n continue;\n }\n const directive = this.lView[index];\n const internalName = hostDirectiveInputs[i + 1];\n const directiveDef = this.tView.data[index];\n const matchesPredicate = !writePredicate || writePredicate(readInputFromDirective(directive, directiveDef, inputName));\n if (matchesPredicate) {\n writeToDirectiveInput(directiveDef, directive, internalName, value);\n wasSet = true;\n }\n }\n }\n return wasSet;\n }\n setCustomControlModelInput(value) {\n const directiveDef = this.tView.data[this.tNode.customControlIndex];\n const modelName = this.tNode.flags & 1024 ? 'value' : 'checked';\n setDirectiveInput(this.tNode, this.tView, this.lView, directiveDef, modelName, value);\n }\n customControlHasInput(inputName) {\n if (this.tNode.customControlIndex === -1) {\n return false;\n }\n const directiveDef = this.tView.data[this.tNode.customControlIndex];\n const presence = directiveDef.signalFormsInputPresence ??= this._buildCustomControlInputCache(directiveDef);\n return presence[inputName] === true;\n }\n _buildCustomControlInputCache(directiveDef) {\n const cache = {};\n for (const key in directiveDef.inputs) {\n cache[key] = true;\n }\n if (directiveDef.hostDirectives !== null) {\n const queue = [...directiveDef.hostDirectives];\n while (queue.length > 0) {\n const hostDir = queue.shift();\n if (typeof hostDir !== 'function') {\n for (const key in hostDir.inputs) {\n cache[hostDir.inputs[key]] = true;\n }\n const hostDirectives = getHostDirectives(hostDir.directive);\n if (hostDirectives !== null) {\n queue.push(...hostDirectives);\n }\n continue;\n }\n for (const config of hostDir()) {\n if (typeof config === 'function') {\n continue;\n }\n if (config.inputs) {\n for (let i = 0; i < config.inputs.length; i += 2) {\n const exposedName = config.inputs[i + 1] || config.inputs[i];\n cache[exposedName] = true;\n }\n }\n const hostDirectives = getHostDirectives(config.directive);\n if (hostDirectives !== null) {\n queue.push(...hostDirectives);\n }\n }\n }\n }\n return cache;\n }\n}\nfunction getHostDirectives(directiveType) {\n if (typeof directiveType === 'function' && 'ษตdir' in directiveType) {\n return directiveType.ษตdir.hostDirectives ?? null;\n }\n return null;\n}\nfunction readInputFromDirective(instance, directiveDef, inputName) {\n if (!directiveDef.inputs || !Object.hasOwn(directiveDef.inputs, inputName)) {\n return undefined;\n }\n const [privateName, flags] = directiveDef.inputs[inputName];\n if ((flags & InputFlags.SignalBased) !== 0) {\n const field = instance[privateName];\n const node = field[SIGNAL];\n return node.value === REQUIRED_UNSET_VALUE ? undefined : node.value;\n }\n return instance[privateName];\n}\nfunction initializeControlFirstCreatePass(tView, tNode, lView) {\n ngDevMode && assertFirstCreatePass(tView);\n for (let i = tNode.directiveStart; i < tNode.directiveEnd; i++) {\n const directiveDef = tView.data[i];\n if (directiveDef.controlDef) {\n tNode.controlDirectiveIndex = i;\n break;\n }\n }\n if (tNode.controlDirectiveIndex === -1) {\n return;\n }\n const controlDef = tView.data[tNode.controlDirectiveIndex].controlDef;\n if (controlDef.passThroughInput) {\n if ((tNode.inputs?.[controlDef.passThroughInput]?.length ?? 0) > 1) {\n tNode.flags |= 4096;\n return;\n }\n }\n initializeCustomControlStatus(tView, tNode);\n}\nfunction initializeCustomControlStatus(tView, tNode) {\n for (let i = tNode.directiveStart; i < tNode.directiveEnd; i++) {\n const directiveDef = tView.data[i];\n if (tNode.directiveToIndex && !tNode.directiveToIndex.has(directiveDef.type)) {\n continue;\n }\n if (hasModelInput(directiveDef, 'value')) {\n tNode.flags |= 1024;\n tNode.customControlIndex = i;\n return;\n }\n if (hasModelInput(directiveDef, 'checked')) {\n tNode.flags |= 2048;\n tNode.customControlIndex = i;\n return;\n }\n }\n if (tNode.hostDirectiveInputs !== null && tNode.hostDirectiveOutputs !== null && tNode.directiveToIndex !== null) {\n const checkModel = (modelName, flag) => {\n const inputs = tNode.hostDirectiveInputs[modelName];\n const outputs = tNode.hostDirectiveOutputs[modelName + 'Change'];\n if (!inputs || !outputs) {\n return false;\n }\n for (let i = 0; i < inputs.length; i += 2) {\n const inputIndex = inputs[i];\n for (let j = 0; j < outputs.length; j += 2) {\n const outputIndex = outputs[j];\n if (inputIndex !== outputIndex) {\n continue;\n }\n for (const data of tNode.directiveToIndex.values()) {\n if (!Array.isArray(data)) {\n continue;\n }\n const [hostIndex, start, end] = data;\n if (inputIndex >= start && inputIndex <= end) {\n tNode.flags |= flag;\n tNode.customControlIndex = hostIndex;\n return true;\n }\n }\n }\n }\n return false;\n };\n if (checkModel('value', 1024)) {\n return;\n }\n if (checkModel('checked', 2048)) {\n return;\n }\n }\n}\nfunction hasModelInput(directiveDef, name) {\n return hasInput(directiveDef, name) && hasOutput(directiveDef, name + 'Change');\n}\nfunction hasInput(directiveDef, name) {\n return name in directiveDef.inputs;\n}\nfunction hasOutput(directiveDef, name) {\n return name in directiveDef.outputs;\n}\n\nconst BINDING = /* @__PURE__ */Symbol('BINDING');\nconst INPUT_BINDING_METADATA = {\n kind: 'input',\n requiredVars: 1\n};\nconst OUTPUT_BINDING_METADATA = {\n kind: 'output',\n requiredVars: 0\n};\nfunction inputBindingUpdate(targetDirectiveIdx, publicName, value) {\n const lView = getLView();\n const bindingIndex = nextBindingIndex();\n if (bindingUpdated(lView, bindingIndex, value)) {\n const tView = lView[TVIEW$1];\n const tNode = getSelectedTNode();\n const componentLView = getComponentLViewByIndex(tNode.index, lView);\n markViewDirty(componentLView, 1);\n const targetDef = tView.directiveRegistry[targetDirectiveIdx];\n if (ngDevMode && !targetDef) {\n throw new RuntimeError(315, `Input binding to property \"${publicName}\" does not have a target.`);\n }\n const hasSet = setDirectiveInput(tNode, tView, lView, targetDef, publicName, value);\n if (ngDevMode) {\n if (!hasSet) {\n throw new RuntimeError(315, `${stringifyForError(targetDef.type)} does not have an input with a public name of \"${publicName}\".`);\n }\n storePropertyBindingMetadata(tView.data, tNode, publicName, bindingIndex);\n }\n }\n}\nfunction inputBinding(publicName, value) {\n if (publicName === 'formField') {\n const binding = {\n [BINDING]: INPUT_BINDING_METADATA,\n create: () => {\n controlCreateInternal();\n },\n update: () => {\n inputBindingUpdate(binding.targetIdx, publicName, value());\n controlUpdateInternal();\n }\n };\n return binding;\n }\n const binding = {\n [BINDING]: INPUT_BINDING_METADATA,\n update: () => inputBindingUpdate(binding.targetIdx, publicName, value())\n };\n return binding;\n}\nfunction outputBinding(eventName, listener) {\n const binding = {\n [BINDING]: OUTPUT_BINDING_METADATA,\n create: () => {\n const lView = getLView();\n const tNode = getCurrentTNode();\n const tView = lView[TVIEW$1];\n const targetDef = tView.directiveRegistry[binding.targetIdx];\n createOutputListener(tNode, lView, listener, targetDef, eventName);\n }\n };\n return binding;\n}\nfunction twoWayBinding(publicName, value) {\n const input = inputBinding(publicName, value);\n const output = outputBinding(publicName + 'Change', eventValue => value.set(eventValue));\n ngDevMode && assertNotDefined(input.create, 'Unexpected `create` callback in inputBinding');\n ngDevMode && assertNotDefined(output.update, 'Unexpected `update` callback in outputBinding');\n const binding = {\n [BINDING]: {\n kind: 'twoWay',\n requiredVars: input[BINDING].requiredVars + output[BINDING].requiredVars\n },\n set targetIdx(idx) {\n input.targetIdx = idx;\n output.targetIdx = idx;\n },\n create: output.create,\n update: input.update\n };\n return binding;\n}\n\nconst SHARED_STYLES_HOST = /*#__PURE__*/ new InjectionToken(typeof ngDevMode !== 'undefined' && ngDevMode ? 'SHARED_STYLES_HOST' : '');\n\nfunction computeStaticStyling(tNode, attrs, writeToHost) {\n ngDevMode && assertFirstCreatePass(getTView(), 'Expecting to be called in first template pass only');\n let styles = writeToHost ? tNode.styles : null;\n let classes = writeToHost ? tNode.classes : null;\n let mode = 0;\n if (attrs !== null) {\n for (let i = 0; i < attrs.length; i++) {\n const value = attrs[i];\n if (typeof value === 'number') {\n mode = value;\n } else if (mode == 1) {\n classes = concatStringsWithSpace(classes, value);\n } else if (mode == 2) {\n const style = value;\n const styleValue = attrs[++i];\n styles = concatStringsWithSpace(styles, style + ': ' + styleValue + ';');\n }\n }\n }\n writeToHost ? tNode.styles = styles : tNode.stylesWithoutHost = styles;\n writeToHost ? tNode.classes = classes : tNode.classesWithoutHost = classes;\n}\n\nfunction ษตษตdirectiveInject(token, flags = 0) {\n const lView = getLView();\n if (lView === null) {\n ngDevMode && assertInjectImplementationNotEqual(ษตษตdirectiveInject);\n return __inject(token, flags);\n }\n const tNode = getCurrentTNode();\n const value = getOrCreateInjectable(tNode, lView, resolveForwardRef(token), flags);\n ngDevMode && emitInjectEvent(token, value, flags);\n return value;\n}\nfunction ษตษตinvalidFactory() {\n const msg = ngDevMode ? `This constructor was not compatible with Dependency Injection.` : 'invalid';\n throw new Error(msg);\n}\n\nfunction resolveDirectives(tView, lView, tNode, localRefs, directiveMatcher) {\n ngDevMode && assertFirstCreatePass(tView);\n const exportsMap = localRefs === null ? null : {\n '': -1\n };\n const matchedDirectiveDefs = directiveMatcher(tView, tNode);\n if (matchedDirectiveDefs !== null) {\n let directiveDefs = matchedDirectiveDefs;\n let hostDirectiveDefs = null;\n let hostDirectiveRanges = null;\n for (const def of matchedDirectiveDefs) {\n if (def.resolveHostDirectives !== null) {\n [directiveDefs, hostDirectiveDefs, hostDirectiveRanges] = def.resolveHostDirectives(matchedDirectiveDefs);\n break;\n }\n }\n ngDevMode && assertNoDuplicateDirectives(directiveDefs);\n initializeDirectives(tView, lView, tNode, directiveDefs, exportsMap, hostDirectiveDefs, hostDirectiveRanges);\n }\n if (exportsMap !== null && localRefs !== null) {\n cacheMatchingLocalNames(tNode, localRefs, exportsMap);\n }\n}\nfunction cacheMatchingLocalNames(tNode, localRefs, exportsMap) {\n const localNames = tNode.localNames = [];\n for (let i = 0; i < localRefs.length; i += 2) {\n const index = exportsMap[localRefs[i + 1]];\n if (index == null) throw new RuntimeError(-301, ngDevMode && `Export of name '${localRefs[i + 1]}' not found!`);\n localNames.push(localRefs[i], index);\n }\n}\nfunction markAsComponentHost(tView, hostTNode, componentOffset) {\n ngDevMode && assertFirstCreatePass(tView);\n ngDevMode && assertGreaterThan(componentOffset, -1, 'componentOffset must be great than -1');\n hostTNode.componentOffset = componentOffset;\n (tView.components ??= []).push(hostTNode.index);\n}\nfunction initializeDirectives(tView, lView, tNode, directives, exportsMap, hostDirectiveDefs, hostDirectiveRanges) {\n ngDevMode && assertFirstCreatePass(tView);\n const directivesLength = directives.length;\n let componentDef = null;\n for (let i = 0; i < directivesLength; i++) {\n const def = directives[i];\n if (componentDef === null && isComponentDef(def)) {\n componentDef = def;\n markAsComponentHost(tView, tNode, i);\n }\n diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, lView), tView, def.type);\n }\n initTNodeFlags(tNode, tView.data.length, directivesLength);\n if (componentDef?.viewProvidersResolver) {\n componentDef.viewProvidersResolver(componentDef);\n }\n for (let i = 0; i < directivesLength; i++) {\n const def = directives[i];\n if (def.providersResolver) {\n def.providersResolver(def);\n }\n }\n let preOrderHooksFound = false;\n let preOrderCheckHooksFound = false;\n let directiveIdx = allocExpando(tView, lView, directivesLength, null);\n ngDevMode && assertSame(directiveIdx, tNode.directiveStart, 'TNode.directiveStart should point to just allocated space');\n if (directivesLength > 0) {\n tNode.directiveToIndex = new Map();\n }\n for (let i = 0; i < directivesLength; i++) {\n const def = directives[i];\n tNode.mergedAttrs = mergeHostAttrs(tNode.mergedAttrs, def.hostAttrs);\n configureViewWithDirective(tView, tNode, lView, directiveIdx, def);\n saveNameToExportMap(directiveIdx, def, exportsMap);\n if (hostDirectiveRanges !== null && hostDirectiveRanges.has(def)) {\n const [start, end] = hostDirectiveRanges.get(def);\n tNode.directiveToIndex.set(def.type, [directiveIdx, start + tNode.directiveStart, end + tNode.directiveStart]);\n } else if (hostDirectiveDefs === null || !hostDirectiveDefs.has(def)) {\n tNode.directiveToIndex.set(def.type, directiveIdx);\n }\n if (def.contentQueries !== null) tNode.flags |= 4;\n if (def.hostBindings !== null || def.hostAttrs !== null || def.hostVars !== 0) tNode.flags |= 64;\n const lifeCycleHooks = def.type.prototype;\n if (!preOrderHooksFound && (lifeCycleHooks.ngOnChanges || lifeCycleHooks.ngOnInit || lifeCycleHooks.ngDoCheck)) {\n (tView.preOrderHooks ??= []).push(tNode.index);\n preOrderHooksFound = true;\n }\n if (!preOrderCheckHooksFound && (lifeCycleHooks.ngOnChanges || lifeCycleHooks.ngDoCheck)) {\n (tView.preOrderCheckHooks ??= []).push(tNode.index);\n preOrderCheckHooksFound = true;\n }\n directiveIdx++;\n }\n initializeInputAndOutputAliases(tView, tNode, hostDirectiveDefs);\n}\nfunction initializeInputAndOutputAliases(tView, tNode, hostDirectiveDefs) {\n ngDevMode && assertFirstCreatePass(tView);\n for (let index = tNode.directiveStart; index < tNode.directiveEnd; index++) {\n const directiveDef = tView.data[index];\n if (hostDirectiveDefs === null || !hostDirectiveDefs.has(directiveDef)) {\n setupSelectorMatchedInputsOrOutputs(0, tNode, directiveDef, index);\n setupSelectorMatchedInputsOrOutputs(1, tNode, directiveDef, index);\n setupInitialInputs(tNode, index, false);\n } else {\n const hostDirectiveDef = hostDirectiveDefs.get(directiveDef);\n setupHostDirectiveInputsOrOutputs(0, tNode, hostDirectiveDef, index);\n setupHostDirectiveInputsOrOutputs(1, tNode, hostDirectiveDef, index);\n setupInitialInputs(tNode, index, true);\n }\n }\n}\nfunction setupSelectorMatchedInputsOrOutputs(mode, tNode, def, directiveIndex) {\n const aliasMap = mode === 0 ? def.inputs : def.outputs;\n for (const publicName in aliasMap) {\n if (Object.hasOwn(aliasMap, publicName)) {\n let bindings;\n if (mode === 0) {\n bindings = tNode.inputs ??= {};\n } else {\n bindings = tNode.outputs ??= {};\n }\n bindings[publicName] ??= [];\n bindings[publicName].push(directiveIndex);\n setShadowStylingInputFlags(tNode, publicName);\n }\n }\n}\nfunction setupHostDirectiveInputsOrOutputs(mode, tNode, config, directiveIndex) {\n const aliasMap = mode === 0 ? config.inputs : config.outputs;\n for (const initialName in aliasMap) {\n if (Object.hasOwn(aliasMap, initialName)) {\n const publicName = aliasMap[initialName];\n let bindings;\n if (mode === 0) {\n bindings = tNode.hostDirectiveInputs ??= {};\n } else {\n bindings = tNode.hostDirectiveOutputs ??= {};\n }\n bindings[publicName] ??= [];\n bindings[publicName].push(directiveIndex, initialName);\n setShadowStylingInputFlags(tNode, publicName);\n }\n }\n}\nfunction setShadowStylingInputFlags(tNode, publicName) {\n if (publicName === 'class') {\n tNode.flags |= 8;\n } else if (publicName === 'style') {\n tNode.flags |= 16;\n }\n}\nfunction setupInitialInputs(tNode, directiveIndex, isHostDirective) {\n const {\n attrs,\n inputs,\n hostDirectiveInputs\n } = tNode;\n if (attrs === null || !isHostDirective && inputs === null || isHostDirective && hostDirectiveInputs === null || isInlineTemplate(tNode)) {\n tNode.initialInputs ??= [];\n tNode.initialInputs.push(null);\n return;\n }\n let inputsToStore = null;\n let i = 0;\n while (i < attrs.length) {\n const attrName = attrs[i];\n if (attrName === 0) {\n i += 4;\n continue;\n } else if (attrName === 5) {\n i += 2;\n continue;\n } else if (typeof attrName === 'number') {\n break;\n }\n if (!isHostDirective && Object.hasOwn(inputs, attrName)) {\n const inputConfig = inputs[attrName];\n for (const index of inputConfig) {\n if (index === directiveIndex) {\n inputsToStore ??= [];\n inputsToStore.push(attrName, attrs[i + 1]);\n break;\n }\n }\n } else if (isHostDirective && Object.hasOwn(hostDirectiveInputs, attrName)) {\n const config = hostDirectiveInputs[attrName];\n for (let j = 0; j < config.length; j += 2) {\n if (config[j] === directiveIndex) {\n inputsToStore ??= [];\n inputsToStore.push(config[j + 1], attrs[i + 1]);\n break;\n }\n }\n }\n i += 2;\n }\n tNode.initialInputs ??= [];\n tNode.initialInputs.push(inputsToStore);\n}\nfunction configureViewWithDirective(tView, tNode, lView, directiveIndex, def) {\n ngDevMode && assertGreaterThanOrEqual(directiveIndex, HEADER_OFFSET, 'Must be in Expando section');\n tView.data[directiveIndex] = def;\n const directiveFactory = def.factory || (def.factory = getFactoryDef(def.type, true));\n const nodeInjectorFactory = new NodeInjectorFactory(directiveFactory, isComponentDef(def), ษตษตdirectiveInject, ngDevMode ? def.type.name : null);\n tView.blueprint[directiveIndex] = nodeInjectorFactory;\n lView[directiveIndex] = nodeInjectorFactory;\n registerHostBindingOpCodes(tView, tNode, directiveIndex, allocExpando(tView, lView, def.hostVars, NO_CHANGE), def);\n}\nfunction registerHostBindingOpCodes(tView, tNode, directiveIdx, directiveVarsIdx, def) {\n ngDevMode && assertFirstCreatePass(tView);\n const hostBindings = def.hostBindings;\n if (hostBindings) {\n let hostBindingOpCodes = tView.hostBindingOpCodes;\n if (hostBindingOpCodes === null) {\n hostBindingOpCodes = tView.hostBindingOpCodes = [];\n }\n const elementIndx = ~tNode.index;\n if (lastSelectedElementIdx(hostBindingOpCodes) != elementIndx) {\n hostBindingOpCodes.push(elementIndx);\n }\n hostBindingOpCodes.push(directiveIdx, directiveVarsIdx, hostBindings);\n }\n}\nfunction lastSelectedElementIdx(hostBindingOpCodes) {\n let i = hostBindingOpCodes.length;\n while (i > 0) {\n const value = hostBindingOpCodes[--i];\n if (typeof value === 'number' && value < 0) {\n return value;\n }\n }\n return 0;\n}\nfunction saveNameToExportMap(directiveIdx, def, exportsMap) {\n if (exportsMap) {\n if (def.exportAs) {\n for (let i = 0; i < def.exportAs.length; i++) {\n exportsMap[def.exportAs[i]] = directiveIdx;\n }\n }\n if (isComponentDef(def)) exportsMap[''] = directiveIdx;\n }\n}\nfunction initTNodeFlags(tNode, index, numberOfDirectives) {\n ngDevMode && assertNotEqual(numberOfDirectives, tNode.directiveEnd - tNode.directiveStart, 'Reached the max number of directives');\n tNode.flags |= 1;\n tNode.directiveStart = index;\n tNode.directiveEnd = index + numberOfDirectives;\n tNode.providerIndexes = index;\n}\nfunction assertNoDuplicateDirectives(directives) {\n if (directives.length < 2) {\n return;\n }\n const seenDirectives = new Set();\n for (const current of directives) {\n if (seenDirectives.has(current)) {\n throw new RuntimeError(309, `Directive ${current.type.name} matches multiple times on the same element. ` + `Directives can only match an element once.`);\n }\n seenDirectives.add(current);\n }\n}\n\nfunction directiveHostFirstCreatePass(index, lView, type, name, directiveMatcher, bindingsEnabled, attrsIndex, localRefsIndex) {\n const tView = lView[TVIEW$1];\n ngDevMode && assertFirstCreatePass(tView);\n const tViewConsts = tView.consts;\n const attrs = getConstant(tViewConsts, attrsIndex);\n const tNode = getOrCreateTNode(tView, index, type, name, attrs);\n if (bindingsEnabled) {\n resolveDirectives(tView, lView, tNode, getConstant(tViewConsts, localRefsIndex), directiveMatcher);\n }\n tNode.mergedAttrs = mergeHostAttrs(tNode.mergedAttrs, tNode.attrs);\n if (tNode.attrs !== null) {\n computeStaticStyling(tNode, tNode.attrs, false);\n }\n if (tNode.mergedAttrs !== null) {\n computeStaticStyling(tNode, tNode.mergedAttrs, true);\n }\n if (tView.queries !== null) {\n tView.queries.elementStart(tView, tNode);\n }\n return tNode;\n}\nfunction directiveHostEndFirstCreatePass(tView, tNode) {\n ngDevMode && assertFirstCreatePass(tView);\n registerPostOrderHooks(tView, tNode);\n if (isContentQueryHost(tNode)) {\n tView.queries.elementEnd(tNode);\n }\n}\nfunction domOnlyFirstCreatePass(index, tView, type, name, attrsIndex, localRefsIndex) {\n ngDevMode && assertFirstCreatePass(tView);\n const tViewConsts = tView.consts;\n const attrs = getConstant(tViewConsts, attrsIndex);\n const tNode = getOrCreateTNode(tView, index, type, name, attrs);\n tNode.mergedAttrs = mergeHostAttrs(tNode.mergedAttrs, tNode.attrs);\n if (localRefsIndex != null) {\n const refs = getConstant(tViewConsts, localRefsIndex);\n tNode.localNames = [];\n for (let i = 0; i < refs.length; i += 2) {\n tNode.localNames.push(refs[i], -1);\n }\n }\n if (tNode.attrs !== null) {\n computeStaticStyling(tNode, tNode.attrs, false);\n }\n if (tNode.mergedAttrs !== null) {\n computeStaticStyling(tNode, tNode.mergedAttrs, true);\n }\n if (tView.queries !== null) {\n tView.queries.elementStart(tView, tNode);\n }\n return tNode;\n}\n\nconst shadowRootSupported = typeof ShadowRoot !== 'undefined';\nconst documentSupported = typeof Document !== 'undefined';\nfunction toInputRefArray(map) {\n return Object.keys(map).map(name => {\n const [propName, flags, transform] = map[name];\n const inputData = {\n propName: propName,\n templateName: name,\n isSignal: (flags & InputFlags.SignalBased) !== 0\n };\n if (transform) {\n inputData.transform = transform;\n }\n return inputData;\n });\n}\nfunction toOutputRefArray(map) {\n return Object.keys(map).map(name => ({\n propName: map[name],\n templateName: name\n }));\n}\nfunction verifyNotAnOrphanComponent(componentDef) {\n if ((typeof ngJitMode === 'undefined' || ngJitMode) && componentDef.debugInfo?.forbidOrphanRendering) {\n if (depsTracker.isOrphanComponent(componentDef.type)) {\n throw new RuntimeError(981, `Orphan component found! Trying to render the component ${debugStringifyTypeForError(componentDef.type)} without first loading the NgModule that declares it. It is recommended to make this component standalone in order to avoid this error. If this is not possible now, import the component's NgModule in the appropriate NgModule, or the standalone component in which you are trying to render this component. If this is a lazy import, load the NgModule lazily as well and use its module injector.`);\n }\n }\n}\nfunction createRootViewInjector(componentDef, environmentInjector, injector) {\n let realEnvironmentInjector = environmentInjector instanceof EnvironmentInjector ? environmentInjector : environmentInjector?.injector;\n if (realEnvironmentInjector && componentDef.getStandaloneInjector !== null) {\n realEnvironmentInjector = componentDef.getStandaloneInjector(realEnvironmentInjector) || realEnvironmentInjector;\n }\n const rootViewInjector = realEnvironmentInjector ? new ChainedInjector(injector, realEnvironmentInjector) : injector;\n return rootViewInjector;\n}\nfunction createRootLViewEnvironment(rootLViewInjector) {\n const rendererFactory = rootLViewInjector.get(RendererFactory2, null);\n if (rendererFactory === null) {\n throw new RuntimeError(407, ngDevMode && 'Angular was not able to inject a renderer (RendererFactory2). ' + 'Likely this is due to a broken DI hierarchy. ' + 'Make sure that any injector used to create this component has a correct parent.');\n }\n const sanitizer = rootLViewInjector.get(Sanitizer, null);\n const changeDetectionScheduler = rootLViewInjector.get(ChangeDetectionScheduler, null);\n const tracingService = rootLViewInjector.get(TracingService, null, {\n optional: true\n });\n let ngReflect = false;\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n ngReflect = rootLViewInjector.get(NG_REFLECT_ATTRS_FLAG, NG_REFLECT_ATTRS_FLAG_DEFAULT);\n }\n return {\n rendererFactory,\n sanitizer,\n changeDetectionScheduler,\n ngReflect,\n tracingService\n };\n}\nfunction createHostElement(componentDef, renderer, hostElementNamespace) {\n const tagName = inferTagNameFromDefinition(componentDef);\n const namespace = tagName === 'svg' ? SVG_NAMESPACE : tagName === 'math' ? MATH_ML_NAMESPACE : hostElementNamespace;\n return createElementNode(renderer, tagName, namespace);\n}\nfunction assertNotScriptHostElement(element) {\n const elementName = element && 'localName' in element && typeof element.localName === 'string' ? element.localName : element?.tagName;\n if (elementName?.toLowerCase() === 'script') {\n throw new RuntimeError(905, ngDevMode && `\"
+
+
+
+
+