daimon 0.8.0 → 0.9.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 (77) hide show
  1. package/CHANGELOG.md +83 -0
  2. package/README.md +48 -1
  3. package/dist/cli.js +91 -86
  4. package/dist/dashboard/browser/chunk-3EPFSBJ2.js +2 -0
  5. package/dist/dashboard/browser/{chunk-PJPGLT4T.js → chunk-3ZFFKHPU.js} +1 -1
  6. package/dist/dashboard/browser/{chunk-QSBOKS53.js → chunk-4KVYA2AQ.js} +1 -1
  7. package/dist/dashboard/browser/chunk-55AO3FMG.js +1 -0
  8. package/dist/dashboard/browser/{chunk-V2KNRAE4.js → chunk-66VYPESU.js} +1 -1
  9. package/dist/dashboard/browser/chunk-6MTVWBQQ.js +2 -0
  10. package/dist/dashboard/browser/chunk-6Z4FDREI.js +1 -0
  11. package/dist/dashboard/browser/{chunk-7NPLP3QD.js → chunk-7LKM244H.js} +1 -1
  12. package/dist/dashboard/browser/chunk-ACPSBF55.js +1 -0
  13. package/dist/dashboard/browser/{chunk-OHX55ZU4.js → chunk-AGN2F6JP.js} +1 -1
  14. package/dist/dashboard/browser/chunk-B2DPS6BL.js +1 -0
  15. package/dist/dashboard/browser/{chunk-3WKRVGPT.js → chunk-BBTQXZIS.js} +1 -1
  16. package/dist/dashboard/browser/chunk-CIQNXWDY.js +1 -0
  17. package/dist/dashboard/browser/chunk-EBGPIJ7S.js +1 -0
  18. package/dist/dashboard/browser/{chunk-LBRCWYRN.js → chunk-F3FCHBFQ.js} +1 -1
  19. package/dist/dashboard/browser/chunk-FD3BW2ZN.js +1 -0
  20. package/dist/dashboard/browser/chunk-FRKUCFVI.js +1 -0
  21. package/dist/dashboard/browser/chunk-FZLMX6EY.js +1 -0
  22. package/dist/dashboard/browser/chunk-GMEW64AS.js +1 -0
  23. package/dist/dashboard/browser/chunk-HXX2OUOE.js +1 -0
  24. package/dist/dashboard/browser/chunk-HZNVO3JE.js +1 -0
  25. package/dist/dashboard/browser/chunk-JWXROQJJ.js +2 -0
  26. package/dist/dashboard/browser/chunk-K2SFF47Z.js +5 -0
  27. package/dist/dashboard/browser/chunk-K5WKBG55.js +1 -0
  28. package/dist/dashboard/browser/chunk-K6PUQAFE.js +2 -0
  29. package/dist/dashboard/browser/{chunk-NDSAQ2HK.js → chunk-KRC72WWY.js} +1 -1
  30. package/dist/dashboard/browser/{chunk-H3L4MTG4.js → chunk-LBWOIG7N.js} +1 -1
  31. package/dist/dashboard/browser/chunk-NVL5HFLU.js +1 -0
  32. package/dist/dashboard/browser/chunk-O76B43BY.js +4 -0
  33. package/dist/dashboard/browser/{chunk-EIWOTZT3.js → chunk-PRLUGTKR.js} +1 -1
  34. package/dist/dashboard/browser/chunk-QYIYT4YU.js +1 -0
  35. package/dist/dashboard/browser/{chunk-UC3XMN2Y.js → chunk-R7VSXL63.js} +1 -1
  36. package/dist/dashboard/browser/{chunk-7NRE3SNA.js → chunk-RNUJZTKS.js} +1 -1
  37. package/dist/dashboard/browser/{chunk-2BXIFQGQ.js → chunk-RWXAGDGT.js} +1 -1
  38. package/dist/dashboard/browser/chunk-RXOAYCKI.js +2 -0
  39. package/dist/dashboard/browser/chunk-SR4HVFOB.js +2 -0
  40. package/dist/dashboard/browser/chunk-TGSV7ZHM.js +2 -0
  41. package/dist/dashboard/browser/chunk-UC7AWK4C.js +2 -0
  42. package/dist/dashboard/browser/chunk-UUJWPV5O.js +3 -0
  43. package/dist/dashboard/browser/chunk-VHALTUPL.js +2 -0
  44. package/dist/dashboard/browser/{chunk-6WZJCF24.js → chunk-VMW35ZNT.js} +1 -1
  45. package/dist/dashboard/browser/{chunk-Q772THBA.js → chunk-WOMCRDMJ.js} +1 -2
  46. package/dist/dashboard/browser/chunk-WRX32YWH.js +1 -0
  47. package/dist/dashboard/browser/chunk-X4RGWMLE.js +4 -0
  48. package/dist/dashboard/browser/{chunk-P5IU57TV.js → chunk-YHBNUNU3.js} +1 -1
  49. package/dist/dashboard/browser/index.html +1 -1
  50. package/dist/dashboard/browser/main-YAROJLJV.js +1 -0
  51. package/dist/main.js +49 -48
  52. package/dist/mcp.js +3 -3
  53. package/package.json +6 -3
  54. package/dist/dashboard/browser/chunk-44JIQO3X.js +0 -1
  55. package/dist/dashboard/browser/chunk-4BAKWDAV.js +0 -1
  56. package/dist/dashboard/browser/chunk-4OCNYL7T.js +0 -1
  57. package/dist/dashboard/browser/chunk-7C772RJ3.js +0 -3
  58. package/dist/dashboard/browser/chunk-A4BNXJUT.js +0 -1
  59. package/dist/dashboard/browser/chunk-CILFSVSP.js +0 -2
  60. package/dist/dashboard/browser/chunk-CM4RQF3A.js +0 -5
  61. package/dist/dashboard/browser/chunk-CNSXWFDX.js +0 -1
  62. package/dist/dashboard/browser/chunk-CY5YRTQK.js +0 -1
  63. package/dist/dashboard/browser/chunk-GYWEXV2L.js +0 -3
  64. package/dist/dashboard/browser/chunk-H2N3RBHF.js +0 -1
  65. package/dist/dashboard/browser/chunk-I65I7J5Q.js +0 -2
  66. package/dist/dashboard/browser/chunk-K43KW4K2.js +0 -4
  67. package/dist/dashboard/browser/chunk-K7S4ITPJ.js +0 -2
  68. package/dist/dashboard/browser/chunk-KL6X73FV.js +0 -1
  69. package/dist/dashboard/browser/chunk-KLH6B22T.js +0 -1
  70. package/dist/dashboard/browser/chunk-LBL7Z5BE.js +0 -5
  71. package/dist/dashboard/browser/chunk-LHAMBNO6.js +0 -1
  72. package/dist/dashboard/browser/chunk-NX6DTO32.js +0 -1
  73. package/dist/dashboard/browser/chunk-P5IE6DI6.js +0 -2
  74. package/dist/dashboard/browser/chunk-VM2FOT77.js +0 -1
  75. package/dist/dashboard/browser/chunk-Y6B6X4Y6.js +0 -2
  76. package/dist/dashboard/browser/chunk-YYAZGY5M.js +0 -1
  77. package/dist/dashboard/browser/main-4CQTBXSB.js +0 -1
