docker-client-mx 1.40.0 → 1.41.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.
- package/dist/docker-desktop-mx/browser/{chunk-CZNcOfBu2.js → chunk--cESao082.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-DKNRYU3y.js → chunk-3ILJfWKv.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-BfC3KqGQ.js → chunk-6D7_x-nR.js} +1 -1
- package/dist/docker-desktop-mx/browser/chunk-B4eF6Vif2.js +1 -0
- package/dist/docker-desktop-mx/browser/{chunk-8P32TlCt.js → chunk-B8Y30jEA.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-Bw7Mtap6.js → chunk-BFURpTzq.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-D4dQfTTc.js → chunk-BGRmfw3c.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-D0pCyzqb.js → chunk-BSE5rhLU.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-5jLUVNg7.js → chunk-BV3brnpk.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-Ch8nHKqR.js → chunk-BX2-Fi-r.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-CiOk-qoT.js → chunk-B_tQwhwm.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-DdFeg3-c.js → chunk-BjgRfCzM2.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-Ds9stAVj.js → chunk-Bz7JmGk-.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-BH9xkVLp.js → chunk-C3aJtPX1.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-fqYbS3e-.js → chunk-CKpDvmRb.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-Doow6WqE.js → chunk-CMjDdCPI.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-CP90rR4k.js → chunk-CRyY-2KM.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-DGtAiSbg.js → chunk-CTthjUi7.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-lLCuDcp6.js → chunk-Cg-fuusV.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-CmtjDUsV.js → chunk-CkcnVcC4.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-BEAPEQBM.js → chunk-Ckdb4U3d.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-Bn40KMmY.js → chunk-CxAIbp2c.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-CHFuuSv8.js → chunk-DCF2sSJN.js} +1 -1
- package/dist/docker-desktop-mx/browser/chunk-DCp2SePu.js +1 -0
- package/dist/docker-desktop-mx/browser/{chunk-CC7DUrLR.js → chunk-DEE8TVR7.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-DLh60Eif.js → chunk-DFixEhGx.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-Di8ZOBwa.js → chunk-DHIpfbHl.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-Dz9ZDzia.js → chunk-DIB1txLC2.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-CpVmilfG.js → chunk-DSQAF8Vk.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-BMXieIjc.js → chunk-DWmHPcio.js} +1 -1
- package/dist/docker-desktop-mx/browser/chunk-DhuhbUD7.js +3 -0
- package/dist/docker-desktop-mx/browser/{chunk-wVwXBw1N.js → chunk-DiZLvyn5.js} +1 -1
- package/dist/docker-desktop-mx/browser/chunk-JmNJabM7.js +4 -0
- package/dist/docker-desktop-mx/browser/{chunk-7fAa0H9l2.js → chunk-PR65vdNg.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-DBPVGjlB.js → chunk-ZkkhKXw6.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-CC_wIdx2.js → chunk-eMZWdejE.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-CzrtYwlw.js → chunk-kvK2KAGk.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-CaYY-6hH.js → chunk-v1AXLZwF.js} +1 -1
- package/dist/docker-desktop-mx/browser/chunk-x5sA4n99.js +1 -0
- package/dist/docker-desktop-mx/browser/{chunk-MpnWAfxv.js → chunk-xhdtv1sC.js} +1 -1
- package/dist/docker-desktop-mx/browser/index.html +2 -2
- package/dist/docker-desktop-mx/browser/{main-HUWYR6IC.js → main-2LC7MYJJ.js} +1 -1
- package/dist/docker-desktop-mx/browser/{styles-D7Y5N7JX.css → styles-FKMNLG2K.css} +1 -1
- package/dist-electron/auto-prune.js +76 -0
- package/dist-electron/auto-prune.js.map +1 -0
- package/dist-electron/channels.js +3 -0
- package/dist-electron/channels.js.map +1 -1
- package/dist-electron/environment.js +52 -0
- package/dist-electron/environment.js.map +1 -0
- package/dist-electron/ipc.js +6 -0
- package/dist-electron/ipc.js.map +1 -1
- package/dist-electron/main.js +34 -0
- package/dist-electron/main.js.map +1 -1
- package/dist-electron/preload.js +7 -1
- package/dist-electron/preload.js.map +1 -1
- package/dist-electron/redact.js +9 -0
- package/dist-electron/redact.js.map +1 -1
- package/dist-electron/settings.js +22 -0
- package/dist-electron/settings.js.map +1 -1
- package/dist-electron/volume-backup.js +16 -3
- package/dist-electron/volume-backup.js.map +1 -1
- package/dist-electron/volume-copy.js +145 -0
- package/dist-electron/volume-copy.js.map +1 -0
- package/package.json +1 -1
- package/dist/docker-desktop-mx/browser/chunk-DAgdneMS.js +0 -1
- package/dist/docker-desktop-mx/browser/chunk-DEsPgcXV.js +0 -4
- package/dist/docker-desktop-mx/browser/chunk-DFhjd8-d2.js +0 -1
- package/dist/docker-desktop-mx/browser/chunk-Dq9pgyA42.js +0 -2
- package/dist/docker-desktop-mx/browser/chunk-nped2UPz.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{$n as sk,$t as bg,Bn as ok,Ct as Tg,D as HE,Dn as kc,En as kE,F as Jm,Fn as nS,Ft as Wr,G as Nc,Gn as pj,Gt as _m,I as Km,Kn as qr,L as Kr,Nn as mg,Nt as W,Pn as mj,Pt as Wm,Q as Oi,St as Tc,Tn as jc,U as My,Wn as pg,Xn as rf,Xt as bS,Z as Od,_t as Sc,br as yS,cn as f,cr as ve,et as Ot$1,gr as wt$1,gt as SS,ht as SE,jn as lk,l as C,ln as fS,lr as vg,lt as RE,mr as wc,on as eH,or as vS,qt as ag,r as Ac,rn as dk,s as Br,sn as ec,w as Gm,x as G,xn as hg,z as Ld}from"./chunk-
|
|
1
|
+
import{$n as sk,$t as bg,Bn as ok,Ct as Tg,D as HE,Dn as kc,En as kE,F as Jm,Fn as nS,Ft as Wr,G as Nc,Gn as pj,Gt as _m,I as Km,Kn as qr,L as Kr,Nn as mg,Nt as W,Pn as mj,Pt as Wm,Q as Oi,St as Tc,Tn as jc,U as My,Wn as pg,Xn as rf,Xt as bS,Z as Od,_t as Sc,br as yS,cn as f,cr as ve,et as Ot$1,gr as wt$1,gt as SS,ht as SE,jn as lk,l as C,ln as fS,lr as vg,lt as RE,mr as wc,on as eH,or as vS,qt as ag,r as Ac,rn as dk,s as Br,sn as ec,w as Gm,x as G,xn as hg,z as Ld}from"./chunk-JmNJabM7.js";import{n as y,t as f$1}from"./chunk-Ckdb4U3d.js";import"./chunk-xhdtv1sC.js";import{n as y$1,t as c}from"./chunk-DHIpfbHl.js";import"./chunk-Bz7JmGk-.js";import{n as o,t as i}from"./chunk-CxAIbp2c.js";import"./chunk-DCF2sSJN.js";import"./chunk-BFURpTzq.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-6D7_x-nR.js";import{n as v,t as u}from"./chunk-BGRmfw3c.js";import{n as x,t as u$1}from"./chunk-CMjDdCPI.js";import{a as Yt,r as Q,s as fe,u as ra}from"./chunk-v1AXLZwF.js";import{n as u$2,t as c$1}from"./chunk-3ILJfWKv.js";import{n as V,t as G$1}from"./chunk-CkcnVcC4.js";import{n as W$1,t as J}from"./chunk-CTthjUi7.js";function Ke(n,t){if(n&1){let e=RE();Oi(0,`button`,18),Jm(`click`,function(){let o=Ld(e).$implicit;return Od(HE(2).view.set(o))}),fS(1),Nc()}if(n&2){let e=t.$implicit,i=HE(2);ag(`border-accent`,i.view()===e)(`text-accent`,i.view()===e),Br(`data-testid`,`compose-view-`+e)(`aria-pressed`,i.view()===e),ec(),Ac(` `,e===`raw`?i.t().raw:i.t().resolved,` `)}}function Qe(n,t){n&1&&(Oi(0,`pre`,9),fS(1),Nc()),n&2&&(ec(),pg(t))}function Je(n,t){n&1&&(Oi(0,`p`,10),fS(1),Nc()),n&2&&(ec(),pg(t))}function Xe(n,t){if(n&1&&(Oi(0,`p`,11),fS(1),Nc()),n&2){let e=HE(2);ec(),pg(e.t().loading)}}function Ye(n,t){n&1&&(Oi(0,`span`,13),fS(1),Nc()),n&2&&(ec(),pg(t))}function Ze(n,t){if(n&1){let e=RE();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,`div`,7),kc(8,Ke,2,7,`button`,8,Sc),Nc(),SE(10,Qe,2,1,`pre`,9)(11,Je,2,1,`p`,10)(12,Xe,2,1,`p`,11),Oi(13,`div`,12),SE(14,Ye,2,1,`span`,13),Oi(15,`button`,14),Gm(16,`app-icon`,15),fS(17),Nc(),Oi(18,`button`,16),Jm(`click`,function(){Ld(e);return Od(HE().copy())}),Gm(19,`app-icon`,17),fS(20),Nc()()()()}if(n&2){let e,i,o=HE();ec(4),pg(o.t().title(o.project())),ec(2),Ac(` `,o.view()===`raw`?o.t().rawHint:o.t().resolvedHint,` `),ec(2),Tc(o.views),ec(2),kE((e=o.body())?10:(e=o.problem())?11:12,e),ec(4),kE((i=o.copyProblem())?14:-1,i),ec(2),Wm(`size`,14),ec(),Ac(` `,o.common().close,` `),ec(),Wm(`disabled`,o.body()===null),ec(),Wm(`name`,o.copied()?`check`:`copy`)(`size`,14),ec(),Ac(` `,o.copied()?o.common().copied:o.common().copy,` `)}}var se;var Ne=f(()=>{Kr();Je$1();lk();dk();sk();Kr();se=class n{open=mj(!1);project=jc.required();t=Ot$1(()=>ok().compose.file);common=Ot$1(()=>ok().common);views=[`raw`,`resolved`];view=wt$1(`raw`);files=wt$1(null);config=wt$1(null);copied=wt$1(!1);copyProblem=wt$1(null);constructor(){rf(()=>{if(!this.open())return;let t=this.project();Tg(()=>{this.load(t)})})}body(){if(this.view()===`resolved`){let e=this.config();return e?.ok===!0?e.yaml:null}let t=this.files();return t?.ok!==!0?null:t.files.map(e=>`# ${e.path}
|
|
2
2
|
${e.problem??(e.content.trim()===``?this.t().empty:e.content)}`).join(`
|
|
3
3
|
|
|
4
4
|
`)}problem(){let t=this.view()===`resolved`?this.config():this.files();return t?.ok===!1?t.problem:null}async copy(){let t=this.body();if(t!==null)try{await navigator.clipboard.writeText(t),this.copyProblem.set(null),this.copied.set(!0),setTimeout(()=>this.copied.set(!1),1500)}catch(e){this.copyProblem.set(this.t().copyFailed(eH(e)))}}async load(t){this.files.set(null),this.config.set(null),this.copied.set(!1),this.copyProblem.set(null),this.view.set(`raw`);let[e,i]=await Promise.all([window.electron.compose.files(t).catch(o=>({ok:!1,problem:eH(o)})),window.electron.compose.config(t).catch(o=>({ok:!1,problem:eH(o)}))]);this.files.set(e),this.config.set(i)}static ɵfac=function(e){return new(e||n)};static ɵcmp=wc({type:n,selectors:[[`app-compose-file-dialog`]],inputs:{open:[1,`open`],project:[1,`project`]},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`,`compose-file-dialog`,1,`flex`,`max-h-[85vh]`,`w-full`,`max-w-4xl`,`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-3`,`flex`,`shrink-0`,`gap-1`],[`type`,`button`,1,`mx-btn`,`mx-focus`,3,`border-accent`,`text-accent`],[`data-testid`,`compose-file-text`,1,`mt-3`,`min-h-0`,`flex-1`,`overflow-auto`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-900`,`p-3`,`font-mono`,`text-[12px]`,`leading-relaxed`,`whitespace-pre`,`text-ink-200`],[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`,`items-center`,`justify-end`,`gap-2`],[1,`mr-auto`,`text-[12px]`,`text-danger`],[`type`,`button`,`rdxDialogClose`,``,1,`mx-btn`,`mx-focus`],[`name`,`close`,3,`size`],[`type`,`button`,`data-testid`,`compose-file-copy`,1,`mx-btn`,`mx-focus`,3,`click`,`disabled`],[3,`name`,`size`],[`type`,`button`,1,`mx-btn`,`mx-focus`,3,`click`]],template:function(e,i){e&1&&(Oi(0,`div`,0),vg(`openChange`,function(s){return vS(i.open,s)||(i.open=s),s}),_m(1,Ze,21,10,`ng-template`,1),Nc()),e&2&&hg(`open`,i.open)},dependencies:[ie,ln,an,pn,cn,fn,dn,un,My],encapsulation:2})}});function et(n,t){if(n&1&&(qr(0,`p`,1),fS(1),Wr()),n&2){let e=HE();ec(),pg(e.t().done(e.service()))}}function tt(n,t){if(n&1&&(qr(0,`p`,2),fS(1),Wr()),n&2){let e=HE();ec(),pg(e.problem())}}function nt(n,t){if(n&1&&(qr(0,`details`,3)(1,`summary`,4),fS(2),Wr(),qr(3,`pre`,5),fS(4),Wr()()),n&2){let e=HE();Km(`open`,!e.result().ok),ec(2),pg(e.t().output),ec(2),pg(e.result().output)}}function it(n,t){if(n&1&&Gm(0,`app-build-output`,2),n&2)Wm(`service`,HE().service())(`result`,t)}var A;var L;var ge=f(()=>{Kr();lk();sk();dk();Kr();A=class n{service=jc.required();result=jc.required();t=Ot$1(()=>ok().compose.build);problem(){let t=this.result();return t.ok?``:t.problem}static ɵfac=function(e){return new(e||n)};static ɵcmp=wc({type:n,selectors:[[`app-build-output`]],hostAttrs:[1,`block`],inputs:{service:[1,`service`],result:[1,`result`]},decls:4,vars:3,consts:[[1,`text-[12px]`],[1,`text-ok`],[1,`whitespace-pre-line`,`text-danger`],[1,`mt-1`,3,`open`],[1,`cursor-pointer`,`text-ink-400`,`hover:text-ink-200`],[1,`mt-1`,`max-h-64`,`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`]],template:function(e,i){e&1&&(qr(0,`div`,0),SE(1,et,2,1,`p`,1)(2,tt,2,1,`p`,2),SE(3,nt,5,3,`details`,3),Wr()),e&2&&(Br(`data-testid`,`service-build-result-`+i.service()),ec(),kE(i.result().ok?1:2),ec(2),kE(i.result().output!==``?3:-1))},encapsulation:2})},L=class n{project=jc.required();service=jc.required();disabled=jc(!1);showResult=jc(!0);finished=pj();t=Ot$1(()=>ok().compose.build);busy=wt$1(!1);result=wt$1(null);async build(){this.busy.set(!0),this.result.set(null);let t;try{t=await window.electron.compose.rebuild(this.project(),this.service())}catch(e){t={ok:!1,problem:eH(e),output:``}}this.result.set(t),this.busy.set(!1),this.finished.emit(t)}static ɵfac=function(e){return new(e||n)};static ɵcmp=wc({type:n,selectors:[[`app-service-build`]],hostAttrs:[1,`block`],inputs:{project:[1,`project`],service:[1,`service`],disabled:[1,`disabled`],showResult:[1,`showResult`]},outputs:{finished:`finished`},decls:4,vars:7,consts:[[`type`,`button`,1,`mx-btn`,`mx-focus`,3,`click`,`disabled`,`title`],[`name`,`refresh`,3,`size`],[1,`mt-2`,3,`service`,`result`]],template:function(e,i){if(e&1&&(Oi(0,`button`,0),Jm(`click`,function(){return i.build()}),Gm(1,`app-icon`,1),fS(2),Nc(),SE(3,it,1,2,`app-build-output`,2)),e&2){let o;Wm(`disabled`,i.busy()||i.disabled())(`title`,i.t().title),Br(`aria-label`,i.t().aria(i.service()))(`data-testid`,`service-build-`+i.service()),ec(),Wm(`size`,14),ec(),Ac(` `,i.busy()?i.t().busy:i.t().button,` `),ec(),kE((o=i.showResult()&&i.result())?3:-1,o)}},dependencies:[My,A],encapsulation:2})}});function rt(n,t){if(n&1&&(Oi(0,`p`,7),fS(1),Nc()),n&2){let e=HE(2);ec(),pg(e.t().loading)}}function lt(n,t){if(n&1&&(Oi(0,`li`,14),Gm(1,`app-icon`,16),Oi(2,`span`,17),fS(3),Nc(),Oi(4,`span`,18),fS(5),Nc(),Oi(6,`span`,19),fS(7),Nc()()),n&2){let e=t.$implicit,i=HE(3);ec(),nS(i.iconClass(e)),Wm(`name`,i.iconOf(e))(`size`,13),ec(),Wm(`title`,e.reference),ec(),pg(e.reference),ec(2),pg(e.services.join(`, `)),ec(),nS(e.state===`failed`?`text-danger`:`text-ink-400`),Wm(`title`,e.problem??``),ec(),Ac(` `,i.stateOf(e),` `)}}function dt(n,t){if(n&1&&Gm(0,`app-service-build`,23),n&2){let e=HE().$implicit,i=HE(3);Wm(`project`,i.project())(`service`,e.service)(`disabled`,!i.finished())}}function st(n,t){if(n&1&&(Oi(0,`li`,15)(1,`div`,14),Gm(2,`app-icon`,20),Oi(3,`span`,21),fS(4),Nc(),Oi(5,`span`,22),fS(6),Nc()(),SE(7,dt,1,3,`app-service-build`,23),Nc()),n&2){let e=t.$implicit,i=HE(3);ec(2),Wm(`size`,13),ec(2),pg(e.service),ec(2),pg(e.reason===`build`?i.t().skippedBuild:i.t().skippedDigest),ec(),kE(e.reason===`build`?7:-1)}}function pt(n,t){if(n&1&&(Oi(0,`ul`,8),kc(1,lt,8,11,`li`,14,ot),kc(3,st,8,4,`li`,15,at),Nc()),n&2){let e=HE(2);ec(),Tc(e.rows()),ec(2),Tc(e.skipped())}}function ct(n,t){if(n&1&&(Oi(0,`p`,7),fS(1),Nc()),n&2){let e=HE(2);ec(),pg(e.t().noImages)}}function mt(n,t){n&1&&(Oi(0,`p`,9),fS(1),Nc()),n&2&&(ec(),pg(t))}function ut(n,t){if(n&1&&(Oi(0,`p`,7),fS(1),Nc()),n&2){let e=HE(2);ec(),pg(e.t().checking)}}function _t(n,t){if(n&1&&(Oi(0,`p`,24),Gm(1,`app-icon`,25),fS(2),Nc()),n&2){let e=HE(3);ec(),Wm(`size`,13),ec(),Ac(` `,e.t().upToDate)}}function gt(n,t){if(n&1&&(Oi(0,`p`,28),fS(1),Nc()),n&2){let e=HE(),i=HE(4);ec(),pg(i.t().renewed(e.renewed.join(`, `)))}}function xt(n,t){if(n&1&&(Oi(0,`p`,29),fS(1),Nc()),n&2){let e=HE(),i=HE(4);ec(),pg(i.t().unchanged(e.unchanged.join(`, `)))}}function ft(n,t){if(n&1&&(Oi(0,`p`,30),fS(1),Nc()),n&2){let e=t.$implicit;ec(),pg(e)}}function yt(n,t){if(n&1&&(SE(0,gt,2,1,`p`,28),SE(1,xt,2,1,`p`,29),kc(2,ft,2,1,`p`,30,Sc)),n&2){let e=t;kE(e.renewed.length>0?0:-1),ec(),kE(e.unchanged.length>0?1:-1),ec(),Tc(e.problems)}}function bt(n,t){if(n&1){let e=RE();Oi(0,`div`,27)(1,`button`,31),Jm(`click`,function(){Ld(e);return Od(HE(4).renew())}),Gm(2,`app-icon`,32),fS(3),Nc(),Oi(4,`span`,33),fS(5),Nc()()}if(n&2){let e=HE(4);ec(),Wm(`disabled`,e.phase()===`renewing`),ec(),Wm(`size`,14),ec(),Ac(` `,e.phase()===`renewing`?e.t().renewing:e.t().renew,` `),ec(2),pg(e.t().renewHint)}}function vt(n,t){if(n&1&&(Oi(0,`p`,26),fS(1),Nc(),SE(2,yt,4,2)(3,bt,6,4,`div`,27)),n&2){let e,i=HE(),o=HE(2);ec(),pg(o.t().stale(i.join(`, `))),ec(),kE((e=o.result())?2:3,e)}}function ht(n,t){n&1&&(Oi(0,`div`,10),SE(1,_t,3,2,`p`,24)(2,vt,4,2),Nc()),n&2&&(ec(),kE(t.length===0?1:2))}function Ct(n,t){if(n&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,rt,2,1,`p`,7),SE(8,pt,5,0,`ul`,8)(9,ct,2,1,`p`,7),SE(10,mt,2,1,`p`,9),SE(11,ut,2,1,`p`,7),SE(12,ht,3,1,`div`,10),Oi(13,`div`,11)(14,`button`,12),Gm(15,`app-icon`,13),fS(16),Nc()()()()),n&2){let e,i,o=HE();ec(4),pg(o.t().title(o.project())),ec(2),pg(o.t().description),ec(),kE(o.phase()===`loading`?7:-1),ec(),kE(o.rows().length>0||o.skipped().length>0?8:o.phase()!==`loading`&&o.phase()!==`failed`?9:-1),ec(2),kE((e=o.problem())?10:-1,e),ec(),kE(o.phase()===`checking`?11:-1),ec(),kE((i=o.stale())?12:-1,i),ec(3),Wm(`size`,14),ec(),Ac(` `,o.finished()?o.common().close:o.common().cancel,` `)}}function wt(n){let t=n.layers.reduce((e,i)=>e+i.total,0);return t===0?null:Math.round(n.layers.reduce((e,i)=>e+i.current,0)/t*100)}var ot;var at;var pe;var Be=f(()=>{Kr();Je$1();lk();sk();dk();ge();Kr();ot=(n,t)=>t.reference,at=(n,t)=>t.service;pe=class n{open=mj(!1);project=jc.required();t=Ot$1(()=>ok().compose.update);common=Ot$1(()=>ok().common);phase=wt$1(`loading`);rows=wt$1([]);skipped=wt$1([]);stale=wt$1(null);result=wt$1(null);problem=wt$1(null);finished=Ot$1(()=>[`ready`,`done`,`failed`].includes(this.phase()));round=0;stopPull=null;constructor(){C(ve).onDestroy(()=>this.cancel()),rf(()=>{let t=this.open(),e=this.project();Tg(()=>{t?this.start(e):this.cancel()})})}stateOf(t){let e=this.t();switch(t.state){case`waiting`:return e.waiting;case`pulling`:return t.percent===null?e.pulling:`${e.pulling} ${String(t.percent)}%`;case`done`:return e.pulled;case`failed`:return e.failed(t.problem??``)}}iconOf(t){return t.state===`done`?`check`:t.state===`failed`?`warning`:`download`}iconClass(t){return t.state===`done`?`text-ok`:t.state===`failed`?`text-danger`:t.state===`pulling`?`text-accent`:`text-ink-500`}cancel(){this.round+=1,this.stopPull?.(),this.stopPull=null}async start(t){this.cancel();let e=this.round,i=()=>e===this.round;this.phase.set(`loading`),this.rows.set([]),this.skipped.set([]),this.stale.set(null),this.result.set(null),this.problem.set(null);try{let o=await window.electron.compose.images(t);if(!i())return;this.rows.set(o.images.map(u=>G(W({},u),{state:`waiting`,percent:null,problem:null}))),this.skipped.set(o.skipped),this.phase.set(`pulling`);for(let u of o.images)if(await this.pull(u.reference,i),!i())return;this.phase.set(`checking`);let s=await window.electron.compose.stale(t);i()&&(this.stale.set(s),this.phase.set(`ready`))}catch(o){i()&&(this.problem.set(eH(o)),this.phase.set(`failed`))}}async pull(t,e){let i=s=>{e()&&this.rows.update(u=>u.map(R=>R.reference===t?W(W({},R),s):R))};i({state:`pulling`});let o=await window.electron.images.pull(t);if(!o.ok){i({state:`failed`,problem:o.problem});return}await new Promise(s=>{let u=window.electron.images.onPullProgress(o.streamId,G=>{if(!G.done){i({percent:wt(G)});return}i(G.problem===null?{state:`done`,percent:null}:{state:`failed`,problem:G.problem}),R()}),R=()=>{u(),window.electron.images.close(o.streamId),this.stopPull=null,s()};this.stopPull=R})}async renew(){let t=this.round;this.phase.set(`renewing`);try{let e=await window.electron.compose.renew(this.project());t===this.round&&(this.result.set(e),this.phase.set(`done`))}catch(e){t===this.round&&(this.result.set({renewed:[],unchanged:[],problems:[eH(e)]}),this.phase.set(`done`))}}static ɵfac=function(e){return new(e||n)};static ɵcmp=wc({type:n,selectors:[[`app-project-update-dialog`]],inputs:{open:[1,`open`],project:[1,`project`]},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`,`project-update`,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`,`text-[13px]`,`text-ink-400`],[`data-testid`,`project-update-images`,1,`mt-4`,`space-y-1.5`,`text-[13px]`],[1,`mt-4`,`text-[13px]`,`text-danger`],[`data-testid`,`project-update-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`],[`type`,`button`,`rdxDialogClose`,``,1,`mx-btn`,`mx-focus`],[`name`,`close`,3,`size`],[1,`flex`,`items-center`,`gap-3`],[1,`text-ink-500`],[3,`name`,`size`],[1,`min-w-0`,`truncate`,`font-mono`,`text-ink-100`,3,`title`],[1,`min-w-0`,`truncate`,`text-ink-500`],[1,`ml-auto`,`shrink-0`,`text-[12px]`,3,`title`],[`name`,`code`,3,`size`],[1,`font-mono`],[1,`ml-auto`,`text-[12px]`],[1,`mt-1.5`,`ml-6`,3,`project`,`service`,`disabled`],[1,`flex`,`items-center`,`gap-2`,`text-ink-300`],[`name`,`check`,1,`text-ok`,3,`size`],[1,`text-ink-200`],[1,`mt-2.5`,`flex`,`items-center`,`gap-3`],[1,`mt-2`,`text-ok`],[1,`mt-1`,`text-ink-400`],[1,`mt-2`,`text-danger`],[`type`,`button`,`data-testid`,`project-update-renew`,1,`mx-btn`,`mx-focus`,3,`click`,`disabled`],[`name`,`refresh`,3,`size`],[1,`text-[12px]`,`text-ink-500`]],template:function(e,i){e&1&&(Oi(0,`div`,0),vg(`openChange`,function(s){return vS(i.open,s)||(i.open=s),s}),_m(1,Ct,17,9,`ng-template`,1),Nc()),e&2&&hg(`open`,i.open)},dependencies:[ie,ln,an,pn,cn,fn,dn,un,My,L],encapsulation:2})}});function jt(n,t){if(n&1&&(Oi(0,`div`,6),fS(1),Nc()),n&2){let e=HE();ec(),pg(e.version)}}function St(n,t){if(n&1&&(Oi(0,`div`,13),fS(1),Nc()),n&2){let e=HE();ec(),pg(e.problem)}}function Et(n,t){n&1&&SE(0,jt,2,1,`div`,6)(1,St,2,1,`div`,13),n&2&&kE(t.cliAvailable?0:1)}function Mt(n,t){if(n&1&&(Oi(0,`div`,6),fS(1),Nc()),n&2){let e=HE();ec(),pg(e.t().updating)}}function Tt(n,t){if(n&1&&(Oi(0,`span`,20),fS(1),Nc()),n&2){let e=t;Wm(`title`,e),ec(),pg(e)}}function It(n,t){if(n&1&&(Oi(0,`div`,23),fS(1),Nc()),n&2){let e=HE(2);ec(),pg(e.t().busy)}}function Rt(n,t){if(n&1&&(Oi(0,`div`,26),Gm(1,`app-icon`,27),fS(2),Nc()),n&2){let e=t,i=HE().$implicit,o=HE();nS(e.problem?`text-danger`:`text-accent`),Wm(`title`,e.problem?``:o.t().driftTitle),Br(`data-testid`,`compose-drift-`+i.name),ec(),Wm(`name`,e.problem?`warning`:`file`)(`size`,12),ec(),Ac(` `,e.text,` `)}}function Ft(n,t){if(n&1&&(Oi(0,`span`,31),fS(1),Nc()),n&2){let e=HE().$implicit,i=HE(2).$implicit,o=HE();Wm(`title`,o.t().driftTitle),Br(`data-testid`,`compose-drift-`+i.name+`-`+e.name),ec(),pg(o.t().drift)}}function Nt(n,t){if(n&1){let e=RE();Oi(0,`app-service-build`,37),Jm(`finished`,function(o){Ld(e);let s=HE().$implicit,u=HE(2).$implicit;return Od(HE().afterBuild(u.name,s.name,o))}),Nc()}if(n&2){let e=HE().$implicit,i=HE(2).$implicit,o=bS(0);Wm(`project`,i.name)(`service`,e.name)(`disabled`,o)(`showResult`,!1)}}function Bt(n,t){if(n&1&&Gm(0,`app-build-output`,35),n&2){let e=HE().$implicit;Wm(`service`,e.name)(`result`,t)}}function Ot(n,t){if(n&1&&(Oi(0,`span`,41),fS(1),Nc()),n&2){let e=t.$implicit;ec(),Ac(` `,e.hostPort?e.hostPort+`:`+e.containerPort:e.containerPort,` `)}}function $t(n,t){if(n&1&&(Oi(0,`span`,39),kc(1,Ot,2,1,`span`,41,Pt),Nc()),n&2){let e=HE().$implicit;ec(),Tc(e.ports.slice(0,2))}}function Vt(n,t){if(n&1&&(Oi(0,`div`,36),Gm(1,`app-state-dot`,17),Oi(2,`a`,38),fS(3),Nc(),Oi(4,`span`,39),fS(5),Nc(),Oi(6,`span`,40),fS(7),Nc(),SE(8,$t,3,0,`span`,39),Nc()),n&2){let e=t.$implicit;ec(),Wm(`state`,e.state),ec(),Wm(`routerLink`,SS(6,Dt,e.id)),ec(),pg(e.name),ec(2),pg(e.status),ec(2),pg(e.image),ec(),kE(e.ports.length>0?8:-1)}}function zt(n,t){if(n&1){let e=RE();Oi(0,`div`,28)(1,`div`,29)(2,`div`,30),fS(3),Nc(),SE(4,Ft,2,3,`span`,31),SE(5,Nt,1,4,`app-service-build`,32),Oi(6,`button`,33),Jm(`click`,function(){let o=Ld(e).$implicit,s=HE(2).$implicit;return Od(HE().recreate(s,o))}),Gm(7,`app-icon`,34),fS(8),Nc()(),SE(9,Bt,1,2,`app-build-output`,35),kc(10,Vt,9,8,`div`,36,kt),Nc()}if(n&2){let e,i=t.$implicit,o=HE(2).$implicit,s=bS(0),u=HE();ec(3),pg(i.name),ec(),kE(u.drifted(o.name,i.name)?4:-1),ec(),kE(u.canBuild(o.name,i.name)?5:-1),ec(),ag(`ml-auto`,!u.canBuild(o.name,i.name)),Wm(`disabled`,s||!u.canCompose(o))(`title`,u.canCompose(o)?u.t().recreateTitle:u.composeBlockedReason(o)),Br(`data-testid`,`compose-recreate-`+i.name)(`aria-label`,u.t().recreateAria(i.name)),ec(),Wm(`size`,14),ec(),Ac(` `,u.t().recreate,` `),ec(),kE((e=u.buildResult(o.name,i.name))?9:-1,e),ec(),Tc(i.containers)}}function Ut(n,t){if(n&1&&(Oi(0,`div`,25),kc(1,zt,12,12,`div`,28,$e),Nc()),n&2){let e=HE().$implicit;ec(),Tc(e.services)}}function Lt(n,t){if(n&1){let e=RE();bg(0),Oi(1,`div`,9)(2,`div`,14)(3,`button`,15),Jm(`click`,function(){let o=Ld(e).$implicit;return Od(HE().toggle(o.name))}),Gm(4,`app-icon`,16)(5,`app-state-dot`,17),Oi(6,`span`,18),fS(7),Nc()(),Oi(8,`span`,19),fS(9),Nc(),SE(10,Tt,2,2,`span`,20),Oi(11,`div`,21)(12,`app-action-menu`,22),Jm(`picked`,function(o){let s=Ld(e).$implicit;return Od(HE().onProjectMenu(o,s))}),Nc()()(),SE(13,It,2,1,`div`,23),SE(14,Rt,3,7,`div`,24),SE(15,Ut,3,0,`div`,25),Nc()}if(n&2){let e,i,o=t.$implicit,s=HE(),u=yS(s.busy(o));ec(3),Br(`aria-expanded`,s.isExpanded(o.name))(`aria-label`,s.isExpanded(o.name)?s.t().collapse(o.name):s.t().expand(o.name)),ec(),Wm(`name`,s.isExpanded(o.name)?`chevronDown`:`chevronRight`)(`size`,14),ec(),Wm(`state`,o.state),ec(2),pg(o.name),ec(2),mg(` `,s.projectLabelOf(o.state),` · `,s.t().runningOf(o.running,o.total),` `),ec(),kE((e=o.workingDir)?10:-1,e),ec(2),Wm(`label`,s.t().menuAria(o.name))(`items`,s.projectMenu(o)),ec(),kE(u?13:-1),ec(),kE((i=s.driftNote(o.name))?14:-1,i),ec(),kE(s.isExpanded(o.name)?15:-1)}}function Wt(n,t){if(n&1&&(Oi(0,`p`,10),fS(1),Nc()),n&2){let e=HE();ec(),pg(e.t().empty)}}var Dt;var $e;var kt;var Pt;var Oe;f(()=>{Kr();ra();y();y$1();v();sk();J();dk();x();u$2();Ne();Be();ge();G$1();o();Kr();Dt=n=>[`/containers`,n],$e=(n,t)=>t.name,kt=(n,t)=>t.id,Pt=(n,t)=>t.containerPort;Oe=class n{containers=C(u);compose=C(c);t=Ot$1(()=>ok().compose);common=Ot$1(()=>ok().common);loading=this.containers.loading;problem=this.containers.problem;composePending=this.compose.pending;containerPending=this.containers.pending;status=this.compose.status;projects=Ot$1(()=>f$1(this.containers.containers()));expanded=wt$1(new Set);confirmOpen=wt$1(!1);fileOpen=wt$1(!1);fileProject=wt$1(``);pendingDown=wt$1(null);updateOpen=wt$1(!1);drift=wt$1(new Map);buildable=wt$1(new Map);buildResults=wt$1(new Map);projectKey=Ot$1(()=>this.projects().filter(t=>t.workingDir!==null).map(t=>t.name).join(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Fn as nS,L as Kr,Tn as jc,cn as f,et as Ot,mr as wc,qt as ag,s as Br}from"./chunk-
|
|
1
|
+
import{Fn as nS,L as Kr,Tn as jc,cn as f,et as Ot,mr as wc,qt as ag,s as Br}from"./chunk-JmNJabM7.js";var a;var c;var u=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`},c=class s{state=jc.required();size=jc(`sm`);look=Ot(()=>this.state()in a?a[this.state()]:a.created);static ɵfac=function(e){return new(e||s)};static ɵcmp=wc({type:s,selectors:[[`app-state-dot`]],hostAttrs:[1,`block`,`shrink-0`,`rounded-full`],hostVars:7,hostBindings:function(e,t){e&2&&(Br(`data-state`,t.state()),nS(t.look()),ag(`size-2`,t.size()===`sm`)(`size-3`,t.size()===`md`))},inputs:{state:[1,`state`],size:[1,`size`]},decls:0,vars:0,template:function(e,t){},encapsulation:2})}});export{u as n,c as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as IS,An as lf,B as M,C as Gi,Ct as Tg,F as Jm,Gn as pj,I as Km,It as Ws,K as Ng,L as Kr,Nt as W,Pn as mj,Qn as sg,Tn as jc,Xn as rf,Y as OD,a as Ar,cn as f,cr as ve$1,er as sw,et as Ot,g as Dj,gr as wt,it as Pr,j as Ib,l as C,mt as S,p as Cr,rt as PS,s as Br,t as $I,tn as br,vt as Se$1,wn as jI,yr as yR,yt as T}from"./chunk-DEsPgcXV.js";import{n as $n$1,o as Ne}from"./chunk-Ds9stAVj.js";import{D as tr,E as tn$1,T as sr,_ as er,a as Je$1,b as me$1,h as ar,i as Gn$1,l as Qn$1,m as Zn$1,o as Jn$1,u as Tt,v as et,w as rr,x as nr}from"./chunk-CHFuuSv8.js";import{i as v,n as f$1,r as g,t as L$1}from"./chunk-Bw7Mtap6.js";function F(e,o){let t=o;for(;t;){if(t===e)return!0;t=St(t)?t.host:t.parentNode}return!1}function En(e){return e.visibility===`hidden`||e.visibility===`collapse`}function wn(e,o){return!e.isConnected||!o||En(o)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():o.display!==`none`&&o.display!==`contents`}function Cn(e){let o=e.assignedSlot;if(o)return o;if(e.parentElement)return e.parentElement;let t=e.getRootNode();return St(t)?t.host:null}function He(e){for(let o of Array.from(e.children))if(L(o)===`summary`)return o;return null}function Tn(e,o){let t=He(o);return!!t&&(e===t||F(t,e))}function Lt(e){let o=e?L(e):``;return e!=null&&e.matches(bn)&&(o!==`summary`||e.parentElement!=null&&L(e.parentElement)===`details`&&He(e.parentElement)===e)&&(o!==`details`||He(e)==null)&&(o!==`input`||e.type!==`hidden`)}function Fn(e,o){let t=xn(e);return o?!!t&&t.display!==`none`:wn(e,t)}function On(e){if(!Lt(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let o=e;o;o=Cn(o)){let t=o!==e,n=L(o)===`slot`;if(o.hasAttribute(`inert`)||t&&L(o)===`details`&&!o.open&&!Tn(e,o)||o.hasAttribute(`hidden`)||!n&&!Fn(o,t))return!1}return!0}function Rn(e){let o=e.tabIndex;if(o<0){let t=L(e);if(t===`details`||t===`audio`||t===`video`||fe(e)&&e.isContentEditable)return 0}return o}function Se(e){if(L(e)!==`input`)return null;let o=e;return o.type===`radio`&&o.name!==``?o:null}function Mn(e,o){let t=Se(e);if(!t)return!0;let n=o.find(i=>{let s=Se(i);return s?.name===t.name&&s.form===t.form&&s.checked});return n?n===t:o.find(i=>{let s=Se(i);return s?.name===t.name&&s.form===t.form})===t}function Bt(e){if(fe(e)&&L(e)===`slot`){let o=e.assignedElements({flatten:!0});if(o.length>0)return o}return fe(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function Ht(e,o){Bt(e).forEach(t=>{Lt(t)&&o.push(t),Ht(t,o)})}function In(e,o){let t=[],n=i=>{Bt(i).forEach(s=>{fe(s)&&s.matches(o)&&t.push(s),n(s)})};return n(e),t}function An(e){let o=[];return Ht(e,o),o.filter(On)}function ge(e){let o=An(e);return o.filter(t=>Rn(t)>=0&&Mn(t,o))}function me(e){return ge(e)}function Nn(e){let o=ge(e);return[o[0],o[o.length-1]]}function jt(e,o){let t=ge(e);if(t.length===0)return;let n=rr(e.ownerDocument),i=n?t.indexOf(n):-1;return t[i===-1?o===1?0:t.length-1:i+o]}function je(e){let o=(e?.ownerDocument??document).body;return jt(o,1)??e}function Ge(e){let o=(e?.ownerDocument??document).body;return jt(o,-1)??e}function Pn(e){return e.composedPath?.()[0]??e.target}function kn(e,{select:o=!1,root:t}={}){let n=t??e[0]?.ownerDocument??document,i=rr(n);for(let s of e)if(x(s,{select:o}),rr(n)!==i)return!0}function Gt(e){return e instanceof(e?.ownerDocument?.defaultView?.HTMLElement??HTMLElement)&&e.matches(Sn)}function Ln(e){return e instanceof HTMLInputElement&&`select`in e}function x(e,{select:o=!1}={}){if(e&&e.focus){let n=rr((`ownerDocument`in e?e.ownerDocument:void 0)??document);e.focus({preventScroll:!0}),e!==n&&Ln(e)&&o&&e.select()}}function Ve(e){let o=e.createElement(`span`);return o.setAttribute(`tabindex`,`0`),o.setAttribute(ve,``),me$1.screenReader.voiceOver&&me$1.engine.webkit?o.setAttribute(`role`,`button`):o.setAttribute(`aria-hidden`,`true`),Object.assign(o.style,Bn),o}function Nt(e){for(let o of ge(e))o.setAttribute(le,o.getAttribute(`tabindex`)??``),o.setAttribute(`tabindex`,`-1`)}function pe(e){In(e,`[${le}]`).forEach(o=>{let t=o.getAttribute(le);o.removeAttribute(le),t?o.setAttribute(`tabindex`,t):o.removeAttribute(`tabindex`)})}function te(e,o){let t=e.relatedTarget;return!t||!F(o,t)}function Vt(e,o={}){let t=o.enabled??(()=>!0),n=!1;rf(i=>{let s=e();if(!s||!t())return;let r=s.ownerDocument,u=d=>{!d.relatedTarget||!te(d,s)||(d.type===`focusin`?n&&(pe(s),n=!1):(Nt(s),n=!0))};te(new FocusEvent(`focusin`,{relatedTarget:r.activeElement}),s)&&(Nt(s),n=!0),s.addEventListener(`focusin`,u,!0),s.addEventListener(`focusout`,u,!0),i(()=>{s.removeEventListener(`focusin`,u,!0),s.removeEventListener(`focusout`,u,!0),n&&(pe(s),n=!1)})})}function _t(e){return{provide:De,useFactory:e}}function Hn(e){let o=Pt.get(e);return o||(o=wt([]),Pt.set(e,o)),o}function jn(e){let o=Hn(e);return{add(t){let n=o(),i=n[0];t!==i&&i?.pause();let s=kt(n,t);s.unshift(t),o.set(s)},remove(t){let i=kt(o(),t);o.set(i),o()[0]?.resume()}}}function kt(e,o){let t=[...e],n=t.indexOf(o);return n!==-1&&t.splice(n,1),t}var bn;var L;var yn;var fe;var St;var xn;var Le;var Be;var At;var Sn;var ve;var le;var Bn;var De;var Pt;var Do;var Gn;var Vn;var V;var be=f(()=>{Kr();Kr();tn$1();bn=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`,L=e=>e.nodeName.toLowerCase(),yn=e=>e!=null&&typeof e.nodeType==`number`,fe=e=>{if(!yn(e))return!1;let o=e.ownerDocument?.defaultView;return o?e instanceof o.HTMLElement:e instanceof HTMLElement},St=e=>e!==null&&e.nodeType===11&&`host`in e,xn=e=>{let o=e.ownerDocument.defaultView;return o?o.getComputedStyle(e):null};Le=`focusScope.autoFocusOnMount`,Be=`focusScope.autoFocusOnUnmount`,At={bubbles:!1,cancelable:!0};Sn=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`;ve=`data-rdx-focus-guard`,le=`data-rdx-tabindex`,Bn={position:`fixed`,top:`0`,left:`0`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clipPath:`inset(50%)`,whiteSpace:`nowrap`,border:`0`};De=new M(`RdxFocusScopeConfig`,{factory:()=>({trapped:wt(!1)})});Pt=new WeakMap;[Do,Gn]=Gn$1(`FocusScope Context`,`utils/focus-scope`),Vn=()=>{let e=C(V);return{loop:e.loop,trapped:e.isTrapped}},V=(()=>{class e{constructor(){this.injector=C(Se$1),this.destroyRef=C(ve$1),this.elementRef=C(Pr),this.config=C(De),this.ownerDocument=this.elementRef.nativeElement.ownerDocument??document,this.loop=jc(!1,{transform:Dj}),this.trapped=jc(void 0,{transform:t=>t===void 0?void 0:Dj(t)}),this.isTrapped=Ot(()=>this.trapped()??this.config.trapped()),this.mountAutoFocus=pj(),this.unmountAutoFocus=pj(),this.lastFocusedElement=wt(null),this.focusScopesStack=jn(this.ownerDocument),this.focusScope={paused:wt(!1),pause:()=>this.focusScope.paused.set(!0),resume:()=>this.focusScope.paused.set(!1)},this.alive=!0,this.destroyRef.onDestroy(()=>{this.alive=!1}),OD(()=>{rf(t=>{let n=this.elementRef.nativeElement;if(this.isTrapped()){let i=d=>{if(this.focusScope.paused()||!n)return;let v=Pn(d);F(n,v)?this.lastFocusedElement.set(v):x(this.lastFocusedElement(),{select:!0})},s=d=>{if(this.focusScope.paused()||!n)return;let v=d.relatedTarget;v!==null&&(F(n,v)||x(this.lastFocusedElement(),{select:!0}))},r=()=>{F(n,this.lastFocusedElement())||x(n)},u=new MutationObserver(r);n&&u.observe(n,{childList:!0,subtree:!0}),this.ownerDocument.addEventListener(`focusin`,i),this.ownerDocument.addEventListener(`focusout`,s),t(()=>{this.ownerDocument.removeEventListener(`focusin`,i),this.ownerDocument.removeEventListener(`focusout`,s),u.disconnect()})}},{injector:this.injector}),rf(async t=>{let n=this.elementRef.nativeElement;if(await Promise.resolve(),!n||!this.alive)return;this.focusScopesStack.add(this.focusScope);let i=rr(this.ownerDocument),s=F(n,i),r=d=>{this.alive&&this.mountAutoFocus.emit(d)};if(!s){let d=new CustomEvent(Le,At);n.addEventListener(Le,r),n.dispatchEvent(d),d.defaultPrevented||(kn(me(n),{select:!0,root:this.ownerDocument}),rr(this.ownerDocument)===i&&x(n))}let u=d=>{this.alive&&this.unmountAutoFocus.emit(d)};n.addEventListener(Be,u),t(()=>{n.removeEventListener(Le,r);let d=new CustomEvent(Be,At);n.dispatchEvent(d),(this.ownerDocument.defaultView??globalThis).requestAnimationFrame(()=>{let O=this.config.returnFocus?.();O!==!1&&!d.defaultPrevented&&(O?x(O,{select:!0}):this.shouldPreserveMovedFocus()||x(i??this.ownerDocument.body,{select:!0})),n.removeEventListener(Be,u),this.focusScopesStack.remove(this.focusScope)})})},{injector:this.injector})})}shouldPreserveMovedFocus(){let t=rr(this.ownerDocument);return!!t&&t!==this.ownerDocument.body&&!F(this.elementRef.nativeElement,t)}handleKeyDown(t){if(!this.loop()&&!this.isTrapped()||this.focusScope.paused())return;let n=t.key===`Tab`&&!t.altKey&&!t.ctrlKey&&!t.metaKey,i=rr(this.ownerDocument);if(n&&i){let s=t.currentTarget,[r,u]=Nn(s);r&&u?!t.shiftKey&&i===u?(t.preventDefault(),this.loop()&&x(r,{select:!0})):t.shiftKey&&i===r&&(t.preventDefault(),this.loop()&&x(u,{select:!0})):i===s&&t.preventDefault()}}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$I({type:e,selectors:[[``,`rdxFocusScope`,``]],hostAttrs:[`tabindex`,`-1`],hostBindings:function(n,i){n&1&&Jm(`keydown`,function(r){return i.handleKeyDown(r)})},inputs:{loop:[1,`loop`],trapped:[1,`trapped`]},outputs:{mountAutoFocus:`mountAutoFocus`,unmountAutoFocus:`unmountAutoFocus`},features:[IS([Gn(Vn)])]})}}return e})()});function Yt(e){return e?e instanceof ShadowRoot?e.host:Yt(e.parentNode):null}function Kt(e,o){return o.map(t=>{if(e.contains(t))return t;let n=Yt(t);return n&&e.contains(n)?n:null}).filter(t=>t!=null)}function Ut(e){let o=new Set;return e.forEach(t=>{let n=t;for(;n&&!o.has(n);)o.add(n),n=n.parentNode}),o}function Xt(e,o,t){let n=[],i=s=>{!s||t.has(s)||Array.from(s.children).forEach(r=>{r.nodeName.toLowerCase()!==`script`&&(o.has(r)?i(r):n.push(r))})};return i(e),n}function qt(e,o={}){let{ariaHidden:t=!1,inert:n=!1,mark:i=!0}=o,s=e[0];if(!s)return()=>{};let r=s.ownerDocument.body,u=Kt(r,e),d=n?`inert`:t?`aria-hidden`:null,v=[],O=[];if(d){let E=ye[d],l=xe[d],D=Kt(r,Array.from(r.querySelectorAll(`[aria-live]`))),k=u.concat(D);Xt(r,Ut(k),new Set(k)).forEach(R=>{let S=R.getAttribute(d),b=S!==null&&S!==`false`,$=(E.get(R)??0)+1;E.set(R,$),v.push(R),$===1&&b&&l.add(R),b||R.setAttribute(d,d===`inert`?``:`true`)})}return i&&Xt(r,Ut(u),new Set(u)).forEach(l=>{let D=(ne.get(l)??0)+1;ne.set(l,D),O.push(l),D===1&&l.setAttribute(we,``)}),_e+=1,()=>{if(d){let E=ye[d],l=xe[d];v.forEach(D=>{let k=(E.get(D)??0)-1;E.set(D,k),k===0&&(l.has(D)||D.removeAttribute(d),l.delete(D))})}O.forEach(E=>{let l=(ne.get(E)??0)-1;ne.set(E,l),l===0&&E.removeAttribute(we)}),_e-=1,_e===0&&(ye.inert=new WeakMap,ye[`aria-hidden`]=new WeakMap,xe.inert=new WeakSet,xe[`aria-hidden`]=new WeakSet,ne=new WeakMap)}}function Ke(e){return e?typeof KeyboardEvent<`u`&&e instanceof KeyboardEvent?`keyboard`:`pointerType`in e&&typeof e.pointerType==`string`?e.pointerType||`mouse`:typeof MouseEvent<`u`&&e instanceof MouseEvent?e.detail===0?`keyboard`:`mouse`:``:null}function Ce(e){return typeof e==`function`?e():e}function Wt(e,o){let t=typeof e==`function`?e(o):e;return t===!1?!1:Ce(t)}function Kn(e,o){let t=typeof e==`function`?e(o):e;return typeof t==`boolean`?t:Ce(t)}function zt(e){return{provide:$t,useFactory:e}}function Ee(e){return e===void 0?void 0:Dj(e)}function Un(){return _t(()=>({trapped:wt(!1)}))}var we;var ye;var xe;var ne;var _e;var $t;var Te;var Fe=f(()=>{Ne();Kr();Kr();tn$1();be();be();we=`data-rdx-floating-inert`,ye={inert:new WeakMap,"aria-hidden":new WeakMap},xe={inert:new WeakSet,"aria-hidden":new WeakSet},ne=new WeakMap,_e=0;$t=new M(`RdxFloatingFocusManagerConfig`);Te=(()=>{class e{constructor(){this.enabled=jc(void 0,{transform:Ee}),this.modal=jc(void 0,{transform:Ee}),this.inert=jc(void 0,{transform:Ee}),this.initialFocus=jc(void 0),this.returnFocus=jc(void 0),this.restoreFocus=jc(void 0),this.previousFocusableElement=jc(void 0),this.nextFocusableElement=jc(void 0),this.beforeContentFocusGuardRef=jc(void 0),this.externalTree=jc(void 0),this.getInsideElements=jc(void 0),this.closeOnFocusOut=jc(void 0,{transform:Ee}),this.focusOut=pj(),this.config=C($t,{optional:!0}),this.effectiveEnabled=Ot(()=>this.enabled()??this.config?.enabled?.()??!0),this.effectiveModal=Ot(()=>this.modal()??this.config?.modal?.()??!1),this.effectiveInert=Ot(()=>this.inert()??this.config?.inert?.()??this.effectiveModal()),this.effectiveCloseOnFocusOut=Ot(()=>this.closeOnFocusOut()??this.config?.closeOnFocusOut?.()??!0),this.effectiveInitialFocus=Ot(()=>this.initialFocus()!==void 0?this.initialFocus():this.config?.initialFocus?.()??null),this.effectiveReturnFocus=Ot(()=>this.returnFocus()!==void 0?this.returnFocus():this.config?.returnFocus?.()??!0),this.effectiveRestoreFocus=Ot(()=>this.restoreFocus()??this.config?.restoreFocus?.()??!1),this.effectivePreviousFocusableElement=Ot(()=>this.previousFocusableElement()!==void 0?this.previousFocusableElement():this.config?.previousFocusableElement?.()),this.effectiveNextFocusableElement=Ot(()=>this.nextFocusableElement()!==void 0?this.nextFocusableElement():this.config?.nextFocusableElement?.()),this.effectiveBeforeContentFocusGuardRef=Ot(()=>this.beforeContentFocusGuardRef()??this.config?.beforeContentFocusGuardRef?.()),this.effectiveExternalTree=Ot(()=>this.externalTree()??this.config?.externalTree?.()??null),this.insideElements=Ot(()=>((this.getInsideElements()??this.config?.getInsideElements)?.()??[]).filter(n=>n!=null)),this.effectiveOpenInteractionType=Ot(()=>this.config?.openInteractionType?.()??this._interactionType()),this.effectiveCloseInteractionType=Ot(()=>this.config?.closeInteractionType?.()??this._interactionType()),this.trapped=Ot(()=>this.effectiveEnabled()&&this.effectiveModal()),this.focusScopeConfig=C(De),this.host=C(Pr).nativeElement,this.isBrowser=$n$1(C(sw)),this.rootContext=C(et,{optional:!0}),this.registration=C(Je$1,{optional:!0}),this._interactionType=wt(``),this.interactionType=this._interactionType.asReadonly(),rf(()=>this.focusScopeConfig.trapped.set(this.trapped())),this.focusScopeConfig.returnFocus=()=>this.resolveReturnFocusTarget(),this.isBrowser&&(rf(t=>{!this.effectiveEnabled()||!this.isFloatingOpen()||t(qt(this.avoidElements(),{ariaHidden:!1,mark:!0}))}),rf(t=>{!this.effectiveEnabled()||!this.isFloatingOpen()||!this.effectiveInert()||t(qt(this.avoidElements(),{inert:!0,mark:!1}))}),rf(()=>{if(!me$1.engine.webkit||this.isFloatingOpen())return;let t=this.rootContext?.floatingElement??this.host;if(!t)return;let n=rr(t.ownerDocument);Gt(n)&&F(t,n)&&n.blur()}),this.trackInteractionType(),Vt(()=>this.rootContext?.floatingElement??this.host,{enabled:()=>!!this.rootContext&&this.effectiveEnabled()&&this.isFloatingOpen()&&!this.effectiveModal()}),this.wireCloseOnFocusOut(),this.wireRestoreFocus(),this.wirePortalFocusBridge(),this.wireFocusOrchestration(),this.wireInitialFocusFallback())}trackInteractionType(){let t=this.host.ownerDocument,n=s=>{this._interactionType.set(s.pointerType||`mouse`)},i=()=>this._interactionType.set(`keyboard`);t.addEventListener(`pointerdown`,n,!0),t.addEventListener(`keydown`,i,!0),C(ve$1).onDestroy(()=>{t.removeEventListener(`pointerdown`,n,!0),t.removeEventListener(`keydown`,i,!0)})}wireFocusOrchestration(){C(V).mountAutoFocus.subscribe(n=>{let i=this.effectiveOpenInteractionType(),s=Wt(this.effectiveInitialFocus(),i)??this.defaultInitialFocus(i);if(s===!1){n.preventDefault();return}s&&(n.preventDefault(),s.focus())})}resolveReturnTarget(){return this.resolveReturnFocusTarget()}resolveReturnFocusTarget(){let t=Kn(this.effectiveReturnFocus(),this.effectiveCloseInteractionType());if(t===!1||t===void 0)return!1;if(!(t===!0||t==null))return t}defaultInitialFocus(t){if(t!==`touch`)return null;let n=this.rootContext?.floatingElement??this.host;return n.hasAttribute(`tabindex`)||n.setAttribute(`tabindex`,`-1`),n}wireInitialFocusFallback(){rf(()=>{!this.effectiveEnabled()||!this.isFloatingOpen()||this.scheduleInitialFocusFallback()})}scheduleInitialFocusFallback(t=0){(this.host.ownerDocument.defaultView??globalThis).requestAnimationFrame(()=>this.applyInitialFocusFallback(t))}applyInitialFocusFallback(t){if(!this.effectiveEnabled()||!this.isFloatingOpen())return;let n=this.rootContext?.floatingElement??this.host,i=this.host.ownerDocument.activeElement;if(i instanceof HTMLElement&&n.contains(i))return;let s=this.effectiveOpenInteractionType(),r=Wt(this.effectiveInitialFocus(),s);if(r===!1)return;let u=r??this.defaultInitialFocus(s);u&&i!==u&&u.focus({preventScroll:!0}),t<2&&this.scheduleInitialFocusFallback(t+1)}wireCloseOnFocusOut(){let t=this.host.ownerDocument,n=!1,i=()=>{n=!0},s=()=>{n=!1},r=u=>{if(!this.effectiveEnabled()||!this.effectiveCloseOnFocusOut()||this.effectiveModal()||n)return;let d=u.relatedTarget;d&&(d instanceof Element&&d.hasAttribute(ve)||this.isRelatedTargetInside(d)||this.focusOut.emit(u))};t.addEventListener(`pointerdown`,i,!0),t.addEventListener(`pointerup`,s,!0),t.addEventListener(`focusout`,r,!0),C(ve$1).onDestroy(()=>{t.removeEventListener(`pointerdown`,i,!0),t.removeEventListener(`pointerup`,s,!0),t.removeEventListener(`focusout`,r,!0)})}wireRestoreFocus(){let t=this.host.ownerDocument,n=i=>{if(!this.effectiveEnabled()||!this.effectiveRestoreFocus()||!this.isFloatingOpen())return;let s=i.target;if(!s||!this.isRelatedTargetInside(s))return;(t.defaultView??globalThis).requestAnimationFrame(()=>{if(!this.effectiveEnabled()||!this.effectiveRestoreFocus()||!this.isFloatingOpen()||t.activeElement!==t.body)return;let u=this.rootContext?.floatingElement??this.host;x(this.effectiveRestoreFocus()===`popup`?u:me(u).at(-1)??u)})};t.addEventListener(`focusout`,n,!0),C(ve$1).onDestroy(()=>t.removeEventListener(`focusout`,n,!0))}wirePortalFocusBridge(){rf(t=>{if(!this.effectiveEnabled()||!this.isFloatingOpen()){this.setBeforeContentFocusGuardRef(null);return}let n=this.host.ownerDocument,i=this.host.parentNode;if(!i)return;let s=Ve(n),r=Ve(n);s.setAttribute(`data-type`,`inside`),r.setAttribute(`data-type`,`inside`),i.insertBefore(s,this.host),i.insertBefore(r,this.host.nextSibling),this.setBeforeContentFocusGuardRef(s);let u=v=>{if(this.effectiveModal()){x(this.getTabbableContent().at(-1)??this.host);return}if(this.isFromOutsideFocusGuard(v)){pe(this.rootContext?.floatingElement??this.host),x(this.getTabbableContent()[0]??this.host);return}if(te(v,this.portalFocusContainer())){x(je(this.rootContext?.referenceElement??this.host));return}x(Ce(this.effectivePreviousFocusableElement())??this.defaultPreviousFocusable())},d=v=>{if(this.effectiveModal()){x(this.getTabbableContent()[0]??this.host);return}if(te(v,this.portalFocusContainer())){x(Ge(this.rootContext?.referenceElement??this.host));return}x(Ce(this.effectiveNextFocusableElement())??this.defaultNextFocusable())};s.addEventListener(`focus`,u),r.addEventListener(`focus`,d),t(()=>{s.removeEventListener(`focus`,u),r.removeEventListener(`focus`,d),s.remove(),r.remove(),this.setBeforeContentFocusGuardRef(null)})})}avoidElements(){return[this.host,...this.insideElements()].filter(t=>t!=null)}isFloatingOpen(){return this.rootContext?.open()??!0}isRelatedTargetInside(t){if(F(this.rootContext?.floatingElement??this.host,t)||this.rootContext&&this.contextContains(this.rootContext,t)||this.insideElements().some(s=>s===t||F(s,t)))return!0;let i=this.currentFloatingNode();if(i){for(let s of i.tree.ancestors(i))if(s.context&&this.contextContains(s.context,t))return!0;for(let s of i.tree.children(i,{onlyOpen:!0}))if(s.context&&this.contextContains(s.context,t))return!0}return!1}contextContains(t,n){return t.floatingElement&&F(t.floatingElement,n)||t.referenceElement&&F(t.referenceElement,n)?!0:t.triggers.contains(n)}currentFloatingNode(){return(this.registration?.node()??null)||(this.effectiveExternalTree()?.all.find(i=>i.context===this.rootContext)??null)}getTabbableContent(){return me(this.rootContext?.floatingElement??this.host)}portalFocusContainer(){let t=this.rootContext?.floatingElement??this.host,n=t.parentElement;return n&&n!==t.ownerDocument.body?n:t}defaultPreviousFocusable(){return Ge(this.rootContext?.referenceElement??this.host)}defaultNextFocusable(){return je(this.rootContext?.referenceElement??this.host)}setBeforeContentFocusGuardRef(t){let n=this.effectiveBeforeContentFocusGuardRef();n&&(typeof n==`function`?n(t):n.set(t))}isFromOutsideFocusGuard(t){let n=t.relatedTarget;return n instanceof Element&&n.hasAttribute(ve)&&n.getAttribute(`data-type`)===`outside`}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$I({type:e,selectors:[[``,`rdxFloatingFocusManager`,``]],inputs:{enabled:[1,`enabled`],modal:[1,`modal`],inert:[1,`inert`],initialFocus:[1,`initialFocus`],returnFocus:[1,`returnFocus`],restoreFocus:[1,`restoreFocus`],previousFocusableElement:[1,`previousFocusableElement`],nextFocusableElement:[1,`nextFocusableElement`],beforeContentFocusGuardRef:[1,`beforeContentFocusGuardRef`],externalTree:[1,`externalTree`],getInsideElements:[1,`getInsideElements`],closeOnFocusOut:[1,`closeOnFocusOut`]},outputs:{focusOut:`focusOut`},exportAs:[`rdxFloatingFocusManager`],features:[IS([Un()]),jI([{directive:V,inputs:[`loop`,`loop`]}])]})}}return e})()});function qn(e){e||(e=C(ve$1));let o=new T(t=>{if(e.destroyed){t.next();return}return e.onDestroy(t.next.bind(t))});return t=>t.pipe(Ib(o))}function Xe(e,o){return new Ue(e)}function qe(e){let o=yR(e);return new T(t=>{let n=o?.onDestroy(()=>t.complete()),i=e.subscribe(s=>t.next(s));return()=>{i.unsubscribe(),n?.()}})}var Ue;var Jt=f(()=>{Ws();lf();Cr();Ng();Ue=class{source;destroyed=!1;destroyRef=C(ve$1);constructor(o){this.source=o,this.destroyRef.onDestroy(()=>{this.destroyed=!0})}subscribe(o){if(this.destroyed)throw new S(953,!1);let t=this.source.pipe(qn(this.destroyRef)).subscribe({next:n=>o(n)});return{unsubscribe:()=>t.unsubscribe()}}}});function Oe(e){return e!==null&&typeof e.nodeType==`number`}function $n(e){if(!Oe(e))return!1;let o=e.ownerDocument?.defaultView;return o?e instanceof o.HTMLElement:e instanceof HTMLElement}function $e(e){if(!Oe(e))return!1;let o=e.ownerDocument?.defaultView;return o?e instanceof o.Element:e instanceof Element}function zn(e){return!(`button`in e)||e.button===0}function Qt(e){let o=e.ownerDocument;return e===o.documentElement||e===o.body}function ze(e){return e!==null&&e.nodeType===11&&`host`in e}function Jn(e){let o=e.parentNode;if(o)return o;let t=e.getRootNode();return ze(t)?t.host:null}function We(e){return e===null||e.nodeType===Node.DOCUMENT_NODE||ze(e)||$e(e)&&Qt(e)}function Qn(e){let o=e;for(;!We(o);){let t=Jn(o);if(We(t)||!$e(t))break;o=t}return o}function Zn(e,o){if(!$e(e)||Qt(e)||e.closest(`[data-rdx-internal-backdrop], [data-rdx-menu-internal-backdrop], [data-rdx-dialog-internal-backdrop]`))return!1;let t=e.getRootNode(),n=ze(t)?t:o.ownerDocument,i=Array.from(n.querySelectorAll(`[${we}]`));if(i.length===0)return!1;let s=o.floatingElement;if(s&&e.contains(s))return!1;let r=Qn(e);return i.every(u=>!r.contains(u))}function eo(e){let o=e.target;if(!$n(o)||`touches`in e||typeof e.offsetX!=`number`)return!1;let t=o.ownerDocument.defaultView;if(!t)return!1;let n=e,i=t.getComputedStyle(o),s=/auto|scroll/,r=We(o),u=r||s.test(i.overflowX),d=r||s.test(i.overflowY),v=u&&o.clientWidth>0&&o.scrollWidth>o.clientWidth,O=d&&o.clientHeight>0&&o.scrollHeight>o.clientHeight,E=i.direction===`rtl`,l=O&&(E?n.offsetX<=o.offsetWidth-o.clientWidth:n.offsetX>o.clientWidth),D=v&&n.offsetY>o.clientHeight;return l||D}function to(e,o){let t=Ye.get(e);return o===`escape-key`?t?t.escapeKey():!1:t?t.outsidePress():!0}var oe;var Wn;var Yn;var Ye;var Re;var Zt=f(()=>{Ne();Kr();tn$1();Fe();oe=()=>!0,Wn=()=>!1,Yn=()=>`sloppy`;Ye=new WeakMap;Re=class{constructor(o,t,n={}){this.context=o,this.node=t,this.branches=new Set;let i=n.enabled??oe,s=n.escapeKey??oe,r=n.escapeKeyBubbles??Wn,u=n.outsidePress??oe,d=n.outsidePressBubbles??oe,v=n.outsidePressEvent??Yn,O=n.focusOutside??oe;this.active=()=>this.context.open()&&i(),Ye.set(this.context,{escapeKey:r,outsidePress:d});let E=C(ve$1);if(E.onDestroy(()=>Ye.delete(this.context)),!$n$1(C(sw)))return;let l=this.context.ownerDocument,D=l.defaultView??globalThis,k=(c,N)=>{n.onDismiss?.(c,N)},se=!1,R=!1,S=``,b=null,$,Me,_=()=>{D.clearTimeout($),D.clearTimeout(Me)},K=()=>{let c=v();return typeof c==`string`?c:c[S===`pen`||S===``?`mouse`:S]??`sloppy`},Qe=c=>{c.key!==`Escape`||!this.active()||!s()||se||!r()&&this.hasBlockingChild(`escape-key`)||(n.onEscapeKeyDown?.(c),c.defaultPrevented||k(`escape-key`,c),r()||c.stopPropagation())},Ze=()=>{se=!0},et=()=>{D.setTimeout(()=>{se=!1},me$1.engine.webkit?5:0)},z=c=>{!this.active()||!zn(c)||this.isInside(c.target)||!u(c)||Zn(c.target,this.context)||eo(c)||!d()&&this.hasBlockingChild(`outside-press`)||(n.onPointerDownOutside?.(c),c.defaultPrevented||k(`outside-press`,c))},tt=c=>{R=this.isInside(c.target),S=c.pointerType||``},nt=()=>{R=!1},ot=c=>{K()===`sloppy`&&c.pointerType!==`touch`&&z(c)},it=c=>{if(K()===`intentional`){if(R){R=!1;return}z(c)}},st=c=>{if(S=`touch`,K()!==`sloppy`||!this.active()||this.isInside(c.target))return;let N=c.touches?.[0];N&&(_(),b={startX:N.clientX,startY:N.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},$=D.setTimeout(()=>{b&&(b.dismissOnTouchEnd=!1,b.dismissOnMouseDown=!1)},1e3))},rt=c=>{if(!b||K()!==`sloppy`||this.isInside(c.target))return;let N=c.touches?.[0];if(!N)return;let ct=N.clientX-b.startX,lt=N.clientY-b.startY,ft=Math.sqrt(ct*ct+lt*lt);ft>5&&(b.dismissOnTouchEnd=!0),ft>10&&(z(c),_(),b=null)},at=c=>{if(!(!b||K()!==`sloppy`||this.isInside(c.target))){if(b.dismissOnTouchEnd){z(c),_(),b=null;return}D.clearTimeout(Me),Me=D.setTimeout(()=>{b=null},400)}},ut=c=>{if(!(!b||K()!==`sloppy`)){if(!b.dismissOnMouseDown){b=null,_();return}z(c),_(),b=null}},dt=c=>{Promise.resolve().then(()=>Promise.resolve()).then(()=>{!this.active()||!O()||this.isInside(c.target)||(n.onFocusOutside?.(c),c.defaultPrevented||k(`focus-outside`,c))})};l.addEventListener(`keydown`,Qe,{capture:!0}),l.addEventListener(`compositionstart`,Ze,{capture:!0}),l.addEventListener(`compositionend`,et,{capture:!0}),l.addEventListener(`focusin`,dt),l.addEventListener(`pointerdown`,tt,{capture:!0}),l.addEventListener(`pointercancel`,nt,{capture:!0});let hn=D.setTimeout(()=>{l.addEventListener(`pointerdown`,ot),l.addEventListener(`click`,it),l.addEventListener(`touchstart`,st,{capture:!0,passive:!0}),l.addEventListener(`touchmove`,rt,{capture:!0,passive:!0}),l.addEventListener(`touchend`,at,{capture:!0,passive:!0}),l.addEventListener(`mousedown`,ut,{capture:!0})},0);E.onDestroy(()=>{D.clearTimeout(hn),l.removeEventListener(`keydown`,Qe,{capture:!0}),l.removeEventListener(`compositionstart`,Ze,{capture:!0}),l.removeEventListener(`compositionend`,et,{capture:!0}),l.removeEventListener(`focusin`,dt),l.removeEventListener(`pointerdown`,tt,{capture:!0}),l.removeEventListener(`pointercancel`,nt,{capture:!0}),l.removeEventListener(`pointerdown`,ot),l.removeEventListener(`click`,it),l.removeEventListener(`touchstart`,st,{capture:!0}),l.removeEventListener(`touchmove`,rt,{capture:!0}),l.removeEventListener(`touchend`,at,{capture:!0}),l.removeEventListener(`mousedown`,ut,{capture:!0}),_()})}isInside(o){if(this.contextContains(this.context,o))return!0;let t=this.node();if(t){for(let n of t.tree.children(t,{onlyOpen:!0}))if(n.context&&this.contextContains(n.context,o))return!0}if(Oe(o)){for(let n of this.branches)if(n.contains(o))return!0}return!1}contextContains(o,t){let n=o.floatingElement;return n&&Oe(t)&&n.contains(t)?!0:o.triggers.contains(t)}hasBlockingChild(o){let t=this.node();return t?t.tree.children(t,{onlyOpen:!0}).some(n=>n.context!==null&&!to(n.context,o)):!1}}});function no(e,o){return e?typeof e==`string`?o?.querySelector(e)??null:e instanceof Pr?e.nativeElement??null:e instanceof HTMLElement?e:null:null}var en;var tn=f(()=>{Ne();Kr();Kr();g();en=(()=>{class e{constructor(){this.viewContainerRef=C(Gi),this.templateRef=C(Ar),this.document=C(br,{optional:!0}),this.isBrowser=$n$1(C(sw)),this.container=jc(),this.keepMounted=jc(!1,{transform:Dj}),this.contextPresent=C(v).present,this.present=Ot(()=>this.contextPresent()||this.keepMounted()),this._computedContainer=PS(this.container),this.elementContainer=Ot(()=>no(this._computedContainer(),this.document)??this.document?.body??null),this.mountedNodes=wt([]),this.viewRef=null;let t=new f$1({present:this.present,isBrowser:this.isBrowser,injector:C(Se$1),mountView:()=>this.mountView(),destroyView:()=>this.destroyView()});rf(()=>{let n=this.elementContainer(),i=this.mountedNodes();if(!(!this.isBrowser||!n))for(let s of i)n.appendChild(s)}),C(ve$1).onDestroy(()=>t.dispose())}setContainer(t){this._computedContainer.set(t)}mountView(){this.viewRef=this.viewContainerRef.createEmbeddedView(this.templateRef);let t=this.viewRef.rootNodes;return this.mountedNodes.set(t),t.filter(n=>n instanceof HTMLElement)}destroyView(){this.viewRef?.destroy(),this.viewRef=null,this.mountedNodes.set([])}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$I({type:e,inputs:{container:[1,`container`],keepMounted:[1,`keepMounted`]}})}}return e})()});function sn(e){return{provide:on,useValue:W(W({},nn),e)}}function rn(e){return{contentId:e.contentId,titleId:e.titleId.asReadonly(),descriptionId:e.descriptionId.asReadonly(),isOpen:e.open,present:e.present,modal:e.effectiveModal,disablePointerDismissal:e.effectiveDisablePointerDismissal,role:e.role,transitionStatus:e.transitionStatus,trigger:e.trigger.asReadonly(),triggers:e.triggers.asReadonly(),payload:e.payload.asReadonly(),openInteractionType:e.openInteractionType.asReadonly(),closeInteractionType:e.closeInteractionType.asReadonly(),nested:e.nested,nestedDialogOpen:e.nestedDialogOpen,nestedOpenCount:e.nestedOpenCount.asReadonly(),setTitleId:o=>e.titleId.set(o),setDescriptionId:o=>e.descriptionId.set(o),registerTransitionElement:o=>e.registerTransitionElement(o),registerTrigger:(o,t,n)=>e.registerTrigger(o,t,n),setTriggerOpenInteractionType:o=>e.setTriggerOpenInteractionType(o),open:(o,t,n,i,s)=>e.show(o,t,n,i,s),close:(o,t)=>e.close(o,t),toggle:(o,t,n,i)=>e.toggle(o,t,n,i)}}var nn;var on;var ao;var uo;var B;var co;var ie;var an;var un;var dn;var lo;var fo;var cn;var ln;var fn;var pn;var Je=f(()=>{Kr();Kr();tn$1();tn$1();Fe();Fe();Jt();Zt();be();tn();g();nn={role:`dialog`,forceModal:!1,forcePointerDismissalDisabled:!1},on=new M(`RdxDialogVariant`,{factory:()=>nn});ao=e=>e===`trap-focus`?e:Dj(e),uo=()=>rn(C(ie)),[B,co]=Gn$1(`RdxDialogRootContext`,`components/dialog`),ie=(()=>{class e{constructor(){this.destroyRef=C(ve$1),this.parentRoot=C(e,{optional:!0,skipSelf:!0}),this.variant=C(on),this.hasAppliedDefaultOpen=!1,this.hasAppliedDefaultTriggerId=!1,this.registeredTriggers=new Map,this.transition=ar(n=>this.emitOpenChangeComplete(n)),this.transitionStatus=this.transition.status,this.registerTransitionElement=this.transition.registerElement,this.open=mj(!1),this.defaultOpen=jc(!1,{transform:Dj}),this.triggerId=mj(null),this.defaultTriggerId=jc(null),this.modal=jc(!0,{transform:ao}),this.disablePointerDismissal=jc(!1,{transform:Dj}),this.handle=jc(),this.onOpenChange=pj(),this.onOpenChangeComplete=pj(),this.contentId=Tt(`rdx-dialog-content-`),this.titleId=wt(void 0),this.descriptionId=wt(void 0),this.trigger=wt(void 0),this.triggers=wt([]),this.payload=wt(void 0),this.nestedOpenCount=wt(0),this.openInteractionType=wt(null),this.closeInteractionType=wt(null),this.preventUnmountOnClose=wt(!1),this.pendingTriggerOpenInteractionType=wt(null),this.present=Ot(()=>this.open()||this.preventUnmountOnClose()),this.nested=!!this.parentRoot,this.nestedDialogOpen=Ot(()=>this.nestedOpenCount()>0),this.role=this.variant.role,this.effectiveModal=Ot(()=>this.variant.forceModal?!0:this.modal()),this.effectiveDisablePointerDismissal=Ot(()=>this.disablePointerDismissal()||this.variant.forcePointerDismissalDisabled),this.floatingContext=tr({ownerDocument:C(Pr).nativeElement.ownerDocument,open:()=>this.open()}),rf(()=>this.floatingContext.setReferenceElement(this.trigger()??null)),rf(()=>{this.open()&&this.preventUnmountOnClose()&&this.preventUnmountOnClose.set(!1)});let t=this.open();rf(()=>{let n=this.defaultOpen();!this.hasAppliedDefaultOpen&&n&&(this.hasAppliedDefaultOpen=!0,this.open.set(n))}),rf(()=>{let n=this.defaultTriggerId();!this.hasAppliedDefaultTriggerId&&n!==null&&(this.hasAppliedDefaultTriggerId=!0,this.triggerId.set(n))}),rf(()=>{let n=this.triggerId();Tg(()=>this.syncTriggerId(n))}),rf(()=>{let n=this.open();n!==t&&(t=n,Tg(()=>this.transition.start(n)))}),rf(n=>{this.open()&&this.parentRoot&&n(Tg(()=>this.parentRoot.openNestedChild()))}),rf(n=>{let i=this.handle();i&&n(Tg(()=>i.registerRoot(rn(this))))})}show(t=this.trigger(),n,i,s=`none`,r){let u=t!==void 0||n!==void 0;if(this.open()){t&&this.trigger.set(t),i!==void 0&&this.triggerId.set(i),u&&this.payload.set(n);return}let d=r??new Event(`dialog.open-change`),v=this.createOpenChangeEvent(!0,s,d,t,i??this.triggerId());this.onOpenChange.emit(v.payload),!v.eventDetails.isCanceled()&&(this.openInteractionType.set(this.consumeOpenInteractionType(r)),t&&this.trigger.set(t),i!==void 0&&this.triggerId.set(i),u&&this.payload.set(n),this.preventUnmountOnClose.set(!1),this.open.set(!0),this.floatingContext.events.emit(`openchange`,{open:!0,reason:s,event:v.eventDetails.event}))}close(t=`none`,n){if(!this.open())return;let i=n??new Event(`dialog.open-change`),s=this.createOpenChangeEvent(!1,t,i,this.trigger(),this.triggerId());this.onOpenChange.emit(s.payload),!s.eventDetails.isCanceled()&&(this.pendingTriggerOpenInteractionType.set(null),this.closeInteractionType.set(Ke(n)),this.preventUnmountOnClose.set(s.shouldPreventUnmountOnClose()),this.open.set(!1),this.floatingContext.events.emit(`openchange`,{open:!1,reason:t,event:s.eventDetails.event}))}toggle(t,n,i,s=new Event(`dialog.open-change`)){if(this.open()&&this.trigger()===n){this.close(`trigger-press`,s);return}this.show(n,i,t,`trigger-press`,s)}setTriggerOpenInteractionType(t){this.pendingTriggerOpenInteractionType.set(t)}registerTrigger(t,n,i){return this.registeredTriggers.set(t,{element:n,payload:i}),this.triggers.update(s=>s.includes(n)?s:[...s,n]),this.floatingContext.triggers.add(n),(this.triggerId()===t||!this.trigger()&&this.triggerId()===null)&&(this.trigger.set(n),this.payload.set(i())),()=>{if(this.registeredTriggers.get(t)?.element===n&&this.registeredTriggers.delete(t),this.triggers.update(s=>s.filter(r=>r!==n)),this.floatingContext.triggers.delete(n),!this.destroyRef.destroyed&&this.trigger()===n){let s=this.registeredTriggers.entries().next().value;this.triggerId()!==null&&this.triggerId.set(s?.[0]??null),this.trigger.set(s?.[1].element),this.payload.set(s?.[1].payload())}}}openNestedChild(){return this.nestedOpenCount.update(t=>t+1),()=>this.nestedOpenCount.update(t=>t-1)}syncTriggerId(t){if(t===null){this.trigger.set(void 0),this.payload.set(void 0);return}let n=this.registeredTriggers.get(t);n&&n.element!==this.trigger()&&(this.trigger.set(n.element),this.payload.set(n.payload()))}createOpenChangeEvent(t,n,i,s,r){let u=Zn$1(n,i,s);return{eventDetails:u.eventDetails,shouldPreventUnmountOnClose:u.shouldPreventUnmountOnClose,payload:{open:t,triggerId:r,trigger:u.eventDetails.trigger,reason:u.eventDetails.reason,event:u.eventDetails.event,eventDetails:u.eventDetails}}}emitOpenChangeComplete(t){this.destroyRef.destroyed||this.onOpenChangeComplete.emit(t)}consumeOpenInteractionType(t){let n=this.pendingTriggerOpenInteractionType();return this.pendingTriggerOpenInteractionType.set(null),n??Ke(t)}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$I({type:e,selectors:[[``,`rdxDialogRoot`,``]],inputs:{open:[1,`open`],defaultOpen:[1,`defaultOpen`],triggerId:[1,`triggerId`],defaultTriggerId:[1,`defaultTriggerId`],modal:[1,`modal`],disablePointerDismissal:[1,`disablePointerDismissal`],handle:[1,`handle`]},outputs:{open:`openChange`,triggerId:`triggerIdChange`,onOpenChange:`onOpenChange`,onOpenChangeComplete:`onOpenChangeComplete`},exportAs:[`rdxDialogRoot`],features:[IS([co(uo),Jn$1(),Qn$1(()=>C(e).floatingContext)])]})}}return e})();an=(()=>{class e{constructor(){this.rootContext=B(),this.forceRender=jc(!1,{transform:Dj});let t=C(et,{optional:!0});if(t){let n=C(Pr).nativeElement;t.addFloatingElement(n),C(ve$1).onDestroy(()=>t.removeFloatingElement(n))}}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$I({type:e,selectors:[[``,`rdxDialogBackdrop`,``]],hostAttrs:[`role`,`presentation`],hostVars:7,hostBindings:function(n,i){n&2&&(Km(`hidden`,i.rootContext.nested&&!i.forceRender()),Br(`data-closed`,i.rootContext.isOpen()?void 0:``)(`data-ending-style`,i.rootContext.transitionStatus()===`ending`?``:void 0)(`data-open`,i.rootContext.isOpen()?``:void 0)(`data-starting-style`,i.rootContext.transitionStatus()===`starting`?``:void 0)(`data-nested`,i.rootContext.nested?``:void 0)(`data-nested-dialog-open`,i.rootContext.nestedDialogOpen()?``:void 0))},inputs:{forceRender:[1,`forceRender`]},exportAs:[`rdxDialogBackdrop`]})}}return e})(),un=(()=>{class e{constructor(){this.rootContext=B()}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$I({type:e,selectors:[[`button`,`rdxDialogClose`,``]],hostAttrs:[`type`,`button`],hostBindings:function(n,i){n&1&&Jm(`click`,function(r){return i.rootContext.close(`close-press`,r)})},exportAs:[`rdxDialogClose`]})}}return e})(),dn=(()=>{class e{constructor(){this.rootContext=B(),this.id=Tt(`rdx-dialog-description-`),this.rootContext.setDescriptionId(this.id),C(ve$1).onDestroy(()=>this.rootContext.setDescriptionId(void 0))}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$I({type:e,selectors:[[``,`rdxDialogDescription`,``]],hostVars:1,hostBindings:function(n,i){n&2&&Km(`id`,i.id)},exportAs:[`rdxDialogDescription`]})}}return e})(),lo=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`Home`,`End`]),fo=`data-rdx-dialog-internal-backdrop`,cn=(()=>{class e{constructor(){this.rootContext=B(),this.host=C(Pr).nativeElement,this.floatingContext=C(et),this.registration=C(Je$1,{optional:!0}),this.focusManager=C(Te),this.focusScope=C(V),this.escapeKeyDown=pj(),this.pointerDownOutside=pj(),this.focusOutside=pj(),this.interactOutside=pj(),this.openAutoFocus=Xe(qe(this.focusScope.mountAutoFocus)),this.closeAutoFocus=Xe(qe(this.focusScope.unmountAutoFocus)),this.floatingContext.setFloatingElement(this.host),sr(Ot(()=>this.rootContext.modal()===!0&&this.rootContext.isOpen()),{referenceElement:()=>this.host});let t=this.rootContext.registerTransitionElement(this.host);C(ve$1).onDestroy(t);let n=C(Se$1);OD(()=>nr(this.host,n,{marker:fo,isOpen:()=>this.rootContext.isOpen(),shouldRender:()=>this.rootContext.modal()===!0,cutout:()=>this.host.closest(`[rdxDialogViewport]`),passThrough:()=>this.host.closest(`[rdxDialogViewport]`)!==null})),new Re(this.floatingContext,()=>this.registration?.node()??null,{escapeKey:()=>!0,outsidePress:()=>this.isTopmost()&&!this.rootContext.disablePointerDismissal(),outsidePressEvent:()=>this.rootContext.modal()===!0?`intentional`:`sloppy`,focusOutside:()=>!1,onEscapeKeyDown:i=>this.escapeKeyDown.emit(i),onPointerDownOutside:i=>{this.pointerDownOutside.emit(i),this.interactOutside.emit(i)},onDismiss:(i,s)=>{this.rootContext.close(i===`escape-key`?`escape-key`:`outside-press`,s)}}),this.focusManager.focusOut.subscribe(i=>{this.focusOutside.emit(i),this.interactOutside.emit(i),i.defaultPrevented||this.rootContext.close(`focus-out`,i)})}isTopmost(){return this.rootContext.isOpen()&&!this.rootContext.nestedDialogOpen()}onKeyDown(t){lo.has(t.key)&&t.stopPropagation()}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$I({type:e,selectors:[[``,`rdxDialogPopup`,``]],hostVars:13,hostBindings:function(n,i){n&1&&Jm(`keydown`,function(r){return i.onKeyDown(r)}),n&2&&(Km(`id`,i.rootContext.contentId),Br(`role`,i.rootContext.role)(`aria-modal`,i.rootContext.modal()===!0?`true`:void 0)(`aria-describedby`,i.rootContext.descriptionId())(`aria-labelledby`,i.rootContext.titleId())(`data-closed`,i.rootContext.isOpen()?void 0:``)(`data-ending-style`,i.rootContext.transitionStatus()===`ending`?``:void 0)(`data-open`,i.rootContext.isOpen()?``:void 0)(`data-starting-style`,i.rootContext.transitionStatus()===`starting`?``:void 0)(`data-nested`,i.rootContext.nested?``:void 0)(`data-nested-dialog-open`,i.rootContext.nestedDialogOpen()?``:void 0),sg(`--%NS%nested-dialogs`,i.rootContext.nestedOpenCount()))},outputs:{escapeKeyDown:`escapeKeyDown`,pointerDownOutside:`pointerDownOutside`,focusOutside:`focusOutside`,interactOutside:`interactOutside`,openAutoFocus:`openAutoFocus`,closeAutoFocus:`closeAutoFocus`},exportAs:[`rdxDialogPopup`],features:[IS([zt(()=>{let t=B();return{modal:()=>t.modal()===!0||t.modal()===`trap-focus`,inert:()=>t.modal()===!0,enabled:()=>t.present(),restoreFocus:()=>`popup`,openInteractionType:()=>t.openInteractionType(),closeInteractionType:()=>t.closeInteractionType(),closeOnFocusOut:()=>!t.disablePointerDismissal()}})]),jI([er,Te])]})}}return e})(),ln=(()=>{class e{constructor(){this.container=jc()}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$I({type:e,selectors:[[`ng-template`,`rdxDialogPortal`,``]],inputs:{container:[1,`container`]},exportAs:[`rdxDialogPortal`],features:[IS([L$1(()=>({present:B().present}))]),jI([{directive:en,inputs:[`container`,`container`]}])]})}}return e})(),fn=(()=>{class e{constructor(){this.rootContext=B(),this.id=Tt(`rdx-dialog-title-`),this.rootContext.setTitleId(this.id),C(ve$1).onDestroy(()=>this.rootContext.setTitleId(void 0))}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$I({type:e,selectors:[[``,`rdxDialogTitle`,``]],hostVars:1,hostBindings:function(n,i){n&2&&Km(`id`,i.id)},exportAs:[`rdxDialogTitle`]})}}return e})(),pn=(()=>{class e{constructor(){this.rootContext=B()}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$I({type:e,selectors:[[``,`rdxDialogViewport`,``]],hostAttrs:[`role`,`presentation`],hostVars:8,hostBindings:function(n,i){n&2&&(Br(`data-closed`,i.rootContext.isOpen()?void 0:``)(`data-ending-style`,i.rootContext.transitionStatus()===`ending`?``:void 0)(`data-open`,i.rootContext.isOpen()?``:void 0)(`data-starting-style`,i.rootContext.transitionStatus()===`starting`?``:void 0)(`data-nested`,i.rootContext.nested?``:void 0)(`data-nested-dialog-open`,i.rootContext.nestedDialogOpen()?``:void 0),sg(`pointer-events`,i.rootContext.isOpen()?null:`none`))},exportAs:[`rdxDialogViewport`]})}}return e})()});var Oi;var Ri;var Mi;var Ii;var Ai;var Ni;var Pi;var ki;var ho=f(()=>{Kr();Kr();Je();Je();Oi=(()=>{class e{static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$I({type:e,selectors:[[``,`rdxAlertDialogBackdrop`,``]],exportAs:[`rdxAlertDialogBackdrop`],features:[jI([an])]})}}return e})(),Ri=(()=>{class e{static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$I({type:e,selectors:[[`button`,`rdxAlertDialogClose`,``]],exportAs:[`rdxAlertDialogClose`],features:[jI([un])]})}}return e})(),Mi=(()=>{class e{static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$I({type:e,selectors:[[``,`rdxAlertDialogDescription`,``]],exportAs:[`rdxAlertDialogDescription`],features:[jI([dn])]})}}return e})(),Ii=(()=>{class e{static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$I({type:e,selectors:[[``,`rdxAlertDialogPopup`,``]],exportAs:[`rdxAlertDialogPopup`],features:[jI([{directive:cn,outputs:[`escapeKeyDown`,`escapeKeyDown`,`pointerDownOutside`,`pointerDownOutside`,`focusOutside`,`focusOutside`,`interactOutside`,`interactOutside`,`openAutoFocus`,`openAutoFocus`,`closeAutoFocus`,`closeAutoFocus`]}])]})}}return e})(),Ai=(()=>{class e{static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$I({type:e,selectors:[[`ng-template`,`rdxAlertDialogPortal`,``]],exportAs:[`rdxAlertDialogPortal`],features:[jI([{directive:ln,inputs:[`container`,`container`]}])]})}}return e})(),Ni=(()=>{class e{constructor(){this.dialog=C(ie),this.open=this.dialog.open,this.triggerId=this.dialog.triggerId,this.payload=this.dialog.payload}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$I({type:e,selectors:[[``,`rdxAlertDialogRoot`,``]],exportAs:[`rdxAlertDialogRoot`],features:[IS([sn({role:`alertdialog`,forceModal:!0,forcePointerDismissalDisabled:!0})]),jI([{directive:ie,inputs:[`open`,`open`,`defaultOpen`,`defaultOpen`,`triggerId`,`triggerId`,`defaultTriggerId`,`defaultTriggerId`,`handle`,`handle`],outputs:[`openChange`,`openChange`,`triggerIdChange`,`triggerIdChange`,`onOpenChange`,`onOpenChange`,`onOpenChangeComplete`,`onOpenChangeComplete`]}])]})}}return e})(),Pi=(()=>{class e{static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$I({type:e,selectors:[[``,`rdxAlertDialogTitle`,``]],exportAs:[`rdxAlertDialogTitle`],features:[jI([fn])]})}}return e})(),ki=(()=>{class e{static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$I({type:e,selectors:[[``,`rdxAlertDialogViewport`,``]],exportAs:[`rdxAlertDialogViewport`],features:[jI([pn])]})}}return e})()});export{pn as _,Ni as a,Ri as c,dn as d,fn as f,ln as g,ki as h,Mi as i,an as l,ie as m,Ii as n,Oi as o,ho as p,Je as r,Pi as s,Ai as t,cn as u,un as v};
|
|
1
|
+
import{A as IS,An as lf,B as M,C as Gi,Ct as Tg,F as Jm,Gn as pj,I as Km,It as Ws,K as Ng,L as Kr,Nt as W,Pn as mj,Qn as sg,Tn as jc,Xn as rf,Y as OD,a as Ar,cn as f,cr as ve$1,er as sw,et as Ot,g as Dj,gr as wt,it as Pr,j as Ib,l as C,mt as S,p as Cr,rt as PS,s as Br,t as $I,tn as br,vt as Se$1,wn as jI,yr as yR,yt as T}from"./chunk-JmNJabM7.js";import{n as $n$1,o as Ne}from"./chunk-Bz7JmGk-.js";import{D as tr,E as tn$1,T as sr,_ as er,a as Je$1,b as me$1,h as ar,i as Gn$1,l as Qn$1,m as Zn$1,o as Jn$1,u as Tt,v as et,w as rr,x as nr}from"./chunk-DCF2sSJN.js";import{i as v,n as f$1,r as g,t as L$1}from"./chunk-BFURpTzq.js";function F(e,o){let t=o;for(;t;){if(t===e)return!0;t=St(t)?t.host:t.parentNode}return!1}function En(e){return e.visibility===`hidden`||e.visibility===`collapse`}function wn(e,o){return!e.isConnected||!o||En(o)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():o.display!==`none`&&o.display!==`contents`}function Cn(e){let o=e.assignedSlot;if(o)return o;if(e.parentElement)return e.parentElement;let t=e.getRootNode();return St(t)?t.host:null}function He(e){for(let o of Array.from(e.children))if(L(o)===`summary`)return o;return null}function Tn(e,o){let t=He(o);return!!t&&(e===t||F(t,e))}function Lt(e){let o=e?L(e):``;return e!=null&&e.matches(bn)&&(o!==`summary`||e.parentElement!=null&&L(e.parentElement)===`details`&&He(e.parentElement)===e)&&(o!==`details`||He(e)==null)&&(o!==`input`||e.type!==`hidden`)}function Fn(e,o){let t=xn(e);return o?!!t&&t.display!==`none`:wn(e,t)}function On(e){if(!Lt(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let o=e;o;o=Cn(o)){let t=o!==e,n=L(o)===`slot`;if(o.hasAttribute(`inert`)||t&&L(o)===`details`&&!o.open&&!Tn(e,o)||o.hasAttribute(`hidden`)||!n&&!Fn(o,t))return!1}return!0}function Rn(e){let o=e.tabIndex;if(o<0){let t=L(e);if(t===`details`||t===`audio`||t===`video`||fe(e)&&e.isContentEditable)return 0}return o}function Se(e){if(L(e)!==`input`)return null;let o=e;return o.type===`radio`&&o.name!==``?o:null}function Mn(e,o){let t=Se(e);if(!t)return!0;let n=o.find(i=>{let s=Se(i);return s?.name===t.name&&s.form===t.form&&s.checked});return n?n===t:o.find(i=>{let s=Se(i);return s?.name===t.name&&s.form===t.form})===t}function Bt(e){if(fe(e)&&L(e)===`slot`){let o=e.assignedElements({flatten:!0});if(o.length>0)return o}return fe(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function Ht(e,o){Bt(e).forEach(t=>{Lt(t)&&o.push(t),Ht(t,o)})}function In(e,o){let t=[],n=i=>{Bt(i).forEach(s=>{fe(s)&&s.matches(o)&&t.push(s),n(s)})};return n(e),t}function An(e){let o=[];return Ht(e,o),o.filter(On)}function ge(e){let o=An(e);return o.filter(t=>Rn(t)>=0&&Mn(t,o))}function me(e){return ge(e)}function Nn(e){let o=ge(e);return[o[0],o[o.length-1]]}function jt(e,o){let t=ge(e);if(t.length===0)return;let n=rr(e.ownerDocument),i=n?t.indexOf(n):-1;return t[i===-1?o===1?0:t.length-1:i+o]}function je(e){let o=(e?.ownerDocument??document).body;return jt(o,1)??e}function Ge(e){let o=(e?.ownerDocument??document).body;return jt(o,-1)??e}function Pn(e){return e.composedPath?.()[0]??e.target}function kn(e,{select:o=!1,root:t}={}){let n=t??e[0]?.ownerDocument??document,i=rr(n);for(let s of e)if(x(s,{select:o}),rr(n)!==i)return!0}function Gt(e){return e instanceof(e?.ownerDocument?.defaultView?.HTMLElement??HTMLElement)&&e.matches(Sn)}function Ln(e){return e instanceof HTMLInputElement&&`select`in e}function x(e,{select:o=!1}={}){if(e&&e.focus){let n=rr((`ownerDocument`in e?e.ownerDocument:void 0)??document);e.focus({preventScroll:!0}),e!==n&&Ln(e)&&o&&e.select()}}function Ve(e){let o=e.createElement(`span`);return o.setAttribute(`tabindex`,`0`),o.setAttribute(ve,``),me$1.screenReader.voiceOver&&me$1.engine.webkit?o.setAttribute(`role`,`button`):o.setAttribute(`aria-hidden`,`true`),Object.assign(o.style,Bn),o}function Nt(e){for(let o of ge(e))o.setAttribute(le,o.getAttribute(`tabindex`)??``),o.setAttribute(`tabindex`,`-1`)}function pe(e){In(e,`[${le}]`).forEach(o=>{let t=o.getAttribute(le);o.removeAttribute(le),t?o.setAttribute(`tabindex`,t):o.removeAttribute(`tabindex`)})}function te(e,o){let t=e.relatedTarget;return!t||!F(o,t)}function Vt(e,o={}){let t=o.enabled??(()=>!0),n=!1;rf(i=>{let s=e();if(!s||!t())return;let r=s.ownerDocument,u=d=>{!d.relatedTarget||!te(d,s)||(d.type===`focusin`?n&&(pe(s),n=!1):(Nt(s),n=!0))};te(new FocusEvent(`focusin`,{relatedTarget:r.activeElement}),s)&&(Nt(s),n=!0),s.addEventListener(`focusin`,u,!0),s.addEventListener(`focusout`,u,!0),i(()=>{s.removeEventListener(`focusin`,u,!0),s.removeEventListener(`focusout`,u,!0),n&&(pe(s),n=!1)})})}function _t(e){return{provide:De,useFactory:e}}function Hn(e){let o=Pt.get(e);return o||(o=wt([]),Pt.set(e,o)),o}function jn(e){let o=Hn(e);return{add(t){let n=o(),i=n[0];t!==i&&i?.pause();let s=kt(n,t);s.unshift(t),o.set(s)},remove(t){let i=kt(o(),t);o.set(i),o()[0]?.resume()}}}function kt(e,o){let t=[...e],n=t.indexOf(o);return n!==-1&&t.splice(n,1),t}var bn;var L;var yn;var fe;var St;var xn;var Le;var Be;var At;var Sn;var ve;var le;var Bn;var De;var Pt;var Do;var Gn;var Vn;var V;var be=f(()=>{Kr();Kr();tn$1();bn=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`,L=e=>e.nodeName.toLowerCase(),yn=e=>e!=null&&typeof e.nodeType==`number`,fe=e=>{if(!yn(e))return!1;let o=e.ownerDocument?.defaultView;return o?e instanceof o.HTMLElement:e instanceof HTMLElement},St=e=>e!==null&&e.nodeType===11&&`host`in e,xn=e=>{let o=e.ownerDocument.defaultView;return o?o.getComputedStyle(e):null};Le=`focusScope.autoFocusOnMount`,Be=`focusScope.autoFocusOnUnmount`,At={bubbles:!1,cancelable:!0};Sn=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`;ve=`data-rdx-focus-guard`,le=`data-rdx-tabindex`,Bn={position:`fixed`,top:`0`,left:`0`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clipPath:`inset(50%)`,whiteSpace:`nowrap`,border:`0`};De=new M(`RdxFocusScopeConfig`,{factory:()=>({trapped:wt(!1)})});Pt=new WeakMap;[Do,Gn]=Gn$1(`FocusScope Context`,`utils/focus-scope`),Vn=()=>{let e=C(V);return{loop:e.loop,trapped:e.isTrapped}},V=(()=>{class e{constructor(){this.injector=C(Se$1),this.destroyRef=C(ve$1),this.elementRef=C(Pr),this.config=C(De),this.ownerDocument=this.elementRef.nativeElement.ownerDocument??document,this.loop=jc(!1,{transform:Dj}),this.trapped=jc(void 0,{transform:t=>t===void 0?void 0:Dj(t)}),this.isTrapped=Ot(()=>this.trapped()??this.config.trapped()),this.mountAutoFocus=pj(),this.unmountAutoFocus=pj(),this.lastFocusedElement=wt(null),this.focusScopesStack=jn(this.ownerDocument),this.focusScope={paused:wt(!1),pause:()=>this.focusScope.paused.set(!0),resume:()=>this.focusScope.paused.set(!1)},this.alive=!0,this.destroyRef.onDestroy(()=>{this.alive=!1}),OD(()=>{rf(t=>{let n=this.elementRef.nativeElement;if(this.isTrapped()){let i=d=>{if(this.focusScope.paused()||!n)return;let v=Pn(d);F(n,v)?this.lastFocusedElement.set(v):x(this.lastFocusedElement(),{select:!0})},s=d=>{if(this.focusScope.paused()||!n)return;let v=d.relatedTarget;v!==null&&(F(n,v)||x(this.lastFocusedElement(),{select:!0}))},r=()=>{F(n,this.lastFocusedElement())||x(n)},u=new MutationObserver(r);n&&u.observe(n,{childList:!0,subtree:!0}),this.ownerDocument.addEventListener(`focusin`,i),this.ownerDocument.addEventListener(`focusout`,s),t(()=>{this.ownerDocument.removeEventListener(`focusin`,i),this.ownerDocument.removeEventListener(`focusout`,s),u.disconnect()})}},{injector:this.injector}),rf(async t=>{let n=this.elementRef.nativeElement;if(await Promise.resolve(),!n||!this.alive)return;this.focusScopesStack.add(this.focusScope);let i=rr(this.ownerDocument),s=F(n,i),r=d=>{this.alive&&this.mountAutoFocus.emit(d)};if(!s){let d=new CustomEvent(Le,At);n.addEventListener(Le,r),n.dispatchEvent(d),d.defaultPrevented||(kn(me(n),{select:!0,root:this.ownerDocument}),rr(this.ownerDocument)===i&&x(n))}let u=d=>{this.alive&&this.unmountAutoFocus.emit(d)};n.addEventListener(Be,u),t(()=>{n.removeEventListener(Le,r);let d=new CustomEvent(Be,At);n.dispatchEvent(d),(this.ownerDocument.defaultView??globalThis).requestAnimationFrame(()=>{let O=this.config.returnFocus?.();O!==!1&&!d.defaultPrevented&&(O?x(O,{select:!0}):this.shouldPreserveMovedFocus()||x(i??this.ownerDocument.body,{select:!0})),n.removeEventListener(Be,u),this.focusScopesStack.remove(this.focusScope)})})},{injector:this.injector})})}shouldPreserveMovedFocus(){let t=rr(this.ownerDocument);return!!t&&t!==this.ownerDocument.body&&!F(this.elementRef.nativeElement,t)}handleKeyDown(t){if(!this.loop()&&!this.isTrapped()||this.focusScope.paused())return;let n=t.key===`Tab`&&!t.altKey&&!t.ctrlKey&&!t.metaKey,i=rr(this.ownerDocument);if(n&&i){let s=t.currentTarget,[r,u]=Nn(s);r&&u?!t.shiftKey&&i===u?(t.preventDefault(),this.loop()&&x(r,{select:!0})):t.shiftKey&&i===r&&(t.preventDefault(),this.loop()&&x(u,{select:!0})):i===s&&t.preventDefault()}}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$I({type:e,selectors:[[``,`rdxFocusScope`,``]],hostAttrs:[`tabindex`,`-1`],hostBindings:function(n,i){n&1&&Jm(`keydown`,function(r){return i.handleKeyDown(r)})},inputs:{loop:[1,`loop`],trapped:[1,`trapped`]},outputs:{mountAutoFocus:`mountAutoFocus`,unmountAutoFocus:`unmountAutoFocus`},features:[IS([Gn(Vn)])]})}}return e})()});function Yt(e){return e?e instanceof ShadowRoot?e.host:Yt(e.parentNode):null}function Kt(e,o){return o.map(t=>{if(e.contains(t))return t;let n=Yt(t);return n&&e.contains(n)?n:null}).filter(t=>t!=null)}function Ut(e){let o=new Set;return e.forEach(t=>{let n=t;for(;n&&!o.has(n);)o.add(n),n=n.parentNode}),o}function Xt(e,o,t){let n=[],i=s=>{!s||t.has(s)||Array.from(s.children).forEach(r=>{r.nodeName.toLowerCase()!==`script`&&(o.has(r)?i(r):n.push(r))})};return i(e),n}function qt(e,o={}){let{ariaHidden:t=!1,inert:n=!1,mark:i=!0}=o,s=e[0];if(!s)return()=>{};let r=s.ownerDocument.body,u=Kt(r,e),d=n?`inert`:t?`aria-hidden`:null,v=[],O=[];if(d){let E=ye[d],l=xe[d],D=Kt(r,Array.from(r.querySelectorAll(`[aria-live]`))),k=u.concat(D);Xt(r,Ut(k),new Set(k)).forEach(R=>{let S=R.getAttribute(d),b=S!==null&&S!==`false`,$=(E.get(R)??0)+1;E.set(R,$),v.push(R),$===1&&b&&l.add(R),b||R.setAttribute(d,d===`inert`?``:`true`)})}return i&&Xt(r,Ut(u),new Set(u)).forEach(l=>{let D=(ne.get(l)??0)+1;ne.set(l,D),O.push(l),D===1&&l.setAttribute(we,``)}),_e+=1,()=>{if(d){let E=ye[d],l=xe[d];v.forEach(D=>{let k=(E.get(D)??0)-1;E.set(D,k),k===0&&(l.has(D)||D.removeAttribute(d),l.delete(D))})}O.forEach(E=>{let l=(ne.get(E)??0)-1;ne.set(E,l),l===0&&E.removeAttribute(we)}),_e-=1,_e===0&&(ye.inert=new WeakMap,ye[`aria-hidden`]=new WeakMap,xe.inert=new WeakSet,xe[`aria-hidden`]=new WeakSet,ne=new WeakMap)}}function Ke(e){return e?typeof KeyboardEvent<`u`&&e instanceof KeyboardEvent?`keyboard`:`pointerType`in e&&typeof e.pointerType==`string`?e.pointerType||`mouse`:typeof MouseEvent<`u`&&e instanceof MouseEvent?e.detail===0?`keyboard`:`mouse`:``:null}function Ce(e){return typeof e==`function`?e():e}function Wt(e,o){let t=typeof e==`function`?e(o):e;return t===!1?!1:Ce(t)}function Kn(e,o){let t=typeof e==`function`?e(o):e;return typeof t==`boolean`?t:Ce(t)}function zt(e){return{provide:$t,useFactory:e}}function Ee(e){return e===void 0?void 0:Dj(e)}function Un(){return _t(()=>({trapped:wt(!1)}))}var we;var ye;var xe;var ne;var _e;var $t;var Te;var Fe=f(()=>{Ne();Kr();Kr();tn$1();be();be();we=`data-rdx-floating-inert`,ye={inert:new WeakMap,"aria-hidden":new WeakMap},xe={inert:new WeakSet,"aria-hidden":new WeakSet},ne=new WeakMap,_e=0;$t=new M(`RdxFloatingFocusManagerConfig`);Te=(()=>{class e{constructor(){this.enabled=jc(void 0,{transform:Ee}),this.modal=jc(void 0,{transform:Ee}),this.inert=jc(void 0,{transform:Ee}),this.initialFocus=jc(void 0),this.returnFocus=jc(void 0),this.restoreFocus=jc(void 0),this.previousFocusableElement=jc(void 0),this.nextFocusableElement=jc(void 0),this.beforeContentFocusGuardRef=jc(void 0),this.externalTree=jc(void 0),this.getInsideElements=jc(void 0),this.closeOnFocusOut=jc(void 0,{transform:Ee}),this.focusOut=pj(),this.config=C($t,{optional:!0}),this.effectiveEnabled=Ot(()=>this.enabled()??this.config?.enabled?.()??!0),this.effectiveModal=Ot(()=>this.modal()??this.config?.modal?.()??!1),this.effectiveInert=Ot(()=>this.inert()??this.config?.inert?.()??this.effectiveModal()),this.effectiveCloseOnFocusOut=Ot(()=>this.closeOnFocusOut()??this.config?.closeOnFocusOut?.()??!0),this.effectiveInitialFocus=Ot(()=>this.initialFocus()!==void 0?this.initialFocus():this.config?.initialFocus?.()??null),this.effectiveReturnFocus=Ot(()=>this.returnFocus()!==void 0?this.returnFocus():this.config?.returnFocus?.()??!0),this.effectiveRestoreFocus=Ot(()=>this.restoreFocus()??this.config?.restoreFocus?.()??!1),this.effectivePreviousFocusableElement=Ot(()=>this.previousFocusableElement()!==void 0?this.previousFocusableElement():this.config?.previousFocusableElement?.()),this.effectiveNextFocusableElement=Ot(()=>this.nextFocusableElement()!==void 0?this.nextFocusableElement():this.config?.nextFocusableElement?.()),this.effectiveBeforeContentFocusGuardRef=Ot(()=>this.beforeContentFocusGuardRef()??this.config?.beforeContentFocusGuardRef?.()),this.effectiveExternalTree=Ot(()=>this.externalTree()??this.config?.externalTree?.()??null),this.insideElements=Ot(()=>((this.getInsideElements()??this.config?.getInsideElements)?.()??[]).filter(n=>n!=null)),this.effectiveOpenInteractionType=Ot(()=>this.config?.openInteractionType?.()??this._interactionType()),this.effectiveCloseInteractionType=Ot(()=>this.config?.closeInteractionType?.()??this._interactionType()),this.trapped=Ot(()=>this.effectiveEnabled()&&this.effectiveModal()),this.focusScopeConfig=C(De),this.host=C(Pr).nativeElement,this.isBrowser=$n$1(C(sw)),this.rootContext=C(et,{optional:!0}),this.registration=C(Je$1,{optional:!0}),this._interactionType=wt(``),this.interactionType=this._interactionType.asReadonly(),rf(()=>this.focusScopeConfig.trapped.set(this.trapped())),this.focusScopeConfig.returnFocus=()=>this.resolveReturnFocusTarget(),this.isBrowser&&(rf(t=>{!this.effectiveEnabled()||!this.isFloatingOpen()||t(qt(this.avoidElements(),{ariaHidden:!1,mark:!0}))}),rf(t=>{!this.effectiveEnabled()||!this.isFloatingOpen()||!this.effectiveInert()||t(qt(this.avoidElements(),{inert:!0,mark:!1}))}),rf(()=>{if(!me$1.engine.webkit||this.isFloatingOpen())return;let t=this.rootContext?.floatingElement??this.host;if(!t)return;let n=rr(t.ownerDocument);Gt(n)&&F(t,n)&&n.blur()}),this.trackInteractionType(),Vt(()=>this.rootContext?.floatingElement??this.host,{enabled:()=>!!this.rootContext&&this.effectiveEnabled()&&this.isFloatingOpen()&&!this.effectiveModal()}),this.wireCloseOnFocusOut(),this.wireRestoreFocus(),this.wirePortalFocusBridge(),this.wireFocusOrchestration(),this.wireInitialFocusFallback())}trackInteractionType(){let t=this.host.ownerDocument,n=s=>{this._interactionType.set(s.pointerType||`mouse`)},i=()=>this._interactionType.set(`keyboard`);t.addEventListener(`pointerdown`,n,!0),t.addEventListener(`keydown`,i,!0),C(ve$1).onDestroy(()=>{t.removeEventListener(`pointerdown`,n,!0),t.removeEventListener(`keydown`,i,!0)})}wireFocusOrchestration(){C(V).mountAutoFocus.subscribe(n=>{let i=this.effectiveOpenInteractionType(),s=Wt(this.effectiveInitialFocus(),i)??this.defaultInitialFocus(i);if(s===!1){n.preventDefault();return}s&&(n.preventDefault(),s.focus())})}resolveReturnTarget(){return this.resolveReturnFocusTarget()}resolveReturnFocusTarget(){let t=Kn(this.effectiveReturnFocus(),this.effectiveCloseInteractionType());if(t===!1||t===void 0)return!1;if(!(t===!0||t==null))return t}defaultInitialFocus(t){if(t!==`touch`)return null;let n=this.rootContext?.floatingElement??this.host;return n.hasAttribute(`tabindex`)||n.setAttribute(`tabindex`,`-1`),n}wireInitialFocusFallback(){rf(()=>{!this.effectiveEnabled()||!this.isFloatingOpen()||this.scheduleInitialFocusFallback()})}scheduleInitialFocusFallback(t=0){(this.host.ownerDocument.defaultView??globalThis).requestAnimationFrame(()=>this.applyInitialFocusFallback(t))}applyInitialFocusFallback(t){if(!this.effectiveEnabled()||!this.isFloatingOpen())return;let n=this.rootContext?.floatingElement??this.host,i=this.host.ownerDocument.activeElement;if(i instanceof HTMLElement&&n.contains(i))return;let s=this.effectiveOpenInteractionType(),r=Wt(this.effectiveInitialFocus(),s);if(r===!1)return;let u=r??this.defaultInitialFocus(s);u&&i!==u&&u.focus({preventScroll:!0}),t<2&&this.scheduleInitialFocusFallback(t+1)}wireCloseOnFocusOut(){let t=this.host.ownerDocument,n=!1,i=()=>{n=!0},s=()=>{n=!1},r=u=>{if(!this.effectiveEnabled()||!this.effectiveCloseOnFocusOut()||this.effectiveModal()||n)return;let d=u.relatedTarget;d&&(d instanceof Element&&d.hasAttribute(ve)||this.isRelatedTargetInside(d)||this.focusOut.emit(u))};t.addEventListener(`pointerdown`,i,!0),t.addEventListener(`pointerup`,s,!0),t.addEventListener(`focusout`,r,!0),C(ve$1).onDestroy(()=>{t.removeEventListener(`pointerdown`,i,!0),t.removeEventListener(`pointerup`,s,!0),t.removeEventListener(`focusout`,r,!0)})}wireRestoreFocus(){let t=this.host.ownerDocument,n=i=>{if(!this.effectiveEnabled()||!this.effectiveRestoreFocus()||!this.isFloatingOpen())return;let s=i.target;if(!s||!this.isRelatedTargetInside(s))return;(t.defaultView??globalThis).requestAnimationFrame(()=>{if(!this.effectiveEnabled()||!this.effectiveRestoreFocus()||!this.isFloatingOpen()||t.activeElement!==t.body)return;let u=this.rootContext?.floatingElement??this.host;x(this.effectiveRestoreFocus()===`popup`?u:me(u).at(-1)??u)})};t.addEventListener(`focusout`,n,!0),C(ve$1).onDestroy(()=>t.removeEventListener(`focusout`,n,!0))}wirePortalFocusBridge(){rf(t=>{if(!this.effectiveEnabled()||!this.isFloatingOpen()){this.setBeforeContentFocusGuardRef(null);return}let n=this.host.ownerDocument,i=this.host.parentNode;if(!i)return;let s=Ve(n),r=Ve(n);s.setAttribute(`data-type`,`inside`),r.setAttribute(`data-type`,`inside`),i.insertBefore(s,this.host),i.insertBefore(r,this.host.nextSibling),this.setBeforeContentFocusGuardRef(s);let u=v=>{if(this.effectiveModal()){x(this.getTabbableContent().at(-1)??this.host);return}if(this.isFromOutsideFocusGuard(v)){pe(this.rootContext?.floatingElement??this.host),x(this.getTabbableContent()[0]??this.host);return}if(te(v,this.portalFocusContainer())){x(je(this.rootContext?.referenceElement??this.host));return}x(Ce(this.effectivePreviousFocusableElement())??this.defaultPreviousFocusable())},d=v=>{if(this.effectiveModal()){x(this.getTabbableContent()[0]??this.host);return}if(te(v,this.portalFocusContainer())){x(Ge(this.rootContext?.referenceElement??this.host));return}x(Ce(this.effectiveNextFocusableElement())??this.defaultNextFocusable())};s.addEventListener(`focus`,u),r.addEventListener(`focus`,d),t(()=>{s.removeEventListener(`focus`,u),r.removeEventListener(`focus`,d),s.remove(),r.remove(),this.setBeforeContentFocusGuardRef(null)})})}avoidElements(){return[this.host,...this.insideElements()].filter(t=>t!=null)}isFloatingOpen(){return this.rootContext?.open()??!0}isRelatedTargetInside(t){if(F(this.rootContext?.floatingElement??this.host,t)||this.rootContext&&this.contextContains(this.rootContext,t)||this.insideElements().some(s=>s===t||F(s,t)))return!0;let i=this.currentFloatingNode();if(i){for(let s of i.tree.ancestors(i))if(s.context&&this.contextContains(s.context,t))return!0;for(let s of i.tree.children(i,{onlyOpen:!0}))if(s.context&&this.contextContains(s.context,t))return!0}return!1}contextContains(t,n){return t.floatingElement&&F(t.floatingElement,n)||t.referenceElement&&F(t.referenceElement,n)?!0:t.triggers.contains(n)}currentFloatingNode(){return(this.registration?.node()??null)||(this.effectiveExternalTree()?.all.find(i=>i.context===this.rootContext)??null)}getTabbableContent(){return me(this.rootContext?.floatingElement??this.host)}portalFocusContainer(){let t=this.rootContext?.floatingElement??this.host,n=t.parentElement;return n&&n!==t.ownerDocument.body?n:t}defaultPreviousFocusable(){return Ge(this.rootContext?.referenceElement??this.host)}defaultNextFocusable(){return je(this.rootContext?.referenceElement??this.host)}setBeforeContentFocusGuardRef(t){let n=this.effectiveBeforeContentFocusGuardRef();n&&(typeof n==`function`?n(t):n.set(t))}isFromOutsideFocusGuard(t){let n=t.relatedTarget;return n instanceof Element&&n.hasAttribute(ve)&&n.getAttribute(`data-type`)===`outside`}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$I({type:e,selectors:[[``,`rdxFloatingFocusManager`,``]],inputs:{enabled:[1,`enabled`],modal:[1,`modal`],inert:[1,`inert`],initialFocus:[1,`initialFocus`],returnFocus:[1,`returnFocus`],restoreFocus:[1,`restoreFocus`],previousFocusableElement:[1,`previousFocusableElement`],nextFocusableElement:[1,`nextFocusableElement`],beforeContentFocusGuardRef:[1,`beforeContentFocusGuardRef`],externalTree:[1,`externalTree`],getInsideElements:[1,`getInsideElements`],closeOnFocusOut:[1,`closeOnFocusOut`]},outputs:{focusOut:`focusOut`},exportAs:[`rdxFloatingFocusManager`],features:[IS([Un()]),jI([{directive:V,inputs:[`loop`,`loop`]}])]})}}return e})()});function qn(e){e||(e=C(ve$1));let o=new T(t=>{if(e.destroyed){t.next();return}return e.onDestroy(t.next.bind(t))});return t=>t.pipe(Ib(o))}function Xe(e,o){return new Ue(e)}function qe(e){let o=yR(e);return new T(t=>{let n=o?.onDestroy(()=>t.complete()),i=e.subscribe(s=>t.next(s));return()=>{i.unsubscribe(),n?.()}})}var Ue;var Jt=f(()=>{Ws();lf();Cr();Ng();Ue=class{source;destroyed=!1;destroyRef=C(ve$1);constructor(o){this.source=o,this.destroyRef.onDestroy(()=>{this.destroyed=!0})}subscribe(o){if(this.destroyed)throw new S(953,!1);let t=this.source.pipe(qn(this.destroyRef)).subscribe({next:n=>o(n)});return{unsubscribe:()=>t.unsubscribe()}}}});function Oe(e){return e!==null&&typeof e.nodeType==`number`}function $n(e){if(!Oe(e))return!1;let o=e.ownerDocument?.defaultView;return o?e instanceof o.HTMLElement:e instanceof HTMLElement}function $e(e){if(!Oe(e))return!1;let o=e.ownerDocument?.defaultView;return o?e instanceof o.Element:e instanceof Element}function zn(e){return!(`button`in e)||e.button===0}function Qt(e){let o=e.ownerDocument;return e===o.documentElement||e===o.body}function ze(e){return e!==null&&e.nodeType===11&&`host`in e}function Jn(e){let o=e.parentNode;if(o)return o;let t=e.getRootNode();return ze(t)?t.host:null}function We(e){return e===null||e.nodeType===Node.DOCUMENT_NODE||ze(e)||$e(e)&&Qt(e)}function Qn(e){let o=e;for(;!We(o);){let t=Jn(o);if(We(t)||!$e(t))break;o=t}return o}function Zn(e,o){if(!$e(e)||Qt(e)||e.closest(`[data-rdx-internal-backdrop], [data-rdx-menu-internal-backdrop], [data-rdx-dialog-internal-backdrop]`))return!1;let t=e.getRootNode(),n=ze(t)?t:o.ownerDocument,i=Array.from(n.querySelectorAll(`[${we}]`));if(i.length===0)return!1;let s=o.floatingElement;if(s&&e.contains(s))return!1;let r=Qn(e);return i.every(u=>!r.contains(u))}function eo(e){let o=e.target;if(!$n(o)||`touches`in e||typeof e.offsetX!=`number`)return!1;let t=o.ownerDocument.defaultView;if(!t)return!1;let n=e,i=t.getComputedStyle(o),s=/auto|scroll/,r=We(o),u=r||s.test(i.overflowX),d=r||s.test(i.overflowY),v=u&&o.clientWidth>0&&o.scrollWidth>o.clientWidth,O=d&&o.clientHeight>0&&o.scrollHeight>o.clientHeight,E=i.direction===`rtl`,l=O&&(E?n.offsetX<=o.offsetWidth-o.clientWidth:n.offsetX>o.clientWidth),D=v&&n.offsetY>o.clientHeight;return l||D}function to(e,o){let t=Ye.get(e);return o===`escape-key`?t?t.escapeKey():!1:t?t.outsidePress():!0}var oe;var Wn;var Yn;var Ye;var Re;var Zt=f(()=>{Ne();Kr();tn$1();Fe();oe=()=>!0,Wn=()=>!1,Yn=()=>`sloppy`;Ye=new WeakMap;Re=class{constructor(o,t,n={}){this.context=o,this.node=t,this.branches=new Set;let i=n.enabled??oe,s=n.escapeKey??oe,r=n.escapeKeyBubbles??Wn,u=n.outsidePress??oe,d=n.outsidePressBubbles??oe,v=n.outsidePressEvent??Yn,O=n.focusOutside??oe;this.active=()=>this.context.open()&&i(),Ye.set(this.context,{escapeKey:r,outsidePress:d});let E=C(ve$1);if(E.onDestroy(()=>Ye.delete(this.context)),!$n$1(C(sw)))return;let l=this.context.ownerDocument,D=l.defaultView??globalThis,k=(c,N)=>{n.onDismiss?.(c,N)},se=!1,R=!1,S=``,b=null,$,Me,_=()=>{D.clearTimeout($),D.clearTimeout(Me)},K=()=>{let c=v();return typeof c==`string`?c:c[S===`pen`||S===``?`mouse`:S]??`sloppy`},Qe=c=>{c.key!==`Escape`||!this.active()||!s()||se||!r()&&this.hasBlockingChild(`escape-key`)||(n.onEscapeKeyDown?.(c),c.defaultPrevented||k(`escape-key`,c),r()||c.stopPropagation())},Ze=()=>{se=!0},et=()=>{D.setTimeout(()=>{se=!1},me$1.engine.webkit?5:0)},z=c=>{!this.active()||!zn(c)||this.isInside(c.target)||!u(c)||Zn(c.target,this.context)||eo(c)||!d()&&this.hasBlockingChild(`outside-press`)||(n.onPointerDownOutside?.(c),c.defaultPrevented||k(`outside-press`,c))},tt=c=>{R=this.isInside(c.target),S=c.pointerType||``},nt=()=>{R=!1},ot=c=>{K()===`sloppy`&&c.pointerType!==`touch`&&z(c)},it=c=>{if(K()===`intentional`){if(R){R=!1;return}z(c)}},st=c=>{if(S=`touch`,K()!==`sloppy`||!this.active()||this.isInside(c.target))return;let N=c.touches?.[0];N&&(_(),b={startX:N.clientX,startY:N.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},$=D.setTimeout(()=>{b&&(b.dismissOnTouchEnd=!1,b.dismissOnMouseDown=!1)},1e3))},rt=c=>{if(!b||K()!==`sloppy`||this.isInside(c.target))return;let N=c.touches?.[0];if(!N)return;let ct=N.clientX-b.startX,lt=N.clientY-b.startY,ft=Math.sqrt(ct*ct+lt*lt);ft>5&&(b.dismissOnTouchEnd=!0),ft>10&&(z(c),_(),b=null)},at=c=>{if(!(!b||K()!==`sloppy`||this.isInside(c.target))){if(b.dismissOnTouchEnd){z(c),_(),b=null;return}D.clearTimeout(Me),Me=D.setTimeout(()=>{b=null},400)}},ut=c=>{if(!(!b||K()!==`sloppy`)){if(!b.dismissOnMouseDown){b=null,_();return}z(c),_(),b=null}},dt=c=>{Promise.resolve().then(()=>Promise.resolve()).then(()=>{!this.active()||!O()||this.isInside(c.target)||(n.onFocusOutside?.(c),c.defaultPrevented||k(`focus-outside`,c))})};l.addEventListener(`keydown`,Qe,{capture:!0}),l.addEventListener(`compositionstart`,Ze,{capture:!0}),l.addEventListener(`compositionend`,et,{capture:!0}),l.addEventListener(`focusin`,dt),l.addEventListener(`pointerdown`,tt,{capture:!0}),l.addEventListener(`pointercancel`,nt,{capture:!0});let hn=D.setTimeout(()=>{l.addEventListener(`pointerdown`,ot),l.addEventListener(`click`,it),l.addEventListener(`touchstart`,st,{capture:!0,passive:!0}),l.addEventListener(`touchmove`,rt,{capture:!0,passive:!0}),l.addEventListener(`touchend`,at,{capture:!0,passive:!0}),l.addEventListener(`mousedown`,ut,{capture:!0})},0);E.onDestroy(()=>{D.clearTimeout(hn),l.removeEventListener(`keydown`,Qe,{capture:!0}),l.removeEventListener(`compositionstart`,Ze,{capture:!0}),l.removeEventListener(`compositionend`,et,{capture:!0}),l.removeEventListener(`focusin`,dt),l.removeEventListener(`pointerdown`,tt,{capture:!0}),l.removeEventListener(`pointercancel`,nt,{capture:!0}),l.removeEventListener(`pointerdown`,ot),l.removeEventListener(`click`,it),l.removeEventListener(`touchstart`,st,{capture:!0}),l.removeEventListener(`touchmove`,rt,{capture:!0}),l.removeEventListener(`touchend`,at,{capture:!0}),l.removeEventListener(`mousedown`,ut,{capture:!0}),_()})}isInside(o){if(this.contextContains(this.context,o))return!0;let t=this.node();if(t){for(let n of t.tree.children(t,{onlyOpen:!0}))if(n.context&&this.contextContains(n.context,o))return!0}if(Oe(o)){for(let n of this.branches)if(n.contains(o))return!0}return!1}contextContains(o,t){let n=o.floatingElement;return n&&Oe(t)&&n.contains(t)?!0:o.triggers.contains(t)}hasBlockingChild(o){let t=this.node();return t?t.tree.children(t,{onlyOpen:!0}).some(n=>n.context!==null&&!to(n.context,o)):!1}}});function no(e,o){return e?typeof e==`string`?o?.querySelector(e)??null:e instanceof Pr?e.nativeElement??null:e instanceof HTMLElement?e:null:null}var en;var tn=f(()=>{Ne();Kr();Kr();g();en=(()=>{class e{constructor(){this.viewContainerRef=C(Gi),this.templateRef=C(Ar),this.document=C(br,{optional:!0}),this.isBrowser=$n$1(C(sw)),this.container=jc(),this.keepMounted=jc(!1,{transform:Dj}),this.contextPresent=C(v).present,this.present=Ot(()=>this.contextPresent()||this.keepMounted()),this._computedContainer=PS(this.container),this.elementContainer=Ot(()=>no(this._computedContainer(),this.document)??this.document?.body??null),this.mountedNodes=wt([]),this.viewRef=null;let t=new f$1({present:this.present,isBrowser:this.isBrowser,injector:C(Se$1),mountView:()=>this.mountView(),destroyView:()=>this.destroyView()});rf(()=>{let n=this.elementContainer(),i=this.mountedNodes();if(!(!this.isBrowser||!n))for(let s of i)n.appendChild(s)}),C(ve$1).onDestroy(()=>t.dispose())}setContainer(t){this._computedContainer.set(t)}mountView(){this.viewRef=this.viewContainerRef.createEmbeddedView(this.templateRef);let t=this.viewRef.rootNodes;return this.mountedNodes.set(t),t.filter(n=>n instanceof HTMLElement)}destroyView(){this.viewRef?.destroy(),this.viewRef=null,this.mountedNodes.set([])}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$I({type:e,inputs:{container:[1,`container`],keepMounted:[1,`keepMounted`]}})}}return e})()});function sn(e){return{provide:on,useValue:W(W({},nn),e)}}function rn(e){return{contentId:e.contentId,titleId:e.titleId.asReadonly(),descriptionId:e.descriptionId.asReadonly(),isOpen:e.open,present:e.present,modal:e.effectiveModal,disablePointerDismissal:e.effectiveDisablePointerDismissal,role:e.role,transitionStatus:e.transitionStatus,trigger:e.trigger.asReadonly(),triggers:e.triggers.asReadonly(),payload:e.payload.asReadonly(),openInteractionType:e.openInteractionType.asReadonly(),closeInteractionType:e.closeInteractionType.asReadonly(),nested:e.nested,nestedDialogOpen:e.nestedDialogOpen,nestedOpenCount:e.nestedOpenCount.asReadonly(),setTitleId:o=>e.titleId.set(o),setDescriptionId:o=>e.descriptionId.set(o),registerTransitionElement:o=>e.registerTransitionElement(o),registerTrigger:(o,t,n)=>e.registerTrigger(o,t,n),setTriggerOpenInteractionType:o=>e.setTriggerOpenInteractionType(o),open:(o,t,n,i,s)=>e.show(o,t,n,i,s),close:(o,t)=>e.close(o,t),toggle:(o,t,n,i)=>e.toggle(o,t,n,i)}}var nn;var on;var ao;var uo;var B;var co;var ie;var an;var un;var dn;var lo;var fo;var cn;var ln;var fn;var pn;var Je=f(()=>{Kr();Kr();tn$1();tn$1();Fe();Fe();Jt();Zt();be();tn();g();nn={role:`dialog`,forceModal:!1,forcePointerDismissalDisabled:!1},on=new M(`RdxDialogVariant`,{factory:()=>nn});ao=e=>e===`trap-focus`?e:Dj(e),uo=()=>rn(C(ie)),[B,co]=Gn$1(`RdxDialogRootContext`,`components/dialog`),ie=(()=>{class e{constructor(){this.destroyRef=C(ve$1),this.parentRoot=C(e,{optional:!0,skipSelf:!0}),this.variant=C(on),this.hasAppliedDefaultOpen=!1,this.hasAppliedDefaultTriggerId=!1,this.registeredTriggers=new Map,this.transition=ar(n=>this.emitOpenChangeComplete(n)),this.transitionStatus=this.transition.status,this.registerTransitionElement=this.transition.registerElement,this.open=mj(!1),this.defaultOpen=jc(!1,{transform:Dj}),this.triggerId=mj(null),this.defaultTriggerId=jc(null),this.modal=jc(!0,{transform:ao}),this.disablePointerDismissal=jc(!1,{transform:Dj}),this.handle=jc(),this.onOpenChange=pj(),this.onOpenChangeComplete=pj(),this.contentId=Tt(`rdx-dialog-content-`),this.titleId=wt(void 0),this.descriptionId=wt(void 0),this.trigger=wt(void 0),this.triggers=wt([]),this.payload=wt(void 0),this.nestedOpenCount=wt(0),this.openInteractionType=wt(null),this.closeInteractionType=wt(null),this.preventUnmountOnClose=wt(!1),this.pendingTriggerOpenInteractionType=wt(null),this.present=Ot(()=>this.open()||this.preventUnmountOnClose()),this.nested=!!this.parentRoot,this.nestedDialogOpen=Ot(()=>this.nestedOpenCount()>0),this.role=this.variant.role,this.effectiveModal=Ot(()=>this.variant.forceModal?!0:this.modal()),this.effectiveDisablePointerDismissal=Ot(()=>this.disablePointerDismissal()||this.variant.forcePointerDismissalDisabled),this.floatingContext=tr({ownerDocument:C(Pr).nativeElement.ownerDocument,open:()=>this.open()}),rf(()=>this.floatingContext.setReferenceElement(this.trigger()??null)),rf(()=>{this.open()&&this.preventUnmountOnClose()&&this.preventUnmountOnClose.set(!1)});let t=this.open();rf(()=>{let n=this.defaultOpen();!this.hasAppliedDefaultOpen&&n&&(this.hasAppliedDefaultOpen=!0,this.open.set(n))}),rf(()=>{let n=this.defaultTriggerId();!this.hasAppliedDefaultTriggerId&&n!==null&&(this.hasAppliedDefaultTriggerId=!0,this.triggerId.set(n))}),rf(()=>{let n=this.triggerId();Tg(()=>this.syncTriggerId(n))}),rf(()=>{let n=this.open();n!==t&&(t=n,Tg(()=>this.transition.start(n)))}),rf(n=>{this.open()&&this.parentRoot&&n(Tg(()=>this.parentRoot.openNestedChild()))}),rf(n=>{let i=this.handle();i&&n(Tg(()=>i.registerRoot(rn(this))))})}show(t=this.trigger(),n,i,s=`none`,r){let u=t!==void 0||n!==void 0;if(this.open()){t&&this.trigger.set(t),i!==void 0&&this.triggerId.set(i),u&&this.payload.set(n);return}let d=r??new Event(`dialog.open-change`),v=this.createOpenChangeEvent(!0,s,d,t,i??this.triggerId());this.onOpenChange.emit(v.payload),!v.eventDetails.isCanceled()&&(this.openInteractionType.set(this.consumeOpenInteractionType(r)),t&&this.trigger.set(t),i!==void 0&&this.triggerId.set(i),u&&this.payload.set(n),this.preventUnmountOnClose.set(!1),this.open.set(!0),this.floatingContext.events.emit(`openchange`,{open:!0,reason:s,event:v.eventDetails.event}))}close(t=`none`,n){if(!this.open())return;let i=n??new Event(`dialog.open-change`),s=this.createOpenChangeEvent(!1,t,i,this.trigger(),this.triggerId());this.onOpenChange.emit(s.payload),!s.eventDetails.isCanceled()&&(this.pendingTriggerOpenInteractionType.set(null),this.closeInteractionType.set(Ke(n)),this.preventUnmountOnClose.set(s.shouldPreventUnmountOnClose()),this.open.set(!1),this.floatingContext.events.emit(`openchange`,{open:!1,reason:t,event:s.eventDetails.event}))}toggle(t,n,i,s=new Event(`dialog.open-change`)){if(this.open()&&this.trigger()===n){this.close(`trigger-press`,s);return}this.show(n,i,t,`trigger-press`,s)}setTriggerOpenInteractionType(t){this.pendingTriggerOpenInteractionType.set(t)}registerTrigger(t,n,i){return this.registeredTriggers.set(t,{element:n,payload:i}),this.triggers.update(s=>s.includes(n)?s:[...s,n]),this.floatingContext.triggers.add(n),(this.triggerId()===t||!this.trigger()&&this.triggerId()===null)&&(this.trigger.set(n),this.payload.set(i())),()=>{if(this.registeredTriggers.get(t)?.element===n&&this.registeredTriggers.delete(t),this.triggers.update(s=>s.filter(r=>r!==n)),this.floatingContext.triggers.delete(n),!this.destroyRef.destroyed&&this.trigger()===n){let s=this.registeredTriggers.entries().next().value;this.triggerId()!==null&&this.triggerId.set(s?.[0]??null),this.trigger.set(s?.[1].element),this.payload.set(s?.[1].payload())}}}openNestedChild(){return this.nestedOpenCount.update(t=>t+1),()=>this.nestedOpenCount.update(t=>t-1)}syncTriggerId(t){if(t===null){this.trigger.set(void 0),this.payload.set(void 0);return}let n=this.registeredTriggers.get(t);n&&n.element!==this.trigger()&&(this.trigger.set(n.element),this.payload.set(n.payload()))}createOpenChangeEvent(t,n,i,s,r){let u=Zn$1(n,i,s);return{eventDetails:u.eventDetails,shouldPreventUnmountOnClose:u.shouldPreventUnmountOnClose,payload:{open:t,triggerId:r,trigger:u.eventDetails.trigger,reason:u.eventDetails.reason,event:u.eventDetails.event,eventDetails:u.eventDetails}}}emitOpenChangeComplete(t){this.destroyRef.destroyed||this.onOpenChangeComplete.emit(t)}consumeOpenInteractionType(t){let n=this.pendingTriggerOpenInteractionType();return this.pendingTriggerOpenInteractionType.set(null),n??Ke(t)}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$I({type:e,selectors:[[``,`rdxDialogRoot`,``]],inputs:{open:[1,`open`],defaultOpen:[1,`defaultOpen`],triggerId:[1,`triggerId`],defaultTriggerId:[1,`defaultTriggerId`],modal:[1,`modal`],disablePointerDismissal:[1,`disablePointerDismissal`],handle:[1,`handle`]},outputs:{open:`openChange`,triggerId:`triggerIdChange`,onOpenChange:`onOpenChange`,onOpenChangeComplete:`onOpenChangeComplete`},exportAs:[`rdxDialogRoot`],features:[IS([co(uo),Jn$1(),Qn$1(()=>C(e).floatingContext)])]})}}return e})();an=(()=>{class e{constructor(){this.rootContext=B(),this.forceRender=jc(!1,{transform:Dj});let t=C(et,{optional:!0});if(t){let n=C(Pr).nativeElement;t.addFloatingElement(n),C(ve$1).onDestroy(()=>t.removeFloatingElement(n))}}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$I({type:e,selectors:[[``,`rdxDialogBackdrop`,``]],hostAttrs:[`role`,`presentation`],hostVars:7,hostBindings:function(n,i){n&2&&(Km(`hidden`,i.rootContext.nested&&!i.forceRender()),Br(`data-closed`,i.rootContext.isOpen()?void 0:``)(`data-ending-style`,i.rootContext.transitionStatus()===`ending`?``:void 0)(`data-open`,i.rootContext.isOpen()?``:void 0)(`data-starting-style`,i.rootContext.transitionStatus()===`starting`?``:void 0)(`data-nested`,i.rootContext.nested?``:void 0)(`data-nested-dialog-open`,i.rootContext.nestedDialogOpen()?``:void 0))},inputs:{forceRender:[1,`forceRender`]},exportAs:[`rdxDialogBackdrop`]})}}return e})(),un=(()=>{class e{constructor(){this.rootContext=B()}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$I({type:e,selectors:[[`button`,`rdxDialogClose`,``]],hostAttrs:[`type`,`button`],hostBindings:function(n,i){n&1&&Jm(`click`,function(r){return i.rootContext.close(`close-press`,r)})},exportAs:[`rdxDialogClose`]})}}return e})(),dn=(()=>{class e{constructor(){this.rootContext=B(),this.id=Tt(`rdx-dialog-description-`),this.rootContext.setDescriptionId(this.id),C(ve$1).onDestroy(()=>this.rootContext.setDescriptionId(void 0))}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$I({type:e,selectors:[[``,`rdxDialogDescription`,``]],hostVars:1,hostBindings:function(n,i){n&2&&Km(`id`,i.id)},exportAs:[`rdxDialogDescription`]})}}return e})(),lo=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`Home`,`End`]),fo=`data-rdx-dialog-internal-backdrop`,cn=(()=>{class e{constructor(){this.rootContext=B(),this.host=C(Pr).nativeElement,this.floatingContext=C(et),this.registration=C(Je$1,{optional:!0}),this.focusManager=C(Te),this.focusScope=C(V),this.escapeKeyDown=pj(),this.pointerDownOutside=pj(),this.focusOutside=pj(),this.interactOutside=pj(),this.openAutoFocus=Xe(qe(this.focusScope.mountAutoFocus)),this.closeAutoFocus=Xe(qe(this.focusScope.unmountAutoFocus)),this.floatingContext.setFloatingElement(this.host),sr(Ot(()=>this.rootContext.modal()===!0&&this.rootContext.isOpen()),{referenceElement:()=>this.host});let t=this.rootContext.registerTransitionElement(this.host);C(ve$1).onDestroy(t);let n=C(Se$1);OD(()=>nr(this.host,n,{marker:fo,isOpen:()=>this.rootContext.isOpen(),shouldRender:()=>this.rootContext.modal()===!0,cutout:()=>this.host.closest(`[rdxDialogViewport]`),passThrough:()=>this.host.closest(`[rdxDialogViewport]`)!==null})),new Re(this.floatingContext,()=>this.registration?.node()??null,{escapeKey:()=>!0,outsidePress:()=>this.isTopmost()&&!this.rootContext.disablePointerDismissal(),outsidePressEvent:()=>this.rootContext.modal()===!0?`intentional`:`sloppy`,focusOutside:()=>!1,onEscapeKeyDown:i=>this.escapeKeyDown.emit(i),onPointerDownOutside:i=>{this.pointerDownOutside.emit(i),this.interactOutside.emit(i)},onDismiss:(i,s)=>{this.rootContext.close(i===`escape-key`?`escape-key`:`outside-press`,s)}}),this.focusManager.focusOut.subscribe(i=>{this.focusOutside.emit(i),this.interactOutside.emit(i),i.defaultPrevented||this.rootContext.close(`focus-out`,i)})}isTopmost(){return this.rootContext.isOpen()&&!this.rootContext.nestedDialogOpen()}onKeyDown(t){lo.has(t.key)&&t.stopPropagation()}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$I({type:e,selectors:[[``,`rdxDialogPopup`,``]],hostVars:13,hostBindings:function(n,i){n&1&&Jm(`keydown`,function(r){return i.onKeyDown(r)}),n&2&&(Km(`id`,i.rootContext.contentId),Br(`role`,i.rootContext.role)(`aria-modal`,i.rootContext.modal()===!0?`true`:void 0)(`aria-describedby`,i.rootContext.descriptionId())(`aria-labelledby`,i.rootContext.titleId())(`data-closed`,i.rootContext.isOpen()?void 0:``)(`data-ending-style`,i.rootContext.transitionStatus()===`ending`?``:void 0)(`data-open`,i.rootContext.isOpen()?``:void 0)(`data-starting-style`,i.rootContext.transitionStatus()===`starting`?``:void 0)(`data-nested`,i.rootContext.nested?``:void 0)(`data-nested-dialog-open`,i.rootContext.nestedDialogOpen()?``:void 0),sg(`--%NS%nested-dialogs`,i.rootContext.nestedOpenCount()))},outputs:{escapeKeyDown:`escapeKeyDown`,pointerDownOutside:`pointerDownOutside`,focusOutside:`focusOutside`,interactOutside:`interactOutside`,openAutoFocus:`openAutoFocus`,closeAutoFocus:`closeAutoFocus`},exportAs:[`rdxDialogPopup`],features:[IS([zt(()=>{let t=B();return{modal:()=>t.modal()===!0||t.modal()===`trap-focus`,inert:()=>t.modal()===!0,enabled:()=>t.present(),restoreFocus:()=>`popup`,openInteractionType:()=>t.openInteractionType(),closeInteractionType:()=>t.closeInteractionType(),closeOnFocusOut:()=>!t.disablePointerDismissal()}})]),jI([er,Te])]})}}return e})(),ln=(()=>{class e{constructor(){this.container=jc()}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$I({type:e,selectors:[[`ng-template`,`rdxDialogPortal`,``]],inputs:{container:[1,`container`]},exportAs:[`rdxDialogPortal`],features:[IS([L$1(()=>({present:B().present}))]),jI([{directive:en,inputs:[`container`,`container`]}])]})}}return e})(),fn=(()=>{class e{constructor(){this.rootContext=B(),this.id=Tt(`rdx-dialog-title-`),this.rootContext.setTitleId(this.id),C(ve$1).onDestroy(()=>this.rootContext.setTitleId(void 0))}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$I({type:e,selectors:[[``,`rdxDialogTitle`,``]],hostVars:1,hostBindings:function(n,i){n&2&&Km(`id`,i.id)},exportAs:[`rdxDialogTitle`]})}}return e})(),pn=(()=>{class e{constructor(){this.rootContext=B()}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$I({type:e,selectors:[[``,`rdxDialogViewport`,``]],hostAttrs:[`role`,`presentation`],hostVars:8,hostBindings:function(n,i){n&2&&(Br(`data-closed`,i.rootContext.isOpen()?void 0:``)(`data-ending-style`,i.rootContext.transitionStatus()===`ending`?``:void 0)(`data-open`,i.rootContext.isOpen()?``:void 0)(`data-starting-style`,i.rootContext.transitionStatus()===`starting`?``:void 0)(`data-nested`,i.rootContext.nested?``:void 0)(`data-nested-dialog-open`,i.rootContext.nestedDialogOpen()?``:void 0),sg(`pointer-events`,i.rootContext.isOpen()?null:`none`))},exportAs:[`rdxDialogViewport`]})}}return e})()});var Oi;var Ri;var Mi;var Ii;var Ai;var Ni;var Pi;var ki;var ho=f(()=>{Kr();Kr();Je();Je();Oi=(()=>{class e{static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$I({type:e,selectors:[[``,`rdxAlertDialogBackdrop`,``]],exportAs:[`rdxAlertDialogBackdrop`],features:[jI([an])]})}}return e})(),Ri=(()=>{class e{static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$I({type:e,selectors:[[`button`,`rdxAlertDialogClose`,``]],exportAs:[`rdxAlertDialogClose`],features:[jI([un])]})}}return e})(),Mi=(()=>{class e{static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$I({type:e,selectors:[[``,`rdxAlertDialogDescription`,``]],exportAs:[`rdxAlertDialogDescription`],features:[jI([dn])]})}}return e})(),Ii=(()=>{class e{static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$I({type:e,selectors:[[``,`rdxAlertDialogPopup`,``]],exportAs:[`rdxAlertDialogPopup`],features:[jI([{directive:cn,outputs:[`escapeKeyDown`,`escapeKeyDown`,`pointerDownOutside`,`pointerDownOutside`,`focusOutside`,`focusOutside`,`interactOutside`,`interactOutside`,`openAutoFocus`,`openAutoFocus`,`closeAutoFocus`,`closeAutoFocus`]}])]})}}return e})(),Ai=(()=>{class e{static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$I({type:e,selectors:[[`ng-template`,`rdxAlertDialogPortal`,``]],exportAs:[`rdxAlertDialogPortal`],features:[jI([{directive:ln,inputs:[`container`,`container`]}])]})}}return e})(),Ni=(()=>{class e{constructor(){this.dialog=C(ie),this.open=this.dialog.open,this.triggerId=this.dialog.triggerId,this.payload=this.dialog.payload}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$I({type:e,selectors:[[``,`rdxAlertDialogRoot`,``]],exportAs:[`rdxAlertDialogRoot`],features:[IS([sn({role:`alertdialog`,forceModal:!0,forcePointerDismissalDisabled:!0})]),jI([{directive:ie,inputs:[`open`,`open`,`defaultOpen`,`defaultOpen`,`triggerId`,`triggerId`,`defaultTriggerId`,`defaultTriggerId`,`handle`,`handle`],outputs:[`openChange`,`openChange`,`triggerIdChange`,`triggerIdChange`,`onOpenChange`,`onOpenChange`,`onOpenChangeComplete`,`onOpenChangeComplete`]}])]})}}return e})(),Pi=(()=>{class e{static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$I({type:e,selectors:[[``,`rdxAlertDialogTitle`,``]],exportAs:[`rdxAlertDialogTitle`],features:[jI([fn])]})}}return e})(),ki=(()=>{class e{static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$I({type:e,selectors:[[``,`rdxAlertDialogViewport`,``]],exportAs:[`rdxAlertDialogViewport`],features:[jI([pn])]})}}return e})()});export{pn as _,Ni as a,Ri as c,dn as d,fn as f,ln as g,ki as h,Mi as i,an as l,ie as m,Ii as n,Oi as o,ho as p,Je as r,Pi as s,Ai as t,cn as u,un as v};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$n as sk,Bn as ok,Cn as ik,D as HE,Dn as kc,En as kE,Et as Ty,F as Jm,Fn as nS,G as Nc,Gt as _m,L as Kr,Nt as W,P as JF,Pt as Wm,Q as Oi,St as Tc,U as My,Wn as pg,Wt as _S,Z as Od,cn as f,cr as ve,et as Ot,gr as wt,gt as SS,ht as SE,jn as lk,l as C,ln as fS,lr as vg,lt as RE,mr as wc,o as BE,on as eH,or as vS,qt as ag,r as Ac,rn as dk,s as Br,sn as ec,st as Qm,w as Gm,x as G,xn as hg,z as Ld}from"./chunk-JmNJabM7.js";import"./chunk-BV3brnpk.js";import{n as u,t as f$1}from"./chunk-xhdtv1sC.js";import"./chunk-DHIpfbHl.js";import{n as y,t as w}from"./chunk-BX2-Fi-r.js";import{i as Ie$1,o as Ne$1}from"./chunk-Bz7JmGk-.js";import"./chunk-DCF2sSJN.js";import"./chunk-BFURpTzq.js";import"./chunk-6D7_x-nR.js";import{n as x,t as u$1}from"./chunk-CMjDdCPI.js";import{n as P,t as K}from"./chunk-Cg-fuusV.js";import{n as W$1,t as J}from"./chunk-CTthjUi7.js";var se;var le=f(()=>{se=[`claude-opus-5`,`claude-sonnet-5`,`claude-haiku-4-5`]});function Se(a,n){if(a&1&&(Oi(0,`span`,34),fS(1),Nc()),a&2){let e=HE(2);ec(),pg(e.t().inUse)}}function Ce(a,n){if(a&1&&(Oi(0,`span`,34),fS(1),Nc()),a&2){let e=HE(2);ec(),pg(e.t().cli)}}function ke(a,n){if(a&1&&(Oi(0,`div`,36),fS(1),Nc()),a&2){let e=HE().$implicit;ec(),pg(e.description)}}function we(a,n){if(a&1&&(Oi(0,`div`,37),fS(1),Nc()),a&2){let e=HE().$implicit;ec(),pg(e.reason)}}function Ee(a,n){a&1&&Qm(0)}function Te(a,n){if(a&1){let e=RE();Oi(0,`li`,5)(1,`div`,30)(2,`div`,31)(3,`div`,32)(4,`span`,33),fS(5),Nc(),SE(6,Se,2,1,`span`,34),SE(7,Ce,2,1,`span`,34),Nc(),Oi(8,`div`,35),fS(9),Nc(),SE(10,ke,2,1,`div`,36),SE(11,we,2,1,`div`,37),Nc(),Oi(12,`button`,38),Jm(`click`,function(){let l=Ld(e).$implicit;return Od(HE().test(l.name,{context:l.name}))}),fS(13),Nc(),Oi(14,`button`,39),Jm(`click`,function(){let l=Ld(e).$implicit;return Od(HE().askRemove(l.name))}),Gm(15,`app-icon`,40),Nc()(),_m(16,Ee,1,0,`ng-container`,28),Nc()}if(a&2){let e=n.$implicit,t=HE(),l=BE(48);Br(`data-testid`,`server-`+e.name),ec(5),pg(e.name),ec(),kE(e.active?6:-1),ec(),kE(e.currentInCli?7:-1),ec(2),pg(e.host),ec(),kE(e.description?10:-1),ec(),kE(!e.supported&&e.reason?11:-1),ec(),Wm(`disabled`,!e.supported||t.testing()!==null),ec(),Ac(` `,t.testing()===e.name?t.t().testing:t.t().test,` `),ec(),Wm(`title`,e.active||e.currentInCli?t.t().removeBlocked:t.t().remove)(`disabled`,e.active||e.currentInCli),Br(`aria-label`,t.t().remove),ec(),Wm(`size`,14),ec(),Wm(`ngTemplateOutlet`,l)(`ngTemplateOutletContext`,SS(15,de,e.name))}}function Pe(a,n){if(a&1&&(Oi(0,`li`,6),fS(1),Nc()),a&2){let e=HE();ec(),pg(e.t().empty)}}function Ie(a,n){if(a&1){let e=RE();Oi(0,`label`,15)(1,`span`,10),fS(2),Nc(),Oi(3,`input`,41),Jm(`input`,function(l){Ld(e);return Od(HE().username.set(l.target.value))}),Nc()()}if(a&2){let e=HE();ec(2),pg(e.t().add.username),ec(),nS(e.input),Wm(`placeholder`,e.t().add.usernamePlaceholder)(`value`,e.username())}}function De(a,n){if(a&1&&(Oi(0,`p`,22),fS(1),Nc()),a&2){let e=HE();ec(),pg(e.t().add.tcpWarning)}}function Me(a,n){a&1&&(Oi(0,`p`,23),fS(1),Nc()),a&2&&(ec(),pg(n))}function Ve(a,n){a&1&&Qm(0)}function Ae(a,n){if(a&1&&(Oi(0,`p`,43),fS(1),Nc()),a&2){let e=HE(),t=HE(2);ec(),pg(t.t().connected(e.version,e.os,e.arch))}}function Ne(a,n){if(a&1){let e=RE();Oi(0,`p`,45),fS(1),Nc(),Oi(2,`div`,46)(3,`code`,47),fS(4),Nc(),Oi(5,`button`,48),Jm(`click`,function(){let l=Ld(e),s=HE(3).$implicit;return Od(HE().trust(s,l.name,l.fingerprint))}),fS(6),Nc()()}if(a&2){let e=n,t=HE(4);ec(),pg(t.t().unknownHostKey(e.name,e.type)),ec(3),pg(e.fingerprint),ec(),Wm(`disabled`,t.testing()!==null),ec(),Ac(` `,t.t().trust,` `)}}function Ue(a,n){if(a&1&&(Oi(0,`p`,44),fS(1),Nc(),SE(2,Ne,7,4)),a&2){let e,t=HE();ec(),pg(t.problem),ec(),kE((e=t.unknownHostKey)?2:-1,e)}}function Oe(a,n){a&1&&(Oi(0,`div`,42),SE(1,Ae,2,1,`p`,43)(2,Ue,3,2),Nc()),a&2&&(ec(),kE(n.ok?1:2))}function Fe(a,n){if(a&1&&SE(0,Oe,3,1,`div`,42),a&2){let e,t=n.$implicit;kE((e=HE().results()[t])?0:-1,e)}}var de;var be;var F;var Le;var L;var pe=f(()=>{Ne$1();Kr();w();lk();sk();J();dk();f$1();Kr();de=a=>({$implicit:a}),be=(a,n)=>n.name;F=`:form`,Le=`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`,L=class a{contexts=C(y);toast=C(u);t=Ot(()=>ok().settings.servers);form=F;input=Le;servers=Ot(()=>this.contexts.contexts().filter(n=>n.name!=="default"));name=wt(``);kind=wt(`ssh`);username=wt(``);host=wt(``);port=wt(``);description=wt(``);formProblem=wt(null);saving=wt(!1);testing=wt(null);results=wt({});confirmOpen=wt(!1);removing=wt(null);filledIn=Ot(()=>this.name().trim()!==``&&this.host().trim()!==``);constructor(){this.contexts.load()}async test(n,e){this.testing.set(n);try{let t=await window.electron.contexts.test(e);this.results.update(l=>G(W({},l),{[n]:t}))}catch(t){this.results.update(l=>G(W({},l),{[n]:{ok:!1,problem:eH(t),unknownHostKey:null}}))}finally{this.testing.set(null)}}async testForm(){let n=this.server();n!==null&&(this.formProblem.set(null),await this.test(F,{server:n}))}async trust(n,e,t){try{let s=await window.electron.contexts.trustHostKey(e,t);if(!s.ok){this.results.update(_=>G(W({},_),{[n]:{ok:!1,problem:s.problem,unknownHostKey:null}}));return}}catch(s){this.results.update(_=>G(W({},_),{[n]:{ok:!1,problem:eH(s),unknownHostKey:null}}));return}let l=n===F?this.server():null;await this.test(n,l===null?{context:n}:{server:l})}async add(n){n.preventDefault();let e=this.server();if(!(e===null||this.saving())){this.saving.set(!0);try{let t=await window.electron.contexts.create(e);if(!t.ok){this.formProblem.set(t.problem);return}this.toast.success(this.t().add.added(e.name)),this.reset(),await this.contexts.load()}catch(t){this.formProblem.set(eH(t))}finally{this.saving.set(!1)}}}askRemove(n){this.removing.set(n),this.confirmOpen.set(!0)}async remove(){let n=this.removing();if(n!==null)try{let e=await window.electron.contexts.remove(n);if(!e.ok){this.toast.error(e.problem);return}this.forgetResult(n),await this.contexts.load()}catch(e){this.toast.error(eH(e))}finally{this.removing.set(null)}}server(){let n=this.port().trim(),e=n===``?null:Number(n);if(e!==null&&(!Number.isInteger(e)||e<1||e>65535))return this.formProblem.set(ok().settings.servers.add.port+`: 1–65535`),null;let t=this.username().trim(),l=this.description().trim();return{name:this.name().trim(),description:l===``?null:l,kind:this.kind(),host:this.host().trim(),port:e,username:this.kind()===`ssh`&&t!==``?t:null}}reset(){this.name.set(``),this.username.set(``),this.host.set(``),this.port.set(``),this.description.set(``),this.formProblem.set(null),this.forgetResult(F)}forgetResult(n){this.results.update(e=>Object.fromEntries(Object.entries(e).filter(([t])=>t!==n)))}static ɵfac=function(e){return new(e||a)};static ɵcmp=wc({type:a,selectors:[[`app-servers-settings`]],decls:50,vars:50,consts:[[`outcome`,``],[`data-testid`,`servers-settings`,1,`rounded-lg`,`border`,`border-ink-700`,`bg-ink-850`,`px-4`,`py-3`],[1,`text-[13px]`,`font-medium`,`text-ink-200`],[1,`mt-1`,`text-[12px]`,`text-ink-500`],[1,`mt-3`,`divide-y`,`divide-ink-700`,`border-y`,`border-ink-700`],[1,`py-2.5`],[1,`py-2.5`,`text-[13px]`,`text-ink-400`],[`data-testid`,`server-form`,1,`mt-4`,3,`submit`],[1,`mt-2`,`grid`,`grid-cols-6`,`gap-3`],[1,`col-span-3`,`block`],[1,`text-[12px]`,`text-ink-400`],[`type`,`text`,`data-testid`,`server-name`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`placeholder`,`value`],[`data-testid`,`server-kind`,3,`change`],[`value`,`ssh`,3,`selected`],[`value`,`tcp`,3,`selected`],[1,`col-span-2`,`block`],[1,`block`],[`type`,`text`,`data-testid`,`server-host`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`placeholder`,`value`],[1,`col-span-1`,`block`],[`type`,`text`,`inputmode`,`numeric`,`data-testid`,`server-port`,`autocomplete`,`off`,3,`input`,`placeholder`,`value`],[1,`col-span-6`,`block`],[`type`,`text`,`data-testid`,`server-description`,`autocomplete`,`off`,3,`input`,`placeholder`,`value`],[1,`mt-2`,`text-[12px]`,`text-warn`],[`data-testid`,`server-form-problem`,1,`mt-2`,`text-[12px]`,`text-danger`],[1,`mt-3`,`flex`,`justify-end`,`gap-2`],[`type`,`button`,`data-testid`,`server-form-test`,1,`mx-btn`,`mx-focus`,3,`click`,`disabled`],[`type`,`submit`,`data-testid`,`server-add`,1,`mx-btn`,`mx-focus`,3,`disabled`],[`name`,`plus`,3,`size`],[4,`ngTemplateOutlet`,`ngTemplateOutletContext`],[3,`openChange`,`confirmed`,`open`,`title`,`description`],[1,`flex`,`items-center`,`gap-3`],[1,`min-w-0`,`flex-1`],[1,`flex`,`items-center`,`gap-2`],[1,`text-[13px]`,`text-ink-100`],[1,`rounded`,`bg-ink-700`,`px-1.5`,`text-[11px]`,`text-ink-200`],[1,`truncate`,`font-mono`,`text-[12px]`,`text-ink-400`],[1,`text-[12px]`,`text-ink-500`],[1,`text-[12px]`,`text-danger`],[`type`,`button`,`data-testid`,`server-test`,1,`mx-btn`,`mx-focus`,3,`click`,`disabled`],[`type`,`button`,`data-testid`,`server-remove`,1,`mx-btn`,`mx-focus`,3,`click`,`title`,`disabled`],[`name`,`trash`,3,`size`],[`type`,`text`,`data-testid`,`server-username`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`placeholder`,`value`],[`data-testid`,`server-test-result`,1,`mt-2`,`text-[12px]`],[1,`text-ok`],[1,`text-danger`],[1,`mt-2`,`text-ink-300`],[1,`mt-1`,`flex`,`items-center`,`gap-3`],[`data-testid`,`server-fingerprint`,1,`min-w-0`,`flex-1`,`truncate`,`font-mono`,`text-ink-100`],[`type`,`button`,`data-testid`,`server-trust`,1,`mx-btn`,`mx-focus`,3,`click`,`disabled`]],template:function(e,t){if(e&1){let l=RE();Oi(0,`div`,1)(1,`h2`,2),fS(2),Nc(),Oi(3,`p`,3),fS(4),Nc(),Oi(5,`ul`,4),kc(6,Te,17,17,`li`,5,be,!1,Pe,2,1,`li`,6),Nc(),Oi(9,`form`,7),Jm(`submit`,function(_){return t.add(_)}),Oi(10,`h3`,2),fS(11),Nc(),Oi(12,`div`,8)(13,`label`,9)(14,`span`,10),fS(15),Nc(),Oi(16,`input`,11),Jm(`input`,function(_){return t.name.set(_.target.value)}),Nc()(),Oi(17,`label`,9)(18,`span`,10),fS(19),Nc(),Oi(20,`select`,12),Jm(`change`,function(_){return t.kind.set(_.target.value)}),Oi(21,`option`,13),fS(22),Nc(),Oi(23,`option`,14),fS(24),Nc()()(),SE(25,Ie,4,5,`label`,15),Oi(26,`label`,16)(27,`span`,10),fS(28),Nc(),Oi(29,`input`,17),Jm(`input`,function(_){return t.host.set(_.target.value)}),Nc()(),Oi(30,`label`,18)(31,`span`,10),fS(32),Nc(),Oi(33,`input`,19),Jm(`input`,function(_){return t.port.set(_.target.value)}),Nc()(),Oi(34,`label`,20)(35,`span`,10),fS(36),Nc(),Oi(37,`input`,21),Jm(`input`,function(_){return t.description.set(_.target.value)}),Nc()()(),SE(38,De,2,1,`p`,22),SE(39,Me,2,1,`p`,23),Oi(40,`div`,24)(41,`button`,25),Jm(`click`,function(){return t.testForm()}),fS(42),Nc(),Oi(43,`button`,26),Gm(44,`app-icon`,27),fS(45),Nc()(),_m(46,Ve,1,0,`ng-container`,28),Nc()(),_m(47,Fe,1,1,`ng-template`,null,0,_S),Oi(49,`app-confirm-dialog`,29),vg(`openChange`,function(_){return Ld(l),vS(t.confirmOpen,_)||(t.confirmOpen=_),Od(_)}),Jm(`confirmed`,function(){return t.remove()}),Nc()}if(e&2){let l,s=BE(48);ec(2),pg(t.t().heading),ec(2),pg(t.t().hint),ec(2),Tc(t.servers()),ec(5),pg(t.t().add.heading),ec(4),pg(t.t().add.name),ec(),nS(t.input),Wm(`placeholder`,t.t().add.namePlaceholder)(`value`,t.name()),ec(3),pg(t.t().add.kind),ec(),nS(t.input),ec(),Wm(`selected`,t.kind()===`ssh`),ec(),pg(t.t().add.ssh),ec(),Wm(`selected`,t.kind()===`tcp`),ec(),pg(t.t().add.tcp),ec(),kE(t.kind()===`ssh`?25:-1),ec(),ag(`col-span-3`,t.kind()===`ssh`)(`col-span-5`,t.kind()===`tcp`),ec(2),pg(t.t().add.host),ec(),nS(t.input),Wm(`placeholder`,t.t().add.hostPlaceholder)(`value`,t.host()),ec(3),pg(t.t().add.port),ec(),nS(t.input),Wm(`placeholder`,t.kind()===`ssh`?`22`:`2375`)(`value`,t.port()),ec(3),pg(t.t().add.description),ec(),nS(t.input),Wm(`placeholder`,t.t().add.descriptionPlaceholder)(`value`,t.description()),ec(),kE(t.kind()===`tcp`?38:-1),ec(),kE((l=t.formProblem())?39:-1,l),ec(2),Wm(`disabled`,!t.filledIn()||t.testing()!==null),ec(),Ac(` `,t.testing()===t.form?t.t().testing:t.t().test,` `),ec(),Wm(`disabled`,!t.filledIn()||t.saving()),ec(),Wm(`size`,14),ec(),Ac(` `,t.t().add.submit,` `),ec(),Wm(`ngTemplateOutlet`,s)(`ngTemplateOutletContext`,SS(48,de,t.form)),ec(3),hg(`open`,t.confirmOpen),Wm(`title`,t.t().removeTitle(t.removing()??``))(`description`,t.t().removeDescription)}},dependencies:[W$1,My,Ie$1],encapsulation:2})}});function Ke(a,n){if(a&1&&(Oi(0,`option`,10),fS(1),Nc()),a&2){let e=n.$implicit,t=HE();Wm(`value`,e.value)(`selected`,e.value===t.language),Br(`lang`,e.value),ec(),pg(e.name)}}function Re(a,n){if(a&1&&(Oi(0,`p`,17),fS(1),Nc()),a&2){let e=HE(2);ec(),pg(e.t().startup.shortcutTaken)}}function $e(a,n){if(a&1&&(Oi(0,`p`,23),fS(1),Nc()),a&2){let e=HE(),t=HE();ec(),pg(t.lastPrune(e.lastAutoPrune))}}function He(a,n){if(a&1&&(Oi(0,`span`,26),fS(1),Nc()),a&2){let e=HE(2);ec(),pg(e.t().update.version(n.current))}}function je(a,n){if(a&1){let e=RE();Oi(0,`button`,35),Jm(`click`,function(){Ld(e);return Od(HE(2).install())}),fS(1),Nc()}if(a&2){let e=HE(2);ec(),Ac(` `,e.t().update.install,` `)}}function ze(a,n){if(a&1){let e=RE();Oi(0,`button`,36),Jm(`click`,function(){Ld(e);return Od(HE(2).check())}),fS(1),Nc()}if(a&2){let e=HE(2);Wm(`disabled`,e.updateState()===`checking`||e.updateState()===`downloading`),ec(),Ac(` `,e.t().update.check,` `)}}function We(a,n){if(a&1){let e=RE();Oi(0,`div`,29)(1,`app-filter-switch`,16),Jm(`onChange`,function(l){Ld(e);return Od(HE(2).update({autoUpdate:l}))}),Nc()()}if(a&2){let e=HE(),t=HE();ec(),Wm(`label`,t.t().update.auto)(`on`,e.autoUpdate)}}function Be(a,n){if(a&1&&(Oi(0,`option`,10),fS(1),Nc()),a&2){let e=n.$implicit,t=HE();Wm(`value`,e.value)(`selected`,e.value===t.assistantModel),ec(),pg(e.name)}}function Ge(a,n){if(a&1){let e=RE();Oi(0,`div`,7)(1,`span`,39),fS(2),Nc(),Oi(3,`button`,40),Jm(`click`,function(){Ld(e);return Od(HE(3).clearKey())}),Gm(4,`app-icon`,41),fS(5),Nc()()}if(a&2){let e=HE(3);ec(2),pg(e.t().assistant.configured),ec(2),Wm(`size`,14),ec(),Ac(` `,e.t().assistant.clearKey,` `)}}function qe(a,n){if(a&1){let e=RE();Oi(0,`form`,42),Jm(`submit`,function(l){Ld(e);return Od(HE(3).saveKey(l))}),Oi(1,`label`,43),fS(2),Nc(),Oi(3,`input`,44),Jm(`input`,function(l){Ld(e);return Od(HE(3).keyDraft.set(l.target.value))}),Nc(),Oi(4,`button`,45),fS(5),Nc()()}if(a&2){let e=HE(),t=HE(2);ec(2),pg(t.t().assistant.keyLabel),ec(),Wm(`value`,t.keyDraft())(`disabled`,!e.storageAvailable),ec(),Wm(`disabled`,!e.storageAvailable||t.keyDraft().trim()===``),ec(),Ac(` `,t.common().save,` `)}}function Je(a,n){a&1&&(Oi(0,`p`,38),fS(1),Nc()),a&2&&(ec(),pg(n))}function Qe(a,n){if(a&1&&(SE(0,Ge,6,3,`div`,7)(1,qe,6,5,`form`,37),SE(2,Je,2,1,`p`,38),Oi(3,`p`,11),fS(4),Nc()),a&2){let e,t=HE(2);kE(n.configured?0:1),ec(2),kE((e=t.keyProblem())?2:-1,e),ec(2),pg(t.t().assistant.hint)}}function Xe(a,n){if(a&1){let e=RE();Oi(0,`div`,3)(1,`div`,4)(2,`div`,5)(3,`h2`,6),fS(4),Nc(),Oi(5,`div`,7)(6,`label`,8),fS(7),Nc(),Oi(8,`select`,9),Jm(`change`,function(l){Ld(e);return Od(HE().chooseLanguage(l.target.value))}),kc(9,Ke,2,4,`option`,10,ce),Nc()(),Oi(11,`p`,11),fS(12),Nc()(),Oi(13,`div`,12)(14,`h2`,6),fS(15),Nc(),Oi(16,`div`,13)(17,`app-filter-switch`,14),Jm(`onChange`,function(l){Ld(e);return Od(HE().update({startAtLogin:l}))}),Nc()(),Oi(18,`p`,11),fS(19),Nc(),Oi(20,`div`,15)(21,`app-filter-switch`,16),Jm(`onChange`,function(l){Ld(e);return Od(HE().update({paletteShortcut:l}))}),Nc()(),SE(22,Re,2,1,`p`,17),Nc(),Oi(23,`div`,12)(24,`h2`,6),fS(25),Nc(),Oi(26,`div`,18)(27,`div`,19)(28,`app-filter-switch`,16),Jm(`onChange`,function(l){Ld(e);return Od(HE().update({notifyCrash:l}))}),Nc()(),Oi(29,`div`,20)(30,`app-filter-switch`,16),Jm(`onChange`,function(l){Ld(e);return Od(HE().update({notifyUnhealthy:l}))}),Nc()(),Oi(31,`div`,21)(32,`app-filter-switch`,16),Jm(`onChange`,function(l){Ld(e);return Od(HE().update({notifyWiring:l}))}),Nc()()(),Oi(33,`p`,11),fS(34),Nc()(),Oi(35,`div`,12)(36,`h2`,6),fS(37),Nc(),Oi(38,`div`,22)(39,`app-filter-switch`,16),Jm(`onChange`,function(l){Ld(e);return Od(HE().update({autoPrune:l}))}),Nc()(),Oi(40,`p`,11),fS(41),Nc(),SE(42,$e,2,1,`p`,23),Nc(),Oi(43,`div`,24)(44,`div`,25)(45,`h2`,6),fS(46),Nc(),SE(47,He,2,1,`span`,26),SE(48,je,2,1,`button`,27)(49,ze,2,2,`button`,28),Nc(),SE(50,We,2,2,`div`,29),Oi(51,`p`,30),fS(52),Nc()(),Oi(53,`div`,31)(54,`h2`,6),fS(55,`Claude`),Nc(),Oi(56,`div`,32)(57,`label`,33),fS(58),Nc(),Oi(59,`select`,34),Jm(`change`,function(l){Ld(e);return Od(HE().update({assistantModel:l.target.value}))}),kc(60,Be,2,3,`option`,10,ce),Nc()(),Oi(62,`p`,11),fS(63),Nc(),SE(64,Qe,5,3),Nc()(),Gm(65,`app-servers-settings`),Nc()}if(a&2){let e,t,l=n,s=HE();ec(4),pg(s.t().language.heading),ec(3),pg(s.t().language.label),ec(2),Tc(s.languages),ec(3),pg(s.t().language.hint),ec(3),pg(s.t().startup.heading),ec(2),Wm(`label`,s.t().startup.startAtLogin)(`on`,l.startAtLogin)(`disabled`,!l.startAtLoginAvailable),ec(2),Ac(` `,l.startAtLoginAvailable?s.t().startup.hintAvailable:s.t().startup.hintUnavailable,` `),ec(2),Wm(`label`,s.t().startup.paletteShortcut)(`on`,l.paletteShortcut),ec(),kE(l.paletteShortcut&&!l.paletteShortcutActive?22:-1),ec(3),pg(s.t().notifications.heading),ec(3),Wm(`label`,s.t().notifications.crash)(`on`,l.notifyCrash),ec(2),Wm(`label`,s.t().notifications.unhealthy)(`on`,l.notifyUnhealthy),ec(2),Wm(`label`,s.t().notifications.wiring)(`on`,l.notifyWiring),ec(2),pg(s.t().notifications.hint),ec(3),pg(s.t().prune.heading),ec(2),Wm(`label`,s.t().prune.auto)(`on`,l.autoPrune),ec(2),pg(s.t().prune.hint),ec(),kE(l.autoPrune?42:-1),ec(4),pg(s.t().update.heading),ec(),kE((e=s.appUpdate())?47:-1,e),ec(),kE(s.updateState()===`ready`?48:s.updateState()!==`unavailable`?49:-1),ec(2),kE(s.updateState()!==`unavailable`?50:-1),ec(2),pg(s.updateText()),ec(6),pg(s.t().assistant.model),ec(2),Tc(s.models),ec(3),pg(s.t().assistant.modelHint),ec(),kE((t=s.assistant())?64:-1,t)}}var ce;var Ye;var me;f(()=>{Kr();le();sk();lk();K();dk();x();pe();Kr();ce=(a,n)=>n.value;Ye={"claude-opus-5":`Opus 5`,"claude-sonnet-5":`Sonnet 5`,"claude-haiku-4-5":`Haiku 4.5`},me=class a{t=Ot(()=>ok().settings);common=Ot(()=>ok().common);languages=Object.keys(JF).map(n=>({value:n,name:JF[n]}));models=se.map(n=>({value:n,name:Ye[n]}));settings=wt(null);problem=wt(null);appUpdate=wt(null);assistant=wt(null);keyDraft=wt(``);keyProblem=wt(null);updateState=Ot(()=>this.appUpdate()?.status.state??`unavailable`);updateText=Ot(()=>{let n=this.appUpdate()?.status??{state:`unavailable`},e=this.t().update;switch(n.state){case`unavailable`:return e.unavailable;case`idle`:return e.idle;case`checking`:return e.checking;case`upToDate`:return e.upToDate(new Date(n.checkedAt).toLocaleTimeString(ik(),{hour:`2-digit`,minute:`2-digit`}));case`downloading`:return e.downloading(n.version,n.percent);case`ready`:return e.ready(n.version);case`error`:return e.error(n.problem)}});constructor(){this.load(),this.loadAppUpdate(),this.loadAssistant();let n=window.electron.appUpdate.onChange(e=>this.appUpdate.set(e));C(ve).onDestroy(n)}async check(){try{this.appUpdate.set(await window.electron.appUpdate.check())}catch(n){this.problem.set(eH(n))}}async install(){try{await window.electron.appUpdate.install()}catch(n){this.problem.set(eH(n))}}lastPrune(n){let e=this.t().prune;return n===null?e.never:e.last(new Intl.DateTimeFormat(ik(),{dateStyle:`long`,timeStyle:`short`}).format(n))}async update(n){try{this.settings.set(await window.electron.settings.update(n)),this.problem.set(null)}catch(e){this.problem.set(eH(e)),await this.load()}}async chooseLanguage(n){Ty(n),await this.update({language:n}),Ty(this.settings()?.language??n)}async saveKey(n){n.preventDefault();try{let e=await window.electron.assistant.setKey(this.keyDraft());if(!e.ok){this.keyProblem.set(e.problem);return}this.keyDraft.set(``),this.keyProblem.set(null),await this.loadAssistant()}catch(e){this.keyProblem.set(eH(e))}}async clearKey(){try{this.assistant.set(await window.electron.assistant.clearKey()),this.keyProblem.set(null)}catch(n){this.keyProblem.set(eH(n))}}async loadAssistant(){try{this.assistant.set(await window.electron.assistant.status())}catch(n){this.problem.set(eH(n))}}async loadAppUpdate(){try{this.appUpdate.set(await window.electron.appUpdate.get())}catch(n){this.problem.set(eH(n))}}async load(){try{this.settings.set(await window.electron.settings.get())}catch(n){this.problem.set(eH(n))}}static ɵfac=function(e){return new(e||a)};static ɵcmp=wc({type:a,selectors:[[`app-settings-page`]],decls:5,vars:3,consts:[[1,`h-full`,`overflow-y-auto`,`px-6`,`pt-5`,`pb-8`],[1,`text-xl`,`font-semibold`,`tracking-tight`,`text-ink-100`],[3,`problem`],[1,`mt-4`,`grid`,`max-w-6xl`,`items-start`,`gap-4`,`lg:grid-cols-2`],[1,`space-y-4`],[`data-testid`,`setting-language`,1,`rounded-lg`,`border`,`border-ink-700`,`bg-ink-850`,`px-4`,`py-3`],[1,`text-[13px]`,`font-medium`,`text-ink-200`],[1,`mt-3`,`flex`,`items-center`,`gap-3`],[`for`,`setting-language`,1,`text-[13px]`,`text-ink-300`],[`id`,`setting-language`,1,`mx-focus`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-800`,`px-2.5`,`py-1.5`,`text-[13px]`,`text-ink-100`,3,`change`],[3,`value`,`selected`],[1,`mt-2`,`text-[12px]`,`text-ink-500`],[1,`rounded-lg`,`border`,`border-ink-700`,`bg-ink-850`,`px-4`,`py-3`],[`data-testid`,`setting-start-at-login`,1,`mt-3`],[3,`onChange`,`label`,`on`,`disabled`],[`data-testid`,`setting-palette-shortcut`,1,`mt-3`],[3,`onChange`,`label`,`on`],[`data-testid`,`shortcut-taken`,1,`mt-2`,`text-[12px]`,`text-warn`],[1,`mt-3`,`space-y-2.5`],[`data-testid`,`setting-notify-crash`],[`data-testid`,`setting-notify-unhealthy`],[`data-testid`,`setting-notify-wiring`],[`data-testid`,`setting-auto-prune`,1,`mt-3`],[`data-testid`,`auto-prune-last`,1,`mt-1`,`text-[12px]`,`text-ink-400`],[`data-testid`,`app-update`,1,`rounded-lg`,`border`,`border-ink-700`,`bg-ink-850`,`px-4`,`py-3`],[1,`flex`,`items-center`,`gap-3`],[1,`font-mono`,`text-[12px]`,`text-ink-500`],[`type`,`button`,`data-testid`,`app-update-install`,1,`mx-btn`,`mx-focus`,`ml-auto`],[`type`,`button`,`data-testid`,`app-update-check`,1,`mx-btn`,`mx-focus`,`ml-auto`,3,`disabled`],[`data-testid`,`setting-auto-update`,1,`mt-3`],[`data-testid`,`app-update-status`,1,`mt-2`,`text-[12px]`,`text-ink-500`],[`data-testid`,`assistant-settings`,1,`rounded-lg`,`border`,`border-ink-700`,`bg-ink-850`,`px-4`,`py-3`],[`data-testid`,`setting-assistant-model`,1,`mt-3`,`flex`,`items-center`,`gap-3`],[`for`,`setting-assistant-model`,1,`text-[13px]`,`text-ink-300`],[`id`,`setting-assistant-model`,1,`mx-focus`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-800`,`px-2.5`,`py-1.5`,`text-[13px]`,`text-ink-100`,3,`change`],[`type`,`button`,`data-testid`,`app-update-install`,1,`mx-btn`,`mx-focus`,`ml-auto`,3,`click`],[`type`,`button`,`data-testid`,`app-update-check`,1,`mx-btn`,`mx-focus`,`ml-auto`,3,`click`,`disabled`],[1,`mt-3`,`flex`,`gap-2`],[1,`mt-2`,`text-[12px]`,`text-danger`],[1,`text-[13px]`,`text-ink-300`],[`type`,`button`,`data-testid`,`assistant-clear-key`,1,`mx-btn`,`mx-focus`,`ml-auto`,3,`click`],[`name`,`trash`,3,`size`],[1,`mt-3`,`flex`,`gap-2`,3,`submit`],[`for`,`assistant-key`,1,`sr-only`],[`id`,`assistant-key`,`type`,`password`,`placeholder`,`sk-ant-…`,`autocomplete`,`off`,`spellcheck`,`false`,1,`mx-focus`,`min-w-0`,`flex-1`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-800`,`px-3`,`py-1.5`,`font-mono`,`text-[13px]`,`text-ink-100`,`placeholder:text-ink-500`,3,`input`,`value`,`disabled`],[`type`,`submit`,`data-testid`,`assistant-save-key`,1,`mx-btn`,`mx-focus`,3,`disabled`]],template:function(e,t){if(e&1&&(Oi(0,`section`,0)(1,`h1`,1),fS(2),Nc(),Gm(3,`app-page-messages`,2),SE(4,Xe,66,32,`div`,3),Nc()),e&2){let l;ec(2),pg(t.t().title),ec(),Wm(`problem`,t.problem()),ec(),kE((l=t.settings())?4:-1,l)}},dependencies:[P,u$1,My,L],encapsulation:2})}})();export{me as SettingsPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$n as sk,Bn as ok,L as Kr,Rt as X,cn as f,cr as ve,et as Ot,gr as wt,jn as lk,l as C,on as eH}from"./chunk-
|
|
1
|
+
import{$n as sk,Bn as ok,L as Kr,Rt as X,cn as f,cr as ve,et as Ot,gr as wt,jn as lk,l as C,on as eH}from"./chunk-JmNJabM7.js";import{n as u,t as f$1}from"./chunk-xhdtv1sC.js";import{i as h$1,r as d}from"./chunk-DiZLvyn5.js";function M(n){let e=ok().images.check,t=p=>n.filter(f=>f.state===p).length,s=t(`update`),o=[s===0?e.allCurrent:e.updates(s)];return t(`unknown`)>0&&o.push(e.notInRegistry(t(`unknown`))),t(`error`)>0&&o.push(e.uncheckable(t(`error`))),e.summary(o.join(`, `),n.length)}var h;var P=f(()=>{Kr();h$1();lk();f$1();sk();Kr();h=class n{toast=C(u);items=wt([]);busy=wt(!1);loadProblem=wt(null);running=wt(new Set);updateResults=wt(null);checking=wt(!1);images=this.items.asReadonly();loading=this.busy.asReadonly();problem=this.loadProblem.asReadonly();pending=this.running.asReadonly();updates=this.updateResults.asReadonly();checkingUpdates=this.checking.asReadonly();totalBytes=Ot(()=>[...new Map(this.items().map(e=>[e.id,e.sizeBytes]))].reduce((e,[,t])=>e+t,0));unusedCount=Ot(()=>this.items().filter(e=>e.inUseBy===0).length);constructor(){C(ve).onDestroy(window.electron.events.subscribe(e=>{e.includes(`image`)&&this.refresh()}))}async refresh(){this.busy.set(!0);try{this.items.set(await window.electron.images.list()),this.loadProblem.set(null)}catch(e){this.loadProblem.set(eH(e))}finally{this.busy.set(!1)}}async remove(e,t){this.running.update(s=>new Set(s).add(e));try{let s=await window.electron.images.remove(e,t);s.ok||this.toast.error(s.problem)}finally{this.running.update(s=>{let o=new Set(s);return o.delete(e),o})}await this.refresh()}async removeMany(e,t){await Promise.all(e.map(s=>this.remove(s,t)))}async prune(e){this.busy.set(!0);try{let t=await window.electron.images.prune(e);t.ok?this.toast.success(t.removed===0?ok().common.nothingToPrune:ok().images.pruned(t.removed,d(t.reclaimedBytes))):this.toast.error(t.problem)}finally{this.busy.set(!1)}await this.refresh()}async checkUpdates(){this.checking.set(!0);try{let e=await window.electron.images.checkUpdates();this.updateResults.set(new Map(e.map(t=>[t.reference,t]))),this.toast.success(M(e))}catch(e){this.toast.error(eH(e))}finally{this.checking.set(!1)}}async recheckIfChecked(){this.updateResults()!==null&&await this.checkUpdates()}static ɵfac=function(t){return new(t||n)};static ɵprov=X({token:n,factory:n.ɵfac,providedIn:`root`})}});export{h as n,P as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as M,L as Kr,Xn as rf,Y as OD,cn as f$1}from"./chunk-
|
|
1
|
+
import{B as M,L as Kr,Xn as rf,Y as OD,cn as f$1}from"./chunk-JmNJabM7.js";import{E as tn,g as en}from"./chunk-DCF2sSJN.js";function L(r){return{provide:v,useFactory:r}}var p;var N;var f;var v;var g=f$1(()=>{Kr();tn();p={mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}},N=50,f=class{constructor(e){this.host=e,this.nodes=[],this.prevAnimationNames=new WeakMap,this.pendingExits=new Set,this.removeListeners=null,this.closeTimestamp=0,this.exitVersion=0,this.waapiPending=!1,this.safetyTimer=null,this.prevPresent=e.present(),this.state=this.prevPresent?`mounted`:`unmounted`,this.prevPresent&&this.mount(),rf(()=>{let i=e.present();i!==this.prevPresent&&(this.prevPresent=i,i?this.send(`MOUNT`):e.isBrowser?(this.closeTimestamp=this.now(),OD(()=>this.evaluateExit(),{injector:e.injector})):this.send(`UNMOUNT`))},{injector:e.injector,debugName:`PresenceMachine.present`})}dispose(){this.unmount()}evaluateExit(){if(this.state!==`mounted`||this.host.present())return;this.pendingExits.clear();for(let i of this.nodes){let t=getComputedStyle(i),n=t.animationName||`none`,s=this.prevAnimationNames.get(i)??`none`;n!==`none`&&t.display!==`none`&&s!==n&&this.pendingExits.add(i)}let e=this.collectExitAnimations();if(this.pendingExits.size===0&&e.length===0){this.send(`UNMOUNT`);return}if(this.send(`ANIMATION_OUT`),e.length>0){this.waapiPending=!0;let i=this.exitVersion;Promise.all(e.map(t=>t.finished.catch(()=>{}))).then(()=>this.finishExit(i)),this.armSafetyNet(i,e)}}collectExitAnimations(){if(!this.host.isBrowser)return[];let e=[];for(let i of this.nodes)if(typeof i.getAnimations==`function`)for(let t of i.getAnimations({subtree:!0})){let n=t.startTime===null||Number(t.startTime)>=this.closeTimestamp;(t.playState===`running`||t.pending)&&n&&e.push(t)}return e}armSafetyNet(e,i){let t=new Set(this.nodes);for(let s of i){let o=s.effect?.target;o instanceof HTMLElement&&t.add(o)}let n=0;for(let s of t)n=Math.max(n,en(s));this.clearSafetyNet(),this.safetyTimer=setTimeout(()=>this.finishExit(e),n+N)}finishExit(e){e===this.exitVersion&&(this.waapiPending=!1,this.clearSafetyNet(),this.send(`ANIMATION_END`))}clearSafetyNet(){this.safetyTimer!==null&&(clearTimeout(this.safetyTimer),this.safetyTimer=null)}send(e){let i=p[this.state][e];if(!(i===void 0||i===this.state))if(this.state=i,i===`mounted`)if(this.exitVersion++,this.waapiPending=!1,this.clearSafetyNet(),this.nodes.length>0){this.pendingExits.clear();for(let t of this.nodes)this.prevAnimationNames.set(t,this.getAnimationName(t))}else this.mount();else i===`unmounted`&&(this.exitVersion++,this.unmount())}mount(){if(this.nodes=this.host.mountView(),this.host.isBrowser&&this.nodes.length>0){for(let e of this.nodes)this.prevAnimationNames.set(e,this.getAnimationName(e));this.addAnimationListeners()}}unmount(){this.removeListeners?.(),this.removeListeners=null,this.clearSafetyNet(),this.waapiPending=!1,this.host.destroyView(),this.nodes=[],this.pendingExits.clear()}addAnimationListeners(){let e=t=>{let n=t.target;this.nodes.includes(n)&&this.prevAnimationNames.set(n,this.getAnimationName(n))},i=t=>{let n=t.target;this.nodes.includes(n)&&this.getAnimationName(n).includes(t.animationName)&&(this.pendingExits.delete(n),!this.waapiPending&&this.pendingExits.size===0&&this.finishExit(this.exitVersion))};for(let t of this.nodes)t.addEventListener(`animationstart`,e),t.addEventListener(`animationcancel`,i),t.addEventListener(`animationend`,i);this.removeListeners=()=>{for(let t of this.nodes)t.removeEventListener(`animationstart`,e),t.removeEventListener(`animationcancel`,i),t.removeEventListener(`animationend`,i)}}getAnimationName(e){return(this.host.isBrowser?getComputedStyle(e).animationName:``)||`none`}now(){let e=typeof document<`u`?document.timeline?.currentTime:null;return typeof e==`number`?e:Number(e??0)}},v=new M(`RdxPresenceContext`)});export{v as i,f as n,g as r,L as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{L as Kr,Rt as X,cn as f,cr as ve,et as Ot,gr as wt,jn as lk,l as C,on as eH}from"./chunk-
|
|
1
|
+
import{L as Kr,Rt as X,cn as f,cr as ve,et as Ot,gr as wt,jn as lk,l as C,on as eH}from"./chunk-JmNJabM7.js";import{n as u$1,t as f$1}from"./chunk-xhdtv1sC.js";var u;var v=f(()=>{Kr();lk();f$1();Kr();u=class o{toast=C(u$1);items=wt([]);measurements=wt(new Map);busy=wt(!1);loadProblem=wt(null);running=wt(new Set);containers=this.items.asReadonly();stats=this.measurements.asReadonly();loading=this.busy.asReadonly();problem=this.loadProblem.asReadonly();pending=this.running.asReadonly();runningIds=Ot(()=>this.items().filter(e=>e.state===`running`).map(e=>e.id),{equal:(e,n)=>e.length===n.length&&e.every((t,a)=>t===n[a])});constructor(){let e=C(ve);e.onDestroy(window.electron.events.subscribe(n=>{n.includes(`container`)&&this.refresh()})),e.onDestroy(window.electron.containers.onStats(n=>this.applyStats(n)))}async refresh(){this.busy.set(!0);try{this.items.set(await window.electron.containers.list()),this.loadProblem.set(null)}catch(e){this.loadProblem.set(eH(e))}finally{this.busy.set(!1)}}watchStats(e){window.electron.containers.watchStats(e)}async run(e,n){this.running.update(t=>new Set(t).add(n));try{let t=await window.electron.containers.action(e,n);t.ok||this.toast.error(t.problem)}finally{this.running.update(t=>{let a=new Set(t);return a.delete(n),a})}}async runMany(e,n){await Promise.all(n.map(t=>this.run(e,t)))}applyStats(e){let n=new Map(this.measurements());for(let t of e)n.set(t.id,t);this.measurements.set(n)}static ɵfac=function(n){return new(n||o)};static ɵprov=X({token:o,factory:o.ɵfac,providedIn:`root`})}});export{v as n,u as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$n as sk,Bn as ok,Cr as zE,D as HE,Dn as kc,En as kE,F as Jm,G as Nc,L as Kr,Pn as mj,Pt as Wm,Q as Oi,Qn as sg,Sn as hj,St as Tc,Tn as jc,Z as Od,a as Ar,cn as f,et as Ot,gt as SS,ht as SE,ir as tg,l as C,ln as fS,lt as RE,mr as wc,qt as ag,r as Ac,s as Br,sn as ec,st as Qm,t as $I,ur as vj,w as Gm,z as Ld}from"./chunk-
|
|
1
|
+
import{$n as sk,Bn as ok,Cr as zE,D as HE,Dn as kc,En as kE,F as Jm,G as Nc,L as Kr,Pn as mj,Pt as Wm,Q as Oi,Qn as sg,Sn as hj,St as Tc,Tn as jc,Z as Od,a as Ar,cn as f,et as Ot,gt as SS,ht as SE,ir as tg,l as C,ln as fS,lt as RE,mr as wc,qt as ag,r as Ac,s as Br,sn as ec,st as Qm,t as $I,ur as vj,w as Gm,z as Ld}from"./chunk-JmNJabM7.js";import{i as Ie,o as Ne}from"./chunk-Bz7JmGk-.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=RE();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=RE();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=$I({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=$I({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 +1 @@
|
|
|
1
|
-
import{L as Kr,Rt as X,cn as f,gr as wt,jn as lk,on as eH}from"./chunk-
|
|
1
|
+
import{L as Kr,Rt as X,cn as f,gr as wt,jn as lk,on as eH}from"./chunk-JmNJabM7.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 +1 @@
|
|
|
1
|
-
import{$n as sk,Bn as ok,L as Kr,Rt as X,cn as f,et as Ot,gr as wt,jn as lk,l as C,on as eH}from"./chunk-
|
|
1
|
+
import{$n as sk,Bn as ok,L as Kr,Rt as X,cn as f,et as Ot,gr as wt,jn as lk,l as C,on as eH}from"./chunk-JmNJabM7.js";import{n as y$1,t as o}from"./chunk-BV3brnpk.js";import{n as u,t as f$1}from"./chunk-xhdtv1sC.js";import{n as y$2,t as c}from"./chunk-DHIpfbHl.js";var y;var w=f(()=>{Kr();y$2();y$1();lk();sk();f$1();Kr();y=class i{engine=C(o);compose=C(c);toast=C(u);items=wt([]);busy=wt(!1);failure=wt(null);contexts=this.items.asReadonly();switching=this.busy.asReadonly();problem=this.failure.asReadonly();active=Ot(()=>this.items().find(e=>e.active)??null);async load(){try{this.items.set(await window.electron.contexts.list()),this.failure.set(null)}catch(e){this.failure.set(eH(e))}}async use(e){if(!(this.busy()||e===this.active()?.name)){this.busy.set(!0);try{let t=await window.electron.contexts.use(e);if(!t.ok){this.toast.error(t.problem,ok().dashboard.contexts.switchFailed(e));return}await Promise.all([this.load(),this.engine.refresh(),this.compose.loadStatus()])}catch(t){this.toast.error(eH(t),ok().dashboard.contexts.switchFailed(e))}finally{this.busy.set(!1)}}}static ɵfac=function(t){return new(t||i)};static ɵprov=X({token:i,factory:i.ɵfac,providedIn:`root`})}});export{y as n,w as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$n as sk,Bn as ok,L as Kr,Nt as W,Rt as X,cn as f,cr as ve,et as Ot,gr as wt,jn as lk,l as C,on as eH,x as G}from"./chunk-
|
|
1
|
+
import{$n as sk,Bn as ok,L as Kr,Nt as W,Rt as X,cn as f,cr as ve,et as Ot,gr as wt,jn as lk,l as C,on as eH,x as G}from"./chunk-JmNJabM7.js";import{n as u,t as f$1}from"./chunk-xhdtv1sC.js";import{i as h,r as d}from"./chunk-DiZLvyn5.js";var w;var B=f(()=>{Kr();h();lk();f$1();sk();Kr();w=class l{toast=C(u);items=wt([]);sizeByName=wt({});busy=wt(!1);sizesBusy=wt(!1);loadProblem=wt(null);running=wt(new Set);loading=this.busy.asReadonly();loadingSizes=this.sizesBusy.asReadonly();problem=this.loadProblem.asReadonly();pending=this.running.asReadonly();volumes=Ot(()=>{let s=this.sizeByName();return this.items().map(e=>G(W({},e),{sizeBytes:s[e.name]??null}))});totalBytes=Ot(()=>this.volumes().reduce((s,e)=>s+(e.sizeBytes??0),0));unusedCount=Ot(()=>this.items().filter(s=>s.inUseBy===0).length);constructor(){C(ve).onDestroy(window.electron.events.subscribe(s=>{s.includes(`volume`)&&this.refresh()}))}async refresh(){this.busy.set(!0);try{this.items.set(await window.electron.volumes.list()),this.loadProblem.set(null)}catch(s){this.loadProblem.set(eH(s))}finally{this.busy.set(!1)}this.loadSizes()}async loadSizes(){this.sizesBusy.set(!0);try{this.sizeByName.set(await window.electron.volumes.sizes())}catch{}finally{this.sizesBusy.set(!1)}}async create(s){let e;try{let t=await window.electron.volumes.create(s);e=t.ok?null:t.problem}catch(t){e=eH(t)}return e===null&&(this.toast.success(ok().volumes.created(s.name)),await this.refresh()),e}async remove(s,e){this.running.update(t=>new Set(t).add(s));try{let t=await window.electron.volumes.remove(s,e);t.ok||this.toast.error(t.problem)}finally{this.running.update(t=>{let i=new Set(t);return i.delete(s),i})}await this.refresh()}async removeMany(s,e){await Promise.all(s.map(t=>this.remove(t,e)))}async prune(s){this.busy.set(!0);try{let e=await window.electron.volumes.prune(s);e.ok?this.toast.success(e.removed===0?ok().common.nothingToPrune:ok().volumes.pruned(e.removed,d(e.reclaimedBytes))):this.toast.error(e.problem)}finally{this.busy.set(!1)}await this.refresh()}async backup(s){await this.whilePending(s,async()=>{let e=await window.electron.volumes.backup(s);e.ok?e.savedTo!==null&&this.toast.success(ok().volumes.backedUp(s,e.savedTo)):this.toast.error(e.problem)})}async restore(s){await this.whilePending(s,async()=>{let e=await window.electron.volumes.restore(s);e.ok?e.restoredFrom!==null&&this.toast.success(ok().volumes.restored(e.restoredFrom,s)):this.toast.error(e.problem)}),await this.loadSizes()}async whilePending(s,e){this.running.update(t=>new Set(t).add(s));try{await e()}catch(t){this.toast.error(eH(t))}finally{this.running.update(t=>{let i=new Set(t);return i.delete(s),i})}}static ɵfac=function(e){return new(e||l)};static ɵprov=X({token:l,factory:l.ɵfac,providedIn:`root`})}});export{w as n,B as t};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{$n as sk,Bn as ok,Ct as Tg,D as HE,En as kE,F as Jm,Fn as nS,G as Nc,Gt as _m,L as Kr,Nn as mg,Pt as Wm,Q as Oi,Tn as jc,U as My,Wn as pg,Xn as rf,cn as f,et as Ot,gr as wt,gt as SS,ht as SE,l as C,ln as fS,mr as wc,pt as Rp,r as Ac,rn as dk,sn as ec,w as Gm}from"./chunk-
|
|
1
|
+
import{$n as sk,Bn as ok,Ct as Tg,D as HE,En as kE,F as Jm,Fn as nS,G as Nc,Gt as _m,L as Kr,Nn as mg,Pt as Wm,Q as Oi,Tn as jc,U as My,Wn as pg,Xn as rf,cn as f,et as Ot,gr as wt,gt as SS,ht as SE,l as C,ln as fS,mr as wc,pt as Rp,r as Ac,rn as dk,sn as ec,w as Gm}from"./chunk-JmNJabM7.js";import"./chunk-xhdtv1sC.js";import"./chunk-Bz7JmGk-.js";import{n as v,t as u}from"./chunk-BGRmfw3c.js";import{n as x,t as u$1}from"./chunk-CMjDdCPI.js";import{a as Yt,u as ra}from"./chunk-v1AXLZwF.js";import{i as z,n as oe$1,r as x$1}from"./chunk-BSE5rhLU.js";function U(n,e){let t=new Map;for(let o of n)if(o.state===`running`)for(let i of o.ports)i.hostPort!==null&&t.set(`${o.id}:${String(i.hostPort)}:${String(i.containerPort)}/${i.protocol}`,{hostPort:i.hostPort,containerId:o.id,containerName:o.name,containerPort:i.containerPort,protocol:i.protocol,hostIp:i.hostIp??null,missing:!1});for(let o of e)if(o.kind===`ports`)for(let i of o.ports)t.set(`${o.id}:missing:${String(i.hostPort)}:${String(i.containerPort)}/${i.protocol}`,{hostPort:i.hostPort,containerId:o.id,containerName:o.name,containerPort:i.containerPort,protocol:i.protocol,hostIp:i.hostIp,missing:!0});return[...t.values()].sort((o,i)=>(o.hostPort??Infinity)-(i.hostPort??Infinity)||o.containerName.localeCompare(i.containerName)||o.containerPort-i.containerPort)}function F(n){return!n.missing&&n.hostPort!==null&&n.protocol===`tcp`?`http://localhost:${String(n.hostPort)}`:null}var G=f(()=>{});function X(n,e){if(n&1&&(Oi(0,`a`,17),fS(1),Gm(2,`app-icon`,19),Nc()),n&2){let t=HE().$implicit,o=HE();Wm(`href`,e,Rp)(`title`,o.t().open(t.hostPort??0)),ec(),pg(t.hostPort),ec(),Wm(`size`,11)}}function Y(n,e){if(n&1&&(Oi(0,`span`,20),fS(1),Nc()),n&2){let t=HE().$implicit;nS(t.missing?`text-danger`:`text-ink-400`),ec(),pg(t.hostPort??`—`)}}function Z(n,e){if(n&1&&SE(0,X,3,4,`a`,17)(1,Y,2,3,`span`,18),n&2){let t,o=e.$implicit;kE((t=HE().url(o))?0:1,t)}}function ee(n,e){if(n&1&&(Oi(0,`span`,22),Gm(1,`app-icon`,23),fS(2),Nc()),n&2){let t=HE(2);Wm(`title`,t.t().missingTitle),ec(),Wm(`size`,12),ec(),Ac(` `,t.t().missing,` `)}}function te(n,e){if(n&1&&(Oi(0,`a`,21),fS(1),Nc(),SE(2,ee,3,3,`span`,22)),n&2){let t=e.$implicit;Wm(`routerLink`,SS(3,W,t.containerId)),ec(),pg(t.containerName),ec(),kE(t.missing?2:-1)}}function ne(n,e){if(n&1&&(Oi(0,`span`,24),fS(1),Nc()),n&2){let t=e.$implicit;ec(),mg(``,t.containerPort,`/`,t.protocol)}}function oe(n,e){if(n&1&&(Oi(0,`span`,24),fS(1),Nc()),n&2){let t=HE().$implicit;ec(),pg(t.hostIp)}}function ie(n,e){if(n&1&&(Oi(0,`span`,25),fS(1),Nc()),n&2){let t=HE(2);ec(),pg(t.t().allAddresses)}}function re(n,e){if(n&1&&SE(0,oe,2,1,`span`,24)(1,ie,2,1,`span`,25),n&2){let t=e.$implicit;kE(t.hostIp?0:1)}}var W;var O;f(()=>{Kr();ra();v();G();sk();oe$1();dk();x();Kr();W=n=>[`/containers`,n];O=class n{containers=C(u);t=Ot(()=>ok().networks.ports);problem=this.containers.problem;search=wt(``);zoek=jc(void 0);gaps=wt([]);columns=Ot(()=>{let e=this.t().columns;return[{key:`hostPort`,label:e.hostPort,width:`110px`},{key:`container`,label:e.container},{key:`target`,label:e.target,width:`150px`},{key:`address`,label:e.address,width:`150px`}]});all=Ot(()=>U(this.containers.containers(),this.gaps()));rows=Ot(()=>{let e=this.search().trim().toLowerCase().replace(/^:/,``);return e===``?this.all():this.all().filter(t=>`${String(t.hostPort??``)} ${t.containerName} ${String(t.containerPort)}/${t.protocol}`.toLowerCase().includes(e))});trackKey=e=>`${e.containerId}:${String(e.hostPort)}:${String(e.containerPort)}/${e.protocol}:${String(e.missing)}`;url=F;runningKey=Ot(()=>this.containers.containers().filter(e=>e.state===`running`&&e.missingNetwork===null).map(e=>`${e.id}:${e.name}`).join(`
|
|
2
2
|
`));constructor(){this.containers.refresh(),rf(()=>{let e=this.zoek();e!==void 0&&Tg(()=>this.search.set(e))}),rf(()=>{let e=this.runningKey();Tg(()=>{this.loadGaps(e)})})}async loadGaps(e){let t=e===``?[]:e.split(`
|
|
3
3
|
`).map(i=>{let[g=``,...f]=i.split(`:`);return{id:g,name:f.join(`:`)}}),o=await Promise.all(t.map(i=>window.electron.containers.wiring(i.id).catch(()=>null)));e===this.runningKey()&&this.gaps.set(t.flatMap((i,g)=>{let f=o[g]?.missingPorts??[];return f.length===0?[]:[{kind:`ports`,id:i.id,name:i.name,ports:f}]}))}static ɵfac=function(t){return new(t||n)};static ɵcmp=wc({type:n,selectors:[[`app-ports-page`]],inputs:{zoek:[1,`zoek`]},decls:20,vars:12,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`,`text-[13px]`,`text-ink-400`],[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`,`data-testid`,`ports-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,`problem`],[1,`min-h-0`,`flex-1`,`overflow-y-auto`,`px-6`,`pb-6`],[3,`columns`,`rows`,`trackKey`,`selectable`,`emptyMessage`],[`appCell`,`hostPort`],[`appCell`,`container`],[`appCell`,`target`],[`appCell`,`address`],[`target`,`_blank`,`rel`,`noreferrer`,1,`mx-focus`,`inline-flex`,`items-center`,`gap-1`,`font-mono`,`text-accent`,`tabular-nums`,`hover:underline`,3,`href`,`title`],[1,`font-mono`,`tabular-nums`,3,`class`],[`name`,`external`,3,`size`],[1,`font-mono`,`tabular-nums`],[1,`mx-focus`,`truncate`,`text-ink-100`,`hover:text-accent`,`hover:underline`,3,`routerLink`],[`data-testid`,`port-missing`,1,`ml-2`,`inline-flex`,`items-center`,`gap-1`,`text-[12px]`,`text-danger`,3,`title`],[`name`,`warning`,3,`size`],[1,`font-mono`,`text-[12px]`,`text-ink-300`],[1,`text-[12px]`,`text-ink-500`]],template:function(t,o){t&1&&(Oi(0,`section`,0)(1,`div`,1)(2,`h1`,2),fS(3),Nc(),Oi(4,`p`,3),fS(5),Nc(),Oi(6,`div`,4)(7,`label`,5)(8,`span`,6),Gm(9,`app-icon`,7),Nc(),Oi(10,`span`,8),fS(11),Nc(),Oi(12,`input`,9),Jm(`input`,function(g){return o.search.set(g.target.value)}),Nc()()(),Gm(13,`app-page-messages`,10),Nc(),Oi(14,`div`,11)(15,`app-data-table`,12),_m(16,Z,2,1,`ng-template`,13)(17,te,3,5,`ng-template`,14)(18,ne,2,2,`ng-template`,15)(19,re,2,1,`ng-template`,16),Nc()()()),t&2&&(ec(3),pg(o.t().title),ec(2),pg(o.t().intro),ec(4),Wm(`size`,15),ec(2),pg(o.t().searchLabel),ec(),Wm(`placeholder`,o.t().searchLabel)(`value`,o.search()),ec(),Wm(`problem`,o.problem()),ec(2),Wm(`columns`,o.columns())(`rows`,o.rows())(`trackKey`,o.trackKey)(`selectable`,!1)(`emptyMessage`,o.all().length===0?o.t().none:o.t().empty))},dependencies:[z,x$1,My,u$1,Yt],encapsulation:2})}})();export{O as PortsPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as M,C as Gi,It as Ws,L as Kr,Mt as Vr,N as Iw,R as LI,Rt as X,X as OE,cn as f,dt as Rc,l as C$1,mn as ge$1,mt as S,n as $e,t as $I,tn as br,tt as PE,vt as Se$1}from"./chunk-DEsPgcXV.js";function T(){return te}function ge(e){te??=e}var te;var $;var O;var ne;var U=f(()=>{Kr();Kr();te=null;$=class{},O=(()=>{class e{historyGo(t){throw new Error(``)}static ɵfac=function(n){return new(n||e)};static ɵprov=X({token:e,factory:()=>C$1(ne),providedIn:`platform`})}return e})(),ne=(()=>{class e extends O{_location;_history;_doc=C$1(br);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return T().getBaseHref(this._doc)}onPopState(t){let n=T().getGlobalEventTarget(this._doc,`window`);return n.addEventListener(`popstate`,t,!1),()=>n.removeEventListener(`popstate`,t)}onHashChange(t){let n=T().getGlobalEventTarget(this._doc,`window`);return n.addEventListener(`hashchange`,t,!1),()=>n.removeEventListener(`hashchange`,t)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(t){this._location.pathname=t}pushState(t,n,r){this._history.pushState(t,n,r)}replaceState(t,n,r){this._history.replaceState(t,n,r)}forward(){this._history.forward()}back(){this._history.back()}historyGo(t=0){this._history.go(t)}getState(){return this._history.state}static ɵfac=function(n){return new(n||e)};static ɵprov=X({token:e,factory:()=>new e,providedIn:`platform`})}return e})()});function se(e,i){return e?i?e.endsWith(`/`)?i.startsWith(`/`)?e+i.slice(1):e+i:i.startsWith(`/`)?e+i:`${e}/${i}`:e:i}function ie(e){let i=e.search(/#|\?|$/);return e[i-1]===`/`?e.slice(0,i-1)+e.slice(i):e}function C(e){return e&&e[0]!==`?`?`?${e}`:e}function me(){return new oe($e(R))}function Ce(e,i){if(!e||!i.startsWith(e))return i;let t=i.substring(e.length);return t===``||[`/`,`;`,`?`,`#`].includes(t[0])?t:i}function re(e){return e.replace(/\/index\.html$/,``)}function ye(e){if(new RegExp(`^(https?:)?//`).test(e)){let[,t]=e.split(/\/\/[^\/]+/);return t}return e}var R;var De;var pe;var oe;var ae=f(()=>{Kr();Kr();Ws();U();R=(()=>{class e{historyGo(t){throw new Error(``)}static ɵfac=function(n){return new(n||e)};static ɵprov=X({token:e,factory:()=>C$1(pe),providedIn:`root`})}return e})(),De=new M(``),pe=(()=>{class e extends R{_platformLocation;_baseHref;_removeListenerFns=[];constructor(t,n){super(),this._platformLocation=t,this._baseHref=n??this._platformLocation.getBaseHrefFromDOM()??C$1(br).location?.origin??``}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(t){this._removeListenerFns.push(this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t))}getBaseHref(){return this._baseHref}prepareExternalUrl(t){return se(this._baseHref,t)}path(t=!1){let n=this._platformLocation.pathname+C(this._platformLocation.search),r=this._platformLocation.hash;return r&&t?`${n}${r}`:n}pushState(t,n,r,s){let o=this.prepareExternalUrl(r+C(s));this._platformLocation.pushState(t,n,o)}replaceState(t,n,r,s){let o=this.prepareExternalUrl(r+C(s));this._platformLocation.replaceState(t,n,o)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(t=0){this._platformLocation.historyGo?.(t)}static ɵfac=function(n){return new(n||e)($e(O),$e(De,8))};static ɵprov=X({token:e,factory:e.ɵfac,providedIn:`root`})}return e})(),oe=(()=>{class e{_subject=new ge$1;_basePath;_locationStrategy;_urlChangeListeners=[];_urlChangeSubscription=null;constructor(t){this._locationStrategy=t;let n=this._locationStrategy.getBaseHref();this._basePath=ye(ie(re(n))),this._locationStrategy.onPopState(r=>{let s={url:this.path(!0),pop:!0,state:r.state,type:r.type};r.hasUAVisualTransition&&(s.hasUAVisualTransition=!0),this._subject.next(s)})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(t=!1){return this.normalize(this._locationStrategy.path(t))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(t,n=``){return this.path()==this.normalize(t+C(n))}normalize(t){return e.stripTrailingSlash(Ce(this._basePath,re(t)))}prepareExternalUrl(t){return t&&t[0]!==`/`&&(t=`/`+t),this._locationStrategy.prepareExternalUrl(t)}go(t,n=``,r=null){this._locationStrategy.pushState(r,``,t,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+C(n)),r)}replaceState(t,n=``,r=null){this._locationStrategy.replaceState(r,``,t,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+C(n)),r)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(t=0){this._locationStrategy.historyGo?.(t)}onUrlChange(t){return this._urlChangeListeners.push(t),this._urlChangeSubscription??=this.subscribe(n=>{this._notifyUrlChangeListeners(n.url,n.state)}),()=>{let n=this._urlChangeListeners.indexOf(t);this._urlChangeListeners.splice(n,1),this._urlChangeListeners.length===0&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(t=``,n){this._urlChangeListeners.forEach(r=>r(t,n))}subscribe(t,n,r){return this._subject.subscribe({next:t,error:n??void 0,complete:r??void 0})}static normalizeQueryParams=C;static joinWithSlash=se;static stripTrailingSlash=ie;static ɵfac=function(n){return new(n||e)($e(R))};static ɵprov=X({token:e,factory:()=>me(),providedIn:`root`})}return e})()});function A(e,i){let t=OE(e),n=t[PE.NumberSymbols][i];if(typeof n>`u`){if(i===h.CurrencyDecimal)return t[PE.NumberSymbols][h.Decimal];if(i===h.CurrencyGroup)return t[PE.NumberSymbols][h.Group]}return n}function ce(e,i){return OE(e)[PE.NumberFormats][i]}function Ae(e,i,t,n,r,s,o=!1){let u=``,D=!1;if(!isFinite(e))u=A(t,Number.isNaN(e)?h.NaN:h.Infinity);else{let d=ve(e);o&&(d=_e(d));let l=i.minInt,a=i.minFrac,f=i.maxFrac;if(s){let w=s.match(Fe);if(w===null)throw new S(2306,!1);let H=w[1],B=w[3],W=w[5];H!=null&&(l=z(H)),B!=null&&(a=z(B)),W!=null?f=z(W):B!=null&&a>f&&(f=a);let N=100;if(l>N||a>N||f>N)throw new S(2306,!1)}be(d,a,f);let c=d.digits,g=d.integerLen,G=d.exponent,I=[];for(D=c.every(w=>!w);g<l;g++)c.unshift(0);for(;g<0;g++)c.unshift(0);g>0?I=c.splice(g,c.length):(I=c,c=[0]);let L=[];for(c.length>=i.lgSize&&L.unshift(c.splice(-i.lgSize,c.length).join(``));c.length>i.gSize;)L.unshift(c.splice(-i.gSize,c.length).join(``));c.length&&L.unshift(c.join(``)),u=L.join(A(t,n)),I.length&&(u+=A(t,r)+I.join(``)),G&&(u+=A(t,h.Exponential)+`+`+G)}return e<0&&!D?u=i.negPre+u+i.negSuf:u=i.posPre+u+i.posSuf,u}function de(e,i,t){return Ae(e,Se(ce(i,V.Decimal),A(i,h.MinusSign)),i,h.Group,h.Decimal,t)}function Se(e,i=`-`){let t={minInt:1,minFrac:0,maxFrac:0,posPre:``,posSuf:``,negPre:``,negSuf:``,gSize:0,lgSize:0},n=e.split(Ee),r=n[0],s=n[1],o=r.indexOf(P)!==-1?r.split(P):[r.substring(0,r.lastIndexOf(b)+1),r.substring(r.lastIndexOf(b)+1)],u=o[0],D=o[1]||``;t.posPre=u.substring(0,u.indexOf(j));for(let l=0;l<D.length;l++){let a=D.charAt(l);a===b?t.minFrac=t.maxFrac=l+1:a===j?t.maxFrac=l+1:t.posSuf+=a}let d=u.split(we);if(t.gSize=d[1]?d[1].length:0,t.lgSize=d[2]||d[1]?(d[2]||d[1]).length:0,s){let l=r.length-t.posPre.length-t.posSuf.length,a=s.indexOf(j);t.negPre=s.substring(0,a).replace(/'/g,``),t.negSuf=s.slice(a+l).replace(/'/g,``)}else t.negPre=i+t.posPre,t.negSuf=t.posSuf;return t}function _e(e){if(e.digits[0]===0)return e;let i=e.digits.length-e.integerLen;return e.exponent?e.exponent+=2:(i===0?e.digits.push(0,0):i===1&&e.digits.push(0),e.integerLen+=2),e}function ve(e){let i=Math.abs(e)+``,t=0,n,r,s,o,u;for((r=i.indexOf(P))>-1&&(i=i.replace(P,``)),(s=i.search(/e/i))>0?(r<0&&(r=s),r+=+i.slice(s+1),i=i.substring(0,s)):r<0&&(r=i.length),s=0;i.charAt(s)===b;s++);if(s===(u=i.length))n=[0],r=1;else{for(u--;i.charAt(u)===b;)u--;for(r-=s,n=[],o=0;s<=u;s++,o++)n[o]=Number(i.charAt(s))}return r>ue&&(n=n.splice(0,ue-1),t=r-1,r=1),{digits:n,exponent:t,integerLen:r}}function be(e,i,t){if(i>t)throw new S(2307,!1);let n=e.digits,r=n.length-e.integerLen,s=Math.min(Math.max(i,r),t),o=s+e.integerLen,u=n[o];if(o>0){n.splice(Math.max(e.integerLen,o));for(let a=o;a<n.length;a++)n[a]=0}else{r=Math.max(0,r),e.integerLen=1,n.length=Math.max(1,o=s+1),n[0]=0;for(let a=1;a<o;a++)n[a]=0}if(u>=5)if(o-1<0){for(let a=0;a>o;a--)n.unshift(0),e.integerLen++;n.unshift(1),e.integerLen++}else n[o-1]++;for(;r<Math.max(0,s);r++)n.push(0);let D=s!==0,d=i+e.integerLen,l=n.reduceRight(function(a,f,c,g){return f=f+a,g[c]=f<10?f:f-10,D&&(g[c]===0&&c>=d?g.pop():D=!1),f>=10?1:0},0);l&&(n.unshift(l),e.integerLen++)}function z(e){let i=parseInt(e);if(isNaN(i))throw new S(2305,!1);return i}function Le(e,i){return new S(2100,!1)}function Te(e){return!(e==null||e===``||e!==e)}function Oe(e){if(typeof e==`string`&&!isNaN(Number(e)-parseFloat(e)))return Number(e);if(typeof e!=`number`)throw new S(2309,!1);return e}var V;var h;var Fe;var ue;var P;var b;var Ee;var we;var j;var Ie;var Me;var le=f(()=>{Kr();Kr();V=(function(e){return e[e.Decimal=0]=`Decimal`,e[e.Percent=1]=`Percent`,e[e.Currency=2]=`Currency`,e[e.Scientific=3]=`Scientific`,e})(V||{}),h={Decimal:0,Group:1,List:2,PercentSign:3,PlusSign:4,MinusSign:5,Exponential:6,SuperscriptingExponent:7,PerMille:8,Infinity:9,NaN:10,TimeSeparator:11,CurrencyDecimal:12,CurrencyGroup:13};Fe=/^(\d+)?\.((\d+)(-(\d+))?)?$/,ue=22,P=`.`,b=`0`,Ee=`;`,we=`,`,j=`#`;Ie=(()=>{class e{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;injector=C$1(Se$1);constructor(t){this._viewContainerRef=t}ngOnChanges(t){if(this._shouldRecreateView(t)){let n=this._viewContainerRef;if(this._viewRef&&n.remove(n.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let r=this._createContextForwardProxy();this._viewRef=n.createEmbeddedView(this.ngTemplateOutlet,r,{injector:this._getInjector()})}}_getInjector(){return this.ngTemplateOutletInjector===`outlet`?this.injector:this.ngTemplateOutletInjector??void 0}_shouldRecreateView(t){return!!t.ngTemplateOutlet||!!t.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(t,n,r)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,n,r):!1,get:(t,n,r)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,n,r)}})}static ɵfac=function(n){return new(n||e)(Vr(Gi))};static ɵdir=$I({type:e,selectors:[[``,`ngTemplateOutlet`,``]],inputs:{ngTemplateOutletContext:`ngTemplateOutletContext`,ngTemplateOutlet:`ngTemplateOutlet`,ngTemplateOutletInjector:`ngTemplateOutletInjector`},features:[Iw]})}return e})();Me=(()=>{class e{_locale;constructor(t){this._locale=t}transform(t,n,r){if(!Te(t))return null;r||=this._locale;try{return de(Oe(t),r,n)}catch(s){throw Le(e,s.message)}}static ɵfac=function(n){return new(n||e)(Vr(Rc,16))};static ɵpipe=LI({name:`number`,type:e,pure:!0})}return e})()});function Re(e,i){i=encodeURIComponent(i);for(let t of e.split(`;`)){let n=t.indexOf(`=`),[r,s]=n==-1?[t,``]:[t.slice(0,n),t.slice(n+1)];if(r.trim()!==i)continue;let o=s;try{o=decodeURIComponent(s)}catch{}return o.length>1&&o[0]===`"`&&o[o.length-1]===`"`&&(o=o.slice(1,-1)),o}return null}var fe=f(()=>{});function $n(e){return e===Be}var Be;var Ne=f(()=>{ae();le();U();Kr();fe();Be=`browser`});export{Me as a,Re as c,oe as d,Ie as i,T as l,$n as n,Ne as o,Be as r,R as s,$ as t,ge as u};
|
|
1
|
+
import{B as M,C as Gi,It as Ws,L as Kr,Mt as Vr,N as Iw,R as LI,Rt as X,X as OE,cn as f,dt as Rc,l as C$1,mn as ge$1,mt as S,n as $e,t as $I,tn as br,tt as PE,vt as Se$1}from"./chunk-JmNJabM7.js";function T(){return te}function ge(e){te??=e}var te;var $;var O;var ne;var U=f(()=>{Kr();Kr();te=null;$=class{},O=(()=>{class e{historyGo(t){throw new Error(``)}static ɵfac=function(n){return new(n||e)};static ɵprov=X({token:e,factory:()=>C$1(ne),providedIn:`platform`})}return e})(),ne=(()=>{class e extends O{_location;_history;_doc=C$1(br);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return T().getBaseHref(this._doc)}onPopState(t){let n=T().getGlobalEventTarget(this._doc,`window`);return n.addEventListener(`popstate`,t,!1),()=>n.removeEventListener(`popstate`,t)}onHashChange(t){let n=T().getGlobalEventTarget(this._doc,`window`);return n.addEventListener(`hashchange`,t,!1),()=>n.removeEventListener(`hashchange`,t)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(t){this._location.pathname=t}pushState(t,n,r){this._history.pushState(t,n,r)}replaceState(t,n,r){this._history.replaceState(t,n,r)}forward(){this._history.forward()}back(){this._history.back()}historyGo(t=0){this._history.go(t)}getState(){return this._history.state}static ɵfac=function(n){return new(n||e)};static ɵprov=X({token:e,factory:()=>new e,providedIn:`platform`})}return e})()});function se(e,i){return e?i?e.endsWith(`/`)?i.startsWith(`/`)?e+i.slice(1):e+i:i.startsWith(`/`)?e+i:`${e}/${i}`:e:i}function ie(e){let i=e.search(/#|\?|$/);return e[i-1]===`/`?e.slice(0,i-1)+e.slice(i):e}function C(e){return e&&e[0]!==`?`?`?${e}`:e}function me(){return new oe($e(R))}function Ce(e,i){if(!e||!i.startsWith(e))return i;let t=i.substring(e.length);return t===``||[`/`,`;`,`?`,`#`].includes(t[0])?t:i}function re(e){return e.replace(/\/index\.html$/,``)}function ye(e){if(new RegExp(`^(https?:)?//`).test(e)){let[,t]=e.split(/\/\/[^\/]+/);return t}return e}var R;var De;var pe;var oe;var ae=f(()=>{Kr();Kr();Ws();U();R=(()=>{class e{historyGo(t){throw new Error(``)}static ɵfac=function(n){return new(n||e)};static ɵprov=X({token:e,factory:()=>C$1(pe),providedIn:`root`})}return e})(),De=new M(``),pe=(()=>{class e extends R{_platformLocation;_baseHref;_removeListenerFns=[];constructor(t,n){super(),this._platformLocation=t,this._baseHref=n??this._platformLocation.getBaseHrefFromDOM()??C$1(br).location?.origin??``}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(t){this._removeListenerFns.push(this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t))}getBaseHref(){return this._baseHref}prepareExternalUrl(t){return se(this._baseHref,t)}path(t=!1){let n=this._platformLocation.pathname+C(this._platformLocation.search),r=this._platformLocation.hash;return r&&t?`${n}${r}`:n}pushState(t,n,r,s){let o=this.prepareExternalUrl(r+C(s));this._platformLocation.pushState(t,n,o)}replaceState(t,n,r,s){let o=this.prepareExternalUrl(r+C(s));this._platformLocation.replaceState(t,n,o)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(t=0){this._platformLocation.historyGo?.(t)}static ɵfac=function(n){return new(n||e)($e(O),$e(De,8))};static ɵprov=X({token:e,factory:e.ɵfac,providedIn:`root`})}return e})(),oe=(()=>{class e{_subject=new ge$1;_basePath;_locationStrategy;_urlChangeListeners=[];_urlChangeSubscription=null;constructor(t){this._locationStrategy=t;let n=this._locationStrategy.getBaseHref();this._basePath=ye(ie(re(n))),this._locationStrategy.onPopState(r=>{let s={url:this.path(!0),pop:!0,state:r.state,type:r.type};r.hasUAVisualTransition&&(s.hasUAVisualTransition=!0),this._subject.next(s)})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(t=!1){return this.normalize(this._locationStrategy.path(t))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(t,n=``){return this.path()==this.normalize(t+C(n))}normalize(t){return e.stripTrailingSlash(Ce(this._basePath,re(t)))}prepareExternalUrl(t){return t&&t[0]!==`/`&&(t=`/`+t),this._locationStrategy.prepareExternalUrl(t)}go(t,n=``,r=null){this._locationStrategy.pushState(r,``,t,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+C(n)),r)}replaceState(t,n=``,r=null){this._locationStrategy.replaceState(r,``,t,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+C(n)),r)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(t=0){this._locationStrategy.historyGo?.(t)}onUrlChange(t){return this._urlChangeListeners.push(t),this._urlChangeSubscription??=this.subscribe(n=>{this._notifyUrlChangeListeners(n.url,n.state)}),()=>{let n=this._urlChangeListeners.indexOf(t);this._urlChangeListeners.splice(n,1),this._urlChangeListeners.length===0&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(t=``,n){this._urlChangeListeners.forEach(r=>r(t,n))}subscribe(t,n,r){return this._subject.subscribe({next:t,error:n??void 0,complete:r??void 0})}static normalizeQueryParams=C;static joinWithSlash=se;static stripTrailingSlash=ie;static ɵfac=function(n){return new(n||e)($e(R))};static ɵprov=X({token:e,factory:()=>me(),providedIn:`root`})}return e})()});function A(e,i){let t=OE(e),n=t[PE.NumberSymbols][i];if(typeof n>`u`){if(i===h.CurrencyDecimal)return t[PE.NumberSymbols][h.Decimal];if(i===h.CurrencyGroup)return t[PE.NumberSymbols][h.Group]}return n}function ce(e,i){return OE(e)[PE.NumberFormats][i]}function Ae(e,i,t,n,r,s,o=!1){let u=``,D=!1;if(!isFinite(e))u=A(t,Number.isNaN(e)?h.NaN:h.Infinity);else{let d=ve(e);o&&(d=_e(d));let l=i.minInt,a=i.minFrac,f=i.maxFrac;if(s){let w=s.match(Fe);if(w===null)throw new S(2306,!1);let H=w[1],B=w[3],W=w[5];H!=null&&(l=z(H)),B!=null&&(a=z(B)),W!=null?f=z(W):B!=null&&a>f&&(f=a);let N=100;if(l>N||a>N||f>N)throw new S(2306,!1)}be(d,a,f);let c=d.digits,g=d.integerLen,G=d.exponent,I=[];for(D=c.every(w=>!w);g<l;g++)c.unshift(0);for(;g<0;g++)c.unshift(0);g>0?I=c.splice(g,c.length):(I=c,c=[0]);let L=[];for(c.length>=i.lgSize&&L.unshift(c.splice(-i.lgSize,c.length).join(``));c.length>i.gSize;)L.unshift(c.splice(-i.gSize,c.length).join(``));c.length&&L.unshift(c.join(``)),u=L.join(A(t,n)),I.length&&(u+=A(t,r)+I.join(``)),G&&(u+=A(t,h.Exponential)+`+`+G)}return e<0&&!D?u=i.negPre+u+i.negSuf:u=i.posPre+u+i.posSuf,u}function de(e,i,t){return Ae(e,Se(ce(i,V.Decimal),A(i,h.MinusSign)),i,h.Group,h.Decimal,t)}function Se(e,i=`-`){let t={minInt:1,minFrac:0,maxFrac:0,posPre:``,posSuf:``,negPre:``,negSuf:``,gSize:0,lgSize:0},n=e.split(Ee),r=n[0],s=n[1],o=r.indexOf(P)!==-1?r.split(P):[r.substring(0,r.lastIndexOf(b)+1),r.substring(r.lastIndexOf(b)+1)],u=o[0],D=o[1]||``;t.posPre=u.substring(0,u.indexOf(j));for(let l=0;l<D.length;l++){let a=D.charAt(l);a===b?t.minFrac=t.maxFrac=l+1:a===j?t.maxFrac=l+1:t.posSuf+=a}let d=u.split(we);if(t.gSize=d[1]?d[1].length:0,t.lgSize=d[2]||d[1]?(d[2]||d[1]).length:0,s){let l=r.length-t.posPre.length-t.posSuf.length,a=s.indexOf(j);t.negPre=s.substring(0,a).replace(/'/g,``),t.negSuf=s.slice(a+l).replace(/'/g,``)}else t.negPre=i+t.posPre,t.negSuf=t.posSuf;return t}function _e(e){if(e.digits[0]===0)return e;let i=e.digits.length-e.integerLen;return e.exponent?e.exponent+=2:(i===0?e.digits.push(0,0):i===1&&e.digits.push(0),e.integerLen+=2),e}function ve(e){let i=Math.abs(e)+``,t=0,n,r,s,o,u;for((r=i.indexOf(P))>-1&&(i=i.replace(P,``)),(s=i.search(/e/i))>0?(r<0&&(r=s),r+=+i.slice(s+1),i=i.substring(0,s)):r<0&&(r=i.length),s=0;i.charAt(s)===b;s++);if(s===(u=i.length))n=[0],r=1;else{for(u--;i.charAt(u)===b;)u--;for(r-=s,n=[],o=0;s<=u;s++,o++)n[o]=Number(i.charAt(s))}return r>ue&&(n=n.splice(0,ue-1),t=r-1,r=1),{digits:n,exponent:t,integerLen:r}}function be(e,i,t){if(i>t)throw new S(2307,!1);let n=e.digits,r=n.length-e.integerLen,s=Math.min(Math.max(i,r),t),o=s+e.integerLen,u=n[o];if(o>0){n.splice(Math.max(e.integerLen,o));for(let a=o;a<n.length;a++)n[a]=0}else{r=Math.max(0,r),e.integerLen=1,n.length=Math.max(1,o=s+1),n[0]=0;for(let a=1;a<o;a++)n[a]=0}if(u>=5)if(o-1<0){for(let a=0;a>o;a--)n.unshift(0),e.integerLen++;n.unshift(1),e.integerLen++}else n[o-1]++;for(;r<Math.max(0,s);r++)n.push(0);let D=s!==0,d=i+e.integerLen,l=n.reduceRight(function(a,f,c,g){return f=f+a,g[c]=f<10?f:f-10,D&&(g[c]===0&&c>=d?g.pop():D=!1),f>=10?1:0},0);l&&(n.unshift(l),e.integerLen++)}function z(e){let i=parseInt(e);if(isNaN(i))throw new S(2305,!1);return i}function Le(e,i){return new S(2100,!1)}function Te(e){return!(e==null||e===``||e!==e)}function Oe(e){if(typeof e==`string`&&!isNaN(Number(e)-parseFloat(e)))return Number(e);if(typeof e!=`number`)throw new S(2309,!1);return e}var V;var h;var Fe;var ue;var P;var b;var Ee;var we;var j;var Ie;var Me;var le=f(()=>{Kr();Kr();V=(function(e){return e[e.Decimal=0]=`Decimal`,e[e.Percent=1]=`Percent`,e[e.Currency=2]=`Currency`,e[e.Scientific=3]=`Scientific`,e})(V||{}),h={Decimal:0,Group:1,List:2,PercentSign:3,PlusSign:4,MinusSign:5,Exponential:6,SuperscriptingExponent:7,PerMille:8,Infinity:9,NaN:10,TimeSeparator:11,CurrencyDecimal:12,CurrencyGroup:13};Fe=/^(\d+)?\.((\d+)(-(\d+))?)?$/,ue=22,P=`.`,b=`0`,Ee=`;`,we=`,`,j=`#`;Ie=(()=>{class e{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;injector=C$1(Se$1);constructor(t){this._viewContainerRef=t}ngOnChanges(t){if(this._shouldRecreateView(t)){let n=this._viewContainerRef;if(this._viewRef&&n.remove(n.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let r=this._createContextForwardProxy();this._viewRef=n.createEmbeddedView(this.ngTemplateOutlet,r,{injector:this._getInjector()})}}_getInjector(){return this.ngTemplateOutletInjector===`outlet`?this.injector:this.ngTemplateOutletInjector??void 0}_shouldRecreateView(t){return!!t.ngTemplateOutlet||!!t.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(t,n,r)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,n,r):!1,get:(t,n,r)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,n,r)}})}static ɵfac=function(n){return new(n||e)(Vr(Gi))};static ɵdir=$I({type:e,selectors:[[``,`ngTemplateOutlet`,``]],inputs:{ngTemplateOutletContext:`ngTemplateOutletContext`,ngTemplateOutlet:`ngTemplateOutlet`,ngTemplateOutletInjector:`ngTemplateOutletInjector`},features:[Iw]})}return e})();Me=(()=>{class e{_locale;constructor(t){this._locale=t}transform(t,n,r){if(!Te(t))return null;r||=this._locale;try{return de(Oe(t),r,n)}catch(s){throw Le(e,s.message)}}static ɵfac=function(n){return new(n||e)(Vr(Rc,16))};static ɵpipe=LI({name:`number`,type:e,pure:!0})}return e})()});function Re(e,i){i=encodeURIComponent(i);for(let t of e.split(`;`)){let n=t.indexOf(`=`),[r,s]=n==-1?[t,``]:[t.slice(0,n),t.slice(n+1)];if(r.trim()!==i)continue;let o=s;try{o=decodeURIComponent(s)}catch{}return o.length>1&&o[0]===`"`&&o[o.length-1]===`"`&&(o=o.slice(1,-1)),o}return null}var fe=f(()=>{});function $n(e){return e===Be}var Be;var Ne=f(()=>{ae();le();U();Kr();fe();Be=`browser`});export{Me as a,Re as c,oe as d,Ie as i,T as l,$n as n,Ne as o,Be as r,R as s,$ as t,ge as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$n as sk,Bn as ok,L as Kr,Rt as X,cn as f$1,cr as ve,et as Ot,gr as wt,jn as lk,l as C,on as eH}from"./chunk-
|
|
1
|
+
import{$n as sk,Bn as ok,L as Kr,Rt as X,cn as f$1,cr as ve,et as Ot,gr as wt,jn as lk,l as C,on as eH}from"./chunk-JmNJabM7.js";import{n as u,t as f$2}from"./chunk-xhdtv1sC.js";var y;var f=f$1(()=>{Kr();lk();f$2();sk();Kr();y=class s{toast=C(u);items=wt([]);busy=wt(!1);loadProblem=wt(null);running=wt(new Set);networks=this.items.asReadonly();loading=this.busy.asReadonly();problem=this.loadProblem.asReadonly();pending=this.running.asReadonly();unusedCount=Ot(()=>this.items().filter(e=>!e.builtIn&&e.connected===0).length);constructor(){C(ve).onDestroy(window.electron.events.subscribe(e=>{e.includes(`network`)&&this.refresh()}))}async refresh(){this.busy.set(!0);try{this.items.set(await window.electron.networks.list()),this.loadProblem.set(null)}catch(e){this.loadProblem.set(eH(e))}finally{this.busy.set(!1)}}async create(e){let t;try{let r=await window.electron.networks.create(e);t=r.ok?null:r.problem}catch(r){t=eH(r)}return t===null&&(this.toast.success(ok().networks.created(e.name)),await this.refresh()),t}async remove(e){this.running.update(t=>new Set(t).add(e));try{let t=await window.electron.networks.remove(e);t.ok||this.toast.error(t.problem)}finally{this.running.update(t=>{let r=new Set(t);return r.delete(e),r})}await this.refresh()}async removeMany(e){await Promise.all(e.map(t=>this.remove(t)))}async prune(){this.busy.set(!0);try{let e=await window.electron.networks.prune();e.ok?this.toast.success(e.removed===0?ok().common.nothingToPrune:ok().networks.pruned(e.removed)):this.toast.error(e.problem)}finally{this.busy.set(!1)}await this.refresh()}static ɵfac=function(t){return new(t||s)};static ɵprov=X({token:s,factory:s.ɵfac,providedIn:`root`})}});export{y as n,f as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$n as sk,Bn as ok,D as HE,Dn as kc,Ft as Wr,I as Km,Kn as qr,L as Kr,Pn as mj,St as Tc,Tn as jc,Wn as pg,Z as Od,_t as Sc,cn as f,et as Ot,ln as fS,lt as RE,mr as wc,qt as ag,r as Ac,s as Br,sn as ec,z as Ld,zt as Xm}from"./chunk-
|
|
1
|
+
import{$n as sk,Bn as ok,D as HE,Dn as kc,Ft as Wr,I as Km,Kn as qr,L as Kr,Pn as mj,St as Tc,Tn as jc,Wn as pg,Z as Od,_t as Sc,cn as f,et as Ot,ln as fS,lt as RE,mr as wc,qt as ag,r as Ac,s as Br,sn as ec,z as Ld,zt as Xm}from"./chunk-JmNJabM7.js";function B(n){let t=S.exec(n);if(t!==null){let o=m[t[1].toLowerCase()];if(o!==void 0)return o}let e=k.exec(n);if(e!==null)return m[e[1].toLowerCase()]??null;let r=O.exec(n);return r===null?null:m[r[1].toLowerCase()]??null}function H(n,t){return t.size===0||(n===`error`||n===`warn`)&&t.has(n)}function U(n){let t=0,e=0;for(let r of n)t+=r===`error`?1:0,e+=r===`warn`?1:0;return{error:t,warn:e}}function j(n,t){let e=n.trim();if(e===``)return P;let r=/^\/(.+)\/([a-z]*)$/.exec(e);if(r===null){let o=t?e:e.toLowerCase();return{test:a=>(t?a:a.toLowerCase()).includes(o),problem:null}}try{let o=r[2].includes(`i`)||t?r[2]:`${r[2]}i`,a=new RegExp(r[1],o);return{test:M=>a.test(M),problem:null}}catch(o){return{test:()=>!0,problem:ok().logs.invalidExpression(o instanceof Error?o.message:String(o))}}}var m;var O;var S;var k;var G;var P;var V=f(()=>{sk();m={err:`error`,error:`error`,fatal:`error`,panic:`error`,critical:`error`,wrn:`warn`,warn:`warn`,warning:`warn`,inf:`info`,info:`info`,notice:`info`,dbg:`debug`,debug:`debug`,trace:`debug`},O=/\b(ERR|ERROR|FATAL|PANIC|CRITICAL|WRN|WARN|WARNING|INF|INFO|NOTICE|DBG|DEBUG|TRACE)\b/,S=/\b(?:level|lvl|severity)["']?\s*[=:]\s*["']?([A-Za-z]+)/i,k=/\[(err|error|fatal|panic|critical|wrn|warn|warning|inf|info|notice|dbg|debug|trace)\]/i;G={error:`text-danger`,warn:`text-warn`,info:`text-ok`,debug:`text-ink-500`};P={test:()=>!0,problem:null}});function W(n,t){if(n&1){let e=RE();qr(0,`button`,2),Xm(`click`,function(){let o=Ld(e).$implicit;return Od(HE().toggle(o))}),fS(1),qr(2,`span`,3),fS(3),Wr()()}if(n&2){let e=t.$implicit,r=HE();ag(`border-danger`,e===`error`&&r.chosen().has(e))(`text-danger`,e===`error`&&r.chosen().has(e))(`border-warn`,e===`warn`&&r.chosen().has(e))(`text-warn`,e===`warn`&&r.chosen().has(e)),Km(`title`,r.t().unknownHidden),Br(`aria-pressed`,r.chosen().has(e))(`data-testid`,`level-`+e),ec(),Ac(` `,e===`error`?r.t().errors:r.t().warnings,` `),ec(2),pg(e===`error`?r.errors():r.warnings())}}var T;var $=f(()=>{Kr();sk();Kr();T=class n{chosen=mj.required();errors=jc(0);warnings=jc(0);levels=[`error`,`warn`];t=Ot(()=>ok().logs.levels);toggle(t){let e=new Set(this.chosen());e.delete(t)||e.add(t),this.chosen.set(e)}static ɵfac=function(e){return new(e||n)};static ɵcmp=wc({type:n,selectors:[[`app-level-filter`]],inputs:{chosen:[1,`chosen`],errors:[1,`errors`],warnings:[1,`warnings`]},outputs:{chosen:`chosenChange`},decls:3,vars:1,consts:[[`role`,`group`,1,`flex`,`items-center`,`gap-1`],[`type`,`button`,1,`mx-btn`,`mx-focus`,3,`border-danger`,`text-danger`,`border-warn`,`text-warn`,`title`],[`type`,`button`,1,`mx-btn`,`mx-focus`,3,`click`,`title`],[1,`text-[11px]`,`tabular-nums`,`opacity-70`]],template:function(e,r){e&1&&(qr(0,`div`,0),kc(1,W,4,13,`button`,1,Sc),Wr()),e&2&&(Br(`aria-label`,r.t().label),ec(),Tc(r.levels))},encapsulation:2})}});export{T as a,j as c,H as i,B as n,U as o,G as r,V as s,$ as t};
|