docker-client-mx 1.42.0 → 1.43.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 (92) hide show
  1. package/dist/docker-desktop-mx/browser/chunk-75uKIulV.js +1 -0
  2. package/dist/docker-desktop-mx/browser/chunk-B-8njY4y.js +1 -0
  3. package/dist/docker-desktop-mx/browser/chunk-B1xjyPnV.js +1 -0
  4. package/dist/docker-desktop-mx/browser/{chunk-DsuW5Ksa2.js → chunk-BE5ctn7s.js} +1 -1
  5. package/dist/docker-desktop-mx/browser/chunk-BNz89YmT2.js +1 -0
  6. package/dist/docker-desktop-mx/browser/{chunk-CT1ZUgmS.js → chunk-BYBsnx9-2.js} +1 -1
  7. package/dist/docker-desktop-mx/browser/chunk-BpQVP_gf.js +1 -0
  8. package/dist/docker-desktop-mx/browser/{chunk-CSrKHPxR.js → chunk-BsTDUJ3m.js} +1 -1
  9. package/dist/docker-desktop-mx/browser/{chunk-Ba_z6LGV.js → chunk-Bxte2YBm.js} +1 -1
  10. package/dist/docker-desktop-mx/browser/{chunk-CWusqRG0.js → chunk-C7c_wFw-.js} +1 -1
  11. package/dist/docker-desktop-mx/browser/chunk-CUSsr_nJ.js +1 -0
  12. package/dist/docker-desktop-mx/browser/{chunk-wa_VZZFY.js → chunk-CaR7Z77S2.js} +1 -1
  13. package/dist/docker-desktop-mx/browser/chunk-Cau4mGeC.js +1 -0
  14. package/dist/docker-desktop-mx/browser/{chunk-D0xC_xVf.js → chunk-CjAbzLl3.js} +1 -1
  15. package/dist/docker-desktop-mx/browser/{chunk-C22Z7vgK.js → chunk-CjySsWe4.js} +1 -1
  16. package/dist/docker-desktop-mx/browser/chunk-CpIMiI_l.js +4 -0
  17. package/dist/docker-desktop-mx/browser/chunk-CpNGhf9S.js +1 -0
  18. package/dist/docker-desktop-mx/browser/{chunk-V7ftX_10.js → chunk-CphQt55R.js} +1 -1
  19. package/dist/docker-desktop-mx/browser/{chunk-DvoPI4MU.js → chunk-Cpz4zP5G.js} +1 -1
  20. package/dist/docker-desktop-mx/browser/{chunk-Zom3ankA.js → chunk-Cx-uRg2m.js} +1 -1
  21. package/dist/docker-desktop-mx/browser/{chunk-CI9I9Npi.js → chunk-D2SM5E9h.js} +2 -2
  22. package/dist/docker-desktop-mx/browser/{chunk-DZjRtM2K.js → chunk-D5njuWRz.js} +1 -1
  23. package/dist/docker-desktop-mx/browser/{chunk-DLeqF0uQ.js → chunk-D86K3m6W.js} +1 -1
  24. package/dist/docker-desktop-mx/browser/chunk-DCYTwazU.js +1 -0
  25. package/dist/docker-desktop-mx/browser/chunk-DGnxa3ti2.js +1 -0
  26. package/dist/docker-desktop-mx/browser/{chunk-3VyqMz_T.js → chunk-DLpC_2HL.js} +2 -2
  27. package/dist/docker-desktop-mx/browser/{chunk-Zcfhi-RM.js → chunk-DNfiG-TG.js} +1 -1
  28. package/dist/docker-desktop-mx/browser/chunk-DS3iAefP.js +1 -0
  29. package/dist/docker-desktop-mx/browser/chunk-DdTfHpyK.js +1 -0
  30. package/dist/docker-desktop-mx/browser/{chunk-Cbit44lz.js → chunk-DnY7-enP.js} +1 -1
  31. package/dist/docker-desktop-mx/browser/{chunk-CRNeTD5E.js → chunk-Q3Ig-PJ6.js} +1 -1
  32. package/dist/docker-desktop-mx/browser/{chunk-KUYJNmP22.js → chunk-VC5gaeEq.js} +1 -1
  33. package/dist/docker-desktop-mx/browser/chunk-gHmeiJFn.js +1 -0
  34. package/dist/docker-desktop-mx/browser/{chunk-Ckq_aT3A.js → chunk-hJqozYgS.js} +1 -1
  35. package/dist/docker-desktop-mx/browser/{chunk-D-7d5O7f.js → chunk-hXmaVpBu2.js} +1 -1
  36. package/dist/docker-desktop-mx/browser/chunk-iWbUoQd52.js +6 -0
  37. package/dist/docker-desktop-mx/browser/chunk-k-zsJmvX.js +1 -0
  38. package/dist/docker-desktop-mx/browser/{chunk-CMrtklQ1.js → chunk-qxDOm16k.js} +2 -2
  39. package/dist/docker-desktop-mx/browser/chunk-sxrgZH0E.js +3 -0
  40. package/dist/docker-desktop-mx/browser/{chunk-ep62jwHG.js → chunk-vPeKxmUB.js} +1 -1
  41. package/dist/docker-desktop-mx/browser/{chunk-Bx2_SrZM.js → chunk-xmDwFpQl.js} +1 -1
  42. package/dist/docker-desktop-mx/browser/chunk-yYm_2q6C.js +1 -0
  43. package/dist/docker-desktop-mx/browser/index.html +2 -2
  44. package/dist/docker-desktop-mx/browser/main-UUO74KHR.js +1 -0
  45. package/dist/docker-desktop-mx/browser/styles-IM2TO7ZD.css +1 -0
  46. package/dist-electron/channels.js +9 -0
  47. package/dist-electron/channels.js.map +1 -1
  48. package/dist-electron/compose-known.js +135 -0
  49. package/dist-electron/compose-known.js.map +1 -0
  50. package/dist-electron/compose.js +4 -1
  51. package/dist-electron/compose.js.map +1 -1
  52. package/dist-electron/container-duplicate.js +196 -0
  53. package/dist-electron/container-duplicate.js.map +1 -0
  54. package/dist-electron/containers.js +15 -0
  55. package/dist-electron/containers.js.map +1 -1
  56. package/dist-electron/docker-client.js +1 -0
  57. package/dist-electron/docker-client.js.map +1 -1
  58. package/dist-electron/image-build.js +173 -0
  59. package/dist-electron/image-build.js.map +1 -0
  60. package/dist-electron/image-search.js +58 -0
  61. package/dist-electron/image-search.js.map +1 -0
  62. package/dist-electron/ipc.js +40 -2
  63. package/dist-electron/ipc.js.map +1 -1
  64. package/dist-electron/known-projects.js +129 -0
  65. package/dist-electron/known-projects.js.map +1 -0
  66. package/dist-electron/main.js +15 -0
  67. package/dist-electron/main.js.map +1 -1
  68. package/dist-electron/preload.js +18 -0
  69. package/dist-electron/preload.js.map +1 -1
  70. package/dist-electron/processes.js +77 -0
  71. package/dist-electron/processes.js.map +1 -0
  72. package/package.json +1 -1
  73. package/dist/docker-desktop-mx/browser/chunk-BW20bBdg.js +0 -1
  74. package/dist/docker-desktop-mx/browser/chunk-BdOOWVGY.js +0 -4
  75. package/dist/docker-desktop-mx/browser/chunk-BgNCBUvw2.js +0 -1
  76. package/dist/docker-desktop-mx/browser/chunk-BoN9ZlqT.js +0 -1
  77. package/dist/docker-desktop-mx/browser/chunk-BsAqguck2.js +0 -3
  78. package/dist/docker-desktop-mx/browser/chunk-C-yEXU2P.js +0 -6
  79. package/dist/docker-desktop-mx/browser/chunk-C1Wg9uje.js +0 -1
  80. package/dist/docker-desktop-mx/browser/chunk-C6u6rXYb2.js +0 -1
  81. package/dist/docker-desktop-mx/browser/chunk-CC84vXik.js +0 -1
  82. package/dist/docker-desktop-mx/browser/chunk-Cc4_zCxe2.js +0 -1
  83. package/dist/docker-desktop-mx/browser/chunk-CrBxmi_g.js +0 -1
  84. package/dist/docker-desktop-mx/browser/chunk-D29s9m84.js +0 -1
  85. package/dist/docker-desktop-mx/browser/chunk-DKpHNjiv.js +0 -1
  86. package/dist/docker-desktop-mx/browser/chunk-DzG5R5Kk.js +0 -1
  87. package/dist/docker-desktop-mx/browser/chunk-QaMufr3I.js +0 -1
  88. package/dist/docker-desktop-mx/browser/chunk-cYufOe8J.js +0 -1
  89. package/dist/docker-desktop-mx/browser/chunk-eG8Su12W.js +0 -1
  90. package/dist/docker-desktop-mx/browser/chunk-iwVkNYYA.js +0 -1
  91. package/dist/docker-desktop-mx/browser/main-DECBD64Q.js +0 -1
  92. package/dist/docker-desktop-mx/browser/styles-5TXFXUUF.css +0 -1
