@ngocsangairvds/vsaf 5.6.3 → 5.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (23) hide show
  1. package/package.json +1 -1
  2. package/packages/cli/dist/server/routes/runs.d.ts +12 -0
  3. package/packages/cli/dist/server/routes/runs.d.ts.map +1 -1
  4. package/packages/cli/dist/server/routes/runs.js +53 -8
  5. package/packages/cli/dist/server/routes/runs.js.map +1 -1
  6. package/packages/web/dist/web/3rdpartylicenses.txt +0 -26
  7. package/packages/web/dist/web/browser/{chunk-OBMUVQWL.js → chunk-FFYMNCCZ.js} +1 -1
  8. package/packages/web/dist/web/browser/{chunk-VJ3UNUDS.js → chunk-IBSRIWBK.js} +1 -1
  9. package/packages/web/dist/web/browser/{chunk-K4VRVZWF.js → chunk-LPQARKUF.js} +1 -1
  10. package/packages/web/dist/web/browser/{chunk-FQUOTTEA.js → chunk-NSKD5KW7.js} +1 -1
  11. package/packages/web/dist/web/browser/chunk-S76O6O57.js +1 -0
  12. package/packages/web/dist/web/browser/{chunk-4LHJGOIU.js → chunk-TTPORHEG.js} +1 -1
  13. package/packages/web/dist/web/browser/{chunk-FWLQWWZ3.js → chunk-UN7U5NAR.js} +1 -1
  14. package/packages/web/dist/web/browser/chunk-VA6YRKIE.js +1 -0
  15. package/packages/web/dist/web/browser/chunk-WDOCF7IL.js +5 -0
  16. package/packages/web/dist/web/browser/{chunk-3LPWUDNW.js → chunk-YBYKUHHQ.js} +1 -1
  17. package/packages/web/dist/web/browser/index.html +2 -2
  18. package/packages/web/dist/web/browser/{main-7FONYLE6.js → main-7PKVTIG7.js} +1 -1
  19. package/packages/web/dist/web/browser/styles-MG7ITKTI.css +1 -0
  20. package/packages/web/dist/web/browser/chunk-UJHVWNPU.js +0 -1
  21. package/packages/web/dist/web/browser/chunk-UXRT7NQK.js +0 -1
  22. package/packages/web/dist/web/browser/chunk-W7ZKECPT.js +0 -5
  23. package/packages/web/dist/web/browser/styles-PWTTI45T.css +0 -1