@@ -1 +1 @@
1
- import{f as Br}from"./chunk-LBL7Z5BE.js";import{d as qr,e as Xe}from"./chunk-Y6B6X4Y6.js";import{$ as C,$b as Lr,Aa as Pt,Ba as br,Bc as zr,C as G,Ca as _t,Db as Ur,E as J,Ec as Ze,F as se,H as Dt,Hc as Je,I as ae,K as We,L as W,Lc as Fr,M as Nt,N as pr,Nb as Pr,P as gr,T as vr,U as b,Ub as _r,V as Ut,X as y,Xa as Ir,Y as S,Z as mr,Zb as xr,a as l,ac as jr,b as U,ba as Rr,ca as D,d as ur,da as Qe,db as X,e as cr,ea as f,f as lr,fa as yr,g as Et,h as Ot,ha as ue,i as z,ia as P,ib as xt,j as M,jb as _,lb as Ar,m as F,n as A,na as Sr,nb as Tr,o as h,ob as Lt,p as we,pa as Cr,pb as Er,q as hr,r as dr,ra as Ke,rb as Ie,t as v,ta as Ye,u as Ve,uc as kr,v as T,va as wr,w as Mt,wb as Or,wc as Q,x as fr,xb as Mr,y as Ge,yb as Dr,za as be,zb as Nr,zc as $r}from"./chunk-K43KW4K2.js";var d="primary",$e=Symbol("RouteTitle"),Ft=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 re(t){return new Ft(t)}function Zr(t,n,e){let r=e.path.split("/");if(r.length>t.length||e.pathMatch==="full"&&(n.hasChildren()||r.length<t.length))return null;let i={};for(let o=0;o<r.length;o++){let s=r[o],a=t[o];if(s[0]===":")i[s.substring(1)]=a;else if(s!==a.path)return null}return{consumed:t.slice(0,r.length),posParams:i}}function kn(t,n){if(t.length!==n.length)return!1;for(let e=0;e<t.length;++e)if(!j(t[e],n[e]))return!1;return!0}function j(t,n){let e=t?qt(t):void 0,r=n?qt(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],!Jr(t[i],n[i]))return!1;return!0}function qt(t){return[...Object.keys(t),...Object.getOwnPropertySymbols(t)]}function Jr(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 Xr(t){return t.length>0?t[t.length-1]:null}function H(t){return hr(t)?t:Mr(t)?A(Promise.resolve(t)):h(t)}var $n={exact:tn,subset:rn},en={exact:zn,subset:Fn,ignored:()=>!0};function Hr(t,n,e){return $n[e.paths](t.root,n.root,e.matrixParams)&&en[e.queryParams](t.queryParams,n.queryParams)&&!(e.fragment==="exact"&&t.fragment!==n.fragment)}function zn(t,n){return j(t,n)}function tn(t,n,e){if(!ee(t.segments,n.segments)||!rt(t.segments,n.segments,e)||t.numberOfChildren!==n.numberOfChildren)return!1;for(let r in n.children)if(!t.children[r]||!tn(t.children[r],n.children[r],e))return!1;return!0}function Fn(t,n){return Object.keys(n).length<=Object.keys(t).length&&Object.keys(n).every(e=>Jr(t[e],n[e]))}function rn(t,n,e){return nn(t,n,n.segments,e)}function nn(t,n,e,r){if(t.segments.length>e.length){let i=t.segments.slice(0,e.length);return!(!ee(i,e)||n.hasChildren()||!rt(i,e,r))}else if(t.segments.length===e.length){if(!ee(t.segments,e)||!rt(t.segments,e,r))return!1;for(let i in n.children)if(!t.children[i]||!rn(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!ee(t.segments,i)||!rt(t.segments,i,r)||!t.children[d]?!1:nn(t.children[d],n,o,r)}}function rt(t,n,e){return n.every((r,i)=>en[e](t[i].parameters,r.parameters))}var $=class{root;queryParams;fragment;_queryParamMap;constructor(n=new g([],{}),e={},r=null){this.root=n,this.queryParams=e,this.fragment=r}get queryParamMap(){return this._queryParamMap??=re(this.queryParams),this._queryParamMap}toString(){return Hn.serialize(this)}},g=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 nt(this)}},K=class{path;parameters;_parameterMap;constructor(n,e){this.path=n,this.parameters=e}get parameterMap(){return this._parameterMap??=re(this.parameters),this._parameterMap}toString(){return sn(this)}};function qn(t,n){return ee(t,n)&&t.every((e,r)=>j(e.parameters,n[r].parameters))}function ee(t,n){return t.length!==n.length?!1:t.every((e,r)=>e.path===n[r].path)}function Bn(t,n){let e=[];return Object.entries(t.children).forEach(([r,i])=>{r===d&&(e=e.concat(n(i,r)))}),Object.entries(t.children).forEach(([r,i])=>{r!==d&&(e=e.concat(n(i,r)))}),e}var ze=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:()=>new ne,providedIn:"root"})}return t})(),ne=class{parse(n){let e=new Ht(n);return new $(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(n){let e=`/${Ae(n.root,!0)}`,r=Wn(n.queryParams),i=typeof n.fragment=="string"?`#${Vn(n.fragment)}`:"";return`${e}${r}${i}`}},Hn=new ne;function nt(t){return t.segments.map(n=>sn(n)).join("/")}function Ae(t,n){if(!t.hasChildren())return nt(t);if(n){let e=t.children[d]?Ae(t.children[d],!1):"",r=[];return Object.entries(t.children).forEach(([i,o])=>{i!==d&&r.push(`${i}:${Ae(o,!1)}`)}),r.length>0?`${e}(${r.join("//")})`:e}else{let e=Bn(t,(r,i)=>i===d?[Ae(t.children[d],!1)]:[`${i}:${Ae(r,!1)}`]);return Object.keys(t.children).length===1&&t.children[d]!=null?`${nt(t)}/${e[0]}`:`${nt(t)}/(${e.join("//")})`}}function on(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function et(t){return on(t).replace(/%3B/gi,";")}function Vn(t){return encodeURI(t)}function Bt(t){return on(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function it(t){return decodeURIComponent(t)}function Vr(t){return it(t.replace(/\+/g,"%20"))}function sn(t){return`${Bt(t.path)}${Gn(t.parameters)}`}function Gn(t){return Object.entries(t).map(([n,e])=>`;${Bt(n)}=${Bt(e)}`).join("")}function Wn(t){let n=Object.entries(t).map(([e,r])=>Array.isArray(r)?r.map(i=>`${et(e)}=${et(i)}`).join("&"):`${et(e)}=${et(r)}`).filter(e=>e);return n.length?`?${n.join("&")}`:""}var Qn=/^[^\/()?;#]+/;function jt(t){let n=t.match(Qn);return n?n[0]:""}var Kn=/^[^\/()?;=#]+/;function Yn(t){let n=t.match(Kn);return n?n[0]:""}var Zn=/^[^=?&#]+/;function Jn(t){let n=t.match(Zn);return n?n[0]:""}var Xn=/^[^&#]+/;function ei(t){let n=t.match(Xn);return n?n[0]:""}var Ht=class{url;remaining;constructor(n){this.url=n,this.remaining=n}parseRootSegment(){return this.consumeOptional("/"),this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new g([],{}):new g([],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(){if(this.remaining==="")return{};this.consumeOptional("/");let n=[];for(this.peekStartsWith("(")||n.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),n.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let r={};return this.peekStartsWith("(")&&(r=this.parseParens(!1)),(n.length>0||Object.keys(e).length>0)&&(r[d]=new g(n,e)),r}parseSegment(){let n=jt(this.remaining);if(n===""&&this.peekStartsWith(";"))throw new S(4009,!1);return this.capture(n),new K(it(n),this.parseMatrixParams())}parseMatrixParams(){let n={};for(;this.consumeOptional(";");)this.parseParam(n);return n}parseParam(n){let e=Yn(this.remaining);if(!e)return;this.capture(e);let r="";if(this.consumeOptional("=")){let i=jt(this.remaining);i&&(r=i,this.capture(r))}n[it(e)]=it(r)}parseQueryParam(n){let e=Jn(this.remaining);if(!e)return;this.capture(e);let r="";if(this.consumeOptional("=")){let s=ei(this.remaining);s&&(r=s,this.capture(r))}let i=Vr(e),o=Vr(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){let e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let r=jt(this.remaining),i=this.remaining[r.length];if(i!=="/"&&i!==")"&&i!==";")throw new S(4010,!1);let o;r.indexOf(":")>-1?(o=r.slice(0,r.indexOf(":")),this.capture(o),this.capture(":")):n&&(o=d);let s=this.parseChildren();e[o??d]=Object.keys(s).length===1&&s[d]?s[d]:new g([],s),this.consumeOptional("//")}return e}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 S(4011,!1)}};function an(t){return t.segments.length>0?new g([],{[d]:t}):t}function un(t){let n={};for(let[r,i]of Object.entries(t.children)){let o=un(i);if(r===d&&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 g(t.segments,n);return ti(e)}function ti(t){if(t.numberOfChildren===1&&t.children[d]){let n=t.children[d];return new g(t.segments.concat(n.segments),n.children)}return t}function Y(t){return t instanceof $}function cn(t,n,e=null,r=null){let i=ln(t);return hn(i,n,e,r)}function ln(t){let n;function e(o){let s={};for(let u of o.children){let c=e(u);s[u.outlet]=c}let a=new g(o.url,s);return o===t&&(n=a),a}let r=e(t.root),i=an(r);return n??i}function hn(t,n,e,r){let i=t;for(;i.parent;)i=i.parent;if(n.length===0)return kt(i,i,i,e,r);let o=ri(n);if(o.toRoot())return kt(i,i,new g([],{}),e,r);let s=ni(o,i,t),a=s.processChildren?Ee(s.segmentGroup,s.index,o.commands):fn(s.segmentGroup,s.index,o.commands);return kt(i,s.segmentGroup,a,e,r)}function ot(t){return typeof t=="object"&&t!=null&&!t.outlets&&!t.segmentPath}function De(t){return typeof t=="object"&&t!=null&&t.outlets}function kt(t,n,e,r,i){let o={};r&&Object.entries(r).forEach(([u,c])=>{o[u]=Array.isArray(c)?c.map(p=>`${p}`):`${c}`});let s;t===n?s=e:s=dn(t,n,e);let a=an(un(s));return new $(a,o,i)}function dn(t,n,e){let r={};return Object.entries(t.children).forEach(([i,o])=>{o===n?r[i]=e:r[i]=dn(o,n,e)}),new g(t.segments,r)}var st=class{isAbsolute;numberOfDoubleDots;commands;constructor(n,e,r){if(this.isAbsolute=n,this.numberOfDoubleDots=e,this.commands=r,n&&r.length>0&&ot(r[0]))throw new S(4003,!1);let i=r.find(De);if(i&&i!==Xr(r))throw new S(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function ri(t){if(typeof t[0]=="string"&&t.length===1&&t[0]==="/")return new st(!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(([u,c])=>{a[u]=typeof c=="string"?c.split("/"):c}),[...i,{outlets:a}]}if(o.segmentPath)return[...i,o.segmentPath]}return typeof o!="string"?[...i,o]:s===0?(o.split("/").forEach((a,u)=>{u==0&&a==="."||(u==0&&a===""?e=!0:a===".."?n++:a!=""&&i.push(a))}),i):[...i,o]},[]);return new st(e,n,r)}var he=class{segmentGroup;processChildren;index;constructor(n,e,r){this.segmentGroup=n,this.processChildren=e,this.index=r}};function ni(t,n,e){if(t.isAbsolute)return new he(n,!0,0);if(!e)return new he(n,!1,NaN);if(e.parent===null)return new he(e,!0,0);let r=ot(t.commands[0])?0:1,i=e.segments.length-1+r;return ii(e,i,t.numberOfDoubleDots)}function ii(t,n,e){let r=t,i=n,o=e;for(;o>i;){if(o-=i,r=r.parent,!r)throw new S(4005,!1);i=r.segments.length}return new he(r,!1,i-o)}function oi(t){return De(t[0])?t[0].outlets:{[d]:t}}function fn(t,n,e){if(t??=new g([],{}),t.segments.length===0&&t.hasChildren())return Ee(t,n,e);let r=si(t,n,e),i=e.slice(r.commandIndex);if(r.match&&r.pathIndex<t.segments.length){let o=new g(t.segments.slice(0,r.pathIndex),{});return o.children[d]=new g(t.segments.slice(r.pathIndex),t.children),Ee(o,0,i)}else return r.match&&i.length===0?new g(t.segments,{}):r.match&&!t.hasChildren()?Vt(t,n,e):r.match?Ee(t,0,i):Vt(t,n,e)}function Ee(t,n,e){if(e.length===0)return new g(t.segments,{});{let r=oi(e),i={};if(Object.keys(r).some(o=>o!==d)&&t.children[d]&&t.numberOfChildren===1&&t.children[d].segments.length===0){let o=Ee(t.children[d],n,e);return new g(t.segments,o.children)}return Object.entries(r).forEach(([o,s])=>{typeof s=="string"&&(s=[s]),s!==null&&(i[o]=fn(t.children[o],n,s))}),Object.entries(t.children).forEach(([o,s])=>{r[o]===void 0&&(i[o]=s)}),new g(t.segments,i)}}function si(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(De(a))break;let u=`${a}`,c=r<e.length-1?e[r+1]:null;if(i>0&&u===void 0)break;if(u&&c&&typeof c=="object"&&c.outlets===void 0){if(!Wr(u,c,s))return o;r+=2}else{if(!Wr(u,{},s))return o;r++}i++}return{match:!0,pathIndex:i,commandIndex:r}}function Vt(t,n,e){let r=t.segments.slice(0,n),i=0;for(;i<e.length;){let o=e[i];if(De(o)){let u=ai(o.outlets);return new g(r,u)}if(i===0&&ot(e[0])){let u=t.segments[n];r.push(new K(u.path,Gr(e[0]))),i++;continue}let s=De(o)?o.outlets[d]:`${o}`,a=i<e.length-1?e[i+1]:null;s&&a&&ot(a)?(r.push(new K(s,Gr(a))),i+=2):(r.push(new K(s,{})),i++)}return new g(r,{})}function ai(t){let n={};return Object.entries(t).forEach(([e,r])=>{typeof r=="string"&&(r=[r]),r!==null&&(n[e]=Vt(new g([],{}),0,r))}),n}function Gr(t){let n={};return Object.entries(t).forEach(([e,r])=>n[e]=`${r}`),n}function Wr(t,n,e){return t==e.path&&j(n,e.parameters)}var Oe="imperative",m=(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})(m||{}),O=class{id;url;constructor(n,e){this.id=n,this.url=e}},ie=class extends O{type=m.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}')`}},L=class extends O{urlAfterRedirects;type=m.NavigationEnd;constructor(n,e,r){super(n,e),this.urlAfterRedirects=r}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},w=(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})(w||{}),Ne=(function(t){return t[t.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",t[t.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",t})(Ne||{}),k=class extends O{reason;code;type=m.NavigationCancel;constructor(n,e,r,i){super(n,e),this.reason=r,this.code=i}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}},q=class extends O{reason;code;type=m.NavigationSkipped;constructor(n,e,r,i){super(n,e),this.reason=r,this.code=i}},fe=class extends O{error;target;type=m.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})`}},Ue=class extends O{urlAfterRedirects;state;type=m.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})`}},at=class extends O{urlAfterRedirects;state;type=m.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})`}},ut=class extends O{urlAfterRedirects;state;shouldActivate;type=m.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})`}},ct=class extends O{urlAfterRedirects;state;type=m.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})`}},lt=class extends O{urlAfterRedirects;state;type=m.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})`}},ht=class{route;type=m.RouteConfigLoadStart;constructor(n){this.route=n}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},dt=class{route;type=m.RouteConfigLoadEnd;constructor(n){this.route=n}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},ft=class{snapshot;type=m.ChildActivationStart;constructor(n){this.snapshot=n}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},pt=class{snapshot;type=m.ChildActivationEnd;constructor(n){this.snapshot=n}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},gt=class{snapshot;type=m.ActivationStart;constructor(n){this.snapshot=n}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},vt=class{snapshot;type=m.ActivationEnd;constructor(n){this.snapshot=n}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}};var Pe=class{},pe=class{url;navigationBehaviorOptions;constructor(n,e){this.url=n,this.navigationBehaviorOptions=e}};function ui(t){return!(t instanceof Pe)&&!(t instanceof pe)}function ci(t,n){return t.providers&&!t._injector&&(t._injector=Lt(t.providers,n,`Route: ${t.path}`)),t._injector??n}function x(t){return t.outlet||d}function li(t,n){let e=t.filter(r=>x(r)===n);return e.push(...t.filter(r=>x(r)!==n)),e}function me(t){if(!t)return null;if(t.routeConfig?._injector)return t.routeConfig._injector;for(let n=t.parent;n;n=n.parent){let e=n.routeConfig;if(e?._loadedInjector)return e._loadedInjector;if(e?._injector)return e._injector}return null}var mt=class{rootInjector;outlet=null;route=null;children;attachRef=null;get injector(){return me(this.route?.snapshot)??this.rootInjector}constructor(n){this.rootInjector=n,this.children=new Re(this.rootInjector)}},Re=(()=>{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 mt(this.rootInjector),this.contexts.set(e,r)),r}getContext(e){return this.contexts.get(e)||null}static \u0275fac=function(r){return new(r||t)(Qe(ue))};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Rt=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=Gt(n,this._root);return e?e.children.map(r=>r.value):[]}firstChild(n){let e=Gt(n,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(n){let e=Wt(n,this._root);return e.length<2?[]:e[e.length-2].children.map(i=>i.value).filter(i=>i!==n)}pathFromRoot(n){return Wt(n,this._root).map(e=>e.value)}};function Gt(t,n){if(t===n.value)return n;for(let e of n.children){let r=Gt(t,e);if(r)return r}return null}function Wt(t,n){if(t===n.value)return[n];for(let e of n.children){let r=Wt(t,e);if(r.length)return r.unshift(n),r}return[]}var E=class{value;children;constructor(n,e){this.value=n,this.children=e}toString(){return`TreeNode(${this.value})`}};function le(t){let n={};return t&&t.children.forEach(e=>n[e.value.outlet]=e),n}var _e=class extends Rt{snapshot;constructor(n,e){super(n),this.snapshot=e,tr(this,n)}toString(){return this.snapshot.toString()}};function pn(t){let n=hi(t),e=new M([new K("",{})]),r=new M({}),i=new M({}),o=new M({}),s=new M(""),a=new B(e,r,o,s,i,d,t,n.root);return a.snapshot=n.root,new _e(new E(a,[]),n)}function hi(t){let n={},e={},r={},o=new te([],n,r,"",e,d,t,null,{});return new xe("",new E(o,[]))}var B=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,u){this.urlSubject=n,this.paramsSubject=e,this.queryParamsSubject=r,this.fragmentSubject=i,this.dataSubject=o,this.outlet=s,this.component=a,this._futureSnapshot=u,this.title=this.dataSubject?.pipe(v(c=>c[$e]))??h(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(v(n=>re(n))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(v(n=>re(n))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function yt(t,n,e="emptyOnly"){let r,{routeConfig:i}=t;return n!==null&&(e==="always"||i?.path===""||!n.component&&!n.routeConfig?.loadComponent)?r={params:l(l({},n.params),t.params),data:l(l({},n.data),t.data),resolve:l(l(l(l({},t.data),n.data),i?.data),t._resolvedData)}:r={params:l({},t.params),data:l({},t.data),resolve:l(l({},t.data),t._resolvedData??{})},i&&vn(i)&&(r.resolve[$e]=i.title),r}var te=class{url;params;queryParams;fragment;data;outlet;component;routeConfig;_resolve;_resolvedData;_routerState;_paramMap;_queryParamMap;get title(){return this.data?.[$e]}constructor(n,e,r,i,o,s,a,u,c){this.url=n,this.params=e,this.queryParams=r,this.fragment=i,this.data=o,this.outlet=s,this.component=a,this.routeConfig=u,this._resolve=c}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??=re(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=re(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}')`}},xe=class extends Rt{url;constructor(n,e){super(e),this.url=n,tr(this,e)}toString(){return gn(this._root)}};function tr(t,n){n.value._routerState=t,n.children.forEach(e=>tr(t,e))}function gn(t){let n=t.children.length>0?` { ${t.children.map(gn).join(", ")} } `:"";return`${t.value}${n}`}function $t(t){if(t.snapshot){let n=t.snapshot,e=t._futureSnapshot;t.snapshot=e,j(n.queryParams,e.queryParams)||t.queryParamsSubject.next(e.queryParams),n.fragment!==e.fragment&&t.fragmentSubject.next(e.fragment),j(n.params,e.params)||t.paramsSubject.next(e.params),kn(n.url,e.url)||t.urlSubject.next(e.url),j(n.data,e.data)||t.dataSubject.next(e.data)}else t.snapshot=t._futureSnapshot,t.dataSubject.next(t._futureSnapshot.data)}function Qt(t,n){let e=j(t.params,n.params)&&qn(t.url,n.url),r=!t.parent!=!n.parent;return e&&!r&&(!t.parent||Qt(t.parent,n.parent))}function vn(t){return typeof t.title=="string"||t.title===null}var mn=new D(""),rr=(()=>{class t{activated=null;get activatedComponentRef(){return this.activated}_activatedRoute=null;name=d;activateEvents=new X;deactivateEvents=new X;attachEvents=new X;detachEvents=new X;routerOutletData=zr();parentContexts=f(Re);location=f(Ar);changeDetector=f(Ze);inputBinder=f(Fe,{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 S(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new S(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new S(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 S(4013,!1);this._activatedRoute=e;let i=this.location,s=e.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,u=new Kt(e,a,i.injector,this.routerOutletData);this.activated=i.createComponent(s,{index:i.length,injector:u,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=Ie({type:t,selectors:[["router-outlet"]],inputs:{name:"name",routerOutletData:[1,"routerOutletData"]},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],features:[be]})}return t})(),Kt=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===B?this.route:n===Re?this.childContexts:n===mn?this.outletData:this.parent.get(n,e)}},Fe=new D(""),nr=(()=>{class t{outletDataSubscriptions=new Map;bindActivatedRouteToOutletComponent(e){this.unsubscribeFromRouteData(e),this.subscribeToRouteData(e)}unsubscribeFromRouteData(e){this.outletDataSubscriptions.get(e)?.unsubscribe(),this.outletDataSubscriptions.delete(e)}subscribeToRouteData(e){let{activatedRoute:r}=e,i=Ve([r.queryParams,r.params,r.data]).pipe(b(([o,s,a],u)=>(a=l(l(l({},o),s),a),u===0?h(a):Promise.resolve(a)))).subscribe(o=>{if(!e.isActivated||!e.activatedComponentRef||e.activatedRoute!==r||r.component===null){this.unsubscribeFromRouteData(e);return}let s=Fr(r.component);if(!s){this.unsubscribeFromRouteData(e);return}for(let{templateName:a}of s.inputs)e.activatedComponentRef.setInput(a,o[a])});this.outletDataSubscriptions.set(e,i)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:t.\u0275fac})}return t})(),ir=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Er({type:t,selectors:[["ng-component"]],exportAs:["emptyRouterOutlet"],decls:1,vars:0,template:function(r,i){r&1&&Pr(0,"router-outlet")},dependencies:[rr],encapsulation:2})}return t})();function or(t){let n=t.children&&t.children.map(or),e=n?U(l({},t),{children:n}):l({},t);return!e.component&&!e.loadComponent&&(n||e.loadChildren)&&e.outlet&&e.outlet!==d&&(e.component=ir),e}function di(t,n,e){let r=Le(t,n._root,e?e._root:void 0);return new _e(r,n)}function Le(t,n,e){if(e&&t.shouldReuseRoute(n.value,e.value.snapshot)){let r=e.value;r._futureSnapshot=n.value;let i=fi(t,n,e);return new E(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=>Le(t,a)),s}}let r=pi(n.value),i=n.children.map(o=>Le(t,o));return new E(r,i)}}function fi(t,n,e){return n.children.map(r=>{for(let i of e.children)if(t.shouldReuseRoute(r.value,i.value.snapshot))return Le(t,r,i);return Le(t,r)})}function pi(t){return new B(new M(t.url),new M(t.params),new M(t.queryParams),new M(t.fragment),new M(t.data),t.outlet,t.component,t)}var ge=class{redirectTo;navigationBehaviorOptions;constructor(n,e){this.redirectTo=n,this.navigationBehaviorOptions=e}},Rn="ngNavigationCancelingError";function St(t,n){let{redirectTo:e,navigationBehaviorOptions:r}=Y(n)?{redirectTo:n,navigationBehaviorOptions:void 0}:n,i=yn(!1,w.Redirect);return i.url=e,i.navigationBehaviorOptions=r,i}function yn(t,n){let e=new Error(`NavigationCancelingError: ${t||""}`);return e[Rn]=!0,e.cancellationCode=n,e}function gi(t){return Sn(t)&&Y(t.url)}function Sn(t){return!!t&&t[Rn]}var vi=(t,n,e,r)=>v(i=>(new Yt(n,i.targetRouterState,i.currentRouterState,e,r).activate(t),i)),Yt=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),$t(this.futureState.root),this.activateChildRoutes(e,r,n)}deactivateChildRoutes(n,e,r){let i=le(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=le(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=le(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=le(e);n.children.forEach(o=>{this.activateRoutes(o,i[o.value.outlet],r),this.forwardEvent(new vt(o.value.snapshot))}),n.children.length&&this.forwardEvent(new pt(n.value.snapshot))}activateRoutes(n,e,r){let i=n.value,o=e?e.value:null;if($t(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),$t(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)}},Ct=class{path;route;constructor(n){this.path=n,this.route=this.path[this.path.length-1]}},de=class{component;route;constructor(n,e){this.component=n,this.route=e}};function mi(t,n,e){let r=t._root,i=n?n._root:null;return Te(r,i,e,[r.value])}function Ri(t){let n=t.routeConfig?t.routeConfig.canActivateChild:null;return!n||n.length===0?null:{node:t,guards:n}}function ye(t,n){let e=Symbol(),r=n.get(t,e);return r===e?typeof t=="function"&&!Rr(t)?t:n.get(t):r}function Te(t,n,e,r,i={canDeactivateChecks:[],canActivateChecks:[]}){let o=le(n);return t.children.forEach(s=>{yi(s,o[s.value.outlet],e,r.concat([s.value]),i),delete o[s.value.outlet]}),Object.entries(o).forEach(([s,a])=>Me(a,e.getContext(s),i)),i}function yi(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 u=Si(s,o,o.routeConfig.runGuardsAndResolvers);u?i.canActivateChecks.push(new Ct(r)):(o.data=s.data,o._resolvedData=s._resolvedData),o.component?Te(t,n,a?a.children:null,r,i):Te(t,n,e,r,i),u&&a&&a.outlet&&a.outlet.isActivated&&i.canDeactivateChecks.push(new de(a.outlet.component,s))}else s&&Me(n,a,i),i.canActivateChecks.push(new Ct(r)),o.component?Te(t,null,a?a.children:null,r,i):Te(t,null,e,r,i);return i}function Si(t,n,e){if(typeof e=="function")return e(t,n);switch(e){case"pathParamsChange":return!ee(t.url,n.url);case"pathParamsOrQueryParamsChange":return!ee(t.url,n.url)||!j(t.queryParams,n.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!Qt(t,n)||!j(t.queryParams,n.queryParams);default:return!Qt(t,n)}}function Me(t,n,e){let r=le(t),i=t.value;Object.entries(r).forEach(([o,s])=>{i.component?n?Me(s,n.children.getContext(o),e):Me(s,null,e):Me(s,n,e)}),i.component?n&&n.outlet&&n.outlet.isActivated?e.canDeactivateChecks.push(new de(n.outlet.component,i)):e.canDeactivateChecks.push(new de(null,i)):e.canDeactivateChecks.push(new de(null,i))}function qe(t){return typeof t=="function"}function Ci(t){return typeof t=="boolean"}function wi(t){return t&&qe(t.canLoad)}function bi(t){return t&&qe(t.canActivate)}function Ii(t){return t&&qe(t.canActivateChild)}function Ai(t){return t&&qe(t.canDeactivate)}function Ti(t){return t&&qe(t.canMatch)}function Cn(t){return t instanceof dr||t?.name==="EmptyError"}var tt=Symbol("INITIAL_VALUE");function ve(){return b(t=>Ve(t.map(n=>n.pipe(ae(1),vr(tt)))).pipe(v(n=>{for(let e of n)if(e!==!0){if(e===tt)return tt;if(e===!1||Ei(e))return e}return!0}),G(n=>n!==tt),ae(1)))}function Ei(t){return Y(t)||t instanceof ge}function Oi(t,n){return T(e=>{let{targetSnapshot:r,currentSnapshot:i,guards:{canActivateChecks:o,canDeactivateChecks:s}}=e;return s.length===0&&o.length===0?h(U(l({},e),{guardsResult:!0})):Mi(s,r,i,t).pipe(T(a=>a&&Ci(a)?Di(r,o,t,n):h(a)),v(a=>U(l({},e),{guardsResult:a})))})}function Mi(t,n,e,r){return A(t).pipe(T(i=>xi(i.component,i.route,e,n,r)),W(i=>i!==!0,!0))}function Di(t,n,e,r){return A(n).pipe(se(i=>fr(Ui(i.route.parent,r),Ni(i.route,r),_i(t,i.path,e),Pi(t,i.route,e))),W(i=>i!==!0,!0))}function Ni(t,n){return t!==null&&n&&n(new gt(t)),h(!0)}function Ui(t,n){return t!==null&&n&&n(new ft(t)),h(!0)}function Pi(t,n,e){let r=n.routeConfig?n.routeConfig.canActivate:null;if(!r||r.length===0)return h(!0);let i=r.map(o=>Ge(()=>{let s=me(n)??e,a=ye(o,s),u=bi(a)?a.canActivate(n,t):P(s,()=>a(n,t));return H(u).pipe(W())}));return h(i).pipe(ve())}function _i(t,n,e){let r=n[n.length-1],o=n.slice(0,n.length-1).reverse().map(s=>Ri(s)).filter(s=>s!==null).map(s=>Ge(()=>{let a=s.guards.map(u=>{let c=me(s.node)??e,p=ye(u,c),R=Ii(p)?p.canActivateChild(r,t):P(c,()=>p(r,t));return H(R).pipe(W())});return h(a).pipe(ve())}));return h(o).pipe(ve())}function xi(t,n,e,r,i){let o=n&&n.routeConfig?n.routeConfig.canDeactivate:null;if(!o||o.length===0)return h(!0);let s=o.map(a=>{let u=me(n)??i,c=ye(a,u),p=Ai(c)?c.canDeactivate(t,n,e,r):P(u,()=>c(t,n,e,r));return H(p).pipe(W())});return h(s).pipe(ve())}function Li(t,n,e,r){let i=n.canLoad;if(i===void 0||i.length===0)return h(!0);let o=i.map(s=>{let a=ye(s,t),u=wi(a)?a.canLoad(n,e):P(t,()=>a(n,e));return H(u)});return h(o).pipe(ve(),wn(r))}function wn(t){return cr(y(n=>{if(typeof n!="boolean")throw St(t,n)}),v(n=>n===!0))}function ji(t,n,e,r){let i=n.canMatch;if(!i||i.length===0)return h(!0);let o=i.map(s=>{let a=ye(s,t),u=Ti(a)?a.canMatch(n,e):P(t,()=>a(n,e));return H(u)});return h(o).pipe(ve(),wn(r))}var je=class{segmentGroup;constructor(n){this.segmentGroup=n||null}},ke=class extends Error{urlTree;constructor(n){super(),this.urlTree=n}};function ce(t){return we(new je(t))}function ki(t){return we(new S(4e3,!1))}function $i(t){return we(yn(!1,w.GuardRejected))}var Zt=class{urlSerializer;urlTree;constructor(n,e){this.urlSerializer=n,this.urlTree=e}lineralizeSegments(n,e){let r=[],i=e.root;for(;;){if(r=r.concat(i.segments),i.numberOfChildren===0)return h(r);if(i.numberOfChildren>1||!i.children[d])return ki(`${n.redirectTo}`);i=i.children[d]}}applyRedirectCommands(n,e,r,i,o){return zi(e,i,o).pipe(v(s=>{if(s instanceof $)throw new ke(s);let a=this.applyRedirectCreateUrlTree(s,this.urlSerializer.parse(s),n,r);if(s[0]==="/")throw new ke(a);return a}))}applyRedirectCreateUrlTree(n,e,r,i){let o=this.createSegmentGroup(n,e.root,r,i);return new $(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,u])=>{s[a]=this.createSegmentGroup(n,u,r,i)}),new g(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 S(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 zi(t,n,e){if(typeof t=="string")return h(t);let r=t,{queryParams:i,fragment:o,routeConfig:s,url:a,outlet:u,params:c,data:p,title:R}=n;return H(P(e,()=>r({params:c,data:p,queryParams:i,fragment:o,routeConfig:s,url:a,outlet:u,title:R})))}var Jt={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function Fi(t,n,e,r,i){let o=bn(t,n,e);return o.matched?(r=ci(n,r),ji(r,n,e,i).pipe(v(s=>s===!0?o:l({},Jt)))):h(o)}function bn(t,n,e){if(n.path==="**")return qi(e);if(n.path==="")return n.pathMatch==="full"&&(t.hasChildren()||e.length>0)?l({},Jt):{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};let i=(n.matcher||Zr)(e,t,n);if(!i)return l({},Jt);let o={};Object.entries(i.posParams??{}).forEach(([a,u])=>{o[a]=u.path});let s=i.consumed.length>0?l(l({},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 qi(t){return{matched:!0,parameters:t.length>0?Xr(t).parameters:{},consumedSegments:t,remainingSegments:[],positionalParamSegments:{}}}function Qr(t,n,e,r){return e.length>0&&Vi(t,e,r)?{segmentGroup:new g(n,Hi(r,new g(e,t.children))),slicedSegments:[]}:e.length===0&&Gi(t,e,r)?{segmentGroup:new g(t.segments,Bi(t,e,r,t.children)),slicedSegments:e}:{segmentGroup:new g(t.segments,t.children),slicedSegments:e}}function Bi(t,n,e,r){let i={};for(let o of e)if(bt(t,n,o)&&!r[x(o)]){let s=new g([],{});i[x(o)]=s}return l(l({},r),i)}function Hi(t,n){let e={};e[d]=n;for(let r of t)if(r.path===""&&x(r)!==d){let i=new g([],{});e[x(r)]=i}return e}function Vi(t,n,e){return e.some(r=>bt(t,n,r)&&x(r)!==d)}function Gi(t,n,e){return e.some(r=>bt(t,n,r))}function bt(t,n,e){return(t.hasChildren()||n.length>0)&&e.pathMatch==="full"?!1:e.path===""}function Wi(t,n,e){return n.length===0&&!t.children[e]}var Xt=class{};function Qi(t,n,e,r,i,o,s="emptyOnly"){return new er(t,n,e,r,i,s,o).recognize()}var Ki=31,er=class{injector;configLoader;rootComponentType;config;urlTree;paramsInheritanceStrategy;urlSerializer;applyRedirects;absoluteRedirectCount=0;allowRedirects=!0;constructor(n,e,r,i,o,s,a){this.injector=n,this.configLoader=e,this.rootComponentType=r,this.config=i,this.urlTree=o,this.paramsInheritanceStrategy=s,this.urlSerializer=a,this.applyRedirects=new Zt(this.urlSerializer,this.urlTree)}noMatchError(n){return new S(4002,`'${n.segmentGroup}'`)}recognize(){let n=Qr(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(n).pipe(v(({children:e,rootSnapshot:r})=>{let i=new E(r,e),o=new xe("",i),s=cn(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){let e=new te([],Object.freeze({}),Object.freeze(l({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),d,this.rootComponentType,null,{});return this.processSegmentGroup(this.injector,this.config,n,d,e).pipe(v(r=>({children:r,rootSnapshot:e})),J(r=>{if(r instanceof ke)return this.urlTree=r.urlTree,this.match(r.urlTree.root);throw r instanceof je?this.noMatchError(r):r}))}processSegmentGroup(n,e,r,i,o){return r.segments.length===0&&r.hasChildren()?this.processChildren(n,e,r,o):this.processSegment(n,e,r,r.segments,i,!0,o).pipe(v(s=>s instanceof E?[s]:[]))}processChildren(n,e,r,i){let o=[];for(let s of Object.keys(r.children))s==="primary"?o.unshift(s):o.push(s);return A(o).pipe(se(s=>{let a=r.children[s],u=li(e,s);return this.processSegmentGroup(n,u,a,s,i)}),gr((s,a)=>(s.push(...a),s)),Dt(null),pr(),T(s=>{if(s===null)return ce(r);let a=In(s);return Yi(a),h(a)}))}processSegment(n,e,r,i,o,s,a){return A(e).pipe(se(u=>this.processSegmentAgainstRoute(u._injector??n,e,u,r,i,o,s,a).pipe(J(c=>{if(c instanceof je)return h(null);throw c}))),W(u=>!!u),J(u=>{if(Cn(u))return Wi(r,i,o)?h(new Xt):ce(r);throw u}))}processSegmentAgainstRoute(n,e,r,i,o,s,a,u){return x(r)!==s&&(s===d||!bt(i,o,r))?ce(i):r.redirectTo===void 0?this.matchSegmentAgainstRoute(n,i,r,o,s,u):this.allowRedirects&&a?this.expandSegmentAgainstRouteUsingRedirect(n,i,e,r,o,s,u):ce(i)}expandSegmentAgainstRouteUsingRedirect(n,e,r,i,o,s,a){let{matched:u,parameters:c,consumedSegments:p,positionalParamSegments:R,remainingSegments:N}=bn(e,i,o);if(!u)return ce(e);typeof i.redirectTo=="string"&&i.redirectTo[0]==="/"&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>Ki&&(this.allowRedirects=!1));let V=new te(o,c,Object.freeze(l({},this.urlTree.queryParams)),this.urlTree.fragment,Kr(i),x(i),i.component??i._loadedComponent??null,i,Yr(i)),I=yt(V,a,this.paramsInheritanceStrategy);return V.params=Object.freeze(I.params),V.data=Object.freeze(I.data),this.applyRedirects.applyRedirectCommands(p,i.redirectTo,R,V,n).pipe(b(Z=>this.applyRedirects.lineralizeSegments(i,Z)),T(Z=>this.processSegment(n,r,e,Z.concat(N),s,!1,a)))}matchSegmentAgainstRoute(n,e,r,i,o,s){let a=Fi(e,r,i,n,this.urlSerializer);return r.path==="**"&&(e.children={}),a.pipe(b(u=>u.matched?(n=r._injector??n,this.getChildConfig(n,r,i).pipe(b(({routes:c})=>{let p=r._loadedInjector??n,{parameters:R,consumedSegments:N,remainingSegments:V}=u,I=new te(N,R,Object.freeze(l({},this.urlTree.queryParams)),this.urlTree.fragment,Kr(r),x(r),r.component??r._loadedComponent??null,r,Yr(r)),oe=yt(I,s,this.paramsInheritanceStrategy);I.params=Object.freeze(oe.params),I.data=Object.freeze(oe.data);let{segmentGroup:Z,slicedSegments:Tt}=Qr(e,N,V,c);if(Tt.length===0&&Z.hasChildren())return this.processChildren(p,c,Z,I).pipe(v(He=>new E(I,He)));if(c.length===0&&Tt.length===0)return h(new E(I,[]));let Ln=x(r)===o;return this.processSegment(p,c,Z,Tt,Ln?d:o,!0,I).pipe(v(He=>new E(I,He instanceof E?[He]:[])))}))):ce(e)))}getChildConfig(n,e,r){return e.children?h({routes:e.children,injector:n}):e.loadChildren?e._loadedRoutes!==void 0?h({routes:e._loadedRoutes,injector:e._loadedInjector}):Li(n,e,r,this.urlSerializer).pipe(T(i=>i?this.configLoader.loadChildren(n,e).pipe(y(o=>{e._loadedRoutes=o.routes,e._loadedInjector=o.injector})):$i(e))):h({routes:[],injector:n})}};function Yi(t){t.sort((n,e)=>n.value.outlet===d?-1:e.value.outlet===d?1:n.value.outlet.localeCompare(e.value.outlet))}function Zi(t){let n=t.value.routeConfig;return n&&n.path===""}function In(t){let n=[],e=new Set;for(let r of t){if(!Zi(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=In(r.children);n.push(new E(r.value,i))}return n.filter(r=>!e.has(r))}function Kr(t){return t.data||{}}function Yr(t){return t.resolve||{}}function Ji(t,n,e,r,i,o){return T(s=>Qi(t,n,e,r,s.extractedUrl,i,o).pipe(v(({state:a,tree:u})=>U(l({},s),{targetSnapshot:a,urlAfterRedirects:u}))))}function Xi(t,n){return T(e=>{let{targetSnapshot:r,guards:{canActivateChecks:i}}=e;if(!i.length)return h(e);let o=new Set(i.map(u=>u.route)),s=new Set;for(let u of o)if(!s.has(u))for(let c of An(u))s.add(c);let a=0;return A(s).pipe(se(u=>o.has(u)?eo(u,r,t,n):(u.data=yt(u,u.parent,t).resolve,h(void 0))),y(()=>a++),Nt(1),T(u=>a===s.size?h(e):F))})}function An(t){let n=t.children.map(e=>An(e)).flat();return[t,...n]}function eo(t,n,e,r){let i=t.routeConfig,o=t._resolve;return i?.title!==void 0&&!vn(i)&&(o[$e]=i.title),Ge(()=>(t.data=yt(t,t.parent,e).resolve,to(o,t,n,r).pipe(v(s=>(t._resolvedData=s,t.data=l(l({},t.data),s),null)))))}function to(t,n,e,r){let i=qt(t);if(i.length===0)return h({});let o={};return A(i).pipe(T(s=>ro(t[s],n,e,r).pipe(W(),y(a=>{if(a instanceof ge)throw St(new ne,a);o[s]=a}))),Nt(1),v(()=>o),J(s=>Cn(s)?F:we(s)))}function ro(t,n,e,r){let i=me(n)??r,o=ye(t,i),s=o.resolve?o.resolve(n,e):P(i,()=>o(n,e));return H(s)}function zt(t){return b(n=>{let e=t(n);return e?A(e).pipe(v(()=>n)):h(n)})}var sr=(()=>{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===d);return r}getResolvedTitleForRoute(e){return e.data[$e]}static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:()=>f(Tn),providedIn:"root"})}return t})(),Tn=(()=>{class t extends sr{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)(Qe(Br))};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Se=new D("",{providedIn:"root",factory:()=>({})}),Be=new D(""),En=(()=>{class t{componentLoaders=new WeakMap;childrenLoaders=new WeakMap;onLoadStartListener;onLoadEndListener;compiler=f(kr);loadComponent(e,r){if(this.componentLoaders.get(r))return this.componentLoaders.get(r);if(r._loadedComponent)return h(r._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(r);let i=H(P(e,()=>r.loadComponent())).pipe(v(Mn),b(Dn),y(s=>{this.onLoadEndListener&&this.onLoadEndListener(r),r._loadedComponent=s}),We(()=>{this.componentLoaders.delete(r)})),o=new Ot(i,()=>new z).pipe(Et());return this.componentLoaders.set(r,o),o}loadChildren(e,r){if(this.childrenLoaders.get(r))return this.childrenLoaders.get(r);if(r._loadedRoutes)return h({routes:r._loadedRoutes,injector:r._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(r);let o=On(r,this.compiler,e,this.onLoadEndListener).pipe(We(()=>{this.childrenLoaders.delete(r)})),s=new Ot(o,()=>new z).pipe(Et());return this.childrenLoaders.set(r,s),s}static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function On(t,n,e,r){return H(P(e,()=>t.loadChildren())).pipe(v(Mn),b(Dn),T(i=>i instanceof Tr||Array.isArray(i)?h(i):A(n.compileModuleAsync(i))),v(i=>{r&&r(t);let o,s,a=!1;return Array.isArray(i)?(s=i,a=!0):(o=i.create(e).injector,s=o.get(Be,[],{optional:!0,self:!0}).flat()),{routes:s.map(or),injector:o}}))}function no(t){return t&&typeof t=="object"&&"default"in t}function Mn(t){return no(t)?t.default:t}function Dn(t){return h(t)}var It=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:()=>f(io),providedIn:"root"})}return t})(),io=(()=>{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=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Nn=new D("");var Un=new D(""),Pn=(()=>{class t{currentNavigation=Ye(null,{equal:()=>!1});currentTransition=null;lastSuccessfulNavigation=null;events=new z;transitionAbortWithErrorSubject=new z;configLoader=f(En);environmentInjector=f(ue);destroyRef=f(Cr);urlSerializer=f(ze);rootContexts=f(Re);location=f(Xe);inputBindingEnabled=f(Fe,{optional:!0})!==null;titleStrategy=f(sr);options=f(Se,{optional:!0})||{};paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly";urlHandlingStrategy=f(It);createViewTransition=f(Nn,{optional:!0});navigationErrorHandler=f(Un,{optional:!0});navigationId=0;get hasRequestedNavigation(){return this.navigationId!==0}transitions;afterPreactivation=()=>h(void 0);rootComponentType=null;destroyed=!1;constructor(){let e=i=>this.events.next(new ht(i)),r=i=>this.events.next(new dt(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;Q(()=>{this.transitions?.next(U(l({},e),{extractedUrl:this.urlHandlingStrategy.extract(e.rawUrl),targetSnapshot:null,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null,abortController:new AbortController,id:r}))})}setupNavigations(e){return this.transitions=new M(null),this.transitions.pipe(G(r=>r!==null),b(r=>{let i=!1;return h(r).pipe(b(o=>{if(this.navigationId>r.id)return this.cancelNavigationTransition(r,"",w.SupersededByNewNavigation),F;this.currentTransition=r,this.currentNavigation.set({id:o.id,initialUrl:o.rawUrl,extractedUrl:o.extractedUrl,targetBrowserUrl:typeof o.extras.browserUrl=="string"?this.urlSerializer.parse(o.extras.browserUrl):o.extras.browserUrl,trigger:o.source,extras:o.extras,previousNavigation:this.lastSuccessfulNavigation?U(l({},this.lastSuccessfulNavigation),{previousNavigation:null}):null,abort:()=>o.abortController.abort()});let s=!e.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),a=o.extras.onSameUrlNavigation??e.onSameUrlNavigation;if(!s&&a!=="reload")return this.events.next(new q(o.id,this.urlSerializer.serialize(o.rawUrl),"",Ne.IgnoredSameUrlNavigation)),o.resolve(!1),F;if(this.urlHandlingStrategy.shouldProcessUrl(o.rawUrl))return h(o).pipe(b(u=>(this.events.next(new ie(u.id,this.urlSerializer.serialize(u.extractedUrl),u.source,u.restoredState)),u.id!==this.navigationId?F:Promise.resolve(u))),Ji(this.environmentInjector,this.configLoader,this.rootComponentType,e.config,this.urlSerializer,this.paramsInheritanceStrategy),y(u=>{r.targetSnapshot=u.targetSnapshot,r.urlAfterRedirects=u.urlAfterRedirects,this.currentNavigation.update(p=>(p.finalUrl=u.urlAfterRedirects,p));let c=new Ue(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot);this.events.next(c)}));if(s&&this.urlHandlingStrategy.shouldProcessUrl(o.currentRawUrl)){let{id:u,extractedUrl:c,source:p,restoredState:R,extras:N}=o,V=new ie(u,this.urlSerializer.serialize(c),p,R);this.events.next(V);let I=pn(this.rootComponentType).snapshot;return this.currentTransition=r=U(l({},o),{targetSnapshot:I,urlAfterRedirects:c,extras:U(l({},N),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.update(oe=>(oe.finalUrl=c,oe)),h(r)}else return this.events.next(new q(o.id,this.urlSerializer.serialize(o.extractedUrl),"",Ne.IgnoredByUrlHandlingStrategy)),o.resolve(!1),F}),y(o=>{let s=new at(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot);this.events.next(s)}),v(o=>(this.currentTransition=r=U(l({},o),{guards:mi(o.targetSnapshot,o.currentSnapshot,this.rootContexts)}),r)),Oi(this.environmentInjector,o=>this.events.next(o)),y(o=>{if(r.guardsResult=o.guardsResult,o.guardsResult&&typeof o.guardsResult!="boolean")throw St(this.urlSerializer,o.guardsResult);let s=new ut(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot,!!o.guardsResult);this.events.next(s)}),G(o=>o.guardsResult?!0:(this.cancelNavigationTransition(o,"",w.GuardRejected),!1)),zt(o=>{if(o.guards.canActivateChecks.length!==0)return h(o).pipe(y(s=>{let a=new ct(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot);this.events.next(a)}),b(s=>{let a=!1;return h(s).pipe(Xi(this.paramsInheritanceStrategy,this.environmentInjector),y({next:()=>a=!0,complete:()=>{a||this.cancelNavigationTransition(s,"",w.NoDataFromResolver)}}))}),y(s=>{let a=new lt(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot);this.events.next(a)}))}),zt(o=>{let s=a=>{let u=[];if(a.routeConfig?.loadComponent){let c=me(a)??this.environmentInjector;u.push(this.configLoader.loadComponent(c,a.routeConfig).pipe(y(p=>{a.component=p}),v(()=>{})))}for(let c of a.children)u.push(...s(c));return u};return Ve(s(o.targetSnapshot.root)).pipe(Dt(null),ae(1))}),zt(()=>this.afterPreactivation()),b(()=>{let{currentSnapshot:o,targetSnapshot:s}=r,a=this.createViewTransition?.(this.environmentInjector,o.root,s.root);return a?A(a).pipe(v(()=>r)):h(r)}),v(o=>{let s=di(e.routeReuseStrategy,o.targetSnapshot,o.currentRouterState);return this.currentTransition=r=U(l({},o),{targetRouterState:s}),this.currentNavigation.update(a=>(a.targetRouterState=s,a)),r}),y(()=>{this.events.next(new Pe)}),vi(this.rootContexts,e.routeReuseStrategy,o=>this.events.next(o),this.inputBindingEnabled),ae(1),Ut(new lr(o=>{let s=r.abortController.signal,a=()=>o.next();return s.addEventListener("abort",a),()=>s.removeEventListener("abort",a)}).pipe(G(()=>!i&&!r.targetRouterState),y(()=>{this.cancelNavigationTransition(r,r.abortController.signal.reason+"",w.Aborted)}))),y({next:o=>{i=!0,this.lastSuccessfulNavigation=Q(this.currentNavigation),this.events.next(new L(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects))),this.titleStrategy?.updateTitle(o.targetRouterState.snapshot),o.resolve(!0)},complete:()=>{i=!0}}),Ut(this.transitionAbortWithErrorSubject.pipe(y(o=>{throw o}))),We(()=>{i||this.cancelNavigationTransition(r,"",w.SupersededByNewNavigation),this.currentTransition?.id===r.id&&(this.currentNavigation.set(null),this.currentTransition=null)}),J(o=>{if(this.destroyed)return r.resolve(!1),F;if(i=!0,Sn(o))this.events.next(new k(r.id,this.urlSerializer.serialize(r.extractedUrl),o.message,o.cancellationCode)),gi(o)?this.events.next(new pe(o.url,o.navigationBehaviorOptions)):r.resolve(!1);else{let s=new fe(r.id,this.urlSerializer.serialize(r.extractedUrl),o,r.targetSnapshot??void 0);try{let a=P(this.environmentInjector,()=>this.navigationErrorHandler?.(s));if(a instanceof ge){let{message:u,cancellationCode:c}=St(this.urlSerializer,a);this.events.next(new k(r.id,this.urlSerializer.serialize(r.extractedUrl),u,c)),this.events.next(new pe(a.redirectTo,a.navigationBehaviorOptions))}else throw this.events.next(s),o}catch(a){this.options.resolveNavigationPromiseOnError?r.resolve(!1):r.reject(a)}}return F}))}))}cancelNavigationTransition(e,r,i){let o=new k(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=Q(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=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function oo(t){return t!==Oe}var _n=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:()=>f(so),providedIn:"root"})}return t})(),wt=class{shouldDetach(n){return!1}store(n,e){}shouldAttach(n){return!1}retrieve(n){return null}shouldReuseRoute(n,e){return n.routeConfig===e.routeConfig}},so=(()=>{class t extends wt{static \u0275fac=(()=>{let e;return function(i){return(e||(e=Pt(t)))(i||t)}})();static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),xn=(()=>{class t{urlSerializer=f(ze);options=f(Se,{optional:!0})||{};canceledNavigationResolution=this.options.canceledNavigationResolution||"replace";location=f(Xe);urlHandlingStrategy=f(It);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";currentUrlTree=new $;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 $?this.urlSerializer.serialize(s):s}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=pn(null);getRouterState(){return this.routerState}stateMemento=this.createStateMemento();updateStateMemento(){this.stateMemento=this.createStateMemento()}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}resetInternalState({finalUrl:e}){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,e??this.rawUrlTree)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:()=>f(ao),providedIn:"root"})}return t})(),ao=(()=>{class t extends xn{currentPageId=0;lastSuccessfulId=-1;restoredState(){return this.location.getState()}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")})})}handleRouterEvent(e,r){e instanceof ie?this.updateStateMemento():e instanceof q?this.commitTransition(r):e instanceof Ue?this.urlUpdateStrategy==="eager"&&(r.extras.skipLocationChange||this.setBrowserUrl(this.createBrowserPath(r),r)):e instanceof Pe?(this.commitTransition(r),this.urlUpdateStrategy==="deferred"&&!r.extras.skipLocationChange&&this.setBrowserUrl(this.createBrowserPath(r),r)):e instanceof k&&e.code!==w.SupersededByNewNavigation&&e.code!==w.Redirect?this.restoreHistory(r):e instanceof fe?this.restoreHistory(r,!0):e instanceof L&&(this.lastSuccessfulId=e.id,this.currentPageId=this.browserPageId)}setBrowserUrl(e,{extras:r,id:i}){let{replaceUrl:o,state:s}=r;if(this.location.isCurrentPathEqualTo(e)||o){let a=this.browserPageId,u=l(l({},s),this.generateNgRouterState(i,a));this.location.replaceState(e,"",u)}else{let a=l(l({},s),this.generateNgRouterState(i,this.browserPageId+1));this.location.go(e,"",a)}}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())}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.getRawUrlTree()),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(e,r){return this.canceledNavigationResolution==="computed"?{navigationId:e,\u0275routerPageId:r}:{navigationId:e}}static \u0275fac=(()=>{let e;return function(i){return(e||(e=Pt(t)))(i||t)}})();static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function ar(t,n){t.events.pipe(G(e=>e instanceof L||e instanceof k||e instanceof fe||e instanceof q),v(e=>e instanceof L||e instanceof q?0:(e instanceof k?e.code===w.Redirect||e.code===w.SupersededByNewNavigation:!1)?2:1),G(e=>e!==2),ae(1)).subscribe(()=>{n()})}var uo={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},co={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"},Ce=(()=>{class t{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}disposed=!1;nonRouterCurrentEntryChangeSubscription;console=f(Or);stateManager=f(xn);options=f(Se,{optional:!0})||{};pendingTasks=f(wr);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";navigationTransitions=f(Pn);urlSerializer=f(ze);location=f(Xe);urlHandlingStrategy=f(It);injector=f(ue);_events=new z;get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}navigated=!1;routeReuseStrategy=f(_n);onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore";config=f(Be,{optional:!0})?.flat()??[];componentInputBindingEnabled=!!f(Fe,{optional:!0});currentNavigation=this.navigationTransitions.currentNavigation.asReadonly();constructor(){this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this).subscribe({error:e=>{this.console.warn(e)}}),this.subscribeToNavigationEvents()}eventsSubscription=new ur;subscribeToNavigationEvents(){let e=this.navigationTransitions.events.subscribe(r=>{try{let i=this.navigationTransitions.currentTransition,o=Q(this.navigationTransitions.currentNavigation);if(i!==null&&o!==null){if(this.stateManager.handleRouterEvent(r,o),r instanceof k&&r.code!==w.Redirect&&r.code!==w.SupersededByNewNavigation)this.navigated=!0;else if(r instanceof L)this.navigated=!0;else if(r instanceof pe){let s=r.navigationBehaviorOptions,a=this.urlHandlingStrategy.merge(r.url,i.currentRawUrl),u=l({browserUrl:i.extras.browserUrl,info:i.extras.info,skipLocationChange:i.extras.skipLocationChange,replaceUrl:i.extras.replaceUrl||this.urlUpdateStrategy==="eager"||oo(i.source)},s);this.scheduleNavigation(a,Oe,null,u,{resolve:i.resolve,reject:i.reject,promise:i.promise})}}ui(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),Oe,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((e,r,i)=>{this.navigateToSyncWithBrowser(e,i,r)})}navigateToSyncWithBrowser(e,r,i){let o={replaceUrl:!0},s=i?.navigationId?i:null;if(i){let u=l({},i);delete u.navigationId,delete u.\u0275routerPageId,Object.keys(u).length!==0&&(o.state=u)}let a=this.parseUrl(e);this.scheduleNavigation(a,r,s,o).catch(u=>{this.disposed||this.injector.get(Ke)(u)})}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return Q(this.navigationTransitions.currentNavigation)}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(e){this.config=e.map(or),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this._events.unsubscribe(),this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription&&(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:u}=r,c=u?this.currentUrlTree.fragment:s,p=null;switch(a??this.options.defaultQueryParamsHandling){case"merge":p=l(l({},this.currentUrlTree.queryParams),o);break;case"preserve":p=this.currentUrlTree.queryParams;break;default:p=o||null}p!==null&&(p=this.removeEmptyProps(p));let R;try{let N=i?i.snapshot:this.routerState.snapshot.root;R=ln(N)}catch{(typeof e[0]!="string"||e[0][0]!=="/")&&(e=[]),R=this.currentUrlTree.root}return hn(R,e,p,c??null)}navigateByUrl(e,r={skipLocationChange:!1}){let i=Y(e)?e:this.parseUrl(e),o=this.urlHandlingStrategy.merge(i,this.rawUrlTree);return this.scheduleNavigation(o,Oe,null,r)}navigate(e,r={skipLocationChange:!1}){return lo(e),this.navigateByUrl(this.createUrlTree(e,r),r)}serializeUrl(e){return this.urlSerializer.serialize(e)}parseUrl(e){try{return this.urlSerializer.parse(e)}catch{return this.console.warn(mr(4018,!1)),this.urlSerializer.parse("/")}}isActive(e,r){let i;if(r===!0?i=l({},uo):r===!1?i=l({},co):i=r,Y(e))return Hr(this.currentUrlTree,e,i);let o=this.parseUrl(e);return Hr(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,u,c;s?(a=s.resolve,u=s.reject,c=s.promise):c=new Promise((R,N)=>{a=R,u=N});let p=this.pendingTasks.add();return ar(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(p))}),this.navigationTransitions.handleNavigationRequest({source:r,restoredState:i,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:e,extras:o,resolve:a,reject:u,promise:c,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),c.catch(R=>Promise.reject(R))}static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function lo(t){for(let n=0;n<t.length;n++)if(t[n]==null)throw new S(4008,!1)}var At=(()=>{class t{router;route;tabIndexAttribute;renderer;el;locationStrategy;reactiveHref=Ye(null);get href(){return Q(this.reactiveHref)}set href(e){this.reactiveHref.set(e)}target;queryParams;fragment;queryParamsHandling;state;info;relativeTo;isAnchorElement;subscription;onChanges=new z;applicationErrorHandler=f(Ke);options=f(Se,{optional:!0});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,this.reactiveHref.set(f(new $r("href"),{optional:!0}));let u=s.nativeElement.tagName?.toLowerCase();this.isAnchorElement=u==="a"||u==="area"||!!(typeof customElements=="object"&&customElements.get(u)?.observedAttributes?.includes?.("href")),this.isAnchorElement?this.setTabIndexIfNotOnNativeEl("0"):this.subscribeToNavigationEventsIfNecessary()}subscribeToNavigationEventsIfNecessary(){if(this.subscription!==void 0||!this.isAnchorElement)return;let e=this.preserveFragment,r=i=>i==="merge"||i==="preserve";e||=r(this.queryParamsHandling),e||=!this.queryParamsHandling&&!r(this.options?.defaultQueryParamsHandling),e&&(this.subscription=this.router.events.subscribe(i=>{i instanceof L&&this.updateHref()}))}preserveFragment=!1;skipLocationChange=!1;replaceUrl=!1;setTabIndexIfNotOnNativeEl(e){this.tabIndexAttribute!=null||this.isAnchorElement||this.applyAttributeValue("tabindex",e)}ngOnChanges(e){this.isAnchorElement&&(this.updateHref(),this.subscribeToNavigationEventsIfNecessary()),this.onChanges.next(this)}routerLinkInput=null;set routerLink(e){e==null?(this.routerLinkInput=null,this.setTabIndexIfNotOnNativeEl(null)):(Y(e)?this.routerLinkInput=e:this.routerLinkInput=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 u={skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state,info:this.info};return this.router.navigateByUrl(a,u)?.catch(c=>{this.applicationErrorHandler(c)}),!this.isAnchorElement}ngOnDestroy(){this.subscription?.unsubscribe()}updateHref(){let e=this.urlTree;this.reactiveHref.set(e!==null&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(e))??"":null)}applyAttributeValue(e,r){let i=this.renderer,o=this.el.nativeElement;r!==null?i.setAttribute(o,e,r):i.removeAttribute(o,e)}get urlTree(){return this.routerLinkInput===null?null:Y(this.routerLinkInput)?this.routerLinkInput:this.router.createUrlTree(this.routerLinkInput,{relativeTo:this.relativeTo!==void 0?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:this.preserveFragment})}static \u0275fac=function(r){return new(r||t)(_(Ce),_(B),br("tabindex"),_(xt),_(_t),_(qr))};static \u0275dir=Ie({type:t,selectors:[["","routerLink",""]],hostVars:2,hostBindings:function(r,i){r&1&&_r("click",function(s){return i.onClick(s.button,s.ctrlKey,s.shiftKey,s.altKey,s.metaKey)}),r&2&&Ur("href",i.reactiveHref(),Ir)("target",i.target)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",info:"info",relativeTo:"relativeTo",preserveFragment:[2,"preserveFragment","preserveFragment",Je],skipLocationChange:[2,"skipLocationChange","skipLocationChange",Je],replaceUrl:[2,"replaceUrl","replaceUrl",Je],routerLink:"routerLink"},features:[be]})}return t})(),fo=(()=>{class t{router;element;renderer;cdr;link;links;classes=[];routerEventsSubscription;linkInputChangesSubscription;_isActive=!1;get isActive(){return this._isActive}routerLinkActiveOptions={exact:!1};ariaCurrentWhenActive;isActiveChange=new X;constructor(e,r,i,o,s){this.router=e,this.element=r,this.renderer=i,this.cdr=o,this.link=s,this.routerEventsSubscription=e.events.subscribe(a=>{a instanceof L&&this.update()})}ngAfterContentInit(){h(this.links.changes,h(null)).pipe(Mt()).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(Mt()).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=po(this.routerLinkActiveOptions)?this.routerLinkActiveOptions:this.routerLinkActiveOptions.exact||!1;return i=>{let o=i.urlTree;return o?e.isActive(o,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)(_(Ce),_(_t),_(xt),_(Ze),_(At,8))};static \u0275dir=Ie({type:t,selectors:[["","routerLinkActive",""]],contentQueries:function(r,i,o){if(r&1&&xr(o,At,5),r&2){let s;Lr(s=jr())&&(i.links=s)}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",ariaCurrentWhenActive:"ariaCurrentWhenActive",routerLinkActive:"routerLinkActive"},outputs:{isActiveChange:"isActiveChange"},exportAs:["routerLinkActive"],features:[be]})}return t})();function po(t){return!!t.paths}var go=new D("");function vo(t,...n){return yr([{provide:Be,multi:!0,useValue:t},[],{provide:B,useFactory:mo,deps:[Ce]},{provide:Dr,multi:!0,useFactory:yo},n.map(e=>e.\u0275providers)])}function mo(t){return t.routerState.root}function Ro(t,n){return{\u0275kind:t,\u0275providers:n}}function yo(){let t=f(Sr);return n=>{let e=t.get(Nr);if(n!==e.components[0])return;let r=t.get(Ce),i=t.get(So);t.get(Co)===1&&r.initialNavigation(),t.get(wo,null,{optional:!0})?.setUpPreloading(),t.get(go,null,{optional:!0})?.init(),r.resetRootComponentType(e.componentTypes[0]),i.closed||(i.next(),i.complete(),i.unsubscribe())}}var So=new D("",{factory:()=>new z}),Co=new D("",{providedIn:"root",factory:()=>1});var wo=new D("");function bo(){return Ro(8,[nr,{provide:Fe,useExisting:nr}])}export{rr as a,Ce as b,At as c,fo as d,vo as e,bo as f};
1
+ import{c as Br}from"./chunk-UC7AWK4C.js";import{d as qr,e as Xe}from"./chunk-EBGPIJ7S.js";import{$ as C,$b as Lr,Aa as Pt,Ac as $r,Ba as br,C as G,Ca as _t,Cc as zr,Db as Ur,E as J,F as se,Fc as Ze,H as Dt,I as ae,Ic as Je,K as We,L as W,M as Nt,Mc as Fr,N as pr,Nb as Pr,P as gr,T as vr,U as b,Ub as _r,V as Ut,X as y,Xa as Ir,Y as S,Z as mr,Zb as xr,a as l,ac as jr,b as U,ba as Rr,ca as D,d as ur,da as Qe,db as X,e as cr,ea as f,f as lr,fa as yr,g as Et,h as Ot,ha as ue,i as z,ia as P,ib as xt,j as M,jb as _,lb as Ar,m as F,n as A,na as Sr,nb as Tr,o as h,ob as Lt,p as we,pa as Cr,pb as Er,q as hr,r as dr,ra as Ke,rb as Ie,t as v,ta as Ye,u as Ve,v as T,va as wr,vc as kr,w as Mt,wb as Or,x as fr,xb as Mr,xc as Q,y as Ge,yb as Dr,za as be,zb as Nr}from"./chunk-O76B43BY.js";var d="primary",$e=Symbol("RouteTitle"),Ft=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 re(t){return new Ft(t)}function Zr(t,n,e){let r=e.path.split("/");if(r.length>t.length||e.pathMatch==="full"&&(n.hasChildren()||r.length<t.length))return null;let i={};for(let o=0;o<r.length;o++){let s=r[o],a=t[o];if(s[0]===":")i[s.substring(1)]=a;else if(s!==a.path)return null}return{consumed:t.slice(0,r.length),posParams:i}}function kn(t,n){if(t.length!==n.length)return!1;for(let e=0;e<t.length;++e)if(!j(t[e],n[e]))return!1;return!0}function j(t,n){let e=t?qt(t):void 0,r=n?qt(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],!Jr(t[i],n[i]))return!1;return!0}function qt(t){return[...Object.keys(t),...Object.getOwnPropertySymbols(t)]}function Jr(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 Xr(t){return t.length>0?t[t.length-1]:null}function H(t){return hr(t)?t:Mr(t)?A(Promise.resolve(t)):h(t)}var $n={exact:tn,subset:rn},en={exact:zn,subset:Fn,ignored:()=>!0};function Hr(t,n,e){return $n[e.paths](t.root,n.root,e.matrixParams)&&en[e.queryParams](t.queryParams,n.queryParams)&&!(e.fragment==="exact"&&t.fragment!==n.fragment)}function zn(t,n){return j(t,n)}function tn(t,n,e){if(!ee(t.segments,n.segments)||!rt(t.segments,n.segments,e)||t.numberOfChildren!==n.numberOfChildren)return!1;for(let r in n.children)if(!t.children[r]||!tn(t.children[r],n.children[r],e))return!1;return!0}function Fn(t,n){return Object.keys(n).length<=Object.keys(t).length&&Object.keys(n).every(e=>Jr(t[e],n[e]))}function rn(t,n,e){return nn(t,n,n.segments,e)}function nn(t,n,e,r){if(t.segments.length>e.length){let i=t.segments.slice(0,e.length);return!(!ee(i,e)||n.hasChildren()||!rt(i,e,r))}else if(t.segments.length===e.length){if(!ee(t.segments,e)||!rt(t.segments,e,r))return!1;for(let i in n.children)if(!t.children[i]||!rn(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!ee(t.segments,i)||!rt(t.segments,i,r)||!t.children[d]?!1:nn(t.children[d],n,o,r)}}function rt(t,n,e){return n.every((r,i)=>en[e](t[i].parameters,r.parameters))}var $=class{root;queryParams;fragment;_queryParamMap;constructor(n=new g([],{}),e={},r=null){this.root=n,this.queryParams=e,this.fragment=r}get queryParamMap(){return this._queryParamMap??=re(this.queryParams),this._queryParamMap}toString(){return Hn.serialize(this)}},g=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 nt(this)}},K=class{path;parameters;_parameterMap;constructor(n,e){this.path=n,this.parameters=e}get parameterMap(){return this._parameterMap??=re(this.parameters),this._parameterMap}toString(){return sn(this)}};function qn(t,n){return ee(t,n)&&t.every((e,r)=>j(e.parameters,n[r].parameters))}function ee(t,n){return t.length!==n.length?!1:t.every((e,r)=>e.path===n[r].path)}function Bn(t,n){let e=[];return Object.entries(t.children).forEach(([r,i])=>{r===d&&(e=e.concat(n(i,r)))}),Object.entries(t.children).forEach(([r,i])=>{r!==d&&(e=e.concat(n(i,r)))}),e}var ze=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:()=>new ne,providedIn:"root"})}return t})(),ne=class{parse(n){let e=new Ht(n);return new $(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(n){let e=`/${Ae(n.root,!0)}`,r=Wn(n.queryParams),i=typeof n.fragment=="string"?`#${Vn(n.fragment)}`:"";return`${e}${r}${i}`}},Hn=new ne;function nt(t){return t.segments.map(n=>sn(n)).join("/")}function Ae(t,n){if(!t.hasChildren())return nt(t);if(n){let e=t.children[d]?Ae(t.children[d],!1):"",r=[];return Object.entries(t.children).forEach(([i,o])=>{i!==d&&r.push(`${i}:${Ae(o,!1)}`)}),r.length>0?`${e}(${r.join("//")})`:e}else{let e=Bn(t,(r,i)=>i===d?[Ae(t.children[d],!1)]:[`${i}:${Ae(r,!1)}`]);return Object.keys(t.children).length===1&&t.children[d]!=null?`${nt(t)}/${e[0]}`:`${nt(t)}/(${e.join("//")})`}}function on(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function et(t){return on(t).replace(/%3B/gi,";")}function Vn(t){return encodeURI(t)}function Bt(t){return on(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function it(t){return decodeURIComponent(t)}function Vr(t){return it(t.replace(/\+/g,"%20"))}function sn(t){return`${Bt(t.path)}${Gn(t.parameters)}`}function Gn(t){return Object.entries(t).map(([n,e])=>`;${Bt(n)}=${Bt(e)}`).join("")}function Wn(t){let n=Object.entries(t).map(([e,r])=>Array.isArray(r)?r.map(i=>`${et(e)}=${et(i)}`).join("&"):`${et(e)}=${et(r)}`).filter(e=>e);return n.length?`?${n.join("&")}`:""}var Qn=/^[^\/()?;#]+/;function jt(t){let n=t.match(Qn);return n?n[0]:""}var Kn=/^[^\/()?;=#]+/;function Yn(t){let n=t.match(Kn);return n?n[0]:""}var Zn=/^[^=?&#]+/;function Jn(t){let n=t.match(Zn);return n?n[0]:""}var Xn=/^[^&#]+/;function ei(t){let n=t.match(Xn);return n?n[0]:""}var Ht=class{url;remaining;constructor(n){this.url=n,this.remaining=n}parseRootSegment(){return this.consumeOptional("/"),this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new g([],{}):new g([],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(){if(this.remaining==="")return{};this.consumeOptional("/");let n=[];for(this.peekStartsWith("(")||n.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),n.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let r={};return this.peekStartsWith("(")&&(r=this.parseParens(!1)),(n.length>0||Object.keys(e).length>0)&&(r[d]=new g(n,e)),r}parseSegment(){let n=jt(this.remaining);if(n===""&&this.peekStartsWith(";"))throw new S(4009,!1);return this.capture(n),new K(it(n),this.parseMatrixParams())}parseMatrixParams(){let n={};for(;this.consumeOptional(";");)this.parseParam(n);return n}parseParam(n){let e=Yn(this.remaining);if(!e)return;this.capture(e);let r="";if(this.consumeOptional("=")){let i=jt(this.remaining);i&&(r=i,this.capture(r))}n[it(e)]=it(r)}parseQueryParam(n){let e=Jn(this.remaining);if(!e)return;this.capture(e);let r="";if(this.consumeOptional("=")){let s=ei(this.remaining);s&&(r=s,this.capture(r))}let i=Vr(e),o=Vr(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){let e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let r=jt(this.remaining),i=this.remaining[r.length];if(i!=="/"&&i!==")"&&i!==";")throw new S(4010,!1);let o;r.indexOf(":")>-1?(o=r.slice(0,r.indexOf(":")),this.capture(o),this.capture(":")):n&&(o=d);let s=this.parseChildren();e[o??d]=Object.keys(s).length===1&&s[d]?s[d]:new g([],s),this.consumeOptional("//")}return e}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 S(4011,!1)}};function an(t){return t.segments.length>0?new g([],{[d]:t}):t}function un(t){let n={};for(let[r,i]of Object.entries(t.children)){let o=un(i);if(r===d&&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 g(t.segments,n);return ti(e)}function ti(t){if(t.numberOfChildren===1&&t.children[d]){let n=t.children[d];return new g(t.segments.concat(n.segments),n.children)}return t}function Y(t){return t instanceof $}function cn(t,n,e=null,r=null){let i=ln(t);return hn(i,n,e,r)}function ln(t){let n;function e(o){let s={};for(let u of o.children){let c=e(u);s[u.outlet]=c}let a=new g(o.url,s);return o===t&&(n=a),a}let r=e(t.root),i=an(r);return n??i}function hn(t,n,e,r){let i=t;for(;i.parent;)i=i.parent;if(n.length===0)return kt(i,i,i,e,r);let o=ri(n);if(o.toRoot())return kt(i,i,new g([],{}),e,r);let s=ni(o,i,t),a=s.processChildren?Ee(s.segmentGroup,s.index,o.commands):fn(s.segmentGroup,s.index,o.commands);return kt(i,s.segmentGroup,a,e,r)}function ot(t){return typeof t=="object"&&t!=null&&!t.outlets&&!t.segmentPath}function De(t){return typeof t=="object"&&t!=null&&t.outlets}function kt(t,n,e,r,i){let o={};r&&Object.entries(r).forEach(([u,c])=>{o[u]=Array.isArray(c)?c.map(p=>`${p}`):`${c}`});let s;t===n?s=e:s=dn(t,n,e);let a=an(un(s));return new $(a,o,i)}function dn(t,n,e){let r={};return Object.entries(t.children).forEach(([i,o])=>{o===n?r[i]=e:r[i]=dn(o,n,e)}),new g(t.segments,r)}var st=class{isAbsolute;numberOfDoubleDots;commands;constructor(n,e,r){if(this.isAbsolute=n,this.numberOfDoubleDots=e,this.commands=r,n&&r.length>0&&ot(r[0]))throw new S(4003,!1);let i=r.find(De);if(i&&i!==Xr(r))throw new S(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function ri(t){if(typeof t[0]=="string"&&t.length===1&&t[0]==="/")return new st(!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(([u,c])=>{a[u]=typeof c=="string"?c.split("/"):c}),[...i,{outlets:a}]}if(o.segmentPath)return[...i,o.segmentPath]}return typeof o!="string"?[...i,o]:s===0?(o.split("/").forEach((a,u)=>{u==0&&a==="."||(u==0&&a===""?e=!0:a===".."?n++:a!=""&&i.push(a))}),i):[...i,o]},[]);return new st(e,n,r)}var he=class{segmentGroup;processChildren;index;constructor(n,e,r){this.segmentGroup=n,this.processChildren=e,this.index=r}};function ni(t,n,e){if(t.isAbsolute)return new he(n,!0,0);if(!e)return new he(n,!1,NaN);if(e.parent===null)return new he(e,!0,0);let r=ot(t.commands[0])?0:1,i=e.segments.length-1+r;return ii(e,i,t.numberOfDoubleDots)}function ii(t,n,e){let r=t,i=n,o=e;for(;o>i;){if(o-=i,r=r.parent,!r)throw new S(4005,!1);i=r.segments.length}return new he(r,!1,i-o)}function oi(t){return De(t[0])?t[0].outlets:{[d]:t}}function fn(t,n,e){if(t??=new g([],{}),t.segments.length===0&&t.hasChildren())return Ee(t,n,e);let r=si(t,n,e),i=e.slice(r.commandIndex);if(r.match&&r.pathIndex<t.segments.length){let o=new g(t.segments.slice(0,r.pathIndex),{});return o.children[d]=new g(t.segments.slice(r.pathIndex),t.children),Ee(o,0,i)}else return r.match&&i.length===0?new g(t.segments,{}):r.match&&!t.hasChildren()?Vt(t,n,e):r.match?Ee(t,0,i):Vt(t,n,e)}function Ee(t,n,e){if(e.length===0)return new g(t.segments,{});{let r=oi(e),i={};if(Object.keys(r).some(o=>o!==d)&&t.children[d]&&t.numberOfChildren===1&&t.children[d].segments.length===0){let o=Ee(t.children[d],n,e);return new g(t.segments,o.children)}return Object.entries(r).forEach(([o,s])=>{typeof s=="string"&&(s=[s]),s!==null&&(i[o]=fn(t.children[o],n,s))}),Object.entries(t.children).forEach(([o,s])=>{r[o]===void 0&&(i[o]=s)}),new g(t.segments,i)}}function si(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(De(a))break;let u=`${a}`,c=r<e.length-1?e[r+1]:null;if(i>0&&u===void 0)break;if(u&&c&&typeof c=="object"&&c.outlets===void 0){if(!Wr(u,c,s))return o;r+=2}else{if(!Wr(u,{},s))return o;r++}i++}return{match:!0,pathIndex:i,commandIndex:r}}function Vt(t,n,e){let r=t.segments.slice(0,n),i=0;for(;i<e.length;){let o=e[i];if(De(o)){let u=ai(o.outlets);return new g(r,u)}if(i===0&&ot(e[0])){let u=t.segments[n];r.push(new K(u.path,Gr(e[0]))),i++;continue}let s=De(o)?o.outlets[d]:`${o}`,a=i<e.length-1?e[i+1]:null;s&&a&&ot(a)?(r.push(new K(s,Gr(a))),i+=2):(r.push(new K(s,{})),i++)}return new g(r,{})}function ai(t){let n={};return Object.entries(t).forEach(([e,r])=>{typeof r=="string"&&(r=[r]),r!==null&&(n[e]=Vt(new g([],{}),0,r))}),n}function Gr(t){let n={};return Object.entries(t).forEach(([e,r])=>n[e]=`${r}`),n}function Wr(t,n,e){return t==e.path&&j(n,e.parameters)}var Oe="imperative",m=(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})(m||{}),O=class{id;url;constructor(n,e){this.id=n,this.url=e}},ie=class extends O{type=m.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}')`}},L=class extends O{urlAfterRedirects;type=m.NavigationEnd;constructor(n,e,r){super(n,e),this.urlAfterRedirects=r}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},w=(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})(w||{}),Ne=(function(t){return t[t.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",t[t.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",t})(Ne||{}),k=class extends O{reason;code;type=m.NavigationCancel;constructor(n,e,r,i){super(n,e),this.reason=r,this.code=i}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}},q=class extends O{reason;code;type=m.NavigationSkipped;constructor(n,e,r,i){super(n,e),this.reason=r,this.code=i}},fe=class extends O{error;target;type=m.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})`}},Ue=class extends O{urlAfterRedirects;state;type=m.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})`}},at=class extends O{urlAfterRedirects;state;type=m.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})`}},ut=class extends O{urlAfterRedirects;state;shouldActivate;type=m.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})`}},ct=class extends O{urlAfterRedirects;state;type=m.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})`}},lt=class extends O{urlAfterRedirects;state;type=m.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})`}},ht=class{route;type=m.RouteConfigLoadStart;constructor(n){this.route=n}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},dt=class{route;type=m.RouteConfigLoadEnd;constructor(n){this.route=n}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},ft=class{snapshot;type=m.ChildActivationStart;constructor(n){this.snapshot=n}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},pt=class{snapshot;type=m.ChildActivationEnd;constructor(n){this.snapshot=n}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},gt=class{snapshot;type=m.ActivationStart;constructor(n){this.snapshot=n}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},vt=class{snapshot;type=m.ActivationEnd;constructor(n){this.snapshot=n}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}};var Pe=class{},pe=class{url;navigationBehaviorOptions;constructor(n,e){this.url=n,this.navigationBehaviorOptions=e}};function ui(t){return!(t instanceof Pe)&&!(t instanceof pe)}function ci(t,n){return t.providers&&!t._injector&&(t._injector=Lt(t.providers,n,`Route: ${t.path}`)),t._injector??n}function x(t){return t.outlet||d}function li(t,n){let e=t.filter(r=>x(r)===n);return e.push(...t.filter(r=>x(r)!==n)),e}function me(t){if(!t)return null;if(t.routeConfig?._injector)return t.routeConfig._injector;for(let n=t.parent;n;n=n.parent){let e=n.routeConfig;if(e?._loadedInjector)return e._loadedInjector;if(e?._injector)return e._injector}return null}var mt=class{rootInjector;outlet=null;route=null;children;attachRef=null;get injector(){return me(this.route?.snapshot)??this.rootInjector}constructor(n){this.rootInjector=n,this.children=new Re(this.rootInjector)}},Re=(()=>{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 mt(this.rootInjector),this.contexts.set(e,r)),r}getContext(e){return this.contexts.get(e)||null}static \u0275fac=function(r){return new(r||t)(Qe(ue))};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Rt=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=Gt(n,this._root);return e?e.children.map(r=>r.value):[]}firstChild(n){let e=Gt(n,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(n){let e=Wt(n,this._root);return e.length<2?[]:e[e.length-2].children.map(i=>i.value).filter(i=>i!==n)}pathFromRoot(n){return Wt(n,this._root).map(e=>e.value)}};function Gt(t,n){if(t===n.value)return n;for(let e of n.children){let r=Gt(t,e);if(r)return r}return null}function Wt(t,n){if(t===n.value)return[n];for(let e of n.children){let r=Wt(t,e);if(r.length)return r.unshift(n),r}return[]}var E=class{value;children;constructor(n,e){this.value=n,this.children=e}toString(){return`TreeNode(${this.value})`}};function le(t){let n={};return t&&t.children.forEach(e=>n[e.value.outlet]=e),n}var _e=class extends Rt{snapshot;constructor(n,e){super(n),this.snapshot=e,tr(this,n)}toString(){return this.snapshot.toString()}};function pn(t){let n=hi(t),e=new M([new K("",{})]),r=new M({}),i=new M({}),o=new M({}),s=new M(""),a=new B(e,r,o,s,i,d,t,n.root);return a.snapshot=n.root,new _e(new E(a,[]),n)}function hi(t){let n={},e={},r={},o=new te([],n,r,"",e,d,t,null,{});return new xe("",new E(o,[]))}var B=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,u){this.urlSubject=n,this.paramsSubject=e,this.queryParamsSubject=r,this.fragmentSubject=i,this.dataSubject=o,this.outlet=s,this.component=a,this._futureSnapshot=u,this.title=this.dataSubject?.pipe(v(c=>c[$e]))??h(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(v(n=>re(n))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(v(n=>re(n))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function yt(t,n,e="emptyOnly"){let r,{routeConfig:i}=t;return n!==null&&(e==="always"||i?.path===""||!n.component&&!n.routeConfig?.loadComponent)?r={params:l(l({},n.params),t.params),data:l(l({},n.data),t.data),resolve:l(l(l(l({},t.data),n.data),i?.data),t._resolvedData)}:r={params:l({},t.params),data:l({},t.data),resolve:l(l({},t.data),t._resolvedData??{})},i&&vn(i)&&(r.resolve[$e]=i.title),r}var te=class{url;params;queryParams;fragment;data;outlet;component;routeConfig;_resolve;_resolvedData;_routerState;_paramMap;_queryParamMap;get title(){return this.data?.[$e]}constructor(n,e,r,i,o,s,a,u,c){this.url=n,this.params=e,this.queryParams=r,this.fragment=i,this.data=o,this.outlet=s,this.component=a,this.routeConfig=u,this._resolve=c}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??=re(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=re(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}')`}},xe=class extends Rt{url;constructor(n,e){super(e),this.url=n,tr(this,e)}toString(){return gn(this._root)}};function tr(t,n){n.value._routerState=t,n.children.forEach(e=>tr(t,e))}function gn(t){let n=t.children.length>0?` { ${t.children.map(gn).join(", ")} } `:"";return`${t.value}${n}`}function $t(t){if(t.snapshot){let n=t.snapshot,e=t._futureSnapshot;t.snapshot=e,j(n.queryParams,e.queryParams)||t.queryParamsSubject.next(e.queryParams),n.fragment!==e.fragment&&t.fragmentSubject.next(e.fragment),j(n.params,e.params)||t.paramsSubject.next(e.params),kn(n.url,e.url)||t.urlSubject.next(e.url),j(n.data,e.data)||t.dataSubject.next(e.data)}else t.snapshot=t._futureSnapshot,t.dataSubject.next(t._futureSnapshot.data)}function Qt(t,n){let e=j(t.params,n.params)&&qn(t.url,n.url),r=!t.parent!=!n.parent;return e&&!r&&(!t.parent||Qt(t.parent,n.parent))}function vn(t){return typeof t.title=="string"||t.title===null}var mn=new D(""),rr=(()=>{class t{activated=null;get activatedComponentRef(){return this.activated}_activatedRoute=null;name=d;activateEvents=new X;deactivateEvents=new X;attachEvents=new X;detachEvents=new X;routerOutletData=zr();parentContexts=f(Re);location=f(Ar);changeDetector=f(Ze);inputBinder=f(Fe,{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 S(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new S(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new S(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 S(4013,!1);this._activatedRoute=e;let i=this.location,s=e.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,u=new Kt(e,a,i.injector,this.routerOutletData);this.activated=i.createComponent(s,{index:i.length,injector:u,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=Ie({type:t,selectors:[["router-outlet"]],inputs:{name:"name",routerOutletData:[1,"routerOutletData"]},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],features:[be]})}return t})(),Kt=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===B?this.route:n===Re?this.childContexts:n===mn?this.outletData:this.parent.get(n,e)}},Fe=new D(""),nr=(()=>{class t{outletDataSubscriptions=new Map;bindActivatedRouteToOutletComponent(e){this.unsubscribeFromRouteData(e),this.subscribeToRouteData(e)}unsubscribeFromRouteData(e){this.outletDataSubscriptions.get(e)?.unsubscribe(),this.outletDataSubscriptions.delete(e)}subscribeToRouteData(e){let{activatedRoute:r}=e,i=Ve([r.queryParams,r.params,r.data]).pipe(b(([o,s,a],u)=>(a=l(l(l({},o),s),a),u===0?h(a):Promise.resolve(a)))).subscribe(o=>{if(!e.isActivated||!e.activatedComponentRef||e.activatedRoute!==r||r.component===null){this.unsubscribeFromRouteData(e);return}let s=Fr(r.component);if(!s){this.unsubscribeFromRouteData(e);return}for(let{templateName:a}of s.inputs)e.activatedComponentRef.setInput(a,o[a])});this.outletDataSubscriptions.set(e,i)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:t.\u0275fac})}return t})(),ir=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Er({type:t,selectors:[["ng-component"]],exportAs:["emptyRouterOutlet"],decls:1,vars:0,template:function(r,i){r&1&&Pr(0,"router-outlet")},dependencies:[rr],encapsulation:2})}return t})();function or(t){let n=t.children&&t.children.map(or),e=n?U(l({},t),{children:n}):l({},t);return!e.component&&!e.loadComponent&&(n||e.loadChildren)&&e.outlet&&e.outlet!==d&&(e.component=ir),e}function di(t,n,e){let r=Le(t,n._root,e?e._root:void 0);return new _e(r,n)}function Le(t,n,e){if(e&&t.shouldReuseRoute(n.value,e.value.snapshot)){let r=e.value;r._futureSnapshot=n.value;let i=fi(t,n,e);return new E(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=>Le(t,a)),s}}let r=pi(n.value),i=n.children.map(o=>Le(t,o));return new E(r,i)}}function fi(t,n,e){return n.children.map(r=>{for(let i of e.children)if(t.shouldReuseRoute(r.value,i.value.snapshot))return Le(t,r,i);return Le(t,r)})}function pi(t){return new B(new M(t.url),new M(t.params),new M(t.queryParams),new M(t.fragment),new M(t.data),t.outlet,t.component,t)}var ge=class{redirectTo;navigationBehaviorOptions;constructor(n,e){this.redirectTo=n,this.navigationBehaviorOptions=e}},Rn="ngNavigationCancelingError";function St(t,n){let{redirectTo:e,navigationBehaviorOptions:r}=Y(n)?{redirectTo:n,navigationBehaviorOptions:void 0}:n,i=yn(!1,w.Redirect);return i.url=e,i.navigationBehaviorOptions=r,i}function yn(t,n){let e=new Error(`NavigationCancelingError: ${t||""}`);return e[Rn]=!0,e.cancellationCode=n,e}function gi(t){return Sn(t)&&Y(t.url)}function Sn(t){return!!t&&t[Rn]}var vi=(t,n,e,r)=>v(i=>(new Yt(n,i.targetRouterState,i.currentRouterState,e,r).activate(t),i)),Yt=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),$t(this.futureState.root),this.activateChildRoutes(e,r,n)}deactivateChildRoutes(n,e,r){let i=le(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=le(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=le(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=le(e);n.children.forEach(o=>{this.activateRoutes(o,i[o.value.outlet],r),this.forwardEvent(new vt(o.value.snapshot))}),n.children.length&&this.forwardEvent(new pt(n.value.snapshot))}activateRoutes(n,e,r){let i=n.value,o=e?e.value:null;if($t(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),$t(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)}},Ct=class{path;route;constructor(n){this.path=n,this.route=this.path[this.path.length-1]}},de=class{component;route;constructor(n,e){this.component=n,this.route=e}};function mi(t,n,e){let r=t._root,i=n?n._root:null;return Te(r,i,e,[r.value])}function Ri(t){let n=t.routeConfig?t.routeConfig.canActivateChild:null;return!n||n.length===0?null:{node:t,guards:n}}function ye(t,n){let e=Symbol(),r=n.get(t,e);return r===e?typeof t=="function"&&!Rr(t)?t:n.get(t):r}function Te(t,n,e,r,i={canDeactivateChecks:[],canActivateChecks:[]}){let o=le(n);return t.children.forEach(s=>{yi(s,o[s.value.outlet],e,r.concat([s.value]),i),delete o[s.value.outlet]}),Object.entries(o).forEach(([s,a])=>Me(a,e.getContext(s),i)),i}function yi(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 u=Si(s,o,o.routeConfig.runGuardsAndResolvers);u?i.canActivateChecks.push(new Ct(r)):(o.data=s.data,o._resolvedData=s._resolvedData),o.component?Te(t,n,a?a.children:null,r,i):Te(t,n,e,r,i),u&&a&&a.outlet&&a.outlet.isActivated&&i.canDeactivateChecks.push(new de(a.outlet.component,s))}else s&&Me(n,a,i),i.canActivateChecks.push(new Ct(r)),o.component?Te(t,null,a?a.children:null,r,i):Te(t,null,e,r,i);return i}function Si(t,n,e){if(typeof e=="function")return e(t,n);switch(e){case"pathParamsChange":return!ee(t.url,n.url);case"pathParamsOrQueryParamsChange":return!ee(t.url,n.url)||!j(t.queryParams,n.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!Qt(t,n)||!j(t.queryParams,n.queryParams);default:return!Qt(t,n)}}function Me(t,n,e){let r=le(t),i=t.value;Object.entries(r).forEach(([o,s])=>{i.component?n?Me(s,n.children.getContext(o),e):Me(s,null,e):Me(s,n,e)}),i.component?n&&n.outlet&&n.outlet.isActivated?e.canDeactivateChecks.push(new de(n.outlet.component,i)):e.canDeactivateChecks.push(new de(null,i)):e.canDeactivateChecks.push(new de(null,i))}function qe(t){return typeof t=="function"}function Ci(t){return typeof t=="boolean"}function wi(t){return t&&qe(t.canLoad)}function bi(t){return t&&qe(t.canActivate)}function Ii(t){return t&&qe(t.canActivateChild)}function Ai(t){return t&&qe(t.canDeactivate)}function Ti(t){return t&&qe(t.canMatch)}function Cn(t){return t instanceof dr||t?.name==="EmptyError"}var tt=Symbol("INITIAL_VALUE");function ve(){return b(t=>Ve(t.map(n=>n.pipe(ae(1),vr(tt)))).pipe(v(n=>{for(let e of n)if(e!==!0){if(e===tt)return tt;if(e===!1||Ei(e))return e}return!0}),G(n=>n!==tt),ae(1)))}function Ei(t){return Y(t)||t instanceof ge}function Oi(t,n){return T(e=>{let{targetSnapshot:r,currentSnapshot:i,guards:{canActivateChecks:o,canDeactivateChecks:s}}=e;return s.length===0&&o.length===0?h(U(l({},e),{guardsResult:!0})):Mi(s,r,i,t).pipe(T(a=>a&&Ci(a)?Di(r,o,t,n):h(a)),v(a=>U(l({},e),{guardsResult:a})))})}function Mi(t,n,e,r){return A(t).pipe(T(i=>xi(i.component,i.route,e,n,r)),W(i=>i!==!0,!0))}function Di(t,n,e,r){return A(n).pipe(se(i=>fr(Ui(i.route.parent,r),Ni(i.route,r),_i(t,i.path,e),Pi(t,i.route,e))),W(i=>i!==!0,!0))}function Ni(t,n){return t!==null&&n&&n(new gt(t)),h(!0)}function Ui(t,n){return t!==null&&n&&n(new ft(t)),h(!0)}function Pi(t,n,e){let r=n.routeConfig?n.routeConfig.canActivate:null;if(!r||r.length===0)return h(!0);let i=r.map(o=>Ge(()=>{let s=me(n)??e,a=ye(o,s),u=bi(a)?a.canActivate(n,t):P(s,()=>a(n,t));return H(u).pipe(W())}));return h(i).pipe(ve())}function _i(t,n,e){let r=n[n.length-1],o=n.slice(0,n.length-1).reverse().map(s=>Ri(s)).filter(s=>s!==null).map(s=>Ge(()=>{let a=s.guards.map(u=>{let c=me(s.node)??e,p=ye(u,c),R=Ii(p)?p.canActivateChild(r,t):P(c,()=>p(r,t));return H(R).pipe(W())});return h(a).pipe(ve())}));return h(o).pipe(ve())}function xi(t,n,e,r,i){let o=n&&n.routeConfig?n.routeConfig.canDeactivate:null;if(!o||o.length===0)return h(!0);let s=o.map(a=>{let u=me(n)??i,c=ye(a,u),p=Ai(c)?c.canDeactivate(t,n,e,r):P(u,()=>c(t,n,e,r));return H(p).pipe(W())});return h(s).pipe(ve())}function Li(t,n,e,r){let i=n.canLoad;if(i===void 0||i.length===0)return h(!0);let o=i.map(s=>{let a=ye(s,t),u=wi(a)?a.canLoad(n,e):P(t,()=>a(n,e));return H(u)});return h(o).pipe(ve(),wn(r))}function wn(t){return cr(y(n=>{if(typeof n!="boolean")throw St(t,n)}),v(n=>n===!0))}function ji(t,n,e,r){let i=n.canMatch;if(!i||i.length===0)return h(!0);let o=i.map(s=>{let a=ye(s,t),u=Ti(a)?a.canMatch(n,e):P(t,()=>a(n,e));return H(u)});return h(o).pipe(ve(),wn(r))}var je=class{segmentGroup;constructor(n){this.segmentGroup=n||null}},ke=class extends Error{urlTree;constructor(n){super(),this.urlTree=n}};function ce(t){return we(new je(t))}function ki(t){return we(new S(4e3,!1))}function $i(t){return we(yn(!1,w.GuardRejected))}var Zt=class{urlSerializer;urlTree;constructor(n,e){this.urlSerializer=n,this.urlTree=e}lineralizeSegments(n,e){let r=[],i=e.root;for(;;){if(r=r.concat(i.segments),i.numberOfChildren===0)return h(r);if(i.numberOfChildren>1||!i.children[d])return ki(`${n.redirectTo}`);i=i.children[d]}}applyRedirectCommands(n,e,r,i,o){return zi(e,i,o).pipe(v(s=>{if(s instanceof $)throw new ke(s);let a=this.applyRedirectCreateUrlTree(s,this.urlSerializer.parse(s),n,r);if(s[0]==="/")throw new ke(a);return a}))}applyRedirectCreateUrlTree(n,e,r,i){let o=this.createSegmentGroup(n,e.root,r,i);return new $(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,u])=>{s[a]=this.createSegmentGroup(n,u,r,i)}),new g(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 S(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 zi(t,n,e){if(typeof t=="string")return h(t);let r=t,{queryParams:i,fragment:o,routeConfig:s,url:a,outlet:u,params:c,data:p,title:R}=n;return H(P(e,()=>r({params:c,data:p,queryParams:i,fragment:o,routeConfig:s,url:a,outlet:u,title:R})))}var Jt={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function Fi(t,n,e,r,i){let o=bn(t,n,e);return o.matched?(r=ci(n,r),ji(r,n,e,i).pipe(v(s=>s===!0?o:l({},Jt)))):h(o)}function bn(t,n,e){if(n.path==="**")return qi(e);if(n.path==="")return n.pathMatch==="full"&&(t.hasChildren()||e.length>0)?l({},Jt):{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};let i=(n.matcher||Zr)(e,t,n);if(!i)return l({},Jt);let o={};Object.entries(i.posParams??{}).forEach(([a,u])=>{o[a]=u.path});let s=i.consumed.length>0?l(l({},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 qi(t){return{matched:!0,parameters:t.length>0?Xr(t).parameters:{},consumedSegments:t,remainingSegments:[],positionalParamSegments:{}}}function Qr(t,n,e,r){return e.length>0&&Vi(t,e,r)?{segmentGroup:new g(n,Hi(r,new g(e,t.children))),slicedSegments:[]}:e.length===0&&Gi(t,e,r)?{segmentGroup:new g(t.segments,Bi(t,e,r,t.children)),slicedSegments:e}:{segmentGroup:new g(t.segments,t.children),slicedSegments:e}}function Bi(t,n,e,r){let i={};for(let o of e)if(bt(t,n,o)&&!r[x(o)]){let s=new g([],{});i[x(o)]=s}return l(l({},r),i)}function Hi(t,n){let e={};e[d]=n;for(let r of t)if(r.path===""&&x(r)!==d){let i=new g([],{});e[x(r)]=i}return e}function Vi(t,n,e){return e.some(r=>bt(t,n,r)&&x(r)!==d)}function Gi(t,n,e){return e.some(r=>bt(t,n,r))}function bt(t,n,e){return(t.hasChildren()||n.length>0)&&e.pathMatch==="full"?!1:e.path===""}function Wi(t,n,e){return n.length===0&&!t.children[e]}var Xt=class{};function Qi(t,n,e,r,i,o,s="emptyOnly"){return new er(t,n,e,r,i,s,o).recognize()}var Ki=31,er=class{injector;configLoader;rootComponentType;config;urlTree;paramsInheritanceStrategy;urlSerializer;applyRedirects;absoluteRedirectCount=0;allowRedirects=!0;constructor(n,e,r,i,o,s,a){this.injector=n,this.configLoader=e,this.rootComponentType=r,this.config=i,this.urlTree=o,this.paramsInheritanceStrategy=s,this.urlSerializer=a,this.applyRedirects=new Zt(this.urlSerializer,this.urlTree)}noMatchError(n){return new S(4002,`'${n.segmentGroup}'`)}recognize(){let n=Qr(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(n).pipe(v(({children:e,rootSnapshot:r})=>{let i=new E(r,e),o=new xe("",i),s=cn(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){let e=new te([],Object.freeze({}),Object.freeze(l({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),d,this.rootComponentType,null,{});return this.processSegmentGroup(this.injector,this.config,n,d,e).pipe(v(r=>({children:r,rootSnapshot:e})),J(r=>{if(r instanceof ke)return this.urlTree=r.urlTree,this.match(r.urlTree.root);throw r instanceof je?this.noMatchError(r):r}))}processSegmentGroup(n,e,r,i,o){return r.segments.length===0&&r.hasChildren()?this.processChildren(n,e,r,o):this.processSegment(n,e,r,r.segments,i,!0,o).pipe(v(s=>s instanceof E?[s]:[]))}processChildren(n,e,r,i){let o=[];for(let s of Object.keys(r.children))s==="primary"?o.unshift(s):o.push(s);return A(o).pipe(se(s=>{let a=r.children[s],u=li(e,s);return this.processSegmentGroup(n,u,a,s,i)}),gr((s,a)=>(s.push(...a),s)),Dt(null),pr(),T(s=>{if(s===null)return ce(r);let a=In(s);return Yi(a),h(a)}))}processSegment(n,e,r,i,o,s,a){return A(e).pipe(se(u=>this.processSegmentAgainstRoute(u._injector??n,e,u,r,i,o,s,a).pipe(J(c=>{if(c instanceof je)return h(null);throw c}))),W(u=>!!u),J(u=>{if(Cn(u))return Wi(r,i,o)?h(new Xt):ce(r);throw u}))}processSegmentAgainstRoute(n,e,r,i,o,s,a,u){return x(r)!==s&&(s===d||!bt(i,o,r))?ce(i):r.redirectTo===void 0?this.matchSegmentAgainstRoute(n,i,r,o,s,u):this.allowRedirects&&a?this.expandSegmentAgainstRouteUsingRedirect(n,i,e,r,o,s,u):ce(i)}expandSegmentAgainstRouteUsingRedirect(n,e,r,i,o,s,a){let{matched:u,parameters:c,consumedSegments:p,positionalParamSegments:R,remainingSegments:N}=bn(e,i,o);if(!u)return ce(e);typeof i.redirectTo=="string"&&i.redirectTo[0]==="/"&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>Ki&&(this.allowRedirects=!1));let V=new te(o,c,Object.freeze(l({},this.urlTree.queryParams)),this.urlTree.fragment,Kr(i),x(i),i.component??i._loadedComponent??null,i,Yr(i)),I=yt(V,a,this.paramsInheritanceStrategy);return V.params=Object.freeze(I.params),V.data=Object.freeze(I.data),this.applyRedirects.applyRedirectCommands(p,i.redirectTo,R,V,n).pipe(b(Z=>this.applyRedirects.lineralizeSegments(i,Z)),T(Z=>this.processSegment(n,r,e,Z.concat(N),s,!1,a)))}matchSegmentAgainstRoute(n,e,r,i,o,s){let a=Fi(e,r,i,n,this.urlSerializer);return r.path==="**"&&(e.children={}),a.pipe(b(u=>u.matched?(n=r._injector??n,this.getChildConfig(n,r,i).pipe(b(({routes:c})=>{let p=r._loadedInjector??n,{parameters:R,consumedSegments:N,remainingSegments:V}=u,I=new te(N,R,Object.freeze(l({},this.urlTree.queryParams)),this.urlTree.fragment,Kr(r),x(r),r.component??r._loadedComponent??null,r,Yr(r)),oe=yt(I,s,this.paramsInheritanceStrategy);I.params=Object.freeze(oe.params),I.data=Object.freeze(oe.data);let{segmentGroup:Z,slicedSegments:Tt}=Qr(e,N,V,c);if(Tt.length===0&&Z.hasChildren())return this.processChildren(p,c,Z,I).pipe(v(He=>new E(I,He)));if(c.length===0&&Tt.length===0)return h(new E(I,[]));let Ln=x(r)===o;return this.processSegment(p,c,Z,Tt,Ln?d:o,!0,I).pipe(v(He=>new E(I,He instanceof E?[He]:[])))}))):ce(e)))}getChildConfig(n,e,r){return e.children?h({routes:e.children,injector:n}):e.loadChildren?e._loadedRoutes!==void 0?h({routes:e._loadedRoutes,injector:e._loadedInjector}):Li(n,e,r,this.urlSerializer).pipe(T(i=>i?this.configLoader.loadChildren(n,e).pipe(y(o=>{e._loadedRoutes=o.routes,e._loadedInjector=o.injector})):$i(e))):h({routes:[],injector:n})}};function Yi(t){t.sort((n,e)=>n.value.outlet===d?-1:e.value.outlet===d?1:n.value.outlet.localeCompare(e.value.outlet))}function Zi(t){let n=t.value.routeConfig;return n&&n.path===""}function In(t){let n=[],e=new Set;for(let r of t){if(!Zi(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=In(r.children);n.push(new E(r.value,i))}return n.filter(r=>!e.has(r))}function Kr(t){return t.data||{}}function Yr(t){return t.resolve||{}}function Ji(t,n,e,r,i,o){return T(s=>Qi(t,n,e,r,s.extractedUrl,i,o).pipe(v(({state:a,tree:u})=>U(l({},s),{targetSnapshot:a,urlAfterRedirects:u}))))}function Xi(t,n){return T(e=>{let{targetSnapshot:r,guards:{canActivateChecks:i}}=e;if(!i.length)return h(e);let o=new Set(i.map(u=>u.route)),s=new Set;for(let u of o)if(!s.has(u))for(let c of An(u))s.add(c);let a=0;return A(s).pipe(se(u=>o.has(u)?eo(u,r,t,n):(u.data=yt(u,u.parent,t).resolve,h(void 0))),y(()=>a++),Nt(1),T(u=>a===s.size?h(e):F))})}function An(t){let n=t.children.map(e=>An(e)).flat();return[t,...n]}function eo(t,n,e,r){let i=t.routeConfig,o=t._resolve;return i?.title!==void 0&&!vn(i)&&(o[$e]=i.title),Ge(()=>(t.data=yt(t,t.parent,e).resolve,to(o,t,n,r).pipe(v(s=>(t._resolvedData=s,t.data=l(l({},t.data),s),null)))))}function to(t,n,e,r){let i=qt(t);if(i.length===0)return h({});let o={};return A(i).pipe(T(s=>ro(t[s],n,e,r).pipe(W(),y(a=>{if(a instanceof ge)throw St(new ne,a);o[s]=a}))),Nt(1),v(()=>o),J(s=>Cn(s)?F:we(s)))}function ro(t,n,e,r){let i=me(n)??r,o=ye(t,i),s=o.resolve?o.resolve(n,e):P(i,()=>o(n,e));return H(s)}function zt(t){return b(n=>{let e=t(n);return e?A(e).pipe(v(()=>n)):h(n)})}var sr=(()=>{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===d);return r}getResolvedTitleForRoute(e){return e.data[$e]}static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:()=>f(Tn),providedIn:"root"})}return t})(),Tn=(()=>{class t extends sr{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)(Qe(Br))};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Se=new D("",{providedIn:"root",factory:()=>({})}),Be=new D(""),En=(()=>{class t{componentLoaders=new WeakMap;childrenLoaders=new WeakMap;onLoadStartListener;onLoadEndListener;compiler=f(kr);loadComponent(e,r){if(this.componentLoaders.get(r))return this.componentLoaders.get(r);if(r._loadedComponent)return h(r._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(r);let i=H(P(e,()=>r.loadComponent())).pipe(v(Mn),b(Dn),y(s=>{this.onLoadEndListener&&this.onLoadEndListener(r),r._loadedComponent=s}),We(()=>{this.componentLoaders.delete(r)})),o=new Ot(i,()=>new z).pipe(Et());return this.componentLoaders.set(r,o),o}loadChildren(e,r){if(this.childrenLoaders.get(r))return this.childrenLoaders.get(r);if(r._loadedRoutes)return h({routes:r._loadedRoutes,injector:r._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(r);let o=On(r,this.compiler,e,this.onLoadEndListener).pipe(We(()=>{this.childrenLoaders.delete(r)})),s=new Ot(o,()=>new z).pipe(Et());return this.childrenLoaders.set(r,s),s}static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function On(t,n,e,r){return H(P(e,()=>t.loadChildren())).pipe(v(Mn),b(Dn),T(i=>i instanceof Tr||Array.isArray(i)?h(i):A(n.compileModuleAsync(i))),v(i=>{r&&r(t);let o,s,a=!1;return Array.isArray(i)?(s=i,a=!0):(o=i.create(e).injector,s=o.get(Be,[],{optional:!0,self:!0}).flat()),{routes:s.map(or),injector:o}}))}function no(t){return t&&typeof t=="object"&&"default"in t}function Mn(t){return no(t)?t.default:t}function Dn(t){return h(t)}var It=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:()=>f(io),providedIn:"root"})}return t})(),io=(()=>{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=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Nn=new D("");var Un=new D(""),Pn=(()=>{class t{currentNavigation=Ye(null,{equal:()=>!1});currentTransition=null;lastSuccessfulNavigation=null;events=new z;transitionAbortWithErrorSubject=new z;configLoader=f(En);environmentInjector=f(ue);destroyRef=f(Cr);urlSerializer=f(ze);rootContexts=f(Re);location=f(Xe);inputBindingEnabled=f(Fe,{optional:!0})!==null;titleStrategy=f(sr);options=f(Se,{optional:!0})||{};paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly";urlHandlingStrategy=f(It);createViewTransition=f(Nn,{optional:!0});navigationErrorHandler=f(Un,{optional:!0});navigationId=0;get hasRequestedNavigation(){return this.navigationId!==0}transitions;afterPreactivation=()=>h(void 0);rootComponentType=null;destroyed=!1;constructor(){let e=i=>this.events.next(new ht(i)),r=i=>this.events.next(new dt(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;Q(()=>{this.transitions?.next(U(l({},e),{extractedUrl:this.urlHandlingStrategy.extract(e.rawUrl),targetSnapshot:null,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null,abortController:new AbortController,id:r}))})}setupNavigations(e){return this.transitions=new M(null),this.transitions.pipe(G(r=>r!==null),b(r=>{let i=!1;return h(r).pipe(b(o=>{if(this.navigationId>r.id)return this.cancelNavigationTransition(r,"",w.SupersededByNewNavigation),F;this.currentTransition=r,this.currentNavigation.set({id:o.id,initialUrl:o.rawUrl,extractedUrl:o.extractedUrl,targetBrowserUrl:typeof o.extras.browserUrl=="string"?this.urlSerializer.parse(o.extras.browserUrl):o.extras.browserUrl,trigger:o.source,extras:o.extras,previousNavigation:this.lastSuccessfulNavigation?U(l({},this.lastSuccessfulNavigation),{previousNavigation:null}):null,abort:()=>o.abortController.abort()});let s=!e.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),a=o.extras.onSameUrlNavigation??e.onSameUrlNavigation;if(!s&&a!=="reload")return this.events.next(new q(o.id,this.urlSerializer.serialize(o.rawUrl),"",Ne.IgnoredSameUrlNavigation)),o.resolve(!1),F;if(this.urlHandlingStrategy.shouldProcessUrl(o.rawUrl))return h(o).pipe(b(u=>(this.events.next(new ie(u.id,this.urlSerializer.serialize(u.extractedUrl),u.source,u.restoredState)),u.id!==this.navigationId?F:Promise.resolve(u))),Ji(this.environmentInjector,this.configLoader,this.rootComponentType,e.config,this.urlSerializer,this.paramsInheritanceStrategy),y(u=>{r.targetSnapshot=u.targetSnapshot,r.urlAfterRedirects=u.urlAfterRedirects,this.currentNavigation.update(p=>(p.finalUrl=u.urlAfterRedirects,p));let c=new Ue(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot);this.events.next(c)}));if(s&&this.urlHandlingStrategy.shouldProcessUrl(o.currentRawUrl)){let{id:u,extractedUrl:c,source:p,restoredState:R,extras:N}=o,V=new ie(u,this.urlSerializer.serialize(c),p,R);this.events.next(V);let I=pn(this.rootComponentType).snapshot;return this.currentTransition=r=U(l({},o),{targetSnapshot:I,urlAfterRedirects:c,extras:U(l({},N),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.update(oe=>(oe.finalUrl=c,oe)),h(r)}else return this.events.next(new q(o.id,this.urlSerializer.serialize(o.extractedUrl),"",Ne.IgnoredByUrlHandlingStrategy)),o.resolve(!1),F}),y(o=>{let s=new at(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot);this.events.next(s)}),v(o=>(this.currentTransition=r=U(l({},o),{guards:mi(o.targetSnapshot,o.currentSnapshot,this.rootContexts)}),r)),Oi(this.environmentInjector,o=>this.events.next(o)),y(o=>{if(r.guardsResult=o.guardsResult,o.guardsResult&&typeof o.guardsResult!="boolean")throw St(this.urlSerializer,o.guardsResult);let s=new ut(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot,!!o.guardsResult);this.events.next(s)}),G(o=>o.guardsResult?!0:(this.cancelNavigationTransition(o,"",w.GuardRejected),!1)),zt(o=>{if(o.guards.canActivateChecks.length!==0)return h(o).pipe(y(s=>{let a=new ct(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot);this.events.next(a)}),b(s=>{let a=!1;return h(s).pipe(Xi(this.paramsInheritanceStrategy,this.environmentInjector),y({next:()=>a=!0,complete:()=>{a||this.cancelNavigationTransition(s,"",w.NoDataFromResolver)}}))}),y(s=>{let a=new lt(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot);this.events.next(a)}))}),zt(o=>{let s=a=>{let u=[];if(a.routeConfig?.loadComponent){let c=me(a)??this.environmentInjector;u.push(this.configLoader.loadComponent(c,a.routeConfig).pipe(y(p=>{a.component=p}),v(()=>{})))}for(let c of a.children)u.push(...s(c));return u};return Ve(s(o.targetSnapshot.root)).pipe(Dt(null),ae(1))}),zt(()=>this.afterPreactivation()),b(()=>{let{currentSnapshot:o,targetSnapshot:s}=r,a=this.createViewTransition?.(this.environmentInjector,o.root,s.root);return a?A(a).pipe(v(()=>r)):h(r)}),v(o=>{let s=di(e.routeReuseStrategy,o.targetSnapshot,o.currentRouterState);return this.currentTransition=r=U(l({},o),{targetRouterState:s}),this.currentNavigation.update(a=>(a.targetRouterState=s,a)),r}),y(()=>{this.events.next(new Pe)}),vi(this.rootContexts,e.routeReuseStrategy,o=>this.events.next(o),this.inputBindingEnabled),ae(1),Ut(new lr(o=>{let s=r.abortController.signal,a=()=>o.next();return s.addEventListener("abort",a),()=>s.removeEventListener("abort",a)}).pipe(G(()=>!i&&!r.targetRouterState),y(()=>{this.cancelNavigationTransition(r,r.abortController.signal.reason+"",w.Aborted)}))),y({next:o=>{i=!0,this.lastSuccessfulNavigation=Q(this.currentNavigation),this.events.next(new L(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects))),this.titleStrategy?.updateTitle(o.targetRouterState.snapshot),o.resolve(!0)},complete:()=>{i=!0}}),Ut(this.transitionAbortWithErrorSubject.pipe(y(o=>{throw o}))),We(()=>{i||this.cancelNavigationTransition(r,"",w.SupersededByNewNavigation),this.currentTransition?.id===r.id&&(this.currentNavigation.set(null),this.currentTransition=null)}),J(o=>{if(this.destroyed)return r.resolve(!1),F;if(i=!0,Sn(o))this.events.next(new k(r.id,this.urlSerializer.serialize(r.extractedUrl),o.message,o.cancellationCode)),gi(o)?this.events.next(new pe(o.url,o.navigationBehaviorOptions)):r.resolve(!1);else{let s=new fe(r.id,this.urlSerializer.serialize(r.extractedUrl),o,r.targetSnapshot??void 0);try{let a=P(this.environmentInjector,()=>this.navigationErrorHandler?.(s));if(a instanceof ge){let{message:u,cancellationCode:c}=St(this.urlSerializer,a);this.events.next(new k(r.id,this.urlSerializer.serialize(r.extractedUrl),u,c)),this.events.next(new pe(a.redirectTo,a.navigationBehaviorOptions))}else throw this.events.next(s),o}catch(a){this.options.resolveNavigationPromiseOnError?r.resolve(!1):r.reject(a)}}return F}))}))}cancelNavigationTransition(e,r,i){let o=new k(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=Q(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=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function oo(t){return t!==Oe}var _n=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:()=>f(so),providedIn:"root"})}return t})(),wt=class{shouldDetach(n){return!1}store(n,e){}shouldAttach(n){return!1}retrieve(n){return null}shouldReuseRoute(n,e){return n.routeConfig===e.routeConfig}},so=(()=>{class t extends wt{static \u0275fac=(()=>{let e;return function(i){return(e||(e=Pt(t)))(i||t)}})();static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),xn=(()=>{class t{urlSerializer=f(ze);options=f(Se,{optional:!0})||{};canceledNavigationResolution=this.options.canceledNavigationResolution||"replace";location=f(Xe);urlHandlingStrategy=f(It);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";currentUrlTree=new $;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 $?this.urlSerializer.serialize(s):s}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=pn(null);getRouterState(){return this.routerState}stateMemento=this.createStateMemento();updateStateMemento(){this.stateMemento=this.createStateMemento()}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}resetInternalState({finalUrl:e}){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,e??this.rawUrlTree)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:()=>f(ao),providedIn:"root"})}return t})(),ao=(()=>{class t extends xn{currentPageId=0;lastSuccessfulId=-1;restoredState(){return this.location.getState()}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")})})}handleRouterEvent(e,r){e instanceof ie?this.updateStateMemento():e instanceof q?this.commitTransition(r):e instanceof Ue?this.urlUpdateStrategy==="eager"&&(r.extras.skipLocationChange||this.setBrowserUrl(this.createBrowserPath(r),r)):e instanceof Pe?(this.commitTransition(r),this.urlUpdateStrategy==="deferred"&&!r.extras.skipLocationChange&&this.setBrowserUrl(this.createBrowserPath(r),r)):e instanceof k&&e.code!==w.SupersededByNewNavigation&&e.code!==w.Redirect?this.restoreHistory(r):e instanceof fe?this.restoreHistory(r,!0):e instanceof L&&(this.lastSuccessfulId=e.id,this.currentPageId=this.browserPageId)}setBrowserUrl(e,{extras:r,id:i}){let{replaceUrl:o,state:s}=r;if(this.location.isCurrentPathEqualTo(e)||o){let a=this.browserPageId,u=l(l({},s),this.generateNgRouterState(i,a));this.location.replaceState(e,"",u)}else{let a=l(l({},s),this.generateNgRouterState(i,this.browserPageId+1));this.location.go(e,"",a)}}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())}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.getRawUrlTree()),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(e,r){return this.canceledNavigationResolution==="computed"?{navigationId:e,\u0275routerPageId:r}:{navigationId:e}}static \u0275fac=(()=>{let e;return function(i){return(e||(e=Pt(t)))(i||t)}})();static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function ar(t,n){t.events.pipe(G(e=>e instanceof L||e instanceof k||e instanceof fe||e instanceof q),v(e=>e instanceof L||e instanceof q?0:(e instanceof k?e.code===w.Redirect||e.code===w.SupersededByNewNavigation:!1)?2:1),G(e=>e!==2),ae(1)).subscribe(()=>{n()})}var uo={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},co={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"},Ce=(()=>{class t{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}disposed=!1;nonRouterCurrentEntryChangeSubscription;console=f(Or);stateManager=f(xn);options=f(Se,{optional:!0})||{};pendingTasks=f(wr);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";navigationTransitions=f(Pn);urlSerializer=f(ze);location=f(Xe);urlHandlingStrategy=f(It);injector=f(ue);_events=new z;get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}navigated=!1;routeReuseStrategy=f(_n);onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore";config=f(Be,{optional:!0})?.flat()??[];componentInputBindingEnabled=!!f(Fe,{optional:!0});currentNavigation=this.navigationTransitions.currentNavigation.asReadonly();constructor(){this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this).subscribe({error:e=>{this.console.warn(e)}}),this.subscribeToNavigationEvents()}eventsSubscription=new ur;subscribeToNavigationEvents(){let e=this.navigationTransitions.events.subscribe(r=>{try{let i=this.navigationTransitions.currentTransition,o=Q(this.navigationTransitions.currentNavigation);if(i!==null&&o!==null){if(this.stateManager.handleRouterEvent(r,o),r instanceof k&&r.code!==w.Redirect&&r.code!==w.SupersededByNewNavigation)this.navigated=!0;else if(r instanceof L)this.navigated=!0;else if(r instanceof pe){let s=r.navigationBehaviorOptions,a=this.urlHandlingStrategy.merge(r.url,i.currentRawUrl),u=l({browserUrl:i.extras.browserUrl,info:i.extras.info,skipLocationChange:i.extras.skipLocationChange,replaceUrl:i.extras.replaceUrl||this.urlUpdateStrategy==="eager"||oo(i.source)},s);this.scheduleNavigation(a,Oe,null,u,{resolve:i.resolve,reject:i.reject,promise:i.promise})}}ui(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),Oe,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((e,r,i)=>{this.navigateToSyncWithBrowser(e,i,r)})}navigateToSyncWithBrowser(e,r,i){let o={replaceUrl:!0},s=i?.navigationId?i:null;if(i){let u=l({},i);delete u.navigationId,delete u.\u0275routerPageId,Object.keys(u).length!==0&&(o.state=u)}let a=this.parseUrl(e);this.scheduleNavigation(a,r,s,o).catch(u=>{this.disposed||this.injector.get(Ke)(u)})}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return Q(this.navigationTransitions.currentNavigation)}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(e){this.config=e.map(or),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this._events.unsubscribe(),this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription&&(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:u}=r,c=u?this.currentUrlTree.fragment:s,p=null;switch(a??this.options.defaultQueryParamsHandling){case"merge":p=l(l({},this.currentUrlTree.queryParams),o);break;case"preserve":p=this.currentUrlTree.queryParams;break;default:p=o||null}p!==null&&(p=this.removeEmptyProps(p));let R;try{let N=i?i.snapshot:this.routerState.snapshot.root;R=ln(N)}catch{(typeof e[0]!="string"||e[0][0]!=="/")&&(e=[]),R=this.currentUrlTree.root}return hn(R,e,p,c??null)}navigateByUrl(e,r={skipLocationChange:!1}){let i=Y(e)?e:this.parseUrl(e),o=this.urlHandlingStrategy.merge(i,this.rawUrlTree);return this.scheduleNavigation(o,Oe,null,r)}navigate(e,r={skipLocationChange:!1}){return lo(e),this.navigateByUrl(this.createUrlTree(e,r),r)}serializeUrl(e){return this.urlSerializer.serialize(e)}parseUrl(e){try{return this.urlSerializer.parse(e)}catch{return this.console.warn(mr(4018,!1)),this.urlSerializer.parse("/")}}isActive(e,r){let i;if(r===!0?i=l({},uo):r===!1?i=l({},co):i=r,Y(e))return Hr(this.currentUrlTree,e,i);let o=this.parseUrl(e);return Hr(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,u,c;s?(a=s.resolve,u=s.reject,c=s.promise):c=new Promise((R,N)=>{a=R,u=N});let p=this.pendingTasks.add();return ar(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(p))}),this.navigationTransitions.handleNavigationRequest({source:r,restoredState:i,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:e,extras:o,resolve:a,reject:u,promise:c,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),c.catch(R=>Promise.reject(R))}static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function lo(t){for(let n=0;n<t.length;n++)if(t[n]==null)throw new S(4008,!1)}var At=(()=>{class t{router;route;tabIndexAttribute;renderer;el;locationStrategy;reactiveHref=Ye(null);get href(){return Q(this.reactiveHref)}set href(e){this.reactiveHref.set(e)}target;queryParams;fragment;queryParamsHandling;state;info;relativeTo;isAnchorElement;subscription;onChanges=new z;applicationErrorHandler=f(Ke);options=f(Se,{optional:!0});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,this.reactiveHref.set(f(new $r("href"),{optional:!0}));let u=s.nativeElement.tagName?.toLowerCase();this.isAnchorElement=u==="a"||u==="area"||!!(typeof customElements=="object"&&customElements.get(u)?.observedAttributes?.includes?.("href")),this.isAnchorElement?this.setTabIndexIfNotOnNativeEl("0"):this.subscribeToNavigationEventsIfNecessary()}subscribeToNavigationEventsIfNecessary(){if(this.subscription!==void 0||!this.isAnchorElement)return;let e=this.preserveFragment,r=i=>i==="merge"||i==="preserve";e||=r(this.queryParamsHandling),e||=!this.queryParamsHandling&&!r(this.options?.defaultQueryParamsHandling),e&&(this.subscription=this.router.events.subscribe(i=>{i instanceof L&&this.updateHref()}))}preserveFragment=!1;skipLocationChange=!1;replaceUrl=!1;setTabIndexIfNotOnNativeEl(e){this.tabIndexAttribute!=null||this.isAnchorElement||this.applyAttributeValue("tabindex",e)}ngOnChanges(e){this.isAnchorElement&&(this.updateHref(),this.subscribeToNavigationEventsIfNecessary()),this.onChanges.next(this)}routerLinkInput=null;set routerLink(e){e==null?(this.routerLinkInput=null,this.setTabIndexIfNotOnNativeEl(null)):(Y(e)?this.routerLinkInput=e:this.routerLinkInput=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 u={skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state,info:this.info};return this.router.navigateByUrl(a,u)?.catch(c=>{this.applicationErrorHandler(c)}),!this.isAnchorElement}ngOnDestroy(){this.subscription?.unsubscribe()}updateHref(){let e=this.urlTree;this.reactiveHref.set(e!==null&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(e))??"":null)}applyAttributeValue(e,r){let i=this.renderer,o=this.el.nativeElement;r!==null?i.setAttribute(o,e,r):i.removeAttribute(o,e)}get urlTree(){return this.routerLinkInput===null?null:Y(this.routerLinkInput)?this.routerLinkInput:this.router.createUrlTree(this.routerLinkInput,{relativeTo:this.relativeTo!==void 0?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:this.preserveFragment})}static \u0275fac=function(r){return new(r||t)(_(Ce),_(B),br("tabindex"),_(xt),_(_t),_(qr))};static \u0275dir=Ie({type:t,selectors:[["","routerLink",""]],hostVars:2,hostBindings:function(r,i){r&1&&_r("click",function(s){return i.onClick(s.button,s.ctrlKey,s.shiftKey,s.altKey,s.metaKey)}),r&2&&Ur("href",i.reactiveHref(),Ir)("target",i.target)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",info:"info",relativeTo:"relativeTo",preserveFragment:[2,"preserveFragment","preserveFragment",Je],skipLocationChange:[2,"skipLocationChange","skipLocationChange",Je],replaceUrl:[2,"replaceUrl","replaceUrl",Je],routerLink:"routerLink"},features:[be]})}return t})(),fo=(()=>{class t{router;element;renderer;cdr;link;links;classes=[];routerEventsSubscription;linkInputChangesSubscription;_isActive=!1;get isActive(){return this._isActive}routerLinkActiveOptions={exact:!1};ariaCurrentWhenActive;isActiveChange=new X;constructor(e,r,i,o,s){this.router=e,this.element=r,this.renderer=i,this.cdr=o,this.link=s,this.routerEventsSubscription=e.events.subscribe(a=>{a instanceof L&&this.update()})}ngAfterContentInit(){h(this.links.changes,h(null)).pipe(Mt()).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(Mt()).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=po(this.routerLinkActiveOptions)?this.routerLinkActiveOptions:this.routerLinkActiveOptions.exact||!1;return i=>{let o=i.urlTree;return o?e.isActive(o,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)(_(Ce),_(_t),_(xt),_(Ze),_(At,8))};static \u0275dir=Ie({type:t,selectors:[["","routerLinkActive",""]],contentQueries:function(r,i,o){if(r&1&&xr(o,At,5),r&2){let s;Lr(s=jr())&&(i.links=s)}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",ariaCurrentWhenActive:"ariaCurrentWhenActive",routerLinkActive:"routerLinkActive"},outputs:{isActiveChange:"isActiveChange"},exportAs:["routerLinkActive"],features:[be]})}return t})();function po(t){return!!t.paths}var go=new D("");function vo(t,...n){return yr([{provide:Be,multi:!0,useValue:t},[],{provide:B,useFactory:mo,deps:[Ce]},{provide:Dr,multi:!0,useFactory:yo},n.map(e=>e.\u0275providers)])}function mo(t){return t.routerState.root}function Ro(t,n){return{\u0275kind:t,\u0275providers:n}}function yo(){let t=f(Sr);return n=>{let e=t.get(Nr);if(n!==e.components[0])return;let r=t.get(Ce),i=t.get(So);t.get(Co)===1&&r.initialNavigation(),t.get(wo,null,{optional:!0})?.setUpPreloading(),t.get(go,null,{optional:!0})?.init(),r.resetRootComponentType(e.componentTypes[0]),i.closed||(i.next(),i.complete(),i.unsubscribe())}}var So=new D("",{factory:()=>new z}),Co=new D("",{providedIn:"root",factory:()=>1});var wo=new D("");function bo(){return Ro(8,[nr,{provide:Fe,useExisting:nr}])}export{rr as a,Ce as b,At as c,fo as d,vo as e,bo as f};
@@ -0,0 +1 @@
1
+ import{a as U}from"./chunk-WAN7TQQW.js";import{a as W,b as j}from"./chunk-3EPFSBJ2.js";import{a as pt}from"./chunk-7LKM244H.js";import"./chunk-LBWOIG7N.js";import"./chunk-AGN2F6JP.js";import"./chunk-SR4HVFOB.js";import{a as q,b as dt,c as mt,d as B}from"./chunk-WOMCRDMJ.js";import{a as L,b as F}from"./chunk-VHALTUPL.js";import"./chunk-YNQPX5G6.js";import"./chunk-6MTVWBQQ.js";import"./chunk-TGSV7ZHM.js";import"./chunk-VMW35ZNT.js";import"./chunk-FRKUCFVI.js";import"./chunk-B2DPS6BL.js";import{b as st,c as lt}from"./chunk-PRLUGTKR.js";import{f as ct}from"./chunk-UC7AWK4C.js";import{d as K}from"./chunk-X4RGWMLE.js";import"./chunk-JWXROQJJ.js";import"./chunk-EBGPIJ7S.js";import{$b as it,Db as V,Eb as _,Fb as u,Gb as et,Hb as D,Ib as h,Jb as M,Kb as x,Lb as o,Mb as r,Nb as C,Sb as v,Ub as g,Wa as N,Wb as p,Ya as tt,_a as s,_b as nt,a as R,ac as ot,b as $,db as P,ea as O,fc as z,gc as k,ic as c,ja as d,jc as f,ka as m,kc as E,lc as A,pa as Z,pb as T,ta as w,tc as rt,yc as I,zc as at}from"./chunk-O76B43BY.js";var G=(n,e)=>e.name;function ft(n,e){if(n&1&&C(0,"span",5),n&2){let t=e.$implicit;V("data-k",t)}}function xt(n,e){if(n&1&&(o(0,"span",8)(1,"span",22),c(2,"error"),r(),c(3),r()),n&2){let t=p().$implicit;x("matTooltip",t.errorCount+" errors"),s(3),E("",t.errorCount," ")}}function Ct(n,e){if(n&1&&(o(0,"span",11)(1,"span",22),c(2,"lan"),r(),o(3,"dm-mono"),c(4),r()()),n&2){let t=p().$implicit;s(4),f(t.port)}}function vt(n,e){if(n&1){let t=v();o(0,"a",23),g("click",function(a){return d(t),m(a.stopPropagation())}),o(1,"span",22),c(2,"open_in_new"),r(),o(3,"dm-mono"),c(4),r()()}if(n&2){let t=p().$implicit;x("href",t.url,N),s(4),f(t.url)}}function bt(n,e){if(n&1&&(o(0,"span",15)(1,"span",22),c(2,"folder_open"),r(),c(3),r()),n&2){let t=p().$implicit;s(3),f(t.workspaceLabel)}}function yt(n,e){if(n&1&&(o(0,"span",16),c(1),r()),n&2){let t=p().$implicit,i=p();s(),f(i.fmtSince(t.lastChangeMs))}}function wt(n,e){n&1&&C(0,"mat-spinner",21)}function ht(n,e){n&1&&(o(0,"span",22),c(1,"play_arrow"),r())}function Mt(n,e){if(n&1){let t=v();o(0,"button",24),g("click",function(){d(t);let a=p().$implicit,l=p();return m(l.act.emit({name:a.name,kind:"start"}))}),_(1,wt,1,0,"mat-spinner",21)(2,ht,2,0,"span",22),r()}if(n&2){let t=p().$implicit,i=p();x("disabled",i.isBusy(t.name,"start")),s(),u(i.isBusy(t.name,"start")?1:2)}}function kt(n,e){n&1&&C(0,"mat-spinner",21)}function Pt(n,e){n&1&&(o(0,"span",22),c(1,"stop"),r())}function Ot(n,e){if(n&1){let t=v();o(0,"button",25),g("click",function(){d(t);let a=p().$implicit,l=p();return m(l.act.emit({name:a.name,kind:"stop"}))}),_(1,kt,1,0,"mat-spinner",21)(2,Pt,2,0,"span",22),r()}if(n&2){let t=p().$implicit,i=p();x("disabled",i.isBusy(t.name,"stop")),s(),u(i.isBusy(t.name,"stop")?1:2)}}function St(n,e){n&1&&C(0,"mat-spinner",21)}function Tt(n,e){n&1&&(o(0,"span",22),c(1,"restart_alt"),r())}function Vt(n,e){if(n&1){let t=v();o(0,"article",2),g("click",function(){let a=d(t).$implicit,l=p();return m(l.open.emit(a.name))})("mouseenter",function(){let a=d(t).$index,l=p();return m(l.focus.emit(a))})("keydown.enter",function(){let a=d(t).$implicit,l=p();return m(l.open.emit(a.name))}),C(1,"div",3),o(2,"div",4),h(3,ft,1,1,"span",5,et),r(),o(5,"div",6),C(6,"dm-status-pill",7),_(7,xt,4,2,"span",8),r(),o(8,"div",9)(9,"dm-mono"),c(10),r()(),o(11,"div",10),_(12,Ct,5,1,"span",11),_(13,vt,5,2,"a",12),r(),o(14,"div",13)(15,"div",14),_(16,bt,4,1,"span",15),_(17,yt,2,1,"span",16),r(),o(18,"div",17),g("click",function(a){return d(t),m(a.stopPropagation())}),_(19,Mt,3,2,"button",18)(20,Ot,3,2,"button",19),o(21,"button",20),g("click",function(){let a=d(t).$implicit,l=p();return m(l.act.emit({name:a.name,kind:"restart"}))}),_(22,St,1,0,"mat-spinner",21)(23,Tt,2,0,"span",22),r()()()()}if(n&2){let t=e.$implicit,i=e.$index,a=p();z("--dm-tone",a.tone(t.workspaceLabel)),k("f",i===a.focusedIndex),s(2),x("matTooltip",a.ribbonTooltip(t.name)),s(),M(a.ribbonTicks(t.name)),s(3),x("status",t.status)("health",t.health),s(),u(t.errorCount>0?7:-1),s(3),f(t.name),s(2),u(t.port!=null?12:-1),s(),u(t.url?13:-1),s(3),u(t.workspaceLabel?16:-1),s(),u(t.lastChangeMs?17:-1),s(2),u(t.status==="stopped"||t.status==="error"?19:20),s(2),x("disabled",a.isBusy(t.name,"restart")),s(),u(a.isBusy(t.name,"restart")?22:23)}}function Et(n,e){if(n&1&&(o(0,"span",10),c(1),r()),n&2){let t=p().$implicit;s(),f(t.errorCount)}}function At(n,e){n&1&&(o(0,"span",11),c(1,"0"),r())}function It(n,e){n&1&&C(0,"mat-spinner",16)}function Lt(n,e){n&1&&(o(0,"span",17),c(1,"play_arrow"),r())}function Ft(n,e){if(n&1){let t=v();o(0,"button",19),g("click",function(){d(t);let a=p().$implicit,l=p();return m(l.act.emit({name:a.name,kind:"start"}))}),_(1,It,1,0,"mat-spinner",16)(2,Lt,2,0,"span",17),r()}if(n&2){let t=p().$implicit,i=p();x("disabled",i.isBusy(t.name,"start")),s(),u(i.isBusy(t.name,"start")?1:2)}}function Bt(n,e){n&1&&C(0,"mat-spinner",16)}function Rt(n,e){n&1&&(o(0,"span",17),c(1,"stop"),r())}function $t(n,e){if(n&1){let t=v();o(0,"button",20),g("click",function(){d(t);let a=p().$implicit,l=p();return m(l.act.emit({name:a.name,kind:"stop"}))}),_(1,Bt,1,0,"mat-spinner",16)(2,Rt,2,0,"span",17),r()}if(n&2){let t=p().$implicit,i=p();x("disabled",i.isBusy(t.name,"stop")),s(),u(i.isBusy(t.name,"stop")?1:2)}}function Nt(n,e){n&1&&C(0,"mat-spinner",16)}function Dt(n,e){n&1&&(o(0,"span",17),c(1,"restart_alt"),r())}function zt(n,e){if(n&1&&(o(0,"a",18)(1,"span",17),c(2,"open_in_new"),r()()),n&2){let t=p().$implicit;x("href",t.url,N)}}function Kt(n,e){if(n&1){let t=v();o(0,"div",4),g("click",function(){let a=d(t).$implicit,l=p();return m(l.open.emit(a.name))})("mouseenter",function(){let a=d(t).$index,l=p();return m(l.focus.emit(a))})("keydown.enter",function(){let a=d(t).$implicit,l=p();return m(l.open.emit(a.name))}),o(1,"div"),C(2,"dm-status-pill",5),r(),o(3,"div",6),C(4,"span",7),o(5,"dm-mono"),c(6),r()(),o(7,"div",8),c(8),r(),o(9,"div",9)(10,"dm-mono"),c(11),r()(),o(12,"div",9)(13,"dm-mono"),c(14),r()(),o(15,"div",9)(16,"dm-mono"),c(17),r()(),o(18,"div",9)(19,"dm-mono"),c(20),r()(),o(21,"div"),_(22,Et,2,1,"span",10)(23,At,2,0,"span",11),r(),o(24,"div",12),g("click",function(a){return d(t),m(a.stopPropagation())}),_(25,Ft,3,2,"button",13)(26,$t,3,2,"button",14),o(27,"button",15),g("click",function(){let a=d(t).$implicit,l=p();return m(l.act.emit({name:a.name,kind:"restart"}))}),_(28,Nt,1,0,"mat-spinner",16)(29,Dt,2,0,"span",17),r(),_(30,zt,3,1,"a",18),r()()}if(n&2){let t=e.$implicit,i=e.$index,a=p();z("--dm-tone",a.tone(t.workspaceLabel)),k("f",i===a.focusedIndex),s(2),x("status",t.status)("health",t.health),s(4),f(t.name),s(2),f(t.workspaceLabel||"\u2014"),s(3),f(t.port??"\u2014"),s(3),f(a.fmtUptime(t.uptimeMs)),s(3),f(a.fmtPct(t.cpu)),s(3),f(a.fmtMem(t.memMB)),s(2),u(t.errorCount>0?22:23),s(3),u(t.status==="stopped"||t.status==="error"?25:26),s(2),x("disabled",a.isBusy(t.name,"restart")),s(),u(a.isBusy(t.name,"restart")?28:29),s(2),u(t.url?30:-1)}}var Wt=["searchInput"],jt=n=>["/apps",n],qt=(n,e)=>e.key;function Ut(n,e){if(n&1&&(o(0,"div",27)(1,"span",24),c(2),r(),o(3,"span",25),c(4,"errors"),r()()),n&2){let t=p();s(2),f(t.totals.totalErrCount)}}function Qt(n,e){if(n&1&&(o(0,"span",34),c(1),r()),n&2){let t=p(2).$implicit;s(),E(" ",t.firstError.code)}}function Ht(n,e){if(n&1&&(o(0,"dm-mono")(1,"span",33),c(2),r(),_(3,Qt,2,1,"span",34),r()),n&2){let t=p().$implicit;s(2),A("",t.firstError.file,":",t.firstError.line),s(),u(t.firstError.code?3:-1)}}function Yt(n,e){if(n&1&&(o(0,"a",31)(1,"strong"),c(2),r(),o(3,"span",32),c(4),r(),_(5,Ht,4,3,"dm-mono"),r()),n&2){let t=e.$implicit;x("routerLink",rt(5,jt,t.name)),s(2),f(t.name),s(2),A("",t.errCount," ",t.errCount===1?"error":"errors"),s(),u(t.firstError?5:-1)}}function Gt(n,e){if(n&1&&(o(0,"div",28)(1,"div",29)(2,"span",8),c(3,"priority_high"),r(),c(4,"Needs attention "),r(),o(5,"div",30),h(6,Yt,6,7,"a",31,G),r()()),n&2){let t=p();s(6),M(t.needsAttention)}}function Jt(n,e){if(n&1&&(o(0,"section",2)(1,"div",22)(2,"div",23)(3,"span",24),c(4),r(),o(5,"span",25),c(6,"apps"),r()(),o(7,"div",26)(8,"span",24),c(9),r(),o(10,"span",25),c(11,"serving"),r()(),o(12,"div",27)(13,"span",24),c(14),r(),o(15,"span",25),c(16,"errored"),r()(),o(17,"div",23)(18,"span",24),c(19),r(),o(20,"span",25),c(21,"stopped"),r()(),_(22,Ut,5,1,"div",27),r(),_(23,Gt,8,0,"div",28),r()),n&2){let t=e;s(4),f(t.totals.apps),s(5),f(t.totals.serving),s(3),k("dm-zero",!t.totals.errors),s(2),f(t.totals.errors),s(5),f(t.totals.stopped),s(3),u(t.totals.totalErrCount>0?22:-1),s(),u(t.needsAttention.length?23:-1)}}function Xt(n,e){if(n&1&&(c(0," \xB7 workspace "),o(1,"dm-mono"),c(2),r()),n&2){let t=p();s(2),f(t.workspace())}}function Zt(n,e){if(n&1){let t=v();o(0,"button",35),g("click",function(){d(t);let a=p();return m(a.onQuery(""))}),o(1,"span",8),c(2,"close"),r()()}}function te(n,e){if(n&1){let t=v();o(0,"button",36),g("click",function(){let a=d(t).$implicit,l=p();return m(l.setStatus(a.key))}),c(1),o(2,"span",37),c(3),r()()}if(n&2){let t=e.$implicit,i=p();k("active",i.status()===t.key),V("aria-selected",i.status()===t.key),s(),E(" ",t.label),s(2),f(i.countFor(t.key))}}function ee(n,e){if(n&1){let t=v();o(0,"button",40),g("click",function(){let a=d(t).$implicit,l=p(2);return m(l.toggleTag(a))}),c(1),r()}if(n&2){let t=e.$implicit,i=p(2);k("active",i.isTagSelected(t)),V("aria-pressed",i.isTagSelected(t)),s(),f(t)}}function ne(n,e){if(n&1){let t=v();o(0,"button",41),g("click",function(){d(t);let a=p(2);return m(a.clearTags())}),o(1,"span",8),c(2,"close"),r()()}}function ie(n,e){if(n&1&&(o(0,"div",17),h(1,ee,2,4,"button",38,D),_(3,ne,3,0,"button",39),r()),n&2){let t=p();s(),M(t.allTags()),s(2),u(t.selectedTags().size?3:-1)}}function oe(n,e){n&1&&(o(0,"article",42),C(1,"div",43),o(2,"div",44),C(3,"dm-skeleton",45)(4,"dm-skeleton",46)(5,"dm-skeleton",47),r()())}function re(n,e){if(n&1&&(o(0,"div",18),h(1,oe,6,0,"article",42,D),r()),n&2){let t=p();s(),M(t.skeletonItems)}}function ae(n,e){n&1&&(o(0,"dm-empty",19)(1,"div",48)(2,"a",49)(3,"span",8),c(4,"stethoscope"),r(),c(5,"Open Doctor "),r()()())}function se(n,e){n&1&&C(0,"dm-empty",20)}function le(n,e){if(n&1){let t=v();o(0,"dm-apps-cards",50),g("open",function(a){d(t);let l=p();return m(l.open(a))})("focus",function(a){d(t);let l=p();return m(l.focusedIndex.set(a))})("act",function(a){d(t);let l=p();return m(l.act(a.name,a.kind))}),r()}if(n&2){let t=p();x("items",t.filtered())("focusedIndex",t.focusedIndex())("busy",t.busyMap())}}function ce(n,e){if(n&1){let t=v();o(0,"dm-apps-list-view",50),g("open",function(a){d(t);let l=p();return m(l.open(a))})("focus",function(a){d(t);let l=p();return m(l.focusedIndex.set(a))})("act",function(a){d(t);let l=p();return m(l.act(a.name,a.kind))}),r()}if(n&2){let t=p();x("items",t.filtered())("focusedIndex",t.focusedIndex())("busy",t.busyMap())}}var _t="daimon.apps.view",ut="daimon.workspace",Q="daimon.apps.tags",H=class n{items=[];focusedIndex=0;busy={};open=new P;focus=new P;act=new P;tone=U;api=O(K);RIBBON_BUCKETS=20;RIBBON_WINDOW_MS=3600*1e3;perAppTicks=I(()=>{let e=this.api.events(),i=Date.now()-this.RIBBON_WINDOW_MS,a=this.RIBBON_WINDOW_MS/this.RIBBON_BUCKETS,l=new Map,y={stopped:1,serving:2,compiling:3,starting:3,error:4};for(let b of e){if(b.type!=="status"||!b.app||!b.to||b.ts<i)continue;let J=Math.min(this.RIBBON_BUCKETS-1,Math.floor((b.ts-i)/a)),S=l.get(b.app);S||(S=new Array(this.RIBBON_BUCKETS).fill(""),l.set(b.app,S));let X=S[J];(!X||(y[b.to]??0)>(y[X]??0))&&(S[J]=b.to)}return l});isBusy(e,t){return!!this.busy[e]?.[t]}ribbonTicks(e){return this.perAppTicks().get(e)??new Array(this.RIBBON_BUCKETS).fill("")}ribbonTooltip(e){let t=this.perAppTicks().get(e);if(!t)return"no status events in the last 60 min";let i={};for(let l of t)l&&(i[l]=(i[l]??0)+1);let a=Object.entries(i).map(([l,y])=>`${y} ${l}`).join(" \xB7 ");return a?`last 60 min: ${a}`:"no status events in the last 60 min"}fmtSince(e){if(!e||e<=0)return"";let t=Math.floor(e/1e3);return t<60?t+"s ago":t<3600?Math.floor(t/60)+"m ago":t<86400?Math.floor(t/3600)+"h ago":Math.floor(t/86400)+"d ago"}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=T({type:n,selectors:[["dm-apps-cards"]],inputs:{items:"items",focusedIndex:"focusedIndex",busy:"busy"},outputs:{open:"open",focus:"focus",act:"act"},decls:3,vars:0,consts:[[1,"g"],["role","button","tabindex","0",1,"c",3,"f","--dm-tone"],["role","button","tabindex","0",1,"c",3,"click","mouseenter","keydown.enter"],[1,"ac"],["aria-hidden","true",1,"rb",3,"matTooltip"],[1,"tk"],[1,"h"],[3,"status","health"],[1,"eb",3,"matTooltip"],[1,"n"],[1,"m"],["matTooltip","Port",1,"mi"],["target","_blank","rel","noopener",1,"mi","ml",3,"href"],[1,"ft"],[1,"tg"],[1,"ws"],[1,"sn"],[1,"ax",3,"click"],["matTooltip","Start (s)","aria-label","Start",1,"ib",3,"disabled"],["matTooltip","Stop (x)","aria-label","Stop",1,"ib",3,"disabled"],["matTooltip","Restart (r)","aria-label","Restart",1,"ib",3,"click","disabled"],["diameter","16"],[1,"material-symbols-outlined"],["target","_blank","rel","noopener",1,"mi","ml",3,"click","href"],["matTooltip","Start (s)","aria-label","Start",1,"ib",3,"click","disabled"],["matTooltip","Stop (x)","aria-label","Stop",1,"ib",3,"click","disabled"]],template:function(t,i){t&1&&(o(0,"div",0),h(1,Vt,24,16,"article",1,G),r()),t&2&&(s(),M(i.items))},dependencies:[F,L,j,W,q,B],styles:["[_nghost-%COMP%]{display:block}.g[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:1rem}.c[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;background:var(--mat-sys-surface-container-low);border:1px solid var(--mat-sys-outline-variant);border-radius:14px;overflow:hidden;cursor:pointer;transition:box-shadow var(--dm-motion-short) var(--dm-motion-easing),transform var(--dm-motion-short) var(--dm-motion-easing),border-color var(--dm-motion-short) var(--dm-motion-easing)}.c[_ngcontent-%COMP%]:hover{box-shadow:var(--mat-sys-level2);transform:translateY(-1px)}.c.f[_ngcontent-%COMP%]{border-color:var(--mat-sys-primary);box-shadow:0 0 0 2px color-mix(in oklch,var(--mat-sys-primary) 25%,transparent)}.ac[_ngcontent-%COMP%]{height:4px;background:var(--dm-tone,var(--mat-sys-surface-container))}.rb[_ngcontent-%COMP%]{display:flex;gap:1px;height:6px;padding:0 .75rem;align-items:center;background:var(--mat-sys-surface-container-lowest)}.rb[_ngcontent-%COMP%] .tk[_ngcontent-%COMP%]{flex:1;height:6px;border-radius:1px;background:var(--mat-sys-surface-container)}.rb[_ngcontent-%COMP%] .tk[data-k=serving][_ngcontent-%COMP%]{background:color-mix(in oklch,var(--mat-sys-primary) 60%,transparent)}.rb[_ngcontent-%COMP%] .tk[data-k=error][_ngcontent-%COMP%]{background:var(--mat-sys-error)}.rb[_ngcontent-%COMP%] .tk[data-k=starting][_ngcontent-%COMP%], .rb[_ngcontent-%COMP%] .tk[data-k=compiling][_ngcontent-%COMP%]{background:color-mix(in oklch,var(--mat-sys-tertiary) 70%,transparent)}.rb[_ngcontent-%COMP%] .tk[data-k=stopped][_ngcontent-%COMP%]{background:var(--mat-sys-outline-variant)}.h[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:.75rem .875rem 0}.n[_ngcontent-%COMP%]{padding:.375rem .875rem 0;font:500 1.05rem/1.5rem Roboto}.n[_ngcontent-%COMP%] .dm-mono[_ngcontent-%COMP%]{font-size:1.05rem;font-weight:500}.m[_ngcontent-%COMP%]{padding:.25rem .875rem .5rem;display:flex;flex-wrap:wrap;gap:.75rem;color:var(--mat-sys-on-surface-variant)}.mi[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.25rem;font-size:.8125rem}.mi[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:14px}.ml[_ngcontent-%COMP%]{color:var(--mat-sys-primary);text-decoration:none}.ml[_ngcontent-%COMP%]:hover{text-decoration:underline}.ft[_ngcontent-%COMP%]{margin-top:auto;padding:.5rem .75rem .5rem .875rem;display:flex;align-items:center;justify-content:space-between;gap:.5rem;border-top:1px solid var(--mat-sys-outline-variant)}.tg[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.5rem;flex-wrap:wrap;min-width:0}.ws[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.25rem;padding:2px 8px;border-radius:999px;font:500 .6875rem/1rem Roboto;background:var(--mat-sys-surface-container);color:var(--mat-sys-on-surface-variant);border:1px solid var(--mat-sys-outline-variant)}.ws[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:12px}.sn[_ngcontent-%COMP%]{font:400 .6875rem/1rem Roboto;color:var(--mat-sys-on-surface-variant)}.ax[_ngcontent-%COMP%]{display:inline-flex;gap:.25rem}.ib[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;background:transparent;border:0;border-radius:8px;color:var(--mat-sys-on-surface-variant);cursor:pointer;transition:background var(--dm-motion-short) var(--dm-motion-easing),color var(--dm-motion-short) var(--dm-motion-easing)}.ib[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--mat-sys-surface-container-high);color:var(--mat-sys-on-surface)}.ib[_ngcontent-%COMP%]:disabled{opacity:.55;cursor:not-allowed}.ib[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:18px}.eb[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.25rem;padding:1px 8px;border-radius:999px;font:600 .75rem/1rem var(--dm-mono);background:color-mix(in oklch,var(--mat-sys-error) 14%,transparent);color:var(--mat-sys-error);border:1px solid color-mix(in oklch,var(--mat-sys-error) 30%,transparent)}.eb[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:14px}"],changeDetection:0})},Y=class n{items=[];focusedIndex=0;busy={};open=new P;focus=new P;act=new P;tone=U;isBusy(e,t){return!!this.busy[e]?.[t]}fmtUptime(e){if(!e||e<0)return"\u2014";let t=Math.floor(e/1e3);return t<60?t+"s":t<3600?Math.floor(t/60)+"m":t<86400?Math.floor(t/3600)+"h":Math.floor(t/86400)+"d"}fmtPct(e){return e==null||isNaN(e)?"\u2014":e.toFixed(0)+"%"}fmtMem(e){return e==null||isNaN(e)?"\u2014":e>=1024?(e/1024).toFixed(1)+"G":Math.round(e)+"M"}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=T({type:n,selectors:[["dm-apps-list-view"]],inputs:{items:"items",focusedIndex:"focusedIndex",busy:"busy"},outputs:{open:"open",focus:"focus",act:"act"},decls:22,vars:0,consts:[["role","table",1,"ls"],["role","row",1,"rw","rh"],[1,"ar"],["role","row","tabindex","0",1,"rw",3,"f","--dm-tone"],["role","row","tabindex","0",1,"rw",3,"click","mouseenter","keydown.enter"],[3,"status","health"],[1,"nm"],[1,"tn"],[1,"ws"],[1,"sm"],[1,"eb"],[1,"dm"],[1,"ax",3,"click"],["matTooltip","Start","aria-label","Start",1,"ib",3,"disabled"],["matTooltip","Stop","aria-label","Stop",1,"ib",3,"disabled"],["matTooltip","Restart","aria-label","Restart",1,"ib",3,"click","disabled"],["diameter","14"],[1,"material-symbols-outlined"],["target","_blank","rel","noopener","matTooltip","Open","aria-label","Open",1,"ib",3,"href"],["matTooltip","Start","aria-label","Start",1,"ib",3,"click","disabled"],["matTooltip","Stop","aria-label","Stop",1,"ib",3,"click","disabled"]],template:function(t,i){t&1&&(o(0,"div",0)(1,"div",1)(2,"div"),c(3,"status"),r(),o(4,"div"),c(5,"name"),r(),o(6,"div"),c(7,"workspace"),r(),o(8,"div"),c(9,"port"),r(),o(10,"div"),c(11,"uptime"),r(),o(12,"div"),c(13,"cpu"),r(),o(14,"div"),c(15,"mem"),r(),o(16,"div"),c(17,"err"),r(),o(18,"div",2),c(19,"actions"),r()(),h(20,Kt,31,17,"div",3,G),r()),t&2&&(s(20),M(i.items))},dependencies:[F,L,j,W,q,B],styles:['[_nghost-%COMP%]{display:block}.ls[_ngcontent-%COMP%]{background:var(--mat-sys-surface-container-low);border:1px solid var(--mat-sys-outline-variant);border-radius:12px;overflow:hidden}.rw[_ngcontent-%COMP%]{display:grid;align-items:center;gap:.75rem;grid-template-columns:110px minmax(160px,1.5fr) minmax(100px,1fr) 70px 80px 70px 80px 60px 140px;padding:0 .875rem;min-height:36px;cursor:pointer;position:relative;border-bottom:1px solid var(--mat-sys-outline-variant);transition:background var(--dm-motion-short) var(--dm-motion-easing)}.rw[_ngcontent-%COMP%]:last-child{border-bottom:0}.rw[_ngcontent-%COMP%]:hover{background:var(--mat-sys-surface-container)}.rw.f[_ngcontent-%COMP%]{background:color-mix(in oklch,var(--mat-sys-primary) 8%,transparent)}.rw.f[_ngcontent-%COMP%]:before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--mat-sys-primary)}.rh[_ngcontent-%COMP%]{min-height:30px;background:var(--mat-sys-surface-container);cursor:default;font:500 .6875rem/1rem Roboto;text-transform:uppercase;letter-spacing:.04rem;color:var(--mat-sys-on-surface-variant)}.rh[_ngcontent-%COMP%]:hover{background:var(--mat-sys-surface-container)}.nm[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;min-width:0;overflow:hidden}.nm[_ngcontent-%COMP%] .dm-mono[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tn[_ngcontent-%COMP%]{width:3px;height:18px;border-radius:2px;background:var(--dm-tone,var(--mat-sys-surface-container));flex-shrink:0}.ws[_ngcontent-%COMP%]{font-size:.8125rem;color:var(--mat-sys-on-surface-variant);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sm[_ngcontent-%COMP%]{font-size:.8125rem}.ar[_ngcontent-%COMP%], .ax[_ngcontent-%COMP%]{display:inline-flex;gap:.125rem;justify-content:flex-end}.dm[_ngcontent-%COMP%]{color:var(--mat-sys-on-surface-variant);font-size:.8125rem}.ib[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;background:transparent;border:0;border-radius:6px;color:var(--mat-sys-on-surface-variant);cursor:pointer;transition:background var(--dm-motion-short) var(--dm-motion-easing),color var(--dm-motion-short) var(--dm-motion-easing);text-decoration:none}.ib[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--mat-sys-surface-container-high);color:var(--mat-sys-on-surface)}.ib[_ngcontent-%COMP%]:disabled{opacity:.55;cursor:not-allowed}.ib[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:16px}.eb[_ngcontent-%COMP%]{display:inline-flex;align-items:center;padding:0 6px;border-radius:999px;font:600 .75rem/1rem var(--dm-mono);background:color-mix(in oklch,var(--mat-sys-error) 14%,transparent);color:var(--mat-sys-error);border:1px solid color-mix(in oklch,var(--mat-sys-error) 30%,transparent)}@media(max-width:1000px){.rw[_ngcontent-%COMP%]{grid-template-columns:100px minmax(120px,1fr) 70px 70px 60px 110px}.rw[_ngcontent-%COMP%] .ws[_ngcontent-%COMP%], .rw[_ngcontent-%COMP%] .sm[_ngcontent-%COMP%]:nth-of-type(3), .rw[_ngcontent-%COMP%] .sm[_ngcontent-%COMP%]:nth-of-type(4){display:none}}'],changeDetection:0})},gt=class n{api=O(K);router=O(st);snack=O(pt);destroyRef=O(Z);searchInput;view=w("cards");query=w("");status=w("all");workspace=w(null);focusedIndex=w(0);busyMap=w({});selectedTags=w(new Set);allTags=I(()=>{let e=new Set;for(let t of this.api.apps())for(let i of t.tags??[])e.add(i);return Array.from(e).sort()});skeletonItems=Array.from({length:6},(e,t)=>t);statusFilters=[{key:"all",label:"All"},{key:"serving",label:"Serving"},{key:"errors",label:"Errors"},{key:"stopped",label:"Stopped"}];filtered=I(()=>{let e=this.query().trim().toLowerCase(),t=this.status(),i=this.workspace(),a=this.selectedTags();return this.api.apps().filter(l=>{if(i&&l.workspaceLabel!==i||t==="serving"&&l.status!=="serving"||t==="errors"&&l.status!=="error"&&l.errorCount===0||t==="stopped"&&l.status!=="stopped")return!1;if(a.size){let y=l.tags??[];for(let b of a)if(!y.includes(b))return!1}return!(e&&![l.name,l.workspaceLabel??"",...l.tags??[]].join(" ").toLowerCase().includes(e))})});constructor(){this.view.set(localStorage.getItem(_t)==="list"?"list":"cards"),this.workspace.set(localStorage.getItem(ut));let e=(localStorage.getItem(Q)??"").split(",").map(t=>t.trim()).filter(Boolean);e.length&&this.selectedTags.set(new Set(e)),at(()=>{let t=this.filtered().length;this.focusedIndex()>=t&&this.focusedIndex.set(Math.max(0,t-1))}),this.bindWindow("daimon:toggle-density",()=>this.setView(this.view()==="cards"?"list":"cards")),this.bindWindow("daimon:focus-filter",()=>queueMicrotask(()=>this.searchInput?.nativeElement.focus())),this.bindWindow("daimon:workspace",t=>{let i=t.detail;this.workspace.set(i??null)}),this.bindWindow("daimon:key",t=>this.onKey(t.detail))}async ngAfterViewInit(){this.api.ready()||await this.api.refresh()}onStorage(e){e.key===ut&&this.workspace.set(e.newValue)}bindWindow(e,t){window.addEventListener(e,t),this.destroyRef.onDestroy(()=>window.removeEventListener(e,t))}setView(e){this.view.set(e),localStorage.setItem(_t,e)}setStatus(e){this.status.set(e),this.focusedIndex.set(0)}isTagSelected(e){return this.selectedTags().has(e)}toggleTag(e){let t=new Set(this.selectedTags());t.has(e)?t.delete(e):t.add(e),this.selectedTags.set(t),this.persistTags(t),this.focusedIndex.set(0)}clearTags(){this.selectedTags.set(new Set),this.persistTags(new Set),this.focusedIndex.set(0)}persistTags(e){e.size?localStorage.setItem(Q,Array.from(e).join(",")):localStorage.removeItem(Q)}onQuery(e){this.query.set(e),this.focusedIndex.set(0)}open(e){this.router.navigate(["/apps",e])}countFor(e){return this.api.apps().filter(t=>e==="all"?!0:e==="serving"?t.status==="serving":e==="errors"?t.status==="error"||t.errorCount>0:e==="stopped"?t.status==="stopped":!1).length}async act(e,t){if(!this.busyMap()[e]?.[t]){this.setBusy(e,t,!0);try{t==="start"?await this.api.startApp(e):t==="stop"?await this.api.stopApp(e):await this.api.restartApp(e)}catch(i){this.snack.open(`${t} ${e} failed: ${i?.message??"error"}`,"Dismiss",{duration:4e3})}finally{this.setBusy(e,t,!1)}}}setBusy(e,t,i){this.busyMap.update(a=>$(R({},a),{[e]:$(R({},a[e]??{}),{[t]:i})}))}onKey(e){let t=this.filtered();if(!t.length)return;let i=Math.max(0,Math.min(this.focusedIndex(),t.length-1));if(e==="j")this.focusedIndex.set((i+1)%t.length);else if(e==="k")this.focusedIndex.set((i-1+t.length)%t.length);else if(e==="s")this.act(t[i].name,"start");else if(e==="x")this.act(t[i].name,"stop");else if(e==="r"){let a=t[i].name;this.snack.open(`Restart ${a}? Press R again or click confirm.`,"Confirm",{duration:4e3}).onAction().subscribe(()=>{this.act(a,"restart")})}}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=T({type:n,selectors:[["dm-apps-list"]],viewQuery:function(t,i){if(t&1&&nt(Wt,5),t&2){let a;it(a=ot())&&(i.searchInput=a.first)}},hostBindings:function(t,i){t&1&&g("storage",function(l){return i.onStorage(l)},tt)},decls:33,vars:12,consts:[["searchInput",""],[1,"dm-page"],[1,"dm-overview"],[1,"dm-page-header"],[1,"dm-page-sub"],[1,"dm-header-actions"],["role","group","aria-label","View mode",1,"dm-toggle"],["type","button","matTooltip","Cards (.)","aria-label","Cards view",3,"click"],[1,"material-symbols-outlined"],["type","button","matTooltip","Dense list (.)","aria-label","List view",3,"click"],[1,"dm-filterbar"],[1,"dm-search"],[1,"material-symbols-outlined","dm-search-icon"],["type","search","placeholder","Filter apps by name, tag, workspace\u2026","aria-label","Filter apps",3,"input","value"],["type","button","aria-label","Clear",1,"dm-search-clear"],["role","tablist","aria-label","Status filter",1,"dm-chips"],["type","button","role","tab",1,"dm-chip",3,"active"],["role","group","aria-label","Tag filter",1,"dm-chips","dm-tag-row"],[1,"dm-grid-sk"],["icon","rocket_launch","title","No apps discovered yet","hint","Run daimon init --auto in your workspace to discover apps, or run /discover. The doctor page can help diagnose missing apps."],["icon","search_off","title","No matches","hint","No apps match the current filters. Clear them or try a different query."],[3,"items","focusedIndex","busy"],[1,"dm-totals-row"],[1,"dm-total"],[1,"dm-total-num"],[1,"dm-total-label"],[1,"dm-total","dm-total-serving"],[1,"dm-total","dm-total-error"],[1,"dm-attention"],[1,"dm-att-title"],[1,"dm-att-list"],[1,"dm-att-row",3,"routerLink"],[1,"dm-att-meta"],[1,"dm-att-where"],[1,"dm-att-code"],["type","button","aria-label","Clear",1,"dm-search-clear",3,"click"],["type","button","role","tab",1,"dm-chip",3,"click"],[1,"dm-chip-count"],["type","button",1,"dm-chip",3,"active"],["type","button","aria-label","Clear tag filter",1,"dm-chip","dm-chip-clear"],["type","button",1,"dm-chip",3,"click"],["type","button","aria-label","Clear tag filter",1,"dm-chip","dm-chip-clear",3,"click"],[1,"dm-card-sk"],[1,"dm-sk-accent"],[1,"dm-sk-body"],["width","60%","height","1.25rem"],["width","40%","height",".875rem"],["width","80%","height",".875rem"],[1,"dm-empty-actions"],["routerLink","/doctor",1,"dm-link-btn"],[3,"open","focus","act","items","focusedIndex","busy"]],template:function(t,i){if(t&1){let a=v();o(0,"div",1),_(1,Jt,24,8,"section",2),o(2,"header",3)(3,"div")(4,"h1"),c(5,"Apps"),r(),o(6,"div",4),c(7),_(8,Xt,3,1),r()(),o(9,"div",5)(10,"div",6)(11,"button",7),g("click",function(){return d(a),m(i.setView("cards"))}),o(12,"span",8),c(13,"grid_view"),r()(),o(14,"button",9),g("click",function(){return d(a),m(i.setView("list"))}),o(15,"span",8),c(16,"view_list"),r()()()()(),o(17,"div",10)(18,"div",11)(19,"span",12),c(20,"search"),r(),o(21,"input",13,0),g("input",function(y){return d(a),m(i.onQuery(y.target.value))}),r(),_(23,Zt,3,0,"button",14),r(),o(24,"div",15),h(25,te,4,5,"button",16,qt),r(),_(27,ie,4,1,"div",17),r(),_(28,re,3,0,"div",18)(29,ae,6,0,"dm-empty",19)(30,se,1,0,"dm-empty",20)(31,le,1,3,"dm-apps-cards",21)(32,ce,1,3,"dm-apps-list-view",21),r()}if(t&2){let a;s(),u((a=i.api.overview())?1:-1,a),s(6),A(" ",i.filtered().length," of ",i.api.apps().length," visible "),s(),u(i.workspace()?8:-1),s(3),k("active",i.view()==="cards"),s(3),k("active",i.view()==="list"),s(7),x("value",i.query()),s(2),u(i.query()?23:-1),s(2),M(i.statusFilters),s(2),u(i.allTags().length?27:-1),s(),u(i.api.ready()?i.api.apps().length===0?29:i.filtered().length===0?30:i.view()==="cards"?31:32:28)}},dependencies:[lt,ct,F,L,dt,mt,B,H,Y],styles:["[_nghost-%COMP%]{display:block}.dm-page[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.dm-overview[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(280px,1fr) minmax(0,2fr);gap:1rem;padding:1rem 1.25rem;border-radius:14px;background:var(--mat-sys-surface-container-low);border:1px solid var(--mat-sys-outline-variant)}@media(max-width:760px){.dm-overview[_ngcontent-%COMP%]{grid-template-columns:1fr}}.dm-totals-row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.75rem}.dm-total[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:.5rem .875rem;border-radius:10px;background:var(--mat-sys-surface-container);min-width:70px}.dm-total-num[_ngcontent-%COMP%]{font:600 1.5rem/1.75rem Roboto;color:var(--mat-sys-on-surface)}.dm-total-label[_ngcontent-%COMP%]{font:500 .6875rem/1rem Roboto;text-transform:uppercase;letter-spacing:.04rem;color:var(--mat-sys-on-surface-variant)}.dm-total-serving[_ngcontent-%COMP%] .dm-total-num[_ngcontent-%COMP%]{color:var(--mat-sys-primary)}.dm-total-error[_ngcontent-%COMP%] .dm-total-num[_ngcontent-%COMP%]{color:var(--mat-sys-error)}.dm-total-error.dm-zero[_ngcontent-%COMP%] .dm-total-num[_ngcontent-%COMP%]{color:var(--mat-sys-on-surface-variant)}.dm-attention[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;min-width:0}.dm-att-title[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.25rem;font:500 .8125rem/1.25rem Roboto;color:var(--mat-sys-error)}.dm-att-title[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:18px}.dm-att-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.dm-att-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.75rem;min-width:0;padding:.375rem .625rem;border-radius:8px;text-decoration:none;color:var(--mat-sys-on-surface);background:var(--mat-sys-surface-container);border-left:3px solid var(--mat-sys-error)}.dm-att-row[_ngcontent-%COMP%]:hover{background:var(--mat-sys-surface-container-high)}.dm-att-row[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font-weight:500;font-size:.875rem}.dm-att-meta[_ngcontent-%COMP%]{font-size:.75rem;color:var(--mat-sys-on-surface-variant);white-space:nowrap}.dm-att-where[_ngcontent-%COMP%]{color:var(--mat-sys-error)}.dm-att-code[_ngcontent-%COMP%]{color:var(--mat-sys-on-surface-variant);margin-left:.25rem}.dm-page-header[_ngcontent-%COMP%]{display:flex;align-items:flex-end;justify-content:space-between;gap:1rem}.dm-page-header[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{margin:0;font:400 1.5rem/2rem Roboto}.dm-page-sub[_ngcontent-%COMP%]{font:400 .8125rem/1.25rem Roboto;color:var(--mat-sys-on-surface-variant);margin-top:.25rem;display:flex;gap:.25rem;flex-wrap:wrap}.dm-header-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}.dm-toggle[_ngcontent-%COMP%], .dm-chips[_ngcontent-%COMP%]{display:inline-flex;padding:2px;border-radius:10px;background:var(--mat-sys-surface-container);border:1px solid var(--mat-sys-outline-variant)}.dm-toggle[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .dm-chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.375rem;padding:5px 10px;border-radius:8px;background:transparent;border:0;color:var(--mat-sys-on-surface-variant);cursor:pointer;font:500 .8125rem/1rem Roboto}.dm-toggle[_ngcontent-%COMP%] button[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:18px}.dm-toggle[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover, .dm-chip[_ngcontent-%COMP%]:hover{color:var(--mat-sys-on-surface)}.dm-toggle[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%], .dm-chip.active[_ngcontent-%COMP%]{background:var(--mat-sys-surface);color:var(--mat-sys-primary)}.dm-toggle[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{box-shadow:var(--mat-sys-level1)}.dm-chip-count[_ngcontent-%COMP%]{font:500 .6875rem/1rem var(--dm-mono);padding:0 5px;border-radius:999px;background:var(--mat-sys-surface-container-high);color:var(--mat-sys-on-surface-variant)}.dm-chip.active[_ngcontent-%COMP%] .dm-chip-count[_ngcontent-%COMP%]{background:color-mix(in oklch,var(--mat-sys-primary) 16%,transparent);color:var(--mat-sys-primary)}.dm-filterbar[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap}.dm-search[_ngcontent-%COMP%]{position:relative;flex:1;min-width:220px;display:inline-flex;align-items:center;background:var(--mat-sys-surface-container);border:1px solid var(--mat-sys-outline-variant);border-radius:10px}.dm-search[_ngcontent-%COMP%]:focus-within{border-color:var(--mat-sys-primary)}.dm-search[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{flex:1;border:0;outline:0;background:transparent;padding:8px 36px;font:400 .875rem/1.25rem Roboto;color:var(--mat-sys-on-surface)}.dm-search[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::placeholder{color:var(--mat-sys-on-surface-variant)}.dm-search-icon[_ngcontent-%COMP%]{position:absolute;left:10px;pointer-events:none;font-size:18px;color:var(--mat-sys-on-surface-variant)}.dm-search-clear[_ngcontent-%COMP%]{position:absolute;right:6px;background:transparent;border:0;cursor:pointer;color:var(--mat-sys-on-surface-variant);width:24px;height:24px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center}.dm-search-clear[_ngcontent-%COMP%]:hover{background:var(--mat-sys-surface-container-high)}.dm-search-clear[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:16px}.dm-grid-sk[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:1rem}.dm-card-sk[_ngcontent-%COMP%]{background:var(--mat-sys-surface-container-low);border:1px solid var(--mat-sys-outline-variant);border-radius:14px;overflow:hidden}.dm-sk-accent[_ngcontent-%COMP%]{height:4px;background:var(--mat-sys-surface-container)}.dm-sk-body[_ngcontent-%COMP%]{padding:1rem;display:flex;flex-direction:column;gap:.5rem}.dm-empty-actions[_ngcontent-%COMP%]{margin-top:.75rem}.dm-link-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.375rem;padding:6px 14px;border-radius:10px;background:var(--mat-sys-primary);color:var(--mat-sys-on-primary);text-decoration:none;font:500 .875rem/1.25rem Roboto}.dm-link-btn[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:18px}.dm-tag-row[_ngcontent-%COMP%]{flex-wrap:wrap;gap:4px;max-width:100%}.dm-chip-clear[_ngcontent-%COMP%]{padding:5px 6px;color:var(--mat-sys-on-surface-variant)}.dm-chip-clear[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:16px}"],changeDetection:0})};export{H as AppsCardsViewComponent,gt as AppsListComponent,Y as AppsListViewComponent};