@@ -0,0 +1 @@
1
+ import{B as Kr,Rn as nk,Tn as jc,cn as f,hr as wc,qt as ag,rt as Ot,u as Br}from"./chunk-CpIMiI_l.js";var a;var c;var b=f(()=>{Kr();Kr();a={running:`bg-ok shadow-[0_0_0_3px_color-mix(in_oklab,var(--color-ok)_28%,transparent)]`,paused:`bg-halt`,restarting:`bg-halt`,partial:`bg-halt`,dead:`bg-danger`,created:`border-2 border-ink-400`,removing:`border-2 border-ink-400`,exited:`bg-stopped`,stopped:`bg-stopped`,down:`border-2 border-ink-400`},c=class s{state=jc.required();size=jc(`sm`);look=Ot(()=>this.state()in a?a[this.state()]:a.created);static ɵfac=function(t){return new(t||s)};static ɵcmp=wc({type:s,selectors:[[`app-state-dot`]],hostAttrs:[1,`block`,`shrink-0`,`rounded-full`],hostVars:7,hostBindings:function(t,e){t&2&&(Br(`data-state`,e.state()),nk(e.look()),ag(`size-2`,e.size()===`sm`)(`size-3`,e.size()===`md`))},inputs:{state:[1,`state`],size:[1,`size`]},decls:0,vars:0,template:function(t,e){},encapsulation:2})}});export{c as n,b as t};
@@ -0,0 +1 @@
1
+ import"./chunk-CpIMiI_l.js";import"./chunk-CjAbzLl3.js";import{n as ro,t as Ql}from"./chunk-DLpC_2HL.js";Ql();export{ro as TerminalView};
@@ -0,0 +1 @@
1
+ import{$t as bj,At as VE,B as Kr$1,Bt as Yw,C as Fs$1,Ct as Ti$1,D as Gm,Dt as Ue,E as Gi$1,En as k,G as Mn$1,Hn as on,Ht as Zo$1,I as Iw,In as nf,It as Ws$1,Jn as qt$1,Jt as aw,Kt as _r,Ln as ng,Lt as Wt$1,Mn as lf,Mt as Vr$1,N as Ib,Nn as mb,Nt as W,O as Gn$1,Ot as Un$1,P as Ij,R as Jm,Rt as X$1,Sr as yc,St as Tg,T as Ge$1,Tn as jc,Tr as zs$1,U as M,Ut as Zt,Vn as ob,W as Mg,Wn as pE,X as Nn$1,Xn as rb,Xt as bb,Yn as qy,Zt as bc,_n as gl,_r as wt$1,_t as Sm,an as dp,b as Eb,bn as hb,bt as Tb,cn as f,cr as ve$1,ct as QC,d as Bs$1,dn as fj,dt as Qn$1,f as C,ft as RI,gr as wj,gt as Se$1,hr as wc,in as dm,ir as tf,jt as Vm,k as Gu,kn as ke$1,kt as Ur,m as Cb,mn as ge,mr as wb,nn as cr,nr as tb,nt as Or,or as ue$1,ot as Pk,pt as Re$1,r as $k,rr as te$1,rt as Ot$1,s as Ao$1,sr as va,st as Pr,tn as br,tr as sw,u as Br$1,un as fb,v as Db,vn as gn$1,vt as T$1,w as G,wr as zE,wt as Tt$1,xr as yb,y as Dj,yn as hD,zn as nr}from"./chunk-CpIMiI_l.js";import{c as Re$2,d as oe,l as T$2,o as Ne,r as Be$1,s as R,t as $,u as ge$1}from"./chunk-DS3iAefP.js";function $r(t){for(let r of t)r.remove()}function Br(t,r){let e=r.createElement(`style`);return e.textContent=t,e}function Wi(t,r,e,n){let i=t.head?.querySelectorAll(`style[${fn}="${r}"],link[${fn}="${r}"]`);if(!i||i.length===0)return!1;for(let o of i)o.removeAttribute(fn),o instanceof HTMLLinkElement?n.set(o.href.slice(o.href.lastIndexOf(`/`)+1),{usage:0,elements:[o]}):o.textContent&&e.set(o.textContent,{usage:0,elements:[o]});return!0}function gn(t,r){let e=r.createElement(`link`);return e.setAttribute(`rel`,`stylesheet`),e.setAttribute(`href`,t),e}function Xi(t){return Ki.replace(yn,t)}function eo(t){return Yi.replace(yn,t)}function qr(t,r){return r.map(e=>e.replace(yn,t))}function zr(t){return t.tagName===`TEMPLATE`&&t.content!==void 0}var xe;var vt;var Rt;var vn;var fn;var mn;var pn;var yn;var Fr;var Yi;var Ki;var Qi;var Zi;var Ji;var Sn;var ke;var mt;var je;var yt;var Vr=f(()=>{Ne();Kr$1();Kr$1();xe=class{_doc;constructor(r){this._doc=r}manager},vt=(()=>{class t extends xe{constructor(e){super(e)}supports(e){return!0}addEventListener(e,n,i,o){return e.addEventListener(n,i,o),()=>this.removeEventListener(e,n,i,o)}removeEventListener(e,n,i,o){return e.removeEventListener(n,i,o)}static ɵfac=function(n){return new(n||t)(Re$1(br))};static ɵprov=X$1({token:t,factory:t.ɵfac})}return t})(),Rt=new M(``),vn=(()=>{class t{_zone;_plugins;_eventNameToPlugin=new Map;constructor(e,n){this._zone=n,e.forEach(s=>{s.manager=this});let i=e.filter(s=>!(s instanceof vt));this._plugins=i.slice().reverse();let o=e.find(s=>s instanceof vt);o&&this._plugins.push(o)}addEventListener(e,n,i,o){return this._findPluginFor(n).addEventListener(e,n,i,o)}getZone(){return this._zone}_findPluginFor(e){let n=this._eventNameToPlugin.get(e);if(n)return n;if(n=this._plugins.find(o=>o.supports(e)),!n)throw new k(-5101,!1);return this._eventNameToPlugin.set(e,n),n}static ɵfac=function(n){return new(n||t)(Re$1(Rt),Re$1(Se$1))};static ɵprov=X$1({token:t,factory:t.ɵfac})}return t})(),fn=`ng-app-id`;mn=(()=>{class t{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;constructor(e,n,i,o={}){this.doc=e,this.appId=n,this.nonce=i,Wi(e,n,this.inline,this.external)&&this.hosts.add(e.head)}addStyles(e,n){for(let i of e)this.addUsage(i,this.inline,Br);n?.forEach(i=>this.addUsage(i,this.external,gn))}removeStyles(e,n){for(let i of e)this.removeUsage(i,this.inline);n?.forEach(i=>this.removeUsage(i,this.external))}addUsage(e,n,i){let o=n.get(e);o?o.usage++:n.set(e,{usage:1,elements:[...this.hosts].map(s=>this.addElement(s,i(e,this.doc)))})}removeUsage(e,n){let i=n.get(e);i&&(i.usage--,i.usage<=0&&($r(i.elements),n.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])$r(e);this.hosts.clear()}addHost(e){if(!this.hosts.has(e)){this.hosts.add(e);for(let[n,{elements:i}]of this.inline)i.push(this.addElement(e,Br(n,this.doc)));for(let[n,{elements:i}]of this.external)i.push(this.addElement(e,gn(n,this.doc)))}}removeHost(e){this.hosts.delete(e);for(let n of[...this.inline.values(),...this.external.values()]){let i=[];for(let o of n.elements)o.parentNode===e?o.remove():i.push(o);n.elements=i}}addElement(e,n){return this.nonce&&n.setAttribute(`nonce`,this.nonce),e.appendChild(n)}static ɵfac=function(n){return new(n||t)(Re$1(br),Re$1(nf),Re$1(aw,8),Re$1(sw))};static ɵprov=X$1({token:t,factory:t.ɵfac})}return t})(),pn={svg:`http://www.w3.org/2000/svg`,xhtml:`http://www.w3.org/1999/xhtml`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`,math:`http://www.w3.org/1998/Math/MathML`},yn=/%COMP%/g,Fr=`%COMP%`,Yi=`_nghost-${Fr}`,Ki=`_ngcontent-${Fr}`,Qi=!0,Zi=new M(``,{factory:()=>Qi}),Ji=new M(``);Sn=(()=>{class t{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;cssVarNamespace;constructor(e,n,i,o,s,c,a=null,u=null,l=null){this.eventManager=e,this.sharedStylesHost=n,this.appId=i,this.removeStylesOnCompDestroy=o,this.doc=s,this.ngZone=c,this.nonce=a,this.tracingService=u,this.cssVarNamespace=l??``,this.defaultRenderer=new ke(e,s,c,this.tracingService,this.cssVarNamespace)}createRenderer(e,n){if(!e||!n)return this.defaultRenderer;let i=this.getOrCreateRenderer(e,n);return i instanceof yt?i.applyToHost(e):i instanceof je&&i.applyStyles(),i}getOrCreateRenderer(e,n){let i=this.rendererByCompId,o=i.get(n.id);if(!o){let s=this.doc,c=this.ngZone,a=this.eventManager,u=this.sharedStylesHost,l=this.removeStylesOnCompDestroy,p=this.tracingService;switch(n.encapsulation){case Gn$1.Emulated:o=new yt(a,u,n,this.appId,l,s,c,p,this.cssVarNamespace);break;case Gn$1.ShadowDom:return new mt(a,e,n,s,c,this.nonce,p,this.cssVarNamespace,u);case Gn$1.ExperimentalIsolatedShadowDom:return new mt(a,e,n,s,c,this.nonce,p,this.cssVarNamespace);default:o=new je(a,u,n,l,s,c,p,this.cssVarNamespace);break}i.set(n.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(e){this.rendererByCompId.delete(e)}static ɵfac=function(n){return new(n||t)(Re$1(vn),Re$1(dm),Re$1(nf),Re$1(Zi),Re$1(br),Re$1(Se$1),Re$1(aw),Re$1(Qn$1,8),Re$1(Ji,8))};static ɵprov=X$1({token:t,factory:t.ɵfac})}return t})(),ke=class{eventManager;doc;ngZone;tracingService;cssVarNamespace;data=Object.create(null);throwOnSyntheticProps=!0;constructor(r,e,n,i,o=``){this.eventManager=r,this.doc=e,this.ngZone=n,this.tracingService=i,this.cssVarNamespace=o}destroy(){}destroyNode=null;createElement(r,e){return e?this.doc.createElementNS(pn[e]||e,r):this.doc.createElement(r)}createComment(r){return this.doc.createComment(r)}createText(r){return this.doc.createTextNode(r)}appendChild(r,e){(zr(r)?r.content:r).appendChild(e)}insertBefore(r,e,n){if(r){let i=zr(r)?r.content:r;if(n!=null&&n.parentNode!==i)throw new k(-5106,!1);i.insertBefore(e,n)}}removeChild(r,e){e.remove()}selectRootElement(r,e){let n=typeof r==`string`?this.doc.querySelector(r):r;if(!n)throw new k(-5104,!1);return e||(n.textContent=``),n}parentNode(r){return r.parentNode}nextSibling(r){return r.nextSibling}setAttribute(r,e,n,i){if(i){e=i+`:`+e;let o=pn[i];o?r.setAttributeNS(o,e,n):r.setAttribute(e,n)}else r.setAttribute(e,n)}removeAttribute(r,e,n){if(n){let i=pn[n];i?r.removeAttributeNS(i,e):r.removeAttribute(`${n}:${e}`)}else r.removeAttribute(e)}addClass(r,e){r.classList.add(e)}removeClass(r,e){r.classList.remove(e)}setStyle(r,e,n,i){let o=e.startsWith(`--`);o&&(e=e.replace(`%NS%`,this.cssVarNamespace)),o||i&(Ti$1.DashCase|Ti$1.Important)?r.style.setProperty(e,n,i&Ti$1.Important?`important`:``):r.style[e]=n}removeStyle(r,e,n){let i=e.startsWith(`--`);i&&(e=e.replace(`%NS%`,this.cssVarNamespace)),i||n&Ti$1.DashCase?r.style.removeProperty(e):r.style[e]=``}setProperty(r,e,n){r!=null&&(r[e]=n)}setValue(r,e){r.nodeValue=e}listen(r,e,n,i){if(typeof r==`string`&&(r=T$2().getGlobalEventTarget(this.doc,r),!r))throw new k(-5102,!1);let o=this.decoratePreventDefault(n);return this.tracingService?.wrapEventListener&&(o=this.tracingService.wrapEventListener(r,e,o)),this.eventManager.addEventListener(r,e,o,i)}decoratePreventDefault(r){return e=>{if(e===`__ngUnwrap__`)return r;r(e)===!1&&e.preventDefault()}}};mt=class extends ke{hostEl;sharedStylesHost;shadowRoot;constructor(r,e,n,i,o,s,c,a,u){super(r,i,o,c,a),this.hostEl=e,this.sharedStylesHost=u,this.shadowRoot=e.attachShadow({mode:`open`}),this.sharedStylesHost&&this.sharedStylesHost.addHost(this.shadowRoot);let l=n.styles;l=qr(n.id,l).map(h=>h.replace(/%NS%/g,a));for(let h of l){let y=document.createElement(`style`);s&&y.setAttribute(`nonce`,s),y.textContent=h,this.shadowRoot.appendChild(y)}let p=n.getExternalStyles?.();if(p)for(let h of p){let y=gn(h,i);s&&y.setAttribute(`nonce`,s),this.shadowRoot.appendChild(y)}}nodeOrShadowRoot(r){return r===this.hostEl?this.shadowRoot:r}appendChild(r,e){return super.appendChild(this.nodeOrShadowRoot(r),e)}insertBefore(r,e,n){return super.insertBefore(this.nodeOrShadowRoot(r),e,n)}removeChild(r,e){return super.removeChild(null,e)}parentNode(r){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(r)))}destroy(){this.sharedStylesHost&&this.sharedStylesHost.removeHost(this.shadowRoot)}},je=class extends ke{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(r,e,n,i,o,s,c,a,u){super(r,o,s,c,a),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=i;let l=n.styles,p=u?qr(u,l):l;this.styles=p.map(h=>h.replace(/%NS%/g,a)),this.styleUrls=n.getExternalStyles?.(u)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&Tt$1.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},yt=class extends je{contentAttr;hostAttr;constructor(r,e,n,i,o,s,c,a,u){let l=i+`-`+n.id;super(r,e,n,o,s,c,a,u,l),this.contentAttr=Xi(l),this.hostAttr=eo(l)}applyToHost(r){this.applyStyles(),this.setAttribute(r,this.hostAttr,``)}createElement(r,e){let n=super.createElement(r,e);return super.setAttribute(n,this.contentAttr,``),n}}});function ro(){return He=He||document.head.querySelector(`base`),He?He.getAttribute(`href`):null}function io(t){return new URL(t,document.baseURI).pathname}async function ao(t,r,e){return wj(W({rootComponent:t},co(r,e)))}function co(t,r){return{platformRef:r?.platformRef,appProviders:[...po,...t?.providers??[]],platformProviders:fo}}function uo(){wt.makeCurrent()}function lo(){return new Ge$1}function ho(){return Yw(document),document}var wt;var He;var Gr;var oo;var so;var Wr;var fo;var po;var Yr=f(()=>{Ne();Kr$1();Kr$1();Vr();wt=class t extends ${supportsDOMEvents=!0;static makeCurrent(){ge$1(new t)}onAndCancel(r,e,n,i){return r.addEventListener(e,n,i),()=>{r.removeEventListener(e,n,i)}}dispatchEvent(r,e){r.dispatchEvent(e)}remove(r){r.remove()}createElement(r,e){return e=e||this.getDefaultDocument(),e.createElement(r)}createHtmlDocument(){return document.implementation.createHTMLDocument(`fakeTitle`)}getDefaultDocument(){return document}isElementNode(r){return r.nodeType===Node.ELEMENT_NODE}isShadowRoot(r){return r instanceof DocumentFragment}getGlobalEventTarget(r,e){return e===`window`?window:e===`document`?r:e===`body`?r.body:null}getBaseHref(r){let e=ro();return e==null?null:io(e)}resetBaseElement(){He=null}getUserAgent(){return window.navigator.userAgent}getCookie(r){return Re$2(document.cookie,r)}},He=null;Gr=[`alt`,`control`,`meta`,`shift`],oo={"\b":`Backspace`," ":`Tab`,"":`Delete`,"\x1B":`Escape`,Del:`Delete`,Esc:`Escape`,Left:`ArrowLeft`,Right:`ArrowRight`,Up:`ArrowUp`,Down:`ArrowDown`,Menu:`ContextMenu`,Scroll:`ScrollLock`,Win:`OS`},so={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey},Wr=(()=>{class t extends xe{constructor(e){super(e)}supports(e){return t.parseEventName(e)!=null}addEventListener(e,n,i,o){let s=t.parseEventName(n),c=t.eventCallback(s.fullKey,i,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>T$2().onAndCancel(e,s.domEventName,c,o))}static parseEventName(e){let n=e.toLowerCase().split(`.`),i=n.shift();if(n.length===0||!(i===`keydown`||i===`keyup`))return null;let o=t._normalizeKey(n.pop()),s=``,c=n.indexOf(`code`);if(c>-1&&(n.splice(c,1),s=`code.`),Gr.forEach(u=>{let l=n.indexOf(u);l>-1&&(n.splice(l,1),s+=u+`.`)}),s+=o,n.length!=0||o.length===0)return null;let a={};return a.domEventName=i,a.fullKey=s,a}static matchEventFullKeyCode(e,n){let i=oo[e.key]||e.key,o=``;return n.indexOf(`code.`)>-1&&(i=e.code,o=`code.`),i==null||!i?!1:(i=i.toLowerCase(),i===` `?i=`space`:i===`.`&&(i=`dot`),Gr.forEach(s=>{if(s!==i){let c=so[s];c(e)&&(o+=s+`.`)}}),o+=i,o===n)}static eventCallback(e,n,i){return o=>{t.matchEventFullKeyCode(o,e)&&i.runGuarded(()=>n(o))}}static _normalizeKey(e){return e===`esc`?`escape`:e}static ɵfac=function(n){return new(n||t)(Re$1(br))};static ɵprov=X$1({token:t,factory:t.ɵfac})}return t})();fo=[{provide:sw,useValue:Be$1},{provide:tf,useValue:uo,multi:!0},{provide:br,useFactory:ho}],po=[{provide:va,useValue:`root`},{provide:Ge$1,useFactory:lo},{provide:Rt,useClass:vt,multi:!0},{provide:Rt,useClass:Wr,multi:!0},Sn,{provide:dm,useClass:mn},{provide:mn,useExisting:dm},vn,{provide:_r,useExisting:Sn},[]]});var Kr;var Qr=f(()=>{Yr();Ne();Kr$1();Kr=(()=>{class t{_doc;constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||``}static ɵfac=function(n){return new(n||t)(Re$1(br))};static ɵprov=X$1({token:t,factory:t.ɵfac,providedIn:`root`})}return t})()});function ce(t){return new bn(t)}function Rn(t,r,e){for(let n=0;n<t.length;n++){let i=t[n],o=r[n];if(i[0]===`:`)e[i.substring(1)]=o;else if(i!==o.path)return!1}return!0}function ri(t,r,e){let n=e.path.split(`/`),i=n.indexOf(`**`);if(i===-1){if(n.length>t.length||e.pathMatch===`full`&&(r.hasChildren()||n.length<t.length))return null;let a={},u=t.slice(0,n.length);return Rn(n,u,a)?{consumed:u,posParams:a}:null}if(i!==n.lastIndexOf(`**`))return null;let o=n.slice(0,i),s=n.slice(i+1);if(o.length+s.length>t.length||e.pathMatch===`full`&&r.hasChildren()&&e.path!==`**`)return null;let c={};return!Rn(o,t.slice(0,o.length),c)||!Rn(s,t.slice(t.length-s.length),c)?null:{consumed:t,posParams:c}}function _t(t){return new Promise((r,e)=>{t.pipe(bb()).subscribe({next:n=>r(n),error:n=>e(n)})})}function mo(t,r){if(t.length!==r.length)return!1;for(let e=0;e<t.length;++e)if(!V(t[e],r[e]))return!1;return!0}function V(t,r){let e=t?Tn(t):void 0,n=r?Tn(r):void 0;if(!e||!n||e.length!=n.length)return!1;let i;for(let o=0;o<e.length;o++)if(i=e[o],!ii(t[i],r[i]))return!1;return!0}function Tn(t){return[...Object.keys(t),...Object.getOwnPropertySymbols(t)]}function ii(t,r){if(Array.isArray(t)&&Array.isArray(r)){if(t.length!==r.length)return!1;let e=[...t].sort(),n=[...r].sort();return e.every((i,o)=>n[o]===i)}else return t===r}function yo(t){return t.length>0?t[t.length-1]:null}function he(t){return ob(t)?t:yc(t)?on(Promise.resolve(t)):tb(t)}function oi(t){return ob(t)?_t(t):Promise.resolve(t)}function Bn(t,r,e){let n=t instanceof A?t:r.parseUrl(t);return Ot$1(()=>Mn(r.lastSuccessfulNavigation()?.finalUrl??new A,n,W(W({},Se),e)))}function Mn(t,r,e){return So[e.paths](t.root,r.root,e.matrixParams)&&si[e.queryParams](t.queryParams,r.queryParams)&&!(e.fragment===`exact`&&t.fragment!==r.fragment)}function Ro(t,r){return V(t,r)}function ai(t,r,e){if(!ae(t.segments,r.segments)||!bt(t.segments,r.segments,e)||t.numberOfChildren!==r.numberOfChildren)return!1;for(let n in r.children)if(!t.children[n]||!ai(t.children[n],r.children[n],e))return!1;return!0}function wo(t,r){return Object.keys(r).length<=Object.keys(t).length&&Object.keys(r).every(e=>ii(t[e],r[e]))}function ci(t,r,e){return ui(t,r,r.segments,e)}function ui(t,r,e,n){if(t.segments.length>e.length){let i=t.segments.slice(0,e.length);return!(!ae(i,e)||r.hasChildren()||!bt(i,e,n))}else if(t.segments.length===e.length){if(!ae(t.segments,e)||!bt(t.segments,e,n))return!1;for(let i in r.children)if(!t.children[i]||!ci(t.children[i],r.children[i],n))return!1;return!0}else{let i=e.slice(0,t.segments.length),o=e.slice(t.segments.length);return!ae(t.segments,i)||!bt(t.segments,i,n)||!t.children[g]?!1:ui(t.children[g],r,o,n)}}function bt(t,r,e){return r.every((n,i)=>si[e](t[i].parameters,n.parameters))}function Co(t,r){return ae(t,r)&&t.every((e,n)=>V(e.parameters,r[n].parameters))}function ae(t,r){return t.length!==r.length?!1:t.every((e,n)=>e.path===r[n].path)}function Eo(t,r){let e=[];return Object.entries(t.children).forEach(([n,i])=>{n===g&&(e=e.concat(r(i,n)))}),Object.entries(t.children).forEach(([n,i])=>{n!==g&&(e=e.concat(r(i,n)))}),e}function Tt(t){return t.segments.map(r=>di(r)).join(`/`)}function $e(t,r){if(!t.hasChildren())return Tt(t);if(r){let e=t.children[g]?$e(t.children[g],!1):``,n=[];return Object.entries(t.children).forEach(([i,o])=>{i!==g&&n.push(`${i}:${$e(o,!1)}`)}),n.length>0?`${e}(${n.join(`//`)})`:e}else{let e=Eo(t,(n,i)=>i===g?[$e(t.children[g],!1)]:[`${i}:${$e(n,!1)}`]);return Object.keys(t.children).length===1&&t.children[g]!=null?`${Tt(t)}/${e[0]}`:`${Tt(t)}/(${e.join(`//`)})`}}function li(t){return encodeURIComponent(t).replace(/%40/g,`@`).replace(/%3A/gi,`:`).replace(/%24/g,`$`).replace(/%2C/gi,`,`)}function Ct(t){return li(t).replace(/%3B/gi,`;`)}function To(t){return encodeURI(t)}function _n(t){return li(t).replace(/\(/g,`%28`).replace(/\)/g,`%29`).replace(/%26/gi,`&`)}function Mt(t){return decodeURIComponent(t)}function Zr(t){return Mt(t.replace(/\+/g,`%20`))}function di(t){return`${_n(t.path)}${Mo(t.parameters)}`}function Mo(t){return Object.entries(t).map(([r,e])=>`;${_n(r)}=${_n(e)}`).join(``)}function _o(t){let r=Object.entries(t).map(([e,n])=>Array.isArray(n)?n.map(i=>`${Ct(e)}=${Ct(i)}`).join(`&`):`${Ct(e)}=${Ct(n)}`).filter(e=>e);return r.length?`?${r.join(`&`)}`:``}function wn(t){let r=t.match(Ao);return r?r[0]:``}function Do(t){let r=t.match(Io);return r?r[0]:``}function Oo(t){let r=t.match(No);return r?r[0]:``}function Uo(t){let r=t.match(Po);return r?r[0]:``}function hi(t){return t.segments.length>0?new m([],{[g]:t}):t}function fi(t){let r=Object.create(null);for(let[n,i]of Object.entries(t.children)){let o=fi(i);if(n===g&&o.segments.length===0&&o.hasChildren())for(let[s,c]of Object.entries(o.children))r[s]=c;else(o.segments.length>0||o.hasChildren())&&(r[n]=o)}return Lo(new m(t.segments,r))}function Lo(t){if(t.numberOfChildren===1&&t.children[g]){let r=t.children[g];return new m(t.segments.concat(r.segments),r.children)}return t}function te(t){return t instanceof A}function pi(t,r,e=null,n=null,i=new ee){return vi(gi(t),r,e,n,i)}function gi(t){let r;function e(o){let s={};for(let a of o.children){let u=e(a);s[a.outlet]=u}let c=new m(o.url,s);return o===t&&(r=c),c}let i=hi(e(t.root));return r??i}function vi(t,r,e,n,i){let o=t;for(;o.parent;)o=o.parent;if(r.length===0)return Cn(o,o,o,e,n,i);let s=xo(r);if(s.toRoot())return Cn(o,o,new m([],{}),e,n,i);let c=ko(s,o,t),a=c.processChildren?ze(c.segmentGroup,c.index,s.commands):yi(c.segmentGroup,c.index,s.commands);return Cn(o,c.segmentGroup,a,e,n,i)}function At(t){return typeof t==`object`&&t!=null&&!t.outlets&&!t.segmentPath}function Ve(t){return typeof t==`object`&&t!=null&&t.outlets}function Jr(t,r,e){t||=`ɵ`;let n=new A;return n.queryParams={[t]:r},e.parse(e.serialize(n)).queryParams[t]}function Cn(t,r,e,n,i,o){let s={};for(let[u,l]of Object.entries(n??{}))s[u]=Array.isArray(l)?l.map(p=>Jr(u,p,o)):Jr(u,l,o);let c;t===r?c=e:c=mi(t,r,e);let a=hi(fi(c));return new A(a,s,i)}function mi(t,r,e){let n=Object.create(null);return Object.entries(t.children).forEach(([i,o])=>{o===r?n[i]=e:n[i]=mi(o,r,e)}),new m(t.segments,n)}function xo(t){if(typeof t[0]==`string`&&t.length===1&&t[0]===`/`)return new It(!0,0,t);let r=0,e=!1,n=t.reduce((i,o,s)=>{if(typeof o==`object`&&o!=null){if(o.outlets){let c={};return Object.entries(o.outlets).forEach(([a,u])=>{c[a]=typeof u==`string`?u.split(`/`):u}),[...i,{outlets:c}]}if(o.segmentPath)return[...i,o.segmentPath]}return typeof o!=`string`?[...i,o]:s===0?(o.split(`/`).forEach((c,a)=>{a==0&&c===`.`||(a==0&&c===``?e=!0:c===`..`?r++:c!=``&&i.push(c))}),i):[...i,o]},[]);return new It(e,r,n)}function ko(t,r,e){if(t.isAbsolute)return new me(r,!0,0);if(!e)return new me(r,!1,NaN);if(e.parent===null)return new me(e,!0,0);let n=At(t.commands[0])?0:1;return jo(e,e.segments.length-1+n,t.numberOfDoubleDots)}function jo(t,r,e){let n=t,i=r,o=e;for(;o>i;){if(o-=i,n=n.parent,!n)throw new k(4005,!1);i=n.segments.length}return new me(n,!1,i-o)}function Ho(t){return Ve(t[0])?t[0].outlets:{[g]:t}}function yi(t,r,e){if(t??=new m([],{}),t.segments.length===0&&t.hasChildren())return ze(t,r,e);let n=$o(t,r,e),i=e.slice(n.commandIndex);if(n.match&&n.pathIndex<t.segments.length){let o=new m(t.segments.slice(0,n.pathIndex),{});return o.children[g]=new m(t.segments.slice(n.pathIndex),t.children),ze(o,0,i)}else return n.match&&i.length===0?new m(t.segments,{}):n.match&&!t.hasChildren()?In(t,r,e):n.match?ze(t,0,i):In(t,r,e)}function ze(t,r,e){if(e.length===0)return new m(t.segments,{});{let n=Ho(e),i=Object.create(null);if(Object.keys(n).some(o=>o!==g)&&t.children[g]&&t.numberOfChildren===1&&t.children[g].segments.length===0){let o=ze(t.children[g],r,e);return new m(t.segments,o.children)}return Object.entries(n).forEach(([o,s])=>{typeof s==`string`&&(s=[s]),s!==null&&(i[o]=yi(t.children[o],r,s))}),Object.entries(t.children).forEach(([o,s])=>{n[o]===void 0&&(i[o]=s)}),new m(t.segments,i)}}function $o(t,r,e){let n=0,i=r,o={match:!1,pathIndex:0,commandIndex:0};for(;i<t.segments.length;){if(n>=e.length)return o;let s=t.segments[i],c=e[n];if(Ve(c))break;let a=`${c}`,u=n<e.length-1?e[n+1]:null;if(i>0&&a===void 0)break;if(a&&u&&typeof u==`object`&&u.outlets===void 0){if(!ei(a,u,s))return o;n+=2}else{if(!ei(a,{},s))return o;n++}i++}return{match:!0,pathIndex:i,commandIndex:n}}function In(t,r,e){let n=t.segments.slice(0,r),i=0;for(;i<e.length;){let o=e[i];if(Ve(o)){let a=Bo(o.outlets);return new m(n,a)}if(i===0&&At(e[0])){let a=t.segments[r];n.push(new X(a.path,Xr(e[0]))),i++;continue}let s=Ve(o)?o.outlets[g]:`${o}`,c=i<e.length-1?e[i+1]:null;s&&c&&At(c)?(n.push(new X(s,Xr(c))),i+=2):(n.push(new X(s,{})),i++)}return new m(n,{})}function Bo(t){let r={};return Object.entries(t).forEach(([e,n])=>{typeof n==`string`&&(n=[n]),n!==null&&(r[e]=In(new m([],{}),0,n))}),r}function Xr(t){let r={};return Object.entries(t).forEach(([e,n])=>r[e]=`${n}`),r}function ei(t,r,e){return t==e.path&&V(r,e.parameters)}function Si(t){return t instanceof j&&(t.code===T.Redirect||t.code===T.SupersededByNewNavigation)}function zo(t){return!(t instanceof Re)&&!(t instanceof we)&&!(t instanceof Ye)}function Dn(t,r){if(t===r.value)return r;for(let e of r.children){let n=Dn(t,e);if(n)return n}return null}function Nn(t,r){if(t===r.value)return[r];for(let e of r.children){let n=Nn(t,e);if(n.length)return n.unshift(r),n}return[]}function ve(t){let r={};return t&&t.children.forEach(e=>r[e.value.outlet]=e),r}function Ri(t,r){let e=Fo(t,r),n=new qt$1([new X(``,{})]),i=new qt$1({}),o=new qt$1({}),s=new qt$1({}),c=new qt$1(``),a=new Q(n,i,s,c,o,g,t,e.root);return a.snapshot=e.root,new Ke(new P(a,[]),e)}function Fo(t,r){let s=new Ce([],{},{},``,{},g,t,null,{},r);return new Qe(``,new P(s,[]))}function zn(t,r,e){let n,{routeConfig:i}=t;return r!==null&&(e===`always`||i?.path===``||!r.component&&!r.routeConfig?.loadComponent)?n={params:W(W({},r.params),t.params),data:W(W({},r.data),t.data),resolve:W(W(W(W({},t.data),r.data),i?.data),t._resolvedData)}:n={params:W({},t.params),data:W({},t.data),resolve:W(W({},t.data),t._resolvedData??{})},i&&Ci(i)&&(n.resolve[Xe]=i.title),n}function Fn(t,r){r.value._routerState=t,r.children.forEach(e=>Fn(t,e))}function wi(t){let r=t.children.length>0?` { ${t.children.map(wi).join(`, `)} } `:``;return`${t.value}${r}`}function En(t){if(t.snapshot){let r=t.snapshot,e=t._futureSnapshot;t.snapshot=e,V(r.queryParams,e.queryParams)||t.queryParamsSubject.next(e.queryParams),r.fragment!==e.fragment&&t.fragmentSubject.next(e.fragment),V(r.params,e.params)||t.paramsSubject.next(e.params),mo(r.url,e.url)||t.urlSubject.next(e.url),V(r.data,e.data)||t.dataSubject.next(e.data)}else t.snapshot=t._futureSnapshot,t.dataSubject.next(t._futureSnapshot.data)}function On(t,r){let e=V(t.params,r.params)&&Co(t.url,r.url),n=!t.parent!=!r.parent;return e&&!n&&(!t.parent||On(t.parent,r.parent))}function Ci(t){return typeof t.title==`string`||t.title===null}function Gn(t){let r=t.children&&t.children.map(Gn),e=r?G(W({},t),{children:r}):W({},t);return!e.component&&!e.loadComponent&&(r||e.loadChildren)&&e.outlet&&e.outlet!==g&&(e.component=Vn),e}function Vo(t,r,e){let n=new Set,i=Ze(t,r._root,e?e._root:void 0,n);return{newlyCreatedRoutes:n,state:new Ke(i,r)}}function Ze(t,r,e,n){if(e&&t.shouldReuseRoute(r.value,e.value.snapshot)){let i=e.value;i._setPending(r.value);let o=Go(t,r,e,n);return new P(i,o)}else{if(t.shouldAttach(r.value)){let s=t.retrieve(r.value);if(s!==null){let c=s.route;return c.value._setPending(r.value),c.children=r.children.map(a=>Ze(t,a,void 0,n)),c}}let i=Wo(r.value);i._setPending(r.value),n.add(i);let o=r.children.map(s=>Ze(t,s,void 0,n));return new P(i,o)}}function Go(t,r,e,n){return r.children.map(i=>{for(let o of e.children)if(t.shouldReuseRoute(i.value,o.value.snapshot))return Ze(t,i,o,n);return Ze(t,i,void 0,n)})}function Wo(t){return new Q(new qt$1(t.url),new qt$1(t.params),new qt$1(t.queryParams),new qt$1(t.fragment),new qt$1(t.data),t.outlet,t.component,t)}function zt(t,r){let{redirectTo:e,navigationBehaviorOptions:n}=te(r)?{redirectTo:r,navigationBehaviorOptions:void 0}:r,i=Mi(!1,T.Redirect);return i.url=e,i.navigationBehaviorOptions=n,i}function Mi(t,r){let e=new Error(`NavigationCancelingError: ${t||``}`);return e[Ti]=!0,e.cancellationCode=r,e}function Yo(t){return _i(t)&&te(t.url)}function _i(t){return!!t&&t[Ti]}function Ko(t,r,e){let n=t._root;return Be(n,r?r._root:null,e,[n.value])}function Qo(t){let r=t.routeConfig?t.routeConfig.canActivateChild:null;return!r||r.length===0?null:{node:t,guards:r}}function Me(t,r){let e=Symbol(),n=r.get(t,e);return n===e?typeof t==`function`&&!Tb(t)?t:r.get(t):n}function Be(t,r,e,n,i={canDeactivateChecks:[],canActivateChecks:[]}){let o=ve(r);return t.children.forEach(s=>{Zo(s,o[s.value.outlet],e,n.concat([s.value]),i),delete o[s.value.outlet]}),Object.entries(o).forEach(([s,c])=>qe(c,e.getContext(s),e,i)),i}function Zo(t,r,e,n,i={canDeactivateChecks:[],canActivateChecks:[]}){let o=t.value,s=r?r.value:null,c=e?e.getContext(t.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){let a=Jo(s,o,o.routeConfig.runGuardsAndResolvers);a?i.canActivateChecks.push(new Ft(n)):(o.data=s.data,o._resolvedData=s._resolvedData),o.component?Be(t,r,c?c.children:null,n,i):Be(t,r,e,n,i),a&&c&&c.outlet&&c.outlet.isActivated&&i.canDeactivateChecks.push(new ye(c.outlet.component,s))}else s&&qe(r,c,e,i),i.canActivateChecks.push(new Ft(n)),o.component?Be(t,null,c?c.children:null,n,i):Be(t,null,e,n,i);return i}function Jo(t,r,e){if(typeof e==`function`)return Zo$1(r._environmentInjector,()=>e(t,r));switch(e){case`pathParamsChange`:return!ae(t.url,r.url);case`pathParamsOrQueryParamsChange`:return!ae(t.url,r.url)||!V(t.queryParams,r.queryParams);case`always`:return!0;case`paramsOrQueryParamsChange`:return!On(t,r)||!V(t.queryParams,r.queryParams);default:return!On(t,r)}}function qe(t,r,e,n){let i=ve(t),o=t.value;Object.entries(i).forEach(([s,c])=>{o.component?r?qe(c,r.children.getContext(s),r.children,n):qe(c,null,null,n):qe(c,e?e.getContext(s):null,e,n)}),o.component?r&&r.outlet&&r.outlet.isActivated?n.canDeactivateChecks.push(new ye(r.outlet.component,o)):n.canDeactivateChecks.push(new ye(null,o)):n.canDeactivateChecks.push(new ye(null,o))}function tt(t){return typeof t==`function`}function Xo(t){return typeof t==`boolean`}function es(t){return t&&tt(t.canLoad)}function ts(t){return t&&tt(t.canActivate)}function ns(t){return t&&tt(t.canActivateChild)}function rs(t){return t&&tt(t.canDeactivate)}function is(t){return t&&tt(t.canMatch)}function Ai(t){return t instanceof Zt||t?.name===`EmptyError`}function be(){return Cb(t=>fb(t.map(r=>r.pipe(Bs$1(1),Db(Et)))).pipe(Nn$1(r=>{for(let e of r)if(e!==!0){if(e===Et)return Et;if(e===!1||os(e))return e}return!0}),zs$1(r=>r!==Et),Bs$1(1)))}function os(t){return te(t)||t instanceof Ee}function Ii(t){return t.aborted?tb(void 0).pipe(Bs$1(1)):new T$1(r=>{let e=()=>{r.next(),r.complete()};return t.addEventListener(`abort`,e),()=>t.removeEventListener(`abort`,e)})}function Di(t){return Ib(Ii(t))}function ss(t){return Mn$1(r=>{let{targetSnapshot:e,currentSnapshot:n,guards:{canActivateChecks:i,canDeactivateChecks:o}}=r;return o.length===0&&i.length===0?tb(G(W({},r),{guardsResult:!0})):as(o,e,n).pipe(Mn$1(s=>s&&Xo(s)?cs(e,i,t):tb(s)),Nn$1(s=>G(W({},r),{guardsResult:s})))})}function as(t,r,e){return on(t).pipe(Mn$1(n=>fs(n.component,n.route,e,r)),bb(n=>n!==!0,!0))}function cs(t,r,e){return on(r).pipe(hb(n=>Ao$1(ls(n.route.parent,e),us(n.route,e),hs(t,n.path),ds(t,n.route))),bb(n=>n!==!0,!0))}function us(t,r){return t!==null&&r&&r(new jt(t)),tb(!0)}function ls(t,r){return t!==null&&r&&r(new xt(t)),tb(!0)}function ds(t,r){let e=r.routeConfig?r.routeConfig.canActivate:null;if(!e||e.length===0)return tb(!0);return tb(e.map(i=>mb(()=>{let o=r._environmentInjector,s=Me(i,o);return he(ts(s)?s.canActivate(r,t):Zo$1(o,()=>s(r,t))).pipe(bb())}))).pipe(be())}function hs(t,r){let e=r[r.length-1];return tb(r.slice(0,r.length-1).reverse().map(o=>Qo(o)).filter(o=>o!==null).map(o=>mb(()=>{return tb(o.guards.map(c=>{let a=o.node._environmentInjector,u=Me(c,a);return he(ns(u)?u.canActivateChild(e,t):Zo$1(a,()=>u(e,t))).pipe(bb())})).pipe(be())}))).pipe(be())}function fs(t,r,e,n){let i=r&&r.routeConfig?r.routeConfig.canDeactivate:null;if(!i||i.length===0)return tb(!0);return tb(i.map(s=>{let c=r._environmentInjector,a=Me(s,c);return he(rs(a)?a.canDeactivate(t,r,e,n):Zo$1(c,()=>a(t,r,e,n))).pipe(bb())})).pipe(be())}function ps(t,r,e,n,i){let o=r.canLoad;if(o===void 0||o.length===0)return tb(!0);return tb(o.map(c=>{let a=Me(c,t),l=he(es(a)?a.canLoad(r,e):Zo$1(t,()=>a(r,e)));return i?l.pipe(Di(i)):l})).pipe(be(),Ni(n))}function Ni(t){return qy(Eb(r=>{if(typeof r!=`boolean`)throw zt(t,r)}),Nn$1(r=>r===!0))}function gs(t,r,e,n,i,o){let s=r.canMatch;if(!s||s.length===0)return tb(!0);return tb(s.map(a=>{let u=Me(a,t);return he(is(u)?u.canMatch(r,e,i):Zo$1(t,()=>u(r,e,i))).pipe(Di(o))})).pipe(be(),Ni(n))}function vs(t){throw new k(4e3,!1)}function ms(t){throw Mi(!1,T.GuardRejected)}function ys(t,r,e){if(typeof t==`string`)return Promise.resolve(t);let n=t;return _t(he(Zo$1(e,()=>n(r))))}function Ss(t,r){return t.providers&&!t._injector&&(t._injector=bc(t.providers,r,`Route: ${t.path}`)),t._injector??r}function B(t){return t.outlet||g}function Rs(t,r){let e=t.filter(n=>B(n)===r);return e.push(...t.filter(n=>B(n)!==r)),e}function Oi(t){return{routeConfig:t.routeConfig,url:t.url,params:t.params,queryParams:t.queryParams,fragment:t.fragment,data:t.data,outlet:t.outlet,title:t.title,paramMap:t.paramMap,queryParamMap:t.queryParamMap}}function ws(t,r,e,n,i,o,s){let c=Pi(t,r,e);if(!c.matched)return tb(c);let a=Oi(o(c));return n=Ss(r,n),gs(n,r,e,i,a,s).pipe(Nn$1(u=>u===!0?c:W({},xn)))}function Pi(t,r,e){if(r.path===``)return r.pathMatch===`full`&&(t.hasChildren()||e.length>0)?W({},xn):{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};let i=(r.matcher||ri)(e,t,r);if(!i)return W({},xn);let o={};Object.entries(i.posParams??{}).forEach(([c,a])=>{o[c]=a.path});let s=i.consumed.length>0?W(W({},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 ti(t,r,e,n,i){return e.length>0&&bs(t,e,n,i)?{segmentGroup:new m(r,Es(n,new m(e,t.children))),slicedSegments:[]}:e.length===0&&Ts(t,e,n)?{segmentGroup:new m(t.segments,Cs(t,e,n,t.children)),slicedSegments:e}:{segmentGroup:new m(t.segments,t.children),slicedSegments:e}}function Cs(t,r,e,n){let i={};for(let o of e)if(Vt(t,r,o)&&!n[B(o)]){let s=new m([],{});i[B(o)]=s}return W(W({},n),i)}function Es(t,r){let e={};e[g]=r;for(let n of t)if(n.path===``&&B(n)!==g){let i=new m([],{});e[B(n)]=i}return e}function bs(t,r,e,n){return e.some(i=>!Vt(t,r,i)||!(B(i)!==g)?!1:!(n!==void 0&&B(i)===n))}function Ts(t,r,e){return e.some(n=>Vt(t,r,n))}function Vt(t,r,e){return(t.hasChildren()||r.length>0)&&e.pathMatch===`full`?!1:e.path===``}function Ms(t,r,e){return r.length===0&&!t.children[e]}async function _s(t,r,e,n,i,o,s,c){return new jn(t,r,e,n,i,s,o,c).recognize()}function Is(t){t.sort((r,e)=>r.value.outlet===g?-1:e.value.outlet===g?1:r.value.outlet.localeCompare(e.value.outlet))}function Ds(t){let r=t.value.routeConfig;return r&&r.path===``}function Ui(t){let r=[],e=new Set;for(let n of t){if(!Ds(n)){r.push(n);continue}let i=r.find(o=>n.value.routeConfig===o.value.routeConfig);i!==void 0?(i.children.push(...n.children),e.add(i)):r.push(n)}for(let n of e){let i=Ui(n.children);r.push(new P(n.value,i))}return r.filter(n=>!e.has(n))}function Ns(t){return t.data||{}}function Os(t){return t.resolve||{}}function Ps(t,r,e,n,i,o,s){return Mn$1(async c=>{let{state:a,tree:u}=await _s(t,r,e,n,c.extractedUrl,i,o,s);return G(W({},c),{targetSnapshot:a,urlAfterRedirects:u})})}function Us(t){return Mn$1(r=>{let{targetSnapshot:e,guards:{canActivateChecks:n}}=r;if(!n.length)return tb(r);let i=new Set(n.map(c=>c.route)),o=new Set;for(let c of i)if(!o.has(c))for(let a of Li(c))o.add(a);let s=0;return on(o).pipe(hb(c=>i.has(c)?Ls(c,e,t):(c.data=zn(c,c.parent,t).resolve,tb(void 0))),Eb(()=>s++),wb(1),Mn$1(c=>s===o.size?tb(r):Wt$1))})}function Li(t){return[t,...t.children.map(e=>Li(e)).flat()]}function Ls(t,r,e){let n=t.routeConfig,i=t._resolve;return n?.title!==void 0&&!Ci(n)&&(i[Xe]=n.title),mb(()=>(t.data=zn(t,t.parent,e).resolve,xs(i,t,r).pipe(Nn$1(o=>(t._resolvedData=o,t.data=W(W({},t.data),o),null)))))}function xs(t,r,e){let n=Tn(t);if(n.length===0)return tb({});let i={};return on(n).pipe(Mn$1(o=>ks(t[o],r,e).pipe(bb(),Eb(s=>{if(s instanceof Ee)throw zt(new ee,s);i[o]=s}))),wb(1),Nn$1(()=>i),Gu(o=>Ai(o)?Wt$1:rb(o)))}function ks(t,r,e){let n=r._environmentInjector,i=Me(t,n);return he(i.resolve?i.resolve(r,e):Zo$1(n,()=>i(r,e)))}function Hn(t){return Cb(r=>{let e=t(r);return e?on(e).pipe(Nn$1(()=>r)):tb(r)})}async function ji(t,r,e,n){let o=await Hi(fj(await oi(Zo$1(e,()=>t.loadChildren())))),s;o instanceof Sm||Array.isArray(o)?s=o:s=await r.compileModuleAsync(o),n&&n(t);let c,a,l;return Array.isArray(s)?a=s:(c=s.create(e).injector,l=s,a=c.get(nt,[],{optional:!0,self:!0}).flat()),{routes:a.map(Gn),injector:c,factory:l}}async function Hi(t){return t}function $s(t){return t!==Fe}function ni(t){for(let r of t.newlyCreatedRoutes??[])r._localInjector?.destroy(),r._localInjector=void 0;Fi(t.targetRouterState)}function Fi(t){if(!t)return;let r=e=>{e.value.pending?.set(!1),e.children.forEach(r)};r(t._root)}function Kn(t,r){t.events.pipe(zs$1(e=>e instanceof z||e instanceof j||e instanceof le||e instanceof K),Nn$1(e=>e instanceof z||e instanceof K?0:(e instanceof j?e.code===T.Redirect||e.code===T.SupersededByNewNavigation:!1)?2:1),zs$1(e=>e!==2),Bs$1(1)).subscribe(()=>{r()})}function Fs(t){for(let r=0;r<t.length;r++)if(t[r]==null)throw new k(4008,!1)}var g;var Xe;var bn;var So;var si;var $n;var Se;var A;var m;var X;var Te;var ee;var bo;var Ao;var Io;var No;var Po;var An;var It;var me;var Fe;var b;var U;var ue;var z;var T;var Ge;var j;var K;var le;var We;var Dt;var Nt;var Ot;var Pt;var Ut;var Lt;var xt;var kt;var jt;var Ht;var Re;var Ye;var we;var $t;var de;var Bt;var P;var Ke;var Q;var qo;var Ce;var Qe;var Ei;var qn;var Pn;var et;var bi;var Vn;var Ee;var Ti;var Un;var Ft;var ye;var Et;var Y;var Je;var Ln;var xn;var kn;var As;var jn;var Wn;var Yn;var xi;var _e;var nt;var ki;var Gt;var js;var $i;var Hs;var Bi;var zi;var qi;var Vi;var qt;var Bs;var Wt;var zs;var fe;var Qn=f(()=>{Ne();Kr$1();Kr$1();Ws$1();lf();Qr();g=`primary`,Xe=Symbol(`RouteTitle`),bn=class{params;constructor(r){this.params=r||{}}has(r){return Object.hasOwn(this.params,r)}get(r){if(this.has(r)){let e=this.params[r];return Array.isArray(e)?e[0]:e}return null}getAll(r){if(this.has(r)){let e=this.params[r];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}};So={exact:ai,subset:ci},si={exact:Ro,subset:wo,ignored:()=>!0},$n={paths:`exact`,fragment:`ignored`,matrixParams:`ignored`,queryParams:`exact`},Se={paths:`subset`,fragment:`ignored`,matrixParams:`ignored`,queryParams:`subset`};A=class{root;queryParams;fragment;_queryParamMap;constructor(r=new m([],{}),e={},n=null){this.root=r,this.queryParams=e,this.fragment=n}get queryParamMap(){return this._queryParamMap??=ce(this.queryParams),this._queryParamMap}toString(){return bo.serialize(this)}},m=class{segments;children;parent=null;constructor(r,e){this.segments=r,this.children=e,Object.values(e).forEach(n=>n.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return Tt(this)}},X=class{path;parameters;_parameterMap;constructor(r,e){this.path=r,this.parameters=e}get parameterMap(){return this._parameterMap??=ce(this.parameters),this._parameterMap}toString(){return di(this)}};Te=(()=>{class t{static ɵfac=function(n){return new(n||t)};static ɵprov=Or({token:t,factory:()=>new ee})}return t})(),ee=class{parse(r){let e=new An(r);return new A(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(r){return`${`/${$e(r.root,!0)}`}${_o(r.queryParams)}${typeof r.fragment==`string`?`#${To(r.fragment)}`:``}`}},bo=new ee;Ao=/^[^\/()?;#]+/;Io=/^[^\/()?;=#]+/;No=/^[^=?&#]+/;Po=/^[^&#]+/;An=class{url;remaining;constructor(r){this.url=r,this.remaining=r}parseRootSegment(){for(;this.consumeOptional(`/`););return this.remaining===``||this.peekStartsWith(`?`)||this.peekStartsWith(`#`)?new m([],{}):new m([],this.parseChildren())}parseQueryParams(){let r={};if(this.consumeOptional(`?`))do this.parseQueryParam(r);while(this.consumeOptional(`&`));return r}parseFragment(){return this.consumeOptional(`#`)?decodeURIComponent(this.remaining):null}parseChildren(r=0){if(r>50)throw new k(4010,!1);if(this.remaining===``)return{};this.consumeOptional(`/`);let e=[];for(this.peekStartsWith(`(`)||e.push(this.parseSegment());this.peekStartsWith(`/`)&&!this.peekStartsWith(`//`)&&!this.peekStartsWith(`/(`);)this.capture(`/`),e.push(this.parseSegment());let n={};this.peekStartsWith(`/(`)&&(this.capture(`/`),n=this.parseParens(!0,r));let i={};return this.peekStartsWith(`(`)&&(i=this.parseParens(!1,r)),(e.length>0||Object.keys(n).length>0)&&(i[g]=new m(e,n)),i}parseSegment(){let r=wn(this.remaining);if(r===``&&this.peekStartsWith(`;`))throw new k(4009,!1);return this.capture(r),new X(Mt(r),this.parseMatrixParams())}parseMatrixParams(){let r={};for(;this.consumeOptional(`;`);)this.parseParam(r);return r}parseParam(r){let e=Do(this.remaining);if(!e)return;this.capture(e);let n=``;if(this.consumeOptional(`=`)){let i=wn(this.remaining);i&&(n=i,this.capture(n))}r[Mt(e)]=Mt(n)}parseQueryParam(r){let e=Oo(this.remaining);if(!e)return;this.capture(e);let n=``;if(this.consumeOptional(`=`)){let s=Uo(this.remaining);s&&(n=s,this.capture(n))}let i=Zr(e),o=Zr(n);if(Object.hasOwn(r,i)){let s=r[i];Array.isArray(s)||(s=[s],r[i]=s),s.push(o)}else r[i]=o}parseParens(r,e){let n=Object.create(null);for(this.capture(`(`);!this.consumeOptional(`)`)&&this.remaining.length>0;){let i=wn(this.remaining),o=this.remaining[i.length];if(o!==`/`&&o!==`)`&&o!==`;`)throw new k(4010,!1);let s;i.indexOf(`:`)>-1?(s=i.slice(0,i.indexOf(`:`)),this.capture(s),this.capture(`:`)):r&&(s=g);let c=this.parseChildren(e+1);n[s??g]=Object.keys(c).length===1&&c[g]?c[g]:new m([],c),this.consumeOptional(`//`)}return n}peekStartsWith(r){return this.remaining.startsWith(r)}consumeOptional(r){return this.peekStartsWith(r)?(this.remaining=this.remaining.substring(r.length),!0):!1}capture(r){if(!this.consumeOptional(r))throw new k(4011,!1)}};It=class{isAbsolute;numberOfDoubleDots;commands;constructor(r,e,n){if(this.isAbsolute=r,this.numberOfDoubleDots=e,this.commands=n,r&&n.length>0&&At(n[0]))throw new k(4003,!1);let i=n.find(Ve);if(i&&i!==yo(n))throw new k(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]==`/`}};me=class{segmentGroup;processChildren;index;constructor(r,e,n){this.segmentGroup=r,this.processChildren=e,this.index=n}};Fe=`imperative`,b=(function(t){return t[t.NavigationStart=0]=`NavigationStart`,t[t.NavigationEnd=1]=`NavigationEnd`,t[t.NavigationCancel=2]=`NavigationCancel`,t[t.NavigationError=3]=`NavigationError`,t[t.RoutesRecognized=4]=`RoutesRecognized`,t[t.ResolveStart=5]=`ResolveStart`,t[t.ResolveEnd=6]=`ResolveEnd`,t[t.GuardsCheckStart=7]=`GuardsCheckStart`,t[t.GuardsCheckEnd=8]=`GuardsCheckEnd`,t[t.RouteConfigLoadStart=9]=`RouteConfigLoadStart`,t[t.RouteConfigLoadEnd=10]=`RouteConfigLoadEnd`,t[t.ChildActivationStart=11]=`ChildActivationStart`,t[t.ChildActivationEnd=12]=`ChildActivationEnd`,t[t.ActivationStart=13]=`ActivationStart`,t[t.ActivationEnd=14]=`ActivationEnd`,t[t.Scroll=15]=`Scroll`,t[t.NavigationSkipped=16]=`NavigationSkipped`,t})(b||{}),U=class{id;url;constructor(r,e){this.id=r,this.url=e}},ue=class extends U{type=b.NavigationStart;navigationTrigger;restoredState;constructor(r,e,n=`imperative`,i=null){super(r,e),this.navigationTrigger=n,this.restoredState=i}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},z=class extends U{urlAfterRedirects;type=b.NavigationEnd;constructor(r,e,n){super(r,e),this.urlAfterRedirects=n}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},T=(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})(T||{}),Ge=(function(t){return t[t.IgnoredSameUrlNavigation=0]=`IgnoredSameUrlNavigation`,t[t.IgnoredByUrlHandlingStrategy=1]=`IgnoredByUrlHandlingStrategy`,t})(Ge||{}),j=class extends U{reason;code;type=b.NavigationCancel;constructor(r,e,n,i){super(r,e),this.reason=n,this.code=i}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}};K=class extends U{reason;code;type=b.NavigationSkipped;constructor(r,e,n,i){super(r,e),this.reason=n,this.code=i}},le=class extends U{error;target;type=b.NavigationError;constructor(r,e,n,i){super(r,e),this.error=n,this.target=i}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},We=class extends U{urlAfterRedirects;state;type=b.RoutesRecognized;constructor(r,e,n,i){super(r,e),this.urlAfterRedirects=n,this.state=i}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Dt=class extends U{urlAfterRedirects;state;type=b.GuardsCheckStart;constructor(r,e,n,i){super(r,e),this.urlAfterRedirects=n,this.state=i}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Nt=class extends U{urlAfterRedirects;state;shouldActivate;type=b.GuardsCheckEnd;constructor(r,e,n,i,o){super(r,e),this.urlAfterRedirects=n,this.state=i,this.shouldActivate=o}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},Ot=class extends U{urlAfterRedirects;state;type=b.ResolveStart;constructor(r,e,n,i){super(r,e),this.urlAfterRedirects=n,this.state=i}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Pt=class extends U{urlAfterRedirects;state;type=b.ResolveEnd;constructor(r,e,n,i){super(r,e),this.urlAfterRedirects=n,this.state=i}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Ut=class{route;type=b.RouteConfigLoadStart;constructor(r){this.route=r}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},Lt=class{route;type=b.RouteConfigLoadEnd;constructor(r){this.route=r}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},xt=class{snapshot;type=b.ChildActivationStart;constructor(r){this.snapshot=r}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||``}')`}},kt=class{snapshot;type=b.ChildActivationEnd;constructor(r){this.snapshot=r}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||``}')`}},jt=class{snapshot;type=b.ActivationStart;constructor(r){this.snapshot=r}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||``}')`}},Ht=class{snapshot;type=b.ActivationEnd;constructor(r){this.snapshot=r}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||``}')`}},Re=class{},Ye=class{},we=class{url;navigationBehaviorOptions;constructor(r,e){this.url=r,this.navigationBehaviorOptions=e}};$t=class{rootInjector;outlet=null;route=null;children;attachRef=null;get injector(){return this.route?.snapshot._environmentInjector??this.rootInjector}constructor(r){this.rootInjector=r,this.children=new de(this.rootInjector)}resetChildren(){this.children=new de(this.rootInjector)}},de=(()=>{class t{rootInjector;contexts=new Map;constructor(e){this.rootInjector=e}onChildOutletCreated(e,n){let i=this.getOrCreateContext(e);i.outlet=n,this.contexts.set(e,i)}onChildOutletDestroyed(e){let n=this.getContext(e);n&&(n.outlet=null,n.attachRef=null)}onOutletDeactivated(){let e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let n=this.getContext(e);return n||(n=new $t(this.rootInjector),this.contexts.set(e,n)),n}getContext(e){return this.contexts.get(e)||null}static ɵfac=function(n){return new(n||t)(Re$1(ue$1))};static ɵprov=X$1({token:t,factory:t.ɵfac,providedIn:`root`})}return t})(),Bt=class{_root;constructor(r){this._root=r}get root(){return this._root.value}parent(r){let e=this.pathFromRoot(r);return e.length>1?e[e.length-2]:null}children(r){let e=Dn(r,this._root);return e?e.children.map(n=>n.value):[]}firstChild(r){let e=Dn(r,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(r){let e=Nn(r,this._root);return e.length<2?[]:e[e.length-2].children.map(i=>i.value).filter(i=>i!==r)}pathFromRoot(r){return Nn(r,this._root).map(e=>e.value)}};P=class{value;children;constructor(r,e){this.value=r,this.children=e}toString(){return`TreeNode(${this.value})`}};Ke=class extends Bt{snapshot;constructor(r,e){super(r),this.snapshot=e,Fn(this,r)}toString(){return this.snapshot.toString()}};Q=class{urlSubject;paramsSubject;queryParamsSubject;fragmentSubject;dataSubject;outlet;component;snapshot;_futureSnapshot;_routerState;_paramMap;_queryParamMap;title;url;params;queryParams;fragment;data;resources;_localInjector;pending;paramsSignal;queryParamsSignal;paramMapSignal;queryParamMapSignal;fragmentSignal;dataSignal;constructor(r,e,n,i,o,s,c,a){this.urlSubject=r,this.paramsSubject=e,this.queryParamsSubject=n,this.fragmentSubject=i,this.dataSubject=o,this.outlet=s,this.component=c,this._futureSnapshot=a,this.title=this.dataSubject?.pipe(Nn$1(u=>u[Xe]))??tb(void 0),this.url=r,this.params=e,this.queryParams=n,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(Nn$1(r=>ce(r))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(Nn$1(r=>ce(r))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}_setPending(r){this._futureSnapshot=r,this.pending?.set(!0)}},qo=`always`;Ce=class{url;params;queryParams;fragment;data;outlet;component;routeConfig;_resolve;_resolvedData;_routerState;_paramMap;_queryParamMap;_environmentInjector;resources;get title(){return this.data?.[Xe]}constructor(r,e,n,i,o,s,c,a,u,l){this.url=r,this.params=e,this.queryParams=n,this.fragment=i,this.data=o,this.outlet=s,this.component=c,this.routeConfig=a,this._resolve=u,this._environmentInjector=l}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=ce(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=ce(this.queryParams),this._queryParamMap}toString(){return`Route(url:'${this.url.map(n=>n.toString()).join(`/`)}', path:'${this.routeConfig?this.routeConfig.path:``}')`}},Qe=class extends Bt{url;constructor(r,e){super(e),this.url=r,Fn(this,e)}toString(){return wi(this._root)}};Ei=new M(``),qn=(()=>{class t{activated=null;get activatedComponentRef(){return this.activated}_activatedRoute=null;name=g;activateEvents=new Ue;deactivateEvents=new Ue;attachEvents=new Ue;detachEvents=new Ue;routerOutletData=jc();parentContexts=C(de);location=C(Gi$1);changeDetector=C(bj);inputBinder=C(et,{optional:!0});supportsBindingToComponentInputs=!0;ngOnChanges(e){if(e.name){let{firstChange:n,previousValue:i}=e.name;if(n)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 k(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new k(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new k(4012,!1);this.location.detach();let e=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(e.instance),e}attach(e,n){this.activated=e,this._activatedRoute=n,this.location.insert(e.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this,this.location.injector),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,n){if(this.isActivated)throw new k(4013,!1);this._activatedRoute=e;let i=this.location,s=e.snapshot.component,c=this.parentContexts.getOrCreateContext(this.name).children,a=new Pn(e,c,i.injector,this.routerOutletData);this.activated=i.createComponent(s,{index:i.length,injector:a,environmentInjector:n}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this,this.location.injector),this.activateEvents.emit(this.activated.instance)}static ɵfac=function(n){return new(n||t)};static ɵdir=RI({type:t,selectors:[[`router-outlet`]],inputs:{name:`name`,routerOutletData:[1,`routerOutletData`]},outputs:{activateEvents:`activate`,deactivateEvents:`deactivate`,attachEvents:`attach`,detachEvents:`detach`},exportAs:[`outlet`],features:[Iw]})}return t})(),Pn=class{route;childContexts;parent;outletData;constructor(r,e,n,i){this.route=r,this.childContexts=e,this.parent=n,this.outletData=i}get(r,e){return r===Q?this.route:r===de?this.childContexts:r===Ei?this.outletData:this.parent.get(r,e)}},et=new M(``),bi=(()=>{class t{options;feature;outletDataSubscriptions=new Map;outletSeenKeys=new Map;outletEffects=new Map;constructor(e,n=null){this.options=e,this.feature=n,this.options.queryParams??=!0}bindActivatedRouteToOutletComponent(e,n){this.unsubscribeFromRouteData(e),this.subscribeToRouteData(e,n)}unsubscribeFromRouteData(e){this.outletDataSubscriptions.get(e)?.unsubscribe(),this.outletDataSubscriptions.delete(e),this.outletSeenKeys.delete(e),this.outletEffects.get(e)?.forEach(n=>n.destroy()),this.outletEffects.delete(e)}subscribeToRouteData(e,n){let{activatedRoute:i}=e,o=[],s=[];if(this.feature?.createResourceOutletBindingEffects&&e.activatedComponentRef){let{handledKeys:a,createdEffects:u}=this.feature.createResourceOutletBindingEffects(e.activatedComponentRef,i,n);o.push(...u),s=a}o.length>0&&this.outletEffects.set(e,o);let c=fb([this.options.queryParams?i.queryParams:tb({}),i.params,i.data]).pipe(Cb(([a,u,l],p)=>(l=W(W(W(W({},a),u),l),i.resources||{}),p===0?tb(l):Promise.resolve(l)))).subscribe(a=>{if(!e.isActivated||!e.activatedComponentRef||e.activatedRoute!==i||i.component===null){this.unsubscribeFromRouteData(e);return}let u=Ij(i.component);if(!u){this.unsubscribeFromRouteData(e);return}let l=this.outletSeenKeys.get(e);l||(l=new Set,this.outletSeenKeys.set(e,l));for(let h of Object.keys(a))l.add(h);let p=this.options.unmatchedInputBehavior??`alwaysUndefined`;for(let{templateName:h}of u.inputs){if(s.includes(h))continue;let y=a[h];(y!==void 0||p===`alwaysUndefined`||l.has(h))&&e.activatedComponentRef.setInput(h,y)}});this.outletDataSubscriptions.set(e,c)}static ɵfac=function(n){QC()};static ɵprov=X$1({token:t,factory:t.ɵfac})}return t})(),Vn=(()=>{class t{static ɵfac=function(n){return new(n||t)};static ɵcmp=wc({type:t,selectors:[[`ng-component`]],exportAs:[`emptyRouterOutlet`],decls:1,vars:0,template:function(n,i){n&1&&Gm(0,`router-outlet`)},dependencies:[qn],encapsulation:2,changeDetection:1})}return t})();Ee=class{redirectTo;navigationBehaviorOptions;constructor(r,e){this.redirectTo=r,this.navigationBehaviorOptions=e}},Ti=`ngNavigationCancelingError`;Un=class{routeReuseStrategy;futureState;currState;forwardEvent;inputBindingEnabled;constructor(r,e,n,i,o){this.routeReuseStrategy=r,this.futureState=e,this.currState=n,this.forwardEvent=i,this.inputBindingEnabled=o}activate(r){let e=this.futureState._root,n=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,n,r),En(this.futureState.root),this.activateChildRoutes(e,n,r)}deactivateChildRoutes(r,e,n){let i=ve(e);r.children.forEach(o=>{let s=o.value.outlet;this.deactivateRoutes(o,i[s],n),delete i[s]}),Object.values(i).forEach(o=>{this.deactivateRouteAndItsChildren(o,n)})}deactivateRoutes(r,e,n){let i=r.value,o=e?e.value:null;if(i===o)if(i.component){let s=n.getContext(i.outlet);s&&this.deactivateChildRoutes(r,e,s.children)}else this.deactivateChildRoutes(r,e,n);else o&&this.deactivateRouteAndItsChildren(e,n)}deactivateRouteAndItsChildren(r,e){r.value.component&&this.routeReuseStrategy.shouldDetach(r.value.snapshot)?this.detachAndStoreRouteSubtree(r,e):this.deactivateRouteAndOutlet(r,e)}detachAndStoreRouteSubtree(r,e){let n=e.getContext(r.value.outlet),i=n&&r.value.component?n.children:e,o=ve(r);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,i);if(n&&n.outlet){let s=n.outlet.detach(),c=n.children.contexts;n.resetChildren(),this.routeReuseStrategy.store(r.value.snapshot,{componentRef:s,route:r,contexts:c})}}deactivateRouteAndOutlet(r,e){let n=e.getContext(r.value.outlet),i=n&&r.value.component?n.children:e,o=ve(r);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,i);n&&(n.outlet&&(n.outlet.deactivate(),n.children.onOutletDeactivated()),n.attachRef=null,n.route=null),r.value._localInjector?.destroy()}activateChildRoutes(r,e,n){let i=ve(e);r.children.forEach(o=>{this.activateRoutes(o,i[o.value.outlet],n),this.forwardEvent(new Ht(o.value.snapshot))}),r.children.length&&this.forwardEvent(new kt(r.value.snapshot))}activateRoutes(r,e,n){let i=r.value,o=e?e.value:null;if(En(i),i===o)if(i.component){let s=n.getOrCreateContext(i.outlet);this.activateChildRoutes(r,e,s.children)}else this.activateChildRoutes(r,e,n);else if(i.component){let s=n.getOrCreateContext(i.outlet);if(this.routeReuseStrategy.shouldAttach(i.snapshot)){let c=this.routeReuseStrategy.retrieve(i.snapshot);this.routeReuseStrategy.store(i.snapshot,null),s.children.onOutletReAttached(c.contexts),s.attachRef=c.componentRef,s.route=c.route.value,s.outlet&&s.outlet.attach(c.componentRef,c.route.value),En(c.route.value),this.activateChildRoutes(r,null,s.children)}else s.attachRef=null,s.route=i,s.outlet&&s.outlet.activateWith(i,s.injector),this.activateChildRoutes(r,null,s.children)}else this.activateChildRoutes(r,null,n)}},Ft=class{path;route;constructor(r){this.path=r,this.route=this.path[this.path.length-1]}},ye=class{component;route;constructor(r,e){this.component=r,this.route=e}};Et=Symbol(`INITIAL_VALUE`);Y=class t extends Error{segmentGroup;constructor(r){super(),this.segmentGroup=r||null,Object.setPrototypeOf(this,t.prototype)}},Je=class t extends Error{urlTree;constructor(r){super(),this.urlTree=r,Object.setPrototypeOf(this,t.prototype)}};Ln=class{urlSerializer;urlTree;constructor(r,e){this.urlSerializer=r,this.urlTree=e}async lineralizeSegments(r,e){let n=[],i=e.root;for(;;){if(n=n.concat(i.segments),i.numberOfChildren===0)return n;if(i.numberOfChildren>1||!i.children[g])throw vs(`${r.redirectTo}`);i=i.children[g]}}async applyRedirectCommands(r,e,n,i,o){let s=await ys(e,i,o);if(s instanceof A)throw new Je(s);let c=this.applyRedirectCreateUrlTree(s,this.urlSerializer.parse(s),r,n);if(s[0]===`/`)throw new Je(c);return c}applyRedirectCreateUrlTree(r,e,n,i){let o=this.createSegmentGroup(r,e.root,n,i);return new A(o,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(r,e){let n={};return Object.entries(r).forEach(([i,o])=>{if(typeof o==`string`&&o[0]===`:`){let c=o.substring(1);n[i]=e[c]}else n[i]=o}),n}createSegmentGroup(r,e,n,i){let o=this.createSegments(r,e.segments,n,i),s=Object.create(null);return Object.entries(e.children).forEach(([c,a])=>{s[c]=this.createSegmentGroup(r,a,n,i)}),new m(o,s)}createSegments(r,e,n,i){return e.map(o=>o.path[0]===`:`?this.findPosParam(r,o,i):this.findOrReturn(o,n))}findPosParam(r,e,n){let i=n[e.path.substring(1)];if(!i)throw new k(4001,!1);return i}findOrReturn(r,e){let n=0;for(let i of e){if(i.path===r.path)return e.splice(n),i;n++}return r}};xn={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};kn=class{};As=31,jn=class{injector;configLoader;rootComponentType;config;urlTree;paramsInheritanceStrategy;urlSerializer;abortSignal;applyRedirects;absoluteRedirectCount=0;allowRedirects=!0;constructor(r,e,n,i,o,s,c,a){this.injector=r,this.configLoader=e,this.rootComponentType=n,this.config=i,this.urlTree=o,this.paramsInheritanceStrategy=s,this.urlSerializer=c,this.abortSignal=a,this.applyRedirects=new Ln(this.urlSerializer,this.urlTree)}noMatchError(r){return new k(4002,`'${r.segmentGroup}'`)}async recognize(){let r=ti(this.urlTree.root,[],[],this.config).segmentGroup,{children:e,rootSnapshot:n}=await this.match(r),i=new P(n,e),o=new Qe(``,i),s=pi(n,[],this.urlTree.queryParams,this.urlTree.fragment);return s.queryParams=this.urlTree.queryParams,o.url=this.urlSerializer.serialize(s),{state:o,tree:s}}async match(r){let e=new Ce([],Object.freeze({}),Object.freeze(W({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),g,this.rootComponentType,null,{},this.injector);try{return{children:await this.processSegmentGroup(this.injector,this.config,r,g,e),rootSnapshot:e}}catch(n){if(n instanceof Je)return this.urlTree=n.urlTree,this.match(n.urlTree.root);throw n instanceof Y?this.noMatchError(n):n}}async processSegmentGroup(r,e,n,i,o){if(n.segments.length===0&&n.hasChildren())return this.processChildren(r,e,n,o);let s=await this.processSegment(r,e,n,n.segments,i,!0,o);return s instanceof P?[s]:[]}async processChildren(r,e,n,i){let o=[];for(let a of Object.keys(n.children))a===`primary`?o.unshift(a):o.push(a);let s=[];for(let a of o){let u=n.children[a],l=Rs(e,a),p=await this.processSegmentGroup(r,l,u,a,i);s.push(...p)}let c=Ui(s);return Is(c),c}async processSegment(r,e,n,i,o,s,c){for(let a of e)try{return await this.processSegmentAgainstRoute(a._injector??r,e,a,n,i,o,s,c)}catch(u){if(u instanceof Y||Ai(u))continue;throw u}if(Ms(n,i,o))return new kn;throw new Y(n)}async processSegmentAgainstRoute(r,e,n,i,o,s,c,a){if(B(n)!==s&&(s===g||!Vt(i,o,n)))throw new Y(i);if(n.redirectTo===void 0)return this.matchSegmentAgainstRoute(r,i,n,o,s,a);if(this.allowRedirects&&c)return this.expandSegmentAgainstRouteUsingRedirect(r,i,e,n,o,s,a);throw new Y(i)}async expandSegmentAgainstRouteUsingRedirect(r,e,n,i,o,s,c){let{matched:a,parameters:u,consumedSegments:l,positionalParamSegments:p,remainingSegments:h}=Pi(e,i,o);if(!a)throw new Y(e);typeof i.redirectTo==`string`&&i.redirectTo[0]===`/`&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>As&&(this.allowRedirects=!1));let y=this.createSnapshot(r,i,o,u,c);if(this.abortSignal.aborted)throw new Error(this.abortSignal.reason);let H=await this.applyRedirects.applyRedirectCommands(l,i.redirectTo,p,Oi(y),r),ne=await this.applyRedirects.lineralizeSegments(i,H);return this.processSegment(r,n,e,ne.concat(h),s,!1,c)}createSnapshot(r,e,n,i,o){let s=new Ce(n,i,Object.freeze(W({},this.urlTree.queryParams)),this.urlTree.fragment,Ns(e),B(e),e.component??e._loadedComponent??null,e,Os(e),r),c=zn(s,o,this.paramsInheritanceStrategy);return s.params=Object.freeze(c.params),s.data=Object.freeze(c.data),s}async matchSegmentAgainstRoute(r,e,n,i,o,s){if(this.abortSignal.aborted)throw new Error(this.abortSignal.reason);let c=re=>this.createSnapshot(r,n,re.consumedSegments,re.parameters,s),a=await _t(ws(e,n,i,r,this.urlSerializer,c,this.abortSignal));if(n.path===`**`&&(e.children={}),!a?.matched)throw new Y(e);r=n._injector??r;let{routes:u}=await this.getChildConfig(r,n,i),l=n._loadedInjector??r,{parameters:p,consumedSegments:h,remainingSegments:y}=a,H=this.createSnapshot(r,n,h,p,s),{segmentGroup:ne,slicedSegments:Ae}=ti(e,h,y,u,o);if(Ae.length===0&&ne.hasChildren()){let re=await this.processChildren(l,u,ne,H);return new P(H,re)}if(u.length===0&&Ae.length===0)return new P(H,[]);let Kt=B(n)===o,rt=await this.processSegment(l,u,ne,Ae,Kt?g:o,!0,H);return new P(H,rt instanceof P?[rt]:[])}async getChildConfig(r,e,n){if(e.children)return{routes:e.children,injector:r};if(e.loadChildren){if(e._loadedRoutes!==void 0){let o=e._loadedNgModuleFactory;return o&&!e._loadedInjector&&(e._loadedInjector=o.create(r).injector),{routes:e._loadedRoutes,injector:e._loadedInjector}}if(this.abortSignal.aborted)throw new Error(this.abortSignal.reason);if(await _t(ps(r,e,n,this.urlSerializer,this.abortSignal))){let o=await this.configLoader.loadChildren(r,e);return e._loadedRoutes=o.routes,e._loadedInjector=o.injector,e._loadedNgModuleFactory=o.factory,o}throw ms(e)}return{routes:[],injector:r}}};Wn=new M(``);Yn=(()=>{class t{buildTitle(e){let n,i=e.root;for(;i!==void 0;)n=this.getResolvedTitleForRoute(i)??n,i=i.children.find(o=>o.outlet===g);return n}getResolvedTitleForRoute(e){return e.data[Xe]}static ɵfac=function(n){return new(n||t)};static ɵprov=Or({token:t,factory:()=>C(xi)})}return t})(),xi=(()=>{class t extends Yn{title;constructor(e){super(),this.title=e}updateTitle(e){let n=this.buildTitle(e);n!==void 0&&this.title.setTitle(n)}static ɵfac=function(n){return new(n||t)(Re$1(Kr))};static ɵprov=X$1({token:t,factory:t.ɵfac,providedIn:`root`})}return t})(),_e=new M(``,{factory:()=>({})}),nt=new M(``),ki=(()=>{class t{componentLoaders=new WeakMap;childrenLoaders=new WeakMap;onLoadStartListener;onLoadEndListener;compiler=C($k);async loadComponent(e,n){if(this.componentLoaders.get(n))return this.componentLoaders.get(n);if(n._loadedComponent)return Promise.resolve(n._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(n);let i=(async()=>{try{let s=await Hi(fj(await oi(Zo$1(e,()=>n.loadComponent()))));return this.onLoadEndListener&&this.onLoadEndListener(n),n._loadedComponent=s,s}finally{this.componentLoaders.delete(n)}})();return this.componentLoaders.set(n,i),i}loadChildren(e,n){if(this.childrenLoaders.get(n))return this.childrenLoaders.get(n);if(n._loadedRoutes)return Promise.resolve({routes:n._loadedRoutes,injector:n._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(n);let i=(async()=>{try{let o=await ji(n,this.compiler,e,this.onLoadEndListener);return n._loadedRoutes=o.routes,n._loadedInjector=o.injector,n._loadedNgModuleFactory=o.factory,o}finally{this.childrenLoaders.delete(n)}})();return this.childrenLoaders.set(n,i),i}static ɵfac=function(n){return new(n||t)};static ɵprov=Or({token:t,factory:t.ɵfac})}return t})();Gt=(()=>{class t{static ɵfac=function(n){return new(n||t)};static ɵprov=Or({token:t,factory:()=>C(js)})}return t})(),js=(()=>{class t{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,n){return e}static ɵfac=function(n){return new(n||t)};static ɵprov=Or({token:t,factory:t.ɵfac})}return t})(),$i=new M(``),Hs=()=>{},Bi=new M(``),zi=(()=>{class t{currentNavigation=wt$1(null,{equal:()=>!1});currentTransition=null;lastSuccessfulNavigation=wt$1(null);events=new ge;transitionAbortWithErrorSubject=new ge;configLoader=C(ki);environmentInjector=C(ue$1);destroyRef=C(ve$1);urlSerializer=C(Te);rootContexts=C(de);location=C(oe);inputBindingEnabled=C(et,{optional:!0})!==null;titleStrategy=C(Yn);options=C(_e,{optional:!0})||{};paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||qo;urlHandlingStrategy=C(Gt);createViewTransition=C($i,{optional:!0});navigationErrorHandler=C(Bi,{optional:!0});routerResourcesFeature=C(Wn,{optional:!0});navigationId=0;get hasRequestedNavigation(){return this.navigationId!==0}transitions;afterPreactivation=()=>tb(void 0);rootComponentType=null;destroyed=!1;constructor(){let e=i=>this.events.next(new Ut(i)),n=i=>this.events.next(new Lt(i));this.configLoader.onLoadEndListener=n,this.configLoader.onLoadStartListener=e,this.destroyRef.onDestroy(()=>{this.destroyed=!0})}complete(){this.transitions?.complete()}handleNavigationRequest(e){let n=++this.navigationId;Tg(()=>{this.transitions?.next(G(W({},e),{extractedUrl:this.urlHandlingStrategy.extract(e.rawUrl),targetSnapshot:null,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null,id:n,routesRecognizeHandler:{},beforeActivateHandler:{}}))})}setupNavigations(e){return this.transitions=new qt$1(null),this.transitions.pipe(zs$1(n=>n!==null),Cb(n=>{let i=!0,o=!1,s=new AbortController,c=()=>!o&&this.currentTransition?.id===n.id;return tb(n).pipe(Cb(a=>{if(this.navigationId>n.id)return this.cancelNavigationTransition(n,``,T.SupersededByNewNavigation),Wt$1;this.currentTransition=n;let u=this.lastSuccessfulNavigation();this.currentNavigation.set({id:a.id,initialUrl:a.rawUrl,extractedUrl:a.extractedUrl,targetBrowserUrl:typeof a.extras.browserUrl==`string`?this.urlSerializer.parse(a.extras.browserUrl):a.extras.browserUrl,trigger:a.source,extras:a.extras,previousNavigation:u?G(W({},u),{previousNavigation:null}):null,abort:()=>s.abort(),routesRecognizeHandler:a.routesRecognizeHandler,beforeActivateHandler:a.beforeActivateHandler});let l=!e.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),p=a.extras.onSameUrlNavigation??e.onSameUrlNavigation;if(!l&&p!==`reload`)return this.events.next(new K(a.id,this.urlSerializer.serialize(a.rawUrl),``,Ge.IgnoredSameUrlNavigation)),a.resolve(!1),Wt$1;if(this.urlHandlingStrategy.shouldProcessUrl(a.rawUrl))return tb(a).pipe(Cb(h=>(this.events.next(new ue(h.id,this.urlSerializer.serialize(h.extractedUrl),h.source,h.restoredState)),h.id!==this.navigationId?Wt$1:Promise.resolve(h))),Ps(this.environmentInjector,this.configLoader,this.rootComponentType,e.config,this.urlSerializer,this.paramsInheritanceStrategy,s.signal),Eb(h=>{n.targetSnapshot=h.targetSnapshot,n.urlAfterRedirects=h.urlAfterRedirects,this.currentNavigation.update(y=>(y.finalUrl=h.urlAfterRedirects,y)),this.events.next(new Ye)}),Cb(h=>on(n.routesRecognizeHandler.deferredHandle??tb(void 0)).pipe(Nn$1(()=>h))),Eb(()=>{let h=new We(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(h)}));if(l&&this.urlHandlingStrategy.shouldProcessUrl(a.currentRawUrl)){let{id:h,extractedUrl:y,source:H,restoredState:ne,extras:Ae}=a,Kt=new ue(h,this.urlSerializer.serialize(y),H,ne);this.events.next(Kt);let rt=Ri(this.rootComponentType,this.environmentInjector).snapshot;return this.currentTransition=n=G(W({},a),{targetSnapshot:rt,urlAfterRedirects:y,extras:G(W({},Ae),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.update(re=>(re.finalUrl=y,re)),tb(n)}else return this.events.next(new K(a.id,this.urlSerializer.serialize(a.extractedUrl),``,Ge.IgnoredByUrlHandlingStrategy)),a.resolve(!1),Wt$1}),Nn$1(a=>{let u=new Dt(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);return this.events.next(u),this.currentTransition=n=G(W({},a),{guards:Ko(a.targetSnapshot,a.currentSnapshot,this.rootContexts)}),n}),ss(a=>this.events.next(a)),Cb(a=>{if(n.guardsResult=a.guardsResult,a.guardsResult&&typeof a.guardsResult!=`boolean`)throw zt(this.urlSerializer,a.guardsResult);let u=new Nt(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot,!!a.guardsResult);if(this.events.next(u),!c())return Wt$1;if(!a.guardsResult)return this.cancelNavigationTransition(a,``,T.GuardRejected),Wt$1;if(a.guards.canActivateChecks.length===0)return tb(a);let l=new Ot(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);if(this.events.next(l),!c())return Wt$1;let p=!1;return tb(a).pipe(Us(this.paramsInheritanceStrategy),Eb({next:()=>{p=!0;let h=new Pt(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(h)},complete:()=>{p||this.cancelNavigationTransition(a,``,T.NoDataFromResolver)}}))}),Hn(a=>{let u=p=>{let h=[];if(p.routeConfig?._loadedComponent)p.component=p.routeConfig?._loadedComponent;else if(p.routeConfig?.loadComponent){let y=p._environmentInjector;h.push(this.configLoader.loadComponent(y,p.routeConfig).then(H=>{p.component=H}))}for(let y of p.children)h.push(...u(y));return h},l=u(a.targetSnapshot.root);return l.length===0?tb(a):on(Promise.all(l).then(()=>a))}),Cb(a=>{let{newlyCreatedRoutes:u,state:l}=Vo(e.routeReuseStrategy,a.targetSnapshot,a.currentRouterState);return this.currentTransition=n=a=G(W({},a),{targetRouterState:l,newlyCreatedRoutes:u}),this.currentNavigation.update(p=>(p.targetRouterState=l,p)),tb(a)}),this.routerResourcesFeature?.setupAndRunResources(s.signal)??(a=>a),Hn(()=>this.afterPreactivation()),Cb(()=>{let{currentSnapshot:a,targetSnapshot:u}=n,l=this.createViewTransition?.(this.environmentInjector,a.root,u.root,n.hasUAVisualTransition);return l?on(l).pipe(Nn$1(()=>n)):tb(n)}),Bs$1(1),Cb(a=>{i=!1,this.events.next(new Re);let u=n.beforeActivateHandler.deferredHandle;return u?on(u.then(()=>a)):tb(a)}),Eb(a=>{new Un(e.routeReuseStrategy,n.targetRouterState,n.currentRouterState,u=>this.events.next(u),this.inputBindingEnabled).activate(this.rootContexts),a.newlyCreatedRoutes?.clear(),c()&&(Fi(a.targetRouterState),o=!0,this.currentNavigation.update(u=>(u.abort=Hs,u)),this.lastSuccessfulNavigation.set(Tg(this.currentNavigation)),this.events.next(new z(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects))),this.titleStrategy?.updateTitle(a.targetRouterState.snapshot),a.resolve(!0))}),Ib(Ii(s.signal).pipe(zs$1(()=>!o&&i),Eb(()=>{this.cancelNavigationTransition(n,s.signal.reason+``,T.Aborted)}))),Eb({complete:()=>{o=!0}}),Ib(this.transitionAbortWithErrorSubject.pipe(Eb(a=>{throw a}))),yb(()=>{s.abort(),o||this.cancelNavigationTransition(n,``,T.SupersededByNewNavigation),this.currentTransition?.id===n.id&&(this.currentNavigation.set(null),this.currentTransition=null)}),Gu(a=>{if(o=!0,ni(n),this.destroyed)return n.resolve(!1),Wt$1;if(_i(a))this.events.next(new j(n.id,this.urlSerializer.serialize(n.extractedUrl),a.message,a.cancellationCode)),Yo(a)?this.events.next(new we(a.url,a.navigationBehaviorOptions)):n.resolve(!1);else{let u=new le(n.id,this.urlSerializer.serialize(n.extractedUrl),a,n.targetSnapshot??void 0);try{let l=Zo$1(this.environmentInjector,()=>this.navigationErrorHandler?.(u));if(l instanceof Ee){let{message:p,cancellationCode:h}=zt(this.urlSerializer,l);this.events.next(new j(n.id,this.urlSerializer.serialize(n.extractedUrl),p,h)),this.events.next(new we(l.redirectTo,l.navigationBehaviorOptions))}else throw this.events.next(u),a}catch(l){this.options.resolveNavigationPromiseOnError?n.resolve(!1):n.reject(l)}}return Wt$1}))}))}cancelNavigationTransition(e,n,i){ni(e);let o=new j(e.id,this.urlSerializer.serialize(e.extractedUrl),n,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))),n=Tg(this.currentNavigation),i=n?.targetBrowserUrl??n?.extractedUrl;return e.toString()!==i?.toString()&&!n?.extras.skipLocationChange}static ɵfac=function(n){return new(n||t)};static ɵprov=Or({token:t,factory:t.ɵfac})}return t})();qi=new M(``),Vi=(()=>{class t{static ɵfac=function(n){return new(n||t)};static ɵprov=Or({token:t,factory:()=>C(Bs)})}return t})(),qt=class{shouldDetach(r){return!1}store(r,e){}shouldAttach(r){return!1}retrieve(r){return null}shouldReuseRoute(r,e){return r.routeConfig===e.routeConfig}shouldDestroyInjector(r){return!0}},Bs=(()=>{class t extends qt{static ɵfac=function(n){return new(n||t)};static ɵprov=Or({token:t,factory:t.ɵfac})}return t})(),Wt=(()=>{class t{urlSerializer=C(Te);options=C(_e,{optional:!0})||{};canceledNavigationResolution=this.options.canceledNavigationResolution||`replace`;location=C(oe);urlHandlingStrategy=C(Gt);urlUpdateStrategy=this.options.urlUpdateStrategy||`deferred`;currentUrlTree=new A;getCurrentUrlTree(){return this.currentUrlTree}rawUrlTree=this.currentUrlTree;getRawUrlTree(){return this.rawUrlTree}createBrowserPath({finalUrl:e,initialUrl:n,targetBrowserUrl:i}){let o=e!==void 0?this.urlHandlingStrategy.merge(e,n):n,s=i??o;return s instanceof A?this.urlSerializer.serialize(s):s}routerUrlState(e){return e?.targetBrowserUrl===void 0||e?.finalUrl===void 0?{}:{ɵrouterUrl:this.urlSerializer.serialize(e.finalUrl)}}commitTransition({targetRouterState:e,finalUrl:n,initialUrl:i}){n&&e?(this.currentUrlTree=n,this.rawUrlTree=this.urlHandlingStrategy.merge(n,i),this.routerState=e):this.rawUrlTree=i}routerState=Ri(null,C(ue$1));getRouterState(){return this.routerState}_stateMemento=this.createStateMemento();get stateMemento(){return this._stateMemento}updateStateMemento(){this._stateMemento=this.createStateMemento()}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}restoredState(){return this.location.getState()}static ɵfac=function(n){return new(n||t)};static ɵprov=Or({token:t,factory:()=>C(zs)})}return t})(),zs=(()=>{class t extends Wt{currentPageId=0;lastSuccessfulId=-1;get browserPageId(){return this.canceledNavigationResolution!==`computed`?this.currentPageId:this.restoredState()?.ɵrouterPageId??this.currentPageId}registerNonRouterCurrentEntryChangeListener(e){return this.location.subscribe(n=>{n.type===`popstate`&&setTimeout(()=>{e(n.url,n.state,`popstate`,{replaceUrl:!0},n.hasUAVisualTransition)})})}handleRouterEvent(e,n){e instanceof ue?this.updateStateMemento():e instanceof K?this.commitTransition(n):e instanceof We?this.urlUpdateStrategy===`eager`&&(n.extras.skipLocationChange||this.setBrowserUrl(this.createBrowserPath(n),n)):e instanceof Re?(this.commitTransition(n),this.urlUpdateStrategy===`deferred`&&!n.extras.skipLocationChange&&this.setBrowserUrl(this.createBrowserPath(n),n)):e instanceof j&&!Si(e)?this.restoreHistory(n):e instanceof le?this.restoreHistory(n,!0):e instanceof z&&(this.lastSuccessfulId=e.id,this.currentPageId=this.browserPageId)}setBrowserUrl(e,n){let{extras:i,id:o}=n,{replaceUrl:s,state:c}=i;if(this.location.isCurrentPathEqualTo(e)||s){let a=this.browserPageId,u=W(W({},c),this.generateNgRouterState(o,a,n));this.location.replaceState(e,``,u)}else{let a=W(W({},c),this.generateNgRouterState(o,this.browserPageId+1,n));this.location.go(e,``,a)}}restoreHistory(e,n=!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`&&(n&&this.resetInternalState(e),this.resetUrlToCurrentUrlTree())}resetInternalState({finalUrl:e}){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,e??this.rawUrlTree)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.getRawUrlTree()),``,this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(e,n,i){return this.canceledNavigationResolution===`computed`?W({navigationId:e,ɵrouterPageId:n},this.routerUrlState(i)):W({navigationId:e},this.routerUrlState(i))}static ɵfac=function(n){return new(n||t)};static ɵprov=Or({token:t,factory:t.ɵfac})}return t})();fe=(()=>{class t{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}disposed=!1;nonRouterCurrentEntryChangeSubscription;console=C(pE);stateManager=C(Wt);options=C(_e,{optional:!0})||{};pendingTasks=C(Un$1);urlUpdateStrategy=this.options.urlUpdateStrategy||`deferred`;navigationTransitions=C(zi);urlSerializer=C(Te);location=C(oe);urlHandlingStrategy=C(Gt);injector=C(ue$1);_events=new ge;get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}navigated=!1;routeReuseStrategy=C(Vi);injectorCleanup=C(qi,{optional:!0});onSameUrlNavigation=this.options.onSameUrlNavigation||`ignore`;config=C(nt,{optional:!0})?.flat()??[];componentInputBindingEnabled=!!C(et,{optional:!0});currentNavigation=this.navigationTransitions.currentNavigation.asReadonly();constructor(){this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this).subscribe({error:e=>{}}),this.subscribeToNavigationEvents()}eventsSubscription=new te$1;subscribeToNavigationEvents(){let e=this.navigationTransitions.events.subscribe(n=>{try{let i=this.navigationTransitions.currentTransition,o=Tg(this.navigationTransitions.currentNavigation);if(i!==null&&o!==null){if(this.stateManager.handleRouterEvent(n,o),n instanceof j&&n.code!==T.Redirect&&n.code!==T.SupersededByNewNavigation)this.navigated=!0;else if(n instanceof z)this.navigated=!0,this.injectorCleanup?.(this.routeReuseStrategy,this.routerState,this.config);else if(n instanceof we){let s=n.navigationBehaviorOptions,c=this.urlHandlingStrategy.merge(n.url,i.currentRawUrl),a=W({scroll:i.extras.scroll,browserUrl:i.extras.browserUrl,info:i.extras.info,skipLocationChange:i.extras.skipLocationChange,replaceUrl:i.extras.replaceUrl||this.urlUpdateStrategy===`eager`||$s(i.source)},s);this.scheduleNavigation(c,Fe,null,a,i.hasUAVisualTransition,{resolve:i.resolve,reject:i.reject,promise:i.promise})}}zo(n)&&this._events.next(n)}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),Fe,this.stateManager.restoredState(),{replaceUrl:!0})}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((e,n,i,o,s)=>{this.navigateToSyncWithBrowser(e,i,n,o,s)})}navigateToSyncWithBrowser(e,n,i,o,s){let c=i?.navigationId?i:null,a=i?.ɵrouterUrl??e;if(i?.ɵrouterUrl&&(o=G(W({},o),{browserUrl:e})),i){let l=W({},i);delete l.navigationId,delete l.ɵrouterPageId,delete l.ɵrouterUrl,Object.keys(l).length!==0&&(o.state=l)}let u=this.parseUrl(a);this.scheduleNavigation(u,n,c,o,s).catch(l=>{this.disposed||this.injector.get(gn$1)(l)})}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return Tg(this.navigationTransitions.currentNavigation)}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(e){this.config=e.map(Gn),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this._events.unsubscribe(),this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription?.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0,this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(e,n={}){let{relativeTo:i,queryParams:o,fragment:s,queryParamsHandling:c,preserveFragment:a}=n,u=a?this.currentUrlTree.fragment:s,l=null;switch(c??this.options.defaultQueryParamsHandling){case`merge`:l=W(W({},this.currentUrlTree.queryParams),o);break;case`preserve`:l=this.currentUrlTree.queryParams;break;default:l=o||null}l!==null&&(l=this.removeEmptyProps(l));let p;try{p=gi(i?i.snapshot:this.routerState.snapshot.root)}catch{(typeof e[0]!=`string`||e[0][0]!==`/`)&&(e=[]),p=this.currentUrlTree.root}return vi(p,e,l,u??null,this.urlSerializer)}navigateByUrl(e,n={skipLocationChange:!1}){let i=te(e)?e:this.parseUrl(e),o=this.urlHandlingStrategy.merge(i,this.rawUrlTree);return this.scheduleNavigation(o,Fe,null,n)}navigate(e,n={skipLocationChange:!1}){return Fs(e),this.navigateByUrl(this.createUrlTree(e,n),n)}serializeUrl(e){return this.urlSerializer.serialize(e)}parseUrl(e){try{return this.urlSerializer.parse(e)}catch{return this.console.warn(nr(4018,!1)),this.urlSerializer.parse(`/`)}}isActive(e,n){let i;if(n===!0?i=W({},$n):n===!1?i=W({},Se):i=W(W({},Se),n),te(e))return Mn(this.currentUrlTree,e,i);let o=this.parseUrl(e);return Mn(this.currentUrlTree,o,i)}removeEmptyProps(e){return Object.entries(e).reduce((n,[i,o])=>(o!=null&&(n[i]=o),n),{})}scheduleNavigation(e,n,i,o,s,c){if(this.disposed)return Promise.resolve(!1);let a,u,l;c?(a=c.resolve,u=c.reject,l=c.promise):l=new Promise((h,y)=>{a=h,u=y});let p=this.pendingTasks.add();return Kn(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(p))}),this.navigationTransitions.handleNavigationRequest({source:n,restoredState:i,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:e,extras:o,hasUAVisualTransition:s,resolve:a,reject:u,promise:l,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),l.catch(Promise.reject.bind(Promise))}static ɵfac=function(n){return new(n||t)};static ɵprov=Or({token:t,factory:t.ɵfac})}return t})()});function Ws(t){let r=t;return!!(r.paths||r.matrixParams||r.queryParams||r.fragment)}function Ks(t,...r){return cr([{provide:nt,multi:!0,useValue:t},{provide:Q,useFactory:Qs},{provide:Vm,multi:!0,useFactory:Js},r.map(e=>e.ɵproviders)])}function Qs(){return C(fe).routerState.root}function Zs(t,r){return{ɵkind:t,ɵproviders:r}}function Js(){let t=C(ke$1);return r=>{let e=t.get(Ur);if(r!==e.components[0])return;let n=t.get(fe),i=t.get(Xs);t.get(ea)===1&&n.initialNavigation(),t.get(ta,null,{optional:!0})?.setUpPreloading(),t.get(Ys,null,{optional:!0})?.init(),n.resetRootComponentType(e.componentTypes[0]),i.closed||(i.next(),i.complete(),i.unsubscribe())}}function na(t={}){return Zs(8,[{provide:et,useFactory:()=>new bi(t,C(Wn,{optional:!0}))}])}var Vs;var Yt;var Gs;var Ys;var Xs;var ea;var ta;var Gi=f(()=>{Ne();Kr$1();Kr$1();Qn();Ws$1();lf();Vs=(()=>{class t{router=C(fe);stateManager=C(Wt);fragment=wt$1(``);queryParams=wt$1({});path=wt$1(``);serializer=C(Te);constructor(){this.updateState(),this.router.events?.subscribe(e=>{e instanceof z&&this.updateState()})}updateState(){let{fragment:e,root:n,queryParams:i}=this.stateManager.getCurrentUrlTree();this.fragment.set(e),this.queryParams.set(i),this.path.set(this.serializer.serialize(new A(n)))}static ɵfac=function(n){return new(n||t)};static ɵprov=Or({token:t,factory:t.ɵfac})}return t})(),Yt=(()=>{class t{router;route;tabIndexAttribute;renderer;el;locationStrategy;hrefAttributeValue=C(new Mg(`href`),{optional:!0});reactiveHref=Pk(()=>this.isAnchorElement?this.computeHref(this._urlTree()):this.hrefAttributeValue);get href(){return Tg(this.reactiveHref)}set href(e){this.reactiveHref.set(e)}set target(e){this._target.set(e)}get target(){return Tg(this._target)}_target=wt$1(void 0);set queryParams(e){this._queryParams.set(e)}get queryParams(){return Tg(this._queryParams)}_queryParams=wt$1(void 0,{equal:()=>!1});set fragment(e){this._fragment.set(e)}get fragment(){return Tg(this._fragment)}_fragment=wt$1(void 0);set queryParamsHandling(e){this._queryParamsHandling.set(e)}get queryParamsHandling(){return Tg(this._queryParamsHandling)}_queryParamsHandling=wt$1(void 0);set state(e){this._state.set(e)}get state(){return Tg(this._state)}_state=wt$1(void 0,{equal:()=>!1});set info(e){this._info.set(e)}get info(){return Tg(this._info)}_info=wt$1(void 0,{equal:()=>!1});set relativeTo(e){this._relativeTo.set(e)}get relativeTo(){return Tg(this._relativeTo)}_relativeTo=wt$1(void 0);set preserveFragment(e){this._preserveFragment.set(e)}get preserveFragment(){return Tg(this._preserveFragment)}_preserveFragment=wt$1(!1);set skipLocationChange(e){this._skipLocationChange.set(e)}get skipLocationChange(){return Tg(this._skipLocationChange)}_skipLocationChange=wt$1(!1);set replaceUrl(e){this._replaceUrl.set(e)}get replaceUrl(){return Tg(this._replaceUrl)}_replaceUrl=wt$1(!1);browserUrl=jc(void 0);isAnchorElement;onChanges=new ge;applicationErrorHandler=C(gn$1);options=C(_e,{optional:!0});reactiveRouterState=C(Vs);constructor(e,n,i,o,s,c){this.router=e,this.route=n,this.tabIndexAttribute=i,this.renderer=o,this.el=s,this.locationStrategy=c;let a=s.nativeElement.tagName?.toLowerCase();this.isAnchorElement=a===`a`||a===`area`||!!(typeof customElements==`object`&&customElements.get(a)?.observedAttributes?.includes?.(`href`))}setTabIndexIfNotOnNativeEl(e){this.tabIndexAttribute!=null||this.isAnchorElement||this.applyAttributeValue(`tabindex`,e)}ngOnChanges(e){this.onChanges.next(this)}routerLinkInput=wt$1(null);set routerLink(e){e==null?(this.routerLinkInput.set(null),this.setTabIndexIfNotOnNativeEl(null)):(te(e)?this.routerLinkInput.set(e):this.routerLinkInput.set(Array.isArray(e)?e:[e]),this.setTabIndexIfNotOnNativeEl(`0`))}onClick(e,n,i,o,s){let c=this._urlTree();if(c===null||this.isAnchorElement&&(e!==0||n||i||o||s||typeof this.target==`string`&&this.target!=`_self`))return!0;let a=this.browserUrl(),u=W({skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state,info:this.info},a!==void 0&&{browserUrl:a});return this.router.navigateByUrl(c,u)?.catch(l=>{this.applicationErrorHandler(l)}),!this.isAnchorElement}ngOnDestroy(){}applyAttributeValue(e,n){let i=this.renderer,o=this.el.nativeElement;n!==null?i.setAttribute(o,e,n):i.removeAttribute(o,e)}_urlTree=Ot$1(()=>{this.reactiveRouterState.path(),this._preserveFragment()&&this.reactiveRouterState.fragment();let e=i=>i===`preserve`||i===`merge`;(e(this._queryParamsHandling())||e(this.options?.defaultQueryParamsHandling))&&this.reactiveRouterState.queryParams();let n=this.routerLinkInput();return n===null||!this.router.createUrlTree?null:te(n)?n:this.router.createUrlTree(n,{relativeTo:this._relativeTo()!==void 0?this._relativeTo():this.route,queryParams:this._queryParams(),fragment:this._fragment(),queryParamsHandling:this._queryParamsHandling(),preserveFragment:this._preserveFragment()})},{equal:(e,n)=>this.computeHref(e)===this.computeHref(n)});get urlTree(){return Tg(this._urlTree)}computeHref(e){return e!==null&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(e))??``:null}static ɵfac=function(n){return new(n||t)(Vr$1(fe),Vr$1(Q),dp(`tabindex`),Vr$1(gl),Vr$1(Pr),Vr$1(R))};static ɵdir=RI({type:t,selectors:[[``,`routerLink`,``]],hostVars:2,hostBindings:function(n,i){n&1&&Jm(`click`,function(s){return i.onClick(s.button,s.ctrlKey,s.shiftKey,s.altKey,s.metaKey)}),n&2&&Br$1(`href`,i.reactiveHref(),hD)(`target`,i._target())},inputs:{target:`target`,queryParams:`queryParams`,fragment:`fragment`,queryParamsHandling:`queryParamsHandling`,state:`state`,info:`info`,relativeTo:`relativeTo`,preserveFragment:[2,`preserveFragment`,`preserveFragment`,Dj],skipLocationChange:[2,`skipLocationChange`,`skipLocationChange`,Dj],replaceUrl:[2,`replaceUrl`,`replaceUrl`,Dj],browserUrl:[1,`browserUrl`],routerLink:`routerLink`},features:[Iw]})}return t})(),Gs=(()=>{class t{router;element;renderer;cdr;links;classes=[];routerEventsSubscription;linkInputChangesSubscription;_isActive=!1;get isActive(){return this._isActive}routerLinkActiveOptions={exact:!1};ariaCurrentWhenActive;isActiveChange=new Ue;link=C(Yt,{optional:!0});constructor(e,n,i,o){this.router=e,this.element=n,this.renderer=i,this.cdr=o,this.routerEventsSubscription=e.events.subscribe(s=>{s instanceof z&&this.update()})}ngAfterContentInit(){tb(this.links.changes,tb(null)).pipe(Fs$1()).subscribe(e=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){this.linkInputChangesSubscription?.unsubscribe();let e=[...this.links.toArray(),this.link].filter(n=>!!n).map(n=>n.onChanges);this.linkInputChangesSubscription=on(e).pipe(Fs$1()).subscribe(n=>{this._isActive!==this.isLinkActive(this.router)(n)&&this.update()})}set routerLinkActive(e){if(e==null){this.classes=[];return}let n=Array.isArray(e)?e:e.split(` `);this.classes=n.filter(i=>!!i)}ngOnChanges(e){this.update()}ngOnDestroy(){this.routerEventsSubscription.unsubscribe(),this.linkInputChangesSubscription?.unsubscribe()}update(){!this.links||!this.router.navigated||this.routerLinkActiveOptions===null&&!this._isActive||queueMicrotask(()=>{let e=this.hasActiveLinks();this.classes.forEach(n=>{e?this.renderer.addClass(this.element.nativeElement,n):this.renderer.removeClass(this.element.nativeElement,n)}),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 n=this.routerLinkActiveOptions;if(n===null)return()=>!1;let i;return n===void 0?i=W({},Se):Ws(n)?i=n:n.exact??!1?i=W({},$n):i=W({},Se),o=>{let s=o.urlTree;return s?Tg(Bn(s,e,i)):!1}}hasActiveLinks(){let e=this.isLinkActive(this.router);return this.link&&e(this.link)||this.links.some(e)}static ɵfac=function(n){return new(n||t)(Vr$1(fe),Vr$1(Pr),Vr$1(gl),Vr$1(bj))};static ɵdir=RI({type:t,selectors:[[``,`routerLinkActive`,``]],contentQueries:function(n,i,o){if(n&1&&ng(o,Yt,5),n&2){let s;VE(s=zE())&&(i.links=s)}},inputs:{routerLinkActiveOptions:`routerLinkActiveOptions`,ariaCurrentWhenActive:`ariaCurrentWhenActive`,routerLinkActive:`routerLinkActive`},outputs:{isActiveChange:`isActiveChange`},exportAs:[`routerLinkActive`],features:[Iw]})}return t})();Ys=new M(``);Xs=new M(``,{factory:()=>new ge}),ea=new M(``,{factory:()=>1}),ta=new M(``)});var ra=f(()=>{Qn();Gi()});export{Yt as a,na as c,Qr as i,qn as l,Ks as n,ao as o,Q as r,fe as s,Gs as t,ra as u};
@@ -1 +1 @@
1
- import{$n as sk,A as HE,B as Kr,Bn as ok,Ct as Tg,D as Gm,Dn as kc,En as kE,Fn as nS,Gt as _m,H as Ld,J as Nc,K as My,Pn as mj,Pt as Wm,R as Jm,St as Tc,Tn as jc,Wn as pg,Xn as rf,cn as f,et as Od,f as C,gr as wt,gt as SS,ht as SE,jn as lk,ln as fS,lr as vg,mr as wc,o as Ac,on as eH,or as vS,rn as dk,rt as Ot,sn as ec,t as $E,tt as Oi,xn as hg}from"./chunk-BdOOWVGY.js";import"./chunk-V7ftX_10.js";import"./chunk-D29s9m84.js";import{n as y,t as f$1}from"./chunk-Ckq_aT3A.js";import{n as o,t as i}from"./chunk-Zcfhi-RM.js";import{n as p,t as M}from"./chunk-C22Z7vgK.js";import"./chunk-eG8Su12W.js";import"./chunk-Bx2_SrZM.js";import{_ as pn,d as dn,f as fn,g as ln,l as an,m as ie,r as Je$1,u as cn,v as un}from"./chunk-QaMufr3I.js";import{n as x,t as u}from"./chunk-BW20bBdg.js";import{a as Yt,r as Q$1,s as fe$1,u as ra}from"./chunk-DzG5R5Kk.js";import{i as z,n as oe,r as x$1}from"./chunk-Ba_z6LGV.js";import{n as P,t as K}from"./chunk-DvoPI4MU.js";import{n as V,t as G}from"./chunk-CWusqRG0.js";import{n as W,t as J}from"./chunk-DZjRtM2K.js";function Ie(i,t){i&1&&(Oi(0,`p`,22),fS(1),Nc()),i&2&&(ec(),pg(t))}function Ee(i,t){if(i&1){let n=$E();Gm(0,`div`,2),Oi(1,`div`,3)(2,`div`,4)(3,`h2`,5),fS(4),Nc(),Oi(5,`p`,6),fS(6),Nc(),Oi(7,`form`,7),Jm(`submit`,function(m){Ld(n);return Od(HE().submit(m))}),Oi(8,`label`,8)(9,`span`,9),fS(10),Nc(),Oi(11,`input`,10),Jm(`input`,function(m){Ld(n);return Od(HE().name.set(m.target.value))}),Nc()(),Oi(12,`label`,11)(13,`input`,12),Jm(`change`,function(m){Ld(n);return Od(HE().internal.set(m.target.checked))}),Nc(),Oi(14,`span`)(15,`span`,13),fS(16),Nc(),Oi(17,`span`,14),fS(18),Nc()()(),Oi(19,`details`,15)(20,`summary`,16),fS(21),Nc(),Oi(22,`label`,17)(23,`span`,9),fS(24),Nc(),Oi(25,`input`,18),Jm(`input`,function(m){Ld(n);return Od(HE().driver.set(m.target.value))}),Nc(),Oi(26,`span`,19),fS(27),Nc()(),Oi(28,`label`,17)(29,`span`,9),fS(30),Nc(),Oi(31,`input`,20),Jm(`input`,function(m){Ld(n);return Od(HE().subnet.set(m.target.value))}),Nc(),Oi(32,`span`,19),fS(33),Nc()(),Oi(34,`label`,17)(35,`span`,9),fS(36),Nc(),Oi(37,`input`,21),Jm(`input`,function(m){Ld(n);return Od(HE().gateway.set(m.target.value))}),Nc(),Oi(38,`span`,19),fS(39),Nc()()(),SE(40,Ie,2,1,`p`,22),Oi(41,`div`,23)(42,`button`,24),Gm(43,`app-icon`,25),fS(44),Nc(),Oi(45,`button`,26),Gm(46,`app-icon`,27),fS(47),Nc()()()()()}if(i&2){let n,e=HE();ec(4),pg(e.t().title),ec(2),pg(e.t().description),ec(4),pg(e.t().nameLabel),ec(),nS(e.field),Wm(`placeholder`,e.t().namePlaceholder)(`value`,e.name())(`disabled`,e.busy()),ec(2),Wm(`checked`,e.internal())(`disabled`,e.busy()),ec(3),pg(e.t().internal),ec(2),pg(e.t().internalHint),ec(),Wm(`open`,e.advanced()),ec(2),pg(e.t().advanced),ec(3),pg(e.t().driverLabel),ec(),nS(e.field),Wm(`value`,e.driver())(`disabled`,e.busy()),ec(2),pg(e.t().driverHint),ec(3),pg(e.t().subnetLabel),ec(),nS(e.field),Wm(`value`,e.subnet())(`disabled`,e.busy()),ec(2),pg(e.t().subnetHint),ec(3),pg(e.t().gatewayLabel),ec(),nS(e.field),Wm(`value`,e.gateway())(`disabled`,e.busy()),ec(2),pg(e.t().gatewayHint),ec(),kE((n=e.problem())?40:-1,n),ec(3),Wm(`size`,14),ec(),Ac(` `,e.common().cancel,` `),ec(),Wm(`disabled`,!e.canSubmit()),ec(),Wm(`size`,14),ec(),Ac(` `,e.busy()?e.t().creating:e.t().submit,` `)}}var Pe;var Q;var be=f(()=>{Kr();Je$1();f$1();dk();sk();Kr();Pe=`mx-focus mt-1 w-full rounded-md border border-ink-700 bg-ink-800 px-3 py-1.5 text-[13px] text-ink-100 placeholder:text-ink-500`,Q=class i{store=C(y);open=mj(!1);t=Ot(()=>ok().networks.createDialog);common=Ot(()=>ok().common);field=Pe;name=wt(``);internal=wt(!1);driver=wt(`bridge`);subnet=wt(``);gateway=wt(``);busy=wt(!1);problem=wt(null);advanced=Ot(()=>this.driver().trim()!==`bridge`||this.subnet().trim()!==``||this.gateway().trim()!==``);canSubmit=Ot(()=>!this.busy()&&this.name().trim()!==``&&this.driver().trim()!==``);constructor(){rf(()=>{this.open()&&Tg(()=>{this.name.set(``),this.internal.set(!1),this.driver.set(`bridge`),this.subnet.set(``),this.gateway.set(``),this.problem.set(null)})})}submit(t){if(t.preventDefault(),!this.canSubmit())return;let n=this.subnet().trim(),e=this.gateway().trim();this.busy.set(!0),this.problem.set(null),this.store.create({name:this.name().trim(),driver:this.driver().trim(),internal:this.internal(),subnet:n===``?null:n,gateway:e===``?null:e}).then(m=>{this.problem.set(m),m===null&&this.open.set(!1)}).finally(()=>this.busy.set(!1))}static ɵfac=function(n){return new(n||i)};static ɵcmp=wc({type:i,selectors:[[`app-create-network-dialog`]],inputs:{open:[1,`open`]},outputs:{open:`openChange`},decls:2,vars:1,consts:[[`rdxDialogRoot`,``,3,`openChange`,`open`],[`rdxDialogPortal`,``],[`rdxDialogBackdrop`,``,1,`fixed`,`inset-0`,`z-40`,`bg-black/50`],[`rdxDialogViewport`,``,1,`fixed`,`inset-0`,`z-50`,`grid`,`place-items-center`,`p-4`],[`rdxDialogPopup`,``,1,`w-full`,`max-w-md`,`rounded-lg`,`border`,`border-ink-700`,`bg-ink-850`,`p-5`,`shadow-2xl`],[`rdxDialogTitle`,``,1,`text-[15px]`,`font-semibold`,`text-ink-100`],[`rdxDialogDescription`,``,1,`mt-1`,`text-[13px]`,`text-ink-400`],[1,`mt-4`,`space-y-3`,3,`submit`],[1,`block`],[1,`text-[12px]`,`text-ink-400`],[`type`,`text`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`placeholder`,`value`,`disabled`],[1,`flex`,`cursor-pointer`,`items-start`,`gap-2.5`],[`type`,`checkbox`,1,`mx-focus`,`mt-0.5`,`accent-accent`,3,`change`,`checked`,`disabled`],[1,`block`,`text-[13px]`,`text-ink-100`],[1,`block`,`text-[12px]`,`text-ink-500`],[1,`text-[12px]`,`text-ink-400`,3,`open`],[1,`cursor-pointer`,`select-none`],[1,`mt-2`,`block`],[`type`,`text`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`value`,`disabled`],[1,`mt-1`,`block`,`text-[12px]`,`text-ink-500`],[`type`,`text`,`placeholder`,`172.30.0.0/16`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`value`,`disabled`],[`type`,`text`,`placeholder`,`172.30.0.1`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`value`,`disabled`],[`role`,`alert`,1,`text-[13px]`,`text-danger`],[1,`flex`,`justify-end`,`gap-2`,`pt-2`],[`type`,`button`,`rdxDialogClose`,``,1,`mx-btn`,`mx-focus`],[`name`,`close`,3,`size`],[`type`,`submit`,1,`mx-btn`,`mx-focus`,3,`disabled`],[`name`,`plus`,3,`size`]],template:function(n,e){n&1&&(Oi(0,`div`,0),vg(`openChange`,function(l){return vS(e.open,l)||(e.open=l),l}),_m(1,Ee,48,38,`ng-template`,1),Nc()),n&2&&hg(`open`,e.open)},dependencies:[ie,ln,an,pn,cn,fn,dn,un,My],encapsulation:2})}});function Le(i,t){i&1&&(Oi(0,`p`,7),fS(1),Nc()),i&2&&(ec(),pg(t))}function Ve(i,t){if(i&1&&(Oi(0,`p`,8),fS(1),Nc()),i&2){let n=HE(2);ec(),pg(n.t().loading)}}function ze(i,t){if(i&1&&(Oi(0,`p`,8),fS(1),Nc()),i&2){let n=HE(2);ec(),pg(n.t().empty)}}function Oe(i,t){i&1&&(Oi(0,`span`,16),fS(1),Nc()),i&2&&(ec(),pg(t))}function We(i,t){if(i&1){let n=$E();Oi(0,`li`,13),Gm(1,`span`,14),Oi(2,`a`,15),Jm(`click`,function(){Ld(n);return Od(HE(3).open.set(!1))}),fS(3),Nc(),SE(4,Oe,2,1,`span`,16),Oi(5,`span`,17),fS(6),Nc()()}if(i&2){let n,e=t.$implicit,m=HE(3);ec(),nS(e.running?`bg-ok`:`bg-ink-600`),ec(),Wm(`routerLink`,SS(8,Te,e.id)),ec(),pg(e.name),ec(),kE((n=e.composeProject)?4:-1,n),ec(),nS(e.ipAddress?`text-ink-300`:`text-ink-600`),ec(),Ac(` `,e.ipAddress??(e.running?m.t().noAddress:m.t().stopped),` `)}}function Be(i,t){if(i&1&&(Oi(0,`ul`,9),kc(1,We,7,10,`li`,13,Re),Nc()),i&2){let n=HE(2);ec(),Tc(n.members())}}function Ae(i,t){if(i&1&&(Gm(0,`div`,2),Oi(1,`div`,3)(2,`div`,4)(3,`h2`,5),fS(4),Nc(),Oi(5,`p`,6),fS(6),Nc(),SE(7,Le,2,1,`p`,7)(8,Ve,2,1,`p`,8)(9,ze,2,1,`p`,8)(10,Be,3,0,`ul`,9),Oi(11,`div`,10)(12,`button`,11),Gm(13,`app-icon`,12),fS(14),Nc()()()()),i&2){let n,e=HE();ec(4),pg(e.t().title(e.network())),ec(2),pg(e.t().description),ec(),kE((n=e.problem())?7:e.members()===null?8:e.members()?.length===0?9:10,n),ec(6),Wm(`size`,14),ec(),Ac(` `,e.common().close,` `)}}var Te;var Re;var U;var ye=f(()=>{Kr();ra();Je$1();lk();dk();sk();Kr();Te=i=>[`/containers`,i],Re=(i,t)=>t.id;U=class i{open=mj(!1);network=jc.required();t=Ot(()=>ok().networks.members);common=Ot(()=>ok().common);members=wt(null);problem=wt(null);constructor(){rf(()=>{if(!this.open())return;let t=this.network();Tg(()=>{this.load(t)})})}async load(t){this.members.set(null),this.problem.set(null);try{this.members.set(await window.electron.networks.members(t))}catch(n){this.problem.set(eH(n))}}static ɵfac=function(n){return new(n||i)};static ɵcmp=wc({type:i,selectors:[[`app-network-members-dialog`]],inputs:{open:[1,`open`],network:[1,`network`]},outputs:{open:`openChange`},decls:2,vars:1,consts:[[`rdxDialogRoot`,``,3,`openChange`,`open`],[`rdxDialogPortal`,``],[`rdxDialogBackdrop`,``,1,`fixed`,`inset-0`,`z-40`,`bg-black/50`],[`rdxDialogViewport`,``,1,`fixed`,`inset-0`,`z-50`,`grid`,`place-items-center`,`p-4`],[`rdxDialogPopup`,``,`data-testid`,`network-members-dialog`,1,`flex`,`max-h-[85vh]`,`w-full`,`max-w-xl`,`flex-col`,`rounded-lg`,`border`,`border-ink-700`,`bg-ink-850`,`p-5`,`shadow-2xl`],[`rdxDialogTitle`,``,1,`text-[15px]`,`font-semibold`,`text-ink-100`],[`rdxDialogDescription`,``,1,`mt-1`,`text-[13px]`,`text-ink-400`],[1,`mt-4`,`rounded-md`,`border`,`border-danger/40`,`bg-danger/10`,`px-3`,`py-2`,`text-[13px]`,`text-danger`],[1,`mt-4`,`text-[13px]`,`text-ink-400`],[`data-testid`,`network-member-list`,1,`mt-3`,`min-h-0`,`flex-1`,`divide-y`,`divide-ink-800`,`overflow-auto`],[1,`mt-4`,`flex`,`justify-end`],[`type`,`button`,`rdxDialogClose`,``,1,`mx-btn`,`mx-focus`],[`name`,`close`,3,`size`],[1,`flex`,`items-center`,`gap-3`,`py-2`,`text-[13px]`],[`aria-hidden`,`true`,1,`size-2`,`shrink-0`,`rounded-full`],[1,`mx-focus`,`min-w-0`,`flex-1`,`truncate`,`text-ink-100`,`hover:text-accent`,`hover:underline`,3,`click`,`routerLink`],[1,`shrink-0`,`text-[12px]`,`text-ink-500`],[1,`w-32`,`shrink-0`,`text-right`,`font-mono`,`text-[12px]`]],template:function(n,e){n&1&&(Oi(0,`div`,0),vg(`openChange`,function(l){return vS(e.open,l)||(e.open=l),l}),_m(1,Ae,15,5,`ng-template`,1),Nc()),n&2&&hg(`open`,e.open)},dependencies:[ie,ln,an,pn,cn,fn,dn,un,Yt,My],encapsulation:2})}});function Fe(i,t){if(i&1&&(Oi(0,`span`,16),fS(1),Nc()),i&2){let n=HE();ec(),pg(n.t().refreshing)}}function je(i,t){if(i&1){let n=$E();Oi(0,`div`,18)(1,`span`,30),fS(2),Nc(),Oi(3,`button`,31),Jm(`click`,function(){Ld(n);return Od(HE().askRemoveSelected())}),Gm(4,`app-icon`,32),fS(5),Nc()()}if(i&2){let n=HE();ec(2),pg(n.t().selected(n.selected().size)),ec(2),Wm(`size`,14),ec(),Ac(` `,n.common().remove,` `)}}function He(i,t){if(i&1&&(Oi(0,`span`,35),fS(1),Nc()),i&2){let n=HE(2);ec(),pg(n.t().builtIn)}}function Ke(i,t){if(i&1&&(Oi(0,`span`,35),fS(1),Nc()),i&2){let n=HE(2);ec(),pg(n.t().internal)}}function qe(i,t){if(i&1&&(Oi(0,`div`,36),fS(1),Nc()),i&2){let n=HE().$implicit;ec(),pg(n.composeProject)}}function Qe(i,t){if(i&1&&(Oi(0,`div`,33)(1,`span`,34),fS(2),Nc(),SE(3,He,2,1,`span`,35),SE(4,Ke,2,1,`span`,35),Nc(),SE(5,qe,2,1,`div`,36)),i&2){let n=t.$implicit;ec(),Wm(`title`,n.shortId),ec(),pg(n.name),ec(),kE(n.builtIn?3:-1),ec(),kE(n.internal?4:-1),ec(),kE(n.composeProject?5:-1)}}function Ue(i,t){if(i&1&&(Oi(0,`span`,37),fS(1),Nc()),i&2){let n=t.$implicit;ec(),pg(n.driver)}}function Ge(i,t){if(i&1&&(Oi(0,`span`,38),fS(1),Nc()),i&2){let n=t.$implicit;ec(),pg(n.scope)}}function Je(i,t){if(i&1&&(Oi(0,`span`,39),fS(1),Nc()),i&2){let n=HE().$implicit;ec(),pg(n.subnet)}}function Xe(i,t){i&1&&(Oi(0,`span`,40),fS(1,`—`),Nc())}function Ye(i,t){if(i&1&&SE(0,Je,2,1,`span`,39)(1,Xe,2,0,`span`,40),i&2){let n=t.$implicit;kE(n.subnet?0:1)}}function Ze(i,t){if(i&1&&(Oi(0,`span`,41),fS(1),Nc()),i&2){let n=HE().$implicit,e=HE();ec(),pg(e.t().containerCount(n.connected))}}function $e(i,t){i&1&&(Oi(0,`span`,40),fS(1,`—`),Nc())}function et(i,t){if(i&1&&SE(0,Ze,2,1,`span`,41)(1,$e,2,0,`span`,40),i&2){let n=t.$implicit;kE(n.connected>0?0:1)}}function tt(i,t){if(i&1){let n=$E();Oi(0,`div`,42)(1,`app-action-menu`,43),Jm(`picked`,function(m){let l=Ld(n).$implicit;return Od(HE().onRowMenu(m,l))}),Nc()()}if(i&2){let n=t.$implicit,e=HE();ec(),Wm(`label`,e.t().rowMenu(n.name))(`items`,e.rowMenu(n))}}var fe;f(()=>{Kr();f$1();M();G();J();oe();K();dk();x();be();sk();ye();ra();o();Kr();fe=class i$1{store=C(y);preferences=C(p);t=Ot(()=>ok().networks);common=Ot(()=>ok().common);columns=Ot(()=>{let t=this.t().columns;return[{key:`name`,label:t.name},{key:`driver`,label:t.driver,width:`100px`},{key:`scope`,label:t.scope,width:`90px`},{key:`subnet`,label:t.subnet,width:`160px`},{key:`connected`,label:t.connected,width:`120px`},{key:`actions`,label:t.actions,width:`84px`,align:`right`}]});loading=this.store.loading;problem=this.store.problem;pending=this.store.pending;unusedCount=this.store.unusedCount;search=wt(``);zoek=jc(void 0);hideBuiltIn=this.preferences.flag(`networks.hideBuiltIn`);selected=wt(new Set);action=wt(null);confirmOpen=wt(!1);createOpen=wt(!1);membersOpen=wt(!1);membersNetwork=wt(``);rows=Ot(()=>{let t=this.search().trim().toLowerCase(),n=this.hideBuiltIn();return this.store.networks().filter(e=>n&&e.builtIn?!1:t===``||`${e.name} ${e.driver}`.toLowerCase().includes(t))});trackKey=t=>t.id;leden=jc(void 0);router=C(fe$1);route=C(Q$1);constructor(){rf(()=>{let t=this.leden();t!==void 0&&Tg(()=>{this.membersNetwork.set(t),this.membersOpen.set(!0),i(this.router,this.route,`leden`)})}),rf(()=>{let t=this.zoek();t!==void 0&&Tg(()=>this.search.set(t))}),this.store.refresh()}removalReason(t){return t.builtIn?this.t().builtInReason:t.connected>0?this.t().connectedReason(t.connected):this.common().remove}rowMenu(t){return[{id:`members`,label:this.t().rowMembers,icon:`containers`},{id:`remove`,label:this.common().remove,icon:`trash`,disabled:!this.canRemove(t)||this.pending().has(t.id),danger:!0,hint:this.removalReason(t),separated:!0}]}onRowMenu(t,n){t===`members`?(this.membersNetwork.set(n.name),this.membersOpen.set(!0)):this.askRemove(n)}canRemove(t){return!t.builtIn&&t.connected===0}askRemove(t){let n=this.t().remove;this.action.set({ids:[t.id],title:n.title,description:n.description(t.name),confirmLabel:this.common().remove}),this.confirmOpen.set(!0)}askRemoveSelected(){let t=[...this.selected()],n=this.t().remove;this.action.set({ids:t,title:n.manyTitle,description:n.manyDescription(t.length),confirmLabel:this.common().remove}),this.confirmOpen.set(!0)}menuItems=Ot(()=>[{id:`create`,label:this.t().menu.create,icon:`plus`},{id:`prune-unused`,label:this.t().menu.pruneUnused,icon:`broom`,separated:!0}]);onMenu(t){t===`create`?this.createOpen.set(!0):this.askPrune()}askPrune(){let t=this.t().prune;this.action.set({ids:[],title:t.title,description:t.description,confirmLabel:t.confirm}),this.confirmOpen.set(!0)}confirm(){let t=this.action();t!==null&&(t.ids.length===0?this.store.prune():(this.store.removeMany(t.ids),this.selected.set(new Set)),this.action.set(null))}actionTitle(){return this.action()?.title??``}actionDescription(){return this.action()?.description??``}actionConfirmLabel(){return this.action()?.confirmLabel??this.common().remove}actionConfirmIcon(){return this.action()?.ids.length===0?`broom`:`trash`}static ɵfac=function(n){return new(n||i$1)};static ɵcmp=wc({type:i$1,selectors:[[`app-networks-page`]],inputs:{zoek:[1,`zoek`],leden:[1,`leden`]},decls:35,vars:27,consts:[[1,`flex`,`h-full`,`flex-col`],[1,`shrink-0`,`px-6`,`pt-5`,`pb-3`],[1,`flex`,`flex-wrap`,`items-start`,`gap-4`],[1,`text-xl`,`font-semibold`,`tracking-tight`,`text-ink-100`],[1,`mt-3`],[1,`text-[12px]`,`text-ink-400`],[1,`text-[15px]`,`font-medium`,`text-ink-100`],[1,`ml-auto`],[3,`picked`,`label`,`items`],[1,`mt-4`,`flex`,`flex-wrap`,`items-center`,`gap-4`],[1,`relative`,`flex`,`items-center`],[1,`pointer-events-none`,`absolute`,`left-2.5`,`text-ink-500`],[`name`,`search`,3,`size`],[1,`sr-only`],[`type`,`search`,1,`mx-focus`,`w-72`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-850`,`py-1.5`,`pr-3`,`pl-8`,`text-[13px]`,`text-ink-100`,`placeholder:text-ink-500`,3,`input`,`placeholder`,`value`],[3,`onChange`,`label`,`on`],[1,`text-[12px]`,`text-ink-500`],[3,`problem`],[1,`mt-3`,`flex`,`items-center`,`gap-2`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-850`,`px-3`,`py-2`],[1,`min-h-0`,`flex-1`,`overflow-y-auto`,`px-6`,`pb-6`],[3,`selectedChange`,`columns`,`rows`,`trackKey`,`selected`,`emptyMessage`],[`appCell`,`name`],[`appCell`,`driver`],[`appCell`,`scope`],[`appCell`,`subnet`],[`appCell`,`connected`],[`appCell`,`actions`],[3,`openChange`,`open`],[3,`openChange`,`open`,`network`],[3,`openChange`,`confirmed`,`open`,`title`,`description`,`confirmLabel`,`confirmIcon`],[1,`text-[13px]`,`text-ink-200`],[`type`,`button`,1,`mx-btn`,`mx-focus`,`ml-auto`,`text-danger`,`hover:text-danger`,3,`click`],[`name`,`trash`,3,`size`],[1,`flex`,`items-center`,`gap-2`],[1,`truncate`,`text-ink-100`,3,`title`],[1,`shrink-0`,`rounded`,`border`,`border-ink-700`,`px-1`,`text-[10px]`,`text-ink-500`],[1,`truncate`,`text-[11px]`,`text-ink-500`],[1,`text-ink-300`],[1,`text-ink-400`],[1,`font-mono`,`text-[12px]`,`text-ink-300`],[1,`text-ink-600`],[1,`text-ink-200`],[1,`flex`,`items-center`,`justify-end`],[`compact`,``,3,`picked`,`label`,`items`]],template:function(n,e){n&1&&(Oi(0,`section`,0)(1,`div`,1)(2,`div`,2)(3,`div`)(4,`h1`,3),fS(5),Nc(),Oi(6,`div`,4)(7,`div`,5),fS(8),Nc(),Oi(9,`div`,6),fS(10),Nc()()(),Oi(11,`div`,7)(12,`app-action-menu`,8),Jm(`picked`,function(l){return e.onMenu(l)}),Nc()()(),Oi(13,`div`,9)(14,`label`,10)(15,`span`,11),Gm(16,`app-icon`,12),Nc(),Oi(17,`span`,13),fS(18),Nc(),Oi(19,`input`,14),Jm(`input`,function(l){return e.search.set(l.target.value)}),Nc()(),Oi(20,`app-filter-switch`,15),vg(`onChange`,function(l){return vS(e.hideBuiltIn,l)||(e.hideBuiltIn=l),l}),Nc(),SE(21,Fe,2,1,`span`,16),Nc(),Gm(22,`app-page-messages`,17),SE(23,je,6,3,`div`,18),Nc(),Oi(24,`div`,19)(25,`app-data-table`,20),vg(`selectedChange`,function(l){return vS(e.selected,l)||(e.selected=l),l}),_m(26,Qe,6,5,`ng-template`,21)(27,Ue,2,1,`ng-template`,22)(28,Ge,2,1,`ng-template`,23)(29,Ye,2,1,`ng-template`,24)(30,et,2,1,`ng-template`,25)(31,tt,2,2,`ng-template`,26),Nc()()(),Oi(32,`app-create-network-dialog`,27),vg(`openChange`,function(l){return vS(e.createOpen,l)||(e.createOpen=l),l}),Nc(),Oi(33,`app-network-members-dialog`,28),vg(`openChange`,function(l){return vS(e.membersOpen,l)||(e.membersOpen=l),l}),Nc(),Oi(34,`app-confirm-dialog`,29),vg(`openChange`,function(l){return vS(e.confirmOpen,l)||(e.confirmOpen=l),l}),Jm(`confirmed`,function(){return e.confirm()}),Nc()),n&2&&(ec(5),pg(e.t().title),ec(3),pg(e.t().unused),ec(2),pg(e.unusedCount()),ec(2),Wm(`label`,e.t().menuLabel)(`items`,e.menuItems()),ec(4),Wm(`size`,15),ec(2),pg(e.t().searchLabel),ec(),Wm(`placeholder`,e.t().searchLabel)(`value`,e.search()),ec(),Wm(`label`,e.t().hideBuiltIn),hg(`on`,e.hideBuiltIn),ec(),kE(e.loading()?21:-1),ec(),Wm(`problem`,e.problem()),ec(),kE(e.selected().size>0?23:-1),ec(2),Wm(`columns`,e.columns())(`rows`,e.rows())(`trackKey`,e.trackKey),hg(`selected`,e.selected),Wm(`emptyMessage`,e.t().empty),ec(7),hg(`open`,e.createOpen),ec(),hg(`open`,e.membersOpen),Wm(`network`,e.membersNetwork()),ec(),hg(`open`,e.confirmOpen),Wm(`title`,e.actionTitle())(`description`,e.actionDescription())(`confirmLabel`,e.actionConfirmLabel())(`confirmIcon`,e.actionConfirmIcon()))},dependencies:[z,x$1,My,W,u,P,V,Q,U],encapsulation:2})}})();export{fe as NetworksPage};
1
+ import{$n as sS,A as HE,An as kk,B as Kr,Bn as oS,D as Gm,Dn as kE,Fn as mj,Gn as pg,Gt as _m,H as Ld,K as My,Pt as Wm,R as Jm,Rn as nk,St as Tg,Tn as jc,Zn as rf,_r as wt,cn as f,dr as vk,et as Od,f as C,fn as fk,hr as wc,ht as Sc,jn as lS,lr as vg,mt as SE,o as Ac,on as eH,q as Nc,rn as dS,rt as Ot,sn as ec,t as $E,tt as Oi,xn as hg,xt as Tc}from"./chunk-CpIMiI_l.js";import"./chunk-CphQt55R.js";import"./chunk-DS3iAefP.js";import{n as y,t as f$1}from"./chunk-hJqozYgS.js";import{n as o,t as i}from"./chunk-DNfiG-TG.js";import{n as p,t as M}from"./chunk-CjySsWe4.js";import"./chunk-gHmeiJFn.js";import"./chunk-xmDwFpQl.js";import{_ as pn,d as dn,f as fn,g as ln,l as an,m as ie,r as Je$1,u as cn,v as un}from"./chunk-DdTfHpyK.js";import{n as x,t as u}from"./chunk-CpNGhf9S.js";import{a as Yt,r as Q$1,s as fe$1,u as ra}from"./chunk-B1xjyPnV.js";import{n as P,t as K}from"./chunk-Cpz4zP5G.js";import{n as V,t as G}from"./chunk-C7c_wFw-.js";import{n as W,t as J}from"./chunk-D5njuWRz.js";import{i as z,n as oe,r as x$1}from"./chunk-Bxte2YBm.js";function Ie(i,t){i&1&&(Oi(0,`p`,22),fk(1),Nc()),i&2&&(ec(),pg(t))}function Ee(i,t){if(i&1){let n=$E();Gm(0,`div`,2),Oi(1,`div`,3)(2,`div`,4)(3,`h2`,5),fk(4),Nc(),Oi(5,`p`,6),fk(6),Nc(),Oi(7,`form`,7),Jm(`submit`,function(m){Ld(n);return Od(HE().submit(m))}),Oi(8,`label`,8)(9,`span`,9),fk(10),Nc(),Oi(11,`input`,10),Jm(`input`,function(m){Ld(n);return Od(HE().name.set(m.target.value))}),Nc()(),Oi(12,`label`,11)(13,`input`,12),Jm(`change`,function(m){Ld(n);return Od(HE().internal.set(m.target.checked))}),Nc(),Oi(14,`span`)(15,`span`,13),fk(16),Nc(),Oi(17,`span`,14),fk(18),Nc()()(),Oi(19,`details`,15)(20,`summary`,16),fk(21),Nc(),Oi(22,`label`,17)(23,`span`,9),fk(24),Nc(),Oi(25,`input`,18),Jm(`input`,function(m){Ld(n);return Od(HE().driver.set(m.target.value))}),Nc(),Oi(26,`span`,19),fk(27),Nc()(),Oi(28,`label`,17)(29,`span`,9),fk(30),Nc(),Oi(31,`input`,20),Jm(`input`,function(m){Ld(n);return Od(HE().subnet.set(m.target.value))}),Nc(),Oi(32,`span`,19),fk(33),Nc()(),Oi(34,`label`,17)(35,`span`,9),fk(36),Nc(),Oi(37,`input`,21),Jm(`input`,function(m){Ld(n);return Od(HE().gateway.set(m.target.value))}),Nc(),Oi(38,`span`,19),fk(39),Nc()()(),kE(40,Ie,2,1,`p`,22),Oi(41,`div`,23)(42,`button`,24),Gm(43,`app-icon`,25),fk(44),Nc(),Oi(45,`button`,26),Gm(46,`app-icon`,27),fk(47),Nc()()()()()}if(i&2){let n,e=HE();ec(4),pg(e.t().title),ec(2),pg(e.t().description),ec(4),pg(e.t().nameLabel),ec(),nk(e.field),Wm(`placeholder`,e.t().namePlaceholder)(`value`,e.name())(`disabled`,e.busy()),ec(2),Wm(`checked`,e.internal())(`disabled`,e.busy()),ec(3),pg(e.t().internal),ec(2),pg(e.t().internalHint),ec(),Wm(`open`,e.advanced()),ec(2),pg(e.t().advanced),ec(3),pg(e.t().driverLabel),ec(),nk(e.field),Wm(`value`,e.driver())(`disabled`,e.busy()),ec(2),pg(e.t().driverHint),ec(3),pg(e.t().subnetLabel),ec(),nk(e.field),Wm(`value`,e.subnet())(`disabled`,e.busy()),ec(2),pg(e.t().subnetHint),ec(3),pg(e.t().gatewayLabel),ec(),nk(e.field),Wm(`value`,e.gateway())(`disabled`,e.busy()),ec(2),pg(e.t().gatewayHint),ec(),SE((n=e.problem())?40:-1,n),ec(3),Wm(`size`,14),ec(),Ac(` `,e.common().cancel,` `),ec(),Wm(`disabled`,!e.canSubmit()),ec(),Wm(`size`,14),ec(),Ac(` `,e.busy()?e.t().creating:e.t().submit,` `)}}var Pe;var Q;var be=f(()=>{Kr();Je$1();f$1();dS();sS();Kr();Pe=`mx-focus mt-1 w-full rounded-md border border-ink-700 bg-ink-800 px-3 py-1.5 text-[13px] text-ink-100 placeholder:text-ink-500`,Q=class i{store=C(y);open=mj(!1);t=Ot(()=>oS().networks.createDialog);common=Ot(()=>oS().common);field=Pe;name=wt(``);internal=wt(!1);driver=wt(`bridge`);subnet=wt(``);gateway=wt(``);busy=wt(!1);problem=wt(null);advanced=Ot(()=>this.driver().trim()!==`bridge`||this.subnet().trim()!==``||this.gateway().trim()!==``);canSubmit=Ot(()=>!this.busy()&&this.name().trim()!==``&&this.driver().trim()!==``);constructor(){rf(()=>{this.open()&&Tg(()=>{this.name.set(``),this.internal.set(!1),this.driver.set(`bridge`),this.subnet.set(``),this.gateway.set(``),this.problem.set(null)})})}submit(t){if(t.preventDefault(),!this.canSubmit())return;let n=this.subnet().trim(),e=this.gateway().trim();this.busy.set(!0),this.problem.set(null),this.store.create({name:this.name().trim(),driver:this.driver().trim(),internal:this.internal(),subnet:n===``?null:n,gateway:e===``?null:e}).then(m=>{this.problem.set(m),m===null&&this.open.set(!1)}).finally(()=>this.busy.set(!1))}static ɵfac=function(n){return new(n||i)};static ɵcmp=wc({type:i,selectors:[[`app-create-network-dialog`]],inputs:{open:[1,`open`]},outputs:{open:`openChange`},decls:2,vars:1,consts:[[`rdxDialogRoot`,``,3,`openChange`,`open`],[`rdxDialogPortal`,``],[`rdxDialogBackdrop`,``,1,`fixed`,`inset-0`,`z-40`,`bg-black/50`],[`rdxDialogViewport`,``,1,`fixed`,`inset-0`,`z-50`,`grid`,`place-items-center`,`p-4`],[`rdxDialogPopup`,``,1,`w-full`,`max-w-md`,`rounded-lg`,`border`,`border-ink-700`,`bg-ink-850`,`p-5`,`shadow-2xl`],[`rdxDialogTitle`,``,1,`text-[15px]`,`font-semibold`,`text-ink-100`],[`rdxDialogDescription`,``,1,`mt-1`,`text-[13px]`,`text-ink-400`],[1,`mt-4`,`space-y-3`,3,`submit`],[1,`block`],[1,`text-[12px]`,`text-ink-400`],[`type`,`text`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`placeholder`,`value`,`disabled`],[1,`flex`,`cursor-pointer`,`items-start`,`gap-2.5`],[`type`,`checkbox`,1,`mx-focus`,`mt-0.5`,`accent-accent`,3,`change`,`checked`,`disabled`],[1,`block`,`text-[13px]`,`text-ink-100`],[1,`block`,`text-[12px]`,`text-ink-500`],[1,`text-[12px]`,`text-ink-400`,3,`open`],[1,`cursor-pointer`,`select-none`],[1,`mt-2`,`block`],[`type`,`text`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`value`,`disabled`],[1,`mt-1`,`block`,`text-[12px]`,`text-ink-500`],[`type`,`text`,`placeholder`,`172.30.0.0/16`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`value`,`disabled`],[`type`,`text`,`placeholder`,`172.30.0.1`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`value`,`disabled`],[`role`,`alert`,1,`text-[13px]`,`text-danger`],[1,`flex`,`justify-end`,`gap-2`,`pt-2`],[`type`,`button`,`rdxDialogClose`,``,1,`mx-btn`,`mx-focus`],[`name`,`close`,3,`size`],[`type`,`submit`,1,`mx-btn`,`mx-focus`,3,`disabled`],[`name`,`plus`,3,`size`]],template:function(n,e){n&1&&(Oi(0,`div`,0),vg(`openChange`,function(l){return vk(e.open,l)||(e.open=l),l}),_m(1,Ee,48,38,`ng-template`,1),Nc()),n&2&&hg(`open`,e.open)},dependencies:[ie,ln,an,pn,cn,fn,dn,un,My],encapsulation:2})}});function Le(i,t){i&1&&(Oi(0,`p`,7),fk(1),Nc()),i&2&&(ec(),pg(t))}function Ve(i,t){if(i&1&&(Oi(0,`p`,8),fk(1),Nc()),i&2){let n=HE(2);ec(),pg(n.t().loading)}}function ze(i,t){if(i&1&&(Oi(0,`p`,8),fk(1),Nc()),i&2){let n=HE(2);ec(),pg(n.t().empty)}}function Oe(i,t){i&1&&(Oi(0,`span`,16),fk(1),Nc()),i&2&&(ec(),pg(t))}function We(i,t){if(i&1){let n=$E();Oi(0,`li`,13),Gm(1,`span`,14),Oi(2,`a`,15),Jm(`click`,function(){Ld(n);return Od(HE(3).open.set(!1))}),fk(3),Nc(),kE(4,Oe,2,1,`span`,16),Oi(5,`span`,17),fk(6),Nc()()}if(i&2){let n,e=t.$implicit,m=HE(3);ec(),nk(e.running?`bg-ok`:`bg-ink-600`),ec(),Wm(`routerLink`,kk(8,Te,e.id)),ec(),pg(e.name),ec(),SE((n=e.composeProject)?4:-1,n),ec(),nk(e.ipAddress?`text-ink-300`:`text-ink-600`),ec(),Ac(` `,e.ipAddress??(e.running?m.t().noAddress:m.t().stopped),` `)}}function Be(i,t){if(i&1&&(Oi(0,`ul`,9),Sc(1,We,7,10,`li`,13,Re),Nc()),i&2){let n=HE(2);ec(),Tc(n.members())}}function Ae(i,t){if(i&1&&(Gm(0,`div`,2),Oi(1,`div`,3)(2,`div`,4)(3,`h2`,5),fk(4),Nc(),Oi(5,`p`,6),fk(6),Nc(),kE(7,Le,2,1,`p`,7)(8,Ve,2,1,`p`,8)(9,ze,2,1,`p`,8)(10,Be,3,0,`ul`,9),Oi(11,`div`,10)(12,`button`,11),Gm(13,`app-icon`,12),fk(14),Nc()()()()),i&2){let n,e=HE();ec(4),pg(e.t().title(e.network())),ec(2),pg(e.t().description),ec(),SE((n=e.problem())?7:e.members()===null?8:e.members()?.length===0?9:10,n),ec(6),Wm(`size`,14),ec(),Ac(` `,e.common().close,` `)}}var Te;var Re;var U;var ye=f(()=>{Kr();ra();Je$1();lS();dS();sS();Kr();Te=i=>[`/containers`,i],Re=(i,t)=>t.id;U=class i{open=mj(!1);network=jc.required();t=Ot(()=>oS().networks.members);common=Ot(()=>oS().common);members=wt(null);problem=wt(null);constructor(){rf(()=>{if(!this.open())return;let t=this.network();Tg(()=>{this.load(t)})})}async load(t){this.members.set(null),this.problem.set(null);try{this.members.set(await window.electron.networks.members(t))}catch(n){this.problem.set(eH(n))}}static ɵfac=function(n){return new(n||i)};static ɵcmp=wc({type:i,selectors:[[`app-network-members-dialog`]],inputs:{open:[1,`open`],network:[1,`network`]},outputs:{open:`openChange`},decls:2,vars:1,consts:[[`rdxDialogRoot`,``,3,`openChange`,`open`],[`rdxDialogPortal`,``],[`rdxDialogBackdrop`,``,1,`fixed`,`inset-0`,`z-40`,`bg-black/50`],[`rdxDialogViewport`,``,1,`fixed`,`inset-0`,`z-50`,`grid`,`place-items-center`,`p-4`],[`rdxDialogPopup`,``,`data-testid`,`network-members-dialog`,1,`flex`,`max-h-[85vh]`,`w-full`,`max-w-xl`,`flex-col`,`rounded-lg`,`border`,`border-ink-700`,`bg-ink-850`,`p-5`,`shadow-2xl`],[`rdxDialogTitle`,``,1,`text-[15px]`,`font-semibold`,`text-ink-100`],[`rdxDialogDescription`,``,1,`mt-1`,`text-[13px]`,`text-ink-400`],[1,`mt-4`,`rounded-md`,`border`,`border-danger/40`,`bg-danger/10`,`px-3`,`py-2`,`text-[13px]`,`text-danger`],[1,`mt-4`,`text-[13px]`,`text-ink-400`],[`data-testid`,`network-member-list`,1,`mt-3`,`min-h-0`,`flex-1`,`divide-y`,`divide-ink-800`,`overflow-auto`],[1,`mt-4`,`flex`,`justify-end`],[`type`,`button`,`rdxDialogClose`,``,1,`mx-btn`,`mx-focus`],[`name`,`close`,3,`size`],[1,`flex`,`items-center`,`gap-3`,`py-2`,`text-[13px]`],[`aria-hidden`,`true`,1,`size-2`,`shrink-0`,`rounded-full`],[1,`mx-focus`,`min-w-0`,`flex-1`,`truncate`,`text-ink-100`,`hover:text-accent`,`hover:underline`,3,`click`,`routerLink`],[1,`shrink-0`,`text-[12px]`,`text-ink-500`],[1,`w-32`,`shrink-0`,`text-right`,`font-mono`,`text-[12px]`]],template:function(n,e){n&1&&(Oi(0,`div`,0),vg(`openChange`,function(l){return vk(e.open,l)||(e.open=l),l}),_m(1,Ae,15,5,`ng-template`,1),Nc()),n&2&&hg(`open`,e.open)},dependencies:[ie,ln,an,pn,cn,fn,dn,un,Yt,My],encapsulation:2})}});function Fe(i,t){if(i&1&&(Oi(0,`span`,16),fk(1),Nc()),i&2){let n=HE();ec(),pg(n.t().refreshing)}}function je(i,t){if(i&1){let n=$E();Oi(0,`div`,18)(1,`span`,30),fk(2),Nc(),Oi(3,`button`,31),Jm(`click`,function(){Ld(n);return Od(HE().askRemoveSelected())}),Gm(4,`app-icon`,32),fk(5),Nc()()}if(i&2){let n=HE();ec(2),pg(n.t().selected(n.selected().size)),ec(2),Wm(`size`,14),ec(),Ac(` `,n.common().remove,` `)}}function He(i,t){if(i&1&&(Oi(0,`span`,35),fk(1),Nc()),i&2){let n=HE(2);ec(),pg(n.t().builtIn)}}function Ke(i,t){if(i&1&&(Oi(0,`span`,35),fk(1),Nc()),i&2){let n=HE(2);ec(),pg(n.t().internal)}}function qe(i,t){if(i&1&&(Oi(0,`div`,36),fk(1),Nc()),i&2){let n=HE().$implicit;ec(),pg(n.composeProject)}}function Qe(i,t){if(i&1&&(Oi(0,`div`,33)(1,`span`,34),fk(2),Nc(),kE(3,He,2,1,`span`,35),kE(4,Ke,2,1,`span`,35),Nc(),kE(5,qe,2,1,`div`,36)),i&2){let n=t.$implicit;ec(),Wm(`title`,n.shortId),ec(),pg(n.name),ec(),SE(n.builtIn?3:-1),ec(),SE(n.internal?4:-1),ec(),SE(n.composeProject?5:-1)}}function Ue(i,t){if(i&1&&(Oi(0,`span`,37),fk(1),Nc()),i&2){let n=t.$implicit;ec(),pg(n.driver)}}function Ge(i,t){if(i&1&&(Oi(0,`span`,38),fk(1),Nc()),i&2){let n=t.$implicit;ec(),pg(n.scope)}}function Je(i,t){if(i&1&&(Oi(0,`span`,39),fk(1),Nc()),i&2){let n=HE().$implicit;ec(),pg(n.subnet)}}function Xe(i,t){i&1&&(Oi(0,`span`,40),fk(1,`—`),Nc())}function Ye(i,t){if(i&1&&kE(0,Je,2,1,`span`,39)(1,Xe,2,0,`span`,40),i&2){let n=t.$implicit;SE(n.subnet?0:1)}}function Ze(i,t){if(i&1&&(Oi(0,`span`,41),fk(1),Nc()),i&2){let n=HE().$implicit,e=HE();ec(),pg(e.t().containerCount(n.connected))}}function $e(i,t){i&1&&(Oi(0,`span`,40),fk(1,`—`),Nc())}function et(i,t){if(i&1&&kE(0,Ze,2,1,`span`,41)(1,$e,2,0,`span`,40),i&2){let n=t.$implicit;SE(n.connected>0?0:1)}}function tt(i,t){if(i&1){let n=$E();Oi(0,`div`,42)(1,`app-action-menu`,43),Jm(`picked`,function(m){let l=Ld(n).$implicit;return Od(HE().onRowMenu(m,l))}),Nc()()}if(i&2){let n=t.$implicit,e=HE();ec(),Wm(`label`,e.t().rowMenu(n.name))(`items`,e.rowMenu(n))}}var fe;f(()=>{Kr();f$1();M();G();J();oe();K();dS();x();be();sS();ye();ra();o();Kr();fe=class i$1{store=C(y);preferences=C(p);t=Ot(()=>oS().networks);common=Ot(()=>oS().common);columns=Ot(()=>{let t=this.t().columns;return[{key:`name`,label:t.name},{key:`driver`,label:t.driver,width:`100px`},{key:`scope`,label:t.scope,width:`90px`},{key:`subnet`,label:t.subnet,width:`160px`},{key:`connected`,label:t.connected,width:`120px`},{key:`actions`,label:t.actions,width:`84px`,align:`right`}]});loading=this.store.loading;problem=this.store.problem;pending=this.store.pending;unusedCount=this.store.unusedCount;search=wt(``);zoek=jc(void 0);hideBuiltIn=this.preferences.flag(`networks.hideBuiltIn`);selected=wt(new Set);action=wt(null);confirmOpen=wt(!1);createOpen=wt(!1);membersOpen=wt(!1);membersNetwork=wt(``);rows=Ot(()=>{let t=this.search().trim().toLowerCase(),n=this.hideBuiltIn();return this.store.networks().filter(e=>n&&e.builtIn?!1:t===``||`${e.name} ${e.driver}`.toLowerCase().includes(t))});trackKey=t=>t.id;leden=jc(void 0);router=C(fe$1);route=C(Q$1);constructor(){rf(()=>{let t=this.leden();t!==void 0&&Tg(()=>{this.membersNetwork.set(t),this.membersOpen.set(!0),i(this.router,this.route,`leden`)})}),rf(()=>{let t=this.zoek();t!==void 0&&Tg(()=>this.search.set(t))}),this.store.refresh()}removalReason(t){return t.builtIn?this.t().builtInReason:t.connected>0?this.t().connectedReason(t.connected):this.common().remove}rowMenu(t){return[{id:`members`,label:this.t().rowMembers,icon:`containers`},{id:`remove`,label:this.common().remove,icon:`trash`,disabled:!this.canRemove(t)||this.pending().has(t.id),danger:!0,hint:this.removalReason(t),separated:!0}]}onRowMenu(t,n){t===`members`?(this.membersNetwork.set(n.name),this.membersOpen.set(!0)):this.askRemove(n)}canRemove(t){return!t.builtIn&&t.connected===0}askRemove(t){let n=this.t().remove;this.action.set({ids:[t.id],title:n.title,description:n.description(t.name),confirmLabel:this.common().remove}),this.confirmOpen.set(!0)}askRemoveSelected(){let t=[...this.selected()],n=this.t().remove;this.action.set({ids:t,title:n.manyTitle,description:n.manyDescription(t.length),confirmLabel:this.common().remove}),this.confirmOpen.set(!0)}menuItems=Ot(()=>[{id:`create`,label:this.t().menu.create,icon:`plus`},{id:`prune-unused`,label:this.t().menu.pruneUnused,icon:`broom`,separated:!0}]);onMenu(t){t===`create`?this.createOpen.set(!0):this.askPrune()}askPrune(){let t=this.t().prune;this.action.set({ids:[],title:t.title,description:t.description,confirmLabel:t.confirm}),this.confirmOpen.set(!0)}confirm(){let t=this.action();t!==null&&(t.ids.length===0?this.store.prune():(this.store.removeMany(t.ids),this.selected.set(new Set)),this.action.set(null))}actionTitle(){return this.action()?.title??``}actionDescription(){return this.action()?.description??``}actionConfirmLabel(){return this.action()?.confirmLabel??this.common().remove}actionConfirmIcon(){return this.action()?.ids.length===0?`broom`:`trash`}static ɵfac=function(n){return new(n||i$1)};static ɵcmp=wc({type:i$1,selectors:[[`app-networks-page`]],inputs:{zoek:[1,`zoek`],leden:[1,`leden`]},decls:35,vars:27,consts:[[1,`flex`,`h-full`,`flex-col`],[1,`shrink-0`,`px-6`,`pt-5`,`pb-3`],[1,`flex`,`flex-wrap`,`items-start`,`gap-4`],[1,`text-xl`,`font-semibold`,`tracking-tight`,`text-ink-100`],[1,`mt-3`],[1,`text-[12px]`,`text-ink-400`],[1,`text-[15px]`,`font-medium`,`text-ink-100`],[1,`ml-auto`],[3,`picked`,`label`,`items`],[1,`mt-4`,`flex`,`flex-wrap`,`items-center`,`gap-4`],[1,`relative`,`flex`,`items-center`],[1,`pointer-events-none`,`absolute`,`left-2.5`,`text-ink-500`],[`name`,`search`,3,`size`],[1,`sr-only`],[`type`,`search`,1,`mx-focus`,`w-72`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-850`,`py-1.5`,`pr-3`,`pl-8`,`text-[13px]`,`text-ink-100`,`placeholder:text-ink-500`,3,`input`,`placeholder`,`value`],[3,`onChange`,`label`,`on`],[1,`text-[12px]`,`text-ink-500`],[3,`problem`],[1,`mt-3`,`flex`,`items-center`,`gap-2`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-850`,`px-3`,`py-2`],[1,`min-h-0`,`flex-1`,`overflow-y-auto`,`px-6`,`pb-6`],[3,`selectedChange`,`columns`,`rows`,`trackKey`,`selected`,`emptyMessage`],[`appCell`,`name`],[`appCell`,`driver`],[`appCell`,`scope`],[`appCell`,`subnet`],[`appCell`,`connected`],[`appCell`,`actions`],[3,`openChange`,`open`],[3,`openChange`,`open`,`network`],[3,`openChange`,`confirmed`,`open`,`title`,`description`,`confirmLabel`,`confirmIcon`],[1,`text-[13px]`,`text-ink-200`],[`type`,`button`,1,`mx-btn`,`mx-focus`,`ml-auto`,`text-danger`,`hover:text-danger`,3,`click`],[`name`,`trash`,3,`size`],[1,`flex`,`items-center`,`gap-2`],[1,`truncate`,`text-ink-100`,3,`title`],[1,`shrink-0`,`rounded`,`border`,`border-ink-700`,`px-1`,`text-[10px]`,`text-ink-500`],[1,`truncate`,`text-[11px]`,`text-ink-500`],[1,`text-ink-300`],[1,`text-ink-400`],[1,`font-mono`,`text-[12px]`,`text-ink-300`],[1,`text-ink-600`],[1,`text-ink-200`],[1,`flex`,`items-center`,`justify-end`],[`compact`,``,3,`picked`,`label`,`items`]],template:function(n,e){n&1&&(Oi(0,`section`,0)(1,`div`,1)(2,`div`,2)(3,`div`)(4,`h1`,3),fk(5),Nc(),Oi(6,`div`,4)(7,`div`,5),fk(8),Nc(),Oi(9,`div`,6),fk(10),Nc()()(),Oi(11,`div`,7)(12,`app-action-menu`,8),Jm(`picked`,function(l){return e.onMenu(l)}),Nc()()(),Oi(13,`div`,9)(14,`label`,10)(15,`span`,11),Gm(16,`app-icon`,12),Nc(),Oi(17,`span`,13),fk(18),Nc(),Oi(19,`input`,14),Jm(`input`,function(l){return e.search.set(l.target.value)}),Nc()(),Oi(20,`app-filter-switch`,15),vg(`onChange`,function(l){return vk(e.hideBuiltIn,l)||(e.hideBuiltIn=l),l}),Nc(),kE(21,Fe,2,1,`span`,16),Nc(),Gm(22,`app-page-messages`,17),kE(23,je,6,3,`div`,18),Nc(),Oi(24,`div`,19)(25,`app-data-table`,20),vg(`selectedChange`,function(l){return vk(e.selected,l)||(e.selected=l),l}),_m(26,Qe,6,5,`ng-template`,21)(27,Ue,2,1,`ng-template`,22)(28,Ge,2,1,`ng-template`,23)(29,Ye,2,1,`ng-template`,24)(30,et,2,1,`ng-template`,25)(31,tt,2,2,`ng-template`,26),Nc()()(),Oi(32,`app-create-network-dialog`,27),vg(`openChange`,function(l){return vk(e.createOpen,l)||(e.createOpen=l),l}),Nc(),Oi(33,`app-network-members-dialog`,28),vg(`openChange`,function(l){return vk(e.membersOpen,l)||(e.membersOpen=l),l}),Nc(),Oi(34,`app-confirm-dialog`,29),vg(`openChange`,function(l){return vk(e.confirmOpen,l)||(e.confirmOpen=l),l}),Jm(`confirmed`,function(){return e.confirm()}),Nc()),n&2&&(ec(5),pg(e.t().title),ec(3),pg(e.t().unused),ec(2),pg(e.unusedCount()),ec(2),Wm(`label`,e.t().menuLabel)(`items`,e.menuItems()),ec(4),Wm(`size`,15),ec(2),pg(e.t().searchLabel),ec(),Wm(`placeholder`,e.t().searchLabel)(`value`,e.search()),ec(),Wm(`label`,e.t().hideBuiltIn),hg(`on`,e.hideBuiltIn),ec(),SE(e.loading()?21:-1),ec(),Wm(`problem`,e.problem()),ec(),SE(e.selected().size>0?23:-1),ec(2),Wm(`columns`,e.columns())(`rows`,e.rows())(`trackKey`,e.trackKey),hg(`selected`,e.selected),Wm(`emptyMessage`,e.t().empty),ec(7),hg(`open`,e.createOpen),ec(),hg(`open`,e.membersOpen),Wm(`network`,e.membersNetwork()),ec(),hg(`open`,e.confirmOpen),Wm(`title`,e.actionTitle())(`description`,e.actionDescription())(`confirmLabel`,e.actionConfirmLabel())(`confirmIcon`,e.actionConfirmIcon()))},dependencies:[z,x$1,My,W,u,P,V,Q,U],encapsulation:2})}})();export{fe as NetworksPage};
@@ -0,0 +1 @@
1
+ import{$n as sS,A as HE,B as Kr,Bn as oS,Cr as yk,D as Gm,Dn as kE,Et as UE,Fn as mj,Gn as pg,Gt as _m,H as Ld,K as My,Kn as pj,Nt as W,On as kc,Pn as mg,Pt as Wm,Q as OD,Qn as rg,Qt as bg,R as Jm,Rn as nk,St as Tg,Tn as jc,Zn as rf,_r as wt$1,cn as f,cr as ve,dr as vk,en as bk,er as sg,et as Od,f as C,fn as fk,gn as gj,hr as wc,ht as Sc,jn as lS,kn as ke$1,lr as vg,mt as SE,o as Ac,on as eH,q as Nc,qt as ag,rn as dS,rt as Ot$1,sn as ec,t as $E,tt as Oi,u as Br,xn as hg,xt as Tc,yt as TE}from"./chunk-CpIMiI_l.js";import{n as u,t as f$1}from"./chunk-CphQt55R.js";import"./chunk-DS3iAefP.js";import{i as h,n as N,r as d}from"./chunk-Q3Ig-PJ6.js";import{n as h$1,t as P}from"./chunk-DnY7-enP.js";import{n as o,t as i}from"./chunk-DNfiG-TG.js";import{n as p,t as M}from"./chunk-CjySsWe4.js";import"./chunk-gHmeiJFn.js";import"./chunk-xmDwFpQl.js";import{_ as pn$1,d as dn$1,f as fn$1,g as ln$1,l as an$1,m as ie,r as Je$1,u as cn$1,v as un$1}from"./chunk-DdTfHpyK.js";import{n as x,t as u$1}from"./chunk-CpNGhf9S.js";import{r as Q,s as fe,u as ra}from"./chunk-B1xjyPnV.js";import{n as P$1,t as K}from"./chunk-Cpz4zP5G.js";import{n as V,t as G}from"./chunk-C7c_wFw-.js";import{n as W$1,t as J}from"./chunk-D5njuWRz.js";import{i as z,n as oe,r as x$1}from"./chunk-Bxte2YBm.js";import{a as z$1,i as r,r as d$1,t as A}from"./chunk-D86K3m6W.js";function gt(i,t){i&1&&(Oi(0,`p`,13),fk(1),Nc()),i&2&&(ec(),pg(t))}function _t(i,t){if(i&1&&(Oi(0,`p`,14),fk(1),Nc()),i&2){let e=HE(3);ec(),pg(e.t().empty)}}function xt(i,t){if(i&1&&(Oi(0,`span`,20),fk(1),Nc()),i&2){let e=HE(5);ec(),pg(e.t().noSize)}}function ft(i,t){if(i&1){let e=$E();Oi(0,`li`,16)(1,`span`,17),fk(2),Nc(),Oi(3,`button`,18),Jm(`click`,function(){let l=Ld(e).$index;return Od(HE(4).toggle(l))}),Oi(4,`pre`,19),fk(5),Nc(),kE(6,xt,2,1,`span`,20),Nc()()}if(i&2){let e=t.$implicit,n=t.$index,l=HE(4);ec(),nk(e.sizeBytes===0?`text-ink-600`:`text-ink-200`),ec(),Ac(` `,e.sizeBytes===0?`—`:l.size(e),` `),ec(),Br(`aria-label`,l.t().expand)(`aria-expanded`,l.isOpen(n)),ec(),ag(`line-clamp-2`,!l.isOpen(n)),ec(),pg(e.instruction),ec(),SE(e.sizeBytes===0?6:-1)}}function yt(i,t){if(i&1&&(Oi(0,`ul`,15),Sc(1,ft,7,9,`li`,16,TE),Nc()),i&2){let e=HE(3);ec(),Tc(e.layers())}}function ht(i,t){if(i&1&&(Oi(0,`p`,12),fk(1),Nc(),kE(2,gt,2,1,`p`,13),kE(3,_t,2,1,`p`,14)(4,yt,3,0,`ul`,15)),i&2){let e,n=HE(2);ec(),pg(n.summary()),ec(),SE((e=n.packed())?2:-1,e),ec(),SE(n.layers().length===0?3:4)}}function vt(i,t){if(i&1&&(Oi(0,`p`,7),fk(1),Nc()),i&2){let e=HE(2);ec(),Ac(` `,e.problem(),` `)}}function bt(i,t){if(i&1&&(Oi(0,`p`,8),fk(1),Nc()),i&2){let e=HE(2);ec(),pg(e.t().loading)}}function wt(i,t){if(i&1&&(Gm(0,`div`,2),Oi(1,`div`,3)(2,`div`,4)(3,`h2`,5),fk(4),Nc(),Oi(5,`p`,6),fk(6),Nc(),kE(7,ht,5,3)(8,vt,2,1,`p`,7)(9,bt,2,1,`p`,8),Oi(10,`div`,9)(11,`button`,10),Gm(12,`app-icon`,11),fk(13),Nc()()()()),i&2){let e,n=HE();ec(4),pg(n.t().title(n.reference())),ec(2),pg(n.t().description),ec(),SE((e=n.result()?.ok)===!0?7:e===!1?8:9),ec(5),Wm(`size`,14),ec(),Ac(` `,n.common().close,` `)}}var we;var Je=f(()=>{Kr();Je$1();lS();h();dS();sS();Kr();we=class i{open=mj(!1);reference=jc.required();t=Ot$1(()=>oS().images.layers);common=Ot$1(()=>oS().common);result=wt$1(null);expanded=wt$1(new Set);constructor(){rf(()=>{if(!this.open())return;let t=this.reference();Tg(()=>{this.load(t)})})}layers(){let t=this.result();return t?.ok===!0?t.layers:[]}summary(){let t=this.result();return t?.ok===!0?this.t().summary(t.layers.length,d(t.imageBytes)):``}packed(){let t=this.result();return t?.ok!==!0||t.imageBytes===0||t.layersBytes>=t.imageBytes*.95?null:this.t().packed(d(t.layersBytes))}problem(){let t=this.result();return t?.ok===!1?t.problem:``}size(t){return d(t.sizeBytes)}isOpen(t){return this.expanded().has(t)}toggle(t){this.expanded.update(e=>{let n=new Set(e);return n.delete(t)||n.add(t),n})}async load(t){this.result.set(null),this.expanded.set(new Set);try{this.result.set(await window.electron.images.history(t))}catch(e){this.result.set({ok:!1,problem:eH(e)})}}static ɵfac=function(e){return new(e||i)};static ɵcmp=wc({type:i,selectors:[[`app-layers-dialog`]],inputs:{open:[1,`open`],reference:[1,`reference`]},outputs:{open:`openChange`},decls:2,vars:1,consts:[[`rdxDialogRoot`,``,3,`openChange`,`open`],[`rdxDialogPortal`,``],[`rdxDialogBackdrop`,``,1,`fixed`,`inset-0`,`z-40`,`bg-black/50`],[`rdxDialogViewport`,``,1,`fixed`,`inset-0`,`z-50`,`grid`,`place-items-center`,`p-4`],[`rdxDialogPopup`,``,`data-testid`,`layers-dialog`,1,`flex`,`max-h-[85vh]`,`w-full`,`max-w-3xl`,`flex-col`,`rounded-lg`,`border`,`border-ink-700`,`bg-ink-850`,`p-5`,`shadow-2xl`],[`rdxDialogTitle`,``,1,`text-[15px]`,`font-semibold`,`text-ink-100`],[`rdxDialogDescription`,``,1,`mt-1`,`text-[13px]`,`text-ink-400`],[1,`mt-4`,`rounded-md`,`border`,`border-danger/40`,`bg-danger/10`,`px-3`,`py-2`,`text-[13px]`,`text-danger`],[1,`mt-4`,`text-[13px]`,`text-ink-400`],[1,`mt-4`,`flex`,`justify-end`],[`type`,`button`,`rdxDialogClose`,``,1,`mx-btn`,`mx-focus`],[`name`,`close`,3,`size`],[`data-testid`,`layers-summary`,1,`mt-3`,`text-[12px]`,`text-ink-500`],[`data-testid`,`layers-packed`,1,`mt-1`,`text-[12px]`,`text-ink-600`],[1,`mt-3`,`text-[13px]`,`text-ink-400`],[`data-testid`,`layer-list`,1,`mt-3`,`min-h-0`,`flex-1`,`divide-y`,`divide-ink-800`,`overflow-auto`],[1,`flex`,`gap-4`,`py-2.5`],[1,`w-24`,`shrink-0`,`text-right`,`text-[12px]`],[`type`,`button`,1,`mx-focus`,`min-w-0`,`flex-1`,`cursor-pointer`,`text-left`,3,`click`],[1,`font-mono`,`text-[12px]`,`leading-relaxed`,`whitespace-pre-wrap`,`text-ink-200`],[1,`mt-0.5`,`block`,`text-[11px]`,`text-ink-600`]],template:function(e,n){e&1&&(Oi(0,`div`,0),vg(`openChange`,function(d){return vk(n.open,d)||(n.open=d),d}),_m(1,wt,14,5,`ng-template`,1),Nc()),e&2&&hg(`open`,n.open)},dependencies:[ie,ln$1,an$1,pn$1,cn$1,fn$1,dn$1,un$1,My],encapsulation:2})}});function kt(i,t){if(i&1&&(Oi(0,`span`,22),fk(1),Nc()),i&2){let e=HE(4);ec(),pg(e.t().official)}}function Dt(i,t){if(i&1){let e=$E();Oi(0,`li`)(1,`button`,20),Jm(`click`,function(){let l=Ld(e).$implicit;return Od(HE(3).choose(l))}),Oi(2,`span`,21),fk(3),Nc(),kE(4,kt,2,1,`span`,22),Oi(5,`span`,23),fk(6),Nc(),Oi(7,`span`,24),fk(8),Nc()()()}if(i&2){let e=t.$implicit,n=HE(3);ec(3),pg(e.name),ec(),SE(e.official?4:-1),ec(),Wm(`title`,e.description),ec(),pg(e.description),ec(2),pg(n.t().stars(e.stars))}}function St(i,t){if(i&1&&(Oi(0,`div`,11)(1,`p`,18),fk(2),Nc(),Oi(3,`ul`,19),Sc(4,Dt,9,5,`li`,null,Xe),Nc()()),i&2){let e=HE(2);ec(2),pg(e.t().hits),ec(2),Tc(e.hits())}}function It(i,t){if(i&1&&(Oi(0,`div`,27)(1,`span`,28),fk(2),Nc(),Oi(3,`span`,29),fk(4),Nc(),Oi(5,`span`,30),Gm(6,`span`,31),Nc(),Oi(7,`span`,32),fk(8),Nc()()),i&2){let e=t.$implicit,n=HE(4);ec(),Wm(`title`,e.id),ec(),pg(e.id),ec(),Wm(`title`,e.status),ec(),pg(e.status),ec(2),sg(`width`,n.percentOf(e),`%`),ec(2),pg(n.sizeOf(e.total))}}function Et(i,t){if(i&1&&(Oi(0,`div`,26),Sc(1,It,9,7,`div`,27,Ct),Nc()),i&2){let e=HE();ec(),Tc(e.layers)}}function Tt(i,t){if(i&1&&(Oi(0,`p`,25),fk(1),Nc(),kE(2,Et,3,0,`div`,26)),i&2){let e=t;ag(`text-danger`,e.problem)(`text-ink-300`,!e.problem),ec(),Ac(` `,e.problem??e.message,` `),ec(),SE(e.layers.length>0?2:-1)}}function Pt(i,t){if(i&1&&(Oi(0,`li`)(1,`span`,7),fk(2),Nc(),Oi(3,`span`,36),fk(4),Nc()()),i&2){let e=t.$implicit,n=HE(3);ec(2),pg(e.services.join(`, `)),ec(2),Ac(` `,n.t().inProject(e.name))}}function Mt(i,t){if(i&1&&(Oi(0,`li`)(1,`span`,7),fk(2),Nc(),Oi(3,`span`,36),fk(4),Nc()()),i&2){let e=t.$implicit,n=HE(3);ec(2),pg(e),ec(2),Ac(` — `,n.t().notCompose)}}function Rt(i,t){if(i&1&&(Oi(0,`p`,37),fk(1),Nc()),i&2){let e=HE(),n=HE(3);ec(),pg(n.t().renewed(e.renewed.join(`, `)))}}function Nt(i,t){if(i&1&&(Oi(0,`p`,38),fk(1),Nc()),i&2){let e=t.$implicit;ec(),pg(e)}}function Vt(i,t){if(i&1&&(kE(0,Rt,2,1,`p`,37),Sc(1,Nt,2,1,`p`,38,kc)),i&2){let e=t;SE(e.renewed.length>0?0:-1),ec(),Tc(e.problems)}}function Bt(i,t){if(i&1){let e=$E();Oi(0,`div`,35)(1,`button`,39),Jm(`click`,function(){Ld(e);return Od(HE(3).renew())}),Gm(2,`app-icon`,40),fk(3),Nc(),Oi(4,`span`,41),fk(5),Nc()()}if(i&2){let e=HE(3);ec(),Wm(`disabled`,e.renewing()),ec(),Wm(`size`,14),ec(),Ac(` `,e.renewing()?e.t().renewing:e.t().renew,` `),ec(2),pg(e.t().renewHint)}}function zt(i,t){if(i&1&&(Oi(0,`div`,12)(1,`p`,33),fk(2),Nc(),Oi(3,`ul`,34),Sc(4,Pt,5,2,`li`,null,Xe),Sc(6,Mt,5,2,`li`,null,kc),Nc(),kE(8,Vt,3,1)(9,Bt,6,4,`div`,35),Nc()),i&2){let e,n=t,l=HE(2);ec(2),pg(l.t().staleHeading),ec(2),Tc(n.projects),ec(2),Tc(n.loose),ec(2),SE((e=l.renewed())?8:n.projects.length>0?9:-1,e)}}function Ot(i,t){if(i&1){let e=$E();Gm(0,`div`,2),Oi(1,`div`,3)(2,`div`,4)(3,`h2`,5),fk(4),Nc(),Oi(5,`p`,6),fk(6),Oi(7,`code`,7),fk(8,`nginx:stable-alpine`),Nc(),fk(9),Oi(10,`code`,7),fk(11,`latest`),Nc(),fk(12),Nc(),Oi(13,`form`,8),Jm(`submit`,function(l){Ld(e);return Od(HE().submit(l))}),Oi(14,`label`,9),fk(15),Nc(),Oi(16,`input`,10),Jm(`input`,function(l){Ld(e);return Od(HE().onType(l.target.value))}),Nc()(),kE(17,St,6,1,`div`,11),kE(18,Tt,3,6),kE(19,zt,10,2,`div`,12),Oi(20,`div`,13)(21,`button`,14),Gm(22,`app-icon`,15),fk(23),Nc(),Oi(24,`button`,16),Gm(25,`app-icon`,17),fk(26),Nc()()()()}if(i&2){let e,n,l=HE();ec(4),pg(l.t().title),ec(2),Ac(` `,l.t().nameAndTag,` `),ec(3),Ac(`. `,l.t().withoutTag,` `),ec(3),Ac(` `,l.t().isUsed,` `),ec(3),pg(l.t().inputLabel),ec(),Wm(`value`,l.reference())(`disabled`,l.busy()),ec(),SE(l.hits().length>0&&l.progress()===null&&!l.busy()?17:-1),ec(),SE((e=l.progress())?18:-1,e),ec(),SE((n=l.staleShown())?19:-1,n),ec(3),Wm(`size`,14),ec(),Ac(` `,l.finished()?l.common().close:l.common().cancel,` `),ec(),Wm(`disabled`,!l.canPull()),ec(),Wm(`size`,14),ec(),Ac(` `,l.t().submit,` `)}}var Xe;var Ct;var Me;var Lt;var Ce;var et=f(()=>{Kr();Je$1();h();dS();lS();sS();Kr();Xe=(i,t)=>t.name,Ct=(i,t)=>t.id;Me=class{constructor(t){this.onProgress=t}onProgress;streamId=null;unsubscribe=null;disposed=!1;async start(t){this.stop(),this.disposed=!1;let e=await window.electron.images.pull(t);return e.ok?this.disposed?(window.electron.images.close(e.streamId),null):(this.streamId=e.streamId,this.unsubscribe=window.electron.images.onPullProgress(e.streamId,this.onProgress),null):e.problem}stop(){this.disposed=!0,this.unsubscribe?.(),this.unsubscribe=null,this.streamId!==null&&(window.electron.images.close(this.streamId),this.streamId=null)}},Lt=350,Ce=class i{open=mj(!1);t=Ot$1(()=>oS().images.pullDialog);common=Ot$1(()=>oS().common);preset=jc(null);reference=wt$1(``);hits=wt$1([]);searchTimer=null;lastSearch=``;progress=wt$1(null);busy=wt$1(!1);finished=Ot$1(()=>this.progress()?.done??!1);stale=wt$1(null);renewing=wt$1(!1);renewed=wt$1(null);staleShown=Ot$1(()=>{let t=this.stale();return t!==null&&(t.projects.length>0||t.loose.length>0)?t:null});pulled=wt$1(``);canPull=Ot$1(()=>{let t=this.reference().trim();if(this.busy()||t===``)return!1;let e=this.progress();return!(e?.done===!0&&e.problem===null&&t===this.pulled())});run=new Me(t=>{this.progress.set(t),t.done&&(this.busy.set(!1),t.problem===null&&this.lookForStale(this.pulled()))});constructor(){C(ve).onDestroy(()=>{this.run.stop(),this.searchTimer!==null&&clearTimeout(this.searchTimer)}),rf(()=>{let t=this.preset();this.open()&&Tg(()=>{this.busy()||this.clear(),t!==null&&(this.reference.set(t),this.pull())})})}onType(t){this.reference.set(t),this.searchTimer!==null&&clearTimeout(this.searchTimer);let e=t.trim();if(e.length<2){this.hits.set([]);return}this.searchTimer=setTimeout(()=>{this.search(e)},Lt)}async search(t){this.lastSearch=t;try{let e=await window.electron.images.search(t);t===this.lastSearch&&t===this.reference().trim()&&this.hits.set(e)}catch{this.hits.set([])}}choose(t){this.reference.set(t.name),this.hits.set([]),this.lastSearch=``}clear(){this.hits.set([]),this.reference.set(``),this.progress.set(null),this.stale.set(null),this.renewed.set(null),this.pulled.set(``)}submit(t){t.preventDefault(),this.pull()}pull(){let t=this.reference().trim();this.canPull()&&(this.busy.set(!0),this.progress.set(null),this.stale.set(null),this.renewed.set(null),this.pulled.set(t),this.hits.set([]),this.lastSearch=``,this.searchTimer!==null&&(clearTimeout(this.searchTimer),this.searchTimer=null),this.run.start(t).then(e=>{e!==null&&this.fail(t,e)}).catch(e=>this.fail(t,eH(e))))}async lookForStale(t){try{let e=await window.electron.images.staleContainers(t);t===this.pulled()&&this.stale.set(e)}catch{this.stale.set(null)}}renew(){let t=this.pulled();this.renewing.set(!0),window.electron.images.renew(t).then(e=>this.renewed.set(e)).catch(e=>this.renewed.set({renewed:[],problems:[eH(e)]})).finally(()=>this.renewing.set(!1))}fail(t,e){this.busy.set(!1),this.progress.set({reference:t,layers:[],message:``,done:!0,problem:e})}percentOf(t){return/complete|already exists/i.test(t.status)?100:t.total<=0?0:Math.min(100,t.current/t.total*100)}sizeOf(t){return t<=0?``:d(t)}static ɵfac=function(e){return new(e||i)};static ɵcmp=wc({type:i,selectors:[[`app-pull-dialog`]],inputs:{open:[1,`open`],preset:[1,`preset`]},outputs:{open:`openChange`},decls:2,vars:1,consts:[[`rdxDialogRoot`,``,3,`openChange`,`open`],[`rdxDialogPortal`,``],[`rdxDialogBackdrop`,``,1,`fixed`,`inset-0`,`z-40`,`bg-black/50`],[`rdxDialogViewport`,``,1,`fixed`,`inset-0`,`z-50`,`grid`,`place-items-center`,`p-4`],[`rdxDialogPopup`,``,1,`w-full`,`max-w-3xl`,`rounded-lg`,`border`,`border-ink-700`,`bg-ink-850`,`p-5`,`shadow-2xl`],[`rdxDialogTitle`,``,1,`text-[15px]`,`font-semibold`,`text-ink-100`],[`rdxDialogDescription`,``,1,`mt-1`,`text-[13px]`,`text-ink-400`],[1,`font-mono`],[`id`,`pull-form`,1,`mt-4`,3,`submit`],[`for`,`pull-reference`,1,`sr-only`],[`id`,`pull-reference`,`type`,`text`,`placeholder`,`nginx:stable-alpine`,`autocomplete`,`off`,`spellcheck`,`false`,1,`mx-focus`,`w-full`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-800`,`px-3`,`py-1.5`,`text-[13px]`,`text-ink-100`,`placeholder:text-ink-500`,3,`input`,`value`,`disabled`],[`data-testid`,`pull-hits`,1,`mt-2`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-800`],[`data-stale`,``,1,`mt-4`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-800`,`px-3`,`py-2.5`,`text-[13px]`],[1,`mt-5`,`flex`,`justify-end`,`gap-2`],[`type`,`button`,`rdxDialogClose`,``,1,`mx-btn`,`mx-focus`],[`name`,`close`,3,`size`],[`type`,`submit`,`form`,`pull-form`,1,`mx-btn`,`mx-focus`,`border-accent`,`text-accent`,3,`disabled`],[`name`,`download`,3,`size`],[1,`px-3`,`pt-2`,`text-[11px]`,`text-ink-500`],[1,`max-h-56`,`overflow-y-auto`,`py-1`],[`type`,`button`,1,`mx-focus`,`flex`,`w-full`,`cursor-pointer`,`items-baseline`,`gap-3`,`px-3`,`py-1.5`,`text-left`,`hover:bg-ink-700`,3,`click`],[1,`shrink-0`,`font-mono`,`text-[13px]`,`text-ink-100`],[1,`shrink-0`,`rounded`,`border`,`border-accent/50`,`px-1`,`text-[10px]`,`text-accent`],[1,`min-w-0`,`flex-1`,`truncate`,`text-[12px]`,`text-ink-400`,3,`title`],[1,`shrink-0`,`text-[11px]`,`tabular-nums`,`text-ink-500`],[1,`mt-4`,`text-[13px]`],[1,`mt-3`,`max-h-64`,`space-y-1.5`,`overflow-y-auto`,`pr-1`],[1,`flex`,`items-center`,`gap-4`,`text-[12px]`],[1,`w-28`,`shrink-0`,`truncate`,`font-mono`,`text-ink-500`,3,`title`],[1,`w-44`,`shrink-0`,`truncate`,`text-ink-400`,3,`title`],[1,`h-1.5`,`min-w-0`,`flex-1`,`overflow-hidden`,`rounded-full`,`bg-ink-800`],[1,`block`,`h-full`,`rounded-full`,`bg-accent`,`transition-[width]`],[1,`w-20`,`shrink-0`,`text-right`,`tabular-nums`,`text-ink-500`],[1,`text-ink-200`],[1,`mt-1.5`,`space-y-0.5`,`text-ink-300`],[1,`mt-2.5`,`flex`,`items-center`,`gap-3`],[1,`text-ink-500`],[1,`mt-2`,`text-ok`],[1,`mt-2`,`text-danger`],[`type`,`button`,1,`mx-btn`,`mx-focus`,3,`click`,`disabled`],[`name`,`refresh`,3,`size`],[1,`text-[12px]`,`text-ink-500`]],template:function(e,n){e&1&&(Oi(0,`div`,0),vg(`openChange`,function(d){return vk(n.open,d)||(n.open=d),d}),_m(1,Ot,27,15,`ng-template`,1),Nc()),e&2&&hg(`open`,n.open)},dependencies:[ie,ln$1,an$1,pn$1,cn$1,fn$1,dn$1,un$1,My],encapsulation:2})}});function Wt(i,t){if(i&1&&(Oi(0,`div`,13)(1,`span`,14),fk(2),Nc(),Oi(3,`span`,15),fk(4),Nc(),Oi(5,`span`,16),Gm(6,`span`,17),Nc(),Oi(7,`span`,18),fk(8),Nc()()),i&2){let e=t.$implicit,n=HE(4);ec(),Wm(`title`,e.id),ec(),pg(e.id),ec(),Wm(`title`,e.status),ec(),pg(e.status),ec(2),sg(`width`,n.percentOf(e),`%`),ec(2),pg(n.sizeOf(e.total))}}function $t(i,t){if(i&1&&(Oi(0,`div`,12),Sc(1,Wt,9,7,`div`,13,Ft),Nc()),i&2){let e=HE();ec(),Tc(e.layers)}}function Ut(i,t){if(i&1&&(Oi(0,`p`,11),fk(1),Nc(),kE(2,$t,3,0,`div`,12)),i&2){let e=t,n=HE(2);ag(`text-danger`,e.problem)(`text-ink-300`,!e.problem),ec(),Ac(` `,e.problem??(e.done?n.t().done:e.message),` `),ec(),SE(e.layers.length>0?2:-1)}}function At(i,t){if(i&1&&(Oi(0,`p`,19),fk(1),Nc()),i&2){let e=HE(3);ec(),Ac(` `,e.t().hubPublic,` `)}}function jt(i,t){if(i&1&&(kE(0,At,2,1,`p`,19),Oi(1,`p`,20),fk(2),Nc(),Oi(3,`p`,21),fk(4),Nc()),i&2){let e=HE(2);SE(e.host()===null?0:-1),ec(2),pg(e.t().final),ec(2),pg(e.t().other)}}function Ht(i,t){if(i&1){let e=$E();Oi(0,`button`,22),Jm(`click`,function(){Ld(e);return Od(HE(2).push())}),Gm(1,`app-icon`,23),fk(2),Nc()}if(i&2){let e=HE(2);Wm(`disabled`,e.busy()),ec(),Wm(`size`,14),ec(),Ac(` `,e.busy()?e.t().pushing:e.t().confirm,` `)}}function qt(i,t){if(i&1&&(Gm(0,`div`,2),Oi(1,`div`,3)(2,`div`,4)(3,`h2`,5),fk(4),Nc(),Oi(5,`p`,6),fk(6),Nc(),kE(7,Ut,3,6)(8,jt,5,3),Oi(9,`div`,7)(10,`button`,8),Gm(11,`app-icon`,9),fk(12),Nc(),kE(13,Ht,3,3,`button`,10),Nc()()()),i&2){let e,n=HE();ec(4),pg(n.t().title(n.reference())),ec(2),Ac(` `,n.host()===null?n.t().hub:n.t().registry(n.host()??``),` `),ec(),SE((e=n.progress())?7:8,e),ec(4),Wm(`size`,14),ec(),Ac(` `,n.progress()?.done?n.common().close:n.common().cancel,` `),ec(),SE(n.progress()===null?13:-1)}}var Ft;var ke;var tt=f(()=>{Kr();Je$1();z$1();lS();h();sS();dS();Kr();Ft=(i,t)=>t.id;ke=class i{open=mj(!1);reference=jc.required();t=Ot$1(()=>oS().images.pushDialog);common=Ot$1(()=>oS().common);host=Ot$1(()=>A(this.reference()));progress=wt$1(null);busy=wt$1(!1);streamId=null;unsubscribe=null;constructor(){C(ve).onDestroy(()=>this.stop()),rf(()=>{this.open()&&Tg(()=>{this.busy()||(this.stop(),this.progress.set(null))})})}async push(){let t=this.reference();this.busy.set(!0);try{let e=await window.electron.images.push(t);if(!e.ok){this.fail(t,e.problem);return}this.streamId=e.streamId,this.progress.set({reference:t,layers:[],message:this.t().pushing,done:!1,problem:null}),this.unsubscribe=window.electron.images.onPullProgress(e.streamId,n=>{this.progress.set(n),n.done&&this.busy.set(!1)})}catch(e){this.fail(t,eH(e))}}fail(t,e){this.busy.set(!1),this.progress.set({reference:t,layers:[],message:``,done:!0,problem:e})}stop(){this.unsubscribe?.(),this.unsubscribe=null,this.streamId!==null&&(window.electron.images.close(this.streamId),this.streamId=null)}percentOf(t){return/pushed|already exists|mounted from/i.test(t.status)?100:t.total<=0?0:Math.min(100,t.current/t.total*100)}sizeOf(t){return t<=0?``:d(t)}static ɵfac=function(e){return new(e||i)};static ɵcmp=wc({type:i,selectors:[[`app-push-dialog`]],inputs:{open:[1,`open`],reference:[1,`reference`]},outputs:{open:`openChange`},decls:2,vars:1,consts:[[`rdxDialogRoot`,``,3,`openChange`,`open`],[`rdxDialogPortal`,``],[`rdxDialogBackdrop`,``,1,`fixed`,`inset-0`,`z-40`,`bg-black/50`],[`rdxDialogViewport`,``,1,`fixed`,`inset-0`,`z-50`,`grid`,`place-items-center`,`p-4`],[`rdxDialogPopup`,``,`data-testid`,`push-dialog`,1,`w-full`,`max-w-2xl`,`rounded-lg`,`border`,`border-ink-700`,`bg-ink-850`,`p-5`,`shadow-2xl`],[`rdxDialogTitle`,``,1,`text-[15px]`,`font-semibold`,`text-ink-100`],[`rdxDialogDescription`,``,`data-testid`,`push-registry`,1,`mt-1`,`text-[13px]`,`text-ink-200`],[1,`mt-5`,`flex`,`justify-end`,`gap-2`],[`type`,`button`,`rdxDialogClose`,``,1,`mx-btn`,`mx-focus`],[`name`,`close`,3,`size`],[`type`,`button`,`data-testid`,`push-confirm`,1,`mx-btn`,`mx-focus`,`border-accent`,`text-accent`,3,`disabled`],[`data-testid`,`push-status`,1,`mt-4`,`text-[13px]`],[1,`mt-3`,`max-h-64`,`space-y-1.5`,`overflow-y-auto`,`pr-1`],[1,`flex`,`items-center`,`gap-4`,`text-[12px]`],[1,`w-28`,`shrink-0`,`truncate`,`font-mono`,`text-ink-500`,3,`title`],[1,`w-44`,`shrink-0`,`truncate`,`text-ink-400`,3,`title`],[1,`h-1.5`,`min-w-0`,`flex-1`,`overflow-hidden`,`rounded-full`,`bg-ink-800`],[1,`block`,`h-full`,`rounded-full`,`bg-accent`,`transition-[width]`],[1,`w-20`,`shrink-0`,`text-right`,`tabular-nums`,`text-ink-500`],[`data-testid`,`push-public`,1,`mt-3`,`rounded-md`,`border`,`border-warn/40`,`bg-warn/10`,`px-3`,`py-2`,`text-[12px]`,`text-ink-200`],[1,`mt-3`,`text-[12px]`,`text-ink-400`],[1,`mt-1`,`text-[12px]`,`text-ink-500`],[`type`,`button`,`data-testid`,`push-confirm`,1,`mx-btn`,`mx-focus`,`border-accent`,`text-accent`,3,`click`,`disabled`],[`name`,`upload`,3,`size`]],template:function(e,n){e&1&&(Oi(0,`div`,0),vg(`openChange`,function(d){return vk(n.open,d)||(n.open=d),d}),_m(1,qt,14,6,`ng-template`,1),Nc()),e&2&&hg(`open`,n.open)},dependencies:[ie,ln$1,an$1,pn$1,cn$1,fn$1,dn$1,un$1,My],encapsulation:2})}});function Kt(i,t){if(i&1&&(Oi(0,`p`,11),fk(1),Nc()),i&2){let e=HE(2);ec(),pg(e.t().invalid)}}function Qt(i,t){if(i&1&&(Oi(0,`p`,12),fk(1),Nc()),i&2){let e=HE(2);ec(),pg(e.t().exists(e.normalized()))}}function Yt(i,t){i&1&&(Oi(0,`p`,13),fk(1),Nc()),i&2&&(ec(),pg(t))}function Zt(i,t){if(i&1){let e=$E();Gm(0,`div`,2),Oi(1,`div`,3)(2,`div`,4)(3,`h2`,5),fk(4),Nc(),Oi(5,`p`,6),fk(6),Nc(),Oi(7,`form`,7),Jm(`submit`,function(l){Ld(e);return Od(HE().submit(l))}),Oi(8,`label`,8)(9,`span`,9),fk(10),Nc(),Oi(11,`input`,10),Jm(`input`,function(l){Ld(e);return Od(HE().target.set(l.target.value))}),Nc()(),kE(12,Kt,2,1,`p`,11)(13,Qt,2,1,`p`,12),kE(14,Yt,2,1,`p`,13),Oi(15,`div`,14)(16,`button`,15),Gm(17,`app-icon`,16),fk(18),Nc(),Oi(19,`button`,17),Gm(20,`app-icon`,18),fk(21),Nc()()()()()}if(i&2){let e,n=HE();ec(4),pg(n.t().title(n.source())),ec(2),pg(n.t().description),ec(4),pg(n.t().label),ec(),nk(n.field+` mt-1.5`),Wm(`value`,n.target()),ec(),SE(n.invalid()?12:n.exists()?13:-1),ec(2),SE((e=n.problem())?14:-1,e),ec(3),Wm(`size`,14),ec(),Ac(` `,n.common().close,` `),ec(),Wm(`disabled`,!n.canSave()),ec(),Wm(`size`,14),ec(),Ac(` `,n.saving()?n.t().saving:n.t().save,` `)}}var Gt;var De;var nt=f(()=>{Kr();Je$1();z$1();lS();P();sS();dS();f$1();Kr();Gt=`mx-focus w-full rounded-md border border-ink-700 bg-ink-800 px-2.5 py-1.5 font-mono text-[13px] text-ink-100 placeholder:text-ink-500`,De=class i{open=mj(!1);source=jc.required();store=C(h$1);toast=C(u);t=Ot$1(()=>oS().images.tagDialog);common=Ot$1(()=>oS().common);field=Gt;target=wt$1(``);saving=wt$1(!1);problem=wt$1(null);wanted=Ot$1(()=>this.target().trim());invalid=Ot$1(()=>this.wanted()!==``&&!d$1(this.wanted()));normalized=Ot$1(()=>{let{repository:t,tag:e}=r(this.wanted());return`${t}:${e}`});exists=Ot$1(()=>this.normalized()!==this.source()&&this.store.images().some(t=>t.reference===this.normalized()));canSave=Ot$1(()=>!this.saving()&&d$1(this.wanted())&&this.normalized()!==this.source());constructor(){rf(()=>{if(!this.open())return;let t=this.source();Tg(()=>{this.target.set(t.startsWith(`sha256:`)?``:t),this.problem.set(null)})})}async submit(t){if(t.preventDefault(),!this.canSave())return;let e=this.normalized();this.saving.set(!0),this.problem.set(null);try{let n=await window.electron.images.tag(this.source(),e);n.ok?(this.toast.success(this.t().saved(e)),this.store.refresh(),this.open.set(!1)):this.problem.set(n.problem)}catch(n){this.problem.set(eH(n))}finally{this.saving.set(!1)}}static ɵfac=function(e){return new(e||i)};static ɵcmp=wc({type:i,selectors:[[`app-tag-dialog`]],inputs:{open:[1,`open`],source:[1,`source`]},outputs:{open:`openChange`},decls:2,vars:1,consts:[[`rdxDialogRoot`,``,3,`openChange`,`open`],[`rdxDialogPortal`,``],[`rdxDialogBackdrop`,``,1,`fixed`,`inset-0`,`z-40`,`bg-black/50`],[`rdxDialogViewport`,``,1,`fixed`,`inset-0`,`z-50`,`grid`,`place-items-center`,`p-4`],[`rdxDialogPopup`,``,`data-testid`,`tag-dialog`,1,`w-full`,`max-w-md`,`rounded-lg`,`border`,`border-ink-700`,`bg-ink-850`,`p-5`,`shadow-2xl`],[`rdxDialogTitle`,``,1,`text-[15px]`,`font-semibold`,`text-ink-100`],[`rdxDialogDescription`,``,1,`mt-1`,`text-[13px]`,`text-ink-400`],[1,`mt-4`,3,`submit`],[1,`block`],[1,`text-[13px]`,`font-medium`,`text-ink-200`],[`type`,`text`,`spellcheck`,`false`,`autocomplete`,`off`,`data-testid`,`tag-name`,3,`input`,`value`],[`data-testid`,`tag-invalid`,1,`mt-2`,`text-[12px]`,`text-danger`],[`data-testid`,`tag-exists`,1,`mt-2`,`text-[12px]`,`text-warn`],[`role`,`alert`,1,`mt-3`,`rounded-md`,`border`,`border-danger/40`,`bg-danger/10`,`px-3`,`py-2`,`text-[13px]`,`text-danger`],[1,`mt-5`,`flex`,`items-center`,`justify-end`,`gap-2`],[`type`,`button`,`rdxDialogClose`,``,1,`mx-btn`,`mx-focus`],[`name`,`close`,3,`size`],[`type`,`submit`,`data-testid`,`tag-save`,1,`mx-btn`,`mx-focus`,`border-accent`,`text-accent`,3,`disabled`],[`name`,`plus`,3,`size`]],template:function(e,n){e&1&&(Oi(0,`div`,0),vg(`openChange`,function(d){return vk(n.open,d)||(n.open=d),d}),_m(1,Zt,22,13,`ng-template`,1),Nc()),e&2&&hg(`open`,n.open)},dependencies:[ie,ln$1,an$1,pn$1,cn$1,fn$1,dn$1,un$1,My],encapsulation:2})}});function Xt(i,t){if(i&1&&(Oi(0,`span`,9),fk(1),Nc()),i&2){let e=t;Wm(`title`,e.folder),ec(),pg(e.folder)}}function en(i,t){if(i&1&&(Oi(0,`p`,19),fk(1),Nc()),i&2){let e=HE(3);ec(),pg(e.t().none)}}function tn(i,t){if(i&1&&(Oi(0,`option`,24),fk(1),Nc()),i&2){let e=t.$implicit;Wm(`value`,e),ec(),pg(e)}}function nn(i,t){if(i&1&&(Oi(0,`p`,27),fk(1),Nc()),i&2){let e=HE(4);ec(),pg(e.t().invalid)}}function an(i,t){if(i&1&&(Oi(0,`p`,28),fk(1),Nc()),i&2){let e=HE(4);ec(),pg(e.t().exists(e.normalized()))}}function on(i,t){if(i&1){let e=$E();Oi(0,`form`,21),Jm(`submit`,function(l){Ld(e);return Od(HE(3).submit(l))}),Oi(1,`label`,22),fk(2),Nc(),Oi(3,`select`,23),Jm(`change`,function(l){Ld(e);let d=HE(3);return Od(d.edit(d.dockerfile,l.target.value))}),Sc(4,tn,2,2,`option`,24,kc),Nc(),Oi(6,`label`,25),fk(7),Nc(),Oi(8,`input`,26),Jm(`input`,function(l){Ld(e);let d=HE(3);return Od(d.edit(d.target,l.target.value))}),Nc(),kE(9,nn,2,1,`p`,27)(10,an,2,1,`p`,28),Nc()}if(i&2){let e=HE(),n=HE(2);ec(2),pg(n.t().file),ec(),nk(n.field),Wm(`value`,n.dockerfile()),ec(),Tc(e.dockerfiles),ec(3),pg(n.t().name),ec(),nk(n.field),Wm(`value`,n.target()),ec(),SE(n.invalid()?9:n.exists()&&n.built()===null?10:-1)}}function rn(i,t){i&1&&kE(0,en,2,1,`p`,19)(1,on,11,9,`form`,20),i&2&&SE(t.dockerfiles.length===0?0:1)}function ln(i,t){if(i&1&&(Oi(0,`p`,12),fk(1),Nc()),i&2){let e=HE(2);ec(),pg(e.t().building)}}function sn(i,t){if(i&1&&(Oi(0,`p`,29),fk(1),Nc()),i&2){let e=HE(),n=HE(2);ec(),pg(n.t().done(e.reference))}}function dn(i,t){if(i&1&&(Oi(0,`p`,30),fk(1),Nc()),i&2){let e=HE();ec(),pg(e.problem)}}function pn(i,t){if(i&1&&(Oi(0,`details`,31)(1,`summary`,32),fk(2),Nc(),Oi(3,`pre`,33,0),fk(5),Nc()()),i&2){let e=HE(),n=HE(2);Wm(`open`,!e.ok),ec(2),pg(n.t().output),ec(3),pg(e.output)}}function cn(i,t){if(i&1&&(Oi(0,`div`,13),kE(1,sn,2,1,`p`,29)(2,dn,2,1,`p`,30),kE(3,pn,6,3,`details`,31),Nc()),i&2){let e=t;ec(),SE(e.ok?1:2),ec(2),SE(e.output!==``?3:-1)}}function mn(i,t){if(i&1){let e=$E();Oi(0,`button`,34),Jm(`click`,function(){let l=Ld(e);return Od(HE(2).startContainer(l))}),Gm(1,`app-icon`,35),fk(2),Nc()}if(i&2){let e=HE(2);ec(),Wm(`size`,14),ec(),Ac(` `,e.t().run,` `)}}function un(i,t){if(i&1){let e=$E();Oi(0,`button`,36),Jm(`click`,function(){Ld(e);return Od(HE(2).build())}),Gm(1,`app-icon`,37),fk(2),Nc()}if(i&2){let e=HE(2);Wm(`disabled`,!e.canBuild()),ec(),Wm(`size`,14),ec(),Ac(` `,e.t().build,` `)}}function gn(i,t){if(i&1){let e=$E();Gm(0,`div`,3),Oi(1,`div`,4)(2,`div`,5)(3,`h2`,6),fk(4),Nc(),Oi(5,`p`,7),fk(6),Nc(),Oi(7,`div`,8),kE(8,Xt,2,2,`span`,9),Oi(9,`button`,10),Jm(`click`,function(){Ld(e);return Od(HE().choose())}),Gm(10,`app-icon`,11),fk(11),Nc()(),kE(12,rn,2,1),kE(13,ln,2,1,`p`,12),kE(14,cn,4,2,`div`,13),Oi(15,`div`,14)(16,`button`,15),Gm(17,`app-icon`,16),fk(18),Nc(),kE(19,mn,3,2,`button`,17)(20,un,3,3,`button`,18),Nc()()()}if(i&2){let e,n,l,d,w=HE();ec(4),pg(w.t().title),ec(2),pg(w.t().description),ec(2),SE((e=w.folder())?8:-1,e),ec(),Wm(`disabled`,w.building()),ec(),Wm(`size`,14),ec(),Ac(` `,w.folder()===null?w.t().choose:w.t().other,` `),ec(),SE((n=w.folder())?12:-1,n),ec(),SE(w.building()?13:-1),ec(),SE((l=w.result())?14:-1,l),ec(3),Wm(`size`,14),ec(),Ac(` `,w.common().close,` `),ec(),SE((d=w.built())?19:20,d)}}var Jt;var _n;var Se;var it=f(()=>{Kr();Je$1();z$1();lS();P();sS();dS();Kr();Jt=[`buildOutput`];_n=`mx-focus w-full rounded-md border border-ink-700 bg-ink-800 px-2.5 py-1.5 font-mono text-[13px] text-ink-100 placeholder:text-ink-500`,Se=class i{open=mj(!1);run=pj();store=C(h$1);injector=C(ke$1);outputBlock=gj(`buildOutput`);t=Ot$1(()=>oS().images.buildDialog);common=Ot$1(()=>oS().common);field=_n;folder=wt$1(null);dockerfile=wt$1(``);target=wt$1(``);building=wt$1(!1);result=wt$1(null);wanted=Ot$1(()=>this.target().trim());invalid=Ot$1(()=>this.wanted()!==``&&!d$1(this.wanted()));normalized=Ot$1(()=>{let{repository:t,tag:e}=r(this.wanted());return`${t}:${e}`});exists=Ot$1(()=>this.store.images().some(t=>t.reference===this.normalized()));canBuild=Ot$1(()=>!this.building()&&this.folder()!==null&&this.dockerfile()!==``&&d$1(this.wanted()));built=Ot$1(()=>{let t=this.result();return t?.ok===!0?t.reference:null});constructor(){rf(()=>{this.open()&&Tg(()=>{this.building()||(this.folder.set(null),this.result.set(null))})})}edit(t,e){t.set(e),this.building()||this.result.set(null)}async choose(){try{let t=await window.electron.images.chooseBuildFolder();t!==null&&(this.folder.set(t),this.dockerfile.set(t.dockerfiles[0]??``),this.target.set(t.suggestion),this.result.set(null))}catch(t){this.result.set({ok:!1,problem:eH(t),output:``})}}submit(t){t.preventDefault(),this.build()}async build(){let t=this.folder();if(!(!this.canBuild()||t===null)){this.building.set(!0),this.result.set(null);try{let e=await window.electron.images.build(t.token,this.dockerfile(),this.wanted());this.result.set(e),e.ok?this.store.refresh():OD(()=>{let n=this.outputBlock()?.nativeElement;n!==void 0&&(n.scrollTop=n.scrollHeight)},{injector:this.injector})}catch(e){this.result.set({ok:!1,problem:eH(e),output:``})}finally{this.building.set(!1)}}}startContainer(t){this.open.set(!1),this.run.emit(t)}static ɵfac=function(e){return new(e||i)};static ɵcmp=wc({type:i,selectors:[[`app-build-dialog`]],viewQuery:function(e,n){e&1&&rg(n.outputBlock,Jt,5),e&2&&UE()},inputs:{open:[1,`open`]},outputs:{open:`openChange`,run:`run`},decls:2,vars:1,consts:[[`buildOutput`,``],[`rdxDialogRoot`,``,3,`openChange`,`open`],[`rdxDialogPortal`,``],[`rdxDialogBackdrop`,``,1,`fixed`,`inset-0`,`z-40`,`bg-black/50`],[`rdxDialogViewport`,``,1,`fixed`,`inset-0`,`z-50`,`grid`,`place-items-center`,`p-4`],[`rdxDialogPopup`,``,`data-testid`,`build-dialog`,1,`w-full`,`max-w-2xl`,`rounded-lg`,`border`,`border-ink-700`,`bg-ink-850`,`p-5`,`shadow-2xl`],[`rdxDialogTitle`,``,1,`text-[15px]`,`font-semibold`,`text-ink-100`],[`rdxDialogDescription`,``,1,`mt-1`,`text-[13px]`,`text-ink-400`],[1,`mt-4`,`flex`,`items-center`,`gap-3`],[`data-testid`,`build-folder`,1,`min-w-0`,`flex-1`,`truncate`,`font-mono`,`text-[12px]`,`text-ink-200`,3,`title`],[`type`,`button`,`data-testid`,`build-choose`,1,`mx-btn`,`mx-focus`,`shrink-0`,3,`click`,`disabled`],[`name`,`folder`,3,`size`],[`data-testid`,`build-busy`,1,`mt-4`,`text-[13px]`,`text-ink-300`],[`data-testid`,`build-result`,1,`mt-4`,`text-[13px]`],[1,`mt-5`,`flex`,`items-center`,`justify-end`,`gap-2`],[`type`,`button`,`rdxDialogClose`,``,1,`mx-btn`,`mx-focus`],[`name`,`close`,3,`size`],[`type`,`button`,`data-testid`,`build-run`,1,`mx-btn`,`mx-focus`,`border-accent`,`text-accent`],[`type`,`button`,`data-testid`,`build-start`,1,`mx-btn`,`mx-focus`,`border-accent`,`text-accent`,3,`disabled`],[`data-testid`,`build-none`,1,`mt-3`,`text-[13px]`,`text-warn`],[1,`mt-4`,`grid`,`grid-cols-[auto_1fr]`,`items-center`,`gap-x-3`,`gap-y-2`],[1,`mt-4`,`grid`,`grid-cols-[auto_1fr]`,`items-center`,`gap-x-3`,`gap-y-2`,3,`submit`],[`for`,`build-file`,1,`text-[13px]`,`text-ink-300`],[`id`,`build-file`,`data-testid`,`build-file`,3,`change`,`value`],[3,`value`],[`for`,`build-name`,1,`text-[13px]`,`text-ink-300`],[`id`,`build-name`,`type`,`text`,`spellcheck`,`false`,`autocomplete`,`off`,`data-testid`,`build-name`,3,`input`,`value`],[`data-testid`,`build-invalid`,1,`col-start-2`,`text-[12px]`,`text-danger`],[`data-testid`,`build-exists`,1,`col-start-2`,`text-[12px]`,`text-warn`],[1,`text-ok`],[`role`,`alert`,1,`text-danger`],[1,`mt-1.5`,3,`open`],[1,`cursor-pointer`,`text-[12px]`,`text-ink-400`,`hover:text-ink-200`],[1,`mt-1`,`max-h-72`,`overflow-auto`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-900`,`p-2`,`font-mono`,`text-[11px]`,`leading-snug`,`whitespace-pre-wrap`,`text-ink-300`],[`type`,`button`,`data-testid`,`build-run`,1,`mx-btn`,`mx-focus`,`border-accent`,`text-accent`,3,`click`],[`name`,`play`,3,`size`],[`type`,`button`,`data-testid`,`build-start`,1,`mx-btn`,`mx-focus`,`border-accent`,`text-accent`,3,`click`,`disabled`],[`name`,`images`,3,`size`]],template:function(e,n){e&1&&(Oi(0,`div`,1),vg(`openChange`,function(d){return vk(n.open,d)||(n.open=d),d}),_m(1,gn,21,12,`ng-template`,2),Nc()),e&2&&hg(`open`,n.open)},dependencies:[ie,ln$1,an$1,pn$1,cn$1,fn$1,dn$1,un$1,My],encapsulation:2})}});function fn(i,t){if(i&1&&(Oi(0,`option`,22),fk(1),Nc()),i&2){let e=t.$implicit,n=HE(2);Wm(`value`,e.name)(`selected`,n.network()===e.name),ec(),pg(e.name)}}function yn(i,t){if(i&1){let e=$E();Oi(0,`label`,23)(1,`span`,13),fk(2),Nc(),Oi(3,`input`,14),Jm(`input`,function(l){Ld(e);return Od(HE(2).networkAlias.set(l.target.value))}),Nc(),Oi(4,`span`,35),fk(5),Nc()()}if(i&2){let e=HE(2);ec(2),pg(e.t().networkAlias),ec(),nk(e.field+` mt-1.5 w-full`),Wm(`placeholder`,e.t().networkAliasPlaceholder)(`value`,e.networkAlias()),Br(`aria-label`,e.t().networkAlias),ec(2),pg(e.t().networkAliasHint)}}function hn(i,t){if(i&1){let e=$E();Oi(0,`input`,37),Jm(`input`,function(l){let d=Ld(e).$index;return Od(HE(3).setPort(d,{host:l.target.value}))}),Nc(),Oi(1,`span`,38),fk(2,`→`),Nc(),Oi(3,`input`,39),Jm(`input`,function(l){let d=Ld(e).$index;return Od(HE(3).setPort(d,{container:l.target.value}))}),Nc(),Oi(4,`select`,20),Jm(`change`,function(l){let d=Ld(e).$index;return Od(HE(3).setPort(d,{protocol:l.target.value}))}),Oi(5,`option`,40),fk(6,`tcp`),Nc(),Oi(7,`option`,41),fk(8,`udp`),Nc()(),Oi(9,`button`,25),Jm(`click`,function(){let l=Ld(e).$index;return Od(HE(3).removePort(l))}),Gm(10,`app-icon`,42),Nc()}if(i&2){let e=t.$implicit,n=t.$index,l=HE(3);nk(l.field),Wm(`placeholder`,l.t().hostPortPlaceholder)(`value`,e.host),Br(`aria-label`,l.t().hostPort(n+1)),ec(3),nk(l.field),Wm(`value`,e.container),Br(`aria-label`,l.t().containerPort(n+1)),ec(),nk(l.field),Br(`aria-label`,l.t().protocol(n+1)),ec(),Wm(`selected`,e.protocol===`tcp`),ec(2),Wm(`selected`,e.protocol===`udp`),ec(2),nk(l.removeButton),Br(`aria-label`,l.t().removePort(n+1)),ec(),Wm(`size`,14)}}function vn(i,t){if(i&1&&(Oi(0,`div`,24)(1,`span`,36),fk(2),Nc(),Gm(3,`span`),Oi(4,`span`,36),fk(5),Nc(),Oi(6,`span`,36),fk(7),Nc(),Gm(8,`span`),Sc(9,hn,11,18,null,null,TE),Nc()),i&2){let e=HE(2);ec(2),pg(e.t().onThisComputer),ec(3),pg(e.t().inContainer),ec(2),pg(e.t().protocolHeader),ec(2),Tc(e.ports())}}function bn(i,t){if(i&1){let e=$E();Oi(0,`input`,45),Jm(`input`,function(l){let d=Ld(e).$index;return Od(HE(3).setVolume(d,{source:l.target.value}))}),Nc(),Oi(1,`span`,38),fk(2,`→`),Nc(),Oi(3,`input`,46),Jm(`input`,function(l){let d=Ld(e).$index;return Od(HE(3).setVolume(d,{target:l.target.value}))}),Nc(),Oi(4,`label`,47)(5,`input`,48),Jm(`change`,function(l){let d=Ld(e).$index;return Od(HE(3).setVolume(d,{readOnly:l.target.checked}))}),Nc(),fk(6),Nc(),Oi(7,`button`,25),Jm(`click`,function(){let l=Ld(e).$index;return Od(HE(3).removeVolume(l))}),Gm(8,`app-icon`,42),Nc()}if(i&2){let e=t.$implicit,n=t.$index,l=HE(3);nk(l.field),Wm(`placeholder`,l.t().sourcePlaceholder)(`value`,e.source),Br(`aria-label`,l.t().volumeSource(n+1)),ec(3),nk(l.field),Wm(`placeholder`,l.t().targetPlaceholder)(`value`,e.target),Br(`aria-label`,l.t().volumeTarget(n+1)),ec(),Wm(`title`,l.t().readOnlyHint),ec(),Wm(`checked`,e.readOnly),ec(),Ac(` `,l.t().readOnly,` `),ec(),nk(l.removeButton),Br(`aria-label`,l.t().removeVolume(n+1)),ec(),Wm(`size`,14)}}function wn(i,t){if(i&1&&Gm(0,`option`,44),i&2){let e=t.$implicit;Wm(`value`,e)}}function Cn(i,t){if(i&1&&(Oi(0,`div`,24)(1,`span`,36),fk(2),Nc(),Gm(3,`span`),Oi(4,`span`,36),fk(5),Nc(),Gm(6,`span`)(7,`span`),Sc(8,bn,9,17,null,null,TE),Nc(),Oi(10,`datalist`,43),Sc(11,wn,1,1,`option`,44,kc),Nc()),i&2){let e=HE(2);ec(2),pg(e.t().source),ec(3),pg(e.t().inContainer),ec(3),Tc(e.volumes()),ec(3),Tc(e.knownVolumes())}}function kn(i,t){if(i&1){let e=$E();Oi(0,`input`,49),Jm(`input`,function(l){let d=Ld(e).$index;return Od(HE(3).setEnvKey(d,l.target))}),Nc(),Oi(1,`span`,38),fk(2,`=`),Nc(),Oi(3,`input`,50),Jm(`input`,function(l){let d=Ld(e).$index;return Od(HE(3).setEnv(d,{value:l.target.value}))}),Nc(),Oi(4,`button`,25),Jm(`click`,function(){let l=Ld(e).$index;return Od(HE(3).removeEnv(l))}),Gm(5,`app-icon`,42),Nc()}if(i&2){let e=t.$implicit,n=t.$index,l=HE(3);nk(l.field+` font-mono`),Wm(`value`,e.key),Br(`aria-label`,l.t().envName(n+1)),ec(3),nk(l.field+` font-mono`),Wm(`value`,e.value),Br(`aria-label`,l.t().envValue(n+1))(`data-env-value`,n),ec(),nk(l.removeButton),Br(`aria-label`,l.t().removeEnv(n+1)),ec(),Wm(`size`,14)}}function Dn(i,t){if(i&1&&(Oi(0,`div`,27)(1,`span`,36),fk(2),Nc(),Gm(3,`span`),Oi(4,`span`,36),fk(5),Nc(),Gm(6,`span`),Sc(7,kn,6,13,null,null,TE),Nc()),i&2){let e=HE(2);ec(2),pg(e.t().envNameHeader),ec(3),pg(e.t().envValueHeader),ec(2),Tc(e.env())}}function Sn(i,t){i&1&&(Oi(0,`p`,29),fk(1),Nc()),i&2&&(ec(),Ac(` `,t,` `))}function In(i,t){if(i&1){let e=$E();Gm(0,`div`,2),Oi(1,`div`,3)(2,`div`,4)(3,`div`,5)(4,`h2`,6),fk(5),Nc(),Oi(6,`p`,7)(7,`span`),fk(8),Nc(),Oi(9,`code`,8),fk(10),Nc()()(),Oi(11,`form`,9),Jm(`submit`,function(l){Ld(e);return Od(HE().submit(l))}),Oi(12,`div`,10)(13,`section`,11)(14,`label`,12)(15,`span`,13),fk(16),Nc(),Oi(17,`input`,14),Jm(`input`,function(l){Ld(e);return Od(HE().name.set(l.target.value))}),Nc()(),Oi(18,`label`,15)(19,`input`,16),Jm(`change`,function(l){Ld(e);return Od(HE().autoRestart.set(l.target.checked))}),Nc(),Oi(20,`span`)(21,`span`,17),fk(22),Nc(),Oi(23,`span`,18),fk(24),Nc()()()(),Oi(25,`section`)(26,`h3`,13),fk(27),Nc(),Oi(28,`p`,19),fk(29),Nc(),Oi(30,`select`,20),Jm(`change`,function(l){Ld(e);return Od(HE().setNetwork(l.target.value))}),Oi(31,`option`,21),fk(32),Nc(),Sc(33,fn,2,3,`option`,22,xn),Nc(),kE(35,yn,6,7,`label`,23),Nc(),Oi(36,`section`)(37,`h3`,13),fk(38),Nc(),Oi(39,`p`,19),fk(40),Nc(),kE(41,vn,11,3,`div`,24),Oi(42,`button`,25),Jm(`click`,function(){Ld(e);return Od(HE().addPort())}),Gm(43,`app-icon`,26),fk(44),Nc()(),Oi(45,`section`)(46,`h3`,13),fk(47),Nc(),Oi(48,`p`,19),fk(49),Nc(),kE(50,Cn,13,2),Oi(51,`button`,25),Jm(`click`,function(){Ld(e);return Od(HE().addVolume())}),Gm(52,`app-icon`,26),fk(53),Nc()(),Oi(54,`section`)(55,`h3`,13),fk(56),Nc(),Oi(57,`p`,19),fk(58),Nc(),kE(59,Dn,9,2,`div`,27),Oi(60,`button`,25),Jm(`click`,function(){Ld(e);return Od(HE().addEnv())}),Gm(61,`app-icon`,26),fk(62),Nc()()(),Oi(63,`div`,28),kE(64,Sn,2,1,`p`,29),Oi(65,`div`,30)(66,`button`,31),Gm(67,`app-icon`,32),fk(68),Nc(),Oi(69,`button`,33),Gm(70,`app-icon`,34),fk(71),Nc()()()()()()}if(i&2){let e,n=HE();ec(5),pg(n.t().title),ec(3),pg(n.t().fromImage),ec(2),pg(n.image()),ec(6),pg(n.t().name),ec(),nk(n.field+` mt-1.5 w-full`),Wm(`placeholder`,n.t().namePlaceholder)(`value`,n.name()),ec(2),Wm(`checked`,n.autoRestart()),ec(3),pg(n.t().autoRestart),ec(2),pg(n.t().autoRestartHint),ec(3),pg(n.t().network),ec(2),pg(n.t().networkHint),ec(),nk(n.field+` mt-3 w-full`),Br(`aria-label`,n.t().network),ec(),Wm(`selected`,n.network()===``),ec(),pg(n.t().networkDefault),ec(),Tc(n.selectableNetworks()),ec(2),SE(n.canAlias()?35:-1),ec(3),pg(n.t().ports),ec(2),pg(n.t().portsHint),ec(),SE(n.ports().length>0?41:-1),ec(),nk(n.addButton),Br(`aria-label`,n.t().addPort),ec(),Wm(`size`,14),ec(),Ac(` `,n.t().addPort,` `),ec(3),pg(n.t().volumes),ec(2),pg(n.t().volumesHint),ec(),SE(n.volumes().length>0?50:-1),ec(),nk(n.addButton),Br(`aria-label`,n.t().addVolume),ec(),Wm(`size`,14),ec(),Ac(` `,n.t().addVolume,` `),ec(3),pg(n.t().env),ec(2),pg(n.t().envHint),ec(),SE(n.env().length>0?59:-1),ec(),nk(n.addButton),Br(`aria-label`,n.t().addEnv),ec(),Wm(`size`,14),ec(),Ac(` `,n.t().addEnv,` `),ec(2),SE((e=n.problem())?64:-1,e),ec(3),Wm(`size`,14),ec(),Ac(` `,n.common().cancel,` `),ec(),Wm(`disabled`,!n.canSubmit()),ec(),Wm(`size`,14),ec(),Ac(` `,n.busy()?n.t().starting:n.t().submit,` `)}}var xn;var En;var Tn;var Pn;var Ie;var at=f(()=>{Kr();Je$1();P();dS();lS();sS();Kr();xn=(i,t)=>t.id;En=`mx-focus min-w-0 rounded-md border border-ink-700 bg-ink-800 px-2.5 py-1.5 text-[13px] text-ink-100 placeholder:text-ink-500`,Tn=`mx-focus mt-2 inline-flex cursor-pointer items-center gap-1.5 rounded-md border border-dashed border-ink-700 px-2.5 py-1 text-[12px] text-ink-300 hover:border-ink-500 hover:text-ink-100`,Pn=`mx-focus grid size-8 cursor-pointer place-items-center rounded text-ink-400 hover:text-danger`,Ie=class i{open=mj(!1);image=jc(``);started=pj();store=C(h$1);t=Ot$1(()=>oS().images.runDialog);common=Ot$1(()=>oS().common);field=En;addButton=Tn;removeButton=Pn;name=wt$1(``);autoRestart=wt$1(!1);knownVolumes=wt$1([]);knownNetworks=wt$1([]);network=wt$1(``);networkAlias=wt$1(``);ports=wt$1([]);volumes=wt$1([]);env=wt$1([]);problem=wt$1(null);busy=wt$1(!1);canSubmit=Ot$1(()=>!this.busy()&&this.image()!==``);selectableNetworks=Ot$1(()=>this.knownNetworks().filter(t=>t.name!==`bridge`));canAlias=Ot$1(()=>{let t=this.network();return t!==``&&this.knownNetworks().some(e=>e.name===t&&!e.builtIn)});constructor(){rf(()=>{this.open()&&(this.loadVolumes(),this.loadNetworks())})}async loadVolumes(){try{this.knownVolumes.set((await window.electron.volumes.list()).map(t=>t.name))}catch{this.knownVolumes.set([])}}async loadNetworks(){try{this.knownNetworks.set(await window.electron.networks.list())}catch{this.knownNetworks.set([])}}setNetwork(t){this.network.set(t),this.canAlias()||this.networkAlias.set(``)}addPort(){this.ports.update(t=>[...t,{host:``,container:``,protocol:`tcp`}])}addVolume(){this.volumes.update(t=>[...t,{source:``,target:``,readOnly:!1}])}addEnv(){this.env.update(t=>[...t,{key:``,value:``}])}removePort(t){this.ports.update(e=>e.filter((n,l)=>l!==t))}removeVolume(t){this.volumes.update(e=>e.filter((n,l)=>l!==t))}removeEnv(t){this.env.update(e=>e.filter((n,l)=>l!==t))}setPort(t,e){this.ports.update(n=>n.map((l,d)=>d===t?W(W({},l),e):l))}setVolume(t,e){this.volumes.update(n=>n.map((l,d)=>d===t?W(W({},l),e):l))}setEnv(t,e){this.env.update(n=>n.map((l,d)=>d===t?W(W({},l),e):l))}setEnvKey(t,e){let n=e.value,l=n.indexOf(`=`);if(l<=0){this.setEnv(t,{key:n});return}let d=n.slice(0,l),w=n.slice(l+1);this.setEnv(t,w===``?{key:d}:{key:d,value:w}),e.value=d,e.parentElement?.querySelector(`input[data-env-value="${String(t)}"]`)?.focus()}async submit(t){if(t.preventDefault(),!this.canSubmit())return;let e=this.collect();if(typeof e==`string`){this.problem.set(e);return}this.busy.set(!0),this.problem.set(null);try{let n=await window.electron.images.run(e);if(!n.ok){this.problem.set(n.problem);return}this.reset(),this.open.set(!1),this.started.emit(n.id),this.store.refresh()}catch(n){this.problem.set(eH(n))}finally{this.busy.set(!1)}}collect(){let t=this.t(),e=[];for(let $ of this.ports()){let U=Number($.container.trim());if(!Number.isInteger(U)||U<1||U>65535)return t.invalidContainerPort($.container);let ne=$.host.trim(),xe=ne===``?null:Number(ne);if(xe!==null&&(!Number.isInteger(xe)||xe<1||xe>65535))return t.invalidHostPort($.host);e.push({hostPort:xe,containerPort:U,protocol:$.protocol})}let n=[];for(let $ of this.volumes()){let U=$.source.trim(),ne=$.target.trim();if(U===``||ne===``)return t.volumeIncomplete;if(!ne.startsWith(`/`))return t.notAbsolute(ne);n.push({source:U,target:ne,readOnly:$.readOnly})}let l=[];for(let $ of this.env()){let U=$.key.trim();if(U===``)return t.envNameMissing;if(U.includes(`=`))return t.envNameWithEquals(U);l.push({key:U,value:$.value})}let d=this.name().trim(),w=this.network(),se=this.canAlias()?this.networkAlias().trim():``;return se!==``&&!/^[\w][\w.-]*$/.test(se)?t.invalidAlias(se):{image:this.image(),name:d===``?null:d,ports:e,volumes:n,env:l,network:w===``?null:w,networkAlias:se===``?null:se,restart:this.autoRestart()?`unless-stopped`:`no`}}reset(){this.name.set(``),this.autoRestart.set(!1),this.network.set(``),this.networkAlias.set(``),this.ports.set([]),this.volumes.set([]),this.env.set([]),this.problem.set(null)}static ɵfac=function(e){return new(e||i)};static ɵcmp=wc({type:i,selectors:[[`app-run-dialog`]],inputs:{open:[1,`open`],image:[1,`image`]},outputs:{open:`openChange`,started:`started`},decls:2,vars:1,consts:[[`rdxDialogRoot`,``,3,`openChange`,`open`],[`rdxDialogPortal`,``],[`rdxDialogBackdrop`,``,1,`fixed`,`inset-0`,`z-40`,`bg-black/50`],[`rdxDialogViewport`,``,1,`fixed`,`inset-0`,`z-50`,`grid`,`place-items-center`,`p-4`],[`rdxDialogPopup`,``,1,`flex`,`max-h-[85vh]`,`w-full`,`max-w-2xl`,`flex-col`,`rounded-lg`,`border`,`border-ink-700`,`bg-ink-850`,`shadow-2xl`],[1,`shrink-0`,`border-b`,`border-ink-800`,`px-5`,`pt-5`,`pb-4`],[`rdxDialogTitle`,``,1,`text-[15px]`,`font-semibold`,`text-ink-100`],[`rdxDialogDescription`,``,1,`mt-1.5`,`flex`,`items-center`,`gap-1.5`,`text-[13px]`,`text-ink-400`],[1,`rounded`,`bg-ink-800`,`px-1.5`,`py-0.5`,`font-mono`,`text-[12px]`,`text-ink-200`],[1,`flex`,`min-h-0`,`flex-1`,`flex-col`,3,`submit`],[1,`min-h-0`,`flex-1`,`space-y-6`,`overflow-y-auto`,`px-5`,`py-5`],[1,`space-y-3`],[1,`block`],[1,`text-[13px]`,`font-medium`,`text-ink-200`],[`type`,`text`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`placeholder`,`value`],[1,`flex`,`cursor-pointer`,`items-start`,`gap-2.5`],[`type`,`checkbox`,1,`mx-focus`,`mt-0.5`,`accent-accent`,3,`change`,`checked`],[1,`block`,`text-[13px]`,`text-ink-100`],[1,`block`,`text-[12px]`,`text-ink-500`],[1,`mt-0.5`,`text-[12px]`,`text-ink-500`],[3,`change`],[`value`,``,3,`selected`],[3,`value`,`selected`],[1,`mt-3`,`block`],[1,`mt-3`,`grid`,`grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)_7rem_2rem]`,`items-center`,`gap-x-2`,`gap-y-2`],[`type`,`button`,3,`click`],[`name`,`plus`,3,`size`],[1,`mt-3`,`grid`,`grid-cols-[minmax(0,2fr)_auto_minmax(0,3fr)_2rem]`,`items-center`,`gap-x-2`,`gap-y-2`],[1,`shrink-0`,`border-t`,`border-ink-800`,`px-5`,`py-3`],[`role`,`alert`,1,`mb-3`,`rounded-md`,`border`,`border-danger/40`,`bg-danger/10`,`px-3`,`py-2`,`text-[13px]`,`text-danger`],[1,`flex`,`justify-end`,`gap-2`],[`type`,`button`,`rdxDialogClose`,``,1,`mx-btn`,`mx-focus`],[`name`,`close`,3,`size`],[`type`,`submit`,1,`mx-btn`,`mx-focus`,`border-accent`,`text-accent`,3,`disabled`],[`name`,`play`,3,`size`],[1,`mt-1`,`block`,`text-[12px]`,`text-ink-500`],[1,`text-[11px]`,`tracking-wide`,`text-ink-500`,`uppercase`],[`type`,`text`,`inputmode`,`numeric`,3,`input`,`placeholder`,`value`],[1,`text-ink-500`],[`type`,`text`,`placeholder`,`80`,`inputmode`,`numeric`,3,`input`,`value`],[`value`,`tcp`,3,`selected`],[`value`,`udp`,3,`selected`],[`name`,`trash`,3,`size`],[`id`,`run-dialog-volumes`],[3,`value`],[`type`,`text`,`spellcheck`,`false`,`autocomplete`,`off`,`list`,`run-dialog-volumes`,3,`input`,`placeholder`,`value`],[`type`,`text`,`spellcheck`,`false`,`autocomplete`,`off`,3,`input`,`placeholder`,`value`],[1,`flex`,`cursor-pointer`,`items-center`,`gap-1.5`,`whitespace-nowrap`,`text-[12px]`,`text-ink-400`,3,`title`],[`type`,`checkbox`,1,`mx-focus`,`accent-accent`,3,`change`,`checked`],[`type`,`text`,`placeholder`,`TZ`,`spellcheck`,`false`,`autocomplete`,`off`,3,`input`,`value`],[`type`,`text`,`placeholder`,`Europe/Amsterdam`,`spellcheck`,`false`,`autocomplete`,`off`,3,`input`,`value`]],template:function(e,n){e&1&&(Oi(0,`div`,0),vg(`openChange`,function(d){return vk(n.open,d)||(n.open=d),d}),_m(1,In,72,49,`ng-template`,1),Nc()),e&2&&hg(`open`,n.open)},dependencies:[ie,ln$1,an$1,pn$1,cn$1,fn$1,dn$1,un$1,My],encapsulation:2})}});function Mn(i,t){if(i&1&&(Oi(0,`span`,38),fk(1),Nc()),i&2){let e=HE(),n=HE();ec(),mg(``,n.sizeOf(e.done),` / `,n.sizeOf(e.total))}}function Rn(i,t){if(i&1&&(Oi(0,`span`,38),fk(1),Nc()),i&2){let e=HE(),n=HE();ec(),pg(n.sizeOf(e.done))}}function Nn(i,t){if(i&1&&(Oi(0,`div`,9)(1,`div`,36)(2,`span`,37),fk(3),Nc(),kE(4,Mn,2,2,`span`,38)(5,Rn,2,1,`span`,38),Nc(),Oi(6,`div`,39),Gm(7,`div`,40),Nc()()),i&2){let e=t,n=HE();ec(3),pg(e.label),ec(),SE(e.total>0?4:e.done>0?5:-1),ec(3),sg(`width`,e.total===0?100:n.transferPercent(),`%`),ag(`animate-pulse`,e.total===0)}}function Vn(i,t){if(i&1&&(Oi(0,`span`,17),fk(1),Nc()),i&2){let e=HE();ec(),pg(e.t().refreshing)}}function Bn(i,t){if(i&1&&(Oi(0,`p`,19),fk(1),Nc()),i&2){let e=HE();ec(),pg(e.t().updatesHint)}}function zn(i,t){if(i&1){let e=$E();Oi(0,`div`,20)(1,`span`,41),fk(2),Nc(),Oi(3,`button`,42),Jm(`click`,function(){Ld(e);return Od(HE().askRemoveSelected())}),Gm(4,`app-icon`,43),fk(5),Nc()()}if(i&2){let e=HE();ec(2),pg(e.t().selected(e.selected().size)),ec(2),Wm(`size`,14),ec(),Ac(` `,e.common().remove,` `)}}function On(i,t){if(i&1&&(Oi(0,`span`,44),fk(1),Nc()),i&2){let e=t.$implicit;ag(`text-ink-500`,e.dangling)(`text-ink-100`,!e.dangling),Wm(`title`,e.repository),ec(),Ac(` `,e.repository,` `)}}function Ln(i,t){if(i&1&&(Oi(0,`span`,47),Gm(1,`app-icon`,50),fk(2),Nc()),i&2){let e=HE(2);ec(),Wm(`size`,12),ec(),Ac(` `,e.t().badge.newer,` `)}}function Fn(i,t){if(i&1&&(Oi(0,`span`,48),fk(1),Nc()),i&2){HE();let e=bk(0),n=HE();Wm(`title`,e?.problem??``),ec(),pg(n.t().badge.notInRegistry)}}function Wn(i,t){if(i&1&&(Oi(0,`span`,49),Gm(1,`app-icon`,51),fk(2),Nc()),i&2){HE();let e=bk(0),n=HE();Wm(`title`,e?.problem??``),ec(),Wm(`size`,12),ec(),Ac(` `,n.t().badge.uncheckable,` `)}}function $n(i,t){if(i&1&&(bg(0),Oi(1,`span`,45)(2,`span`,46),fk(3),Nc(),kE(4,Ln,3,2,`span`,47)(5,Fn,2,2,`span`,48)(6,Wn,3,3,`span`,49),Nc()),i&2){let e=t.$implicit,n=yk(HE().updateOf(e));ec(2),Wm(`title`,e.tag),ec(),pg(e.tag),ec(),SE(n?.state===`update`?4:n?.state===`unknown`?5:n?.state===`error`?6:-1)}}function Un(i,t){if(i&1&&(Oi(0,`span`,52),fk(1),Nc()),i&2){let e=t.$implicit;ec(),pg(e.shortId)}}function An(i,t){if(i&1&&(Oi(0,`span`,53),fk(1),Nc()),i&2){let e=HE().$implicit,n=HE();ec(),pg(n.t().containerCount(e.inUseBy))}}function jn(i,t){i&1&&(Oi(0,`span`,54),fk(1,`—`),Nc())}function Hn(i,t){if(i&1&&kE(0,An,2,1,`span`,53)(1,jn,2,0,`span`,54),i&2){let e=t.$implicit;SE(e.inUseBy>0?0:1)}}function qn(i,t){if(i&1&&(Oi(0,`span`,55),fk(1),Nc()),i&2){let e=t.$implicit,n=HE();ec(),pg(n.ageOf(e.createdAt))}}function Kn(i,t){if(i&1&&(Oi(0,`span`,56),fk(1),Nc()),i&2){let e=t.$implicit,n=HE();ec(),pg(n.sizeOf(e.sizeBytes))}}function Qn(i,t){if(i&1){let e=$E();Oi(0,`div`,57)(1,`app-action-menu`,58),Jm(`picked`,function(l){let d=Ld(e).$implicit;return Od(HE().onRowMenu(l,d))}),Nc()()}if(i&2){let e=t.$implicit,n=HE();ec(),Wm(`label`,n.t().rowMenu(e.reference))(`items`,n.rowMenu(e))}}var ot;f(()=>{Kr();ra();o();P();M();h();G();Je();J();oe();K();dS();x();et();tt();nt();it();at();sS();lS();f$1();Kr();ot=class i$1{store=C(h$1);toast=C(u);router=C(fe);route=C(Q);preferences=C(p);t=Ot$1(()=>oS().images);common=Ot$1(()=>oS().common);columns=Ot$1(()=>{let t=this.t().columns;return[{key:`repository`,label:t.repository},{key:`tag`,label:t.tag,width:`230px`},{key:`shortId`,label:t.imageId,width:`120px`},{key:`inUse`,label:t.inUse,width:`110px`},{key:`created`,label:t.created,width:`150px`},{key:`size`,label:t.size,width:`100px`,align:`right`},{key:`actions`,label:t.actions,width:`84px`,align:`right`}]});loading=this.store.loading;problem=this.store.problem;pending=this.store.pending;unusedCount=this.store.unusedCount;search=wt$1(``);zoek=jc(void 0);starten=jc(void 0);lagen=jc(void 0);ophalen=jc(void 0);verwijder=jc(void 0);controleren=jc(void 0);onlyUnused=this.preferences.flag(`images.onlyUnused`);selected=wt$1(new Set);removal=wt$1(null);confirmOpen=wt$1(!1);pullOpen=wt$1(!1);tagSource=wt$1(``);tagOpen=wt$1(!1);pushReference=wt$1(``);pushOpen=wt$1(!1);buildOpen=wt$1(!1);pullPreset=wt$1(null);updates=this.store.updates;checkingUpdates=this.store.checkingUpdates;hasUpdates=Ot$1(()=>[...this.updates()?.values()??[]].some(t=>t.state===`update`));runOpen=wt$1(!1);runImage=wt$1(``);layersOpen=wt$1(!1);layersImage=wt$1(``);rows=Ot$1(()=>{let t=this.search().trim().toLowerCase(),e=this.onlyUnused();return this.store.images().filter(n=>e&&n.inUseBy>0?!1:t===``?!0:`${n.repository}:${n.tag} ${n.shortId}`.toLowerCase().includes(t))});totalSize=Ot$1(()=>d(this.store.totalBytes()));selectedRefs=Ot$1(()=>[...this.selected()]);trackKey=t=>t.reference;transfer=wt$1(null);transferPercent(){let t=this.transfer();return t===null||t.total===0?0:Math.min(100,t.done/t.total*100)}async saveToFile(t){this.transfer.set({label:this.t().file.saving(t),done:0,total:0});try{let e=await window.electron.images.saveToFile(t);e.ok?this.toast.success(this.t().file.saved(e.path,d(e.bytes))):e.canceled||this.toast.error(e.problem)}catch(e){this.toast.error(eH(e))}finally{this.transfer.set(null)}}async loadFromFile(){this.transfer.set({label:this.t().file.loading,done:0,total:0});try{let t=await window.electron.images.loadFromFile();t.ok?(this.toast.success(t.loaded.length===0?this.t().file.loadedNothing:this.t().file.loaded(t.loaded.join(`, `))),this.store.refresh()):t.canceled||this.toast.error(t.problem)}catch(t){this.toast.error(eH(t))}finally{this.transfer.set(null)}}constructor(){C(ve).onDestroy(window.electron.images.onFileProgress(t=>this.transfer.update(e=>e===null?null:W(W({},e),t)))),rf(()=>{let t=this.zoek();t!==void 0&&Tg(()=>this.search.set(t))}),this.fromRoute(this.starten,`starten`,t=>{this.runImage.set(t),this.runOpen.set(!0)}),this.fromRoute(this.lagen,`lagen`,t=>{this.layersImage.set(t),this.layersOpen.set(!0)}),this.fromRoute(this.ophalen,`ophalen`,t=>this.openPull(t)),this.fromRoute(this.controleren,`controleren`,()=>this.checkUpdates()),rf(()=>{let t=this.verwijder(),e=this.store.images().find(n=>n.reference===t);t!==void 0&&e!==void 0&&Tg(()=>{this.askRemove(e),i(this.router,this.route,`verwijder`)})}),this.store.refresh()}fromRoute(t,e,n){rf(()=>{let l=t();l!==void 0&&Tg(()=>{n(l),i(this.router,this.route,e)})})}menuItems=Ot$1(()=>{let t=this.t().menu;return[{id:`pull`,label:t.pull,icon:`download`},{id:`build`,label:t.build,icon:`images`},{id:`check`,label:this.checkingUpdates()?t.checking:t.check,icon:`refresh`,disabled:this.checkingUpdates()},{id:`prune-dangling`,label:t.pruneDangling,icon:`broom`,separated:!0},{id:`prune-unused`,label:t.pruneUnused,icon:`broom`},{id:`load`,label:t.load,icon:`upload`,disabled:this.transfer()!==null,separated:!0}]});onMenu(t){switch(t){case`pull`:this.openPull(null);break;case`build`:this.buildOpen.set(!0);break;case`check`:this.checkUpdates();break;case`prune-dangling`:this.askPrune(!1);break;case`prune-unused`:this.askPrune(!0);break;case`load`:this.loadFromFile();break}}checkUpdates(){this.store.checkUpdates()}openPull(t){this.pullPreset.set(t),this.pullOpen.set(!0)}pullClosed(t){this.pullOpen.set(t),t||(this.pullPreset.set(null),this.store.recheckIfChecked())}updateOf(t){return this.updates()?.get(t.reference)??null}sizeOf(t){return d(t)}ageOf(t){return N(t)}rowMenu(t){let e=this.pending().has(t.reference),n=this.t(),l=[];return this.updateOf(t)?.state===`update`&&l.push({id:`update`,label:n.rowUpdate,icon:`download`,disabled:e,hint:n.updateTitle(t.reference)}),l.push({id:`run`,label:n.rowRun,icon:`play`,disabled:e,hint:this.runLabelOf(t)},{id:`layers`,label:n.rowLayers,icon:`images`},{id:`save`,label:n.rowSave,icon:`download`,disabled:this.transfer()!==null},{id:`tag`,label:n.rowTag,icon:`plus`,separated:!0}),t.dangling||l.push({id:`push`,label:n.rowPush,icon:`upload`,disabled:e}),!t.dangling&&(t.inUseBy>0||this.store.images().some(d=>d.id===t.id&&d.reference!==t.reference))&&l.push({id:`untag`,label:n.rowUntag,icon:`eraser`,disabled:e}),l.push({id:`remove`,label:this.common().remove,icon:`trash`,disabled:e,danger:!0,separated:!0}),l}onRowMenu(t,e){t===`save`?this.saveToFile(e.reference):t===`update`?this.openPull(e.reference):t===`run`?this.askRun(e):t===`layers`?(this.layersImage.set(e.reference),this.layersOpen.set(!0)):t===`tag`?(this.tagSource.set(e.reference),this.tagOpen.set(!0)):t===`push`?(this.pushReference.set(e.reference),this.pushOpen.set(!0)):t===`untag`?this.untag(e.reference):this.askRemove(e)}async untag(t){try{let e=await window.electron.images.untag(t);e.ok?(this.toast.success(this.t().untagged(t)),this.store.refresh()):this.toast.error(e.problem)}catch(e){this.toast.error(eH(e))}}askRun(t){this.startFrom(t.reference)}startFrom(t){this.runImage.set(t),this.runOpen.set(!0)}goToContainer(t){this.router.navigate([`/containers`,t]).catch(()=>{})}runLabelOf(t){return t.dangling?this.t().runLabelDangling:this.t().runLabel(t.reference)}askRemove(t){let e=t.inUseBy>0,n=this.t().remove;this.removal.set({references:[t.reference],title:e?n.forceTitle:n.title,description:e?n.forceDescription(t.reference,t.inUseBy):n.description(t.reference),confirmLabel:e?n.forceConfirm:this.common().remove,force:e}),this.confirmOpen.set(!0)}askRemoveSelected(){let t=this.selectedRefs(),e=this.t().remove;this.removal.set({references:t,title:e.manyTitle,description:e.manyDescription(t.length),confirmLabel:this.common().remove,force:!1}),this.confirmOpen.set(!0)}askPrune(t){let e=this.t().prune;this.removal.set({references:[],title:t?e.allTitle:e.danglingTitle,description:t?e.allDescription:e.danglingDescription,confirmLabel:e.confirm,force:t}),this.confirmOpen.set(!0)}confirm(){let t=this.removal();t!==null&&(t.references.length===0?this.store.prune(t.force):(this.store.removeMany(t.references,t.force),this.selected.set(new Set)),this.removal.set(null))}removalTitle(){return this.removal()?.title??``}removalDescription(){return this.removal()?.description??``}removalConfirmLabel(){return this.removal()?.confirmLabel??this.common().remove}removalConfirmIcon(){return this.removal()?.references.length===0?`broom`:`trash`}static ɵfac=function(e){return new(e||i$1)};static ɵcmp=wc({type:i$1,selectors:[[`app-images-page`]],inputs:{zoek:[1,`zoek`],starten:[1,`starten`],lagen:[1,`lagen`],ophalen:[1,`ophalen`],verwijder:[1,`verwijder`],controleren:[1,`controleren`]},decls:48,vars:39,consts:[[1,`flex`,`h-full`,`flex-col`],[1,`shrink-0`,`px-6`,`pt-5`,`pb-3`],[1,`flex`,`flex-wrap`,`items-start`,`gap-4`],[1,`text-xl`,`font-semibold`,`tracking-tight`,`text-ink-100`],[1,`mt-3`,`flex`,`flex-wrap`,`gap-x-10`,`gap-y-2`],[1,`text-[12px]`,`text-ink-400`],[1,`text-[15px]`,`font-medium`,`text-ink-100`],[1,`ml-auto`],[3,`picked`,`label`,`items`],[`role`,`status`,`data-testid`,`image-transfer`,1,`mt-3`,`max-w-md`],[1,`mt-4`,`flex`,`flex-wrap`,`items-center`,`gap-4`],[1,`relative`,`flex`,`items-center`],[1,`pointer-events-none`,`absolute`,`left-2.5`,`text-ink-500`],[`name`,`search`,3,`size`],[1,`sr-only`],[`type`,`search`,1,`mx-focus`,`w-72`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-850`,`py-1.5`,`pr-3`,`pl-8`,`text-[13px]`,`text-ink-100`,`placeholder:text-ink-500`,3,`input`,`placeholder`,`value`],[3,`onChange`,`label`,`on`],[1,`text-[12px]`,`text-ink-500`],[3,`problem`],[1,`mt-2`,`text-[12px]`,`text-ink-400`],[1,`mt-3`,`flex`,`items-center`,`gap-2`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-850`,`px-3`,`py-2`],[1,`min-h-0`,`flex-1`,`overflow-y-auto`,`px-6`,`pb-6`],[3,`selectedChange`,`columns`,`rows`,`trackKey`,`selected`,`emptyMessage`],[`appCell`,`repository`],[`appCell`,`tag`],[`appCell`,`shortId`],[`appCell`,`inUse`],[`appCell`,`created`],[`appCell`,`size`],[`appCell`,`actions`],[3,`openChange`,`confirmed`,`open`,`title`,`description`,`confirmLabel`,`confirmIcon`],[3,`openChange`,`open`,`preset`],[3,`openChange`,`run`,`open`],[3,`openChange`,`open`,`source`],[3,`openChange`,`open`,`reference`],[3,`openChange`,`started`,`open`,`image`],[1,`flex`,`items-baseline`,`justify-between`,`text-[12px]`],[1,`text-ink-300`],[1,`text-ink-500`,`tabular-nums`],[1,`mt-1`,`h-1.5`,`w-full`,`overflow-hidden`,`rounded-full`,`bg-ink-800`],[1,`h-full`,`rounded-full`,`bg-accent`,`transition-[width]`],[1,`text-[13px]`,`text-ink-200`],[`type`,`button`,1,`mx-btn`,`mx-focus`,`ml-auto`,`text-danger`,`hover:text-danger`,3,`click`],[`name`,`trash`,3,`size`],[1,`block`,`truncate`,3,`title`],[1,`flex`,`min-w-0`,`items-center`,`gap-2`],[1,`truncate`,`text-ink-300`,3,`title`],[`data-testid`,`update-badge`,1,`flex`,`shrink-0`,`items-center`,`gap-1`,`text-[11px]`,`text-warn`],[1,`shrink-0`,`text-[11px]`,`text-ink-500`,3,`title`],[1,`flex`,`shrink-0`,`items-center`,`gap-1`,`text-[11px]`,`text-ink-500`,3,`title`],[`name`,`arrow-up`,3,`size`],[`name`,`warning`,3,`size`],[1,`font-mono`,`text-[12px]`,`text-ink-400`],[1,`text-ink-200`],[1,`text-ink-600`],[1,`text-ink-400`],[1,`tabular-nums`,`text-ink-200`],[1,`flex`,`items-center`,`justify-end`],[`compact`,``,3,`picked`,`label`,`items`]],template:function(e,n){if(e&1&&(Oi(0,`section`,0)(1,`div`,1)(2,`div`,2)(3,`div`)(4,`h1`,3),fk(5),Nc(),Oi(6,`div`,4)(7,`div`)(8,`div`,5),fk(9),Nc(),Oi(10,`div`,6),fk(11),Nc()(),Oi(12,`div`)(13,`div`,5),fk(14),Nc(),Oi(15,`div`,6),fk(16),Nc()()()(),Oi(17,`div`,7)(18,`app-action-menu`,8),Jm(`picked`,function(d){return n.onMenu(d)}),Nc()()(),kE(19,Nn,8,6,`div`,9),Oi(20,`div`,10)(21,`label`,11)(22,`span`,12),Gm(23,`app-icon`,13),Nc(),Oi(24,`span`,14),fk(25),Nc(),Oi(26,`input`,15),Jm(`input`,function(d){return n.search.set(d.target.value)}),Nc()(),Oi(27,`app-filter-switch`,16),vg(`onChange`,function(d){return vk(n.onlyUnused,d)||(n.onlyUnused=d),d}),Nc(),kE(28,Vn,2,1,`span`,17),Nc(),Gm(29,`app-page-messages`,18),kE(30,Bn,2,1,`p`,19),kE(31,zn,6,3,`div`,20),Nc(),Oi(32,`div`,21)(33,`app-data-table`,22),vg(`selectedChange`,function(d){return vk(n.selected,d)||(n.selected=d),d}),_m(34,On,2,6,`ng-template`,23)(35,$n,7,4,`ng-template`,24)(36,Un,2,1,`ng-template`,25)(37,Hn,2,1,`ng-template`,26)(38,qn,2,1,`ng-template`,27)(39,Kn,2,1,`ng-template`,28)(40,Qn,2,2,`ng-template`,29),Nc()()(),Oi(41,`app-confirm-dialog`,30),vg(`openChange`,function(d){return vk(n.confirmOpen,d)||(n.confirmOpen=d),d}),Jm(`confirmed`,function(){return n.confirm()}),Nc(),Oi(42,`app-pull-dialog`,31),Jm(`openChange`,function(d){return n.pullClosed(d)}),Nc(),Oi(43,`app-build-dialog`,32),vg(`openChange`,function(d){return vk(n.buildOpen,d)||(n.buildOpen=d),d}),Jm(`run`,function(d){return n.startFrom(d)}),Nc(),Oi(44,`app-tag-dialog`,33),vg(`openChange`,function(d){return vk(n.tagOpen,d)||(n.tagOpen=d),d}),Nc(),Oi(45,`app-push-dialog`,34),vg(`openChange`,function(d){return vk(n.pushOpen,d)||(n.pushOpen=d),d}),Nc(),Oi(46,`app-run-dialog`,35),vg(`openChange`,function(d){return vk(n.runOpen,d)||(n.runOpen=d),d}),Jm(`started`,function(d){return n.goToContainer(d)}),Nc(),Oi(47,`app-layers-dialog`,34),vg(`openChange`,function(d){return vk(n.layersOpen,d)||(n.layersOpen=d),d}),Nc()),e&2){let l;ec(5),pg(n.t().title),ec(4),pg(n.t().diskSpace),ec(2),pg(n.totalSize()),ec(3),pg(n.t().unused),ec(2),pg(n.unusedCount()),ec(2),Wm(`label`,n.t().menuLabel)(`items`,n.menuItems()),ec(),SE((l=n.transfer())?19:-1,l),ec(4),Wm(`size`,15),ec(2),pg(n.t().searchLabel),ec(),Wm(`placeholder`,n.t().searchLabel)(`value`,n.search()),ec(),Wm(`label`,n.t().onlyUnused),hg(`on`,n.onlyUnused),ec(),SE(n.loading()?28:-1),ec(),Wm(`problem`,n.problem()),ec(),SE(n.hasUpdates()?30:-1),ec(),SE(n.selected().size>0?31:-1),ec(2),Wm(`columns`,n.columns())(`rows`,n.rows())(`trackKey`,n.trackKey),hg(`selected`,n.selected),Wm(`emptyMessage`,n.t().empty),ec(8),hg(`open`,n.confirmOpen),Wm(`title`,n.removalTitle())(`description`,n.removalDescription())(`confirmLabel`,n.removalConfirmLabel())(`confirmIcon`,n.removalConfirmIcon()),ec(),Wm(`open`,n.pullOpen())(`preset`,n.pullPreset()),ec(),hg(`open`,n.buildOpen),ec(),hg(`open`,n.tagOpen),Wm(`source`,n.tagSource()),ec(),hg(`open`,n.pushOpen),Wm(`reference`,n.pushReference()),ec(),hg(`open`,n.runOpen),Wm(`image`,n.runImage()),ec(),hg(`open`,n.layersOpen),Wm(`reference`,n.layersImage())}},dependencies:[z,x$1,My,W$1,u$1,Ce,Ie,we,P$1,V,De,ke,Se],encapsulation:2})}})();export{ot as ImagesPage};
@@ -1 +1 @@
1
- import{$n as sk,A as HE,B as Kr,Bn as ok,Cr as zE,D as Gm,Dn as kc,En as kE,H as Ld,J as Nc,K as My,M as IE,Pt as Wm,R as Jm,St as Tc,Wn as pg,Xn as rf,Zn as rg,_ as DE,_t as Sc,cn as f,et as Od,gn as gj,gr as wt,ht as SE,i as $m,ln as fS,lr as vg,mr as wc,o as Ac,or as vS,rn as dk,rt as Ot,sn as ec,t as $E,tt as Oi,u as Br,xn as hg}from"./chunk-BdOOWVGY.js";import"./chunk-D0xC_xVf.js";import"./chunk-D29s9m84.js";import"./chunk-CMrtklQ1.js";import"./chunk-eG8Su12W.js";import"./chunk-Bx2_SrZM.js";import{n as ro,t as Ql}from"./chunk-3VyqMz_T.js";import{a as fi,i as _e,n as Qt,o as gi,r as Ye,s as we,t as Le}from"./chunk-ep62jwHG.js";function te(n,a){if(n&1&&(Oi(0,`button`,7),Gm(1,`app-icon`,10),fS(2),Nc()),n&2){let e=a.$implicit,t=HE();Wm(`value`,e),ec(),Wm(`name`,t.tabIcons[e])(`size`,14),ec(),Ac(``,t.tabLabel(e),` `)}}function ae(n,a){if(n&1&&Gm(0,`app-terminal-view`,11),n&2)Wm(`active`,HE().tab()===`terminal`)}function ne(n,a){if(n&1&&(Oi(0,`p`,12),fS(1),Nc()),n&2){let e=HE();ec(),pg(e.t().loading)}}function ie(n,a){if(n&1){let e=$E();Oi(0,`div`,9)(1,`app-assistant-view`,13),Jm(`commandChosen`,function(g){Ld(e);return Od(HE().insertCommand(g))}),Nc()()}}var ee;var J;f(()=>{Kr();Le();dk();Ye();Ql();sk();Kr();ee=()=>[ro];J=class n{terminal=gj(ro);t=Ot(()=>ok().terminal);tabIcons={terminal:`terminal`,assistant:`sparkle`};assistantConfigured=wt(!1);tabNames=Ot(()=>this.assistantConfigured()?[`terminal`,`assistant`]:[`terminal`]);tab=wt(`terminal`);visited=wt(new Set([`terminal`]));constructor(){rf(()=>{let a=this.tab();this.visited.update(e=>e.has(a)?e:new Set(e).add(a))}),window.electron.assistant.status().then(a=>this.assistantConfigured.set(a.configured)).catch(()=>this.assistantConfigured.set(!1))}tabLabel(a){return this.t().tabs[a]}insertCommand(a){this.tab.set(`terminal`),this.terminal()?.insert(a)}static ɵfac=function(e){return new(e||n)};static ɵcmp=wc({type:n,selectors:[[`app-terminal-page`]],viewQuery:function(e,t){e&1&&rg(t.terminal,ro,5),e&2&&zE()},decls:25,vars:8,consts:[[1,`flex`,`h-full`,`flex-col`],[1,`shrink-0`,`px-6`,`pt-5`,`pb-3`],[1,`text-xl`,`font-semibold`,`tracking-tight`,`text-ink-100`],[1,`mt-1`,`max-w-prose`,`text-[13px]`,`text-ink-400`],[1,`text-ink-200`],[`rdxTabsRoot`,``,1,`flex`,`min-h-0`,`flex-1`,`flex-col`,3,`valueChange`,`value`],[`rdxTabsList`,``,1,`flex`,`shrink-0`,`gap-1`,`border-b`,`border-ink-700`,`px-6`],[`type`,`button`,`rdxTabsTab`,``,1,`mx-focus`,`-mb-px`,`cursor-pointer`,`border-b-2`,`border-transparent`,`px-3`,`py-2`,`text-[13px]`,`text-ink-400`,`transition-colors`,`hover:text-ink-100`,`data-[active]:border-accent`,`data-[active]:text-ink-100`,3,`value`],[`rdxTabsPanel`,``,`value`,`terminal`,1,`min-h-0`,`flex-1`],[`rdxTabsPanel`,``,`value`,`assistant`,1,`min-h-0`,`flex-1`],[1,`mr-1.5`,`-mt-0.5`,`inline-flex`,`align-middle`,3,`name`,`size`],[3,`active`],[1,`px-6`,`py-5`,`text-[13px]`,`text-ink-400`],[3,`commandChosen`]],template:function(e,t){e&1&&(Oi(0,`section`,0)(1,`div`,1)(2,`h1`,2),fS(3),Nc(),Oi(4,`p`,3),fS(5),Oi(6,`code`),fS(7,`docker`),Nc(),fS(8),Oi(9,`strong`,4),fS(10,`root`),Nc(),fS(11),Oi(12,`code`),fS(13,`alpine`),Nc(),fS(14),Nc()(),Oi(15,`div`,5),vg(`valueChange`,function(l){return vS(t.tab,l)||(t.tab=l),l}),Oi(16,`div`,6),kc(17,te,3,4,`button`,7,Sc),Nc(),Oi(19,`div`,8),$m(20,ae,1,1)(21,ne,2,1),DE(22,20,ee,21),IE(),Nc(),SE(24,ie,2,0,`div`,9),Nc()()),e&2&&(ec(3),pg(t.t().title),ec(2),Ac(` `,t.t().intro.start,` `),ec(3),pg(t.t().intro.afterDocker),ec(3),pg(t.t().intro.afterRoot),ec(3),Ac(``,t.t().intro.afterAlpine,` `),ec(),hg(`value`,t.tab),ec(),Br(`aria-label`,t.t().tabsLabel),ec(),Tc(t.tabNames()),ec(7),kE(t.assistantConfigured()&&t.visited().has(`assistant`)?24:-1))},dependencies:[we,fi,gi,_e,My,Qt],encapsulation:2})}})();export{J as TerminalPage};
1
+ import{$n as sS,A as HE,B as Kr,Bn as oS,D as Gm,Dn as kE,Et as UE,Gn as pg,H as Ld,K as My,M as IE,On as kc,Pt as Wm,Qn as rg,R as Jm,Zn as rf,_ as DE,_r as wt,cn as f,dr as vk,et as Od,fn as fk,gn as gj,hr as wc,ht as Sc,i as $m,lr as vg,mt as SE,o as Ac,q as Nc,rn as dS,rt as Ot,sn as ec,t as $E,tt as Oi,u as Br,xn as hg,xt as Tc}from"./chunk-CpIMiI_l.js";import"./chunk-CjAbzLl3.js";import"./chunk-DS3iAefP.js";import"./chunk-qxDOm16k.js";import"./chunk-gHmeiJFn.js";import"./chunk-xmDwFpQl.js";import{n as ro,t as Ql}from"./chunk-DLpC_2HL.js";import{a as fi,i as _e,n as Qt,o as gi,r as Ye,s as we,t as Le}from"./chunk-vPeKxmUB.js";function te(n,a){if(n&1&&(Oi(0,`button`,7),Gm(1,`app-icon`,10),fk(2),Nc()),n&2){let e=a.$implicit,t=HE();Wm(`value`,e),ec(),Wm(`name`,t.tabIcons[e])(`size`,14),ec(),Ac(``,t.tabLabel(e),` `)}}function ae(n,a){if(n&1&&Gm(0,`app-terminal-view`,11),n&2)Wm(`active`,HE().tab()===`terminal`)}function ne(n,a){if(n&1&&(Oi(0,`p`,12),fk(1),Nc()),n&2){let e=HE();ec(),pg(e.t().loading)}}function ie(n,a){if(n&1){let e=$E();Oi(0,`div`,9)(1,`app-assistant-view`,13),Jm(`commandChosen`,function(g){Ld(e);return Od(HE().insertCommand(g))}),Nc()()}}var ee;var J;f(()=>{Kr();Le();dS();Ye();Ql();sS();Kr();ee=()=>[ro];J=class n{terminal=gj(ro);t=Ot(()=>oS().terminal);tabIcons={terminal:`terminal`,assistant:`sparkle`};assistantConfigured=wt(!1);tabNames=Ot(()=>this.assistantConfigured()?[`terminal`,`assistant`]:[`terminal`]);tab=wt(`terminal`);visited=wt(new Set([`terminal`]));constructor(){rf(()=>{let a=this.tab();this.visited.update(e=>e.has(a)?e:new Set(e).add(a))}),window.electron.assistant.status().then(a=>this.assistantConfigured.set(a.configured)).catch(()=>this.assistantConfigured.set(!1))}tabLabel(a){return this.t().tabs[a]}insertCommand(a){this.tab.set(`terminal`),this.terminal()?.insert(a)}static ɵfac=function(e){return new(e||n)};static ɵcmp=wc({type:n,selectors:[[`app-terminal-page`]],viewQuery:function(e,t){e&1&&rg(t.terminal,ro,5),e&2&&UE()},decls:25,vars:8,consts:[[1,`flex`,`h-full`,`flex-col`],[1,`shrink-0`,`px-6`,`pt-5`,`pb-3`],[1,`text-xl`,`font-semibold`,`tracking-tight`,`text-ink-100`],[1,`mt-1`,`max-w-prose`,`text-[13px]`,`text-ink-400`],[1,`text-ink-200`],[`rdxTabsRoot`,``,1,`flex`,`min-h-0`,`flex-1`,`flex-col`,3,`valueChange`,`value`],[`rdxTabsList`,``,1,`flex`,`shrink-0`,`gap-1`,`border-b`,`border-ink-700`,`px-6`],[`type`,`button`,`rdxTabsTab`,``,1,`mx-focus`,`-mb-px`,`cursor-pointer`,`border-b-2`,`border-transparent`,`px-3`,`py-2`,`text-[13px]`,`text-ink-400`,`transition-colors`,`hover:text-ink-100`,`data-[active]:border-accent`,`data-[active]:text-ink-100`,3,`value`],[`rdxTabsPanel`,``,`value`,`terminal`,1,`min-h-0`,`flex-1`],[`rdxTabsPanel`,``,`value`,`assistant`,1,`min-h-0`,`flex-1`],[1,`mr-1.5`,`-mt-0.5`,`inline-flex`,`align-middle`,3,`name`,`size`],[3,`active`],[1,`px-6`,`py-5`,`text-[13px]`,`text-ink-400`],[3,`commandChosen`]],template:function(e,t){e&1&&(Oi(0,`section`,0)(1,`div`,1)(2,`h1`,2),fk(3),Nc(),Oi(4,`p`,3),fk(5),Oi(6,`code`),fk(7,`docker`),Nc(),fk(8),Oi(9,`strong`,4),fk(10,`root`),Nc(),fk(11),Oi(12,`code`),fk(13,`alpine`),Nc(),fk(14),Nc()(),Oi(15,`div`,5),vg(`valueChange`,function(l){return vk(t.tab,l)||(t.tab=l),l}),Oi(16,`div`,6),Sc(17,te,3,4,`button`,7,kc),Nc(),Oi(19,`div`,8),$m(20,ae,1,1)(21,ne,2,1),DE(22,20,ee,21),IE(),Nc(),kE(24,ie,2,0,`div`,9),Nc()()),e&2&&(ec(3),pg(t.t().title),ec(2),Ac(` `,t.t().intro.start,` `),ec(3),pg(t.t().intro.afterDocker),ec(3),pg(t.t().intro.afterRoot),ec(3),Ac(``,t.t().intro.afterAlpine,` `),ec(),hg(`value`,t.tab),ec(),Br(`aria-label`,t.t().tabsLabel),ec(),Tc(t.tabNames()),ec(7),SE(t.assistantConfigured()&&t.visited().has(`assistant`)?24:-1))},dependencies:[we,fi,gi,_e,My,Qt],encapsulation:2})}})();export{J as TerminalPage};
@@ -0,0 +1 @@
1
+ import{$n as sS,B as Kr,Bn as oS,Rt as X,_r as wt,cn as f,f as C}from"./chunk-CpIMiI_l.js";import{n as u,t as f$1}from"./chunk-CphQt55R.js";var p;var g=f(()=>{Kr();sS();f$1();Kr();p=class i{toast=C(u);cliStatus=wt(null);running=wt(new Set);remembered=wt([]);openingFile=wt(!1);status=this.cliStatus.asReadonly();known=this.remembered.asReadonly();opening=this.openingFile.asReadonly();pending=this.running.asReadonly();async loadStatus(){this.cliStatus.set(await window.electron.compose.status())}async loadKnown(){try{this.remembered.set(await window.electron.compose.known())}catch{}}async openFile(){this.openingFile.set(!0);try{let e=await window.electron.compose.openFile();e.ok?e.project!==null&&this.toast.success(oS().compose.upDone(e.project)):this.toast.error(e.problem)}finally{this.openingFile.set(!1),this.loadKnown()}}async forget(e){await window.electron.compose.forget(e),this.toast.success(oS().compose.forgotten(e)),await this.loadKnown()}async up(e){await this.run(e,`up`)}async down(e){await this.run(e,`down`)}async recreate(e,t){this.running.update(o=>new Set(o).add(e));try{let o=await window.electron.compose.recreate(e,t);return o.ok?this.toast.success(oS().compose.recreateDone(t)):this.toast.error(o.problem),o.ok}finally{this.release(e)}}async run(e,t){this.running.update(o=>new Set(o).add(e));try{let o=await(t===`up`?window.electron.compose.up(e):window.electron.compose.down(e));if(o.ok){let r=oS().compose;this.toast.success(t===`up`?r.upDone(e):r.downDone(e))}else this.toast.error(o.problem)}finally{this.release(e),this.loadKnown()}}release(e){this.running.update(t=>{let o=new Set(t);return o.delete(e),o})}static ɵfac=function(t){return new(t||i)};static ɵprov=X({token:i,factory:i.ɵfac,providedIn:`root`})}});export{p as n,g as t};
@@ -1 +1 @@
1
- import{B as Kr,Rt as X,cn as f,gr as wt,jn as lk,on as eH}from"./chunk-BdOOWVGY.js";var o;var y=f(()=>{Kr();lk();Kr();o=class a{state=wt(null);busy=wt(!1);startingWsl=wt(!1);wslFailure=wt(null);startedWsl=wt(!1);status=this.state.asReadonly();loading=this.busy.asReadonly();wslStarting=this.startingWsl.asReadonly();wslProblem=this.wslFailure.asReadonly();wslStartedBefore=this.startedWsl.asReadonly();async refresh(){this.busy.set(!0);try{this.state.set(await window.electron.engine.status())}finally{this.busy.set(!1)}}async startWsl(e){return this.start(()=>window.electron.engine.startWsl(e),!0)}async startWslDaemon(e){return this.start(()=>window.electron.engine.startWslDaemon(e),!1)}async start(e,r){this.startingWsl.set(!0),this.wslFailure.set(null);try{let s=await e();return s.ok?this.startedWsl.set(r):this.wslFailure.set(s.problem),await this.refresh(),s.ok}catch(s){return this.wslFailure.set(eH(s)),!1}finally{this.startingWsl.set(!1)}}static ɵfac=function(r){return new(r||a)};static ɵprov=X({token:a,factory:a.ɵfac,providedIn:`root`})}});export{y as n,o as t};
1
+ import{B as Kr,Rt as X,_r as wt,cn as f,jn as lS,on as eH}from"./chunk-CpIMiI_l.js";var o;var y=f(()=>{Kr();lS();Kr();o=class a{state=wt(null);busy=wt(!1);startingWsl=wt(!1);wslFailure=wt(null);startedWsl=wt(!1);status=this.state.asReadonly();loading=this.busy.asReadonly();wslStarting=this.startingWsl.asReadonly();wslProblem=this.wslFailure.asReadonly();wslStartedBefore=this.startedWsl.asReadonly();async refresh(){this.busy.set(!0);try{this.state.set(await window.electron.engine.status())}finally{this.busy.set(!1)}}async startWsl(e){return this.start(()=>window.electron.engine.startWsl(e),!0)}async startWslDaemon(e){return this.start(()=>window.electron.engine.startWslDaemon(e),!1)}async start(e,r){this.startingWsl.set(!0),this.wslFailure.set(null);try{let s=await e();return s.ok?this.startedWsl.set(r):this.wslFailure.set(s.problem),await this.refresh(),s.ok}catch(s){return this.wslFailure.set(eH(s)),!1}finally{this.startingWsl.set(!1)}}static ɵfac=function(r){return new(r||a)};static ɵprov=X({token:a,factory:a.ɵfac,providedIn:`root`})}});export{y as n,o as t};
@@ -1 +1 @@
1
- import{$n as sk,A as HE,B as Kr,Bn as ok,Cr as zE,D as Gm,Dn as kc,En as kE,H as Ld,J as Nc,Pn as mj,Pt as Wm,Qn as sg,R as Jm,Sn as hj,St as Tc,Tn as jc,c as Ar,cn as f,et as Od,f as C,ft as RI,gt as SS,ht as SE,ir as tg,ln as fS,mr as wc,o as Ac,qt as ag,rt as Ot,sn as ec,t as $E,tt as Oi,u as Br,ur as vj,ut as Qm}from"./chunk-BdOOWVGY.js";import{i as Ie,o as Ne}from"./chunk-D29s9m84.js";function U(t,n){return this.trackKey()(n)}function W(t,n){t&1&&Gm(0,`col`,1)}function X(t,n){if(t&1&&Gm(0,`col`),t&2){let e=n.$implicit;sg(`width`,e.width??null)}}function Y(t,n){if(t&1){let e=$E();Oi(0,`th`,4)(1,`input`,6),Jm(`change`,function(){Ld(e);return Od(HE().toggleAll())}),Nc()()}if(t&2){let e=HE();ec(),Wm(`checked`,e.allSelected())(`indeterminate`,e.someSelected()),Br(`aria-label`,e.allSelected()?e.t().clearSelection:e.t().selectAll)}}function Z(t,n){if(t&1&&(Oi(0,`th`,7),fS(1),Nc()),t&2){let e=n.$implicit;ag(`text-right`,e.align===`right`),ec(),Ac(` `,e.label,` `)}}function ee(t,n){if(t&1&&(Oi(0,`tr`,8)(1,`td`,10),Qm(2,11),Nc()()),t&2){let e=HE().$implicit,a=HE();ec(),Br(`colspan`,a.columnCount()),ec(),Wm(`ngTemplateOutlet`,a.groupHeader().template)(`ngTemplateOutletContext`,SS(3,I,e))}}function te(t,n){if(t&1){let e=$E();Oi(0,`td`,10)(1,`input`,13),Jm(`change`,function(){Ld(e);let d=HE().$implicit,$=HE(2);return Od($.toggleOne($.trackKey()(d)))}),Nc()()}if(t&2){let e=HE().$implicit,a=HE(2);ec(),Wm(`checked`,a.selected().has(a.trackKey()(e))),Br(`aria-label`,a.t().select(a.trackKey()(e)))}}function ne(t,n){if(t&1&&(Oi(0,`td`,10),Qm(1,11),Nc()),t&2){let e=n.$implicit,a=HE().$implicit,d=HE(2);ag(`text-right`,e.align===`right`),ec(),Wm(`ngTemplateOutlet`,d.cellFor(e.key))(`ngTemplateOutletContext`,SS(4,I,a))}}function ae(t,n){if(t&1&&(Oi(0,`tr`,9),SE(1,te,2,2,`td`,10),kc(2,ne,2,6,`td`,12,_),Nc()),t&2){let e=HE(2);ec(),kE(e.selectable()?1:-1),ec(),Tc(e.columns())}}function ie(t,n){if(t&1&&(SE(0,ee,3,5,`tr`,8),kc(1,ae,4,1,`tr`,9,U,!0)),t&2){let e=n.$implicit;kE(HE().showHeaders()?0:-1),ec(),Tc(e.rows)}}function le(t,n){if(t&1&&(Oi(0,`tr`)(1,`td`,14),fS(2),Nc()()),t&2){let e=HE();ec(),Br(`colspan`,e.columnCount()),ec(),Ac(` `,e.emptyMessage()??e.t().empty,` `)}}var I;var _;var x;var h;var z;var oe=f(()=>{Ne();Kr();sk();Kr();I=t=>({$implicit:t}),_=(t,n)=>n.key;x=class t{appCell=jc.required();template=C(Ar);static ɵfac=function(e){return new(e||t)};static ɵdir=RI({type:t,selectors:[[`ng-template`,`appCell`,``]],inputs:{appCell:[1,`appCell`]}})},h=class t{template=C(Ar);static ɵfac=function(e){return new(e||t)};static ɵdir=RI({type:t,selectors:[[`ng-template`,`appGroupHeader`,``]]})},z=class t{columns=jc.required();rows=jc.required();trackKey=jc.required();selectable=jc(!0);emptyMessage=jc(null);selected=mj(new Set);groups=jc(null);cells=vj(x);groupHeader=hj(h);t=Ot(()=>ok().shell.dataTable);blocks=Ot(()=>this.groups()??[{key:``,rows:this.rows()}]);showHeaders=Ot(()=>this.groups()!==null&&this.groupHeader()!==void 0);isEmpty=Ot(()=>this.blocks().length===0||!this.showHeaders()&&this.rows().length===0);cellsByKey=Ot(()=>new Map(this.cells().map(n=>[n.appCell(),n.template])));columnCount=Ot(()=>this.columns().length+(this.selectable()?1:0));allSelected=Ot(()=>this.rows().length>0&&this.selected().size===this.rows().length);someSelected=Ot(()=>this.selected().size>0&&!this.allSelected());cellFor(n){return this.cellsByKey().get(n)??null}toggleAll(){this.selected.set(this.allSelected()?new Set:new Set(this.rows().map(n=>this.trackKey()(n))))}toggleOne(n){let e=new Set(this.selected());e.delete(n)||e.add(n),this.selected.set(e)}static ɵfac=function(e){return new(e||t)};static ɵcmp=wc({type:t,selectors:[[`app-data-table`]],contentQueries:function(e,a,d){e&1&&tg(d,a.cells,x,4)(d,a.groupHeader,h,5),e&2&&zE(2)},inputs:{columns:[1,`columns`],rows:[1,`rows`],trackKey:[1,`trackKey`],selectable:[1,`selectable`],emptyMessage:[1,`emptyMessage`],selected:[1,`selected`],groups:[1,`groups`]},outputs:{selected:`selectedChange`},decls:14,vars:3,consts:[[1,`w-full`,`table-fixed`,`border-collapse`,`text-[13px]`],[1,`w-10`],[3,`width`],[1,`border-b`,`border-ink-700`,`text-left`,`text-ink-400`],[1,`px-3`,`py-2`],[`scope`,`col`,1,`truncate`,`px-3`,`py-2`,`font-medium`,3,`text-right`],[`type`,`checkbox`,1,`mx-focus`,`accent-accent`,3,`change`,`checked`,`indeterminate`],[`scope`,`col`,1,`truncate`,`px-3`,`py-2`,`font-medium`],[1,`border-b`,`border-ink-800`,`bg-ink-850`],[1,`border-b`,`border-ink-800`,`transition-colors`,`hover:bg-ink-850`],[1,`px-3`,`py-1.5`],[3,`ngTemplateOutlet`,`ngTemplateOutletContext`],[1,`px-3`,`py-1.5`,3,`text-right`],[`type`,`checkbox`,1,`mx-focus`,`accent-accent`,3,`change`,`checked`],[1,`px-3`,`py-10`,`text-center`,`text-ink-400`]],template:function(e,a){e&1&&(Oi(0,`table`,0)(1,`colgroup`),SE(2,W,1,0,`col`,1),kc(3,X,1,2,`col`,2,_),Nc(),Oi(5,`thead`)(6,`tr`,3),SE(7,Y,2,3,`th`,4),kc(8,Z,2,3,`th`,5,_),Nc()(),Oi(10,`tbody`),kc(11,ie,3,1,null,null,_),SE(13,le,3,2,`tr`),Nc()()),e&2&&(ec(2),kE(a.selectable()?2:-1),ec(),Tc(a.columns()),ec(4),kE(a.selectable()?7:-1),ec(),Tc(a.columns()),ec(3),Tc(a.blocks()),ec(2),kE(a.isEmpty()?13:-1))},dependencies:[Ie],encapsulation:2})}});export{z as i,oe as n,x as r,h as t};
1
+ import{$n as sS,A as HE,An as kk,B as Kr,Bn as oS,D as Gm,Dn as kE,Et as UE,Fn as mj,H as Ld,Pt as Wm,R as Jm,Sn as hj,Tn as jc,ar as tg,c as Ar,cn as f,er as sg,et as Od,f as C,fn as fk,ft as RI,hr as wc,ht as Sc,mt as SE,o as Ac,q as Nc,qt as ag,rt as Ot,sn as ec,t as $E,tt as Oi,u as Br,ur as vj,ut as Qm,xt as Tc}from"./chunk-CpIMiI_l.js";import{i as Ie,o as Ne}from"./chunk-DS3iAefP.js";function U(t,n){return this.trackKey()(n)}function W(t,n){t&1&&Gm(0,`col`,1)}function X(t,n){if(t&1&&Gm(0,`col`),t&2){let e=n.$implicit;sg(`width`,e.width??null)}}function Y(t,n){if(t&1){let e=$E();Oi(0,`th`,4)(1,`input`,6),Jm(`change`,function(){Ld(e);return Od(HE().toggleAll())}),Nc()()}if(t&2){let e=HE();ec(),Wm(`checked`,e.allSelected())(`indeterminate`,e.someSelected()),Br(`aria-label`,e.allSelected()?e.t().clearSelection:e.t().selectAll)}}function Z(t,n){if(t&1&&(Oi(0,`th`,7),fk(1),Nc()),t&2){let e=n.$implicit;ag(`text-right`,e.align===`right`),ec(),Ac(` `,e.label,` `)}}function ee(t,n){if(t&1&&(Oi(0,`tr`,8)(1,`td`,10),Qm(2,11),Nc()()),t&2){let e=HE().$implicit,a=HE();ec(),Br(`colspan`,a.columnCount()),ec(),Wm(`ngTemplateOutlet`,a.groupHeader().template)(`ngTemplateOutletContext`,kk(3,I,e))}}function te(t,n){if(t&1){let e=$E();Oi(0,`td`,10)(1,`input`,13),Jm(`change`,function(){Ld(e);let d=HE().$implicit,$=HE(2);return Od($.toggleOne($.trackKey()(d)))}),Nc()()}if(t&2){let e=HE().$implicit,a=HE(2);ec(),Wm(`checked`,a.selected().has(a.trackKey()(e))),Br(`aria-label`,a.t().select(a.trackKey()(e)))}}function ne(t,n){if(t&1&&(Oi(0,`td`,10),Qm(1,11),Nc()),t&2){let e=n.$implicit,a=HE().$implicit,d=HE(2);ag(`text-right`,e.align===`right`),ec(),Wm(`ngTemplateOutlet`,d.cellFor(e.key))(`ngTemplateOutletContext`,kk(4,I,a))}}function ae(t,n){if(t&1&&(Oi(0,`tr`,9),kE(1,te,2,2,`td`,10),Sc(2,ne,2,6,`td`,12,_),Nc()),t&2){let e=HE(2);ec(),SE(e.selectable()?1:-1),ec(),Tc(e.columns())}}function ie(t,n){if(t&1&&(kE(0,ee,3,5,`tr`,8),Sc(1,ae,4,1,`tr`,9,U,!0)),t&2){let e=n.$implicit;SE(HE().showHeaders()?0:-1),ec(),Tc(e.rows)}}function le(t,n){if(t&1&&(Oi(0,`tr`)(1,`td`,14),fk(2),Nc()()),t&2){let e=HE();ec(),Br(`colspan`,e.columnCount()),ec(),Ac(` `,e.emptyMessage()??e.t().empty,` `)}}var I;var _;var x;var h;var z;var oe=f(()=>{Ne();Kr();sS();Kr();I=t=>({$implicit:t}),_=(t,n)=>n.key;x=class t{appCell=jc.required();template=C(Ar);static ɵfac=function(e){return new(e||t)};static ɵdir=RI({type:t,selectors:[[`ng-template`,`appCell`,``]],inputs:{appCell:[1,`appCell`]}})},h=class t{template=C(Ar);static ɵfac=function(e){return new(e||t)};static ɵdir=RI({type:t,selectors:[[`ng-template`,`appGroupHeader`,``]]})},z=class t{columns=jc.required();rows=jc.required();trackKey=jc.required();selectable=jc(!0);emptyMessage=jc(null);selected=mj(new Set);groups=jc(null);cells=vj(x);groupHeader=hj(h);t=Ot(()=>oS().shell.dataTable);blocks=Ot(()=>this.groups()??[{key:``,rows:this.rows()}]);showHeaders=Ot(()=>this.groups()!==null&&this.groupHeader()!==void 0);isEmpty=Ot(()=>this.blocks().length===0||!this.showHeaders()&&this.rows().length===0);cellsByKey=Ot(()=>new Map(this.cells().map(n=>[n.appCell(),n.template])));columnCount=Ot(()=>this.columns().length+(this.selectable()?1:0));allSelected=Ot(()=>this.rows().length>0&&this.selected().size===this.rows().length);someSelected=Ot(()=>this.selected().size>0&&!this.allSelected());cellFor(n){return this.cellsByKey().get(n)??null}toggleAll(){this.selected.set(this.allSelected()?new Set:new Set(this.rows().map(n=>this.trackKey()(n))))}toggleOne(n){let e=new Set(this.selected());e.delete(n)||e.add(n),this.selected.set(e)}static ɵfac=function(e){return new(e||t)};static ɵcmp=wc({type:t,selectors:[[`app-data-table`]],contentQueries:function(e,a,d){e&1&&tg(d,a.cells,x,4)(d,a.groupHeader,h,5),e&2&&UE(2)},inputs:{columns:[1,`columns`],rows:[1,`rows`],trackKey:[1,`trackKey`],selectable:[1,`selectable`],emptyMessage:[1,`emptyMessage`],selected:[1,`selected`],groups:[1,`groups`]},outputs:{selected:`selectedChange`},decls:14,vars:3,consts:[[1,`w-full`,`table-fixed`,`border-collapse`,`text-[13px]`],[1,`w-10`],[3,`width`],[1,`border-b`,`border-ink-700`,`text-left`,`text-ink-400`],[1,`px-3`,`py-2`],[`scope`,`col`,1,`truncate`,`px-3`,`py-2`,`font-medium`,3,`text-right`],[`type`,`checkbox`,1,`mx-focus`,`accent-accent`,3,`change`,`checked`,`indeterminate`],[`scope`,`col`,1,`truncate`,`px-3`,`py-2`,`font-medium`],[1,`border-b`,`border-ink-800`,`bg-ink-850`],[1,`border-b`,`border-ink-800`,`transition-colors`,`hover:bg-ink-850`],[1,`px-3`,`py-1.5`],[3,`ngTemplateOutlet`,`ngTemplateOutletContext`],[1,`px-3`,`py-1.5`,3,`text-right`],[`type`,`checkbox`,1,`mx-focus`,`accent-accent`,3,`change`,`checked`],[1,`px-3`,`py-10`,`text-center`,`text-ink-400`]],template:function(e,a){e&1&&(Oi(0,`table`,0)(1,`colgroup`),kE(2,W,1,0,`col`,1),Sc(3,X,1,2,`col`,2,_),Nc(),Oi(5,`thead`)(6,`tr`,3),kE(7,Y,2,3,`th`,4),Sc(8,Z,2,3,`th`,5,_),Nc()(),Oi(10,`tbody`),Sc(11,ie,3,1,null,null,_),kE(13,le,3,2,`tr`),Nc()()),e&2&&(ec(2),SE(a.selectable()?2:-1),ec(),Tc(a.columns()),ec(4),SE(a.selectable()?7:-1),ec(),Tc(a.columns()),ec(3),Tc(a.blocks()),ec(2),SE(a.isEmpty()?13:-1))},dependencies:[Ie],encapsulation:2})}});export{z as i,oe as n,x as r,h as t};
@@ -1 +1 @@
1
- import{$n as sk,A as HE,B as Kr,Bn as ok,Cr as zE,D as Gm,Dn as kc,En as kE,Fn as nS,Gn as pj,H as Ld,J as Nc,K as My,Pt as Wm,R as Jm,St as Tc,Tn as jc,Zn as rg,cn as f,et as Od,f as C,fr as wD,gn as gj,gr as wt,ht as SE,ln as fS,mr as wc,o as Ac,rn as dk,rt as Ot,sn as ec,st as Pr,t as $E,tt as Oi,u as Br,y as Dj}from"./chunk-BdOOWVGY.js";function $(i,e){i&1&&Gm(0,`li`,6)}function j(i,e){if(i&1){let t=$E();SE(0,$,1,0,`li`,6),Oi(1,`li`,7)(2,`button`,8),Jm(`click`,function(){let o=Ld(t).$implicit;return Od(HE(2).pick(o))})(`keydown`,function(o){Ld(t);return Od(HE(2).onItemKey(o))}),Gm(3,`app-icon`,9),fS(4),Nc()()}if(i&2){let t=e.$implicit,n=HE(2);kE(t.separated?0:-1),ec(),Br(`title`,t.hint??null),ec(),nS(t.danger?n.dangerClass:n.normalClass),Wm(`disabled`,t.disabled===!0),Br(`data-testid`,`menu-`+t.id),ec(),Wm(`name`,t.icon)(`size`,14),ec(),Ac(` `,t.label,` `)}}function P(i,e){if(i&1&&(Oi(0,`ul`,5),kc(1,j,5,9,null,null,U),Nc()),i&2){let t=HE();nS(t.upward()?`bottom-full mb-1.5`:`top-full mt-1.5`),Br(`aria-label`,t.shownLabel()),ec(),Tc(t.items())}}var Q;var U;var V;var G=f(()=>{Kr();sk();dk();Kr();Q=[`trigger`],U=(i,e)=>e.id;V=class i{items=jc.required();label=jc(null);compact=jc(!1,{transform:Dj});picked=pj();shownLabel=Ot(()=>this.label()??ok().shell.actionMenu.label);host=C(Pr);trigger=gj(`trigger`);open=wt(!1);upward=wt(!1);compactTriggerClass=`mx-focus cursor-pointer rounded p-1 text-ink-400 transition-colors hover:bg-ink-800 hover:text-ink-100`;normalClass=`text-ink-200 hover:bg-ink-750 hover:text-ink-100 focus-visible:bg-ink-750 focus-visible:text-ink-100`;dangerClass=`text-danger hover:bg-danger/15 focus-visible:bg-danger/15`;toggle(){let e=!this.open();e&&this.placeMenu(),this.open.set(e),e&&setTimeout(()=>this.focusItem(0))}onOutside(e){this.open()&&!this.host.nativeElement.contains(e.target)&&this.open.set(!1)}onTriggerKey(e){e.key!==`ArrowDown`&&e.key!==`ArrowUp`||(e.preventDefault(),this.placeMenu(),this.open.set(!0),setTimeout(()=>this.focusItem(e.key===`ArrowUp`?-1:0)))}onItemKey(e){if(e.key===`Escape`||e.key===`Tab`){e.key===`Escape`&&e.preventDefault(),this.close();return}if(e.key!==`ArrowDown`&&e.key!==`ArrowUp`)return;e.preventDefault();let n=this.enabledItems().indexOf(document.activeElement);this.focusItem(n===-1?0:n+(e.key===`ArrowDown`?1:-1))}pick(e){this.close(),this.picked.emit(e.id)}placeMenu(){let e=this.trigger()?.nativeElement;if(e===void 0)return;let t=e.getBoundingClientRect(),n=this.items().length*32+24,o=window.innerHeight-t.bottom;this.upward.set(o<n&&t.top>o)}close(){this.open.set(!1),this.trigger()?.nativeElement.focus()}enabledItems(){return[...this.host.nativeElement.querySelectorAll(`[role="menuitem"]:not(:disabled)`)]}focusItem(e){let t=this.enabledItems();t.length!==0&&t[(e+t.length)%t.length].focus()}static ɵfac=function(t){return new(t||i)};static ɵcmp=wc({type:i,selectors:[[`app-action-menu`]],viewQuery:function(t,n){t&1&&rg(n.trigger,Q,5),t&2&&zE()},hostBindings:function(t,n){t&1&&Jm(`pointerdown`,function(a){return n.onOutside(a)},wD)},inputs:{items:[1,`items`],label:[1,`label`],compact:[1,`compact`]},outputs:{picked:`picked`},decls:5,vars:7,consts:[[`trigger`,``],[1,`relative`],[`type`,`button`,`aria-haspopup`,`menu`,`data-testid`,`action-menu`,3,`click`,`keydown`,`title`],[`name`,`menu`,3,`size`],[`role`,`menu`,1,`absolute`,`right-0`,`z-50`,`w-56`,`rounded-md`,`border`,`border-ink-700`,`bg-panel`,`py-1`,`shadow-2xl`,3,`class`],[`role`,`menu`,1,`absolute`,`right-0`,`z-50`,`w-56`,`rounded-md`,`border`,`border-ink-700`,`bg-panel`,`py-1`,`shadow-2xl`],[`role`,`separator`,1,`my-1`,`border-t`,`border-ink-700`],[`role`,`none`],[`type`,`button`,`role`,`menuitem`,1,`mx-focus`,`flex`,`w-full`,`cursor-pointer`,`items-center`,`gap-2`,`px-3`,`py-1.5`,`text-left`,`text-[13px]`,`transition-colors`,`focus-visible:outline-none`,`disabled:cursor-not-allowed`,`disabled:opacity-40`,`disabled:hover:bg-transparent`,3,`click`,`keydown`,`disabled`],[3,`name`,`size`]],template:function(t,n){t&1&&(Oi(0,`div`,1)(1,`button`,2,0),Jm(`click`,function(){return n.toggle()})(`keydown`,function(a){return n.onTriggerKey(a)}),Gm(3,`app-icon`,3),Nc(),SE(4,P,3,3,`ul`,4),Nc()),t&2&&(ec(),nS(n.compact()?n.compactTriggerClass:`mx-btn mx-focus`),Wm(`title`,n.shownLabel()),Br(`aria-expanded`,n.open())(`aria-label`,n.shownLabel()),ec(2),Wm(`size`,n.compact()?15:16),ec(),kE(n.open()?4:-1))},dependencies:[My],encapsulation:2})}});export{V as n,G as t};
1
+ import{$n as sS,A as HE,B as Kr,Bn as oS,D as Gm,Dn as kE,Et as UE,H as Ld,K as My,Kn as pj,Pt as Wm,Qn as rg,R as Jm,Rn as nk,Tn as jc,_r as wt,cn as f,et as Od,f as C,fn as fk,gn as gj,hr as wc,ht as Sc,mt as SE,o as Ac,pr as wD,q as Nc,rn as dS,rt as Ot,sn as ec,st as Pr,t as $E,tt as Oi,u as Br,xt as Tc,y as Dj}from"./chunk-CpIMiI_l.js";function $(i,e){i&1&&Gm(0,`li`,6)}function j(i,e){if(i&1){let t=$E();kE(0,$,1,0,`li`,6),Oi(1,`li`,7)(2,`button`,8),Jm(`click`,function(){let o=Ld(t).$implicit;return Od(HE(2).pick(o))})(`keydown`,function(o){Ld(t);return Od(HE(2).onItemKey(o))}),Gm(3,`app-icon`,9),fk(4),Nc()()}if(i&2){let t=e.$implicit,n=HE(2);SE(t.separated?0:-1),ec(),Br(`title`,t.hint??null),ec(),nk(t.danger?n.dangerClass:n.normalClass),Wm(`disabled`,t.disabled===!0),Br(`data-testid`,`menu-`+t.id),ec(),Wm(`name`,t.icon)(`size`,14),ec(),Ac(` `,t.label,` `)}}function P(i,e){if(i&1&&(Oi(0,`ul`,5),Sc(1,j,5,9,null,null,U),Nc()),i&2){let t=HE();nk(t.upward()?`bottom-full mb-1.5`:`top-full mt-1.5`),Br(`aria-label`,t.shownLabel()),ec(),Tc(t.items())}}var Q;var U;var V;var G=f(()=>{Kr();sS();dS();Kr();Q=[`trigger`],U=(i,e)=>e.id;V=class i{items=jc.required();label=jc(null);compact=jc(!1,{transform:Dj});picked=pj();shownLabel=Ot(()=>this.label()??oS().shell.actionMenu.label);host=C(Pr);trigger=gj(`trigger`);open=wt(!1);upward=wt(!1);compactTriggerClass=`mx-focus cursor-pointer rounded p-1 text-ink-400 transition-colors hover:bg-ink-800 hover:text-ink-100`;normalClass=`text-ink-200 hover:bg-ink-750 hover:text-ink-100 focus-visible:bg-ink-750 focus-visible:text-ink-100`;dangerClass=`text-danger hover:bg-danger/15 focus-visible:bg-danger/15`;toggle(){let e=!this.open();e&&this.placeMenu(),this.open.set(e),e&&setTimeout(()=>this.focusItem(0))}onOutside(e){this.open()&&!this.host.nativeElement.contains(e.target)&&this.open.set(!1)}onTriggerKey(e){e.key!==`ArrowDown`&&e.key!==`ArrowUp`||(e.preventDefault(),this.placeMenu(),this.open.set(!0),setTimeout(()=>this.focusItem(e.key===`ArrowUp`?-1:0)))}onItemKey(e){if(e.key===`Escape`||e.key===`Tab`){e.key===`Escape`&&e.preventDefault(),this.close();return}if(e.key!==`ArrowDown`&&e.key!==`ArrowUp`)return;e.preventDefault();let n=this.enabledItems().indexOf(document.activeElement);this.focusItem(n===-1?0:n+(e.key===`ArrowDown`?1:-1))}pick(e){this.close(),this.picked.emit(e.id)}placeMenu(){let e=this.trigger()?.nativeElement;if(e===void 0)return;let t=e.getBoundingClientRect(),n=this.items().length*32+24,o=window.innerHeight-t.bottom;this.upward.set(o<n&&t.top>o)}close(){this.open.set(!1),this.trigger()?.nativeElement.focus()}enabledItems(){return[...this.host.nativeElement.querySelectorAll(`[role="menuitem"]:not(:disabled)`)]}focusItem(e){let t=this.enabledItems();t.length!==0&&t[(e+t.length)%t.length].focus()}static ɵfac=function(t){return new(t||i)};static ɵcmp=wc({type:i,selectors:[[`app-action-menu`]],viewQuery:function(t,n){t&1&&rg(n.trigger,Q,5),t&2&&UE()},hostBindings:function(t,n){t&1&&Jm(`pointerdown`,function(a){return n.onOutside(a)},wD)},inputs:{items:[1,`items`],label:[1,`label`],compact:[1,`compact`]},outputs:{picked:`picked`},decls:5,vars:7,consts:[[`trigger`,``],[1,`relative`],[`type`,`button`,`aria-haspopup`,`menu`,`data-testid`,`action-menu`,3,`click`,`keydown`,`title`],[`name`,`menu`,3,`size`],[`role`,`menu`,1,`absolute`,`right-0`,`z-50`,`w-56`,`rounded-md`,`border`,`border-ink-700`,`bg-panel`,`py-1`,`shadow-2xl`,3,`class`],[`role`,`menu`,1,`absolute`,`right-0`,`z-50`,`w-56`,`rounded-md`,`border`,`border-ink-700`,`bg-panel`,`py-1`,`shadow-2xl`],[`role`,`separator`,1,`my-1`,`border-t`,`border-ink-700`],[`role`,`none`],[`type`,`button`,`role`,`menuitem`,1,`mx-focus`,`flex`,`w-full`,`cursor-pointer`,`items-center`,`gap-2`,`px-3`,`py-1.5`,`text-left`,`text-[13px]`,`transition-colors`,`focus-visible:outline-none`,`disabled:cursor-not-allowed`,`disabled:opacity-40`,`disabled:hover:bg-transparent`,3,`click`,`keydown`,`disabled`],[3,`name`,`size`]],template:function(t,n){t&1&&(Oi(0,`div`,1)(1,`button`,2,0),Jm(`click`,function(){return n.toggle()})(`keydown`,function(a){return n.onTriggerKey(a)}),Gm(3,`app-icon`,3),Nc(),kE(4,P,3,3,`ul`,4),Nc()),t&2&&(ec(),nk(n.compact()?n.compactTriggerClass:`mx-btn mx-focus`),Wm(`title`,n.shownLabel()),Br(`aria-expanded`,n.open())(`aria-label`,n.shownLabel()),ec(2),Wm(`size`,n.compact()?15:16),ec(),SE(n.open()?4:-1))},dependencies:[My],encapsulation:2})}});export{V as n,G as t};