@@ -1 +1 @@
1
- import{$ as ie,$a as mn,A as Q,Aa as rr,Ab as En,B as Wt,Ba as cn,Bb as ct,C as Gr,Cb as _e,D as $,Da as De,Db as bn,E as tt,Eb as Mn,F as j,Fb as In,G as w,Ga as un,Gb as ut,H as Wr,Ha as ln,Ia as dn,J as y,Ja as hn,Ka as fn,L as Yr,M,N as R,Nb as Tn,O as f,Ob as Dn,P as Qr,Pb as _n,Q as Kr,R as K,S as L,Ta as pn,X as Yt,Y as z,Ya as gn,Z as Qt,_ as Zr,_a as vn,a as d,aa as rt,ab as yn,b as _,ba as Kt,c as S,ca as nt,d as kr,da as E,e as Hr,ea as Ie,f as $r,fa as Zt,g as re,ga as Jr,h as P,ha as Jt,i as U,ia as Xr,j as A,ja as Xt,k as g,ka as en,l as zr,la as it,m as Vt,ma as er,n as Fr,na as ot,o as T,p as Br,pa as tn,q as V,r as Gt,ra as Te,s as qr,sa as rn,sb as Rn,t as Je,ta as nn,tb as C,ub as st,v as ne,va as on,vb as Sn,w as Xe,wa as tr,wb as wn,x as et,xa as F,xb as Cn,y as de,ya as sn,z as Vr,za as an,zb as at}from"./chunk-W7ZKECPT.js";var Ae=class{_doc;constructor(n){this._doc=n}manager},lt=(()=>{class t extends Ae{constructor(e){super(e)}supports(e){return!0}addEventListener(e,r,i,o){return e.addEventListener(r,i,o),()=>this.removeEventListener(e,r,i,o)}removeEventListener(e,r,i,o){return e.removeEventListener(r,i,o)}static \u0275fac=function(r){return new(r||t)(R(z))};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),pt=new M(""),sr=(()=>{class t{_zone;_plugins;_eventNameToPlugin=new Map;constructor(e,r){this._zone=r,e.forEach(s=>{s.manager=this});let i=e.filter(s=>!(s instanceof lt));this._plugins=i.slice().reverse();let o=e.find(s=>s instanceof lt);o&&this._plugins.push(o)}addEventListener(e,r,i,o){return this._findPluginFor(r).addEventListener(e,r,i,o)}getZone(){return this._zone}_findPluginFor(e){let r=this._eventNameToPlugin.get(e);if(r)return r;if(r=this._plugins.find(o=>o.supports(e)),!r)throw new w(5101,!1);return this._eventNameToPlugin.set(e,r),r}static \u0275fac=function(r){return new(r||t)(R(pt),R(rt))};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),nr="ng-app-id";function An(t){for(let n of t)n.remove()}function On(t,n){let e=n.createElement("style");return e.textContent=t,e}function Ui(t,n,e,r){let i=t.head?.querySelectorAll(`style[${nr}="${n}"],link[${nr}="${n}"]`);if(i)for(let o of i)o.removeAttribute(nr),o instanceof HTMLLinkElement?r.set(o.href.slice(o.href.lastIndexOf("/")+1),{usage:0,elements:[o]}):o.textContent&&e.set(o.textContent,{usage:0,elements:[o]})}function or(t,n){let e=n.createElement("link");return e.setAttribute("rel","stylesheet"),e.setAttribute("href",t),e}var ar=(()=>{class t{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;constructor(e,r,i,o={}){this.doc=e,this.appId=r,this.nonce=i,Ui(e,r,this.inline,this.external),this.hosts.add(e.head)}addStyles(e,r){for(let i of e)this.addUsage(i,this.inline,On);r?.forEach(i=>this.addUsage(i,this.external,or))}removeStyles(e,r){for(let i of e)this.removeUsage(i,this.inline);r?.forEach(i=>this.removeUsage(i,this.external))}addUsage(e,r,i){let o=r.get(e);o?o.usage++:r.set(e,{usage:1,elements:[...this.hosts].map(s=>this.addElement(s,i(e,this.doc)))})}removeUsage(e,r){let i=r.get(e);i&&(i.usage--,i.usage<=0&&(An(i.elements),r.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])An(e);this.hosts.clear()}addHost(e){this.hosts.add(e);for(let[r,{elements:i}]of this.inline)i.push(this.addElement(e,On(r,this.doc)));for(let[r,{elements:i}]of this.external)i.push(this.addElement(e,or(r,this.doc)))}removeHost(e){this.hosts.delete(e)}addElement(e,r){return this.nonce&&r.setAttribute("nonce",this.nonce),e.appendChild(r)}static \u0275fac=function(r){return new(r||t)(R(z),R(Xt),R(er,8),R(it))};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),ir={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"},cr=/%COMP%/g;var Pn="%COMP%",Li=`_nghost-${Pn}`,xi=`_ngcontent-${Pn}`,ji=!0,ki=new M("",{factory:()=>ji});function Hi(t){return xi.replace(cr,t)}function $i(t){return Li.replace(cr,t)}function Un(t,n){return n.map(e=>e.replace(cr,t))}var ur=(()=>{class t{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;constructor(e,r,i,o,s,a,c=null,u=null){this.eventManager=e,this.sharedStylesHost=r,this.appId=i,this.removeStylesOnCompDestroy=o,this.doc=s,this.ngZone=a,this.nonce=c,this.tracingService=u,this.defaultRenderer=new Oe(e,s,a,this.tracingService)}createRenderer(e,r){if(!e||!r)return this.defaultRenderer;let i=this.getOrCreateRenderer(e,r);return i instanceof ht?i.applyToHost(e):i instanceof Ne&&i.applyStyles(),i}getOrCreateRenderer(e,r){let i=this.rendererByCompId,o=i.get(r.id);if(!o){let s=this.doc,a=this.ngZone,c=this.eventManager,u=this.sharedStylesHost,l=this.removeStylesOnCompDestroy,h=this.tracingService;switch(r.encapsulation){case ot.Emulated:o=new ht(c,u,r,this.appId,l,s,a,h);break;case ot.ShadowDom:return new dt(c,e,r,s,a,this.nonce,h,u);case ot.ExperimentalIsolatedShadowDom:return new dt(c,e,r,s,a,this.nonce,h);default:o=new Ne(c,u,r,l,s,a,h);break}i.set(r.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(e){this.rendererByCompId.delete(e)}static \u0275fac=function(r){return new(r||t)(R(sr),R(ar),R(Xt),R(ki),R(z),R(rt),R(er),R(nn,8))};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),Oe=class{eventManager;doc;ngZone;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(n,e,r,i){this.eventManager=n,this.doc=e,this.ngZone=r,this.tracingService=i}destroy(){}destroyNode=null;createElement(n,e){return e?this.doc.createElementNS(ir[e]||e,n):this.doc.createElement(n)}createComment(n){return this.doc.createComment(n)}createText(n){return this.doc.createTextNode(n)}appendChild(n,e){(Nn(n)?n.content:n).appendChild(e)}insertBefore(n,e,r){n&&(Nn(n)?n.content:n).insertBefore(e,r)}removeChild(n,e){e.remove()}selectRootElement(n,e){let r=typeof n=="string"?this.doc.querySelector(n):n;if(!r)throw new w(-5104,!1);return e||(r.textContent=""),r}parentNode(n){return n.parentNode}nextSibling(n){return n.nextSibling}setAttribute(n,e,r,i){if(i){e=i+":"+e;let o=ir[i];o?n.setAttributeNS(o,e,r):n.setAttribute(e,r)}else n.setAttribute(e,r)}removeAttribute(n,e,r){if(r){let i=ir[r];i?n.removeAttributeNS(i,e):n.removeAttribute(`${r}:${e}`)}else n.removeAttribute(e)}addClass(n,e){n.classList.add(e)}removeClass(n,e){n.classList.remove(e)}setStyle(n,e,r,i){i&(Te.DashCase|Te.Important)?n.style.setProperty(e,r,i&Te.Important?"important":""):n.style[e]=r}removeStyle(n,e,r){r&Te.DashCase?n.style.removeProperty(e):n.style[e]=""}setProperty(n,e,r){n!=null&&(n[e]=r)}setValue(n,e){n.nodeValue=e}listen(n,e,r,i){if(typeof n=="string"&&(n=_e().getGlobalEventTarget(this.doc,n),!n))throw new w(5102,!1);let o=this.decoratePreventDefault(r);return this.tracingService?.wrapEventListener&&(o=this.tracingService.wrapEventListener(n,e,o)),this.eventManager.addEventListener(n,e,o,i)}decoratePreventDefault(n){return e=>{if(e==="__ngUnwrap__")return n;n(e)===!1&&e.preventDefault()}}};function Nn(t){return t.tagName==="TEMPLATE"&&t.content!==void 0}var dt=class extends Oe{hostEl;sharedStylesHost;shadowRoot;constructor(n,e,r,i,o,s,a,c){super(n,i,o,a),this.hostEl=e,this.sharedStylesHost=c,this.shadowRoot=e.attachShadow({mode:"open"}),this.sharedStylesHost&&this.sharedStylesHost.addHost(this.shadowRoot);let u=r.styles;u=Un(r.id,u);for(let h of u){let m=document.createElement("style");s&&m.setAttribute("nonce",s),m.textContent=h,this.shadowRoot.appendChild(m)}let l=r.getExternalStyles?.();if(l)for(let h of l){let m=or(h,i);s&&m.setAttribute("nonce",s),this.shadowRoot.appendChild(m)}}nodeOrShadowRoot(n){return n===this.hostEl?this.shadowRoot:n}appendChild(n,e){return super.appendChild(this.nodeOrShadowRoot(n),e)}insertBefore(n,e,r){return super.insertBefore(this.nodeOrShadowRoot(n),e,r)}removeChild(n,e){return super.removeChild(null,e)}parentNode(n){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(n)))}destroy(){this.sharedStylesHost&&this.sharedStylesHost.removeHost(this.shadowRoot)}},Ne=class extends Oe{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(n,e,r,i,o,s,a,c){super(n,o,s,a),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=i;let u=r.styles;this.styles=c?Un(c,u):u,this.styleUrls=r.getExternalStyles?.(c)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&rn.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},ht=class extends Ne{contentAttr;hostAttr;constructor(n,e,r,i,o,s,a,c){let u=i+"-"+r.id;super(n,e,r,o,s,a,c,u),this.contentAttr=Hi(u),this.hostAttr=$i(u)}applyToHost(n){this.applyStyles(),this.setAttribute(n,this.hostAttr,"")}createElement(n,e){let r=super.createElement(n,e);return super.setAttribute(r,this.contentAttr,""),r}};var gt=class t extends Mn{supportsDOMEvents=!0;static makeCurrent(){bn(new t)}onAndCancel(n,e,r,i){return n.addEventListener(e,r,i),()=>{n.removeEventListener(e,r,i)}}dispatchEvent(n,e){n.dispatchEvent(e)}remove(n){n.remove()}createElement(n,e){return e=e||this.getDefaultDocument(),e.createElement(n)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(n){return n.nodeType===Node.ELEMENT_NODE}isShadowRoot(n){return n instanceof DocumentFragment}getGlobalEventTarget(n,e){return e==="window"?window:e==="document"?n:e==="body"?n.body:null}getBaseHref(n){let e=zi();return e==null?null:Fi(e)}resetBaseElement(){Pe=null}getUserAgent(){return window.navigator.userAgent}getCookie(n){return Tn(document.cookie,n)}},Pe=null;function zi(){return Pe=Pe||document.head.querySelector("base"),Pe?Pe.getAttribute("href"):null}function Fi(t){return new URL(t,document.baseURI).pathname}var Bi=(()=>{class t{build(){return new XMLHttpRequest}static \u0275fac=function(r){return new(r||t)};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),Ln=["alt","control","meta","shift"],qi={"\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"},Vi={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey},kn=(()=>{class t extends Ae{constructor(e){super(e)}supports(e){return t.parseEventName(e)!=null}addEventListener(e,r,i,o){let s=t.parseEventName(r),a=t.eventCallback(s.fullKey,i,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>_e().onAndCancel(e,s.domEventName,a,o))}static parseEventName(e){let r=e.toLowerCase().split("."),i=r.shift();if(r.length===0||!(i==="keydown"||i==="keyup"))return null;let o=t._normalizeKey(r.pop()),s="",a=r.indexOf("code");if(a>-1&&(r.splice(a,1),s="code."),Ln.forEach(u=>{let l=r.indexOf(u);l>-1&&(r.splice(l,1),s+=u+".")}),s+=o,r.length!=0||o.length===0)return null;let c={};return c.domEventName=i,c.fullKey=s,c}static matchEventFullKeyCode(e,r){let i=qi[e.key]||e.key,o="";return r.indexOf("code.")>-1&&(i=e.code,o="code."),i==null||!i?!1:(i=i.toLowerCase(),i===" "?i="space":i==="."&&(i="dot"),Ln.forEach(s=>{if(s!==i){let a=Vi[s];a(e)&&(o+=s+".")}}),o+=i,o===r)}static eventCallback(e,r,i){return o=>{t.matchEventFullKeyCode(o,e)&&i.runGuarded(()=>r(o))}}static _normalizeKey(e){return e==="esc"?"escape":e}static \u0275fac=function(r){return new(r||t)(R(z))};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})();function Gi(t,n,e){return S(this,null,function*(){let r=d({rootComponent:t},Wi(n,e));return En(r)})}function Wi(t,n){return{platformRef:n?.platformRef,appProviders:[...Ji,...t?.providers??[]],platformProviders:Zi}}function Yi(){gt.makeCurrent()}function Qi(){return new Kt}function Ki(){return Xr(document),document}var Zi=[{provide:it,useValue:_n},{provide:en,useValue:Yi,multi:!0},{provide:z,useFactory:Ki}];var Ji=[{provide:Kr,useValue:"root"},{provide:Kt,useFactory:Qi},{provide:pt,useClass:lt,multi:!0},{provide:pt,useClass:kn,multi:!0},ur,ar,sr,{provide:on,useExisting:ur},{provide:Dn,useClass:Bi},[]];var Hn=(()=>{class t{_doc;constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}static \u0275fac=function(r){return new(r||t)(R(z))};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var p="primary",Ye=Symbol("RouteTitle"),pr=class{params;constructor(n){this.params=n||{}}has(n){return Object.prototype.hasOwnProperty.call(this.params,n)}get(n){if(this.has(n)){let e=this.params[n];return Array.isArray(e)?e[0]:e}return null}getAll(n){if(this.has(n)){let e=this.params[n];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}};function se(t){return new pr(t)}function lr(t,n,e){for(let r=0;r<t.length;r++){let i=t[r],o=n[r];if(i[0]===":")e[i.substring(1)]=o;else if(i!==o.path)return!1}return!0}function Gn(t,n,e){let r=e.path.split("/"),i=r.indexOf("**");if(i===-1){if(r.length>t.length||e.pathMatch==="full"&&(n.hasChildren()||r.length<t.length))return null;let c={},u=t.slice(0,r.length);return lr(r,u,c)?{consumed:u,posParams:c}:null}if(i!==r.lastIndexOf("**"))return null;let o=r.slice(0,i),s=r.slice(i+1);if(o.length+s.length>t.length||e.pathMatch==="full"&&n.hasChildren()&&e.path!=="**")return null;let a={};return!lr(o,t.slice(0,o.length),a)||!lr(s,t.slice(t.length-s.length),a)?null:{consumed:t,posParams:a}}function wt(t){return new Promise((n,e)=>{t.pipe(Q()).subscribe({next:r=>n(r),error:r=>e(r)})})}function to(t,n){if(t.length!==n.length)return!1;for(let e=0;e<t.length;++e)if(!B(t[e],n[e]))return!1;return!0}function B(t,n){let e=t?gr(t):void 0,r=n?gr(n):void 0;if(!e||!r||e.length!=r.length)return!1;let i;for(let o=0;o<e.length;o++)if(i=e[o],!Wn(t[i],n[i]))return!1;return!0}function gr(t){return[...Object.keys(t),...Object.getOwnPropertySymbols(t)]}function Wn(t,n){if(Array.isArray(t)&&Array.isArray(n)){if(t.length!==n.length)return!1;let e=[...t].sort(),r=[...n].sort();return e.every((i,o)=>r[o]===i)}else return t===n}function ro(t){return t.length>0?t[t.length-1]:null}function ue(t){return Vt(t)?t:ln(t)?A(Promise.resolve(t)):g(t)}function Yn(t){return Vt(t)?wt(t):Promise.resolve(t)}var no={exact:Kn,subset:Zn},Qn={exact:io,subset:oo,ignored:()=>!0},_r={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},He={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};function Ar(t,n,e){let r=t instanceof D?t:n.parseUrl(t);return st(()=>vr(n.lastSuccessfulNavigation()?.finalUrl??new D,r,d(d({},He),e)))}function vr(t,n,e){return no[e.paths](t.root,n.root,e.matrixParams)&&Qn[e.queryParams](t.queryParams,n.queryParams)&&!(e.fragment==="exact"&&t.fragment!==n.fragment)}function io(t,n){return B(t,n)}function Kn(t,n,e){if(!oe(t.segments,n.segments)||!yt(t.segments,n.segments,e)||t.numberOfChildren!==n.numberOfChildren)return!1;for(let r in n.children)if(!t.children[r]||!Kn(t.children[r],n.children[r],e))return!1;return!0}function oo(t,n){return Object.keys(n).length<=Object.keys(t).length&&Object.keys(n).every(e=>Wn(t[e],n[e]))}function Zn(t,n,e){return Jn(t,n,n.segments,e)}function Jn(t,n,e,r){if(t.segments.length>e.length){let i=t.segments.slice(0,e.length);return!(!oe(i,e)||n.hasChildren()||!yt(i,e,r))}else if(t.segments.length===e.length){if(!oe(t.segments,e)||!yt(t.segments,e,r))return!1;for(let i in n.children)if(!t.children[i]||!Zn(t.children[i],n.children[i],r))return!1;return!0}else{let i=e.slice(0,t.segments.length),o=e.slice(t.segments.length);return!oe(t.segments,i)||!yt(t.segments,i,r)||!t.children[p]?!1:Jn(t.children[p],n,o,r)}}function yt(t,n,e){return n.every((r,i)=>Qn[e](t[i].parameters,r.parameters))}var D=class{root;queryParams;fragment;_queryParamMap;constructor(n=new v([],{}),e={},r=null){this.root=n,this.queryParams=e,this.fragment=r}get queryParamMap(){return this._queryParamMap??=se(this.queryParams),this._queryParamMap}toString(){return co.serialize(this)}},v=class{segments;children;parent=null;constructor(n,e){this.segments=n,this.children=e,Object.values(e).forEach(r=>r.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return Rt(this)}},Z=class{path;parameters;_parameterMap;constructor(n,e){this.path=n,this.parameters=e}get parameterMap(){return this._parameterMap??=se(this.parameters),this._parameterMap}toString(){return ei(this)}};function so(t,n){return oe(t,n)&&t.every((e,r)=>B(e.parameters,n[r].parameters))}function oe(t,n){return t.length!==n.length?!1:t.every((e,r)=>e.path===n[r].path)}function ao(t,n){let e=[];return Object.entries(t.children).forEach(([r,i])=>{r===p&&(e=e.concat(n(i,r)))}),Object.entries(t.children).forEach(([r,i])=>{r!==p&&(e=e.concat(n(i,r)))}),e}var Se=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=y({token:t,factory:()=>new J,providedIn:"root"})}return t})(),J=class{parse(n){let e=new yr(n);return new D(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(n){let e=`/${Ue(n.root,!0)}`,r=ho(n.queryParams),i=typeof n.fragment=="string"?`#${uo(n.fragment)}`:"";return`${e}${r}${i}`}},co=new J;function Rt(t){return t.segments.map(n=>ei(n)).join("/")}function Ue(t,n){if(!t.hasChildren())return Rt(t);if(n){let e=t.children[p]?Ue(t.children[p],!1):"",r=[];return Object.entries(t.children).forEach(([i,o])=>{i!==p&&r.push(`${i}:${Ue(o,!1)}`)}),r.length>0?`${e}(${r.join("//")})`:e}else{let e=ao(t,(r,i)=>i===p?[Ue(t.children[p],!1)]:[`${i}:${Ue(r,!1)}`]);return Object.keys(t.children).length===1&&t.children[p]!=null?`${Rt(t)}/${e[0]}`:`${Rt(t)}/(${e.join("//")})`}}function Xn(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function vt(t){return Xn(t).replace(/%3B/gi,";")}function uo(t){return encodeURI(t)}function mr(t){return Xn(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function St(t){return decodeURIComponent(t)}function $n(t){return St(t.replace(/\+/g,"%20"))}function ei(t){return`${mr(t.path)}${lo(t.parameters)}`}function lo(t){return Object.entries(t).map(([n,e])=>`;${mr(n)}=${mr(e)}`).join("")}function ho(t){let n=Object.entries(t).map(([e,r])=>Array.isArray(r)?r.map(i=>`${vt(e)}=${vt(i)}`).join("&"):`${vt(e)}=${vt(r)}`).filter(e=>e);return n.length?`?${n.join("&")}`:""}var fo=/^[^\/()?;#]+/;function dr(t){let n=t.match(fo);return n?n[0]:""}var po=/^[^\/()?;=#]+/;function go(t){let n=t.match(po);return n?n[0]:""}var vo=/^[^=?&#]+/;function mo(t){let n=t.match(vo);return n?n[0]:""}var yo=/^[^&#]+/;function Ro(t){let n=t.match(yo);return n?n[0]:""}var yr=class{url;remaining;constructor(n){this.url=n,this.remaining=n}parseRootSegment(){for(;this.consumeOptional("/"););return this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new v([],{}):new v([],this.parseChildren())}parseQueryParams(){let n={};if(this.consumeOptional("?"))do this.parseQueryParam(n);while(this.consumeOptional("&"));return n}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(n=0){if(n>50)throw new w(4010,!1);if(this.remaining==="")return{};this.consumeOptional("/");let e=[];for(this.peekStartsWith("(")||e.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),e.push(this.parseSegment());let r={};this.peekStartsWith("/(")&&(this.capture("/"),r=this.parseParens(!0,n));let i={};return this.peekStartsWith("(")&&(i=this.parseParens(!1,n)),(e.length>0||Object.keys(r).length>0)&&(i[p]=new v(e,r)),i}parseSegment(){let n=dr(this.remaining);if(n===""&&this.peekStartsWith(";"))throw new w(4009,!1);return this.capture(n),new Z(St(n),this.parseMatrixParams())}parseMatrixParams(){let n={};for(;this.consumeOptional(";");)this.parseParam(n);return n}parseParam(n){let e=go(this.remaining);if(!e)return;this.capture(e);let r="";if(this.consumeOptional("=")){let i=dr(this.remaining);i&&(r=i,this.capture(r))}n[St(e)]=St(r)}parseQueryParam(n){let e=mo(this.remaining);if(!e)return;this.capture(e);let r="";if(this.consumeOptional("=")){let s=Ro(this.remaining);s&&(r=s,this.capture(r))}let i=$n(e),o=$n(r);if(n.hasOwnProperty(i)){let s=n[i];Array.isArray(s)||(s=[s],n[i]=s),s.push(o)}else n[i]=o}parseParens(n,e){let r={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let i=dr(this.remaining),o=this.remaining[i.length];if(o!=="/"&&o!==")"&&o!==";")throw new w(4010,!1);let s;i.indexOf(":")>-1?(s=i.slice(0,i.indexOf(":")),this.capture(s),this.capture(":")):n&&(s=p);let a=this.parseChildren(e+1);r[s??p]=Object.keys(a).length===1&&a[p]?a[p]:new v([],a),this.consumeOptional("//")}return r}peekStartsWith(n){return this.remaining.startsWith(n)}consumeOptional(n){return this.peekStartsWith(n)?(this.remaining=this.remaining.substring(n.length),!0):!1}capture(n){if(!this.consumeOptional(n))throw new w(4011,!1)}};function ti(t){return t.segments.length>0?new v([],{[p]:t}):t}function ri(t){let n={};for(let[r,i]of Object.entries(t.children)){let o=ri(i);if(r===p&&o.segments.length===0&&o.hasChildren())for(let[s,a]of Object.entries(o.children))n[s]=a;else(o.segments.length>0||o.hasChildren())&&(n[r]=o)}let e=new v(t.segments,n);return So(e)}function So(t){if(t.numberOfChildren===1&&t.children[p]){let n=t.children[p];return new v(t.segments.concat(n.segments),n.children)}return t}function X(t){return t instanceof D}function ni(t,n,e=null,r=null,i=new J){let o=ii(t);return oi(o,n,e,r,i)}function ii(t){let n;function e(o){let s={};for(let c of o.children){let u=e(c);s[c.outlet]=u}let a=new v(o.url,s);return o===t&&(n=a),a}let r=e(t.root),i=ti(r);return n??i}function oi(t,n,e,r,i){let o=t;for(;o.parent;)o=o.parent;if(n.length===0)return hr(o,o,o,e,r,i);let s=wo(n);if(s.toRoot())return hr(o,o,new v([],{}),e,r,i);let a=Co(s,o,t),c=a.processChildren?xe(a.segmentGroup,a.index,s.commands):ai(a.segmentGroup,a.index,s.commands);return hr(o,a.segmentGroup,c,e,r,i)}function Ct(t){return typeof t=="object"&&t!=null&&!t.outlets&&!t.segmentPath}function $e(t){return typeof t=="object"&&t!=null&&t.outlets}function zn(t,n,e){t||="\u0275";let r=new D;return r.queryParams={[t]:n},e.parse(e.serialize(r)).queryParams[t]}function hr(t,n,e,r,i,o){let s={};for(let[u,l]of Object.entries(r??{}))s[u]=Array.isArray(l)?l.map(h=>zn(u,h,o)):zn(u,l,o);let a;t===n?a=e:a=si(t,n,e);let c=ti(ri(a));return new D(c,s,i)}function si(t,n,e){let r={};return Object.entries(t.children).forEach(([i,o])=>{o===n?r[i]=e:r[i]=si(o,n,e)}),new v(t.segments,r)}var Et=class{isAbsolute;numberOfDoubleDots;commands;constructor(n,e,r){if(this.isAbsolute=n,this.numberOfDoubleDots=e,this.commands=r,n&&r.length>0&&Ct(r[0]))throw new w(4003,!1);let i=r.find($e);if(i&&i!==ro(r))throw new w(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function wo(t){if(typeof t[0]=="string"&&t.length===1&&t[0]==="/")return new Et(!0,0,t);let n=0,e=!1,r=t.reduce((i,o,s)=>{if(typeof o=="object"&&o!=null){if(o.outlets){let a={};return Object.entries(o.outlets).forEach(([c,u])=>{a[c]=typeof u=="string"?u.split("/"):u}),[...i,{outlets:a}]}if(o.segmentPath)return[...i,o.segmentPath]}return typeof o!="string"?[...i,o]:s===0?(o.split("/").forEach((a,c)=>{c==0&&a==="."||(c==0&&a===""?e=!0:a===".."?n++:a!=""&&i.push(a))}),i):[...i,o]},[]);return new Et(e,n,r)}var fe=class{segmentGroup;processChildren;index;constructor(n,e,r){this.segmentGroup=n,this.processChildren=e,this.index=r}};function Co(t,n,e){if(t.isAbsolute)return new fe(n,!0,0);if(!e)return new fe(n,!1,NaN);if(e.parent===null)return new fe(e,!0,0);let r=Ct(t.commands[0])?0:1,i=e.segments.length-1+r;return Eo(e,i,t.numberOfDoubleDots)}function Eo(t,n,e){let r=t,i=n,o=e;for(;o>i;){if(o-=i,r=r.parent,!r)throw new w(4005,!1);i=r.segments.length}return new fe(r,!1,i-o)}function bo(t){return $e(t[0])?t[0].outlets:{[p]:t}}function ai(t,n,e){if(t??=new v([],{}),t.segments.length===0&&t.hasChildren())return xe(t,n,e);let r=Mo(t,n,e),i=e.slice(r.commandIndex);if(r.match&&r.pathIndex<t.segments.length){let o=new v(t.segments.slice(0,r.pathIndex),{});return o.children[p]=new v(t.segments.slice(r.pathIndex),t.children),xe(o,0,i)}else return r.match&&i.length===0?new v(t.segments,{}):r.match&&!t.hasChildren()?Rr(t,n,e):r.match?xe(t,0,i):Rr(t,n,e)}function xe(t,n,e){if(e.length===0)return new v(t.segments,{});{let r=bo(e),i={};if(Object.keys(r).some(o=>o!==p)&&t.children[p]&&t.numberOfChildren===1&&t.children[p].segments.length===0){let o=xe(t.children[p],n,e);return new v(t.segments,o.children)}return Object.entries(r).forEach(([o,s])=>{typeof s=="string"&&(s=[s]),s!==null&&(i[o]=ai(t.children[o],n,s))}),Object.entries(t.children).forEach(([o,s])=>{r[o]===void 0&&(i[o]=s)}),new v(t.segments,i)}}function Mo(t,n,e){let r=0,i=n,o={match:!1,pathIndex:0,commandIndex:0};for(;i<t.segments.length;){if(r>=e.length)return o;let s=t.segments[i],a=e[r];if($e(a))break;let c=`${a}`,u=r<e.length-1?e[r+1]:null;if(i>0&&c===void 0)break;if(c&&u&&typeof u=="object"&&u.outlets===void 0){if(!Bn(c,u,s))return o;r+=2}else{if(!Bn(c,{},s))return o;r++}i++}return{match:!0,pathIndex:i,commandIndex:r}}function Rr(t,n,e){let r=t.segments.slice(0,n),i=0;for(;i<e.length;){let o=e[i];if($e(o)){let c=Io(o.outlets);return new v(r,c)}if(i===0&&Ct(e[0])){let c=t.segments[n];r.push(new Z(c.path,Fn(e[0]))),i++;continue}let s=$e(o)?o.outlets[p]:`${o}`,a=i<e.length-1?e[i+1]:null;s&&a&&Ct(a)?(r.push(new Z(s,Fn(a))),i+=2):(r.push(new Z(s,{})),i++)}return new v(r,{})}function Io(t){let n={};return Object.entries(t).forEach(([e,r])=>{typeof r=="string"&&(r=[r]),r!==null&&(n[e]=Rr(new v([],{}),0,r))}),n}function Fn(t){let n={};return Object.entries(t).forEach(([e,r])=>n[e]=`${r}`),n}function Bn(t,n,e){return t==e.path&&B(n,e.parameters)}var je="imperative",b=(function(t){return t[t.NavigationStart=0]="NavigationStart",t[t.NavigationEnd=1]="NavigationEnd",t[t.NavigationCancel=2]="NavigationCancel",t[t.NavigationError=3]="NavigationError",t[t.RoutesRecognized=4]="RoutesRecognized",t[t.ResolveStart=5]="ResolveStart",t[t.ResolveEnd=6]="ResolveEnd",t[t.GuardsCheckStart=7]="GuardsCheckStart",t[t.GuardsCheckEnd=8]="GuardsCheckEnd",t[t.RouteConfigLoadStart=9]="RouteConfigLoadStart",t[t.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",t[t.ChildActivationStart=11]="ChildActivationStart",t[t.ChildActivationEnd=12]="ChildActivationEnd",t[t.ActivationStart=13]="ActivationStart",t[t.ActivationEnd=14]="ActivationEnd",t[t.Scroll=15]="Scroll",t[t.NavigationSkipped=16]="NavigationSkipped",t})(b||{}),N=class{id;url;constructor(n,e){this.id=n,this.url=e}},ae=class extends N{type=b.NavigationStart;navigationTrigger;restoredState;constructor(n,e,r="imperative",i=null){super(n,e),this.navigationTrigger=r,this.restoredState=i}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},H=class extends N{urlAfterRedirects;type=b.NavigationEnd;constructor(n,e,r){super(n,e),this.urlAfterRedirects=r}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},I=(function(t){return t[t.Redirect=0]="Redirect",t[t.SupersededByNewNavigation=1]="SupersededByNewNavigation",t[t.NoDataFromResolver=2]="NoDataFromResolver",t[t.GuardRejected=3]="GuardRejected",t[t.Aborted=4]="Aborted",t})(I||{}),ze=(function(t){return t[t.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",t[t.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",t})(ze||{}),x=class extends N{reason;code;type=b.NavigationCancel;constructor(n,e,r,i){super(n,e),this.reason=r,this.code=i}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}};function ci(t){return t instanceof x&&(t.code===I.Redirect||t.code===I.SupersededByNewNavigation)}var W=class extends N{reason;code;type=b.NavigationSkipped;constructor(n,e,r,i){super(n,e),this.reason=r,this.code=i}},ce=class extends N{error;target;type=b.NavigationError;constructor(n,e,r,i){super(n,e),this.error=r,this.target=i}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},Fe=class extends N{urlAfterRedirects;state;type=b.RoutesRecognized;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},bt=class extends N{urlAfterRedirects;state;type=b.GuardsCheckStart;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Mt=class extends N{urlAfterRedirects;state;shouldActivate;type=b.GuardsCheckEnd;constructor(n,e,r,i,o){super(n,e),this.urlAfterRedirects=r,this.state=i,this.shouldActivate=o}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},It=class extends N{urlAfterRedirects;state;type=b.ResolveStart;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Tt=class extends N{urlAfterRedirects;state;type=b.ResolveEnd;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Dt=class{route;type=b.RouteConfigLoadStart;constructor(n){this.route=n}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},_t=class{route;type=b.RouteConfigLoadEnd;constructor(n){this.route=n}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},At=class{snapshot;type=b.ChildActivationStart;constructor(n){this.snapshot=n}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Ot=class{snapshot;type=b.ChildActivationEnd;constructor(n){this.snapshot=n}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Nt=class{snapshot;type=b.ActivationStart;constructor(n){this.snapshot=n}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Pt=class{snapshot;type=b.ActivationEnd;constructor(n){this.snapshot=n}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}};var ge=class{},Be=class{},ve=class{url;navigationBehaviorOptions;constructor(n,e){this.url=n,this.navigationBehaviorOptions=e}};function To(t){return!(t instanceof ge)&&!(t instanceof ve)&&!(t instanceof Be)}var Ut=class{rootInjector;outlet=null;route=null;children;attachRef=null;get injector(){return this.route?.snapshot._environmentInjector??this.rootInjector}constructor(n){this.rootInjector=n,this.children=new we(this.rootInjector)}},we=(()=>{class t{rootInjector;contexts=new Map;constructor(e){this.rootInjector=e}onChildOutletCreated(e,r){let i=this.getOrCreateContext(e);i.outlet=r,this.contexts.set(e,i)}onChildOutletDestroyed(e){let r=this.getContext(e);r&&(r.outlet=null,r.attachRef=null)}onOutletDeactivated(){let e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let r=this.getContext(e);return r||(r=new Ut(this.rootInjector),this.contexts.set(e,r)),r}getContext(e){return this.contexts.get(e)||null}static \u0275fac=function(r){return new(r||t)(R(K))};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Lt=class{_root;constructor(n){this._root=n}get root(){return this._root.value}parent(n){let e=this.pathFromRoot(n);return e.length>1?e[e.length-2]:null}children(n){let e=Sr(n,this._root);return e?e.children.map(r=>r.value):[]}firstChild(n){let e=Sr(n,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(n){let e=wr(n,this._root);return e.length<2?[]:e[e.length-2].children.map(i=>i.value).filter(i=>i!==n)}pathFromRoot(n){return wr(n,this._root).map(e=>e.value)}};function Sr(t,n){if(t===n.value)return n;for(let e of n.children){let r=Sr(t,e);if(r)return r}return null}function wr(t,n){if(t===n.value)return[n];for(let e of n.children){let r=wr(t,e);if(r.length)return r.unshift(n),r}return[]}var O=class{value;children;constructor(n,e){this.value=n,this.children=e}toString(){return`TreeNode(${this.value})`}};function he(t){let n={};return t&&t.children.forEach(e=>n[e.value.outlet]=e),n}var qe=class extends Lt{snapshot;constructor(n,e){super(n),this.snapshot=e,Nr(this,n)}toString(){return this.snapshot.toString()}};function ui(t,n){let e=Do(t,n),r=new P([new Z("",{})]),i=new P({}),o=new P({}),s=new P({}),a=new P(""),c=new Y(r,i,s,a,o,p,t,e.root);return c.snapshot=e.root,new qe(new O(c,[]),e)}function Do(t,n){let e={},r={},i={},s=new me([],e,i,"",r,p,t,null,{},n);return new Ve("",new O(s,[]))}var Y=class{urlSubject;paramsSubject;queryParamsSubject;fragmentSubject;dataSubject;outlet;component;snapshot;_futureSnapshot;_routerState;_paramMap;_queryParamMap;title;url;params;queryParams;fragment;data;constructor(n,e,r,i,o,s,a,c){this.urlSubject=n,this.paramsSubject=e,this.queryParamsSubject=r,this.fragmentSubject=i,this.dataSubject=o,this.outlet=s,this.component=a,this._futureSnapshot=c,this.title=this.dataSubject?.pipe(T(u=>u[Ye]))??g(void 0),this.url=n,this.params=e,this.queryParams=r,this.fragment=i,this.data=o}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=this.params.pipe(T(n=>se(n))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(T(n=>se(n))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function Or(t,n,e="emptyOnly"){let r,{routeConfig:i}=t;return n!==null&&(e==="always"||i?.path===""||!n.component&&!n.routeConfig?.loadComponent)?r={params:d(d({},n.params),t.params),data:d(d({},n.data),t.data),resolve:d(d(d(d({},t.data),n.data),i?.data),t._resolvedData)}:r={params:d({},t.params),data:d({},t.data),resolve:d(d({},t.data),t._resolvedData??{})},i&&di(i)&&(r.resolve[Ye]=i.title),r}var me=class{url;params;queryParams;fragment;data;outlet;component;routeConfig;_resolve;_resolvedData;_routerState;_paramMap;_queryParamMap;_environmentInjector;get title(){return this.data?.[Ye]}constructor(n,e,r,i,o,s,a,c,u,l){this.url=n,this.params=e,this.queryParams=r,this.fragment=i,this.data=o,this.outlet=s,this.component=a,this.routeConfig=c,this._resolve=u,this._environmentInjector=l}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=se(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=se(this.queryParams),this._queryParamMap}toString(){let n=this.url.map(r=>r.toString()).join("/"),e=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${n}', path:'${e}')`}},Ve=class extends Lt{url;constructor(n,e){super(e),this.url=n,Nr(this,e)}toString(){return li(this._root)}};function Nr(t,n){n.value._routerState=t,n.children.forEach(e=>Nr(t,e))}function li(t){let n=t.children.length>0?` { ${t.children.map(li).join(", ")} } `:"";return`${t.value}${n}`}function fr(t){if(t.snapshot){let n=t.snapshot,e=t._futureSnapshot;t.snapshot=e,B(n.queryParams,e.queryParams)||t.queryParamsSubject.next(e.queryParams),n.fragment!==e.fragment&&t.fragmentSubject.next(e.fragment),B(n.params,e.params)||t.paramsSubject.next(e.params),to(n.url,e.url)||t.urlSubject.next(e.url),B(n.data,e.data)||t.dataSubject.next(e.data)}else t.snapshot=t._futureSnapshot,t.dataSubject.next(t._futureSnapshot.data)}function Cr(t,n){let e=B(t.params,n.params)&&so(t.url,n.url),r=!t.parent!=!n.parent;return e&&!r&&(!t.parent||Cr(t.parent,n.parent))}function di(t){return typeof t.title=="string"||t.title===null}var hi=new M(""),Pr=(()=>{class t{activated=null;get activatedComponentRef(){return this.activated}_activatedRoute=null;name=p;activateEvents=new ie;deactivateEvents=new ie;attachEvents=new ie;detachEvents=new ie;routerOutletData=Cn();parentContexts=f(we);location=f(sn);changeDetector=f(at);inputBinder=f(Ht,{optional:!0});supportsBindingToComponentInputs=!0;ngOnChanges(e){if(e.name){let{firstChange:r,previousValue:i}=e.name;if(r)return;this.isTrackedInParentContexts(i)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(i)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(e){return this.parentContexts.getContext(e)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let e=this.parentContexts.getContext(this.name);e?.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new w(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new w(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new w(4012,!1);this.location.detach();let e=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(e.instance),e}attach(e,r){this.activated=e,this._activatedRoute=r,this.location.insert(e.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(e.instance)}deactivate(){if(this.activated){let e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e)}}activateWith(e,r){if(this.isActivated)throw new w(4013,!1);this._activatedRoute=e;let i=this.location,s=e.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,c=new Er(e,a,i.injector,this.routerOutletData);this.activated=i.createComponent(s,{index:i.length,injector:c,environmentInjector:r}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}static \u0275fac=function(r){return new(r||t)};static \u0275dir=De({type:t,selectors:[["router-outlet"]],inputs:{name:"name",routerOutletData:[1,"routerOutletData"]},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],features:[Ie]})}return t})(),Er=class{route;childContexts;parent;outletData;constructor(n,e,r,i){this.route=n,this.childContexts=e,this.parent=r,this.outletData=i}get(n,e){return n===Y?this.route:n===we?this.childContexts:n===hi?this.outletData:this.parent.get(n,e)}},Ht=new M("");var Ur=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275cmp=cn({type:t,selectors:[["ng-component"]],exportAs:["emptyRouterOutlet"],decls:1,vars:0,template:function(r,i){r&1&&pn(0,"router-outlet")},dependencies:[Pr],encapsulation:2})}return t})();function Lr(t){let n=t.children&&t.children.map(Lr),e=n?_(d({},t),{children:n}):d({},t);return!e.component&&!e.loadComponent&&(n||e.loadChildren)&&e.outlet&&e.outlet!==p&&(e.component=Ur),e}function _o(t,n,e){let r=Ge(t,n._root,e?e._root:void 0);return new qe(r,n)}function Ge(t,n,e){if(e&&t.shouldReuseRoute(n.value,e.value.snapshot)){let r=e.value;r._futureSnapshot=n.value;let i=Ao(t,n,e);return new O(r,i)}else{if(t.shouldAttach(n.value)){let o=t.retrieve(n.value);if(o!==null){let s=o.route;return s.value._futureSnapshot=n.value,s.children=n.children.map(a=>Ge(t,a)),s}}let r=Oo(n.value),i=n.children.map(o=>Ge(t,o));return new O(r,i)}}function Ao(t,n,e){return n.children.map(r=>{for(let i of e.children)if(t.shouldReuseRoute(r.value,i.value.snapshot))return Ge(t,r,i);return Ge(t,r)})}function Oo(t){return new Y(new P(t.url),new P(t.params),new P(t.queryParams),new P(t.fragment),new P(t.data),t.outlet,t.component,t)}var ye=class{redirectTo;navigationBehaviorOptions;constructor(n,e){this.redirectTo=n,this.navigationBehaviorOptions=e}},fi="ngNavigationCancelingError";function xt(t,n){let{redirectTo:e,navigationBehaviorOptions:r}=X(n)?{redirectTo:n,navigationBehaviorOptions:void 0}:n,i=pi(!1,I.Redirect);return i.url=e,i.navigationBehaviorOptions=r,i}function pi(t,n){let e=new Error(`NavigationCancelingError: ${t||""}`);return e[fi]=!0,e.cancellationCode=n,e}function No(t){return gi(t)&&X(t.url)}function gi(t){return!!t&&t[fi]}var br=class{routeReuseStrategy;futureState;currState;forwardEvent;inputBindingEnabled;constructor(n,e,r,i,o){this.routeReuseStrategy=n,this.futureState=e,this.currState=r,this.forwardEvent=i,this.inputBindingEnabled=o}activate(n){let e=this.futureState._root,r=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,r,n),fr(this.futureState.root),this.activateChildRoutes(e,r,n)}deactivateChildRoutes(n,e,r){let i=he(e);n.children.forEach(o=>{let s=o.value.outlet;this.deactivateRoutes(o,i[s],r),delete i[s]}),Object.values(i).forEach(o=>{this.deactivateRouteAndItsChildren(o,r)})}deactivateRoutes(n,e,r){let i=n.value,o=e?e.value:null;if(i===o)if(i.component){let s=r.getContext(i.outlet);s&&this.deactivateChildRoutes(n,e,s.children)}else this.deactivateChildRoutes(n,e,r);else o&&this.deactivateRouteAndItsChildren(e,r)}deactivateRouteAndItsChildren(n,e){n.value.component&&this.routeReuseStrategy.shouldDetach(n.value.snapshot)?this.detachAndStoreRouteSubtree(n,e):this.deactivateRouteAndOutlet(n,e)}detachAndStoreRouteSubtree(n,e){let r=e.getContext(n.value.outlet),i=r&&n.value.component?r.children:e,o=he(n);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,i);if(r&&r.outlet){let s=r.outlet.detach(),a=r.children.onOutletDeactivated();this.routeReuseStrategy.store(n.value.snapshot,{componentRef:s,route:n,contexts:a})}}deactivateRouteAndOutlet(n,e){let r=e.getContext(n.value.outlet),i=r&&n.value.component?r.children:e,o=he(n);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,i);r&&(r.outlet&&(r.outlet.deactivate(),r.children.onOutletDeactivated()),r.attachRef=null,r.route=null)}activateChildRoutes(n,e,r){let i=he(e);n.children.forEach(o=>{this.activateRoutes(o,i[o.value.outlet],r),this.forwardEvent(new Pt(o.value.snapshot))}),n.children.length&&this.forwardEvent(new Ot(n.value.snapshot))}activateRoutes(n,e,r){let i=n.value,o=e?e.value:null;if(fr(i),i===o)if(i.component){let s=r.getOrCreateContext(i.outlet);this.activateChildRoutes(n,e,s.children)}else this.activateChildRoutes(n,e,r);else if(i.component){let s=r.getOrCreateContext(i.outlet);if(this.routeReuseStrategy.shouldAttach(i.snapshot)){let a=this.routeReuseStrategy.retrieve(i.snapshot);this.routeReuseStrategy.store(i.snapshot,null),s.children.onOutletReAttached(a.contexts),s.attachRef=a.componentRef,s.route=a.route.value,s.outlet&&s.outlet.attach(a.componentRef,a.route.value),fr(a.route.value),this.activateChildRoutes(n,null,s.children)}else s.attachRef=null,s.route=i,s.outlet&&s.outlet.activateWith(i,s.injector),this.activateChildRoutes(n,null,s.children)}else this.activateChildRoutes(n,null,r)}},jt=class{path;route;constructor(n){this.path=n,this.route=this.path[this.path.length-1]}},pe=class{component;route;constructor(n,e){this.component=n,this.route=e}};function Po(t,n,e){let r=t._root,i=n?n._root:null;return Le(r,i,e,[r.value])}function Uo(t){let n=t.routeConfig?t.routeConfig.canActivateChild:null;return!n||n.length===0?null:{node:t,guards:n}}function Ce(t,n){let e=Symbol(),r=n.get(t,e);return r===e?typeof t=="function"&&!Yr(t)?t:n.get(t):r}function Le(t,n,e,r,i={canDeactivateChecks:[],canActivateChecks:[]}){let o=he(n);return t.children.forEach(s=>{Lo(s,o[s.value.outlet],e,r.concat([s.value]),i),delete o[s.value.outlet]}),Object.entries(o).forEach(([s,a])=>ke(a,e.getContext(s),i)),i}function Lo(t,n,e,r,i={canDeactivateChecks:[],canActivateChecks:[]}){let o=t.value,s=n?n.value:null,a=e?e.getContext(t.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){let c=xo(s,o,o.routeConfig.runGuardsAndResolvers);c?i.canActivateChecks.push(new jt(r)):(o.data=s.data,o._resolvedData=s._resolvedData),o.component?Le(t,n,a?a.children:null,r,i):Le(t,n,e,r,i),c&&a&&a.outlet&&a.outlet.isActivated&&i.canDeactivateChecks.push(new pe(a.outlet.component,s))}else s&&ke(n,a,i),i.canActivateChecks.push(new jt(r)),o.component?Le(t,null,a?a.children:null,r,i):Le(t,null,e,r,i);return i}function xo(t,n,e){if(typeof e=="function")return L(n._environmentInjector,()=>e(t,n));switch(e){case"pathParamsChange":return!oe(t.url,n.url);case"pathParamsOrQueryParamsChange":return!oe(t.url,n.url)||!B(t.queryParams,n.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!Cr(t,n)||!B(t.queryParams,n.queryParams);default:return!Cr(t,n)}}function ke(t,n,e){let r=he(t),i=t.value;Object.entries(r).forEach(([o,s])=>{i.component?n?ke(s,n.children.getContext(o),e):ke(s,null,e):ke(s,n,e)}),i.component?n&&n.outlet&&n.outlet.isActivated?e.canDeactivateChecks.push(new pe(n.outlet.component,i)):e.canDeactivateChecks.push(new pe(null,i)):e.canDeactivateChecks.push(new pe(null,i))}function Qe(t){return typeof t=="function"}function jo(t){return typeof t=="boolean"}function ko(t){return t&&Qe(t.canLoad)}function Ho(t){return t&&Qe(t.canActivate)}function $o(t){return t&&Qe(t.canActivateChild)}function zo(t){return t&&Qe(t.canDeactivate)}function Fo(t){return t&&Qe(t.canMatch)}function vi(t){return t instanceof Fr||t?.name==="EmptyError"}var mt=Symbol("INITIAL_VALUE");function Re(){return $(t=>Br(t.map(n=>n.pipe(de(1),Gr(mt)))).pipe(T(n=>{for(let e of n)if(e!==!0){if(e===mt)return mt;if(e===!1||Bo(e))return e}return!0}),ne(n=>n!==mt),de(1)))}function Bo(t){return X(t)||t instanceof ye}function mi(t){return t.aborted?g(void 0).pipe(de(1)):new $r(n=>{let e=()=>{n.next(),n.complete()};return t.addEventListener("abort",e),()=>t.removeEventListener("abort",e)})}function yi(t){return tt(mi(t))}function qo(t){return V(n=>{let{targetSnapshot:e,currentSnapshot:r,guards:{canActivateChecks:i,canDeactivateChecks:o}}=n;return o.length===0&&i.length===0?g(_(d({},n),{guardsResult:!0})):Vo(o,e,r).pipe(V(s=>s&&jo(s)?Go(e,i,t):g(s)),T(s=>_(d({},n),{guardsResult:s})))})}function Vo(t,n,e){return A(t).pipe(V(r=>Zo(r.component,r.route,e,n)),Q(r=>r!==!0,!0))}function Go(t,n,e){return A(n).pipe(et(r=>qr(Yo(r.route.parent,e),Wo(r.route,e),Ko(t,r.path),Qo(t,r.route))),Q(r=>r!==!0,!0))}function Wo(t,n){return t!==null&&n&&n(new Nt(t)),g(!0)}function Yo(t,n){return t!==null&&n&&n(new At(t)),g(!0)}function Qo(t,n){let e=n.routeConfig?n.routeConfig.canActivate:null;if(!e||e.length===0)return g(!0);let r=e.map(i=>Je(()=>{let o=n._environmentInjector,s=Ce(i,o),a=Ho(s)?s.canActivate(n,t):L(o,()=>s(n,t));return ue(a).pipe(Q())}));return g(r).pipe(Re())}function Ko(t,n){let e=n[n.length-1],i=n.slice(0,n.length-1).reverse().map(o=>Uo(o)).filter(o=>o!==null).map(o=>Je(()=>{let s=o.guards.map(a=>{let c=o.node._environmentInjector,u=Ce(a,c),l=$o(u)?u.canActivateChild(e,t):L(c,()=>u(e,t));return ue(l).pipe(Q())});return g(s).pipe(Re())}));return g(i).pipe(Re())}function Zo(t,n,e,r){let i=n&&n.routeConfig?n.routeConfig.canDeactivate:null;if(!i||i.length===0)return g(!0);let o=i.map(s=>{let a=n._environmentInjector,c=Ce(s,a),u=zo(c)?c.canDeactivate(t,n,e,r):L(a,()=>c(t,n,e,r));return ue(u).pipe(Q())});return g(o).pipe(Re())}function Jo(t,n,e,r,i){let o=n.canLoad;if(o===void 0||o.length===0)return g(!0);let s=o.map(a=>{let c=Ce(a,t),u=ko(c)?c.canLoad(n,e):L(t,()=>c(n,e)),l=ue(u);return i?l.pipe(yi(i)):l});return g(s).pipe(Re(),Ri(r))}function Ri(t){return Hr(j(n=>{if(typeof n!="boolean")throw xt(t,n)}),T(n=>n===!0))}function Xo(t,n,e,r,i,o){let s=n.canMatch;if(!s||s.length===0)return g(!0);let a=s.map(c=>{let u=Ce(c,t),l=Fo(u)?u.canMatch(n,e,i):L(t,()=>u(n,e,i));return ue(l).pipe(yi(o))});return g(a).pipe(Re(),Ri(r))}var G=class t extends Error{segmentGroup;constructor(n){super(),this.segmentGroup=n||null,Object.setPrototypeOf(this,t.prototype)}},We=class t extends Error{urlTree;constructor(n){super(),this.urlTree=n,Object.setPrototypeOf(this,t.prototype)}};function es(t){throw new w(4e3,!1)}function ts(t){throw pi(!1,I.GuardRejected)}var Mr=class{urlSerializer;urlTree;constructor(n,e){this.urlSerializer=n,this.urlTree=e}lineralizeSegments(n,e){return S(this,null,function*(){let r=[],i=e.root;for(;;){if(r=r.concat(i.segments),i.numberOfChildren===0)return r;if(i.numberOfChildren>1||!i.children[p])throw es(`${n.redirectTo}`);i=i.children[p]}})}applyRedirectCommands(n,e,r,i,o){return S(this,null,function*(){let s=yield rs(e,i,o);if(s instanceof D)throw new We(s);let a=this.applyRedirectCreateUrlTree(s,this.urlSerializer.parse(s),n,r);if(s[0]==="/")throw new We(a);return a})}applyRedirectCreateUrlTree(n,e,r,i){let o=this.createSegmentGroup(n,e.root,r,i);return new D(o,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(n,e){let r={};return Object.entries(n).forEach(([i,o])=>{if(typeof o=="string"&&o[0]===":"){let a=o.substring(1);r[i]=e[a]}else r[i]=o}),r}createSegmentGroup(n,e,r,i){let o=this.createSegments(n,e.segments,r,i),s={};return Object.entries(e.children).forEach(([a,c])=>{s[a]=this.createSegmentGroup(n,c,r,i)}),new v(o,s)}createSegments(n,e,r,i){return e.map(o=>o.path[0]===":"?this.findPosParam(n,o,i):this.findOrReturn(o,r))}findPosParam(n,e,r){let i=r[e.path.substring(1)];if(!i)throw new w(4001,!1);return i}findOrReturn(n,e){let r=0;for(let i of e){if(i.path===n.path)return e.splice(r),i;r++}return n}};function rs(t,n,e){if(typeof t=="string")return Promise.resolve(t);let r=t;return wt(ue(L(e,()=>r(n))))}function ns(t,n){return t.providers&&!t._injector&&(t._injector=rr(t.providers,n,`Route: ${t.path}`)),t._injector??n}function k(t){return t.outlet||p}function is(t,n){let e=t.filter(r=>k(r)===n);return e.push(...t.filter(r=>k(r)!==n)),e}var Ir={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function Si(t){return{routeConfig:t.routeConfig,url:t.url,params:t.params,queryParams:t.queryParams,fragment:t.fragment,data:t.data,outlet:t.outlet,title:t.title,paramMap:t.paramMap,queryParamMap:t.queryParamMap}}function os(t,n,e,r,i,o,s){let a=wi(t,n,e);if(!a.matched)return g(a);let c=Si(o(a));return r=ns(n,r),Xo(r,n,e,i,c,s).pipe(T(u=>u===!0?a:d({},Ir)))}function wi(t,n,e){if(n.path==="")return n.pathMatch==="full"&&(t.hasChildren()||e.length>0)?d({},Ir):{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};let i=(n.matcher||Gn)(e,t,n);if(!i)return d({},Ir);let o={};Object.entries(i.posParams??{}).forEach(([a,c])=>{o[a]=c.path});let s=i.consumed.length>0?d(d({},o),i.consumed[i.consumed.length-1].parameters):o;return{matched:!0,consumedSegments:i.consumed,remainingSegments:e.slice(i.consumed.length),parameters:s,positionalParamSegments:i.posParams??{}}}function qn(t,n,e,r,i){return e.length>0&&cs(t,e,r,i)?{segmentGroup:new v(n,as(r,new v(e,t.children))),slicedSegments:[]}:e.length===0&&us(t,e,r)?{segmentGroup:new v(t.segments,ss(t,e,r,t.children)),slicedSegments:e}:{segmentGroup:new v(t.segments,t.children),slicedSegments:e}}function ss(t,n,e,r){let i={};for(let o of e)if($t(t,n,o)&&!r[k(o)]){let s=new v([],{});i[k(o)]=s}return d(d({},r),i)}function as(t,n){let e={};e[p]=n;for(let r of t)if(r.path===""&&k(r)!==p){let i=new v([],{});e[k(r)]=i}return e}function cs(t,n,e,r){return e.some(i=>!$t(t,n,i)||!(k(i)!==p)?!1:!(r!==void 0&&k(i)===r))}function us(t,n,e){return e.some(r=>$t(t,n,r))}function $t(t,n,e){return(t.hasChildren()||n.length>0)&&e.pathMatch==="full"?!1:e.path===""}function ls(t,n,e){return n.length===0&&!t.children[e]}var Tr=class{};function ds(t,n,e,r,i,o,s="emptyOnly",a){return S(this,null,function*(){return new Dr(t,n,e,r,i,s,o,a).recognize()})}var hs=31,Dr=class{injector;configLoader;rootComponentType;config;urlTree;paramsInheritanceStrategy;urlSerializer;abortSignal;applyRedirects;absoluteRedirectCount=0;allowRedirects=!0;constructor(n,e,r,i,o,s,a,c){this.injector=n,this.configLoader=e,this.rootComponentType=r,this.config=i,this.urlTree=o,this.paramsInheritanceStrategy=s,this.urlSerializer=a,this.abortSignal=c,this.applyRedirects=new Mr(this.urlSerializer,this.urlTree)}noMatchError(n){return new w(4002,`'${n.segmentGroup}'`)}recognize(){return S(this,null,function*(){let n=qn(this.urlTree.root,[],[],this.config).segmentGroup,{children:e,rootSnapshot:r}=yield this.match(n),i=new O(r,e),o=new Ve("",i),s=ni(r,[],this.urlTree.queryParams,this.urlTree.fragment);return s.queryParams=this.urlTree.queryParams,o.url=this.urlSerializer.serialize(s),{state:o,tree:s}})}match(n){return S(this,null,function*(){let e=new me([],Object.freeze({}),Object.freeze(d({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),p,this.rootComponentType,null,{},this.injector);try{return{children:yield this.processSegmentGroup(this.injector,this.config,n,p,e),rootSnapshot:e}}catch(r){if(r instanceof We)return this.urlTree=r.urlTree,this.match(r.urlTree.root);throw r instanceof G?this.noMatchError(r):r}})}processSegmentGroup(n,e,r,i,o){return S(this,null,function*(){if(r.segments.length===0&&r.hasChildren())return this.processChildren(n,e,r,o);let s=yield this.processSegment(n,e,r,r.segments,i,!0,o);return s instanceof O?[s]:[]})}processChildren(n,e,r,i){return S(this,null,function*(){let o=[];for(let c of Object.keys(r.children))c==="primary"?o.unshift(c):o.push(c);let s=[];for(let c of o){let u=r.children[c],l=is(e,c),h=yield this.processSegmentGroup(n,l,u,c,i);s.push(...h)}let a=Ci(s);return fs(a),a})}processSegment(n,e,r,i,o,s,a){return S(this,null,function*(){for(let c of e)try{return yield this.processSegmentAgainstRoute(c._injector??n,e,c,r,i,o,s,a)}catch(u){if(u instanceof G||vi(u))continue;throw u}if(ls(r,i,o))return new Tr;throw new G(r)})}processSegmentAgainstRoute(n,e,r,i,o,s,a,c){return S(this,null,function*(){if(k(r)!==s&&(s===p||!$t(i,o,r)))throw new G(i);if(r.redirectTo===void 0)return this.matchSegmentAgainstRoute(n,i,r,o,s,c);if(this.allowRedirects&&a)return this.expandSegmentAgainstRouteUsingRedirect(n,i,e,r,o,s,c);throw new G(i)})}expandSegmentAgainstRouteUsingRedirect(n,e,r,i,o,s,a){return S(this,null,function*(){let{matched:c,parameters:u,consumedSegments:l,positionalParamSegments:h,remainingSegments:m}=wi(e,i,o);if(!c)throw new G(e);typeof i.redirectTo=="string"&&i.redirectTo[0]==="/"&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>hs&&(this.allowRedirects=!1));let ee=this.createSnapshot(n,i,o,u,a);if(this.abortSignal.aborted)throw new Error(this.abortSignal.reason);let q=yield this.applyRedirects.applyRedirectCommands(l,i.redirectTo,h,Si(ee),n),te=yield this.applyRedirects.lineralizeSegments(i,q);return this.processSegment(n,r,e,te.concat(m),s,!1,a)})}createSnapshot(n,e,r,i,o){let s=new me(r,i,Object.freeze(d({},this.urlTree.queryParams)),this.urlTree.fragment,gs(e),k(e),e.component??e._loadedComponent??null,e,vs(e),n),a=Or(s,o,this.paramsInheritanceStrategy);return s.params=Object.freeze(a.params),s.data=Object.freeze(a.data),s}matchSegmentAgainstRoute(n,e,r,i,o,s){return S(this,null,function*(){if(this.abortSignal.aborted)throw new Error(this.abortSignal.reason);let a=Ze=>this.createSnapshot(n,r,Ze.consumedSegments,Ze.parameters,s),c=yield wt(os(e,r,i,n,this.urlSerializer,a,this.abortSignal));if(r.path==="**"&&(e.children={}),!c?.matched)throw new G(e);n=r._injector??n;let{routes:u}=yield this.getChildConfig(n,r,i),l=r._loadedInjector??n,{parameters:h,consumedSegments:m,remainingSegments:ee}=c,q=this.createSnapshot(n,r,m,h,s),{segmentGroup:te,slicedSegments:be}=qn(e,m,ee,u,o);if(be.length===0&&te.hasChildren()){let Ze=yield this.processChildren(l,u,te,q);return new O(q,Ze)}if(u.length===0&&be.length===0)return new O(q,[]);let qt=k(r)===o,Me=yield this.processSegment(l,u,te,be,qt?p:o,!0,q);return new O(q,Me instanceof O?[Me]:[])})}getChildConfig(n,e,r){return S(this,null,function*(){if(e.children)return{routes:e.children,injector:n};if(e.loadChildren){if(e._loadedRoutes!==void 0){let o=e._loadedNgModuleFactory;return o&&!e._loadedInjector&&(e._loadedInjector=o.create(n).injector),{routes:e._loadedRoutes,injector:e._loadedInjector}}if(this.abortSignal.aborted)throw new Error(this.abortSignal.reason);if(yield wt(Jo(n,e,r,this.urlSerializer,this.abortSignal))){let o=yield this.configLoader.loadChildren(n,e);return e._loadedRoutes=o.routes,e._loadedInjector=o.injector,e._loadedNgModuleFactory=o.factory,o}throw ts(e)}return{routes:[],injector:n}})}};function fs(t){t.sort((n,e)=>n.value.outlet===p?-1:e.value.outlet===p?1:n.value.outlet.localeCompare(e.value.outlet))}function ps(t){let n=t.value.routeConfig;return n&&n.path===""}function Ci(t){let n=[],e=new Set;for(let r of t){if(!ps(r)){n.push(r);continue}let i=n.find(o=>r.value.routeConfig===o.value.routeConfig);i!==void 0?(i.children.push(...r.children),e.add(i)):n.push(r)}for(let r of e){let i=Ci(r.children);n.push(new O(r.value,i))}return n.filter(r=>!e.has(r))}function gs(t){return t.data||{}}function vs(t){return t.resolve||{}}function ms(t,n,e,r,i,o,s){return V(a=>S(null,null,function*(){let{state:c,tree:u}=yield ds(t,n,e,r,a.extractedUrl,i,o,s);return _(d({},a),{targetSnapshot:c,urlAfterRedirects:u})}))}function ys(t){return V(n=>{let{targetSnapshot:e,guards:{canActivateChecks:r}}=n;if(!r.length)return g(n);let i=new Set(r.map(a=>a.route)),o=new Set;for(let a of i)if(!o.has(a))for(let c of Ei(a))o.add(c);let s=0;return A(o).pipe(et(a=>i.has(a)?Rs(a,e,t):(a.data=Or(a,a.parent,t).resolve,g(void 0))),j(()=>s++),Wt(1),V(a=>s===o.size?g(n):U))})}function Ei(t){let n=t.children.map(e=>Ei(e)).flat();return[t,...n]}function Rs(t,n,e){let r=t.routeConfig,i=t._resolve;return r?.title!==void 0&&!di(r)&&(i[Ye]=r.title),Je(()=>(t.data=Or(t,t.parent,e).resolve,Ss(i,t,n).pipe(T(o=>(t._resolvedData=o,t.data=d(d({},t.data),o),null)))))}function Ss(t,n,e){let r=gr(t);if(r.length===0)return g({});let i={};return A(r).pipe(V(o=>ws(t[o],n,e).pipe(Q(),j(s=>{if(s instanceof ye)throw xt(new J,s);i[o]=s}))),Wt(1),T(()=>i),Xe(o=>vi(o)?U:zr(o)))}function ws(t,n,e){let r=n._environmentInjector,i=Ce(t,r),o=i.resolve?i.resolve(n,e):L(r,()=>i(n,e));return ue(o)}function Vn(t){return $(n=>{let e=t(n);return e?A(e).pipe(T(()=>n)):g(n)})}var xr=(()=>{class t{buildTitle(e){let r,i=e.root;for(;i!==void 0;)r=this.getResolvedTitleForRoute(i)??r,i=i.children.find(o=>o.outlet===p);return r}getResolvedTitleForRoute(e){return e.data[Ye]}static \u0275fac=function(r){return new(r||t)};static \u0275prov=y({token:t,factory:()=>f(bi),providedIn:"root"})}return t})(),bi=(()=>{class t extends xr{title;constructor(e){super(),this.title=e}updateTitle(e){let r=this.buildTitle(e);r!==void 0&&this.title.setTitle(r)}static \u0275fac=function(r){return new(r||t)(R(Hn))};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Ee=new M("",{factory:()=>({})}),Ke=new M(""),Mi=(()=>{class t{componentLoaders=new WeakMap;childrenLoaders=new WeakMap;onLoadStartListener;onLoadEndListener;compiler=f(Rn);loadComponent(e,r){return S(this,null,function*(){if(this.componentLoaders.get(r))return this.componentLoaders.get(r);if(r._loadedComponent)return Promise.resolve(r._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(r);let i=S(this,null,function*(){try{let o=yield Yn(L(e,()=>r.loadComponent())),s=yield Di(Ti(o));return this.onLoadEndListener&&this.onLoadEndListener(r),r._loadedComponent=s,s}finally{this.componentLoaders.delete(r)}});return this.componentLoaders.set(r,i),i})}loadChildren(e,r){if(this.childrenLoaders.get(r))return this.childrenLoaders.get(r);if(r._loadedRoutes)return Promise.resolve({routes:r._loadedRoutes,injector:r._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(r);let i=S(this,null,function*(){try{let o=yield Ii(r,this.compiler,e,this.onLoadEndListener);return r._loadedRoutes=o.routes,r._loadedInjector=o.injector,r._loadedNgModuleFactory=o.factory,o}finally{this.childrenLoaders.delete(r)}});return this.childrenLoaders.set(r,i),i}static \u0275fac=function(r){return new(r||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Ii(t,n,e,r){return S(this,null,function*(){let i=yield Yn(L(e,()=>t.loadChildren())),o=yield Di(Ti(i)),s;o instanceof an||Array.isArray(o)?s=o:s=yield n.compileModuleAsync(o),r&&r(t);let a,c,u=!1,l;return Array.isArray(s)?(c=s,u=!0):(a=s.create(e).injector,l=s,c=a.get(Ke,[],{optional:!0,self:!0}).flat()),{routes:c.map(Lr),injector:a,factory:l}})}function Cs(t){return t&&typeof t=="object"&&"default"in t}function Ti(t){return Cs(t)?t.default:t}function Di(t){return S(this,null,function*(){return t})}var zt=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=y({token:t,factory:()=>f(Es),providedIn:"root"})}return t})(),Es=(()=>{class t{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,r){return e}static \u0275fac=function(r){return new(r||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),_i=new M("");var bs=()=>{},Ai=new M(""),Oi=(()=>{class t{currentNavigation=E(null,{equal:()=>!1});currentTransition=null;lastSuccessfulNavigation=E(null);events=new re;transitionAbortWithErrorSubject=new re;configLoader=f(Mi);environmentInjector=f(K);destroyRef=f(Qt);urlSerializer=f(Se);rootContexts=f(we);location=f(ut);inputBindingEnabled=f(Ht,{optional:!0})!==null;titleStrategy=f(xr);options=f(Ee,{optional:!0})||{};paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly";urlHandlingStrategy=f(zt);createViewTransition=f(_i,{optional:!0});navigationErrorHandler=f(Ai,{optional:!0});navigationId=0;get hasRequestedNavigation(){return this.navigationId!==0}transitions;afterPreactivation=()=>g(void 0);rootComponentType=null;destroyed=!1;constructor(){let e=i=>this.events.next(new Dt(i)),r=i=>this.events.next(new _t(i));this.configLoader.onLoadEndListener=r,this.configLoader.onLoadStartListener=e,this.destroyRef.onDestroy(()=>{this.destroyed=!0})}complete(){this.transitions?.complete()}handleNavigationRequest(e){let r=++this.navigationId;C(()=>{this.transitions?.next(_(d({},e),{extractedUrl:this.urlHandlingStrategy.extract(e.rawUrl),targetSnapshot:null,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null,id:r,routesRecognizeHandler:{},beforeActivateHandler:{}}))})}setupNavigations(e){return this.transitions=new P(null),this.transitions.pipe(ne(r=>r!==null),$(r=>{let i=!1,o=new AbortController,s=()=>!i&&this.currentTransition?.id===r.id;return g(r).pipe($(a=>{if(this.navigationId>r.id)return this.cancelNavigationTransition(r,"",I.SupersededByNewNavigation),U;this.currentTransition=r;let c=this.lastSuccessfulNavigation();this.currentNavigation.set({id:a.id,initialUrl:a.rawUrl,extractedUrl:a.extractedUrl,targetBrowserUrl:typeof a.extras.browserUrl=="string"?this.urlSerializer.parse(a.extras.browserUrl):a.extras.browserUrl,trigger:a.source,extras:a.extras,previousNavigation:c?_(d({},c),{previousNavigation:null}):null,abort:()=>o.abort(),routesRecognizeHandler:a.routesRecognizeHandler,beforeActivateHandler:a.beforeActivateHandler});let u=!e.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),l=a.extras.onSameUrlNavigation??e.onSameUrlNavigation;if(!u&&l!=="reload")return this.events.next(new W(a.id,this.urlSerializer.serialize(a.rawUrl),"",ze.IgnoredSameUrlNavigation)),a.resolve(!1),U;if(this.urlHandlingStrategy.shouldProcessUrl(a.rawUrl))return g(a).pipe($(h=>(this.events.next(new ae(h.id,this.urlSerializer.serialize(h.extractedUrl),h.source,h.restoredState)),h.id!==this.navigationId?U:Promise.resolve(h))),ms(this.environmentInjector,this.configLoader,this.rootComponentType,e.config,this.urlSerializer,this.paramsInheritanceStrategy,o.signal),j(h=>{r.targetSnapshot=h.targetSnapshot,r.urlAfterRedirects=h.urlAfterRedirects,this.currentNavigation.update(m=>(m.finalUrl=h.urlAfterRedirects,m)),this.events.next(new Be)}),$(h=>A(r.routesRecognizeHandler.deferredHandle??g(void 0)).pipe(T(()=>h))),j(()=>{let h=new Fe(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(h)}));if(u&&this.urlHandlingStrategy.shouldProcessUrl(a.currentRawUrl)){let{id:h,extractedUrl:m,source:ee,restoredState:q,extras:te}=a,be=new ae(h,this.urlSerializer.serialize(m),ee,q);this.events.next(be);let qt=ui(this.rootComponentType,this.environmentInjector).snapshot;return this.currentTransition=r=_(d({},a),{targetSnapshot:qt,urlAfterRedirects:m,extras:_(d({},te),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.update(Me=>(Me.finalUrl=m,Me)),g(r)}else return this.events.next(new W(a.id,this.urlSerializer.serialize(a.extractedUrl),"",ze.IgnoredByUrlHandlingStrategy)),a.resolve(!1),U}),T(a=>{let c=new bt(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);return this.events.next(c),this.currentTransition=r=_(d({},a),{guards:Po(a.targetSnapshot,a.currentSnapshot,this.rootContexts)}),r}),qo(a=>this.events.next(a)),$(a=>{if(r.guardsResult=a.guardsResult,a.guardsResult&&typeof a.guardsResult!="boolean")throw xt(this.urlSerializer,a.guardsResult);let c=new Mt(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot,!!a.guardsResult);if(this.events.next(c),!s())return U;if(!a.guardsResult)return this.cancelNavigationTransition(a,"",I.GuardRejected),U;if(a.guards.canActivateChecks.length===0)return g(a);let u=new It(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);if(this.events.next(u),!s())return U;let l=!1;return g(a).pipe(ys(this.paramsInheritanceStrategy),j({next:()=>{l=!0;let h=new Tt(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(h)},complete:()=>{l||this.cancelNavigationTransition(a,"",I.NoDataFromResolver)}}))}),Vn(a=>{let c=l=>{let h=[];if(l.routeConfig?._loadedComponent)l.component=l.routeConfig?._loadedComponent;else if(l.routeConfig?.loadComponent){let m=l._environmentInjector;h.push(this.configLoader.loadComponent(m,l.routeConfig).then(ee=>{l.component=ee}))}for(let m of l.children)h.push(...c(m));return h},u=c(a.targetSnapshot.root);return u.length===0?g(a):A(Promise.all(u).then(()=>a))}),Vn(()=>this.afterPreactivation()),$(()=>{let{currentSnapshot:a,targetSnapshot:c}=r,u=this.createViewTransition?.(this.environmentInjector,a.root,c.root);return u?A(u).pipe(T(()=>r)):g(r)}),de(1),$(a=>{let c=_o(e.routeReuseStrategy,a.targetSnapshot,a.currentRouterState);this.currentTransition=r=a=_(d({},a),{targetRouterState:c}),this.currentNavigation.update(l=>(l.targetRouterState=c,l)),this.events.next(new ge);let u=r.beforeActivateHandler.deferredHandle;return u?A(u.then(()=>a)):g(a)}),j(a=>{new br(e.routeReuseStrategy,r.targetRouterState,r.currentRouterState,c=>this.events.next(c),this.inputBindingEnabled).activate(this.rootContexts),s()&&(i=!0,this.currentNavigation.update(c=>(c.abort=bs,c)),this.lastSuccessfulNavigation.set(C(this.currentNavigation)),this.events.next(new H(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects))),this.titleStrategy?.updateTitle(a.targetRouterState.snapshot),a.resolve(!0))}),tt(mi(o.signal).pipe(ne(()=>!i&&!r.targetRouterState),j(()=>{this.cancelNavigationTransition(r,o.signal.reason+"",I.Aborted)}))),j({complete:()=>{i=!0}}),tt(this.transitionAbortWithErrorSubject.pipe(j(a=>{throw a}))),Vr(()=>{o.abort(),i||this.cancelNavigationTransition(r,"",I.SupersededByNewNavigation),this.currentTransition?.id===r.id&&(this.currentNavigation.set(null),this.currentTransition=null)}),Xe(a=>{if(i=!0,this.destroyed)return r.resolve(!1),U;if(gi(a))this.events.next(new x(r.id,this.urlSerializer.serialize(r.extractedUrl),a.message,a.cancellationCode)),No(a)?this.events.next(new ve(a.url,a.navigationBehaviorOptions)):r.resolve(!1);else{let c=new ce(r.id,this.urlSerializer.serialize(r.extractedUrl),a,r.targetSnapshot??void 0);try{let u=L(this.environmentInjector,()=>this.navigationErrorHandler?.(c));if(u instanceof ye){let{message:l,cancellationCode:h}=xt(this.urlSerializer,u);this.events.next(new x(r.id,this.urlSerializer.serialize(r.extractedUrl),l,h)),this.events.next(new ve(u.redirectTo,u.navigationBehaviorOptions))}else throw this.events.next(c),a}catch(u){this.options.resolveNavigationPromiseOnError?r.resolve(!1):r.reject(u)}}return U}))}))}cancelNavigationTransition(e,r,i){let o=new x(e.id,this.urlSerializer.serialize(e.extractedUrl),r,i);this.events.next(o),e.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){let e=this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))),r=C(this.currentNavigation),i=r?.targetBrowserUrl??r?.extractedUrl;return e.toString()!==i?.toString()&&!r?.extras.skipLocationChange}static \u0275fac=function(r){return new(r||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Ms(t){return t!==je}var Ni=new M("");var Pi=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=y({token:t,factory:()=>f(Is),providedIn:"root"})}return t})(),kt=class{shouldDetach(n){return!1}store(n,e){}shouldAttach(n){return!1}retrieve(n){return null}shouldReuseRoute(n,e){return n.routeConfig===e.routeConfig}shouldDestroyInjector(n){return!0}},Is=(()=>{class t extends kt{static \u0275fac=(()=>{let e;return function(i){return(e||(e=Zt(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Ft=(()=>{class t{urlSerializer=f(Se);options=f(Ee,{optional:!0})||{};canceledNavigationResolution=this.options.canceledNavigationResolution||"replace";location=f(ut);urlHandlingStrategy=f(zt);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";currentUrlTree=new D;getCurrentUrlTree(){return this.currentUrlTree}rawUrlTree=this.currentUrlTree;getRawUrlTree(){return this.rawUrlTree}createBrowserPath({finalUrl:e,initialUrl:r,targetBrowserUrl:i}){let o=e!==void 0?this.urlHandlingStrategy.merge(e,r):r,s=i??o;return s instanceof D?this.urlSerializer.serialize(s):s}routerUrlState(e){return e?.targetBrowserUrl===void 0||e?.finalUrl===void 0?{}:{\u0275routerUrl:this.urlSerializer.serialize(e.finalUrl)}}commitTransition({targetRouterState:e,finalUrl:r,initialUrl:i}){r&&e?(this.currentUrlTree=r,this.rawUrlTree=this.urlHandlingStrategy.merge(r,i),this.routerState=e):this.rawUrlTree=i}routerState=ui(null,f(K));getRouterState(){return this.routerState}_stateMemento=this.createStateMemento();get stateMemento(){return this._stateMemento}updateStateMemento(){this._stateMemento=this.createStateMemento()}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}restoredState(){return this.location.getState()}static \u0275fac=function(r){return new(r||t)};static \u0275prov=y({token:t,factory:()=>f(Ts),providedIn:"root"})}return t})(),Ts=(()=>{class t extends Ft{currentPageId=0;lastSuccessfulId=-1;get browserPageId(){return this.canceledNavigationResolution!=="computed"?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}registerNonRouterCurrentEntryChangeListener(e){return this.location.subscribe(r=>{r.type==="popstate"&&setTimeout(()=>{e(r.url,r.state,"popstate",{replaceUrl:!0})})})}handleRouterEvent(e,r){e instanceof ae?this.updateStateMemento():e instanceof W?this.commitTransition(r):e instanceof Fe?this.urlUpdateStrategy==="eager"&&(r.extras.skipLocationChange||this.setBrowserUrl(this.createBrowserPath(r),r)):e instanceof ge?(this.commitTransition(r),this.urlUpdateStrategy==="deferred"&&!r.extras.skipLocationChange&&this.setBrowserUrl(this.createBrowserPath(r),r)):e instanceof x&&!ci(e)?this.restoreHistory(r):e instanceof ce?this.restoreHistory(r,!0):e instanceof H&&(this.lastSuccessfulId=e.id,this.currentPageId=this.browserPageId)}setBrowserUrl(e,r){let{extras:i,id:o}=r,{replaceUrl:s,state:a}=i;if(this.location.isCurrentPathEqualTo(e)||s){let c=this.browserPageId,u=d(d({},a),this.generateNgRouterState(o,c,r));this.location.replaceState(e,"",u)}else{let c=d(d({},a),this.generateNgRouterState(o,this.browserPageId+1,r));this.location.go(e,"",c)}}restoreHistory(e,r=!1){if(this.canceledNavigationResolution==="computed"){let i=this.browserPageId,o=this.currentPageId-i;o!==0?this.location.historyGo(o):this.getCurrentUrlTree()===e.finalUrl&&o===0&&(this.resetInternalState(e),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(r&&this.resetInternalState(e),this.resetUrlToCurrentUrlTree())}resetInternalState({finalUrl:e}){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,e??this.rawUrlTree)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.getRawUrlTree()),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(e,r,i){return this.canceledNavigationResolution==="computed"?d({navigationId:e,\u0275routerPageId:r},this.routerUrlState(i)):d({navigationId:e},this.routerUrlState(i))}static \u0275fac=(()=>{let e;return function(i){return(e||(e=Zt(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function jr(t,n){t.events.pipe(ne(e=>e instanceof H||e instanceof x||e instanceof ce||e instanceof W),T(e=>e instanceof H||e instanceof W?0:(e instanceof x?e.code===I.Redirect||e.code===I.SupersededByNewNavigation:!1)?2:1),ne(e=>e!==2),de(1)).subscribe(()=>{n()})}var le=(()=>{class t{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}disposed=!1;nonRouterCurrentEntryChangeSubscription;console=f(un);stateManager=f(Ft);options=f(Ee,{optional:!0})||{};pendingTasks=f(Zr);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";navigationTransitions=f(Oi);urlSerializer=f(Se);location=f(ut);urlHandlingStrategy=f(zt);injector=f(K);_events=new re;get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}navigated=!1;routeReuseStrategy=f(Pi);injectorCleanup=f(Ni,{optional:!0});onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore";config=f(Ke,{optional:!0})?.flat()??[];componentInputBindingEnabled=!!f(Ht,{optional:!0});currentNavigation=this.navigationTransitions.currentNavigation.asReadonly();constructor(){this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this).subscribe({error:e=>{}}),this.subscribeToNavigationEvents()}eventsSubscription=new kr;subscribeToNavigationEvents(){let e=this.navigationTransitions.events.subscribe(r=>{try{let i=this.navigationTransitions.currentTransition,o=C(this.navigationTransitions.currentNavigation);if(i!==null&&o!==null){if(this.stateManager.handleRouterEvent(r,o),r instanceof x&&r.code!==I.Redirect&&r.code!==I.SupersededByNewNavigation)this.navigated=!0;else if(r instanceof H)this.navigated=!0,this.injectorCleanup?.(this.routeReuseStrategy,this.routerState,this.config);else if(r instanceof ve){let s=r.navigationBehaviorOptions,a=this.urlHandlingStrategy.merge(r.url,i.currentRawUrl),c=d({scroll:i.extras.scroll,browserUrl:i.extras.browserUrl,info:i.extras.info,skipLocationChange:i.extras.skipLocationChange,replaceUrl:i.extras.replaceUrl||this.urlUpdateStrategy==="eager"||Ms(i.source)},s);this.scheduleNavigation(a,je,null,c,{resolve:i.resolve,reject:i.reject,promise:i.promise})}}To(r)&&this._events.next(r)}catch(i){this.navigationTransitions.transitionAbortWithErrorSubject.next(i)}});this.eventsSubscription.add(e)}resetRootComponentType(e){this.routerState.root.component=e,this.navigationTransitions.rootComponentType=e}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),je,this.stateManager.restoredState(),{replaceUrl:!0})}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((e,r,i,o)=>{this.navigateToSyncWithBrowser(e,i,r,o)})}navigateToSyncWithBrowser(e,r,i,o){let s=i?.navigationId?i:null,a=i?.\u0275routerUrl??e;if(i?.\u0275routerUrl&&(o=_(d({},o),{browserUrl:e})),i){let u=d({},i);delete u.navigationId,delete u.\u0275routerPageId,delete u.\u0275routerUrl,Object.keys(u).length!==0&&(o.state=u)}let c=this.parseUrl(a);this.scheduleNavigation(c,r,s,o).catch(u=>{this.disposed||this.injector.get(nt)(u)})}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return C(this.navigationTransitions.currentNavigation)}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(e){this.config=e.map(Lr),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this._events.unsubscribe(),this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription?.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0,this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(e,r={}){let{relativeTo:i,queryParams:o,fragment:s,queryParamsHandling:a,preserveFragment:c}=r,u=c?this.currentUrlTree.fragment:s,l=null;switch(a??this.options.defaultQueryParamsHandling){case"merge":l=d(d({},this.currentUrlTree.queryParams),o);break;case"preserve":l=this.currentUrlTree.queryParams;break;default:l=o||null}l!==null&&(l=this.removeEmptyProps(l));let h;try{let m=i?i.snapshot:this.routerState.snapshot.root;h=ii(m)}catch(m){(typeof e[0]!="string"||e[0][0]!=="/")&&(e=[]),h=this.currentUrlTree.root}return oi(h,e,l,u??null,this.urlSerializer)}navigateByUrl(e,r={skipLocationChange:!1}){let i=X(e)?e:this.parseUrl(e),o=this.urlHandlingStrategy.merge(i,this.rawUrlTree);return this.scheduleNavigation(o,je,null,r)}navigate(e,r={skipLocationChange:!1}){return Ds(e),this.navigateByUrl(this.createUrlTree(e,r),r)}serializeUrl(e){return this.urlSerializer.serialize(e)}parseUrl(e){try{return this.urlSerializer.parse(e)}catch(r){return this.console.warn(Wr(4018,!1)),this.urlSerializer.parse("/")}}isActive(e,r){let i;if(r===!0?i=d({},_r):r===!1?i=d({},He):i=d(d({},He),r),X(e))return vr(this.currentUrlTree,e,i);let o=this.parseUrl(e);return vr(this.currentUrlTree,o,i)}removeEmptyProps(e){return Object.entries(e).reduce((r,[i,o])=>(o!=null&&(r[i]=o),r),{})}scheduleNavigation(e,r,i,o,s){if(this.disposed)return Promise.resolve(!1);let a,c,u;s?(a=s.resolve,c=s.reject,u=s.promise):u=new Promise((h,m)=>{a=h,c=m});let l=this.pendingTasks.add();return jr(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(l))}),this.navigationTransitions.handleNavigationRequest({source:r,restoredState:i,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:e,extras:o,resolve:a,reject:c,promise:u,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),u.catch(Promise.reject.bind(Promise))}static \u0275fac=function(r){return new(r||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Ds(t){for(let n=0;n<t.length;n++)if(t[n]==null)throw new w(4008,!1)}var As=(()=>{class t{router=f(le);stateManager=f(Ft);fragment=E("");queryParams=E({});path=E("");serializer=f(Se);constructor(){this.updateState(),this.router.events?.subscribe(e=>{e instanceof H&&this.updateState()})}updateState(){let{fragment:e,root:r,queryParams:i}=this.stateManager.getCurrentUrlTree();this.fragment.set(e),this.queryParams.set(i),this.path.set(this.serializer.serialize(new D(r)))}static \u0275fac=function(r){return new(r||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Bt=(()=>{class t{router;route;tabIndexAttribute;renderer;el;locationStrategy;hrefAttributeValue=f(new wn("href"),{optional:!0});reactiveHref=Sn(()=>this.isAnchorElement?this.computeHref(this._urlTree()):this.hrefAttributeValue);get href(){return C(this.reactiveHref)}set href(e){this.reactiveHref.set(e)}set target(e){this._target.set(e)}get target(){return C(this._target)}_target=E(void 0);set queryParams(e){this._queryParams.set(e)}get queryParams(){return C(this._queryParams)}_queryParams=E(void 0,{equal:()=>!1});set fragment(e){this._fragment.set(e)}get fragment(){return C(this._fragment)}_fragment=E(void 0);set queryParamsHandling(e){this._queryParamsHandling.set(e)}get queryParamsHandling(){return C(this._queryParamsHandling)}_queryParamsHandling=E(void 0);set state(e){this._state.set(e)}get state(){return C(this._state)}_state=E(void 0,{equal:()=>!1});set info(e){this._info.set(e)}get info(){return C(this._info)}_info=E(void 0,{equal:()=>!1});set relativeTo(e){this._relativeTo.set(e)}get relativeTo(){return C(this._relativeTo)}_relativeTo=E(void 0);set preserveFragment(e){this._preserveFragment.set(e)}get preserveFragment(){return C(this._preserveFragment)}_preserveFragment=E(!1);set skipLocationChange(e){this._skipLocationChange.set(e)}get skipLocationChange(){return C(this._skipLocationChange)}_skipLocationChange=E(!1);set replaceUrl(e){this._replaceUrl.set(e)}get replaceUrl(){return C(this._replaceUrl)}_replaceUrl=E(!1);isAnchorElement;onChanges=new re;applicationErrorHandler=f(nt);options=f(Ee,{optional:!0});reactiveRouterState=f(As);constructor(e,r,i,o,s,a){this.router=e,this.route=r,this.tabIndexAttribute=i,this.renderer=o,this.el=s,this.locationStrategy=a;let c=s.nativeElement.tagName?.toLowerCase();this.isAnchorElement=c==="a"||c==="area"||!!(typeof customElements=="object"&&customElements.get(c)?.observedAttributes?.includes?.("href"))}setTabIndexIfNotOnNativeEl(e){this.tabIndexAttribute!=null||this.isAnchorElement||this.applyAttributeValue("tabindex",e)}ngOnChanges(e){this.onChanges.next(this)}routerLinkInput=E(null);set routerLink(e){e==null?(this.routerLinkInput.set(null),this.setTabIndexIfNotOnNativeEl(null)):(X(e)?this.routerLinkInput.set(e):this.routerLinkInput.set(Array.isArray(e)?e:[e]),this.setTabIndexIfNotOnNativeEl("0"))}onClick(e,r,i,o,s){let a=this._urlTree();if(a===null||this.isAnchorElement&&(e!==0||r||i||o||s||typeof this.target=="string"&&this.target!="_self"))return!0;let c={skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state,info:this.info};return this.router.navigateByUrl(a,c)?.catch(u=>{this.applicationErrorHandler(u)}),!this.isAnchorElement}ngOnDestroy(){}applyAttributeValue(e,r){let i=this.renderer,o=this.el.nativeElement;r!==null?i.setAttribute(o,e,r):i.removeAttribute(o,e)}_urlTree=st(()=>{this.reactiveRouterState.path(),this._preserveFragment()&&this.reactiveRouterState.fragment();let e=i=>i==="preserve"||i==="merge";(e(this._queryParamsHandling())||e(this.options?.defaultQueryParamsHandling))&&this.reactiveRouterState.queryParams();let r=this.routerLinkInput();return r===null||!this.router.createUrlTree?null:X(r)?r:this.router.createUrlTree(r,{relativeTo:this._relativeTo()!==void 0?this._relativeTo():this.route,queryParams:this._queryParams(),fragment:this._fragment(),queryParamsHandling:this._queryParamsHandling(),preserveFragment:this._preserveFragment()})},{equal:(e,r)=>this.computeHref(e)===this.computeHref(r)});get urlTree(){return C(this._urlTree)}computeHref(e){return e!==null&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(e))??"":null}static \u0275fac=function(r){return new(r||t)(F(le),F(Y),Jr("tabindex"),F(tr),F(Jt),F(In))};static \u0275dir=De({type:t,selectors:[["","routerLink",""]],hostVars:2,hostBindings:function(r,i){r&1&&gn("click",function(s){return i.onClick(s.button,s.ctrlKey,s.shiftKey,s.altKey,s.metaKey)}),r&2&&fn("href",i.reactiveHref(),tn)("target",i._target())},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",info:"info",relativeTo:"relativeTo",preserveFragment:[2,"preserveFragment","preserveFragment",ct],skipLocationChange:[2,"skipLocationChange","skipLocationChange",ct],replaceUrl:[2,"replaceUrl","replaceUrl",ct],routerLink:"routerLink"},features:[Ie]})}return t})(),Os=(()=>{class t{router;element;renderer;cdr;links;classes=[];routerEventsSubscription;linkInputChangesSubscription;_isActive=!1;get isActive(){return this._isActive}routerLinkActiveOptions={exact:!1};ariaCurrentWhenActive;isActiveChange=new ie;link=f(Bt,{optional:!0});constructor(e,r,i,o){this.router=e,this.element=r,this.renderer=i,this.cdr=o,this.routerEventsSubscription=e.events.subscribe(s=>{s instanceof H&&this.update()})}ngAfterContentInit(){g(this.links.changes,g(null)).pipe(Gt()).subscribe(e=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){this.linkInputChangesSubscription?.unsubscribe();let e=[...this.links.toArray(),this.link].filter(r=>!!r).map(r=>r.onChanges);this.linkInputChangesSubscription=A(e).pipe(Gt()).subscribe(r=>{this._isActive!==this.isLinkActive(this.router)(r)&&this.update()})}set routerLinkActive(e){let r=Array.isArray(e)?e:e.split(" ");this.classes=r.filter(i=>!!i)}ngOnChanges(e){this.update()}ngOnDestroy(){this.routerEventsSubscription.unsubscribe(),this.linkInputChangesSubscription?.unsubscribe()}update(){!this.links||!this.router.navigated||queueMicrotask(()=>{let e=this.hasActiveLinks();this.classes.forEach(r=>{e?this.renderer.addClass(this.element.nativeElement,r):this.renderer.removeClass(this.element.nativeElement,r)}),e&&this.ariaCurrentWhenActive!==void 0?this.renderer.setAttribute(this.element.nativeElement,"aria-current",this.ariaCurrentWhenActive.toString()):this.renderer.removeAttribute(this.element.nativeElement,"aria-current"),this._isActive!==e&&(this._isActive=e,this.cdr.markForCheck(),this.isActiveChange.emit(e))})}isLinkActive(e){let r=Ns(this.routerLinkActiveOptions)?this.routerLinkActiveOptions:this.routerLinkActiveOptions.exact??!1?d({},_r):d({},He);return i=>{let o=i.urlTree;return o?C(Ar(o,e,r)):!1}}hasActiveLinks(){let e=this.isLinkActive(this.router);return this.link&&e(this.link)||this.links.some(e)}static \u0275fac=function(r){return new(r||t)(F(le),F(Jt),F(tr),F(at))};static \u0275dir=De({type:t,selectors:[["","routerLinkActive",""]],contentQueries:function(r,i,o){if(r&1&&vn(o,Bt,5),r&2){let s;mn(s=yn())&&(i.links=s)}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",ariaCurrentWhenActive:"ariaCurrentWhenActive",routerLinkActive:"routerLinkActive"},outputs:{isActiveChange:"isActiveChange"},exportAs:["routerLinkActive"],features:[Ie]})}return t})();function Ns(t){let n=t;return!!(n.paths||n.matrixParams||n.queryParams||n.fragment)}var Ps=new M("");function Us(t,...n){return Qr([{provide:Ke,multi:!0,useValue:t},[],{provide:Y,useFactory:Ls},{provide:dn,multi:!0,useFactory:xs},n.map(e=>e.\u0275providers)])}function Ls(){return f(le).routerState.root}function xs(){let t=f(Yt);return n=>{let e=t.get(hn);if(n!==e.components[0])return;let r=t.get(le),i=t.get(js);t.get(ks)===1&&r.initialNavigation(),t.get(Hs,null,{optional:!0})?.setUpPreloading(),t.get(Ps,null,{optional:!0})?.init(),r.resetRootComponentType(e.componentTypes[0]),i.closed||(i.next(),i.complete(),i.unsubscribe())}}var js=new M("",{factory:()=>new re}),ks=new M("",{factory:()=>1});var Hs=new M("");export{Gi as a,Y as b,Pr as c,le as d,Bt as e,Os as f,Us as g};
1
+ import{$ as ie,A as Q,Aa as rr,Ab as at,B as Wt,Ba as cn,Bb as En,C as Gr,Cb as ct,D as $,Da as De,Db as _e,E as tt,Eb as bn,F as j,Fb as Mn,G as w,Ga as un,Gb as In,H as Wr,Ha as ln,Hb as ut,Ia as dn,J as y,Ja as hn,Ka as fn,L as Yr,M,N as R,O as f,P as Qr,Pb as Tn,Q as Kr,Qb as Dn,R as K,Rb as _n,S as L,Ta as pn,X as Yt,Y as z,Ya as gn,Z as Qt,_ as Zr,_a as vn,a as d,aa as rt,ab as mn,b as _,ba as Kt,bb as yn,c as S,ca as nt,d as kr,da as E,e as Hr,ea as Ie,f as $r,fa as Zt,g as re,ga as Jr,h as P,ha as Jt,i as U,ia as Xr,j as A,ja as Xt,k as g,ka as en,l as zr,la as it,m as Vt,ma as er,n as Fr,na as ot,o as T,p as Br,pa as tn,q as V,r as Gt,ra as Te,s as qr,sa as rn,t as Je,ta as nn,tb as Rn,ub as C,v as ne,va as on,vb as st,w as Xe,wa as tr,wb as Sn,x as et,xa as F,xb as wn,y as de,ya as sn,yb as Cn,z as Vr,za as an}from"./chunk-WDOCF7IL.js";var Ae=class{_doc;constructor(n){this._doc=n}manager},lt=(()=>{class t extends Ae{constructor(e){super(e)}supports(e){return!0}addEventListener(e,r,i,o){return e.addEventListener(r,i,o),()=>this.removeEventListener(e,r,i,o)}removeEventListener(e,r,i,o){return e.removeEventListener(r,i,o)}static \u0275fac=function(r){return new(r||t)(R(z))};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),pt=new M(""),sr=(()=>{class t{_zone;_plugins;_eventNameToPlugin=new Map;constructor(e,r){this._zone=r,e.forEach(s=>{s.manager=this});let i=e.filter(s=>!(s instanceof lt));this._plugins=i.slice().reverse();let o=e.find(s=>s instanceof lt);o&&this._plugins.push(o)}addEventListener(e,r,i,o){return this._findPluginFor(r).addEventListener(e,r,i,o)}getZone(){return this._zone}_findPluginFor(e){let r=this._eventNameToPlugin.get(e);if(r)return r;if(r=this._plugins.find(o=>o.supports(e)),!r)throw new w(5101,!1);return this._eventNameToPlugin.set(e,r),r}static \u0275fac=function(r){return new(r||t)(R(pt),R(rt))};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),nr="ng-app-id";function An(t){for(let n of t)n.remove()}function On(t,n){let e=n.createElement("style");return e.textContent=t,e}function Ui(t,n,e,r){let i=t.head?.querySelectorAll(`style[${nr}="${n}"],link[${nr}="${n}"]`);if(i)for(let o of i)o.removeAttribute(nr),o instanceof HTMLLinkElement?r.set(o.href.slice(o.href.lastIndexOf("/")+1),{usage:0,elements:[o]}):o.textContent&&e.set(o.textContent,{usage:0,elements:[o]})}function or(t,n){let e=n.createElement("link");return e.setAttribute("rel","stylesheet"),e.setAttribute("href",t),e}var ar=(()=>{class t{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;constructor(e,r,i,o={}){this.doc=e,this.appId=r,this.nonce=i,Ui(e,r,this.inline,this.external),this.hosts.add(e.head)}addStyles(e,r){for(let i of e)this.addUsage(i,this.inline,On);r?.forEach(i=>this.addUsage(i,this.external,or))}removeStyles(e,r){for(let i of e)this.removeUsage(i,this.inline);r?.forEach(i=>this.removeUsage(i,this.external))}addUsage(e,r,i){let o=r.get(e);o?o.usage++:r.set(e,{usage:1,elements:[...this.hosts].map(s=>this.addElement(s,i(e,this.doc)))})}removeUsage(e,r){let i=r.get(e);i&&(i.usage--,i.usage<=0&&(An(i.elements),r.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])An(e);this.hosts.clear()}addHost(e){this.hosts.add(e);for(let[r,{elements:i}]of this.inline)i.push(this.addElement(e,On(r,this.doc)));for(let[r,{elements:i}]of this.external)i.push(this.addElement(e,or(r,this.doc)))}removeHost(e){this.hosts.delete(e)}addElement(e,r){return this.nonce&&r.setAttribute("nonce",this.nonce),e.appendChild(r)}static \u0275fac=function(r){return new(r||t)(R(z),R(Xt),R(er,8),R(it))};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),ir={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"},cr=/%COMP%/g;var Pn="%COMP%",Li=`_nghost-${Pn}`,xi=`_ngcontent-${Pn}`,ji=!0,ki=new M("",{factory:()=>ji});function Hi(t){return xi.replace(cr,t)}function $i(t){return Li.replace(cr,t)}function Un(t,n){return n.map(e=>e.replace(cr,t))}var ur=(()=>{class t{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;constructor(e,r,i,o,s,a,c=null,u=null){this.eventManager=e,this.sharedStylesHost=r,this.appId=i,this.removeStylesOnCompDestroy=o,this.doc=s,this.ngZone=a,this.nonce=c,this.tracingService=u,this.defaultRenderer=new Oe(e,s,a,this.tracingService)}createRenderer(e,r){if(!e||!r)return this.defaultRenderer;let i=this.getOrCreateRenderer(e,r);return i instanceof ht?i.applyToHost(e):i instanceof Ne&&i.applyStyles(),i}getOrCreateRenderer(e,r){let i=this.rendererByCompId,o=i.get(r.id);if(!o){let s=this.doc,a=this.ngZone,c=this.eventManager,u=this.sharedStylesHost,l=this.removeStylesOnCompDestroy,h=this.tracingService;switch(r.encapsulation){case ot.Emulated:o=new ht(c,u,r,this.appId,l,s,a,h);break;case ot.ShadowDom:return new dt(c,e,r,s,a,this.nonce,h,u);case ot.ExperimentalIsolatedShadowDom:return new dt(c,e,r,s,a,this.nonce,h);default:o=new Ne(c,u,r,l,s,a,h);break}i.set(r.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(e){this.rendererByCompId.delete(e)}static \u0275fac=function(r){return new(r||t)(R(sr),R(ar),R(Xt),R(ki),R(z),R(rt),R(er),R(nn,8))};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),Oe=class{eventManager;doc;ngZone;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(n,e,r,i){this.eventManager=n,this.doc=e,this.ngZone=r,this.tracingService=i}destroy(){}destroyNode=null;createElement(n,e){return e?this.doc.createElementNS(ir[e]||e,n):this.doc.createElement(n)}createComment(n){return this.doc.createComment(n)}createText(n){return this.doc.createTextNode(n)}appendChild(n,e){(Nn(n)?n.content:n).appendChild(e)}insertBefore(n,e,r){n&&(Nn(n)?n.content:n).insertBefore(e,r)}removeChild(n,e){e.remove()}selectRootElement(n,e){let r=typeof n=="string"?this.doc.querySelector(n):n;if(!r)throw new w(-5104,!1);return e||(r.textContent=""),r}parentNode(n){return n.parentNode}nextSibling(n){return n.nextSibling}setAttribute(n,e,r,i){if(i){e=i+":"+e;let o=ir[i];o?n.setAttributeNS(o,e,r):n.setAttribute(e,r)}else n.setAttribute(e,r)}removeAttribute(n,e,r){if(r){let i=ir[r];i?n.removeAttributeNS(i,e):n.removeAttribute(`${r}:${e}`)}else n.removeAttribute(e)}addClass(n,e){n.classList.add(e)}removeClass(n,e){n.classList.remove(e)}setStyle(n,e,r,i){i&(Te.DashCase|Te.Important)?n.style.setProperty(e,r,i&Te.Important?"important":""):n.style[e]=r}removeStyle(n,e,r){r&Te.DashCase?n.style.removeProperty(e):n.style[e]=""}setProperty(n,e,r){n!=null&&(n[e]=r)}setValue(n,e){n.nodeValue=e}listen(n,e,r,i){if(typeof n=="string"&&(n=_e().getGlobalEventTarget(this.doc,n),!n))throw new w(5102,!1);let o=this.decoratePreventDefault(r);return this.tracingService?.wrapEventListener&&(o=this.tracingService.wrapEventListener(n,e,o)),this.eventManager.addEventListener(n,e,o,i)}decoratePreventDefault(n){return e=>{if(e==="__ngUnwrap__")return n;n(e)===!1&&e.preventDefault()}}};function Nn(t){return t.tagName==="TEMPLATE"&&t.content!==void 0}var dt=class extends Oe{hostEl;sharedStylesHost;shadowRoot;constructor(n,e,r,i,o,s,a,c){super(n,i,o,a),this.hostEl=e,this.sharedStylesHost=c,this.shadowRoot=e.attachShadow({mode:"open"}),this.sharedStylesHost&&this.sharedStylesHost.addHost(this.shadowRoot);let u=r.styles;u=Un(r.id,u);for(let h of u){let m=document.createElement("style");s&&m.setAttribute("nonce",s),m.textContent=h,this.shadowRoot.appendChild(m)}let l=r.getExternalStyles?.();if(l)for(let h of l){let m=or(h,i);s&&m.setAttribute("nonce",s),this.shadowRoot.appendChild(m)}}nodeOrShadowRoot(n){return n===this.hostEl?this.shadowRoot:n}appendChild(n,e){return super.appendChild(this.nodeOrShadowRoot(n),e)}insertBefore(n,e,r){return super.insertBefore(this.nodeOrShadowRoot(n),e,r)}removeChild(n,e){return super.removeChild(null,e)}parentNode(n){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(n)))}destroy(){this.sharedStylesHost&&this.sharedStylesHost.removeHost(this.shadowRoot)}},Ne=class extends Oe{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(n,e,r,i,o,s,a,c){super(n,o,s,a),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=i;let u=r.styles;this.styles=c?Un(c,u):u,this.styleUrls=r.getExternalStyles?.(c)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&rn.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},ht=class extends Ne{contentAttr;hostAttr;constructor(n,e,r,i,o,s,a,c){let u=i+"-"+r.id;super(n,e,r,o,s,a,c,u),this.contentAttr=Hi(u),this.hostAttr=$i(u)}applyToHost(n){this.applyStyles(),this.setAttribute(n,this.hostAttr,"")}createElement(n,e){let r=super.createElement(n,e);return super.setAttribute(r,this.contentAttr,""),r}};var gt=class t extends Mn{supportsDOMEvents=!0;static makeCurrent(){bn(new t)}onAndCancel(n,e,r,i){return n.addEventListener(e,r,i),()=>{n.removeEventListener(e,r,i)}}dispatchEvent(n,e){n.dispatchEvent(e)}remove(n){n.remove()}createElement(n,e){return e=e||this.getDefaultDocument(),e.createElement(n)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(n){return n.nodeType===Node.ELEMENT_NODE}isShadowRoot(n){return n instanceof DocumentFragment}getGlobalEventTarget(n,e){return e==="window"?window:e==="document"?n:e==="body"?n.body:null}getBaseHref(n){let e=zi();return e==null?null:Fi(e)}resetBaseElement(){Pe=null}getUserAgent(){return window.navigator.userAgent}getCookie(n){return Tn(document.cookie,n)}},Pe=null;function zi(){return Pe=Pe||document.head.querySelector("base"),Pe?Pe.getAttribute("href"):null}function Fi(t){return new URL(t,document.baseURI).pathname}var Bi=(()=>{class t{build(){return new XMLHttpRequest}static \u0275fac=function(r){return new(r||t)};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),Ln=["alt","control","meta","shift"],qi={"\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"},Vi={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey},kn=(()=>{class t extends Ae{constructor(e){super(e)}supports(e){return t.parseEventName(e)!=null}addEventListener(e,r,i,o){let s=t.parseEventName(r),a=t.eventCallback(s.fullKey,i,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>_e().onAndCancel(e,s.domEventName,a,o))}static parseEventName(e){let r=e.toLowerCase().split("."),i=r.shift();if(r.length===0||!(i==="keydown"||i==="keyup"))return null;let o=t._normalizeKey(r.pop()),s="",a=r.indexOf("code");if(a>-1&&(r.splice(a,1),s="code."),Ln.forEach(u=>{let l=r.indexOf(u);l>-1&&(r.splice(l,1),s+=u+".")}),s+=o,r.length!=0||o.length===0)return null;let c={};return c.domEventName=i,c.fullKey=s,c}static matchEventFullKeyCode(e,r){let i=qi[e.key]||e.key,o="";return r.indexOf("code.")>-1&&(i=e.code,o="code."),i==null||!i?!1:(i=i.toLowerCase(),i===" "?i="space":i==="."&&(i="dot"),Ln.forEach(s=>{if(s!==i){let a=Vi[s];a(e)&&(o+=s+".")}}),o+=i,o===r)}static eventCallback(e,r,i){return o=>{t.matchEventFullKeyCode(o,e)&&i.runGuarded(()=>r(o))}}static _normalizeKey(e){return e==="esc"?"escape":e}static \u0275fac=function(r){return new(r||t)(R(z))};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})();function Gi(t,n,e){return S(this,null,function*(){let r=d({rootComponent:t},Wi(n,e));return En(r)})}function Wi(t,n){return{platformRef:n?.platformRef,appProviders:[...Ji,...t?.providers??[]],platformProviders:Zi}}function Yi(){gt.makeCurrent()}function Qi(){return new Kt}function Ki(){return Xr(document),document}var Zi=[{provide:it,useValue:_n},{provide:en,useValue:Yi,multi:!0},{provide:z,useFactory:Ki}];var Ji=[{provide:Kr,useValue:"root"},{provide:Kt,useFactory:Qi},{provide:pt,useClass:lt,multi:!0},{provide:pt,useClass:kn,multi:!0},ur,ar,sr,{provide:on,useExisting:ur},{provide:Dn,useClass:Bi},[]];var Hn=(()=>{class t{_doc;constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}static \u0275fac=function(r){return new(r||t)(R(z))};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var p="primary",Ye=Symbol("RouteTitle"),pr=class{params;constructor(n){this.params=n||{}}has(n){return Object.prototype.hasOwnProperty.call(this.params,n)}get(n){if(this.has(n)){let e=this.params[n];return Array.isArray(e)?e[0]:e}return null}getAll(n){if(this.has(n)){let e=this.params[n];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}};function se(t){return new pr(t)}function lr(t,n,e){for(let r=0;r<t.length;r++){let i=t[r],o=n[r];if(i[0]===":")e[i.substring(1)]=o;else if(i!==o.path)return!1}return!0}function Gn(t,n,e){let r=e.path.split("/"),i=r.indexOf("**");if(i===-1){if(r.length>t.length||e.pathMatch==="full"&&(n.hasChildren()||r.length<t.length))return null;let c={},u=t.slice(0,r.length);return lr(r,u,c)?{consumed:u,posParams:c}:null}if(i!==r.lastIndexOf("**"))return null;let o=r.slice(0,i),s=r.slice(i+1);if(o.length+s.length>t.length||e.pathMatch==="full"&&n.hasChildren()&&e.path!=="**")return null;let a={};return!lr(o,t.slice(0,o.length),a)||!lr(s,t.slice(t.length-s.length),a)?null:{consumed:t,posParams:a}}function wt(t){return new Promise((n,e)=>{t.pipe(Q()).subscribe({next:r=>n(r),error:r=>e(r)})})}function to(t,n){if(t.length!==n.length)return!1;for(let e=0;e<t.length;++e)if(!B(t[e],n[e]))return!1;return!0}function B(t,n){let e=t?gr(t):void 0,r=n?gr(n):void 0;if(!e||!r||e.length!=r.length)return!1;let i;for(let o=0;o<e.length;o++)if(i=e[o],!Wn(t[i],n[i]))return!1;return!0}function gr(t){return[...Object.keys(t),...Object.getOwnPropertySymbols(t)]}function Wn(t,n){if(Array.isArray(t)&&Array.isArray(n)){if(t.length!==n.length)return!1;let e=[...t].sort(),r=[...n].sort();return e.every((i,o)=>r[o]===i)}else return t===n}function ro(t){return t.length>0?t[t.length-1]:null}function ue(t){return Vt(t)?t:ln(t)?A(Promise.resolve(t)):g(t)}function Yn(t){return Vt(t)?wt(t):Promise.resolve(t)}var no={exact:Kn,subset:Zn},Qn={exact:io,subset:oo,ignored:()=>!0},_r={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},He={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};function Ar(t,n,e){let r=t instanceof D?t:n.parseUrl(t);return st(()=>vr(n.lastSuccessfulNavigation()?.finalUrl??new D,r,d(d({},He),e)))}function vr(t,n,e){return no[e.paths](t.root,n.root,e.matrixParams)&&Qn[e.queryParams](t.queryParams,n.queryParams)&&!(e.fragment==="exact"&&t.fragment!==n.fragment)}function io(t,n){return B(t,n)}function Kn(t,n,e){if(!oe(t.segments,n.segments)||!yt(t.segments,n.segments,e)||t.numberOfChildren!==n.numberOfChildren)return!1;for(let r in n.children)if(!t.children[r]||!Kn(t.children[r],n.children[r],e))return!1;return!0}function oo(t,n){return Object.keys(n).length<=Object.keys(t).length&&Object.keys(n).every(e=>Wn(t[e],n[e]))}function Zn(t,n,e){return Jn(t,n,n.segments,e)}function Jn(t,n,e,r){if(t.segments.length>e.length){let i=t.segments.slice(0,e.length);return!(!oe(i,e)||n.hasChildren()||!yt(i,e,r))}else if(t.segments.length===e.length){if(!oe(t.segments,e)||!yt(t.segments,e,r))return!1;for(let i in n.children)if(!t.children[i]||!Zn(t.children[i],n.children[i],r))return!1;return!0}else{let i=e.slice(0,t.segments.length),o=e.slice(t.segments.length);return!oe(t.segments,i)||!yt(t.segments,i,r)||!t.children[p]?!1:Jn(t.children[p],n,o,r)}}function yt(t,n,e){return n.every((r,i)=>Qn[e](t[i].parameters,r.parameters))}var D=class{root;queryParams;fragment;_queryParamMap;constructor(n=new v([],{}),e={},r=null){this.root=n,this.queryParams=e,this.fragment=r}get queryParamMap(){return this._queryParamMap??=se(this.queryParams),this._queryParamMap}toString(){return co.serialize(this)}},v=class{segments;children;parent=null;constructor(n,e){this.segments=n,this.children=e,Object.values(e).forEach(r=>r.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return Rt(this)}},Z=class{path;parameters;_parameterMap;constructor(n,e){this.path=n,this.parameters=e}get parameterMap(){return this._parameterMap??=se(this.parameters),this._parameterMap}toString(){return ei(this)}};function so(t,n){return oe(t,n)&&t.every((e,r)=>B(e.parameters,n[r].parameters))}function oe(t,n){return t.length!==n.length?!1:t.every((e,r)=>e.path===n[r].path)}function ao(t,n){let e=[];return Object.entries(t.children).forEach(([r,i])=>{r===p&&(e=e.concat(n(i,r)))}),Object.entries(t.children).forEach(([r,i])=>{r!==p&&(e=e.concat(n(i,r)))}),e}var Se=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=y({token:t,factory:()=>new J,providedIn:"root"})}return t})(),J=class{parse(n){let e=new yr(n);return new D(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(n){let e=`/${Ue(n.root,!0)}`,r=ho(n.queryParams),i=typeof n.fragment=="string"?`#${uo(n.fragment)}`:"";return`${e}${r}${i}`}},co=new J;function Rt(t){return t.segments.map(n=>ei(n)).join("/")}function Ue(t,n){if(!t.hasChildren())return Rt(t);if(n){let e=t.children[p]?Ue(t.children[p],!1):"",r=[];return Object.entries(t.children).forEach(([i,o])=>{i!==p&&r.push(`${i}:${Ue(o,!1)}`)}),r.length>0?`${e}(${r.join("//")})`:e}else{let e=ao(t,(r,i)=>i===p?[Ue(t.children[p],!1)]:[`${i}:${Ue(r,!1)}`]);return Object.keys(t.children).length===1&&t.children[p]!=null?`${Rt(t)}/${e[0]}`:`${Rt(t)}/(${e.join("//")})`}}function Xn(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function vt(t){return Xn(t).replace(/%3B/gi,";")}function uo(t){return encodeURI(t)}function mr(t){return Xn(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function St(t){return decodeURIComponent(t)}function $n(t){return St(t.replace(/\+/g,"%20"))}function ei(t){return`${mr(t.path)}${lo(t.parameters)}`}function lo(t){return Object.entries(t).map(([n,e])=>`;${mr(n)}=${mr(e)}`).join("")}function ho(t){let n=Object.entries(t).map(([e,r])=>Array.isArray(r)?r.map(i=>`${vt(e)}=${vt(i)}`).join("&"):`${vt(e)}=${vt(r)}`).filter(e=>e);return n.length?`?${n.join("&")}`:""}var fo=/^[^\/()?;#]+/;function dr(t){let n=t.match(fo);return n?n[0]:""}var po=/^[^\/()?;=#]+/;function go(t){let n=t.match(po);return n?n[0]:""}var vo=/^[^=?&#]+/;function mo(t){let n=t.match(vo);return n?n[0]:""}var yo=/^[^&#]+/;function Ro(t){let n=t.match(yo);return n?n[0]:""}var yr=class{url;remaining;constructor(n){this.url=n,this.remaining=n}parseRootSegment(){for(;this.consumeOptional("/"););return this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new v([],{}):new v([],this.parseChildren())}parseQueryParams(){let n={};if(this.consumeOptional("?"))do this.parseQueryParam(n);while(this.consumeOptional("&"));return n}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(n=0){if(n>50)throw new w(4010,!1);if(this.remaining==="")return{};this.consumeOptional("/");let e=[];for(this.peekStartsWith("(")||e.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),e.push(this.parseSegment());let r={};this.peekStartsWith("/(")&&(this.capture("/"),r=this.parseParens(!0,n));let i={};return this.peekStartsWith("(")&&(i=this.parseParens(!1,n)),(e.length>0||Object.keys(r).length>0)&&(i[p]=new v(e,r)),i}parseSegment(){let n=dr(this.remaining);if(n===""&&this.peekStartsWith(";"))throw new w(4009,!1);return this.capture(n),new Z(St(n),this.parseMatrixParams())}parseMatrixParams(){let n={};for(;this.consumeOptional(";");)this.parseParam(n);return n}parseParam(n){let e=go(this.remaining);if(!e)return;this.capture(e);let r="";if(this.consumeOptional("=")){let i=dr(this.remaining);i&&(r=i,this.capture(r))}n[St(e)]=St(r)}parseQueryParam(n){let e=mo(this.remaining);if(!e)return;this.capture(e);let r="";if(this.consumeOptional("=")){let s=Ro(this.remaining);s&&(r=s,this.capture(r))}let i=$n(e),o=$n(r);if(n.hasOwnProperty(i)){let s=n[i];Array.isArray(s)||(s=[s],n[i]=s),s.push(o)}else n[i]=o}parseParens(n,e){let r={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let i=dr(this.remaining),o=this.remaining[i.length];if(o!=="/"&&o!==")"&&o!==";")throw new w(4010,!1);let s;i.indexOf(":")>-1?(s=i.slice(0,i.indexOf(":")),this.capture(s),this.capture(":")):n&&(s=p);let a=this.parseChildren(e+1);r[s??p]=Object.keys(a).length===1&&a[p]?a[p]:new v([],a),this.consumeOptional("//")}return r}peekStartsWith(n){return this.remaining.startsWith(n)}consumeOptional(n){return this.peekStartsWith(n)?(this.remaining=this.remaining.substring(n.length),!0):!1}capture(n){if(!this.consumeOptional(n))throw new w(4011,!1)}};function ti(t){return t.segments.length>0?new v([],{[p]:t}):t}function ri(t){let n={};for(let[r,i]of Object.entries(t.children)){let o=ri(i);if(r===p&&o.segments.length===0&&o.hasChildren())for(let[s,a]of Object.entries(o.children))n[s]=a;else(o.segments.length>0||o.hasChildren())&&(n[r]=o)}let e=new v(t.segments,n);return So(e)}function So(t){if(t.numberOfChildren===1&&t.children[p]){let n=t.children[p];return new v(t.segments.concat(n.segments),n.children)}return t}function X(t){return t instanceof D}function ni(t,n,e=null,r=null,i=new J){let o=ii(t);return oi(o,n,e,r,i)}function ii(t){let n;function e(o){let s={};for(let c of o.children){let u=e(c);s[c.outlet]=u}let a=new v(o.url,s);return o===t&&(n=a),a}let r=e(t.root),i=ti(r);return n??i}function oi(t,n,e,r,i){let o=t;for(;o.parent;)o=o.parent;if(n.length===0)return hr(o,o,o,e,r,i);let s=wo(n);if(s.toRoot())return hr(o,o,new v([],{}),e,r,i);let a=Co(s,o,t),c=a.processChildren?xe(a.segmentGroup,a.index,s.commands):ai(a.segmentGroup,a.index,s.commands);return hr(o,a.segmentGroup,c,e,r,i)}function Ct(t){return typeof t=="object"&&t!=null&&!t.outlets&&!t.segmentPath}function $e(t){return typeof t=="object"&&t!=null&&t.outlets}function zn(t,n,e){t||="\u0275";let r=new D;return r.queryParams={[t]:n},e.parse(e.serialize(r)).queryParams[t]}function hr(t,n,e,r,i,o){let s={};for(let[u,l]of Object.entries(r??{}))s[u]=Array.isArray(l)?l.map(h=>zn(u,h,o)):zn(u,l,o);let a;t===n?a=e:a=si(t,n,e);let c=ti(ri(a));return new D(c,s,i)}function si(t,n,e){let r={};return Object.entries(t.children).forEach(([i,o])=>{o===n?r[i]=e:r[i]=si(o,n,e)}),new v(t.segments,r)}var Et=class{isAbsolute;numberOfDoubleDots;commands;constructor(n,e,r){if(this.isAbsolute=n,this.numberOfDoubleDots=e,this.commands=r,n&&r.length>0&&Ct(r[0]))throw new w(4003,!1);let i=r.find($e);if(i&&i!==ro(r))throw new w(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function wo(t){if(typeof t[0]=="string"&&t.length===1&&t[0]==="/")return new Et(!0,0,t);let n=0,e=!1,r=t.reduce((i,o,s)=>{if(typeof o=="object"&&o!=null){if(o.outlets){let a={};return Object.entries(o.outlets).forEach(([c,u])=>{a[c]=typeof u=="string"?u.split("/"):u}),[...i,{outlets:a}]}if(o.segmentPath)return[...i,o.segmentPath]}return typeof o!="string"?[...i,o]:s===0?(o.split("/").forEach((a,c)=>{c==0&&a==="."||(c==0&&a===""?e=!0:a===".."?n++:a!=""&&i.push(a))}),i):[...i,o]},[]);return new Et(e,n,r)}var fe=class{segmentGroup;processChildren;index;constructor(n,e,r){this.segmentGroup=n,this.processChildren=e,this.index=r}};function Co(t,n,e){if(t.isAbsolute)return new fe(n,!0,0);if(!e)return new fe(n,!1,NaN);if(e.parent===null)return new fe(e,!0,0);let r=Ct(t.commands[0])?0:1,i=e.segments.length-1+r;return Eo(e,i,t.numberOfDoubleDots)}function Eo(t,n,e){let r=t,i=n,o=e;for(;o>i;){if(o-=i,r=r.parent,!r)throw new w(4005,!1);i=r.segments.length}return new fe(r,!1,i-o)}function bo(t){return $e(t[0])?t[0].outlets:{[p]:t}}function ai(t,n,e){if(t??=new v([],{}),t.segments.length===0&&t.hasChildren())return xe(t,n,e);let r=Mo(t,n,e),i=e.slice(r.commandIndex);if(r.match&&r.pathIndex<t.segments.length){let o=new v(t.segments.slice(0,r.pathIndex),{});return o.children[p]=new v(t.segments.slice(r.pathIndex),t.children),xe(o,0,i)}else return r.match&&i.length===0?new v(t.segments,{}):r.match&&!t.hasChildren()?Rr(t,n,e):r.match?xe(t,0,i):Rr(t,n,e)}function xe(t,n,e){if(e.length===0)return new v(t.segments,{});{let r=bo(e),i={};if(Object.keys(r).some(o=>o!==p)&&t.children[p]&&t.numberOfChildren===1&&t.children[p].segments.length===0){let o=xe(t.children[p],n,e);return new v(t.segments,o.children)}return Object.entries(r).forEach(([o,s])=>{typeof s=="string"&&(s=[s]),s!==null&&(i[o]=ai(t.children[o],n,s))}),Object.entries(t.children).forEach(([o,s])=>{r[o]===void 0&&(i[o]=s)}),new v(t.segments,i)}}function Mo(t,n,e){let r=0,i=n,o={match:!1,pathIndex:0,commandIndex:0};for(;i<t.segments.length;){if(r>=e.length)return o;let s=t.segments[i],a=e[r];if($e(a))break;let c=`${a}`,u=r<e.length-1?e[r+1]:null;if(i>0&&c===void 0)break;if(c&&u&&typeof u=="object"&&u.outlets===void 0){if(!Bn(c,u,s))return o;r+=2}else{if(!Bn(c,{},s))return o;r++}i++}return{match:!0,pathIndex:i,commandIndex:r}}function Rr(t,n,e){let r=t.segments.slice(0,n),i=0;for(;i<e.length;){let o=e[i];if($e(o)){let c=Io(o.outlets);return new v(r,c)}if(i===0&&Ct(e[0])){let c=t.segments[n];r.push(new Z(c.path,Fn(e[0]))),i++;continue}let s=$e(o)?o.outlets[p]:`${o}`,a=i<e.length-1?e[i+1]:null;s&&a&&Ct(a)?(r.push(new Z(s,Fn(a))),i+=2):(r.push(new Z(s,{})),i++)}return new v(r,{})}function Io(t){let n={};return Object.entries(t).forEach(([e,r])=>{typeof r=="string"&&(r=[r]),r!==null&&(n[e]=Rr(new v([],{}),0,r))}),n}function Fn(t){let n={};return Object.entries(t).forEach(([e,r])=>n[e]=`${r}`),n}function Bn(t,n,e){return t==e.path&&B(n,e.parameters)}var je="imperative",b=(function(t){return t[t.NavigationStart=0]="NavigationStart",t[t.NavigationEnd=1]="NavigationEnd",t[t.NavigationCancel=2]="NavigationCancel",t[t.NavigationError=3]="NavigationError",t[t.RoutesRecognized=4]="RoutesRecognized",t[t.ResolveStart=5]="ResolveStart",t[t.ResolveEnd=6]="ResolveEnd",t[t.GuardsCheckStart=7]="GuardsCheckStart",t[t.GuardsCheckEnd=8]="GuardsCheckEnd",t[t.RouteConfigLoadStart=9]="RouteConfigLoadStart",t[t.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",t[t.ChildActivationStart=11]="ChildActivationStart",t[t.ChildActivationEnd=12]="ChildActivationEnd",t[t.ActivationStart=13]="ActivationStart",t[t.ActivationEnd=14]="ActivationEnd",t[t.Scroll=15]="Scroll",t[t.NavigationSkipped=16]="NavigationSkipped",t})(b||{}),N=class{id;url;constructor(n,e){this.id=n,this.url=e}},ae=class extends N{type=b.NavigationStart;navigationTrigger;restoredState;constructor(n,e,r="imperative",i=null){super(n,e),this.navigationTrigger=r,this.restoredState=i}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},H=class extends N{urlAfterRedirects;type=b.NavigationEnd;constructor(n,e,r){super(n,e),this.urlAfterRedirects=r}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},I=(function(t){return t[t.Redirect=0]="Redirect",t[t.SupersededByNewNavigation=1]="SupersededByNewNavigation",t[t.NoDataFromResolver=2]="NoDataFromResolver",t[t.GuardRejected=3]="GuardRejected",t[t.Aborted=4]="Aborted",t})(I||{}),ze=(function(t){return t[t.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",t[t.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",t})(ze||{}),x=class extends N{reason;code;type=b.NavigationCancel;constructor(n,e,r,i){super(n,e),this.reason=r,this.code=i}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}};function ci(t){return t instanceof x&&(t.code===I.Redirect||t.code===I.SupersededByNewNavigation)}var W=class extends N{reason;code;type=b.NavigationSkipped;constructor(n,e,r,i){super(n,e),this.reason=r,this.code=i}},ce=class extends N{error;target;type=b.NavigationError;constructor(n,e,r,i){super(n,e),this.error=r,this.target=i}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},Fe=class extends N{urlAfterRedirects;state;type=b.RoutesRecognized;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},bt=class extends N{urlAfterRedirects;state;type=b.GuardsCheckStart;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Mt=class extends N{urlAfterRedirects;state;shouldActivate;type=b.GuardsCheckEnd;constructor(n,e,r,i,o){super(n,e),this.urlAfterRedirects=r,this.state=i,this.shouldActivate=o}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},It=class extends N{urlAfterRedirects;state;type=b.ResolveStart;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Tt=class extends N{urlAfterRedirects;state;type=b.ResolveEnd;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Dt=class{route;type=b.RouteConfigLoadStart;constructor(n){this.route=n}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},_t=class{route;type=b.RouteConfigLoadEnd;constructor(n){this.route=n}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},At=class{snapshot;type=b.ChildActivationStart;constructor(n){this.snapshot=n}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Ot=class{snapshot;type=b.ChildActivationEnd;constructor(n){this.snapshot=n}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Nt=class{snapshot;type=b.ActivationStart;constructor(n){this.snapshot=n}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Pt=class{snapshot;type=b.ActivationEnd;constructor(n){this.snapshot=n}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}};var ge=class{},Be=class{},ve=class{url;navigationBehaviorOptions;constructor(n,e){this.url=n,this.navigationBehaviorOptions=e}};function To(t){return!(t instanceof ge)&&!(t instanceof ve)&&!(t instanceof Be)}var Ut=class{rootInjector;outlet=null;route=null;children;attachRef=null;get injector(){return this.route?.snapshot._environmentInjector??this.rootInjector}constructor(n){this.rootInjector=n,this.children=new we(this.rootInjector)}},we=(()=>{class t{rootInjector;contexts=new Map;constructor(e){this.rootInjector=e}onChildOutletCreated(e,r){let i=this.getOrCreateContext(e);i.outlet=r,this.contexts.set(e,i)}onChildOutletDestroyed(e){let r=this.getContext(e);r&&(r.outlet=null,r.attachRef=null)}onOutletDeactivated(){let e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let r=this.getContext(e);return r||(r=new Ut(this.rootInjector),this.contexts.set(e,r)),r}getContext(e){return this.contexts.get(e)||null}static \u0275fac=function(r){return new(r||t)(R(K))};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Lt=class{_root;constructor(n){this._root=n}get root(){return this._root.value}parent(n){let e=this.pathFromRoot(n);return e.length>1?e[e.length-2]:null}children(n){let e=Sr(n,this._root);return e?e.children.map(r=>r.value):[]}firstChild(n){let e=Sr(n,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(n){let e=wr(n,this._root);return e.length<2?[]:e[e.length-2].children.map(i=>i.value).filter(i=>i!==n)}pathFromRoot(n){return wr(n,this._root).map(e=>e.value)}};function Sr(t,n){if(t===n.value)return n;for(let e of n.children){let r=Sr(t,e);if(r)return r}return null}function wr(t,n){if(t===n.value)return[n];for(let e of n.children){let r=wr(t,e);if(r.length)return r.unshift(n),r}return[]}var O=class{value;children;constructor(n,e){this.value=n,this.children=e}toString(){return`TreeNode(${this.value})`}};function he(t){let n={};return t&&t.children.forEach(e=>n[e.value.outlet]=e),n}var qe=class extends Lt{snapshot;constructor(n,e){super(n),this.snapshot=e,Nr(this,n)}toString(){return this.snapshot.toString()}};function ui(t,n){let e=Do(t,n),r=new P([new Z("",{})]),i=new P({}),o=new P({}),s=new P({}),a=new P(""),c=new Y(r,i,s,a,o,p,t,e.root);return c.snapshot=e.root,new qe(new O(c,[]),e)}function Do(t,n){let e={},r={},i={},s=new me([],e,i,"",r,p,t,null,{},n);return new Ve("",new O(s,[]))}var Y=class{urlSubject;paramsSubject;queryParamsSubject;fragmentSubject;dataSubject;outlet;component;snapshot;_futureSnapshot;_routerState;_paramMap;_queryParamMap;title;url;params;queryParams;fragment;data;constructor(n,e,r,i,o,s,a,c){this.urlSubject=n,this.paramsSubject=e,this.queryParamsSubject=r,this.fragmentSubject=i,this.dataSubject=o,this.outlet=s,this.component=a,this._futureSnapshot=c,this.title=this.dataSubject?.pipe(T(u=>u[Ye]))??g(void 0),this.url=n,this.params=e,this.queryParams=r,this.fragment=i,this.data=o}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=this.params.pipe(T(n=>se(n))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(T(n=>se(n))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function Or(t,n,e="emptyOnly"){let r,{routeConfig:i}=t;return n!==null&&(e==="always"||i?.path===""||!n.component&&!n.routeConfig?.loadComponent)?r={params:d(d({},n.params),t.params),data:d(d({},n.data),t.data),resolve:d(d(d(d({},t.data),n.data),i?.data),t._resolvedData)}:r={params:d({},t.params),data:d({},t.data),resolve:d(d({},t.data),t._resolvedData??{})},i&&di(i)&&(r.resolve[Ye]=i.title),r}var me=class{url;params;queryParams;fragment;data;outlet;component;routeConfig;_resolve;_resolvedData;_routerState;_paramMap;_queryParamMap;_environmentInjector;get title(){return this.data?.[Ye]}constructor(n,e,r,i,o,s,a,c,u,l){this.url=n,this.params=e,this.queryParams=r,this.fragment=i,this.data=o,this.outlet=s,this.component=a,this.routeConfig=c,this._resolve=u,this._environmentInjector=l}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=se(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=se(this.queryParams),this._queryParamMap}toString(){let n=this.url.map(r=>r.toString()).join("/"),e=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${n}', path:'${e}')`}},Ve=class extends Lt{url;constructor(n,e){super(e),this.url=n,Nr(this,e)}toString(){return li(this._root)}};function Nr(t,n){n.value._routerState=t,n.children.forEach(e=>Nr(t,e))}function li(t){let n=t.children.length>0?` { ${t.children.map(li).join(", ")} } `:"";return`${t.value}${n}`}function fr(t){if(t.snapshot){let n=t.snapshot,e=t._futureSnapshot;t.snapshot=e,B(n.queryParams,e.queryParams)||t.queryParamsSubject.next(e.queryParams),n.fragment!==e.fragment&&t.fragmentSubject.next(e.fragment),B(n.params,e.params)||t.paramsSubject.next(e.params),to(n.url,e.url)||t.urlSubject.next(e.url),B(n.data,e.data)||t.dataSubject.next(e.data)}else t.snapshot=t._futureSnapshot,t.dataSubject.next(t._futureSnapshot.data)}function Cr(t,n){let e=B(t.params,n.params)&&so(t.url,n.url),r=!t.parent!=!n.parent;return e&&!r&&(!t.parent||Cr(t.parent,n.parent))}function di(t){return typeof t.title=="string"||t.title===null}var hi=new M(""),Pr=(()=>{class t{activated=null;get activatedComponentRef(){return this.activated}_activatedRoute=null;name=p;activateEvents=new ie;deactivateEvents=new ie;attachEvents=new ie;detachEvents=new ie;routerOutletData=Cn();parentContexts=f(we);location=f(sn);changeDetector=f(at);inputBinder=f(Ht,{optional:!0});supportsBindingToComponentInputs=!0;ngOnChanges(e){if(e.name){let{firstChange:r,previousValue:i}=e.name;if(r)return;this.isTrackedInParentContexts(i)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(i)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(e){return this.parentContexts.getContext(e)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let e=this.parentContexts.getContext(this.name);e?.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new w(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new w(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new w(4012,!1);this.location.detach();let e=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(e.instance),e}attach(e,r){this.activated=e,this._activatedRoute=r,this.location.insert(e.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(e.instance)}deactivate(){if(this.activated){let e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e)}}activateWith(e,r){if(this.isActivated)throw new w(4013,!1);this._activatedRoute=e;let i=this.location,s=e.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,c=new Er(e,a,i.injector,this.routerOutletData);this.activated=i.createComponent(s,{index:i.length,injector:c,environmentInjector:r}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}static \u0275fac=function(r){return new(r||t)};static \u0275dir=De({type:t,selectors:[["router-outlet"]],inputs:{name:"name",routerOutletData:[1,"routerOutletData"]},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],features:[Ie]})}return t})(),Er=class{route;childContexts;parent;outletData;constructor(n,e,r,i){this.route=n,this.childContexts=e,this.parent=r,this.outletData=i}get(n,e){return n===Y?this.route:n===we?this.childContexts:n===hi?this.outletData:this.parent.get(n,e)}},Ht=new M("");var Ur=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275cmp=cn({type:t,selectors:[["ng-component"]],exportAs:["emptyRouterOutlet"],decls:1,vars:0,template:function(r,i){r&1&&pn(0,"router-outlet")},dependencies:[Pr],encapsulation:2})}return t})();function Lr(t){let n=t.children&&t.children.map(Lr),e=n?_(d({},t),{children:n}):d({},t);return!e.component&&!e.loadComponent&&(n||e.loadChildren)&&e.outlet&&e.outlet!==p&&(e.component=Ur),e}function _o(t,n,e){let r=Ge(t,n._root,e?e._root:void 0);return new qe(r,n)}function Ge(t,n,e){if(e&&t.shouldReuseRoute(n.value,e.value.snapshot)){let r=e.value;r._futureSnapshot=n.value;let i=Ao(t,n,e);return new O(r,i)}else{if(t.shouldAttach(n.value)){let o=t.retrieve(n.value);if(o!==null){let s=o.route;return s.value._futureSnapshot=n.value,s.children=n.children.map(a=>Ge(t,a)),s}}let r=Oo(n.value),i=n.children.map(o=>Ge(t,o));return new O(r,i)}}function Ao(t,n,e){return n.children.map(r=>{for(let i of e.children)if(t.shouldReuseRoute(r.value,i.value.snapshot))return Ge(t,r,i);return Ge(t,r)})}function Oo(t){return new Y(new P(t.url),new P(t.params),new P(t.queryParams),new P(t.fragment),new P(t.data),t.outlet,t.component,t)}var ye=class{redirectTo;navigationBehaviorOptions;constructor(n,e){this.redirectTo=n,this.navigationBehaviorOptions=e}},fi="ngNavigationCancelingError";function xt(t,n){let{redirectTo:e,navigationBehaviorOptions:r}=X(n)?{redirectTo:n,navigationBehaviorOptions:void 0}:n,i=pi(!1,I.Redirect);return i.url=e,i.navigationBehaviorOptions=r,i}function pi(t,n){let e=new Error(`NavigationCancelingError: ${t||""}`);return e[fi]=!0,e.cancellationCode=n,e}function No(t){return gi(t)&&X(t.url)}function gi(t){return!!t&&t[fi]}var br=class{routeReuseStrategy;futureState;currState;forwardEvent;inputBindingEnabled;constructor(n,e,r,i,o){this.routeReuseStrategy=n,this.futureState=e,this.currState=r,this.forwardEvent=i,this.inputBindingEnabled=o}activate(n){let e=this.futureState._root,r=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,r,n),fr(this.futureState.root),this.activateChildRoutes(e,r,n)}deactivateChildRoutes(n,e,r){let i=he(e);n.children.forEach(o=>{let s=o.value.outlet;this.deactivateRoutes(o,i[s],r),delete i[s]}),Object.values(i).forEach(o=>{this.deactivateRouteAndItsChildren(o,r)})}deactivateRoutes(n,e,r){let i=n.value,o=e?e.value:null;if(i===o)if(i.component){let s=r.getContext(i.outlet);s&&this.deactivateChildRoutes(n,e,s.children)}else this.deactivateChildRoutes(n,e,r);else o&&this.deactivateRouteAndItsChildren(e,r)}deactivateRouteAndItsChildren(n,e){n.value.component&&this.routeReuseStrategy.shouldDetach(n.value.snapshot)?this.detachAndStoreRouteSubtree(n,e):this.deactivateRouteAndOutlet(n,e)}detachAndStoreRouteSubtree(n,e){let r=e.getContext(n.value.outlet),i=r&&n.value.component?r.children:e,o=he(n);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,i);if(r&&r.outlet){let s=r.outlet.detach(),a=r.children.onOutletDeactivated();this.routeReuseStrategy.store(n.value.snapshot,{componentRef:s,route:n,contexts:a})}}deactivateRouteAndOutlet(n,e){let r=e.getContext(n.value.outlet),i=r&&n.value.component?r.children:e,o=he(n);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,i);r&&(r.outlet&&(r.outlet.deactivate(),r.children.onOutletDeactivated()),r.attachRef=null,r.route=null)}activateChildRoutes(n,e,r){let i=he(e);n.children.forEach(o=>{this.activateRoutes(o,i[o.value.outlet],r),this.forwardEvent(new Pt(o.value.snapshot))}),n.children.length&&this.forwardEvent(new Ot(n.value.snapshot))}activateRoutes(n,e,r){let i=n.value,o=e?e.value:null;if(fr(i),i===o)if(i.component){let s=r.getOrCreateContext(i.outlet);this.activateChildRoutes(n,e,s.children)}else this.activateChildRoutes(n,e,r);else if(i.component){let s=r.getOrCreateContext(i.outlet);if(this.routeReuseStrategy.shouldAttach(i.snapshot)){let a=this.routeReuseStrategy.retrieve(i.snapshot);this.routeReuseStrategy.store(i.snapshot,null),s.children.onOutletReAttached(a.contexts),s.attachRef=a.componentRef,s.route=a.route.value,s.outlet&&s.outlet.attach(a.componentRef,a.route.value),fr(a.route.value),this.activateChildRoutes(n,null,s.children)}else s.attachRef=null,s.route=i,s.outlet&&s.outlet.activateWith(i,s.injector),this.activateChildRoutes(n,null,s.children)}else this.activateChildRoutes(n,null,r)}},jt=class{path;route;constructor(n){this.path=n,this.route=this.path[this.path.length-1]}},pe=class{component;route;constructor(n,e){this.component=n,this.route=e}};function Po(t,n,e){let r=t._root,i=n?n._root:null;return Le(r,i,e,[r.value])}function Uo(t){let n=t.routeConfig?t.routeConfig.canActivateChild:null;return!n||n.length===0?null:{node:t,guards:n}}function Ce(t,n){let e=Symbol(),r=n.get(t,e);return r===e?typeof t=="function"&&!Yr(t)?t:n.get(t):r}function Le(t,n,e,r,i={canDeactivateChecks:[],canActivateChecks:[]}){let o=he(n);return t.children.forEach(s=>{Lo(s,o[s.value.outlet],e,r.concat([s.value]),i),delete o[s.value.outlet]}),Object.entries(o).forEach(([s,a])=>ke(a,e.getContext(s),i)),i}function Lo(t,n,e,r,i={canDeactivateChecks:[],canActivateChecks:[]}){let o=t.value,s=n?n.value:null,a=e?e.getContext(t.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){let c=xo(s,o,o.routeConfig.runGuardsAndResolvers);c?i.canActivateChecks.push(new jt(r)):(o.data=s.data,o._resolvedData=s._resolvedData),o.component?Le(t,n,a?a.children:null,r,i):Le(t,n,e,r,i),c&&a&&a.outlet&&a.outlet.isActivated&&i.canDeactivateChecks.push(new pe(a.outlet.component,s))}else s&&ke(n,a,i),i.canActivateChecks.push(new jt(r)),o.component?Le(t,null,a?a.children:null,r,i):Le(t,null,e,r,i);return i}function xo(t,n,e){if(typeof e=="function")return L(n._environmentInjector,()=>e(t,n));switch(e){case"pathParamsChange":return!oe(t.url,n.url);case"pathParamsOrQueryParamsChange":return!oe(t.url,n.url)||!B(t.queryParams,n.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!Cr(t,n)||!B(t.queryParams,n.queryParams);default:return!Cr(t,n)}}function ke(t,n,e){let r=he(t),i=t.value;Object.entries(r).forEach(([o,s])=>{i.component?n?ke(s,n.children.getContext(o),e):ke(s,null,e):ke(s,n,e)}),i.component?n&&n.outlet&&n.outlet.isActivated?e.canDeactivateChecks.push(new pe(n.outlet.component,i)):e.canDeactivateChecks.push(new pe(null,i)):e.canDeactivateChecks.push(new pe(null,i))}function Qe(t){return typeof t=="function"}function jo(t){return typeof t=="boolean"}function ko(t){return t&&Qe(t.canLoad)}function Ho(t){return t&&Qe(t.canActivate)}function $o(t){return t&&Qe(t.canActivateChild)}function zo(t){return t&&Qe(t.canDeactivate)}function Fo(t){return t&&Qe(t.canMatch)}function vi(t){return t instanceof Fr||t?.name==="EmptyError"}var mt=Symbol("INITIAL_VALUE");function Re(){return $(t=>Br(t.map(n=>n.pipe(de(1),Gr(mt)))).pipe(T(n=>{for(let e of n)if(e!==!0){if(e===mt)return mt;if(e===!1||Bo(e))return e}return!0}),ne(n=>n!==mt),de(1)))}function Bo(t){return X(t)||t instanceof ye}function mi(t){return t.aborted?g(void 0).pipe(de(1)):new $r(n=>{let e=()=>{n.next(),n.complete()};return t.addEventListener("abort",e),()=>t.removeEventListener("abort",e)})}function yi(t){return tt(mi(t))}function qo(t){return V(n=>{let{targetSnapshot:e,currentSnapshot:r,guards:{canActivateChecks:i,canDeactivateChecks:o}}=n;return o.length===0&&i.length===0?g(_(d({},n),{guardsResult:!0})):Vo(o,e,r).pipe(V(s=>s&&jo(s)?Go(e,i,t):g(s)),T(s=>_(d({},n),{guardsResult:s})))})}function Vo(t,n,e){return A(t).pipe(V(r=>Zo(r.component,r.route,e,n)),Q(r=>r!==!0,!0))}function Go(t,n,e){return A(n).pipe(et(r=>qr(Yo(r.route.parent,e),Wo(r.route,e),Ko(t,r.path),Qo(t,r.route))),Q(r=>r!==!0,!0))}function Wo(t,n){return t!==null&&n&&n(new Nt(t)),g(!0)}function Yo(t,n){return t!==null&&n&&n(new At(t)),g(!0)}function Qo(t,n){let e=n.routeConfig?n.routeConfig.canActivate:null;if(!e||e.length===0)return g(!0);let r=e.map(i=>Je(()=>{let o=n._environmentInjector,s=Ce(i,o),a=Ho(s)?s.canActivate(n,t):L(o,()=>s(n,t));return ue(a).pipe(Q())}));return g(r).pipe(Re())}function Ko(t,n){let e=n[n.length-1],i=n.slice(0,n.length-1).reverse().map(o=>Uo(o)).filter(o=>o!==null).map(o=>Je(()=>{let s=o.guards.map(a=>{let c=o.node._environmentInjector,u=Ce(a,c),l=$o(u)?u.canActivateChild(e,t):L(c,()=>u(e,t));return ue(l).pipe(Q())});return g(s).pipe(Re())}));return g(i).pipe(Re())}function Zo(t,n,e,r){let i=n&&n.routeConfig?n.routeConfig.canDeactivate:null;if(!i||i.length===0)return g(!0);let o=i.map(s=>{let a=n._environmentInjector,c=Ce(s,a),u=zo(c)?c.canDeactivate(t,n,e,r):L(a,()=>c(t,n,e,r));return ue(u).pipe(Q())});return g(o).pipe(Re())}function Jo(t,n,e,r,i){let o=n.canLoad;if(o===void 0||o.length===0)return g(!0);let s=o.map(a=>{let c=Ce(a,t),u=ko(c)?c.canLoad(n,e):L(t,()=>c(n,e)),l=ue(u);return i?l.pipe(yi(i)):l});return g(s).pipe(Re(),Ri(r))}function Ri(t){return Hr(j(n=>{if(typeof n!="boolean")throw xt(t,n)}),T(n=>n===!0))}function Xo(t,n,e,r,i,o){let s=n.canMatch;if(!s||s.length===0)return g(!0);let a=s.map(c=>{let u=Ce(c,t),l=Fo(u)?u.canMatch(n,e,i):L(t,()=>u(n,e,i));return ue(l).pipe(yi(o))});return g(a).pipe(Re(),Ri(r))}var G=class t extends Error{segmentGroup;constructor(n){super(),this.segmentGroup=n||null,Object.setPrototypeOf(this,t.prototype)}},We=class t extends Error{urlTree;constructor(n){super(),this.urlTree=n,Object.setPrototypeOf(this,t.prototype)}};function es(t){throw new w(4e3,!1)}function ts(t){throw pi(!1,I.GuardRejected)}var Mr=class{urlSerializer;urlTree;constructor(n,e){this.urlSerializer=n,this.urlTree=e}lineralizeSegments(n,e){return S(this,null,function*(){let r=[],i=e.root;for(;;){if(r=r.concat(i.segments),i.numberOfChildren===0)return r;if(i.numberOfChildren>1||!i.children[p])throw es(`${n.redirectTo}`);i=i.children[p]}})}applyRedirectCommands(n,e,r,i,o){return S(this,null,function*(){let s=yield rs(e,i,o);if(s instanceof D)throw new We(s);let a=this.applyRedirectCreateUrlTree(s,this.urlSerializer.parse(s),n,r);if(s[0]==="/")throw new We(a);return a})}applyRedirectCreateUrlTree(n,e,r,i){let o=this.createSegmentGroup(n,e.root,r,i);return new D(o,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(n,e){let r={};return Object.entries(n).forEach(([i,o])=>{if(typeof o=="string"&&o[0]===":"){let a=o.substring(1);r[i]=e[a]}else r[i]=o}),r}createSegmentGroup(n,e,r,i){let o=this.createSegments(n,e.segments,r,i),s={};return Object.entries(e.children).forEach(([a,c])=>{s[a]=this.createSegmentGroup(n,c,r,i)}),new v(o,s)}createSegments(n,e,r,i){return e.map(o=>o.path[0]===":"?this.findPosParam(n,o,i):this.findOrReturn(o,r))}findPosParam(n,e,r){let i=r[e.path.substring(1)];if(!i)throw new w(4001,!1);return i}findOrReturn(n,e){let r=0;for(let i of e){if(i.path===n.path)return e.splice(r),i;r++}return n}};function rs(t,n,e){if(typeof t=="string")return Promise.resolve(t);let r=t;return wt(ue(L(e,()=>r(n))))}function ns(t,n){return t.providers&&!t._injector&&(t._injector=rr(t.providers,n,`Route: ${t.path}`)),t._injector??n}function k(t){return t.outlet||p}function is(t,n){let e=t.filter(r=>k(r)===n);return e.push(...t.filter(r=>k(r)!==n)),e}var Ir={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function Si(t){return{routeConfig:t.routeConfig,url:t.url,params:t.params,queryParams:t.queryParams,fragment:t.fragment,data:t.data,outlet:t.outlet,title:t.title,paramMap:t.paramMap,queryParamMap:t.queryParamMap}}function os(t,n,e,r,i,o,s){let a=wi(t,n,e);if(!a.matched)return g(a);let c=Si(o(a));return r=ns(n,r),Xo(r,n,e,i,c,s).pipe(T(u=>u===!0?a:d({},Ir)))}function wi(t,n,e){if(n.path==="")return n.pathMatch==="full"&&(t.hasChildren()||e.length>0)?d({},Ir):{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};let i=(n.matcher||Gn)(e,t,n);if(!i)return d({},Ir);let o={};Object.entries(i.posParams??{}).forEach(([a,c])=>{o[a]=c.path});let s=i.consumed.length>0?d(d({},o),i.consumed[i.consumed.length-1].parameters):o;return{matched:!0,consumedSegments:i.consumed,remainingSegments:e.slice(i.consumed.length),parameters:s,positionalParamSegments:i.posParams??{}}}function qn(t,n,e,r,i){return e.length>0&&cs(t,e,r,i)?{segmentGroup:new v(n,as(r,new v(e,t.children))),slicedSegments:[]}:e.length===0&&us(t,e,r)?{segmentGroup:new v(t.segments,ss(t,e,r,t.children)),slicedSegments:e}:{segmentGroup:new v(t.segments,t.children),slicedSegments:e}}function ss(t,n,e,r){let i={};for(let o of e)if($t(t,n,o)&&!r[k(o)]){let s=new v([],{});i[k(o)]=s}return d(d({},r),i)}function as(t,n){let e={};e[p]=n;for(let r of t)if(r.path===""&&k(r)!==p){let i=new v([],{});e[k(r)]=i}return e}function cs(t,n,e,r){return e.some(i=>!$t(t,n,i)||!(k(i)!==p)?!1:!(r!==void 0&&k(i)===r))}function us(t,n,e){return e.some(r=>$t(t,n,r))}function $t(t,n,e){return(t.hasChildren()||n.length>0)&&e.pathMatch==="full"?!1:e.path===""}function ls(t,n,e){return n.length===0&&!t.children[e]}var Tr=class{};function ds(t,n,e,r,i,o,s="emptyOnly",a){return S(this,null,function*(){return new Dr(t,n,e,r,i,s,o,a).recognize()})}var hs=31,Dr=class{injector;configLoader;rootComponentType;config;urlTree;paramsInheritanceStrategy;urlSerializer;abortSignal;applyRedirects;absoluteRedirectCount=0;allowRedirects=!0;constructor(n,e,r,i,o,s,a,c){this.injector=n,this.configLoader=e,this.rootComponentType=r,this.config=i,this.urlTree=o,this.paramsInheritanceStrategy=s,this.urlSerializer=a,this.abortSignal=c,this.applyRedirects=new Mr(this.urlSerializer,this.urlTree)}noMatchError(n){return new w(4002,`'${n.segmentGroup}'`)}recognize(){return S(this,null,function*(){let n=qn(this.urlTree.root,[],[],this.config).segmentGroup,{children:e,rootSnapshot:r}=yield this.match(n),i=new O(r,e),o=new Ve("",i),s=ni(r,[],this.urlTree.queryParams,this.urlTree.fragment);return s.queryParams=this.urlTree.queryParams,o.url=this.urlSerializer.serialize(s),{state:o,tree:s}})}match(n){return S(this,null,function*(){let e=new me([],Object.freeze({}),Object.freeze(d({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),p,this.rootComponentType,null,{},this.injector);try{return{children:yield this.processSegmentGroup(this.injector,this.config,n,p,e),rootSnapshot:e}}catch(r){if(r instanceof We)return this.urlTree=r.urlTree,this.match(r.urlTree.root);throw r instanceof G?this.noMatchError(r):r}})}processSegmentGroup(n,e,r,i,o){return S(this,null,function*(){if(r.segments.length===0&&r.hasChildren())return this.processChildren(n,e,r,o);let s=yield this.processSegment(n,e,r,r.segments,i,!0,o);return s instanceof O?[s]:[]})}processChildren(n,e,r,i){return S(this,null,function*(){let o=[];for(let c of Object.keys(r.children))c==="primary"?o.unshift(c):o.push(c);let s=[];for(let c of o){let u=r.children[c],l=is(e,c),h=yield this.processSegmentGroup(n,l,u,c,i);s.push(...h)}let a=Ci(s);return fs(a),a})}processSegment(n,e,r,i,o,s,a){return S(this,null,function*(){for(let c of e)try{return yield this.processSegmentAgainstRoute(c._injector??n,e,c,r,i,o,s,a)}catch(u){if(u instanceof G||vi(u))continue;throw u}if(ls(r,i,o))return new Tr;throw new G(r)})}processSegmentAgainstRoute(n,e,r,i,o,s,a,c){return S(this,null,function*(){if(k(r)!==s&&(s===p||!$t(i,o,r)))throw new G(i);if(r.redirectTo===void 0)return this.matchSegmentAgainstRoute(n,i,r,o,s,c);if(this.allowRedirects&&a)return this.expandSegmentAgainstRouteUsingRedirect(n,i,e,r,o,s,c);throw new G(i)})}expandSegmentAgainstRouteUsingRedirect(n,e,r,i,o,s,a){return S(this,null,function*(){let{matched:c,parameters:u,consumedSegments:l,positionalParamSegments:h,remainingSegments:m}=wi(e,i,o);if(!c)throw new G(e);typeof i.redirectTo=="string"&&i.redirectTo[0]==="/"&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>hs&&(this.allowRedirects=!1));let ee=this.createSnapshot(n,i,o,u,a);if(this.abortSignal.aborted)throw new Error(this.abortSignal.reason);let q=yield this.applyRedirects.applyRedirectCommands(l,i.redirectTo,h,Si(ee),n),te=yield this.applyRedirects.lineralizeSegments(i,q);return this.processSegment(n,r,e,te.concat(m),s,!1,a)})}createSnapshot(n,e,r,i,o){let s=new me(r,i,Object.freeze(d({},this.urlTree.queryParams)),this.urlTree.fragment,gs(e),k(e),e.component??e._loadedComponent??null,e,vs(e),n),a=Or(s,o,this.paramsInheritanceStrategy);return s.params=Object.freeze(a.params),s.data=Object.freeze(a.data),s}matchSegmentAgainstRoute(n,e,r,i,o,s){return S(this,null,function*(){if(this.abortSignal.aborted)throw new Error(this.abortSignal.reason);let a=Ze=>this.createSnapshot(n,r,Ze.consumedSegments,Ze.parameters,s),c=yield wt(os(e,r,i,n,this.urlSerializer,a,this.abortSignal));if(r.path==="**"&&(e.children={}),!c?.matched)throw new G(e);n=r._injector??n;let{routes:u}=yield this.getChildConfig(n,r,i),l=r._loadedInjector??n,{parameters:h,consumedSegments:m,remainingSegments:ee}=c,q=this.createSnapshot(n,r,m,h,s),{segmentGroup:te,slicedSegments:be}=qn(e,m,ee,u,o);if(be.length===0&&te.hasChildren()){let Ze=yield this.processChildren(l,u,te,q);return new O(q,Ze)}if(u.length===0&&be.length===0)return new O(q,[]);let qt=k(r)===o,Me=yield this.processSegment(l,u,te,be,qt?p:o,!0,q);return new O(q,Me instanceof O?[Me]:[])})}getChildConfig(n,e,r){return S(this,null,function*(){if(e.children)return{routes:e.children,injector:n};if(e.loadChildren){if(e._loadedRoutes!==void 0){let o=e._loadedNgModuleFactory;return o&&!e._loadedInjector&&(e._loadedInjector=o.create(n).injector),{routes:e._loadedRoutes,injector:e._loadedInjector}}if(this.abortSignal.aborted)throw new Error(this.abortSignal.reason);if(yield wt(Jo(n,e,r,this.urlSerializer,this.abortSignal))){let o=yield this.configLoader.loadChildren(n,e);return e._loadedRoutes=o.routes,e._loadedInjector=o.injector,e._loadedNgModuleFactory=o.factory,o}throw ts(e)}return{routes:[],injector:n}})}};function fs(t){t.sort((n,e)=>n.value.outlet===p?-1:e.value.outlet===p?1:n.value.outlet.localeCompare(e.value.outlet))}function ps(t){let n=t.value.routeConfig;return n&&n.path===""}function Ci(t){let n=[],e=new Set;for(let r of t){if(!ps(r)){n.push(r);continue}let i=n.find(o=>r.value.routeConfig===o.value.routeConfig);i!==void 0?(i.children.push(...r.children),e.add(i)):n.push(r)}for(let r of e){let i=Ci(r.children);n.push(new O(r.value,i))}return n.filter(r=>!e.has(r))}function gs(t){return t.data||{}}function vs(t){return t.resolve||{}}function ms(t,n,e,r,i,o,s){return V(a=>S(null,null,function*(){let{state:c,tree:u}=yield ds(t,n,e,r,a.extractedUrl,i,o,s);return _(d({},a),{targetSnapshot:c,urlAfterRedirects:u})}))}function ys(t){return V(n=>{let{targetSnapshot:e,guards:{canActivateChecks:r}}=n;if(!r.length)return g(n);let i=new Set(r.map(a=>a.route)),o=new Set;for(let a of i)if(!o.has(a))for(let c of Ei(a))o.add(c);let s=0;return A(o).pipe(et(a=>i.has(a)?Rs(a,e,t):(a.data=Or(a,a.parent,t).resolve,g(void 0))),j(()=>s++),Wt(1),V(a=>s===o.size?g(n):U))})}function Ei(t){let n=t.children.map(e=>Ei(e)).flat();return[t,...n]}function Rs(t,n,e){let r=t.routeConfig,i=t._resolve;return r?.title!==void 0&&!di(r)&&(i[Ye]=r.title),Je(()=>(t.data=Or(t,t.parent,e).resolve,Ss(i,t,n).pipe(T(o=>(t._resolvedData=o,t.data=d(d({},t.data),o),null)))))}function Ss(t,n,e){let r=gr(t);if(r.length===0)return g({});let i={};return A(r).pipe(V(o=>ws(t[o],n,e).pipe(Q(),j(s=>{if(s instanceof ye)throw xt(new J,s);i[o]=s}))),Wt(1),T(()=>i),Xe(o=>vi(o)?U:zr(o)))}function ws(t,n,e){let r=n._environmentInjector,i=Ce(t,r),o=i.resolve?i.resolve(n,e):L(r,()=>i(n,e));return ue(o)}function Vn(t){return $(n=>{let e=t(n);return e?A(e).pipe(T(()=>n)):g(n)})}var xr=(()=>{class t{buildTitle(e){let r,i=e.root;for(;i!==void 0;)r=this.getResolvedTitleForRoute(i)??r,i=i.children.find(o=>o.outlet===p);return r}getResolvedTitleForRoute(e){return e.data[Ye]}static \u0275fac=function(r){return new(r||t)};static \u0275prov=y({token:t,factory:()=>f(bi),providedIn:"root"})}return t})(),bi=(()=>{class t extends xr{title;constructor(e){super(),this.title=e}updateTitle(e){let r=this.buildTitle(e);r!==void 0&&this.title.setTitle(r)}static \u0275fac=function(r){return new(r||t)(R(Hn))};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Ee=new M("",{factory:()=>({})}),Ke=new M(""),Mi=(()=>{class t{componentLoaders=new WeakMap;childrenLoaders=new WeakMap;onLoadStartListener;onLoadEndListener;compiler=f(Rn);loadComponent(e,r){return S(this,null,function*(){if(this.componentLoaders.get(r))return this.componentLoaders.get(r);if(r._loadedComponent)return Promise.resolve(r._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(r);let i=S(this,null,function*(){try{let o=yield Yn(L(e,()=>r.loadComponent())),s=yield Di(Ti(o));return this.onLoadEndListener&&this.onLoadEndListener(r),r._loadedComponent=s,s}finally{this.componentLoaders.delete(r)}});return this.componentLoaders.set(r,i),i})}loadChildren(e,r){if(this.childrenLoaders.get(r))return this.childrenLoaders.get(r);if(r._loadedRoutes)return Promise.resolve({routes:r._loadedRoutes,injector:r._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(r);let i=S(this,null,function*(){try{let o=yield Ii(r,this.compiler,e,this.onLoadEndListener);return r._loadedRoutes=o.routes,r._loadedInjector=o.injector,r._loadedNgModuleFactory=o.factory,o}finally{this.childrenLoaders.delete(r)}});return this.childrenLoaders.set(r,i),i}static \u0275fac=function(r){return new(r||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Ii(t,n,e,r){return S(this,null,function*(){let i=yield Yn(L(e,()=>t.loadChildren())),o=yield Di(Ti(i)),s;o instanceof an||Array.isArray(o)?s=o:s=yield n.compileModuleAsync(o),r&&r(t);let a,c,u=!1,l;return Array.isArray(s)?(c=s,u=!0):(a=s.create(e).injector,l=s,c=a.get(Ke,[],{optional:!0,self:!0}).flat()),{routes:c.map(Lr),injector:a,factory:l}})}function Cs(t){return t&&typeof t=="object"&&"default"in t}function Ti(t){return Cs(t)?t.default:t}function Di(t){return S(this,null,function*(){return t})}var zt=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=y({token:t,factory:()=>f(Es),providedIn:"root"})}return t})(),Es=(()=>{class t{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,r){return e}static \u0275fac=function(r){return new(r||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),_i=new M("");var bs=()=>{},Ai=new M(""),Oi=(()=>{class t{currentNavigation=E(null,{equal:()=>!1});currentTransition=null;lastSuccessfulNavigation=E(null);events=new re;transitionAbortWithErrorSubject=new re;configLoader=f(Mi);environmentInjector=f(K);destroyRef=f(Qt);urlSerializer=f(Se);rootContexts=f(we);location=f(ut);inputBindingEnabled=f(Ht,{optional:!0})!==null;titleStrategy=f(xr);options=f(Ee,{optional:!0})||{};paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly";urlHandlingStrategy=f(zt);createViewTransition=f(_i,{optional:!0});navigationErrorHandler=f(Ai,{optional:!0});navigationId=0;get hasRequestedNavigation(){return this.navigationId!==0}transitions;afterPreactivation=()=>g(void 0);rootComponentType=null;destroyed=!1;constructor(){let e=i=>this.events.next(new Dt(i)),r=i=>this.events.next(new _t(i));this.configLoader.onLoadEndListener=r,this.configLoader.onLoadStartListener=e,this.destroyRef.onDestroy(()=>{this.destroyed=!0})}complete(){this.transitions?.complete()}handleNavigationRequest(e){let r=++this.navigationId;C(()=>{this.transitions?.next(_(d({},e),{extractedUrl:this.urlHandlingStrategy.extract(e.rawUrl),targetSnapshot:null,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null,id:r,routesRecognizeHandler:{},beforeActivateHandler:{}}))})}setupNavigations(e){return this.transitions=new P(null),this.transitions.pipe(ne(r=>r!==null),$(r=>{let i=!1,o=new AbortController,s=()=>!i&&this.currentTransition?.id===r.id;return g(r).pipe($(a=>{if(this.navigationId>r.id)return this.cancelNavigationTransition(r,"",I.SupersededByNewNavigation),U;this.currentTransition=r;let c=this.lastSuccessfulNavigation();this.currentNavigation.set({id:a.id,initialUrl:a.rawUrl,extractedUrl:a.extractedUrl,targetBrowserUrl:typeof a.extras.browserUrl=="string"?this.urlSerializer.parse(a.extras.browserUrl):a.extras.browserUrl,trigger:a.source,extras:a.extras,previousNavigation:c?_(d({},c),{previousNavigation:null}):null,abort:()=>o.abort(),routesRecognizeHandler:a.routesRecognizeHandler,beforeActivateHandler:a.beforeActivateHandler});let u=!e.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),l=a.extras.onSameUrlNavigation??e.onSameUrlNavigation;if(!u&&l!=="reload")return this.events.next(new W(a.id,this.urlSerializer.serialize(a.rawUrl),"",ze.IgnoredSameUrlNavigation)),a.resolve(!1),U;if(this.urlHandlingStrategy.shouldProcessUrl(a.rawUrl))return g(a).pipe($(h=>(this.events.next(new ae(h.id,this.urlSerializer.serialize(h.extractedUrl),h.source,h.restoredState)),h.id!==this.navigationId?U:Promise.resolve(h))),ms(this.environmentInjector,this.configLoader,this.rootComponentType,e.config,this.urlSerializer,this.paramsInheritanceStrategy,o.signal),j(h=>{r.targetSnapshot=h.targetSnapshot,r.urlAfterRedirects=h.urlAfterRedirects,this.currentNavigation.update(m=>(m.finalUrl=h.urlAfterRedirects,m)),this.events.next(new Be)}),$(h=>A(r.routesRecognizeHandler.deferredHandle??g(void 0)).pipe(T(()=>h))),j(()=>{let h=new Fe(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(h)}));if(u&&this.urlHandlingStrategy.shouldProcessUrl(a.currentRawUrl)){let{id:h,extractedUrl:m,source:ee,restoredState:q,extras:te}=a,be=new ae(h,this.urlSerializer.serialize(m),ee,q);this.events.next(be);let qt=ui(this.rootComponentType,this.environmentInjector).snapshot;return this.currentTransition=r=_(d({},a),{targetSnapshot:qt,urlAfterRedirects:m,extras:_(d({},te),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.update(Me=>(Me.finalUrl=m,Me)),g(r)}else return this.events.next(new W(a.id,this.urlSerializer.serialize(a.extractedUrl),"",ze.IgnoredByUrlHandlingStrategy)),a.resolve(!1),U}),T(a=>{let c=new bt(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);return this.events.next(c),this.currentTransition=r=_(d({},a),{guards:Po(a.targetSnapshot,a.currentSnapshot,this.rootContexts)}),r}),qo(a=>this.events.next(a)),$(a=>{if(r.guardsResult=a.guardsResult,a.guardsResult&&typeof a.guardsResult!="boolean")throw xt(this.urlSerializer,a.guardsResult);let c=new Mt(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot,!!a.guardsResult);if(this.events.next(c),!s())return U;if(!a.guardsResult)return this.cancelNavigationTransition(a,"",I.GuardRejected),U;if(a.guards.canActivateChecks.length===0)return g(a);let u=new It(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);if(this.events.next(u),!s())return U;let l=!1;return g(a).pipe(ys(this.paramsInheritanceStrategy),j({next:()=>{l=!0;let h=new Tt(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(h)},complete:()=>{l||this.cancelNavigationTransition(a,"",I.NoDataFromResolver)}}))}),Vn(a=>{let c=l=>{let h=[];if(l.routeConfig?._loadedComponent)l.component=l.routeConfig?._loadedComponent;else if(l.routeConfig?.loadComponent){let m=l._environmentInjector;h.push(this.configLoader.loadComponent(m,l.routeConfig).then(ee=>{l.component=ee}))}for(let m of l.children)h.push(...c(m));return h},u=c(a.targetSnapshot.root);return u.length===0?g(a):A(Promise.all(u).then(()=>a))}),Vn(()=>this.afterPreactivation()),$(()=>{let{currentSnapshot:a,targetSnapshot:c}=r,u=this.createViewTransition?.(this.environmentInjector,a.root,c.root);return u?A(u).pipe(T(()=>r)):g(r)}),de(1),$(a=>{let c=_o(e.routeReuseStrategy,a.targetSnapshot,a.currentRouterState);this.currentTransition=r=a=_(d({},a),{targetRouterState:c}),this.currentNavigation.update(l=>(l.targetRouterState=c,l)),this.events.next(new ge);let u=r.beforeActivateHandler.deferredHandle;return u?A(u.then(()=>a)):g(a)}),j(a=>{new br(e.routeReuseStrategy,r.targetRouterState,r.currentRouterState,c=>this.events.next(c),this.inputBindingEnabled).activate(this.rootContexts),s()&&(i=!0,this.currentNavigation.update(c=>(c.abort=bs,c)),this.lastSuccessfulNavigation.set(C(this.currentNavigation)),this.events.next(new H(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects))),this.titleStrategy?.updateTitle(a.targetRouterState.snapshot),a.resolve(!0))}),tt(mi(o.signal).pipe(ne(()=>!i&&!r.targetRouterState),j(()=>{this.cancelNavigationTransition(r,o.signal.reason+"",I.Aborted)}))),j({complete:()=>{i=!0}}),tt(this.transitionAbortWithErrorSubject.pipe(j(a=>{throw a}))),Vr(()=>{o.abort(),i||this.cancelNavigationTransition(r,"",I.SupersededByNewNavigation),this.currentTransition?.id===r.id&&(this.currentNavigation.set(null),this.currentTransition=null)}),Xe(a=>{if(i=!0,this.destroyed)return r.resolve(!1),U;if(gi(a))this.events.next(new x(r.id,this.urlSerializer.serialize(r.extractedUrl),a.message,a.cancellationCode)),No(a)?this.events.next(new ve(a.url,a.navigationBehaviorOptions)):r.resolve(!1);else{let c=new ce(r.id,this.urlSerializer.serialize(r.extractedUrl),a,r.targetSnapshot??void 0);try{let u=L(this.environmentInjector,()=>this.navigationErrorHandler?.(c));if(u instanceof ye){let{message:l,cancellationCode:h}=xt(this.urlSerializer,u);this.events.next(new x(r.id,this.urlSerializer.serialize(r.extractedUrl),l,h)),this.events.next(new ve(u.redirectTo,u.navigationBehaviorOptions))}else throw this.events.next(c),a}catch(u){this.options.resolveNavigationPromiseOnError?r.resolve(!1):r.reject(u)}}return U}))}))}cancelNavigationTransition(e,r,i){let o=new x(e.id,this.urlSerializer.serialize(e.extractedUrl),r,i);this.events.next(o),e.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){let e=this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))),r=C(this.currentNavigation),i=r?.targetBrowserUrl??r?.extractedUrl;return e.toString()!==i?.toString()&&!r?.extras.skipLocationChange}static \u0275fac=function(r){return new(r||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Ms(t){return t!==je}var Ni=new M("");var Pi=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=y({token:t,factory:()=>f(Is),providedIn:"root"})}return t})(),kt=class{shouldDetach(n){return!1}store(n,e){}shouldAttach(n){return!1}retrieve(n){return null}shouldReuseRoute(n,e){return n.routeConfig===e.routeConfig}shouldDestroyInjector(n){return!0}},Is=(()=>{class t extends kt{static \u0275fac=(()=>{let e;return function(i){return(e||(e=Zt(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Ft=(()=>{class t{urlSerializer=f(Se);options=f(Ee,{optional:!0})||{};canceledNavigationResolution=this.options.canceledNavigationResolution||"replace";location=f(ut);urlHandlingStrategy=f(zt);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";currentUrlTree=new D;getCurrentUrlTree(){return this.currentUrlTree}rawUrlTree=this.currentUrlTree;getRawUrlTree(){return this.rawUrlTree}createBrowserPath({finalUrl:e,initialUrl:r,targetBrowserUrl:i}){let o=e!==void 0?this.urlHandlingStrategy.merge(e,r):r,s=i??o;return s instanceof D?this.urlSerializer.serialize(s):s}routerUrlState(e){return e?.targetBrowserUrl===void 0||e?.finalUrl===void 0?{}:{\u0275routerUrl:this.urlSerializer.serialize(e.finalUrl)}}commitTransition({targetRouterState:e,finalUrl:r,initialUrl:i}){r&&e?(this.currentUrlTree=r,this.rawUrlTree=this.urlHandlingStrategy.merge(r,i),this.routerState=e):this.rawUrlTree=i}routerState=ui(null,f(K));getRouterState(){return this.routerState}_stateMemento=this.createStateMemento();get stateMemento(){return this._stateMemento}updateStateMemento(){this._stateMemento=this.createStateMemento()}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}restoredState(){return this.location.getState()}static \u0275fac=function(r){return new(r||t)};static \u0275prov=y({token:t,factory:()=>f(Ts),providedIn:"root"})}return t})(),Ts=(()=>{class t extends Ft{currentPageId=0;lastSuccessfulId=-1;get browserPageId(){return this.canceledNavigationResolution!=="computed"?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}registerNonRouterCurrentEntryChangeListener(e){return this.location.subscribe(r=>{r.type==="popstate"&&setTimeout(()=>{e(r.url,r.state,"popstate",{replaceUrl:!0})})})}handleRouterEvent(e,r){e instanceof ae?this.updateStateMemento():e instanceof W?this.commitTransition(r):e instanceof Fe?this.urlUpdateStrategy==="eager"&&(r.extras.skipLocationChange||this.setBrowserUrl(this.createBrowserPath(r),r)):e instanceof ge?(this.commitTransition(r),this.urlUpdateStrategy==="deferred"&&!r.extras.skipLocationChange&&this.setBrowserUrl(this.createBrowserPath(r),r)):e instanceof x&&!ci(e)?this.restoreHistory(r):e instanceof ce?this.restoreHistory(r,!0):e instanceof H&&(this.lastSuccessfulId=e.id,this.currentPageId=this.browserPageId)}setBrowserUrl(e,r){let{extras:i,id:o}=r,{replaceUrl:s,state:a}=i;if(this.location.isCurrentPathEqualTo(e)||s){let c=this.browserPageId,u=d(d({},a),this.generateNgRouterState(o,c,r));this.location.replaceState(e,"",u)}else{let c=d(d({},a),this.generateNgRouterState(o,this.browserPageId+1,r));this.location.go(e,"",c)}}restoreHistory(e,r=!1){if(this.canceledNavigationResolution==="computed"){let i=this.browserPageId,o=this.currentPageId-i;o!==0?this.location.historyGo(o):this.getCurrentUrlTree()===e.finalUrl&&o===0&&(this.resetInternalState(e),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(r&&this.resetInternalState(e),this.resetUrlToCurrentUrlTree())}resetInternalState({finalUrl:e}){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,e??this.rawUrlTree)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.getRawUrlTree()),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(e,r,i){return this.canceledNavigationResolution==="computed"?d({navigationId:e,\u0275routerPageId:r},this.routerUrlState(i)):d({navigationId:e},this.routerUrlState(i))}static \u0275fac=(()=>{let e;return function(i){return(e||(e=Zt(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function jr(t,n){t.events.pipe(ne(e=>e instanceof H||e instanceof x||e instanceof ce||e instanceof W),T(e=>e instanceof H||e instanceof W?0:(e instanceof x?e.code===I.Redirect||e.code===I.SupersededByNewNavigation:!1)?2:1),ne(e=>e!==2),de(1)).subscribe(()=>{n()})}var le=(()=>{class t{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}disposed=!1;nonRouterCurrentEntryChangeSubscription;console=f(un);stateManager=f(Ft);options=f(Ee,{optional:!0})||{};pendingTasks=f(Zr);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";navigationTransitions=f(Oi);urlSerializer=f(Se);location=f(ut);urlHandlingStrategy=f(zt);injector=f(K);_events=new re;get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}navigated=!1;routeReuseStrategy=f(Pi);injectorCleanup=f(Ni,{optional:!0});onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore";config=f(Ke,{optional:!0})?.flat()??[];componentInputBindingEnabled=!!f(Ht,{optional:!0});currentNavigation=this.navigationTransitions.currentNavigation.asReadonly();constructor(){this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this).subscribe({error:e=>{}}),this.subscribeToNavigationEvents()}eventsSubscription=new kr;subscribeToNavigationEvents(){let e=this.navigationTransitions.events.subscribe(r=>{try{let i=this.navigationTransitions.currentTransition,o=C(this.navigationTransitions.currentNavigation);if(i!==null&&o!==null){if(this.stateManager.handleRouterEvent(r,o),r instanceof x&&r.code!==I.Redirect&&r.code!==I.SupersededByNewNavigation)this.navigated=!0;else if(r instanceof H)this.navigated=!0,this.injectorCleanup?.(this.routeReuseStrategy,this.routerState,this.config);else if(r instanceof ve){let s=r.navigationBehaviorOptions,a=this.urlHandlingStrategy.merge(r.url,i.currentRawUrl),c=d({scroll:i.extras.scroll,browserUrl:i.extras.browserUrl,info:i.extras.info,skipLocationChange:i.extras.skipLocationChange,replaceUrl:i.extras.replaceUrl||this.urlUpdateStrategy==="eager"||Ms(i.source)},s);this.scheduleNavigation(a,je,null,c,{resolve:i.resolve,reject:i.reject,promise:i.promise})}}To(r)&&this._events.next(r)}catch(i){this.navigationTransitions.transitionAbortWithErrorSubject.next(i)}});this.eventsSubscription.add(e)}resetRootComponentType(e){this.routerState.root.component=e,this.navigationTransitions.rootComponentType=e}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),je,this.stateManager.restoredState(),{replaceUrl:!0})}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((e,r,i,o)=>{this.navigateToSyncWithBrowser(e,i,r,o)})}navigateToSyncWithBrowser(e,r,i,o){let s=i?.navigationId?i:null,a=i?.\u0275routerUrl??e;if(i?.\u0275routerUrl&&(o=_(d({},o),{browserUrl:e})),i){let u=d({},i);delete u.navigationId,delete u.\u0275routerPageId,delete u.\u0275routerUrl,Object.keys(u).length!==0&&(o.state=u)}let c=this.parseUrl(a);this.scheduleNavigation(c,r,s,o).catch(u=>{this.disposed||this.injector.get(nt)(u)})}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return C(this.navigationTransitions.currentNavigation)}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(e){this.config=e.map(Lr),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this._events.unsubscribe(),this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription?.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0,this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(e,r={}){let{relativeTo:i,queryParams:o,fragment:s,queryParamsHandling:a,preserveFragment:c}=r,u=c?this.currentUrlTree.fragment:s,l=null;switch(a??this.options.defaultQueryParamsHandling){case"merge":l=d(d({},this.currentUrlTree.queryParams),o);break;case"preserve":l=this.currentUrlTree.queryParams;break;default:l=o||null}l!==null&&(l=this.removeEmptyProps(l));let h;try{let m=i?i.snapshot:this.routerState.snapshot.root;h=ii(m)}catch(m){(typeof e[0]!="string"||e[0][0]!=="/")&&(e=[]),h=this.currentUrlTree.root}return oi(h,e,l,u??null,this.urlSerializer)}navigateByUrl(e,r={skipLocationChange:!1}){let i=X(e)?e:this.parseUrl(e),o=this.urlHandlingStrategy.merge(i,this.rawUrlTree);return this.scheduleNavigation(o,je,null,r)}navigate(e,r={skipLocationChange:!1}){return Ds(e),this.navigateByUrl(this.createUrlTree(e,r),r)}serializeUrl(e){return this.urlSerializer.serialize(e)}parseUrl(e){try{return this.urlSerializer.parse(e)}catch(r){return this.console.warn(Wr(4018,!1)),this.urlSerializer.parse("/")}}isActive(e,r){let i;if(r===!0?i=d({},_r):r===!1?i=d({},He):i=d(d({},He),r),X(e))return vr(this.currentUrlTree,e,i);let o=this.parseUrl(e);return vr(this.currentUrlTree,o,i)}removeEmptyProps(e){return Object.entries(e).reduce((r,[i,o])=>(o!=null&&(r[i]=o),r),{})}scheduleNavigation(e,r,i,o,s){if(this.disposed)return Promise.resolve(!1);let a,c,u;s?(a=s.resolve,c=s.reject,u=s.promise):u=new Promise((h,m)=>{a=h,c=m});let l=this.pendingTasks.add();return jr(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(l))}),this.navigationTransitions.handleNavigationRequest({source:r,restoredState:i,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:e,extras:o,resolve:a,reject:c,promise:u,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),u.catch(Promise.reject.bind(Promise))}static \u0275fac=function(r){return new(r||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Ds(t){for(let n=0;n<t.length;n++)if(t[n]==null)throw new w(4008,!1)}var As=(()=>{class t{router=f(le);stateManager=f(Ft);fragment=E("");queryParams=E({});path=E("");serializer=f(Se);constructor(){this.updateState(),this.router.events?.subscribe(e=>{e instanceof H&&this.updateState()})}updateState(){let{fragment:e,root:r,queryParams:i}=this.stateManager.getCurrentUrlTree();this.fragment.set(e),this.queryParams.set(i),this.path.set(this.serializer.serialize(new D(r)))}static \u0275fac=function(r){return new(r||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Bt=(()=>{class t{router;route;tabIndexAttribute;renderer;el;locationStrategy;hrefAttributeValue=f(new wn("href"),{optional:!0});reactiveHref=Sn(()=>this.isAnchorElement?this.computeHref(this._urlTree()):this.hrefAttributeValue);get href(){return C(this.reactiveHref)}set href(e){this.reactiveHref.set(e)}set target(e){this._target.set(e)}get target(){return C(this._target)}_target=E(void 0);set queryParams(e){this._queryParams.set(e)}get queryParams(){return C(this._queryParams)}_queryParams=E(void 0,{equal:()=>!1});set fragment(e){this._fragment.set(e)}get fragment(){return C(this._fragment)}_fragment=E(void 0);set queryParamsHandling(e){this._queryParamsHandling.set(e)}get queryParamsHandling(){return C(this._queryParamsHandling)}_queryParamsHandling=E(void 0);set state(e){this._state.set(e)}get state(){return C(this._state)}_state=E(void 0,{equal:()=>!1});set info(e){this._info.set(e)}get info(){return C(this._info)}_info=E(void 0,{equal:()=>!1});set relativeTo(e){this._relativeTo.set(e)}get relativeTo(){return C(this._relativeTo)}_relativeTo=E(void 0);set preserveFragment(e){this._preserveFragment.set(e)}get preserveFragment(){return C(this._preserveFragment)}_preserveFragment=E(!1);set skipLocationChange(e){this._skipLocationChange.set(e)}get skipLocationChange(){return C(this._skipLocationChange)}_skipLocationChange=E(!1);set replaceUrl(e){this._replaceUrl.set(e)}get replaceUrl(){return C(this._replaceUrl)}_replaceUrl=E(!1);isAnchorElement;onChanges=new re;applicationErrorHandler=f(nt);options=f(Ee,{optional:!0});reactiveRouterState=f(As);constructor(e,r,i,o,s,a){this.router=e,this.route=r,this.tabIndexAttribute=i,this.renderer=o,this.el=s,this.locationStrategy=a;let c=s.nativeElement.tagName?.toLowerCase();this.isAnchorElement=c==="a"||c==="area"||!!(typeof customElements=="object"&&customElements.get(c)?.observedAttributes?.includes?.("href"))}setTabIndexIfNotOnNativeEl(e){this.tabIndexAttribute!=null||this.isAnchorElement||this.applyAttributeValue("tabindex",e)}ngOnChanges(e){this.onChanges.next(this)}routerLinkInput=E(null);set routerLink(e){e==null?(this.routerLinkInput.set(null),this.setTabIndexIfNotOnNativeEl(null)):(X(e)?this.routerLinkInput.set(e):this.routerLinkInput.set(Array.isArray(e)?e:[e]),this.setTabIndexIfNotOnNativeEl("0"))}onClick(e,r,i,o,s){let a=this._urlTree();if(a===null||this.isAnchorElement&&(e!==0||r||i||o||s||typeof this.target=="string"&&this.target!="_self"))return!0;let c={skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state,info:this.info};return this.router.navigateByUrl(a,c)?.catch(u=>{this.applicationErrorHandler(u)}),!this.isAnchorElement}ngOnDestroy(){}applyAttributeValue(e,r){let i=this.renderer,o=this.el.nativeElement;r!==null?i.setAttribute(o,e,r):i.removeAttribute(o,e)}_urlTree=st(()=>{this.reactiveRouterState.path(),this._preserveFragment()&&this.reactiveRouterState.fragment();let e=i=>i==="preserve"||i==="merge";(e(this._queryParamsHandling())||e(this.options?.defaultQueryParamsHandling))&&this.reactiveRouterState.queryParams();let r=this.routerLinkInput();return r===null||!this.router.createUrlTree?null:X(r)?r:this.router.createUrlTree(r,{relativeTo:this._relativeTo()!==void 0?this._relativeTo():this.route,queryParams:this._queryParams(),fragment:this._fragment(),queryParamsHandling:this._queryParamsHandling(),preserveFragment:this._preserveFragment()})},{equal:(e,r)=>this.computeHref(e)===this.computeHref(r)});get urlTree(){return C(this._urlTree)}computeHref(e){return e!==null&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(e))??"":null}static \u0275fac=function(r){return new(r||t)(F(le),F(Y),Jr("tabindex"),F(tr),F(Jt),F(In))};static \u0275dir=De({type:t,selectors:[["","routerLink",""]],hostVars:2,hostBindings:function(r,i){r&1&&gn("click",function(s){return i.onClick(s.button,s.ctrlKey,s.shiftKey,s.altKey,s.metaKey)}),r&2&&fn("href",i.reactiveHref(),tn)("target",i._target())},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",info:"info",relativeTo:"relativeTo",preserveFragment:[2,"preserveFragment","preserveFragment",ct],skipLocationChange:[2,"skipLocationChange","skipLocationChange",ct],replaceUrl:[2,"replaceUrl","replaceUrl",ct],routerLink:"routerLink"},features:[Ie]})}return t})(),Os=(()=>{class t{router;element;renderer;cdr;links;classes=[];routerEventsSubscription;linkInputChangesSubscription;_isActive=!1;get isActive(){return this._isActive}routerLinkActiveOptions={exact:!1};ariaCurrentWhenActive;isActiveChange=new ie;link=f(Bt,{optional:!0});constructor(e,r,i,o){this.router=e,this.element=r,this.renderer=i,this.cdr=o,this.routerEventsSubscription=e.events.subscribe(s=>{s instanceof H&&this.update()})}ngAfterContentInit(){g(this.links.changes,g(null)).pipe(Gt()).subscribe(e=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){this.linkInputChangesSubscription?.unsubscribe();let e=[...this.links.toArray(),this.link].filter(r=>!!r).map(r=>r.onChanges);this.linkInputChangesSubscription=A(e).pipe(Gt()).subscribe(r=>{this._isActive!==this.isLinkActive(this.router)(r)&&this.update()})}set routerLinkActive(e){let r=Array.isArray(e)?e:e.split(" ");this.classes=r.filter(i=>!!i)}ngOnChanges(e){this.update()}ngOnDestroy(){this.routerEventsSubscription.unsubscribe(),this.linkInputChangesSubscription?.unsubscribe()}update(){!this.links||!this.router.navigated||queueMicrotask(()=>{let e=this.hasActiveLinks();this.classes.forEach(r=>{e?this.renderer.addClass(this.element.nativeElement,r):this.renderer.removeClass(this.element.nativeElement,r)}),e&&this.ariaCurrentWhenActive!==void 0?this.renderer.setAttribute(this.element.nativeElement,"aria-current",this.ariaCurrentWhenActive.toString()):this.renderer.removeAttribute(this.element.nativeElement,"aria-current"),this._isActive!==e&&(this._isActive=e,this.cdr.markForCheck(),this.isActiveChange.emit(e))})}isLinkActive(e){let r=Ns(this.routerLinkActiveOptions)?this.routerLinkActiveOptions:this.routerLinkActiveOptions.exact??!1?d({},_r):d({},He);return i=>{let o=i.urlTree;return o?C(Ar(o,e,r)):!1}}hasActiveLinks(){let e=this.isLinkActive(this.router);return this.link&&e(this.link)||this.links.some(e)}static \u0275fac=function(r){return new(r||t)(F(le),F(Jt),F(tr),F(at))};static \u0275dir=De({type:t,selectors:[["","routerLinkActive",""]],contentQueries:function(r,i,o){if(r&1&&vn(o,Bt,5),r&2){let s;mn(s=yn())&&(i.links=s)}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",ariaCurrentWhenActive:"ariaCurrentWhenActive",routerLinkActive:"routerLinkActive"},outputs:{isActiveChange:"isActiveChange"},exportAs:["routerLinkActive"],features:[Ie]})}return t})();function Ns(t){let n=t;return!!(n.paths||n.matrixParams||n.queryParams||n.fragment)}var Ps=new M("");function Us(t,...n){return Qr([{provide:Ke,multi:!0,useValue:t},[],{provide:Y,useFactory:Ls},{provide:dn,multi:!0,useFactory:xs},n.map(e=>e.\u0275providers)])}function Ls(){return f(le).routerState.root}function xs(){let t=f(Yt);return n=>{let e=t.get(hn);if(n!==e.components[0])return;let r=t.get(le),i=t.get(js);t.get(ks)===1&&r.initialNavigation(),t.get(Hs,null,{optional:!0})?.setUpPreloading(),t.get(Ps,null,{optional:!0})?.init(),r.resetRootComponentType(e.componentTypes[0]),i.closed||(i.next(),i.complete(),i.unsubscribe())}}var js=new M("",{factory:()=>new re}),ks=new M("",{factory:()=>1});var Hs=new M("");export{Gi as a,Y as b,Pr as c,le as d,Bt as e,Os as f,Us as g};
@@ -0,0 +1 @@
1
+ import{b as we,e as Ie}from"./chunk-UN7U5NAR.js";import{a as Se,b as De,e as ke,j as Ne,k as B}from"./chunk-LPQARKUF.js";import{$ as z,$a as ce,Ba as F,Fa as ee,Ib as xe,J as de,Jb as ye,Ka as D,Kb as Ce,La as C,Ma as E,Na as pe,Nb as Ee,O as S,Oa as P,Ob as A,Pa as H,Qa as g,Ra as d,Sa as o,T as M,Ta as k,U as T,Ub as Me,V as G,Xa as R,Ya as h,Za as m,a as oe,aa as ue,ab as me,b as se,bb as ge,ea as le,eb as K,f as ae,gb as l,hb as w,ib as q,jb as j,kb as he,lb as fe,mb as be,oa as Z,qa as a,qb as ve,rb as _e}from"./chunk-WDOCF7IL.js";var X=class i{zone=S(ue);projectService=S(Me);connect(t){return new ae(e=>{let n=this.projectService.currentId,r=n?`?project=${encodeURIComponent(n)}`:"",s=new EventSource(`/api/runs/${t}/events${r}`),_=["node:start","node:complete","node:skip","node:fail","run:complete","run:state","run:pause","run:cancel"];for(let p of _)s.addEventListener(p,u=>{this.zone.run(()=>{e.next({type:p,data:JSON.parse(u.data)})})});return s.onerror=()=>{this.zone.run(()=>{e.complete()}),s.close()},()=>{s.close()}})}static \u0275fac=function(e){return new(e||i)};static \u0275prov=de({token:i,factory:i.\u0275fac,providedIn:"root"})};var qe=new Set(["completed","failed","cancelled"]);function ne(i){return i!==void 0&&qe.has(i)}function Te(i,t=new Date().toISOString()){ne(i.status)&&!i.completedAt&&(i.completedAt=t)}var Be="Approval required",Xe="Run paused \u2014 input required to continue.";function W(i){return`${i.nodeId}\0${i.iteration??""}\0${i.message}`}function Re(i){let t=Oe(i);if(t)return t;let e=i.approval;if(e&&typeof e=="object")return Oe(e)}function Oe(i){let t=V(i.approvalNodeId)??V(i.nodeId);if(!t)return;let e=V(i.approvalMessage)??V(i.message),n=V(i.approvalType)??V(i.type),r=i.iteration;return{nodeId:t,message:e||Be,type:n==="interactive_loop"?"interactive_loop":"approval",iteration:typeof r=="number"?r:void 0}}function V(i){return typeof i=="string"&&i!==""?i:void 0}var Y=class{current;state="hidden";error;answeredKey;pauseReceived(t){this.current=Re(t)??Ge(),this.state="ready",this.error=void 0}runStateChanged(t,e){if(t!=="paused"){this.current=void 0,this.state="hidden",this.error=void 0,this.answeredKey=void 0;return}if(this.state==="submitting")return;let n=e?Re(e):void 0,r=n?W(n):void 0;r!==void 0&&r===this.answeredKey||this.current&&r!==void 0&&r===W(this.current)||this.current&&n===void 0||(this.current=n??Ge(),this.state="ready",this.error=void 0)}submitStarted(){this.state!=="hidden"&&(this.state="submitting",this.error=void 0)}submitFailed(t){this.state!=="hidden"&&(this.state="error",this.error=t)}submitSucceeded(){this.current&&(this.answeredKey=W(this.current)),this.current=void 0,this.state="hidden",this.error=void 0}visible(){return this.state!=="hidden"}phase(){return this.state}request(){return this.current}errorMessage(){return this.error}submitAction(){return this.current?.type==="interactive_loop"?"resume":"approve"}};function Ge(){return{nodeId:"",message:Xe,type:"approval"}}function Fe(i,t,e=new Date().toISOString()){let n=`gate:${W(t)}`;return i.some(r=>r.key===n)?i:[...i,{key:n,role:"gate",text:t.message,at:e,nodeId:t.nodeId,iteration:t.iteration}]}function ie(i,t,e,n=new Date().toISOString()){return[...i,{key:`user:${i.length}:${n}`,role:"user",kind:t,text:Ye(t,e),at:n}]}function Ye(i,t){let e=t.trim();switch(i){case"answer":return e;case"approve":return e?`Approved: ${e}`:"Approved";case"reject":return e?`Rejected: ${e}`:"Rejected"}}function Ae(i){return Ue(i).split(/`([^`]*)`/).map((n,r)=>r%2===1?`<code>${n}</code>`:n.replace(/\*\*([^*]+)\*\*/g,"<strong>$1</strong>")).join("").replace(/\n/g,"<br>")}function Ue(i){return i.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function Ve(i){let t=new Map(i.map(c=>[c.key,c])),e=new Map,n=new Set,r=c=>{let b=e.get(c);if(b!==void 0)return b;if(n.has(c))return 0;n.add(c);let N=(t.get(c)?.dependsOn??[]).filter(y=>t.has(y)),x=N.length===0?0:Math.max(...N.map(r))+1;return n.delete(c),e.set(c,x),x};for(let c of i)r(c.key);let s=new Map;for(let c of i){let b=e.get(c.key);(s.get(b)??s.set(b,[]).get(b)).push(c.key)}let _=196,p=84,u=[...s.keys()].sort((c,b)=>c-b),f=new Map;for(let c of u){let b=s.get(c);if(c===0){b.forEach((x,y)=>f.set(x,y));continue}let N=x=>{let y=(t.get(x)?.dependsOn??[]).filter(L=>f.has(L));return y.length===0?f.get(x)??0:y.reduce((L,ze)=>L+f.get(ze),0)/y.length};b.sort((x,y)=>N(x)-N(y)),b.forEach((x,y)=>f.set(x,y))}let I=Math.max(1,...u.map(c=>s.get(c).length))*_,O=new Map;for(let c of u){let b=s.get(c),N=b.length*_,x=(I-N)/2;b.forEach((y,L)=>O.set(y,{x:x+L*_,y:c*p}))}let We=((u.length?u[u.length-1]:0)+1)*p;return{positions:O,layerOf:e,width:I,height:We}}var Je=["host"];function Ze(i,t){if(i&1&&(G(),k(0,"path",9)),i&2){let e=t.$implicit;D("d",e)}}function et(i,t){if(i&1&&(G(),d(0,"text",16),l(1),o()),i&2){let e=m().$implicit,n=m();D("x",n.NODE_W-12)("y",n.NODE_H/2+5),a(),j("",e.progress.done,"/",e.progress.total)}}function tt(i,t){if(i&1&&(G(),d(0,"text",17),l(1,"\u29C9"),o()),i&2){let e=m(2);D("x",e.NODE_W-12)("y",14)}}function nt(i,t){if(i&1){let e=R();G(),d(0,"g",10),h("click",function(){let r=M(e).$implicit,s=m();return T(s.nodeClick.emit(r.key))}),k(1,"rect",11),d(2,"text",12),l(3),o(),d(4,"text",13),l(5),o(),ee(6,et,2,4,"text",14)(7,tt,2,2,"text",15),o()}if(i&2){let e=t.$implicit,n=m();D("transform","translate("+e.x+","+e.y+")"),a(),K("dag-pulse",e.status==="running"),D("width",n.NODE_W)("height",n.NODE_H)("fill",n.fillFor(e.status))("stroke",n.strokeFor(e.status)),a(),D("y",n.NODE_H/2+5)("fill",n.strokeFor(e.status)),a(),w(n.icon(e.status)),a(),D("y",n.NODE_H/2+5),a(),w(n.clip(e.label)),a(),g("ngIf",e.progress),a(),g("ngIf",e.isGroup)}}var $=class i{NODE_W=168;NODE_H=44;nodes=[];edges=[];width=0;height=0;nodeClick=new z;hostRef;scale=1;panX=16;panY=40;dragging=!1;lastX=0;lastY=0;get edgePaths(){let t=new Map(this.nodes.map(n=>[n.key,n])),e=[];for(let n of this.edges){let r=t.get(n.from),s=t.get(n.to);if(!r||!s)continue;let _=r.x+168/2,p=r.y+44,u=s.x+168/2,f=s.y,v=(p+f)/2;e.push(`M${_} ${p} C${_} ${v}, ${u} ${v}, ${u} ${f}`)}return e}onWheel(t){t.preventDefault(),this.zoomBy(t.deltaY<0?1.1:.9)}zoomBy(t,e){e?.stopPropagation(),this.scale=Math.min(2.5,Math.max(.2,this.scale*t))}onDown(t){this.dragging=!0,this.lastX=t.clientX,this.lastY=t.clientY}onMove(t){this.dragging&&(this.panX+=t.clientX-this.lastX,this.panY+=t.clientY-this.lastY,this.lastX=t.clientX,this.lastY=t.clientY)}onUp(){this.dragging=!1}fit(){if(!this.width||!this.height){this.scale=1,this.panX=16,this.panY=40;return}let t=this.hostRef?.nativeElement,e=t?.clientWidth??600,n=t?.clientHeight??400;this.scale=Math.min(2,Math.max(.2,Math.min((e-32)/this.width,(n-48)/this.height))),this.panX=Math.max(16,(e-this.width*this.scale)/2),this.panY=44}clip(t){return t.length>20?t.slice(0,19)+"\u2026":t}icon(t){return{completed:"\u2713",running:"\u25CF",failed:"\u2717",skipped:"\u2298"}[t]??"\u25CB"}fillFor(t){return{completed:"rgba(34,197,94,.14)",running:"rgba(59,130,246,.16)",failed:"rgba(239,68,68,.14)"}[t]??"rgba(30,41,59,.9)"}strokeFor(t){return{completed:"#22c55e",running:"#3b82f6",failed:"#ef4444",skipped:"#64748b"}[t]??"#475569"}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=F({type:i,selectors:[["app-dag-graph"]],viewQuery:function(e,n){if(e&1&&ce(Je,5),e&2){let r;me(r=ge())&&(n.hostRef=r.first)}},inputs:{nodes:"nodes",edges:"edges",width:"width",height:"height"},outputs:{nodeClick:"nodeClick"},decls:16,vars:7,consts:[["host",""],[1,"relative","w-full","h-full","overflow-hidden","select-none","bg-slate-950/40",3,"wheel","mousedown","mousemove","mouseup","mouseleave"],[1,"absolute","top-2","left-2","z-10","flex","gap-1","items-center"],["type","button",1,"dag-btn",3,"click"],[1,"text-xs","text-slate-400","w-10","text-center","font-mono"],["type","button",1,"dag-btn","px-2","w-auto",3,"click"],[1,"absolute","inset-0","w-full","h-full"],["fill","none","stroke","#475569","stroke-width","2","opacity","0.8",4,"ngFor","ngForOf"],["class","cursor-pointer",3,"click",4,"ngFor","ngForOf"],["fill","none","stroke","#475569","stroke-width","2","opacity","0.8"],[1,"cursor-pointer",3,"click"],["rx","9","stroke-width","2"],["x","16","font-size","15"],["x","34","font-size","13","fill","#e2e8f0"],["text-anchor","end","font-size","10","fill","#94a3b8",4,"ngIf"],["text-anchor","end","font-size","11","fill","#94a3b8",4,"ngIf"],["text-anchor","end","font-size","10","fill","#94a3b8"],["text-anchor","end","font-size","11","fill","#94a3b8"]],template:function(e,n){e&1&&(d(0,"div",1,0),h("wheel",function(s){return n.onWheel(s)})("mousedown",function(s){return n.onDown(s)})("mousemove",function(s){return n.onMove(s)})("mouseup",function(){return n.onUp()})("mouseleave",function(){return n.onUp()}),d(2,"div",2)(3,"button",3),h("click",function(s){return n.zoomBy(.8,s)}),l(4,"\u2212"),o(),d(5,"span",4),l(6),ve(7,"number"),o(),d(8,"button",3),h("click",function(s){return n.zoomBy(1.25,s)}),l(9,"+"),o(),d(10,"button",5),h("click",function(){return n.fit()}),l(11,"fit"),o()(),G(),d(12,"svg",6)(13,"g"),ee(14,Ze,1,1,"path",7)(15,nt,8,14,"g",8),o()()()),e&2&&(a(6),q("",_e(7,4,n.scale*100,"1.0-0"),"%"),a(7),D("transform","translate("+n.panX+","+n.panY+") scale("+n.scale+")"),a(),g("ngForOf",n.edgePaths),a(),g("ngForOf",n.nodes))},dependencies:[A,ye,Ce,Ee],styles:[".dag-btn[_ngcontent-%COMP%]{width:24px;height:24px;border:1px solid #334155;border-radius:6px;background:#1e293b;color:#94a3b8;font-size:13px;line-height:1}.dag-btn[_ngcontent-%COMP%]:hover{color:#e2e8f0}.dag-pulse[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_dagpulse 1.3s ease-in-out infinite}@keyframes _ngcontent-%COMP%_dagpulse{0%,to{opacity:1}50%{opacity:.45}}"]})};function U(i,t=""){let e=t===""?"":t+".",n=i.filter(u=>t===""||u.id===t||u.id.startsWith(e)),r=new Map(i.map(u=>[u.id,u])),s=new Map;for(let u of n){let f=t===""?u.id:u.id.slice(e.length),v=f.split(".")[0];if(!v)continue;let I=s.get(v);I||(I={key:e+v,label:v,leafIds:[],deeper:!1},s.set(v,I)),I.leafIds.push(u.id),f.includes(".")&&(I.deeper=!0)}let _=u=>{if(t!==""&&u!==t&&!u.startsWith(e))return;let v=(t===""?u:u.slice(e.length)).split(".")[0];return s.has(v)?e+v:void 0},p=[];for(let u of s.values()){let f=new Set;for(let v of u.leafIds)for(let I of r.get(v)?.dependsOn??[]){let O=_(I);O&&O!==u.key&&f.add(O)}p.push({key:u.key,label:u.label,isGroup:u.deeper,leafIds:u.leafIds,dependsOn:[...f]})}return p}var Pe=new Set(["completed","skipped"]);function He(i,t){let e=i.map(t);return e.some(n=>n==="failed")?"failed":e.some(n=>n==="running")?"running":e.length>0&&e.every(n=>n==="skipped")?"skipped":e.length>0&&e.every(n=>Pe.has(n))?"completed":e.some(n=>n==="completed")?"running":"pending"}function Ke(i,t){let e=i.map(t);return{done:e.filter(n=>Pe.has(n)).length,total:e.length}}function Q(i,t,e=""){let n=U(i,e),r=Ve(n.map(p=>({key:p.key,dependsOn:p.dependsOn}))),s=n.map(p=>{let u=r.positions.get(p.key)??{x:0,y:0};return{key:p.key,label:p.label,isGroup:p.isGroup,status:p.isGroup?He(p.leafIds,t):t(p.leafIds[0]),progress:p.isGroup?Ke(p.leafIds,t):void 0,x:u.x,y:u.y}}),_=[];for(let p of n)for(let u of p.dependsOn)_.push({from:u,to:p.key});return{vms:s,edges:_,width:r.width,height:r.height}}function it(i,t){i&1&&(d(0,"span"),l(1," \u203A "),o())}function rt(i,t){if(i&1){let e=R();d(0,"button",10),h("click",function(){let r=M(e).$implicit,s=m();return T(s.goTo(r))}),l(1),o(),C(2,it,2,0,"span")}if(i&2){let e=t.$implicit,n=t.$index,r=t.$count,s=m();a(),w(s.label(e)),a(),E(n!==r-1?2:-1)}}function ot(i,t){i&1&&(d(0,"div",11),l(1,"\u0110ang t\u1EA3i output\u2026"),o())}function st(i,t){if(i&1&&(d(0,"div",12),l(1),o()),i&2){let e=m(2);a(),w(e.leafError)}}function at(i,t){if(i&1&&(d(0,"pre",13),l(1),o()),i&2){let e=m(3);a(),w(e.leafData==null?null:e.leafData.error)}}function dt(i,t){if(i&1&&(d(0,"pre",14),l(1),o()),i&2){let e=m(3);a(),w(e.leafData==null?null:e.leafData.output)}}function ut(i,t){i&1&&(d(0,"div",15),l(1,"Kh\xF4ng c\xF3 output"),o())}function lt(i,t){if(i&1&&(C(0,at,2,1,"pre",13),C(1,dt,2,1,"pre",14)(2,ut,2,0,"div",15)),i&2){let e=m(2);E(e.leafData!=null&&e.leafData.error?0:-1),a(),E(e.leafData!=null&&e.leafData.output?1:e.leafData!=null&&e.leafData.error?-1:2)}}function pt(i,t){if(i&1&&(d(0,"div",8),C(1,ot,2,0,"div",11)(2,st,2,1,"div",12)(3,lt,3,2),o()),i&2){let e,n=m();a(),E((e=n.leafPhase)==="loading"?1:e==="error"?2:e==="loaded"?3:-1)}}function ct(i,t){if(i&1){let e=R();d(0,"app-dag-graph",16),h("nodeClick",function(r){M(e);let s=m();return T(s.onSubClick(r))}),o()}if(i&2){let e=m();g("nodes",e.subNodes)("edges",e.subEdges)("width",e.subWidth)("height",e.subHeight)}}var J=class i{api=S(B);runId="";nodes=[];statusOf=()=>"pending";rootKey="";close=new z;breadcrumb=[];isLeaf=!1;subNodes=[];subEdges=[];subWidth=0;subHeight=0;leafPhase="loading";leafData;leafError="";ngOnChanges(t){if(t.rootKey){this.breadcrumb=[],this.goTo(this.rootKey);return}(t.nodes||t.statusOf)&&!this.isLeaf&&this.breadcrumb.length&&this.buildSubView(this.breadcrumb[this.breadcrumb.length-1])}goTo(t){let e=this.breadcrumb.indexOf(t);this.breadcrumb=e>=0?this.breadcrumb.slice(0,e+1):[...this.breadcrumb,t];let n=U(this.nodes,t);if(this.isLeaf=n.length===0,this.isLeaf){this.loadLeaf(t);return}this.buildSubView(t)}buildSubView(t){let e=Q(this.nodes,this.statusOf,t);this.subNodes=e.vms,this.subEdges=e.edges,this.subWidth=e.width,this.subHeight=e.height}onSubClick(t){this.goTo(t)}loadLeaf(t){this.leafPhase="loading",this.api.getNodeOutput(this.runId,t).subscribe({next:e=>{this.leafData={output:e.output,error:e.error},this.leafPhase="loaded"},error:e=>{this.leafError=e?.error?.error??"Kh\xF4ng t\u1EA3i \u0111\u01B0\u1EE3c output.",this.leafPhase="error"}})}label(t){return t.split(".").pop()??t}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=F({type:i,selectors:[["app-node-inspector"]],inputs:{runId:"runId",nodes:"nodes",statusOf:"statusOf",rootKey:"rootKey"},outputs:{close:"close"},features:[le],decls:13,vars:1,consts:[[1,"absolute","inset-0","z-20","flex"],[1,"absolute","inset-0","bg-black/40",3,"click"],[1,"relative","m-3","flex-1","max-w-[78%]","bg-slate-900","border","border-slate-700","rounded-xl","shadow-2xl","flex","flex-col","overflow-hidden"],[1,"flex","items-center","gap-2","px-4","py-2.5","border-b","border-slate-800","text-sm"],[1,"text-slate-500"],[1,"flex-1"],["type","button",1,"text-slate-400","hover:text-slate-100",3,"click"],[1,"flex-1","min-h-0","relative"],[1,"absolute","inset-0","overflow-auto","p-4","text-xs"],[3,"nodes","edges","width","height"],["type","button",1,"hover:text-slate-200",3,"click"],[1,"text-slate-500","animate-pulse"],[1,"text-red-400"],[1,"font-mono","text-red-300","bg-red-500/10","border","border-red-500/30","rounded","p-3","mb-2","whitespace-pre-wrap","break-words"],[1,"font-mono","text-slate-300","bg-slate-950","border","border-slate-800","rounded","p-3","whitespace-pre-wrap","break-words"],[1,"text-slate-500","italic"],[3,"nodeClick","nodes","edges","width","height"]],template:function(e,n){e&1&&(d(0,"div",0)(1,"div",1),h("click",function(){return n.close.emit()}),o(),d(2,"div",2)(3,"div",3)(4,"span",4),P(5,rt,3,2,null,null,pe),o(),k(7,"span",5),d(8,"button",6),h("click",function(){return n.close.emit()}),l(9,"\u2715"),o()(),d(10,"div",7),C(11,pt,4,1,"div",8)(12,ct,1,4,"app-dag-graph",9),o()()()),e&2&&(a(5),H(n.breadcrumb),a(6),E(n.isLeaf?11:12))},dependencies:[A,$],encapsulation:2})};var mt=(i,t)=>t.id,gt=(i,t)=>t.key;function ht(i,t){if(i&1&&(d(0,"span",6),l(1),o()),i&2){let e=m();g("ngClass",e.statusClass(e.run.status)),a(),j(" ",e.statusIcon(e.run.status)," ",e.run.status," ")}}function ft(i,t){i&1&&(d(0,"div",10),l(1,"Kh\xF4ng d\u1EF1ng \u0111\u01B0\u1EE3c s\u01A1 \u0111\u1ED3 ph\u1EE5 thu\u1ED9c \u2014 hi\u1EC3n th\u1ECB theo th\u1EE9 t\u1EF1 ch\u1EA1y."),o())}function bt(i,t){if(i&1){let e=R();d(0,"app-node-inspector",23),h("close",function(){M(e);let r=m();return T(r.closeInspector())}),o()}if(i&2){let e=m();g("runId",e.run.runId)("nodes",e.dagInputNodes)("statusOf",e.statusOf)("rootKey",e.inspectorKey)}}function vt(i,t){if(i&1&&(d(0,"div",24)(1,"div",25),k(2,"div",26),o()()),i&2){let e=t.$implicit,n=m();K("justify-end",e.role==="user"),a(),g("ngClass",e.role==="user"?"bg-indigo-500/15 text-indigo-100":"bg-slate-800 text-slate-200"),a(),g("innerHTML",n.render(e.content),Z)}}function _t(i,t){i&1&&(d(0,"div",16),l(1,"\u2014 phi\xEAn hi\u1EC7n t\u1EA1i \u2014"),o())}function xt(i,t){if(i&1&&(d(0,"div",27),l(1),o()),i&2){let e=m().$implicit;a(),j(" \u23F8 ",e.nodeId||"gate","",e.iteration!==void 0?" \xB7 iteration "+e.iteration:""," ")}}function yt(i,t){if(i&1&&(d(0,"div",24)(1,"div",25),C(2,xt,2,2,"div",27),k(3,"div",26),o()()),i&2){let e=t.$implicit,n=m();K("justify-end",e.role==="user"),a(),g("ngClass",e.role==="user"?"bg-indigo-500/15 text-indigo-100":"bg-slate-800 text-slate-200"),a(),E(e.role==="gate"?2:-1),a(),g("innerHTML",n.render(e.text),Z)}}function Ct(i,t){if(i&1&&(d(0,"div",19),l(1),o()),i&2){let e=m();a(),w(e.gate.errorMessage())}}var je=class i{route=S(we);api=S(B);sse=S(X);run;gate=new Y;feed=[];messages=[];draft="";runId="";sseSub;timerInterval;focusAnswerOnShow=!1;dagNodes=[];dagEdges=[];dagWidth=0;dagHeight=0;dagInputNodes=[];statusMap=new Map;ngOnInit(){this.runId=this.route.snapshot.paramMap.get("runId"),this.focusAnswerOnShow=this.route.snapshot.fragment==="answer",this.api.getRun(this.runId).subscribe(t=>{this.run=t,t.conversationId&&this.api.getConversationMessages(t.conversationId).subscribe({next:e=>{this.messages=e.messages},error:()=>{this.messages=[]}}),this.rebuildDag(),this.stopTimerIfFinished(),this.syncGateFromRun()}),this.sseSub=this.sse.connect(this.runId).subscribe(t=>{this.handleSseEvent(t)}),this.timerInterval=setInterval(()=>{},1e3)}ngOnDestroy(){this.sseSub?.unsubscribe(),this.timerInterval&&clearInterval(this.timerInterval)}inspectorKey=null;onNodeClick(t){this.inspectorKey=t}closeInspector(){this.inspectorKey=null}hierInput(){let t=this.run?.graph?.nodes;if(t&&t.length)return t.map(n=>({id:n.id,dependsOn:n.dependsOn}));let e=this.run?Object.keys(this.run.nodes):[];return e.map((n,r)=>({id:n,dependsOn:r===0?[]:[e[r-1]]}))}statusOf=t=>this.statusMap.get(t)??"pending";syncStatusMap(){if(this.run)for(let[t,e]of Object.entries(this.run.nodes))this.statusMap.has(t)||this.statusMap.set(t,e.status)}rebuildDag(){if(!this.run)return;this.syncStatusMap(),this.dagInputNodes=this.hierInput();let t=Q(this.dagInputNodes,this.statusOf,"");this.dagNodes=t.vms,this.dagEdges=t.edges,this.dagWidth=t.width,this.dagHeight=t.height}handleSseEvent(t){let e=t.data,n=e.nodeId;switch(t.type){case"run:state":{let r=e;this.run=se(oe({},r),{graph:r.graph??this.run?.graph,conversationId:r.conversationId??this.run?.conversationId}),this.rebuildDag(),this.stopTimerIfFinished(),this.syncGateFromRun();break}case"run:pause":this.run&&(this.run.status="paused"),this.gate.pauseReceived(e),this.noteGateInFeed(),this.maybeFocusAnswer();break;case"run:cancel":this.run&&(this.run.status="cancelled"),this.gate.runStateChanged("cancelled"),this.stopTimerIfFinished();break;case"node:start":this.updateNodeStatus(n,"running",void 0,{provider:e.provider,model:e.model});break;case"node:complete":this.updateNodeStatus(n,"completed",e.durationMs);break;case"node:skip":this.updateNodeStatus(n,"skipped");break;case"node:fail":this.updateNodeStatus(n,"failed");break;case"run:complete":this.run&&(this.run.status=e.success?"completed":"failed",this.gate.runStateChanged(this.run.status)),this.stopTimerIfFinished();break}}updateNodeStatus(t,e,n,r){this.statusMap.set(t,e),this.rebuildDag()}syncGateFromRun(){this.run&&(this.gate.runStateChanged(this.run.status,this.run),this.noteGateInFeed(),this.maybeFocusAnswer())}noteGateInFeed(){let t=this.gate.request();this.gate.visible()&&t&&(this.feed=Fe(this.feed,t))}sendAnswer(){if(!this.gate.visible()||this.gate.phase()==="submitting")return;let t=this.draft.trim(),e=this.gate.submitAction();if(e==="resume"&&!t)return;this.gate.submitStarted(),(e==="resume"?this.api.resumeRun(this.runId,t):this.api.approveRun(this.runId,t||void 0)).subscribe({next:()=>{this.feed=ie(this.feed,e==="resume"?"answer":"approve",t),this.draft="",this.gate.submitSucceeded()},error:r=>this.gate.submitFailed(r?.error?.error??"Failed to send the answer.")})}rejectGate(){if(!this.gate.visible()||this.gate.phase()==="submitting")return;let t=prompt("Rejection reason","Rejected by operator");t!==null&&(this.gate.submitStarted(),this.api.rejectRun(this.runId,t||void 0).subscribe({next:()=>{this.feed=ie(this.feed,"reject",t),this.gate.submitSucceeded()},error:e=>this.gate.submitFailed(e?.error?.error??"Failed to reject the run.")}))}render(t){return Ae(t)}maybeFocusAnswer(){!this.focusAnswerOnShow||!this.gate.visible()||(this.focusAnswerOnShow=!1,setTimeout(()=>{document.getElementById("gate-answer-panel")?.scrollIntoView({behavior:"smooth",block:"center"}),document.getElementById("gate-answer-input")?.focus()}))}stopTimerIfFinished(){!this.run||!ne(this.run.status)||(Te(this.run),this.timerInterval&&(clearInterval(this.timerInterval),this.timerInterval=void 0))}statusClass(t){switch(t){case"completed":return"bg-green-500/10 text-green-400";case"failed":return"bg-red-500/10 text-red-400";case"running":return"bg-blue-500/10 text-blue-400";default:return"bg-slate-700 text-slate-400"}}statusIcon(t){switch(t){case"completed":return"\u2713";case"failed":return"\u2717";case"running":return"\u25CF";default:return"\u25CB"}}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=F({type:i,selectors:[["app-run-execution"]],decls:35,vars:17,consts:[[1,"flex","flex-col","h-[calc(100vh-6rem)]"],[1,"flex","items-center","mb-3","gap-2","text-sm","shrink-0"],["routerLink","/",1,"text-slate-500","hover:text-slate-300"],[1,"text-slate-600"],[1,"text-slate-300"],[1,"font-mono","text-slate-100"],[1,"text-xs","px-2","py-0.5","rounded","ml-2",3,"ngClass"],[1,"flex-1","flex","min-h-0","gap-3"],[1,"flex-[1.6]","min-w-0","border","border-slate-800","rounded-lg","overflow-hidden","relative"],[3,"nodeClick","nodes","edges","width","height"],[1,"absolute","bottom-2","left-2","text-[10px]","text-slate-500"],[3,"runId","nodes","statusOf","rootKey"],[1,"flex-1","min-w-0","flex","flex-col","border","border-slate-800","rounded-lg","overflow-hidden"],[1,"px-3","py-2","border-b","border-slate-800","text-sm","text-slate-200","shrink-0"],[1,"flex-1","overflow-auto","p-3","space-y-2"],[1,"flex",3,"justify-end"],[1,"text-[10px]","text-slate-600","text-center"],["id","gate-answer-panel",1,"border-t","border-slate-800","p-3","shrink-0","bg-slate-900/40"],["id","gate-answer-input","rows","2",1,"w-full","rounded","border","border-slate-700","bg-slate-950","p-2","text-sm","text-slate-100","focus:border-amber-500","focus:outline-none",3,"ngModelChange","ngModel","disabled","placeholder"],[1,"text-xs","text-red-400","mt-1"],[1,"flex","gap-2","mt-2"],["type","button",1,"rounded","bg-amber-500","px-3","py-1.5","text-sm","font-semibold","text-slate-950","hover:bg-amber-400","disabled:opacity-40","disabled:cursor-not-allowed",3,"click","disabled"],["type","button",1,"rounded","border","border-red-500/50","px-3","py-1.5","text-sm","text-red-300","hover:bg-red-500/10","disabled:opacity-40",3,"click","disabled"],[3,"close","runId","nodes","statusOf","rootKey"],[1,"flex"],[1,"max-w-[90%]","rounded-lg","px-3","py-2","text-sm",3,"ngClass"],[3,"innerHTML"],[1,"text-[10px]","uppercase","tracking-wide","text-amber-400","mb-1"]],template:function(e,n){e&1&&(d(0,"div",0)(1,"div",1)(2,"a",2),l(3,"Dashboard"),o(),d(4,"span",3),l(5,"\u203A"),o(),d(6,"span",4),l(7),o(),d(8,"span",3),l(9,"\u203A"),o(),d(10,"span",5),l(11),o(),C(12,ht,2,3,"span",6),o(),d(13,"div",7)(14,"div",8)(15,"app-dag-graph",9),h("nodeClick",function(s){return n.onNodeClick(s)}),o(),C(16,ft,2,0,"div",10),C(17,bt,1,4,"app-node-inspector",11),o(),d(18,"div",12)(19,"div",13),l(20,"\u{1F4AC} H\u1ED9i tho\u1EA1i"),o(),d(21,"div",14),P(22,vt,3,4,"div",15,mt),C(24,_t,2,0,"div",16),P(25,yt,4,5,"div",15,gt),o(),d(27,"div",17)(28,"textarea",18),be("ngModelChange",function(s){return fe(n.draft,s)||(n.draft=s),s}),o(),C(29,Ct,2,1,"div",19),d(30,"div",20)(31,"button",21),h("click",function(){return n.sendAnswer()}),l(32),o(),d(33,"button",22),h("click",function(){return n.rejectGate()}),l(34," T\u1EEB ch\u1ED1i "),o()()()()()()),e&2&&(a(7),w(n.run==null?null:n.run.workflow),a(4),w(n.run==null?null:n.run.runId),a(),E(n.run?12:-1),a(3),g("nodes",n.dagNodes)("edges",n.dagEdges)("width",n.dagWidth)("height",n.dagHeight),a(),E(!(n.run==null||n.run.graph==null||n.run.graph.nodes==null)&&n.run.graph.nodes.length?-1:16),a(),E(n.inspectorKey?17:-1),a(5),H(n.messages),a(2),E(n.messages.length&&n.feed.length?24:-1),a(),H(n.feed),a(3),he("ngModel",n.draft),g("disabled",n.gate.phase()==="submitting")("placeholder",n.gate.visible()?n.gate.submitAction()==="resume"?"Nh\u1EADp c\xE2u tr\u1EA3 l\u1EDDi\u2026":"Ph\u1EA3n h\u1ED3i (tu\u1EF3 ch\u1ECDn)\u2026":"Ch\u1EC9 tr\u1EA3 l\u1EDDi \u0111\u01B0\u1EE3c khi run \u0111ang t\u1EA1m d\u1EEBng."),a(),E(n.gate.errorMessage()?29:-1),a(2),g("disabled",!n.gate.visible()||n.gate.phase()==="submitting"||n.gate.submitAction()==="resume"&&!n.draft.trim()),a(),q(" ",n.gate.phase()==="submitting"?"\u0110ang g\u1EEDi\u2026":"G\u1EEDi"," "),a(),g("disabled",!n.gate.visible()||n.gate.phase()==="submitting"))},dependencies:[A,xe,Ne,Se,De,ke,Ie,$,J],encapsulation:2})};export{je as RunExecutionComponent};