docker-client-mx 1.43.0 → 1.44.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-CjySsWe4.js → chunk-5u_BJ6JX.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-yYm_2q6C.js → chunk-6988XP3w.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-qxDOm16k.js → chunk-7mU3uVaN.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-Bxte2YBm.js → chunk-B23Afk52.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-xmDwFpQl.js → chunk-B7xGbGa9.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-Cx-uRg2m.js → chunk-B8Uu84pE.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-k-zsJmvX.js → chunk-BCYusaqm.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-B1xjyPnV.js → chunk-BEtYD0_3.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-DS3iAefP.js → chunk-BG-O4Nb_.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-DnY7-enP.js → chunk-BJsftgmt.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-CUSsr_nJ.js → chunk-Bho6QLGs.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-hJqozYgS.js → chunk-C1Nu6ZjD.js} +1 -1
- package/dist/docker-desktop-mx/browser/chunk-C3hTwhog.js +4 -0
- package/dist/docker-desktop-mx/browser/chunk-C52HI2A-.js +1 -0
- package/dist/docker-desktop-mx/browser/chunk-CGKsmblG.js +6 -0
- package/dist/docker-desktop-mx/browser/{chunk-BE5ctn7s.js → chunk-CMi-ZnXy.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-vPeKxmUB.js → chunk-CYFxPPxo2.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-DdTfHpyK.js → chunk-Cl4e4J9q.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-CjAbzLl3.js → chunk-Cr28jI1A.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-Cpz4zP5G.js → chunk-CzkAHty9.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-D2SM5E9h.js → chunk-D1tQa5OM.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-75uKIulV.js → chunk-D3PaEk7L.js} +1 -1
- package/dist/docker-desktop-mx/browser/chunk-DApzx4cc2.js +1 -0
- package/dist/docker-desktop-mx/browser/{chunk-BpQVP_gf.js → chunk-DNiq9JXI.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-BsTDUJ3m.js → chunk-DSfTqCF0.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-VC5gaeEq.js → chunk-DeEfJWMH2.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-DCYTwazU.js → chunk-DeROY6LN.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-hXmaVpBu2.js → chunk-DffEUxgS.js} +1 -1
- package/dist/docker-desktop-mx/browser/chunk-Di7dDUYN2.js +6 -0
- package/dist/docker-desktop-mx/browser/{chunk-Q3Ig-PJ6.js → chunk-DiB8MPYS.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-DLpC_2HL.js → chunk-Dp9UsDfH.js} +16 -16
- package/dist/docker-desktop-mx/browser/{chunk-Cau4mGeC.js → chunk-DtM-X5Eh.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-D5njuWRz.js → chunk-DtY6mcWb.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-D86K3m6W.js → chunk-DtbAIphi.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-CaR7Z77S2.js → chunk-DvJZmDzM2.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-CpNGhf9S.js → chunk-Dy3d-reD.js} +1 -1
- package/dist/docker-desktop-mx/browser/chunk-DzyPSjiy2.js +1 -0
- package/dist/docker-desktop-mx/browser/{chunk-CphQt55R.js → chunk-MyEYCSP-.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-DNfiG-TG.js → chunk-bSfpBwIa.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-BNz89YmT2.js → chunk-e16wEMMK.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-C7c_wFw-.js → chunk-eoU2TjRt.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-gHmeiJFn.js → chunk-xPy8hpGV.js} +1 -1
- package/dist/docker-desktop-mx/browser/index.html +2 -2
- package/dist/docker-desktop-mx/browser/main-WTPCDZAO.js +1 -0
- package/dist/docker-desktop-mx/browser/styles-2WH7TMRX.css +1 -0
- package/dist-electron/channels.js +4 -0
- package/dist-electron/channels.js.map +1 -1
- package/dist-electron/container-adjust.js +182 -0
- package/dist-electron/container-adjust.js.map +1 -0
- package/dist-electron/exec.js +78 -7
- package/dist-electron/exec.js.map +1 -1
- package/dist-electron/file-edit.js +206 -0
- package/dist-electron/file-edit.js.map +1 -0
- package/dist-electron/ipc.js +28 -5
- package/dist-electron/ipc.js.map +1 -1
- package/dist-electron/log-export.js +5 -4
- package/dist-electron/log-export.js.map +1 -1
- package/dist-electron/logs.js +26 -10
- package/dist-electron/logs.js.map +1 -1
- package/dist-electron/preload.js +12 -4
- package/dist-electron/preload.js.map +1 -1
- package/package.json +1 -1
- package/dist/docker-desktop-mx/browser/chunk-B-8njY4y.js +0 -1
- package/dist/docker-desktop-mx/browser/chunk-BYBsnx9-2.js +0 -1
- package/dist/docker-desktop-mx/browser/chunk-CpIMiI_l.js +0 -4
- package/dist/docker-desktop-mx/browser/chunk-DGnxa3ti2.js +0 -1
- package/dist/docker-desktop-mx/browser/chunk-iWbUoQd52.js +0 -6
- package/dist/docker-desktop-mx/browser/chunk-sxrgZH0E.js +0 -3
- package/dist/docker-desktop-mx/browser/main-UUO74KHR.js +0 -1
- package/dist/docker-desktop-mx/browser/styles-IM2TO7ZD.css +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-C3hTwhog.js";import"./chunk-Cr28jI1A.js";import"./chunk-5u_BJ6JX.js";import{n as oo,t as nc}from"./chunk-Dp9UsDfH.js";nc();export{oo as TerminalView};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{$n as sS,A as HE,An as kk,B as Kr,Bn as oS,Cr as yk,D as Gm,Dn as kE,Fn as mj,Ft as Wr,Gn as pg,Gt as _m,H as Ld,K as My,Kn as pj,Nt as W,On as kc,Pn as mg,Pt as Wm,Qt as bg,R as Jm,Rn as nk,St as Tg,Tn as jc,Zn as rf,_r as wt$1,cn as f,cr as ve,dr as vk,en as bk,et as Od,f as C,fn as fk,hr as wc,ht as Sc,jn as lS,lr as vg,mt as SE,o as Ac,on as eH,q as Nc,qn as qr,qt as ag,rn as dS,rt as Ot$1,sn as ec,t as $E,tt as Oi,u as Br,w as G$1,xn as hg,xt as Tc,z as Km}from"./chunk-C3hTwhog.js";import{n as j,r as w,t as C$1}from"./chunk-BCYusaqm.js";import"./chunk-MyEYCSP-.js";import{n as p,t as g}from"./chunk-DNiq9JXI.js";import"./chunk-BG-O4Nb_.js";import{n as o,t as i}from"./chunk-bSfpBwIa.js";import"./chunk-xPy8hpGV.js";import"./chunk-B7xGbGa9.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-Cl4e4J9q.js";import{n as v,t as u}from"./chunk-DtM-X5Eh.js";import{n as x,t as u$1}from"./chunk-Dy3d-reD.js";import{a as Yt,r as Q,s as fe,u as ra}from"./chunk-BEtYD0_3.js";import{n as c,t as b}from"./chunk-D3PaEk7L.js";import{n as V,t as G$2}from"./chunk-eoU2TjRt.js";import{n as W$1,t as J}from"./chunk-DtY6mcWb.js";function Qe(n,t){if(n&1){let e=$E();Oi(0,`button`,18),Jm(`click`,function(){let o=Ld(e).$implicit;return Od(HE(2).view.set(o))}),fk(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 Je(n,t){n&1&&(Oi(0,`pre`,9),fk(1),Nc()),n&2&&(ec(),pg(t))}function Xe(n,t){n&1&&(Oi(0,`p`,10),fk(1),Nc()),n&2&&(ec(),pg(t))}function Ye(n,t){if(n&1&&(Oi(0,`p`,11),fk(1),Nc()),n&2){let e=HE(2);ec(),pg(e.t().loading)}}function Ze(n,t){n&1&&(Oi(0,`span`,13),fk(1),Nc()),n&2&&(ec(),pg(t))}function et(n,t){if(n&1){let e=$E();Gm(0,`div`,2),Oi(1,`div`,3)(2,`div`,4)(3,`h2`,5),fk(4),Nc(),Oi(5,`p`,6),fk(6),Nc(),Oi(7,`div`,7),Sc(8,Qe,2,7,`button`,8,kc),Nc(),kE(10,Je,2,1,`pre`,9)(11,Xe,2,1,`p`,10)(12,Ye,2,1,`p`,11),Oi(13,`div`,12),kE(14,Ze,2,1,`span`,13),Oi(15,`button`,14),Gm(16,`app-icon`,15),fk(17),Nc(),Oi(18,`button`,16),Jm(`click`,function(){Ld(e);return Od(HE().copy())}),Gm(19,`app-icon`,17),fk(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),SE((e=o.body())?10:(e=o.problem())?11:12,e),ec(4),SE((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 Be=f(()=>{Kr();Je$1();lS();dS();sS();Kr();se=class n{open=mj(!1);project=jc.required();t=Ot$1(()=>oS().compose.file);common=Ot$1(()=>oS().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
|
+
${e.problem??(e.content.trim()===``?this.t().empty:e.content)}`).join(`
|
|
3
|
+
|
|
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 vk(i.open,s)||(i.open=s),s}),_m(1,et,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 tt(n,t){if(n&1&&(qr(0,`p`,1),fk(1),Wr()),n&2){let e=HE();ec(),pg(e.t().done(e.service()))}}function nt(n,t){if(n&1&&(qr(0,`p`,2),fk(1),Wr()),n&2){let e=HE();ec(),pg(e.problem())}}function it(n,t){if(n&1&&(qr(0,`details`,3)(1,`summary`,4),fk(2),Wr(),qr(3,`pre`,5),fk(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 ot(n,t){if(n&1&&Gm(0,`app-build-output`,2),n&2)Wm(`service`,HE().service())(`result`,t)}var G;var L;var _e=f(()=>{Kr();lS();sS();dS();Kr();G=class n{service=jc.required();result=jc.required();t=Ot$1(()=>oS().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),kE(1,tt,2,1,`p`,1)(2,nt,2,1,`p`,2),kE(3,it,5,3,`details`,3),Wr()),e&2&&(Br(`data-testid`,`service-build-result-`+i.service()),ec(),SE(i.result().ok?1:2),ec(2),SE(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(()=>oS().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),fk(2),Nc(),kE(3,ot,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(),SE((o=i.showResult()&&i.result())?3:-1,o)}},dependencies:[My,G],encapsulation:2})}});function lt(n,t){if(n&1&&(Oi(0,`p`,7),fk(1),Nc()),n&2){let e=HE(2);ec(),pg(e.t().loading)}}function dt(n,t){if(n&1&&(Oi(0,`li`,14),Gm(1,`app-icon`,16),Oi(2,`span`,17),fk(3),Nc(),Oi(4,`span`,18),fk(5),Nc(),Oi(6,`span`,19),fk(7),Nc()()),n&2){let e=t.$implicit,i=HE(3);ec(),nk(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(),nk(e.state===`failed`?`text-danger`:`text-ink-400`),Wm(`title`,e.problem??``),ec(),Ac(` `,i.stateOf(e),` `)}}function st(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 pt(n,t){if(n&1&&(Oi(0,`li`,15)(1,`div`,14),Gm(2,`app-icon`,20),Oi(3,`span`,21),fk(4),Nc(),Oi(5,`span`,22),fk(6),Nc()(),kE(7,st,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(),SE(e.reason===`build`?7:-1)}}function ct(n,t){if(n&1&&(Oi(0,`ul`,8),Sc(1,dt,8,11,`li`,14,at),Sc(3,pt,8,4,`li`,15,rt),Nc()),n&2){let e=HE(2);ec(),Tc(e.rows()),ec(2),Tc(e.skipped())}}function mt(n,t){if(n&1&&(Oi(0,`p`,7),fk(1),Nc()),n&2){let e=HE(2);ec(),pg(e.t().noImages)}}function ut(n,t){n&1&&(Oi(0,`p`,9),fk(1),Nc()),n&2&&(ec(),pg(t))}function gt(n,t){if(n&1&&(Oi(0,`p`,7),fk(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),fk(2),Nc()),n&2){let e=HE(3);ec(),Wm(`size`,13),ec(),Ac(` `,e.t().upToDate)}}function xt(n,t){if(n&1&&(Oi(0,`p`,28),fk(1),Nc()),n&2){let e=HE(),i=HE(4);ec(),pg(i.t().renewed(e.renewed.join(`, `)))}}function ft(n,t){if(n&1&&(Oi(0,`p`,29),fk(1),Nc()),n&2){let e=HE(),i=HE(4);ec(),pg(i.t().unchanged(e.unchanged.join(`, `)))}}function yt(n,t){if(n&1&&(Oi(0,`p`,30),fk(1),Nc()),n&2){let e=t.$implicit;ec(),pg(e)}}function bt(n,t){if(n&1&&(kE(0,xt,2,1,`p`,28),kE(1,ft,2,1,`p`,29),Sc(2,yt,2,1,`p`,30,kc)),n&2){let e=t;SE(e.renewed.length>0?0:-1),ec(),SE(e.unchanged.length>0?1:-1),ec(),Tc(e.problems)}}function vt(n,t){if(n&1){let e=$E();Oi(0,`div`,27)(1,`button`,31),Jm(`click`,function(){Ld(e);return Od(HE(4).renew())}),Gm(2,`app-icon`,32),fk(3),Nc(),Oi(4,`span`,33),fk(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 ht(n,t){if(n&1&&(Oi(0,`p`,26),fk(1),Nc(),kE(2,bt,4,2)(3,vt,6,4,`div`,27)),n&2){let e,i=HE(),o=HE(2);ec(),pg(o.t().stale(i.join(`, `))),ec(),SE((e=o.result())?2:3,e)}}function Ct(n,t){n&1&&(Oi(0,`div`,10),kE(1,_t,3,2,`p`,24)(2,ht,4,2),Nc()),n&2&&(ec(),SE(t.length===0?1:2))}function wt(n,t){if(n&1&&(Gm(0,`div`,2),Oi(1,`div`,3)(2,`div`,4)(3,`h2`,5),fk(4),Nc(),Oi(5,`p`,6),fk(6),Nc(),kE(7,lt,2,1,`p`,7),kE(8,ct,5,0,`ul`,8)(9,mt,2,1,`p`,7),kE(10,ut,2,1,`p`,9),kE(11,gt,2,1,`p`,7),kE(12,Ct,3,1,`div`,10),Oi(13,`div`,11)(14,`button`,12),Gm(15,`app-icon`,13),fk(16),Nc()()()()),n&2){let e,i,o=HE();ec(4),pg(o.t().title(o.project())),ec(2),pg(o.t().description),ec(),SE(o.phase()===`loading`?7:-1),ec(),SE(o.rows().length>0||o.skipped().length>0?8:o.phase()!==`loading`&&o.phase()!==`failed`?9:-1),ec(2),SE((e=o.problem())?10:-1,e),ec(),SE(o.phase()===`checking`?11:-1),ec(),SE((i=o.stale())?12:-1,i),ec(3),Wm(`size`,14),ec(),Ac(` `,o.finished()?o.common().close:o.common().cancel,` `)}}function Dt(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 at;var rt;var pe;var Oe=f(()=>{Kr();Je$1();lS();sS();dS();_e();Kr();at=(n,t)=>t.reference,rt=(n,t)=>t.service;pe=class n{open=mj(!1);project=jc.required();t=Ot$1(()=>oS().compose.update);common=Ot$1(()=>oS().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$1(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,q=>{if(!q.done){i({percent:Dt(q)});return}i(q.problem===null?{state:`done`,percent:null}:{state:`failed`,problem:q.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 vk(i.open,s)||(i.open=s),s}),_m(1,wt,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 St(n,t){if(n&1&&(Oi(0,`div`,7),fk(1),Nc()),n&2){let e=HE();ec(),pg(e.version)}}function Et(n,t){if(n&1&&(Oi(0,`div`,16),fk(1),Nc()),n&2){let e=HE();ec(),pg(e.problem)}}function Mt(n,t){n&1&&kE(0,St,2,1,`div`,7)(1,Et,2,1,`div`,16),n&2&&SE(t.cliAvailable?0:1)}function Tt(n,t){if(n&1&&(Oi(0,`div`,7),fk(1),Nc()),n&2){let e=HE();ec(),pg(e.t().updating)}}function It(n,t){if(n&1&&(Oi(0,`span`,23),fk(1),Nc()),n&2){let e=t;Wm(`title`,e),ec(),pg(e)}}function Rt(n,t){if(n&1&&(Oi(0,`div`,26),fk(1),Nc()),n&2){let e=HE(2);ec(),pg(e.t().busy)}}function Ft(n,t){if(n&1&&(Oi(0,`div`,27),Gm(1,`app-icon`,30),fk(2),Nc()),n&2){let e=HE().$implicit,i=HE();Br(`data-testid`,`compose-missing-`+e.name),ec(),Wm(`size`,12),ec(),Ac(` `,i.t().missing,` `)}}function Nt(n,t){if(n&1&&(Oi(0,`div`,31),Gm(1,`app-icon`,32),fk(2),Nc()),n&2){let e=t,i=HE().$implicit,o=HE();nk(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 Bt(n,t){if(n&1&&(Oi(0,`span`,36),fk(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 Ot(n,t){if(n&1){let e=$E();Oi(0,`app-service-build`,42),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=bk(0);Wm(`project`,i.name)(`service`,e.name)(`disabled`,o)(`showResult`,!1)}}function zt(n,t){if(n&1&&Gm(0,`app-build-output`,40),n&2){let e=HE().$implicit;Wm(`service`,e.name)(`result`,t)}}function $t(n,t){if(n&1&&(Oi(0,`span`,46),fk(1),Nc()),n&2){let e=t.$implicit;ec(),Ac(` `,e.hostPort?e.hostPort+`:`+e.containerPort:e.containerPort,` `)}}function Vt(n,t){if(n&1&&(Oi(0,`span`,44),Sc(1,$t,2,1,`span`,46,jt),Nc()),n&2){let e=HE().$implicit;ec(),Tc(e.ports.slice(0,2))}}function Ut(n,t){if(n&1&&(Oi(0,`div`,41),Gm(1,`app-state-dot`,20),Oi(2,`a`,43),fk(3),Nc(),Oi(4,`span`,44),fk(5),Nc(),Oi(6,`span`,45),fk(7),Nc(),kE(8,Vt,3,0,`span`,44),Nc()),n&2){let e=t.$implicit;ec(),Wm(`state`,e.state),ec(),Wm(`routerLink`,kk(6,kt,e.id)),ec(),pg(e.name),ec(2),pg(e.status),ec(2),pg(e.image),ec(),SE(e.ports.length>0?8:-1)}}function Lt(n,t){if(n&1){let e=$E();Oi(0,`div`,33)(1,`div`,34)(2,`div`,35),fk(3),Nc(),kE(4,Bt,2,3,`span`,36),kE(5,Ot,1,4,`app-service-build`,37),Oi(6,`button`,38),Jm(`click`,function(){let o=Ld(e).$implicit,s=HE(2).$implicit;return Od(HE().recreate(s,o))}),Gm(7,`app-icon`,39),fk(8),Nc()(),kE(9,zt,1,2,`app-build-output`,40),Sc(10,Ut,9,8,`div`,41,Pt),Nc()}if(n&2){let e,i=t.$implicit,o=HE(2).$implicit,s=bk(0),u=HE();ec(3),pg(i.name),ec(),SE(u.drifted(o.name,i.name)?4:-1),ec(),SE(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(),SE((e=u.buildResult(o.name,i.name))?9:-1,e),ec(),Tc(i.containers)}}function Wt(n,t){if(n&1&&(Oi(0,`div`,29),Sc(1,Lt,12,12,`div`,33,$e),Nc()),n&2){let e=HE().$implicit;ec(),Tc(e.services)}}function At(n,t){if(n&1){let e=$E();bg(0),Oi(1,`div`,12)(2,`div`,17)(3,`button`,18),Jm(`click`,function(){let o=Ld(e).$implicit;return Od(HE().toggle(o.name))}),Gm(4,`app-icon`,19)(5,`app-state-dot`,20),Oi(6,`span`,21),fk(7),Nc()(),Oi(8,`span`,22),fk(9),Nc(),kE(10,It,2,2,`span`,23),Oi(11,`div`,24)(12,`app-action-menu`,25),Jm(`picked`,function(o){let s=Ld(e).$implicit;return Od(HE().onProjectMenu(o,s))}),Nc()()(),kE(13,Rt,2,1,`div`,26),kE(14,Ft,3,3,`div`,27),kE(15,Nt,3,7,`div`,28),kE(16,Wt,3,0,`div`,29),Nc()}if(n&2){let e,i,o=t.$implicit,s=HE(),u=yk(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),` · `,o.state===`down`?s.t().notStarted:s.t().runningOf(o.running,o.total),` `),ec(),SE((e=o.workingDir)?10:-1,e),ec(2),Wm(`label`,s.t().menuAria(o.name))(`items`,s.projectMenu(o)),ec(),SE(u?13:-1),ec(),SE(o.missing?14:-1),ec(),SE((i=s.driftNote(o.name))?15:-1,i),ec(),SE(s.isExpanded(o.name)?16:-1)}}function Gt(n,t){if(n&1&&(Oi(0,`p`,13),fk(1),Nc()),n&2){let e=HE();ec(),pg(e.t().empty)}}var kt;var $e;var Pt;var jt;var ze;f(()=>{Kr();ra();C$1();g();v();sS();J();dS();x();b();Be();Oe();_e();G$2();o();Kr();kt=n=>[`/containers`,n],$e=(n,t)=>t.name,Pt=(n,t)=>t.id,jt=(n,t)=>t.containerPort;ze=class n{containers=C(u);compose=C(p);t=Ot$1(()=>oS().compose);common=Ot$1(()=>oS().common);loading=this.containers.loading;problem=this.containers.problem;composePending=this.compose.pending;containerPending=this.containers.pending;status=this.compose.status;projects=Ot$1(()=>w(j(this.containers.containers()),this.compose.known()));opening=this.compose.opening;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&&t.state!==`down`).map(t=>t.name).join(`
|
|
5
|
+
`));updateProject=wt$1(``);bestand=jc(void 0);afbreken=jc(void 0);bijwerken=jc(void 0);openen=jc(void 0);router=C(fe);route=C(Q);constructor(){this.containers.refresh(),this.compose.loadStatus(),this.compose.loadKnown(),rf(()=>{let t=this.bestand();t!==void 0&&Tg(()=>{this.fileProject.set(t),this.fileOpen.set(!0),i(this.router,this.route,`bestand`)})}),rf(()=>{let t=this.projectKey(),e=this.status()?.cliAvailable;t!==``&&e===!0&&Tg(()=>t.split(`
|
|
6
|
+
`).forEach(i=>{this.checkDrift(i),this.loadBuildable(i)}))}),rf(()=>{let t=this.bijwerken();t!==void 0&&Tg(()=>{this.openUpdate(t),i(this.router,this.route,`bijwerken`)})}),rf(()=>{this.openen()!==void 0&&Tg(()=>{i(this.router,this.route,`openen`),this.openComposeFile()})}),rf(()=>{let t=this.afbreken();t!==void 0&&Tg(()=>{this.pendingDown.set(t),this.confirmOpen.set(!0),i(this.router,this.route,`afbreken`)})})}isExpanded(t){return this.expanded().has(t)}toggle(t){let e=new Set(this.expanded());e.delete(t)||e.add(t),this.expanded.set(e)}openComposeFile(){this.compose.openFile()}projectLabelOf(t){return this.t().state[t]}busy(t){return this.composePending().has(t.name)||t.containerIds.some(e=>this.containerPending().has(e))}composeBlockedReason(t){let e=this.status();return e!==null&&!e.cliAvailable?this.t().noCli:t.workingDir===null?this.t().noWorkingDir:t.missing?this.t().missing:``}canCompose(t){return this.composeBlockedReason(t)===``}run(t,e){this.containers.runMany(t,e.containerIds)}up(t){this.compose.up(t.name)}projectMenu(t){let e=this.t(),i=this.common(),o=this.busy(t),s=this.canCompose(t),u=s?void 0:this.composeBlockedReason(t);return t.state===`down`?[{id:`up`,label:e.up,icon:`plus`,disabled:o||!s,hint:u??`docker compose up -d`},{id:`file`,label:e.file.button,icon:`file`,disabled:t.missing,separated:!0},{id:`forget`,label:e.forget,icon:`eraser`,disabled:o,hint:e.forgetHint,separated:!0}]:[{id:`up`,label:e.up,icon:`plus`,disabled:o||!s,hint:u??`docker compose up -d`},{id:`start`,label:i.start,icon:`play`,disabled:o},{id:`stop`,label:i.stop,icon:`stop`,disabled:o},{id:`restart`,label:i.restart,icon:`refresh`,disabled:o},{id:`update`,label:e.update.menu,icon:`download`,disabled:o||!s,hint:u??e.update.hint},{id:`file`,label:e.file.button,icon:`file`,disabled:t.workingDir===null,separated:!0},{id:`down`,label:e.down,icon:`trash`,danger:!0,disabled:o||!s,hint:u??`docker compose down`,separated:!0}]}onProjectMenu(t,e){t===`up`?this.up(e):t===`update`?this.openUpdate(e.name):t===`file`?this.openFile(e):t===`down`?this.askDown(e):t===`forget`?this.compose.forget(e.name):this.run(t,e)}recreate(t,e){this.compose.recreate(t.name,e.name).then(()=>this.checkDrift(t.name))}async checkDrift(t){try{let e=await window.electron.compose.drift(t);this.drift.update(i=>new Map(i).set(t,e))}catch{}}async loadBuildable(t){try{let e=await window.electron.compose.buildable(t);this.buildable.update(i=>new Map(i).set(t,e))}catch{}}canBuild(t,e){return this.buildable().get(t)?.includes(e)===!0}afterBuild(t,e,i){this.buildResults.update(o=>new Map(o).set(`${t}/${e}`,i)),this.checkDrift(t)}buildResult(t,e){return this.buildResults().get(`${t}/${e}`)??null}drifted(t,e){let i=this.drift().get(t);return i?.ok===!0&&i.changed.includes(e)}driftNote(t){let e=this.drift().get(t);return e===void 0?null:e.ok?e.changed.length===0?null:{text:this.t().driftProject(e.changed.join(`, `)),problem:!1}:{text:this.t().driftProblem(e.problem),problem:!0}}openUpdate(t){this.updateProject.set(t),this.updateOpen.set(!0)}openFile(t){this.fileProject.set(t.name),this.fileOpen.set(!0)}askDown(t){this.pendingDown.set(t.name),this.confirmOpen.set(!0)}confirmDown(){let t=this.pendingDown();t!==null&&(this.compose.down(t),this.pendingDown.set(null))}downDescription(){let t=this.pendingDown();return t===null?``:this.t().downDialog.description(t)}static ɵfac=function(e){return new(e||n)};static ɵcmp=wc({type:n,selectors:[[`app-compose-page`]],inputs:{bestand:[1,`bestand`],afbreken:[1,`afbreken`],bijwerken:[1,`bijwerken`],openen:[1,`openen`]},decls:23,vars:18,consts:[[1,`flex`,`h-full`,`flex-col`],[1,`shrink-0`,`px-6`,`pt-5`,`pb-3`],[1,`flex`,`flex-wrap`,`items-start`,`gap-4`],[1,`text-xl`,`font-semibold`,`tracking-tight`,`text-ink-100`],[1,`mt-1`,`max-w-prose`,`text-[13px]`,`text-ink-400`],[1,`ml-auto`,`flex`,`items-start`,`gap-4`],[1,`text-right`],[1,`text-[12px]`,`text-ink-500`],[`type`,`button`,`data-testid`,`compose-open-file`,1,`mx-btn`,`mx-focus`,`shrink-0`,3,`click`,`disabled`,`title`],[`name`,`file`,3,`size`],[3,`problem`],[1,`min-h-0`,`flex-1`,`space-y-3`,`overflow-y-auto`,`px-6`,`pb-6`],[1,`rounded-lg`,`border`,`border-ink-700`,`bg-ink-850`],[1,`py-10`,`text-center`,`text-[13px]`,`text-ink-400`],[3,`openChange`,`open`,`project`],[3,`openChange`,`confirmed`,`open`,`title`,`description`,`confirmLabel`],[1,`max-w-xs`,`text-[12px]`,`text-warn`],[1,`flex`,`flex-wrap`,`items-center`,`gap-3`,`px-3`,`py-2.5`],[`type`,`button`,1,`mx-focus`,`flex`,`min-w-0`,`cursor-pointer`,`items-center`,`gap-2`,`text-left`,3,`click`],[1,`shrink-0`,`text-ink-500`,3,`name`,`size`],[3,`state`],[1,`truncate`,`text-[14px]`,`font-medium`,`text-ink-100`],[1,`shrink-0`,`text-[12px]`,`text-ink-400`],[1,`min-w-0`,`truncate`,`font-mono`,`text-[11px]`,`text-ink-500`,3,`title`],[1,`ml-auto`,`shrink-0`],[`compact`,``,3,`picked`,`label`,`items`],[1,`px-3`,`pb-2`,`text-[12px]`,`text-ink-500`],[1,`flex`,`items-center`,`gap-1.5`,`px-3`,`pb-2`,`text-[12px]`,`text-warn`],[1,`flex`,`items-center`,`gap-1.5`,`px-3`,`pb-2`,`text-[12px]`,3,`class`,`title`],[1,`border-t`,`border-ink-800`],[`name`,`warning`,3,`size`],[1,`flex`,`items-center`,`gap-1.5`,`px-3`,`pb-2`,`text-[12px]`,3,`title`],[3,`name`,`size`],[1,`border-b`,`border-ink-800`,`px-3`,`py-2`,`last:border-b-0`],[1,`flex`,`items-center`,`gap-3`],[1,`text-[12px]`,`font-medium`,`text-ink-300`],[1,`text-[11px]`,`text-accent`,3,`title`],[1,`ml-auto`,3,`project`,`service`,`disabled`,`showResult`],[`type`,`button`,1,`mx-btn`,`mx-focus`,3,`click`,`disabled`,`title`],[`name`,`refresh`,3,`size`],[1,`mt-1.5`,`mb-1`,3,`service`,`result`],[1,`mt-1`,`flex`,`flex-wrap`,`items-center`,`gap-3`,`pl-3`,`text-[13px]`],[1,`ml-auto`,3,`finished`,`project`,`service`,`disabled`,`showResult`],[1,`mx-focus`,`min-w-0`,`truncate`,`text-ink-100`,`hover:text-accent`,`hover:underline`,3,`routerLink`],[1,`shrink-0`,`text-ink-500`],[1,`min-w-0`,`truncate`,`text-ink-400`],[1,`mr-2`]],template:function(e,i){if(e&1&&(Oi(0,`section`,0)(1,`div`,1)(2,`div`,2)(3,`div`)(4,`h1`,3),fk(5),Nc(),Oi(6,`p`,4),fk(7),Nc()(),Oi(8,`div`,5)(9,`div`,6),kE(10,Mt,2,1),kE(11,Tt,2,1,`div`,7),Nc(),Oi(12,`button`,8),Jm(`click`,function(){return i.openComposeFile()}),Gm(13,`app-icon`,9),fk(14),Nc()()(),Gm(15,`app-page-messages`,10),Nc(),Oi(16,`div`,11),Sc(17,At,17,16,`div`,12,$e,!1,Gt,2,1,`p`,13),Nc()(),Oi(20,`app-compose-file-dialog`,14),vg(`openChange`,function(s){return vk(i.fileOpen,s)||(i.fileOpen=s),s}),Nc(),Oi(21,`app-project-update-dialog`,14),vg(`openChange`,function(s){return vk(i.updateOpen,s)||(i.updateOpen=s),s}),Nc(),Oi(22,`app-confirm-dialog`,15),vg(`openChange`,function(s){return vk(i.confirmOpen,s)||(i.confirmOpen=s),s}),Jm(`confirmed`,function(){return i.confirmDown()}),Nc()),e&2){let o;ec(5),pg(i.t().title),ec(2),pg(i.t().intro),ec(3),SE((o=i.status())?10:-1,o),ec(),SE(i.loading()?11:-1),ec(),Wm(`disabled`,i.opening()||i.status()?.cliAvailable===!1)(`title`,i.t().openHint),ec(),Wm(`size`,14),ec(),Ac(` `,i.opening()?i.t().opening:i.t().openFile,` `),ec(),Wm(`problem`,i.problem()),ec(2),Tc(i.projects()),ec(3),hg(`open`,i.fileOpen),Wm(`project`,i.fileProject()),ec(),hg(`open`,i.updateOpen),Wm(`project`,i.updateProject()),ec(),hg(`open`,i.confirmOpen),Wm(`title`,i.t().downDialog.title)(`description`,i.downDescription())(`confirmLabel`,i.t().downDialog.confirm)}},dependencies:[Yt,My,W$1,u$1,c,se,pe,L,G,V],encapsulation:2})}})();export{ze as ComposePage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$n as sS,A as HE,An as kk,B as Kr,Bn as oS,D as Gm,Dn as kE,Fn as mj,Gn as pg,Gt as _m,H as Ld,K as My,Pt as Wm,R as Jm,Rn as nk,St as Tg,Tn as jc,Zn as rf,_r as wt,cn as f,dr as vk,et as Od,f as C,fn as fk,hr as wc,ht as Sc,jn as lS,lr as vg,mt as SE,o as Ac,on as eH,q as Nc,rn as dS,rt as Ot,sn as ec,t as $E,tt as Oi,xn as hg,xt as Tc}from"./chunk-CpIMiI_l.js";import"./chunk-CphQt55R.js";import"./chunk-DS3iAefP.js";import{n as y,t as f$1}from"./chunk-hJqozYgS.js";import{n as o,t as i}from"./chunk-DNfiG-TG.js";import{n as p,t as M}from"./chunk-CjySsWe4.js";import"./chunk-gHmeiJFn.js";import"./chunk-xmDwFpQl.js";import{_ as pn,d as dn,f as fn,g as ln,l as an,m as ie,r as Je$1,u as cn,v as un}from"./chunk-DdTfHpyK.js";import{n as x,t as u}from"./chunk-CpNGhf9S.js";import{a as Yt,r as Q$1,s as fe$1,u as ra}from"./chunk-B1xjyPnV.js";import{n as P,t as K}from"./chunk-Cpz4zP5G.js";import{n as V,t as G}from"./chunk-C7c_wFw-.js";import{n as W,t as J}from"./chunk-D5njuWRz.js";import{i as z,n as oe,r as x$1}from"./chunk-Bxte2YBm.js";function Ie(i,t){i&1&&(Oi(0,`p`,22),fk(1),Nc()),i&2&&(ec(),pg(t))}function Ee(i,t){if(i&1){let n=$E();Gm(0,`div`,2),Oi(1,`div`,3)(2,`div`,4)(3,`h2`,5),fk(4),Nc(),Oi(5,`p`,6),fk(6),Nc(),Oi(7,`form`,7),Jm(`submit`,function(m){Ld(n);return Od(HE().submit(m))}),Oi(8,`label`,8)(9,`span`,9),fk(10),Nc(),Oi(11,`input`,10),Jm(`input`,function(m){Ld(n);return Od(HE().name.set(m.target.value))}),Nc()(),Oi(12,`label`,11)(13,`input`,12),Jm(`change`,function(m){Ld(n);return Od(HE().internal.set(m.target.checked))}),Nc(),Oi(14,`span`)(15,`span`,13),fk(16),Nc(),Oi(17,`span`,14),fk(18),Nc()()(),Oi(19,`details`,15)(20,`summary`,16),fk(21),Nc(),Oi(22,`label`,17)(23,`span`,9),fk(24),Nc(),Oi(25,`input`,18),Jm(`input`,function(m){Ld(n);return Od(HE().driver.set(m.target.value))}),Nc(),Oi(26,`span`,19),fk(27),Nc()(),Oi(28,`label`,17)(29,`span`,9),fk(30),Nc(),Oi(31,`input`,20),Jm(`input`,function(m){Ld(n);return Od(HE().subnet.set(m.target.value))}),Nc(),Oi(32,`span`,19),fk(33),Nc()(),Oi(34,`label`,17)(35,`span`,9),fk(36),Nc(),Oi(37,`input`,21),Jm(`input`,function(m){Ld(n);return Od(HE().gateway.set(m.target.value))}),Nc(),Oi(38,`span`,19),fk(39),Nc()()(),kE(40,Ie,2,1,`p`,22),Oi(41,`div`,23)(42,`button`,24),Gm(43,`app-icon`,25),fk(44),Nc(),Oi(45,`button`,26),Gm(46,`app-icon`,27),fk(47),Nc()()()()()}if(i&2){let n,e=HE();ec(4),pg(e.t().title),ec(2),pg(e.t().description),ec(4),pg(e.t().nameLabel),ec(),nk(e.field),Wm(`placeholder`,e.t().namePlaceholder)(`value`,e.name())(`disabled`,e.busy()),ec(2),Wm(`checked`,e.internal())(`disabled`,e.busy()),ec(3),pg(e.t().internal),ec(2),pg(e.t().internalHint),ec(),Wm(`open`,e.advanced()),ec(2),pg(e.t().advanced),ec(3),pg(e.t().driverLabel),ec(),nk(e.field),Wm(`value`,e.driver())(`disabled`,e.busy()),ec(2),pg(e.t().driverHint),ec(3),pg(e.t().subnetLabel),ec(),nk(e.field),Wm(`value`,e.subnet())(`disabled`,e.busy()),ec(2),pg(e.t().subnetHint),ec(3),pg(e.t().gatewayLabel),ec(),nk(e.field),Wm(`value`,e.gateway())(`disabled`,e.busy()),ec(2),pg(e.t().gatewayHint),ec(),SE((n=e.problem())?40:-1,n),ec(3),Wm(`size`,14),ec(),Ac(` `,e.common().cancel,` `),ec(),Wm(`disabled`,!e.canSubmit()),ec(),Wm(`size`,14),ec(),Ac(` `,e.busy()?e.t().creating:e.t().submit,` `)}}var Pe;var Q;var be=f(()=>{Kr();Je$1();f$1();dS();sS();Kr();Pe=`mx-focus mt-1 w-full rounded-md border border-ink-700 bg-ink-800 px-3 py-1.5 text-[13px] text-ink-100 placeholder:text-ink-500`,Q=class i{store=C(y);open=mj(!1);t=Ot(()=>oS().networks.createDialog);common=Ot(()=>oS().common);field=Pe;name=wt(``);internal=wt(!1);driver=wt(`bridge`);subnet=wt(``);gateway=wt(``);busy=wt(!1);problem=wt(null);advanced=Ot(()=>this.driver().trim()!==`bridge`||this.subnet().trim()!==``||this.gateway().trim()!==``);canSubmit=Ot(()=>!this.busy()&&this.name().trim()!==``&&this.driver().trim()!==``);constructor(){rf(()=>{this.open()&&Tg(()=>{this.name.set(``),this.internal.set(!1),this.driver.set(`bridge`),this.subnet.set(``),this.gateway.set(``),this.problem.set(null)})})}submit(t){if(t.preventDefault(),!this.canSubmit())return;let n=this.subnet().trim(),e=this.gateway().trim();this.busy.set(!0),this.problem.set(null),this.store.create({name:this.name().trim(),driver:this.driver().trim(),internal:this.internal(),subnet:n===``?null:n,gateway:e===``?null:e}).then(m=>{this.problem.set(m),m===null&&this.open.set(!1)}).finally(()=>this.busy.set(!1))}static ɵfac=function(n){return new(n||i)};static ɵcmp=wc({type:i,selectors:[[`app-create-network-dialog`]],inputs:{open:[1,`open`]},outputs:{open:`openChange`},decls:2,vars:1,consts:[[`rdxDialogRoot`,``,3,`openChange`,`open`],[`rdxDialogPortal`,``],[`rdxDialogBackdrop`,``,1,`fixed`,`inset-0`,`z-40`,`bg-black/50`],[`rdxDialogViewport`,``,1,`fixed`,`inset-0`,`z-50`,`grid`,`place-items-center`,`p-4`],[`rdxDialogPopup`,``,1,`w-full`,`max-w-md`,`rounded-lg`,`border`,`border-ink-700`,`bg-ink-850`,`p-5`,`shadow-2xl`],[`rdxDialogTitle`,``,1,`text-[15px]`,`font-semibold`,`text-ink-100`],[`rdxDialogDescription`,``,1,`mt-1`,`text-[13px]`,`text-ink-400`],[1,`mt-4`,`space-y-3`,3,`submit`],[1,`block`],[1,`text-[12px]`,`text-ink-400`],[`type`,`text`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`placeholder`,`value`,`disabled`],[1,`flex`,`cursor-pointer`,`items-start`,`gap-2.5`],[`type`,`checkbox`,1,`mx-focus`,`mt-0.5`,`accent-accent`,3,`change`,`checked`,`disabled`],[1,`block`,`text-[13px]`,`text-ink-100`],[1,`block`,`text-[12px]`,`text-ink-500`],[1,`text-[12px]`,`text-ink-400`,3,`open`],[1,`cursor-pointer`,`select-none`],[1,`mt-2`,`block`],[`type`,`text`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`value`,`disabled`],[1,`mt-1`,`block`,`text-[12px]`,`text-ink-500`],[`type`,`text`,`placeholder`,`172.30.0.0/16`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`value`,`disabled`],[`type`,`text`,`placeholder`,`172.30.0.1`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`value`,`disabled`],[`role`,`alert`,1,`text-[13px]`,`text-danger`],[1,`flex`,`justify-end`,`gap-2`,`pt-2`],[`type`,`button`,`rdxDialogClose`,``,1,`mx-btn`,`mx-focus`],[`name`,`close`,3,`size`],[`type`,`submit`,1,`mx-btn`,`mx-focus`,3,`disabled`],[`name`,`plus`,3,`size`]],template:function(n,e){n&1&&(Oi(0,`div`,0),vg(`openChange`,function(l){return vk(e.open,l)||(e.open=l),l}),_m(1,Ee,48,38,`ng-template`,1),Nc()),n&2&&hg(`open`,e.open)},dependencies:[ie,ln,an,pn,cn,fn,dn,un,My],encapsulation:2})}});function Le(i,t){i&1&&(Oi(0,`p`,7),fk(1),Nc()),i&2&&(ec(),pg(t))}function Ve(i,t){if(i&1&&(Oi(0,`p`,8),fk(1),Nc()),i&2){let n=HE(2);ec(),pg(n.t().loading)}}function ze(i,t){if(i&1&&(Oi(0,`p`,8),fk(1),Nc()),i&2){let n=HE(2);ec(),pg(n.t().empty)}}function Oe(i,t){i&1&&(Oi(0,`span`,16),fk(1),Nc()),i&2&&(ec(),pg(t))}function We(i,t){if(i&1){let n=$E();Oi(0,`li`,13),Gm(1,`span`,14),Oi(2,`a`,15),Jm(`click`,function(){Ld(n);return Od(HE(3).open.set(!1))}),fk(3),Nc(),kE(4,Oe,2,1,`span`,16),Oi(5,`span`,17),fk(6),Nc()()}if(i&2){let n,e=t.$implicit,m=HE(3);ec(),nk(e.running?`bg-ok`:`bg-ink-600`),ec(),Wm(`routerLink`,kk(8,Te,e.id)),ec(),pg(e.name),ec(),SE((n=e.composeProject)?4:-1,n),ec(),nk(e.ipAddress?`text-ink-300`:`text-ink-600`),ec(),Ac(` `,e.ipAddress??(e.running?m.t().noAddress:m.t().stopped),` `)}}function Be(i,t){if(i&1&&(Oi(0,`ul`,9),Sc(1,We,7,10,`li`,13,Re),Nc()),i&2){let n=HE(2);ec(),Tc(n.members())}}function Ae(i,t){if(i&1&&(Gm(0,`div`,2),Oi(1,`div`,3)(2,`div`,4)(3,`h2`,5),fk(4),Nc(),Oi(5,`p`,6),fk(6),Nc(),kE(7,Le,2,1,`p`,7)(8,Ve,2,1,`p`,8)(9,ze,2,1,`p`,8)(10,Be,3,0,`ul`,9),Oi(11,`div`,10)(12,`button`,11),Gm(13,`app-icon`,12),fk(14),Nc()()()()),i&2){let n,e=HE();ec(4),pg(e.t().title(e.network())),ec(2),pg(e.t().description),ec(),SE((n=e.problem())?7:e.members()===null?8:e.members()?.length===0?9:10,n),ec(6),Wm(`size`,14),ec(),Ac(` `,e.common().close,` `)}}var Te;var Re;var U;var ye=f(()=>{Kr();ra();Je$1();lS();dS();sS();Kr();Te=i=>[`/containers`,i],Re=(i,t)=>t.id;U=class i{open=mj(!1);network=jc.required();t=Ot(()=>oS().networks.members);common=Ot(()=>oS().common);members=wt(null);problem=wt(null);constructor(){rf(()=>{if(!this.open())return;let t=this.network();Tg(()=>{this.load(t)})})}async load(t){this.members.set(null),this.problem.set(null);try{this.members.set(await window.electron.networks.members(t))}catch(n){this.problem.set(eH(n))}}static ɵfac=function(n){return new(n||i)};static ɵcmp=wc({type:i,selectors:[[`app-network-members-dialog`]],inputs:{open:[1,`open`],network:[1,`network`]},outputs:{open:`openChange`},decls:2,vars:1,consts:[[`rdxDialogRoot`,``,3,`openChange`,`open`],[`rdxDialogPortal`,``],[`rdxDialogBackdrop`,``,1,`fixed`,`inset-0`,`z-40`,`bg-black/50`],[`rdxDialogViewport`,``,1,`fixed`,`inset-0`,`z-50`,`grid`,`place-items-center`,`p-4`],[`rdxDialogPopup`,``,`data-testid`,`network-members-dialog`,1,`flex`,`max-h-[85vh]`,`w-full`,`max-w-xl`,`flex-col`,`rounded-lg`,`border`,`border-ink-700`,`bg-ink-850`,`p-5`,`shadow-2xl`],[`rdxDialogTitle`,``,1,`text-[15px]`,`font-semibold`,`text-ink-100`],[`rdxDialogDescription`,``,1,`mt-1`,`text-[13px]`,`text-ink-400`],[1,`mt-4`,`rounded-md`,`border`,`border-danger/40`,`bg-danger/10`,`px-3`,`py-2`,`text-[13px]`,`text-danger`],[1,`mt-4`,`text-[13px]`,`text-ink-400`],[`data-testid`,`network-member-list`,1,`mt-3`,`min-h-0`,`flex-1`,`divide-y`,`divide-ink-800`,`overflow-auto`],[1,`mt-4`,`flex`,`justify-end`],[`type`,`button`,`rdxDialogClose`,``,1,`mx-btn`,`mx-focus`],[`name`,`close`,3,`size`],[1,`flex`,`items-center`,`gap-3`,`py-2`,`text-[13px]`],[`aria-hidden`,`true`,1,`size-2`,`shrink-0`,`rounded-full`],[1,`mx-focus`,`min-w-0`,`flex-1`,`truncate`,`text-ink-100`,`hover:text-accent`,`hover:underline`,3,`click`,`routerLink`],[1,`shrink-0`,`text-[12px]`,`text-ink-500`],[1,`w-32`,`shrink-0`,`text-right`,`font-mono`,`text-[12px]`]],template:function(n,e){n&1&&(Oi(0,`div`,0),vg(`openChange`,function(l){return vk(e.open,l)||(e.open=l),l}),_m(1,Ae,15,5,`ng-template`,1),Nc()),n&2&&hg(`open`,e.open)},dependencies:[ie,ln,an,pn,cn,fn,dn,un,Yt,My],encapsulation:2})}});function Fe(i,t){if(i&1&&(Oi(0,`span`,16),fk(1),Nc()),i&2){let n=HE();ec(),pg(n.t().refreshing)}}function je(i,t){if(i&1){let n=$E();Oi(0,`div`,18)(1,`span`,30),fk(2),Nc(),Oi(3,`button`,31),Jm(`click`,function(){Ld(n);return Od(HE().askRemoveSelected())}),Gm(4,`app-icon`,32),fk(5),Nc()()}if(i&2){let n=HE();ec(2),pg(n.t().selected(n.selected().size)),ec(2),Wm(`size`,14),ec(),Ac(` `,n.common().remove,` `)}}function He(i,t){if(i&1&&(Oi(0,`span`,35),fk(1),Nc()),i&2){let n=HE(2);ec(),pg(n.t().builtIn)}}function Ke(i,t){if(i&1&&(Oi(0,`span`,35),fk(1),Nc()),i&2){let n=HE(2);ec(),pg(n.t().internal)}}function qe(i,t){if(i&1&&(Oi(0,`div`,36),fk(1),Nc()),i&2){let n=HE().$implicit;ec(),pg(n.composeProject)}}function Qe(i,t){if(i&1&&(Oi(0,`div`,33)(1,`span`,34),fk(2),Nc(),kE(3,He,2,1,`span`,35),kE(4,Ke,2,1,`span`,35),Nc(),kE(5,qe,2,1,`div`,36)),i&2){let n=t.$implicit;ec(),Wm(`title`,n.shortId),ec(),pg(n.name),ec(),SE(n.builtIn?3:-1),ec(),SE(n.internal?4:-1),ec(),SE(n.composeProject?5:-1)}}function Ue(i,t){if(i&1&&(Oi(0,`span`,37),fk(1),Nc()),i&2){let n=t.$implicit;ec(),pg(n.driver)}}function Ge(i,t){if(i&1&&(Oi(0,`span`,38),fk(1),Nc()),i&2){let n=t.$implicit;ec(),pg(n.scope)}}function Je(i,t){if(i&1&&(Oi(0,`span`,39),fk(1),Nc()),i&2){let n=HE().$implicit;ec(),pg(n.subnet)}}function Xe(i,t){i&1&&(Oi(0,`span`,40),fk(1,`—`),Nc())}function Ye(i,t){if(i&1&&kE(0,Je,2,1,`span`,39)(1,Xe,2,0,`span`,40),i&2){let n=t.$implicit;SE(n.subnet?0:1)}}function Ze(i,t){if(i&1&&(Oi(0,`span`,41),fk(1),Nc()),i&2){let n=HE().$implicit,e=HE();ec(),pg(e.t().containerCount(n.connected))}}function $e(i,t){i&1&&(Oi(0,`span`,40),fk(1,`—`),Nc())}function et(i,t){if(i&1&&kE(0,Ze,2,1,`span`,41)(1,$e,2,0,`span`,40),i&2){let n=t.$implicit;SE(n.connected>0?0:1)}}function tt(i,t){if(i&1){let n=$E();Oi(0,`div`,42)(1,`app-action-menu`,43),Jm(`picked`,function(m){let l=Ld(n).$implicit;return Od(HE().onRowMenu(m,l))}),Nc()()}if(i&2){let n=t.$implicit,e=HE();ec(),Wm(`label`,e.t().rowMenu(n.name))(`items`,e.rowMenu(n))}}var fe;f(()=>{Kr();f$1();M();G();J();oe();K();dS();x();be();sS();ye();ra();o();Kr();fe=class i$1{store=C(y);preferences=C(p);t=Ot(()=>oS().networks);common=Ot(()=>oS().common);columns=Ot(()=>{let t=this.t().columns;return[{key:`name`,label:t.name},{key:`driver`,label:t.driver,width:`100px`},{key:`scope`,label:t.scope,width:`90px`},{key:`subnet`,label:t.subnet,width:`160px`},{key:`connected`,label:t.connected,width:`120px`},{key:`actions`,label:t.actions,width:`84px`,align:`right`}]});loading=this.store.loading;problem=this.store.problem;pending=this.store.pending;unusedCount=this.store.unusedCount;search=wt(``);zoek=jc(void 0);hideBuiltIn=this.preferences.flag(`networks.hideBuiltIn`);selected=wt(new Set);action=wt(null);confirmOpen=wt(!1);createOpen=wt(!1);membersOpen=wt(!1);membersNetwork=wt(``);rows=Ot(()=>{let t=this.search().trim().toLowerCase(),n=this.hideBuiltIn();return this.store.networks().filter(e=>n&&e.builtIn?!1:t===``||`${e.name} ${e.driver}`.toLowerCase().includes(t))});trackKey=t=>t.id;leden=jc(void 0);router=C(fe$1);route=C(Q$1);constructor(){rf(()=>{let t=this.leden();t!==void 0&&Tg(()=>{this.membersNetwork.set(t),this.membersOpen.set(!0),i(this.router,this.route,`leden`)})}),rf(()=>{let t=this.zoek();t!==void 0&&Tg(()=>this.search.set(t))}),this.store.refresh()}removalReason(t){return t.builtIn?this.t().builtInReason:t.connected>0?this.t().connectedReason(t.connected):this.common().remove}rowMenu(t){return[{id:`members`,label:this.t().rowMembers,icon:`containers`},{id:`remove`,label:this.common().remove,icon:`trash`,disabled:!this.canRemove(t)||this.pending().has(t.id),danger:!0,hint:this.removalReason(t),separated:!0}]}onRowMenu(t,n){t===`members`?(this.membersNetwork.set(n.name),this.membersOpen.set(!0)):this.askRemove(n)}canRemove(t){return!t.builtIn&&t.connected===0}askRemove(t){let n=this.t().remove;this.action.set({ids:[t.id],title:n.title,description:n.description(t.name),confirmLabel:this.common().remove}),this.confirmOpen.set(!0)}askRemoveSelected(){let t=[...this.selected()],n=this.t().remove;this.action.set({ids:t,title:n.manyTitle,description:n.manyDescription(t.length),confirmLabel:this.common().remove}),this.confirmOpen.set(!0)}menuItems=Ot(()=>[{id:`create`,label:this.t().menu.create,icon:`plus`},{id:`prune-unused`,label:this.t().menu.pruneUnused,icon:`broom`,separated:!0}]);onMenu(t){t===`create`?this.createOpen.set(!0):this.askPrune()}askPrune(){let t=this.t().prune;this.action.set({ids:[],title:t.title,description:t.description,confirmLabel:t.confirm}),this.confirmOpen.set(!0)}confirm(){let t=this.action();t!==null&&(t.ids.length===0?this.store.prune():(this.store.removeMany(t.ids),this.selected.set(new Set)),this.action.set(null))}actionTitle(){return this.action()?.title??``}actionDescription(){return this.action()?.description??``}actionConfirmLabel(){return this.action()?.confirmLabel??this.common().remove}actionConfirmIcon(){return this.action()?.ids.length===0?`broom`:`trash`}static ɵfac=function(n){return new(n||i$1)};static ɵcmp=wc({type:i$1,selectors:[[`app-networks-page`]],inputs:{zoek:[1,`zoek`],leden:[1,`leden`]},decls:35,vars:27,consts:[[1,`flex`,`h-full`,`flex-col`],[1,`shrink-0`,`px-6`,`pt-5`,`pb-3`],[1,`flex`,`flex-wrap`,`items-start`,`gap-4`],[1,`text-xl`,`font-semibold`,`tracking-tight`,`text-ink-100`],[1,`mt-3`],[1,`text-[12px]`,`text-ink-400`],[1,`text-[15px]`,`font-medium`,`text-ink-100`],[1,`ml-auto`],[3,`picked`,`label`,`items`],[1,`mt-4`,`flex`,`flex-wrap`,`items-center`,`gap-4`],[1,`relative`,`flex`,`items-center`],[1,`pointer-events-none`,`absolute`,`left-2.5`,`text-ink-500`],[`name`,`search`,3,`size`],[1,`sr-only`],[`type`,`search`,1,`mx-focus`,`w-72`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-850`,`py-1.5`,`pr-3`,`pl-8`,`text-[13px]`,`text-ink-100`,`placeholder:text-ink-500`,3,`input`,`placeholder`,`value`],[3,`onChange`,`label`,`on`],[1,`text-[12px]`,`text-ink-500`],[3,`problem`],[1,`mt-3`,`flex`,`items-center`,`gap-2`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-850`,`px-3`,`py-2`],[1,`min-h-0`,`flex-1`,`overflow-y-auto`,`px-6`,`pb-6`],[3,`selectedChange`,`columns`,`rows`,`trackKey`,`selected`,`emptyMessage`],[`appCell`,`name`],[`appCell`,`driver`],[`appCell`,`scope`],[`appCell`,`subnet`],[`appCell`,`connected`],[`appCell`,`actions`],[3,`openChange`,`open`],[3,`openChange`,`open`,`network`],[3,`openChange`,`confirmed`,`open`,`title`,`description`,`confirmLabel`,`confirmIcon`],[1,`text-[13px]`,`text-ink-200`],[`type`,`button`,1,`mx-btn`,`mx-focus`,`ml-auto`,`text-danger`,`hover:text-danger`,3,`click`],[`name`,`trash`,3,`size`],[1,`flex`,`items-center`,`gap-2`],[1,`truncate`,`text-ink-100`,3,`title`],[1,`shrink-0`,`rounded`,`border`,`border-ink-700`,`px-1`,`text-[10px]`,`text-ink-500`],[1,`truncate`,`text-[11px]`,`text-ink-500`],[1,`text-ink-300`],[1,`text-ink-400`],[1,`font-mono`,`text-[12px]`,`text-ink-300`],[1,`text-ink-600`],[1,`text-ink-200`],[1,`flex`,`items-center`,`justify-end`],[`compact`,``,3,`picked`,`label`,`items`]],template:function(n,e){n&1&&(Oi(0,`section`,0)(1,`div`,1)(2,`div`,2)(3,`div`)(4,`h1`,3),fk(5),Nc(),Oi(6,`div`,4)(7,`div`,5),fk(8),Nc(),Oi(9,`div`,6),fk(10),Nc()()(),Oi(11,`div`,7)(12,`app-action-menu`,8),Jm(`picked`,function(l){return e.onMenu(l)}),Nc()()(),Oi(13,`div`,9)(14,`label`,10)(15,`span`,11),Gm(16,`app-icon`,12),Nc(),Oi(17,`span`,13),fk(18),Nc(),Oi(19,`input`,14),Jm(`input`,function(l){return e.search.set(l.target.value)}),Nc()(),Oi(20,`app-filter-switch`,15),vg(`onChange`,function(l){return vk(e.hideBuiltIn,l)||(e.hideBuiltIn=l),l}),Nc(),kE(21,Fe,2,1,`span`,16),Nc(),Gm(22,`app-page-messages`,17),kE(23,je,6,3,`div`,18),Nc(),Oi(24,`div`,19)(25,`app-data-table`,20),vg(`selectedChange`,function(l){return vk(e.selected,l)||(e.selected=l),l}),_m(26,Qe,6,5,`ng-template`,21)(27,Ue,2,1,`ng-template`,22)(28,Ge,2,1,`ng-template`,23)(29,Ye,2,1,`ng-template`,24)(30,et,2,1,`ng-template`,25)(31,tt,2,2,`ng-template`,26),Nc()()(),Oi(32,`app-create-network-dialog`,27),vg(`openChange`,function(l){return vk(e.createOpen,l)||(e.createOpen=l),l}),Nc(),Oi(33,`app-network-members-dialog`,28),vg(`openChange`,function(l){return vk(e.membersOpen,l)||(e.membersOpen=l),l}),Nc(),Oi(34,`app-confirm-dialog`,29),vg(`openChange`,function(l){return vk(e.confirmOpen,l)||(e.confirmOpen=l),l}),Jm(`confirmed`,function(){return e.confirm()}),Nc()),n&2&&(ec(5),pg(e.t().title),ec(3),pg(e.t().unused),ec(2),pg(e.unusedCount()),ec(2),Wm(`label`,e.t().menuLabel)(`items`,e.menuItems()),ec(4),Wm(`size`,15),ec(2),pg(e.t().searchLabel),ec(),Wm(`placeholder`,e.t().searchLabel)(`value`,e.search()),ec(),Wm(`label`,e.t().hideBuiltIn),hg(`on`,e.hideBuiltIn),ec(),SE(e.loading()?21:-1),ec(),Wm(`problem`,e.problem()),ec(),SE(e.selected().size>0?23:-1),ec(2),Wm(`columns`,e.columns())(`rows`,e.rows())(`trackKey`,e.trackKey),hg(`selected`,e.selected),Wm(`emptyMessage`,e.t().empty),ec(7),hg(`open`,e.createOpen),ec(),hg(`open`,e.membersOpen),Wm(`network`,e.membersNetwork()),ec(),hg(`open`,e.confirmOpen),Wm(`title`,e.actionTitle())(`description`,e.actionDescription())(`confirmLabel`,e.actionConfirmLabel())(`confirmIcon`,e.actionConfirmIcon()))},dependencies:[z,x$1,My,W,u,P,V,Q,U],encapsulation:2})}})();export{fe as NetworksPage};
|
|
1
|
+
import{$n as sS,A as HE,An as kk,B as Kr,Bn as oS,D as Gm,Dn as kE,Fn as mj,Gn as pg,Gt as _m,H as Ld,K as My,Pt as Wm,R as Jm,Rn as nk,St as Tg,Tn as jc,Zn as rf,_r as wt,cn as f,dr as vk,et as Od,f as C,fn as fk,hr as wc,ht as Sc,jn as lS,lr as vg,mt as SE,o as Ac,on as eH,q as Nc,rn as dS,rt as Ot,sn as ec,t as $E,tt as Oi,xn as hg,xt as Tc}from"./chunk-C3hTwhog.js";import"./chunk-MyEYCSP-.js";import"./chunk-BG-O4Nb_.js";import{n as y,t as f$1}from"./chunk-C1Nu6ZjD.js";import{n as o,t as i}from"./chunk-bSfpBwIa.js";import"./chunk-xPy8hpGV.js";import"./chunk-B7xGbGa9.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-Cl4e4J9q.js";import{n as p,t as M}from"./chunk-5u_BJ6JX.js";import{n as x,t as u}from"./chunk-Dy3d-reD.js";import{a as Yt,r as Q$1,s as fe$1,u as ra}from"./chunk-BEtYD0_3.js";import{n as V,t as G}from"./chunk-eoU2TjRt.js";import{n as W,t as J}from"./chunk-DtY6mcWb.js";import{n as P,t as K}from"./chunk-CzkAHty9.js";import{i as z,n as oe,r as x$1}from"./chunk-B23Afk52.js";function Ie(i,t){i&1&&(Oi(0,`p`,22),fk(1),Nc()),i&2&&(ec(),pg(t))}function Ee(i,t){if(i&1){let n=$E();Gm(0,`div`,2),Oi(1,`div`,3)(2,`div`,4)(3,`h2`,5),fk(4),Nc(),Oi(5,`p`,6),fk(6),Nc(),Oi(7,`form`,7),Jm(`submit`,function(m){Ld(n);return Od(HE().submit(m))}),Oi(8,`label`,8)(9,`span`,9),fk(10),Nc(),Oi(11,`input`,10),Jm(`input`,function(m){Ld(n);return Od(HE().name.set(m.target.value))}),Nc()(),Oi(12,`label`,11)(13,`input`,12),Jm(`change`,function(m){Ld(n);return Od(HE().internal.set(m.target.checked))}),Nc(),Oi(14,`span`)(15,`span`,13),fk(16),Nc(),Oi(17,`span`,14),fk(18),Nc()()(),Oi(19,`details`,15)(20,`summary`,16),fk(21),Nc(),Oi(22,`label`,17)(23,`span`,9),fk(24),Nc(),Oi(25,`input`,18),Jm(`input`,function(m){Ld(n);return Od(HE().driver.set(m.target.value))}),Nc(),Oi(26,`span`,19),fk(27),Nc()(),Oi(28,`label`,17)(29,`span`,9),fk(30),Nc(),Oi(31,`input`,20),Jm(`input`,function(m){Ld(n);return Od(HE().subnet.set(m.target.value))}),Nc(),Oi(32,`span`,19),fk(33),Nc()(),Oi(34,`label`,17)(35,`span`,9),fk(36),Nc(),Oi(37,`input`,21),Jm(`input`,function(m){Ld(n);return Od(HE().gateway.set(m.target.value))}),Nc(),Oi(38,`span`,19),fk(39),Nc()()(),kE(40,Ie,2,1,`p`,22),Oi(41,`div`,23)(42,`button`,24),Gm(43,`app-icon`,25),fk(44),Nc(),Oi(45,`button`,26),Gm(46,`app-icon`,27),fk(47),Nc()()()()()}if(i&2){let n,e=HE();ec(4),pg(e.t().title),ec(2),pg(e.t().description),ec(4),pg(e.t().nameLabel),ec(),nk(e.field),Wm(`placeholder`,e.t().namePlaceholder)(`value`,e.name())(`disabled`,e.busy()),ec(2),Wm(`checked`,e.internal())(`disabled`,e.busy()),ec(3),pg(e.t().internal),ec(2),pg(e.t().internalHint),ec(),Wm(`open`,e.advanced()),ec(2),pg(e.t().advanced),ec(3),pg(e.t().driverLabel),ec(),nk(e.field),Wm(`value`,e.driver())(`disabled`,e.busy()),ec(2),pg(e.t().driverHint),ec(3),pg(e.t().subnetLabel),ec(),nk(e.field),Wm(`value`,e.subnet())(`disabled`,e.busy()),ec(2),pg(e.t().subnetHint),ec(3),pg(e.t().gatewayLabel),ec(),nk(e.field),Wm(`value`,e.gateway())(`disabled`,e.busy()),ec(2),pg(e.t().gatewayHint),ec(),SE((n=e.problem())?40:-1,n),ec(3),Wm(`size`,14),ec(),Ac(` `,e.common().cancel,` `),ec(),Wm(`disabled`,!e.canSubmit()),ec(),Wm(`size`,14),ec(),Ac(` `,e.busy()?e.t().creating:e.t().submit,` `)}}var Pe;var Q;var be=f(()=>{Kr();Je$1();f$1();dS();sS();Kr();Pe=`mx-focus mt-1 w-full rounded-md border border-ink-700 bg-ink-800 px-3 py-1.5 text-[13px] text-ink-100 placeholder:text-ink-500`,Q=class i{store=C(y);open=mj(!1);t=Ot(()=>oS().networks.createDialog);common=Ot(()=>oS().common);field=Pe;name=wt(``);internal=wt(!1);driver=wt(`bridge`);subnet=wt(``);gateway=wt(``);busy=wt(!1);problem=wt(null);advanced=Ot(()=>this.driver().trim()!==`bridge`||this.subnet().trim()!==``||this.gateway().trim()!==``);canSubmit=Ot(()=>!this.busy()&&this.name().trim()!==``&&this.driver().trim()!==``);constructor(){rf(()=>{this.open()&&Tg(()=>{this.name.set(``),this.internal.set(!1),this.driver.set(`bridge`),this.subnet.set(``),this.gateway.set(``),this.problem.set(null)})})}submit(t){if(t.preventDefault(),!this.canSubmit())return;let n=this.subnet().trim(),e=this.gateway().trim();this.busy.set(!0),this.problem.set(null),this.store.create({name:this.name().trim(),driver:this.driver().trim(),internal:this.internal(),subnet:n===``?null:n,gateway:e===``?null:e}).then(m=>{this.problem.set(m),m===null&&this.open.set(!1)}).finally(()=>this.busy.set(!1))}static ɵfac=function(n){return new(n||i)};static ɵcmp=wc({type:i,selectors:[[`app-create-network-dialog`]],inputs:{open:[1,`open`]},outputs:{open:`openChange`},decls:2,vars:1,consts:[[`rdxDialogRoot`,``,3,`openChange`,`open`],[`rdxDialogPortal`,``],[`rdxDialogBackdrop`,``,1,`fixed`,`inset-0`,`z-40`,`bg-black/50`],[`rdxDialogViewport`,``,1,`fixed`,`inset-0`,`z-50`,`grid`,`place-items-center`,`p-4`],[`rdxDialogPopup`,``,1,`w-full`,`max-w-md`,`rounded-lg`,`border`,`border-ink-700`,`bg-ink-850`,`p-5`,`shadow-2xl`],[`rdxDialogTitle`,``,1,`text-[15px]`,`font-semibold`,`text-ink-100`],[`rdxDialogDescription`,``,1,`mt-1`,`text-[13px]`,`text-ink-400`],[1,`mt-4`,`space-y-3`,3,`submit`],[1,`block`],[1,`text-[12px]`,`text-ink-400`],[`type`,`text`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`placeholder`,`value`,`disabled`],[1,`flex`,`cursor-pointer`,`items-start`,`gap-2.5`],[`type`,`checkbox`,1,`mx-focus`,`mt-0.5`,`accent-accent`,3,`change`,`checked`,`disabled`],[1,`block`,`text-[13px]`,`text-ink-100`],[1,`block`,`text-[12px]`,`text-ink-500`],[1,`text-[12px]`,`text-ink-400`,3,`open`],[1,`cursor-pointer`,`select-none`],[1,`mt-2`,`block`],[`type`,`text`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`value`,`disabled`],[1,`mt-1`,`block`,`text-[12px]`,`text-ink-500`],[`type`,`text`,`placeholder`,`172.30.0.0/16`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`value`,`disabled`],[`type`,`text`,`placeholder`,`172.30.0.1`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`value`,`disabled`],[`role`,`alert`,1,`text-[13px]`,`text-danger`],[1,`flex`,`justify-end`,`gap-2`,`pt-2`],[`type`,`button`,`rdxDialogClose`,``,1,`mx-btn`,`mx-focus`],[`name`,`close`,3,`size`],[`type`,`submit`,1,`mx-btn`,`mx-focus`,3,`disabled`],[`name`,`plus`,3,`size`]],template:function(n,e){n&1&&(Oi(0,`div`,0),vg(`openChange`,function(l){return vk(e.open,l)||(e.open=l),l}),_m(1,Ee,48,38,`ng-template`,1),Nc()),n&2&&hg(`open`,e.open)},dependencies:[ie,ln,an,pn,cn,fn,dn,un,My],encapsulation:2})}});function Le(i,t){i&1&&(Oi(0,`p`,7),fk(1),Nc()),i&2&&(ec(),pg(t))}function Ve(i,t){if(i&1&&(Oi(0,`p`,8),fk(1),Nc()),i&2){let n=HE(2);ec(),pg(n.t().loading)}}function ze(i,t){if(i&1&&(Oi(0,`p`,8),fk(1),Nc()),i&2){let n=HE(2);ec(),pg(n.t().empty)}}function Oe(i,t){i&1&&(Oi(0,`span`,16),fk(1),Nc()),i&2&&(ec(),pg(t))}function We(i,t){if(i&1){let n=$E();Oi(0,`li`,13),Gm(1,`span`,14),Oi(2,`a`,15),Jm(`click`,function(){Ld(n);return Od(HE(3).open.set(!1))}),fk(3),Nc(),kE(4,Oe,2,1,`span`,16),Oi(5,`span`,17),fk(6),Nc()()}if(i&2){let n,e=t.$implicit,m=HE(3);ec(),nk(e.running?`bg-ok`:`bg-ink-600`),ec(),Wm(`routerLink`,kk(8,Te,e.id)),ec(),pg(e.name),ec(),SE((n=e.composeProject)?4:-1,n),ec(),nk(e.ipAddress?`text-ink-300`:`text-ink-600`),ec(),Ac(` `,e.ipAddress??(e.running?m.t().noAddress:m.t().stopped),` `)}}function Be(i,t){if(i&1&&(Oi(0,`ul`,9),Sc(1,We,7,10,`li`,13,Re),Nc()),i&2){let n=HE(2);ec(),Tc(n.members())}}function Ae(i,t){if(i&1&&(Gm(0,`div`,2),Oi(1,`div`,3)(2,`div`,4)(3,`h2`,5),fk(4),Nc(),Oi(5,`p`,6),fk(6),Nc(),kE(7,Le,2,1,`p`,7)(8,Ve,2,1,`p`,8)(9,ze,2,1,`p`,8)(10,Be,3,0,`ul`,9),Oi(11,`div`,10)(12,`button`,11),Gm(13,`app-icon`,12),fk(14),Nc()()()()),i&2){let n,e=HE();ec(4),pg(e.t().title(e.network())),ec(2),pg(e.t().description),ec(),SE((n=e.problem())?7:e.members()===null?8:e.members()?.length===0?9:10,n),ec(6),Wm(`size`,14),ec(),Ac(` `,e.common().close,` `)}}var Te;var Re;var U;var ye=f(()=>{Kr();ra();Je$1();lS();dS();sS();Kr();Te=i=>[`/containers`,i],Re=(i,t)=>t.id;U=class i{open=mj(!1);network=jc.required();t=Ot(()=>oS().networks.members);common=Ot(()=>oS().common);members=wt(null);problem=wt(null);constructor(){rf(()=>{if(!this.open())return;let t=this.network();Tg(()=>{this.load(t)})})}async load(t){this.members.set(null),this.problem.set(null);try{this.members.set(await window.electron.networks.members(t))}catch(n){this.problem.set(eH(n))}}static ɵfac=function(n){return new(n||i)};static ɵcmp=wc({type:i,selectors:[[`app-network-members-dialog`]],inputs:{open:[1,`open`],network:[1,`network`]},outputs:{open:`openChange`},decls:2,vars:1,consts:[[`rdxDialogRoot`,``,3,`openChange`,`open`],[`rdxDialogPortal`,``],[`rdxDialogBackdrop`,``,1,`fixed`,`inset-0`,`z-40`,`bg-black/50`],[`rdxDialogViewport`,``,1,`fixed`,`inset-0`,`z-50`,`grid`,`place-items-center`,`p-4`],[`rdxDialogPopup`,``,`data-testid`,`network-members-dialog`,1,`flex`,`max-h-[85vh]`,`w-full`,`max-w-xl`,`flex-col`,`rounded-lg`,`border`,`border-ink-700`,`bg-ink-850`,`p-5`,`shadow-2xl`],[`rdxDialogTitle`,``,1,`text-[15px]`,`font-semibold`,`text-ink-100`],[`rdxDialogDescription`,``,1,`mt-1`,`text-[13px]`,`text-ink-400`],[1,`mt-4`,`rounded-md`,`border`,`border-danger/40`,`bg-danger/10`,`px-3`,`py-2`,`text-[13px]`,`text-danger`],[1,`mt-4`,`text-[13px]`,`text-ink-400`],[`data-testid`,`network-member-list`,1,`mt-3`,`min-h-0`,`flex-1`,`divide-y`,`divide-ink-800`,`overflow-auto`],[1,`mt-4`,`flex`,`justify-end`],[`type`,`button`,`rdxDialogClose`,``,1,`mx-btn`,`mx-focus`],[`name`,`close`,3,`size`],[1,`flex`,`items-center`,`gap-3`,`py-2`,`text-[13px]`],[`aria-hidden`,`true`,1,`size-2`,`shrink-0`,`rounded-full`],[1,`mx-focus`,`min-w-0`,`flex-1`,`truncate`,`text-ink-100`,`hover:text-accent`,`hover:underline`,3,`click`,`routerLink`],[1,`shrink-0`,`text-[12px]`,`text-ink-500`],[1,`w-32`,`shrink-0`,`text-right`,`font-mono`,`text-[12px]`]],template:function(n,e){n&1&&(Oi(0,`div`,0),vg(`openChange`,function(l){return vk(e.open,l)||(e.open=l),l}),_m(1,Ae,15,5,`ng-template`,1),Nc()),n&2&&hg(`open`,e.open)},dependencies:[ie,ln,an,pn,cn,fn,dn,un,Yt,My],encapsulation:2})}});function Fe(i,t){if(i&1&&(Oi(0,`span`,16),fk(1),Nc()),i&2){let n=HE();ec(),pg(n.t().refreshing)}}function je(i,t){if(i&1){let n=$E();Oi(0,`div`,18)(1,`span`,30),fk(2),Nc(),Oi(3,`button`,31),Jm(`click`,function(){Ld(n);return Od(HE().askRemoveSelected())}),Gm(4,`app-icon`,32),fk(5),Nc()()}if(i&2){let n=HE();ec(2),pg(n.t().selected(n.selected().size)),ec(2),Wm(`size`,14),ec(),Ac(` `,n.common().remove,` `)}}function He(i,t){if(i&1&&(Oi(0,`span`,35),fk(1),Nc()),i&2){let n=HE(2);ec(),pg(n.t().builtIn)}}function Ke(i,t){if(i&1&&(Oi(0,`span`,35),fk(1),Nc()),i&2){let n=HE(2);ec(),pg(n.t().internal)}}function qe(i,t){if(i&1&&(Oi(0,`div`,36),fk(1),Nc()),i&2){let n=HE().$implicit;ec(),pg(n.composeProject)}}function Qe(i,t){if(i&1&&(Oi(0,`div`,33)(1,`span`,34),fk(2),Nc(),kE(3,He,2,1,`span`,35),kE(4,Ke,2,1,`span`,35),Nc(),kE(5,qe,2,1,`div`,36)),i&2){let n=t.$implicit;ec(),Wm(`title`,n.shortId),ec(),pg(n.name),ec(),SE(n.builtIn?3:-1),ec(),SE(n.internal?4:-1),ec(),SE(n.composeProject?5:-1)}}function Ue(i,t){if(i&1&&(Oi(0,`span`,37),fk(1),Nc()),i&2){let n=t.$implicit;ec(),pg(n.driver)}}function Ge(i,t){if(i&1&&(Oi(0,`span`,38),fk(1),Nc()),i&2){let n=t.$implicit;ec(),pg(n.scope)}}function Je(i,t){if(i&1&&(Oi(0,`span`,39),fk(1),Nc()),i&2){let n=HE().$implicit;ec(),pg(n.subnet)}}function Xe(i,t){i&1&&(Oi(0,`span`,40),fk(1,`—`),Nc())}function Ye(i,t){if(i&1&&kE(0,Je,2,1,`span`,39)(1,Xe,2,0,`span`,40),i&2){let n=t.$implicit;SE(n.subnet?0:1)}}function Ze(i,t){if(i&1&&(Oi(0,`span`,41),fk(1),Nc()),i&2){let n=HE().$implicit,e=HE();ec(),pg(e.t().containerCount(n.connected))}}function $e(i,t){i&1&&(Oi(0,`span`,40),fk(1,`—`),Nc())}function et(i,t){if(i&1&&kE(0,Ze,2,1,`span`,41)(1,$e,2,0,`span`,40),i&2){let n=t.$implicit;SE(n.connected>0?0:1)}}function tt(i,t){if(i&1){let n=$E();Oi(0,`div`,42)(1,`app-action-menu`,43),Jm(`picked`,function(m){let l=Ld(n).$implicit;return Od(HE().onRowMenu(m,l))}),Nc()()}if(i&2){let n=t.$implicit,e=HE();ec(),Wm(`label`,e.t().rowMenu(n.name))(`items`,e.rowMenu(n))}}var fe;f(()=>{Kr();f$1();M();G();J();oe();K();dS();x();be();sS();ye();ra();o();Kr();fe=class i$1{store=C(y);preferences=C(p);t=Ot(()=>oS().networks);common=Ot(()=>oS().common);columns=Ot(()=>{let t=this.t().columns;return[{key:`name`,label:t.name},{key:`driver`,label:t.driver,width:`100px`},{key:`scope`,label:t.scope,width:`90px`},{key:`subnet`,label:t.subnet,width:`160px`},{key:`connected`,label:t.connected,width:`120px`},{key:`actions`,label:t.actions,width:`84px`,align:`right`}]});loading=this.store.loading;problem=this.store.problem;pending=this.store.pending;unusedCount=this.store.unusedCount;search=wt(``);zoek=jc(void 0);hideBuiltIn=this.preferences.flag(`networks.hideBuiltIn`);selected=wt(new Set);action=wt(null);confirmOpen=wt(!1);createOpen=wt(!1);membersOpen=wt(!1);membersNetwork=wt(``);rows=Ot(()=>{let t=this.search().trim().toLowerCase(),n=this.hideBuiltIn();return this.store.networks().filter(e=>n&&e.builtIn?!1:t===``||`${e.name} ${e.driver}`.toLowerCase().includes(t))});trackKey=t=>t.id;leden=jc(void 0);router=C(fe$1);route=C(Q$1);constructor(){rf(()=>{let t=this.leden();t!==void 0&&Tg(()=>{this.membersNetwork.set(t),this.membersOpen.set(!0),i(this.router,this.route,`leden`)})}),rf(()=>{let t=this.zoek();t!==void 0&&Tg(()=>this.search.set(t))}),this.store.refresh()}removalReason(t){return t.builtIn?this.t().builtInReason:t.connected>0?this.t().connectedReason(t.connected):this.common().remove}rowMenu(t){return[{id:`members`,label:this.t().rowMembers,icon:`containers`},{id:`remove`,label:this.common().remove,icon:`trash`,disabled:!this.canRemove(t)||this.pending().has(t.id),danger:!0,hint:this.removalReason(t),separated:!0}]}onRowMenu(t,n){t===`members`?(this.membersNetwork.set(n.name),this.membersOpen.set(!0)):this.askRemove(n)}canRemove(t){return!t.builtIn&&t.connected===0}askRemove(t){let n=this.t().remove;this.action.set({ids:[t.id],title:n.title,description:n.description(t.name),confirmLabel:this.common().remove}),this.confirmOpen.set(!0)}askRemoveSelected(){let t=[...this.selected()],n=this.t().remove;this.action.set({ids:t,title:n.manyTitle,description:n.manyDescription(t.length),confirmLabel:this.common().remove}),this.confirmOpen.set(!0)}menuItems=Ot(()=>[{id:`create`,label:this.t().menu.create,icon:`plus`},{id:`prune-unused`,label:this.t().menu.pruneUnused,icon:`broom`,separated:!0}]);onMenu(t){t===`create`?this.createOpen.set(!0):this.askPrune()}askPrune(){let t=this.t().prune;this.action.set({ids:[],title:t.title,description:t.description,confirmLabel:t.confirm}),this.confirmOpen.set(!0)}confirm(){let t=this.action();t!==null&&(t.ids.length===0?this.store.prune():(this.store.removeMany(t.ids),this.selected.set(new Set)),this.action.set(null))}actionTitle(){return this.action()?.title??``}actionDescription(){return this.action()?.description??``}actionConfirmLabel(){return this.action()?.confirmLabel??this.common().remove}actionConfirmIcon(){return this.action()?.ids.length===0?`broom`:`trash`}static ɵfac=function(n){return new(n||i$1)};static ɵcmp=wc({type:i$1,selectors:[[`app-networks-page`]],inputs:{zoek:[1,`zoek`],leden:[1,`leden`]},decls:35,vars:27,consts:[[1,`flex`,`h-full`,`flex-col`],[1,`shrink-0`,`px-6`,`pt-5`,`pb-3`],[1,`flex`,`flex-wrap`,`items-start`,`gap-4`],[1,`text-xl`,`font-semibold`,`tracking-tight`,`text-ink-100`],[1,`mt-3`],[1,`text-[12px]`,`text-ink-400`],[1,`text-[15px]`,`font-medium`,`text-ink-100`],[1,`ml-auto`],[3,`picked`,`label`,`items`],[1,`mt-4`,`flex`,`flex-wrap`,`items-center`,`gap-4`],[1,`relative`,`flex`,`items-center`],[1,`pointer-events-none`,`absolute`,`left-2.5`,`text-ink-500`],[`name`,`search`,3,`size`],[1,`sr-only`],[`type`,`search`,1,`mx-focus`,`w-72`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-850`,`py-1.5`,`pr-3`,`pl-8`,`text-[13px]`,`text-ink-100`,`placeholder:text-ink-500`,3,`input`,`placeholder`,`value`],[3,`onChange`,`label`,`on`],[1,`text-[12px]`,`text-ink-500`],[3,`problem`],[1,`mt-3`,`flex`,`items-center`,`gap-2`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-850`,`px-3`,`py-2`],[1,`min-h-0`,`flex-1`,`overflow-y-auto`,`px-6`,`pb-6`],[3,`selectedChange`,`columns`,`rows`,`trackKey`,`selected`,`emptyMessage`],[`appCell`,`name`],[`appCell`,`driver`],[`appCell`,`scope`],[`appCell`,`subnet`],[`appCell`,`connected`],[`appCell`,`actions`],[3,`openChange`,`open`],[3,`openChange`,`open`,`network`],[3,`openChange`,`confirmed`,`open`,`title`,`description`,`confirmLabel`,`confirmIcon`],[1,`text-[13px]`,`text-ink-200`],[`type`,`button`,1,`mx-btn`,`mx-focus`,`ml-auto`,`text-danger`,`hover:text-danger`,3,`click`],[`name`,`trash`,3,`size`],[1,`flex`,`items-center`,`gap-2`],[1,`truncate`,`text-ink-100`,3,`title`],[1,`shrink-0`,`rounded`,`border`,`border-ink-700`,`px-1`,`text-[10px]`,`text-ink-500`],[1,`truncate`,`text-[11px]`,`text-ink-500`],[1,`text-ink-300`],[1,`text-ink-400`],[1,`font-mono`,`text-[12px]`,`text-ink-300`],[1,`text-ink-600`],[1,`text-ink-200`],[1,`flex`,`items-center`,`justify-end`],[`compact`,``,3,`picked`,`label`,`items`]],template:function(n,e){n&1&&(Oi(0,`section`,0)(1,`div`,1)(2,`div`,2)(3,`div`)(4,`h1`,3),fk(5),Nc(),Oi(6,`div`,4)(7,`div`,5),fk(8),Nc(),Oi(9,`div`,6),fk(10),Nc()()(),Oi(11,`div`,7)(12,`app-action-menu`,8),Jm(`picked`,function(l){return e.onMenu(l)}),Nc()()(),Oi(13,`div`,9)(14,`label`,10)(15,`span`,11),Gm(16,`app-icon`,12),Nc(),Oi(17,`span`,13),fk(18),Nc(),Oi(19,`input`,14),Jm(`input`,function(l){return e.search.set(l.target.value)}),Nc()(),Oi(20,`app-filter-switch`,15),vg(`onChange`,function(l){return vk(e.hideBuiltIn,l)||(e.hideBuiltIn=l),l}),Nc(),kE(21,Fe,2,1,`span`,16),Nc(),Gm(22,`app-page-messages`,17),kE(23,je,6,3,`div`,18),Nc(),Oi(24,`div`,19)(25,`app-data-table`,20),vg(`selectedChange`,function(l){return vk(e.selected,l)||(e.selected=l),l}),_m(26,Qe,6,5,`ng-template`,21)(27,Ue,2,1,`ng-template`,22)(28,Ge,2,1,`ng-template`,23)(29,Ye,2,1,`ng-template`,24)(30,et,2,1,`ng-template`,25)(31,tt,2,2,`ng-template`,26),Nc()()(),Oi(32,`app-create-network-dialog`,27),vg(`openChange`,function(l){return vk(e.createOpen,l)||(e.createOpen=l),l}),Nc(),Oi(33,`app-network-members-dialog`,28),vg(`openChange`,function(l){return vk(e.membersOpen,l)||(e.membersOpen=l),l}),Nc(),Oi(34,`app-confirm-dialog`,29),vg(`openChange`,function(l){return vk(e.confirmOpen,l)||(e.confirmOpen=l),l}),Jm(`confirmed`,function(){return e.confirm()}),Nc()),n&2&&(ec(5),pg(e.t().title),ec(3),pg(e.t().unused),ec(2),pg(e.unusedCount()),ec(2),Wm(`label`,e.t().menuLabel)(`items`,e.menuItems()),ec(4),Wm(`size`,15),ec(2),pg(e.t().searchLabel),ec(),Wm(`placeholder`,e.t().searchLabel)(`value`,e.search()),ec(),Wm(`label`,e.t().hideBuiltIn),hg(`on`,e.hideBuiltIn),ec(),SE(e.loading()?21:-1),ec(),Wm(`problem`,e.problem()),ec(),SE(e.selected().size>0?23:-1),ec(2),Wm(`columns`,e.columns())(`rows`,e.rows())(`trackKey`,e.trackKey),hg(`selected`,e.selected),Wm(`emptyMessage`,e.t().empty),ec(7),hg(`open`,e.createOpen),ec(),hg(`open`,e.membersOpen),Wm(`network`,e.membersNetwork()),ec(),hg(`open`,e.confirmOpen),Wm(`title`,e.actionTitle())(`description`,e.actionDescription())(`confirmLabel`,e.actionConfirmLabel())(`confirmIcon`,e.actionConfirmIcon()))},dependencies:[z,x$1,My,W,u,P,V,Q,U],encapsulation:2})}})();export{fe as NetworksPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$n as sS,A as HE,B as Kr,Bn as oS,Cn as iS,D as Gm,Dn as kE,F as Ik,Fn as mj,Gn as pg,H as Ld,K as My,Kn as pj,Nt as W$1,Pt as Wm,Q as OD,R as Jm,St as Tg,Tn as jc,U as M,Zn as rf,_r as wt,cn as f,cr as ve$1,et as Od,f as C,fn as fk,ft as RI,h as Cj,hr as wc,ht as Sc,jn as lS,mt as SE,o as Ac,on as eH,ot as Pk,q as Nc,rn as dS,rt as Ot$1,sn as ec,st as Pr,t as $E,tt as Oi,u as Br,w as G,wn as jI,x as Ej,xt as Tc,y as Dj,yt as TE,z as Km}from"./chunk-CpIMiI_l.js";import{n as he$1,t as W$2}from"./chunk-qxDOm16k.js";import{C as qn,E as tn,O as zn,d as Wn,f as Xn,h as ar,i as Gn,m as Zn,n as Bn,p as Yn,t as $n,u as Tt,y as ir}from"./chunk-gHmeiJFn.js";import{r as g,t as L}from"./chunk-xmDwFpQl.js";function Ft(e){let n=C(ie);return Ot$1(()=>e?.()??n())}var ie;var Pt=f(()=>{Kr();ie=new M(`RDX_DIRECTION`,{providedIn:`root`,factory:()=>Ot$1(()=>`ltr`)})});function Kt(){return C(St,{optional:!0,self:!0})}function Bt(e){return{provide:St,useFactory:e}}function Wt(e,n){let t=e.compareDocumentPosition(n);return t&Node.DOCUMENT_POSITION_FOLLOWING||t&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:t&Node.DOCUMENT_POSITION_PRECEDING||t&Node.DOCUMENT_POSITION_CONTAINS?1:0}function de(e){return[...e].filter(n=>n.element.isConnected).sort((n,t)=>Wt(n.element,t.element))}function le(e){let n=new Set;for(let t=1;t<e.length;t+=1){let i=ue(e[t-1],e[t]);i&&n.add(i)}return n}function ue(e,n){let t=e.parentElement;for(;t&&!t.contains(n);)t=t.parentElement;return t}function ce(e){let n=new Set;for(let t of e){for(let i=0;i<t.addedNodes.length;i+=1)if(n.has(t.addedNodes[i]))return!0;for(let i=0;i<t.removedNodes.length;i+=1)n.add(t.removedNodes[i])}for(let t of n)if(t.isConnected)return!0;return!1}function he(e,n){return re.some(t=>!n.includes(t)&&e.getModifierState(t))}function At(e){if(!(e instanceof HTMLElement))return!1;if(e.tagName===`TEXTAREA`)return!0;if(e.tagName!==`INPUT`)return!1;try{return e.selectionStart!=null}catch{return!1}}function zt(e,n){let t=n===`rtl`?$n:qn,i=n===`rtl`?qn:$n;return{forwardKeys:e===`horizontal`?[t]:e===`vertical`?[Wn]:[t,Wn],backwardKeys:e===`horizontal`?[i]:e===`vertical`?[zn]:[i,zn]}}function me(e,n,t,i){let{forwardKeys:o,backwardKeys:s}=zt(t,i),a=n.selectionStart,l=n.selectionEnd,r=n.value??``;return!!(a==null||l==null||e.shiftKey||a!==l||!s.includes(e.key)&&a<r.length||!o.includes(e.key)&&a>0)}function Lt(e,n){return n<0||n>=e.length}function Vt(e,n){return ot(e,{startingIndex:-1,disabledIndices:n})}function pe(e,n){return ot(e,{startingIndex:e.length,decrement:!0,disabledIndices:n})}function ot(e,n={}){let{startingIndex:t=-1,decrement:i=!1,disabledIndices:o}=n,s=i?-1:1;for(let a=t+s;a>=0&&a<e.length;a+=s)if(!$t(e,a,o))return a;return-1}function $t(e,n,t){if(t?.includes(n))return!0;let i=e[n];return i?!ge(i)||i.matches(`:disabled`)?!0:t===void 0&&(i.hasAttribute(`disabled`)||i.getAttribute(`aria-disabled`)===`true`):!1}function fe(e){return e===null||e.hasAttribute(`disabled`)||e.getAttribute(`aria-disabled`)===`true`}function ge(e){if(!e||!e.isConnected)return!1;if(typeof Element<`u`&&!(e instanceof Element))return!0;let n;try{n=getComputedStyle(e)}catch{return!0}return n.visibility!==`hidden`&&n.visibility!==`collapse`}function be(e,n,t,i){if(!e||!n||typeof e.scrollTo!=`function`)return;let o=e.clientWidth<e.scrollWidth,s=e.clientHeight<e.scrollHeight,a=e.scrollLeft,l=e.scrollTop;if(o&&i!==`vertical`){let r=Ot(e,n,`left`),d=J(e),p=J(n);t===`ltr`&&(r+n.offsetWidth+p.scrollMarginRight>e.scrollLeft+e.clientWidth-d.scrollPaddingRight?a=r+n.offsetWidth+p.scrollMarginRight-e.clientWidth+d.scrollPaddingRight:r-p.scrollMarginLeft<e.scrollLeft+d.scrollPaddingLeft&&(a=r-p.scrollMarginLeft-d.scrollPaddingLeft)),t===`rtl`&&(r-p.scrollMarginRight<e.scrollLeft+d.scrollPaddingLeft?a=r-p.scrollMarginLeft-d.scrollPaddingLeft:r+n.offsetWidth+p.scrollMarginRight>e.scrollLeft+e.clientWidth-d.scrollPaddingRight&&(a=r+n.offsetWidth+p.scrollMarginRight-e.clientWidth+d.scrollPaddingRight))}if(s&&i!==`horizontal`){let r=Ot(e,n,`top`),d=J(e),p=J(n);r-p.scrollMarginTop<e.scrollTop+d.scrollPaddingTop?l=r-p.scrollMarginTop-d.scrollPaddingTop:r+n.offsetHeight+p.scrollMarginBottom>e.scrollTop+e.clientHeight-d.scrollPaddingBottom&&(l=r+n.offsetHeight+p.scrollMarginBottom-e.clientHeight+d.scrollPaddingBottom)}e.scrollTo({left:a,top:l,behavior:`auto`})}function Ot(e,n,t){let i=t===`left`?`offsetLeft`:`offsetTop`,o=0,s=n;for(;s?.offsetParent&&(o+=s[i],s.offsetParent!==e);)s=s.offsetParent;return o}function J(e){let n=getComputedStyle(e);return{scrollMarginTop:parseFloat(n.scrollMarginTop)||0,scrollMarginRight:parseFloat(n.scrollMarginRight)||0,scrollMarginBottom:parseFloat(n.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(n.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(n.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(n.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(n.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(n.scrollPaddingLeft)||0}}var St;var se;var jt;var ae;var re;var ve;var st;var xe;var W;var O;var ye;var at;var Ie;var z;var Z;var rt=f(()=>{Kr();Kr();tn();Pt();St=new M(`RdxCompositeItemOwner`);se=`data-composite-item-active`,jt=new Set([zn,Wn,$n,qn]),ae=new Set([...jt,Xn,Yn]),re=[`Shift`,`Control`,`Alt`,`Meta`];ve=()=>{let e=C(W);return{listElement:e.elementRef.nativeElement,items:e.items,itemMap:e.itemMap,registerItem:n=>e.registerItem(n),indexOf:n=>e.indexOf(n)}},[st,xe]=Gn(`RdxCompositeListContext`,`utils/composite`),W=(()=>{class e{constructor(){this.elementRef=C(Pr),this.registrations=new Map,this.registrationTick=wt(0),this.reorderTick=wt(0),this.onMapChange=pj(),this.items=Ot$1(()=>(this.reorderTick(),this.registrationTick(),de([...this.registrations.values()]))),this.indexMap=Ot$1(()=>{let t=new Map;return this.items().forEach((i,o)=>{t.set(i.element,o)}),t}),this.itemMap=Ot$1(()=>{let t=new Map;return this.items().forEach((i,o)=>{t.set(i.element,G(W$1({},i.metadata()??{}),{index:o}))}),t}),rf(()=>{this.onMapChange.emit(this.itemMap())}),this.observeItemReordering()}observeItemReordering(){typeof MutationObserver==`function`&&rf(t=>{let i=this.items().map(a=>a.element);if(i.length<2)return;let o=le(i);if(o.size===0)return;let s=new MutationObserver(a=>{if(!ce(a))return;let l=null;for(let r of i)if(r.isConnected){if(l&&Wt(l,r)>0){s.disconnect(),this.reorderTick.update(d=>d+1);return}l=r}});o.forEach(a=>s.observe(a,{childList:!0})),t(()=>s.disconnect())})}registerItem(t){return this.registrations.set(t.element,t),this.registrationTick.update(i=>i+1),()=>{this.registrations.get(t.element)===t&&(this.registrations.delete(t.element),this.registrationTick.update(i=>i+1))}}indexOf(t){return this.indexMap().get(t)??-1}elements(){return this.items().map(t=>t.element)}static{this.ɵfac=function(i){return new(i||e)}}static{this.ɵdir=RI({type:e,selectors:[[``,`rdxCompositeList`,``]],outputs:{onMapChange:`onMapChange`},exportAs:[`rdxCompositeList`],features:[Ik([xe(ve)])]})}}return e})(),O=(()=>{class e{constructor(){this.owner=Kt(),this.injectedListContext=this.owner?null:st(!0),this.elementRef=C(Pr),this.hasRendered=wt(!1),this.listContext=Ot$1(()=>this.owner?this.owner.listContext():this.injectedListContext),this.metadataInput=jc(void 0,{alias:`metadata`}),this._metadata=Pk(()=>this.metadataInput()),this.index=Ot$1(()=>this.listContext()?.indexOf(this.elementRef.nativeElement)??-1),this.inListElement=Ot$1(()=>this.isInListElement(this.listContext())),OD(()=>{this.hasRendered.set(!0)}),rf(t=>{let i=this.listContext();if(!i||!this.hasRendered()||!this.isInListElement(i))return;let o=this.elementRef.nativeElement;t(Tg(()=>i.registerItem({element:o,metadata:this._metadata.asReadonly()})))})}setMetadata(t){this._metadata.set(t)}isInListElement(t){return!!t&&t.listElement.contains(this.elementRef.nativeElement)}static{this.ɵfac=function(i){return new(i||e)}}static{this.ɵdir=RI({type:e,selectors:[[``,`rdxCompositeListItem`,``]],inputs:{metadataInput:[1,`metadata`,`metadataInput`]},exportAs:[`rdxCompositeListItem`]})}}return e})(),ye=()=>{let e=C(z);return{rootElement:e.elementRef.nativeElement,highlightedIndex:e.highlightedIndex.asReadonly(),highlightItemOnHover:e.highlightItemOnHover,orientation:e.orientation,dir:e.dir,isIndexDisabled:n=>e.isIndexDisabled(n),setHighlightedIndex:(n,t)=>e.setHighlightedIndex(n,t),relayKeyboardEvent:n=>e.relayKeyboardEvent(n)}},[at,Ie]=Gn(`RdxCompositeRootContext`,`utils/composite`),z=(()=>{class e{constructor(){this.elementRef=C(Pr),this.compositeList=C(W,{self:!0}),this.hasSetInitialIndex=!1,this.orientationInput=jc(`both`,{alias:`orientation`}),this._orientation=Pk(()=>this.orientationInput()),this.orientation=this._orientation.asReadonly(),this.dirInput=jc(void 0,{alias:`dir`}),this.effectiveDir=Ft(this.dirInput),this._dir=Pk(()=>this.effectiveDir()),this.dir=this._dir.asReadonly(),this.loopFocusInput=jc(!0,{alias:`loopFocus`,transform:Dj}),this._loopFocus=Pk(()=>this.loopFocusInput()),this.loopFocus=this._loopFocus.asReadonly(),this.enableHomeAndEndKeysInput=jc(!1,{alias:`enableHomeAndEndKeys`,transform:Dj}),this._enableHomeAndEndKeys=Pk(()=>this.enableHomeAndEndKeysInput()),this.enableHomeAndEndKeys=this._enableHomeAndEndKeys.asReadonly(),this.disabledIndicesInput=jc(void 0,{alias:`disabledIndices`}),this._disabledIndices=Pk(()=>this.disabledIndicesInput()),this.disabledIndices=this._disabledIndices.asReadonly(),this.modifierKeysInput=jc([],{alias:`modifierKeys`}),this._modifierKeys=Pk(()=>this.modifierKeysInput()),this.modifierKeys=this._modifierKeys.asReadonly(),this.highlightItemOnHover=jc(!1,{transform:Dj}),this.stopEventPropagation=jc(!0,{transform:Dj}),this.highlightedIndex=mj(0),this.onHighlightedIndexChange=pj(),this.onMapChange=pj(),this.items=this.compositeList.items,this.itemMap=this.compositeList.itemMap,rf(()=>{let t=this.items();if(t.length!==0){if(!this.hasSetInitialIndex){this.hasSetInitialIndex=!0;let i=t.findIndex(o=>o.element.hasAttribute(se));if(i!==-1){this.setHighlightedIndex(i,!0);return}this.moveHighlightOffDisabledItem();return}this.disabledIndices()!=null&&this.moveHighlightOffDisabledItem()}}),rf(()=>{this.onMapChange.emit(this.itemMap())})}moveHighlightOffDisabledItem(){if(!this.isIndexDisabled(this.highlightedIndex()))return;let t=this.elements(),i=Vt(t,this.disabledIndices());Lt(t,i)||this.setHighlightedIndex(i)}indexOf(t){return this.compositeList.indexOf(t)}setOrientation(t){this._orientation.set(t)}setLoopFocus(t){this._loopFocus.set(t)}setDir(t){this._dir.set(t)}setEnableHomeAndEndKeys(t){this._enableHomeAndEndKeys.set(t)}setDisabledIndices(t){this._disabledIndices.set(t)}setModifierKeys(t){this._modifierKeys.set(t)}isIndexDisabled(t){return $t(this.elements(),t,this.disabledIndices())}setHighlightedIndex(t,i=!1){this.highlightedIndex()!==t&&(this.highlightedIndex.set(t),this.onHighlightedIndexChange.emit(t)),i&&be(this.elementRef.nativeElement,this.elements()[t],this.dir(),this.orientation())}relayKeyboardEvent(t){this.handleCompositeKeydown(t,!0)}handleKeydown(t){this.handleCompositeKeydown(t,!1)}handleFocusIn(t){let i=t.target;At(i)&&i.setSelectionRange(0,i.value.length)}handleCompositeKeydown(t,i){if(!(this.enableHomeAndEndKeys()?ae:jt).has(t.key)||he(t,this.modifierKeys()))return;let s=t.target,a=this.elementRef.nativeElement;if(!i&&s instanceof HTMLElement){let d=s.closest(`[rdxCompositeRoot]`);if(d&&d!==a)return}if(At(s)&&!fe(s))try{if(me(t,s,this.orientation(),this.dir()))return}catch{return}let l=this.elements();if(l.length===0)return;let r=this.getNextIndex(t,l);r===this.highlightedIndex()||Lt(l,r)||(this.stopEventPropagation()&&t.stopPropagation(),t.preventDefault(),this.setHighlightedIndex(r,!0),queueMicrotask(()=>{this.elements()[r]?.focus()}))}getNextIndex(t,i){let o=this.highlightedIndex(),s=Vt(i,this.disabledIndices()),a=pe(i,this.disabledIndices());if(this.enableHomeAndEndKeys()){if(t.key===`Home`)return s;if(t.key===`End`)return a}let{forwardKeys:l,backwardKeys:r}=zt(this.orientation(),this.dir()),d=l.includes(t.key),p=r.includes(t.key);if(!d&&!p)return o;let E=p,Xt=E?s:a,Yt=E?a:s;return this.loopFocus()&&o===Xt?Yt:ot(i,{startingIndex:o,decrement:E,disabledIndices:this.disabledIndices()})}elements(){return this.compositeList.elements()}static{this.ɵfac=function(i){return new(i||e)}}static{this.ɵdir=RI({type:e,selectors:[[``,`rdxCompositeRoot`,``]],hostBindings:function(i,o){i&1&&Jm(`keydown`,function(a){return o.handleKeydown(a)})(`focusin`,function(a){return o.handleFocusIn(a)})},inputs:{orientationInput:[1,`orientation`,`orientationInput`],dirInput:[1,`dir`,`dirInput`],loopFocusInput:[1,`loopFocus`,`loopFocusInput`],enableHomeAndEndKeysInput:[1,`enableHomeAndEndKeys`,`enableHomeAndEndKeysInput`],disabledIndicesInput:[1,`disabledIndices`,`disabledIndicesInput`],modifierKeysInput:[1,`modifierKeys`,`modifierKeysInput`],highlightItemOnHover:[1,`highlightItemOnHover`],stopEventPropagation:[1,`stopEventPropagation`],highlightedIndex:[1,`highlightedIndex`]},outputs:{highlightedIndex:`highlightedIndexChange`,onHighlightedIndexChange:`onHighlightedIndexChange`,onMapChange:`onMapChange`},exportAs:[`rdxCompositeRoot`],features:[Ik([Ie(ye)]),jI([W])]})}}return e})(),Z=(()=>{class e{constructor(){this.owner=Kt(),this.injectedRootContext=this.owner?null:at(!0),this.listItem=C(O,{self:!0}),this.elementRef=C(Pr),this.rootContext=Ot$1(()=>this.owner?this.owner.rootContext():this.injectedRootContext),this.index=this.listItem.index,this.tabIndex=Ot$1(()=>{let t=this.rootContext();if(!this.isInRootElement(t))return null;let i=this.index();return i!==-1&&t.highlightedIndex()===i&&!t.isIndexDisabled(i)?0:-1})}setMetadata(t){this.listItem.setMetadata(t)}handleFocus(){let t=this.rootContext(),i=this.index();i!==-1&&this.isInRootElement(t)&&t.setHighlightedIndex(i)}handleMouseMove(t){if(ir(t))return;let i=this.rootContext(),o=this.index();!this.isInRootElement(i)||o===-1||!i.highlightItemOnHover()||i.highlightedIndex()===o||i.isIndexDisabled(o)||this.elementRef.nativeElement.focus()}isInRootElement(t){return!!t&&t.rootElement.contains(this.elementRef.nativeElement)}static{this.ɵfac=function(i){return new(i||e)}}static{this.ɵdir=RI({type:e,selectors:[[``,`rdxCompositeItem`,``]],hostVars:1,hostBindings:function(i,o){i&1&&Jm(`focus`,function(){return o.handleFocus()})(`mousemove`,function(a){return o.handleMouseMove(a)}),i&2&&Br(`tabindex`,o.tabIndex())},exportAs:[`rdxCompositeItem`],features:[jI([{directive:O,inputs:[`metadata`,`metadata`]}])]})}}return e})()});function qt(e,n){return`${e}-tab-${n}`}function Ut(e,n){return`${e}-panel-${n}`}function De(e){return typeof e.disabled==`boolean`&&typeof e.id==`string`&&Object.prototype.hasOwnProperty.call(e,`value`)}function Te(e,n){for(let t of e.values())if(t.value===n)return t}function Ne(e){for(let n of e.values())if(!n.disabled)return n.value}function ke(e,n,t,i){if(e==null||n==null)return`none`;let o=null,s=null,a=-1,l=-1;for(let[p,E]of i.entries())if(E.value===e&&(o=p,a=E.index),E.value===n&&(s=p,l=E.index),o&&s)break;if(!o||!s||a===l)return Fe(e,n,t);let r=o.getBoundingClientRect(),d=s.getBoundingClientRect();return t===`horizontal`?d.left<r.left?`left`:d.left>r.left||l>a?`right`:`left`:d.top<r.top?`up`:d.top>r.top||l>a?`down`:`up`}function Fe(e,n,t){return e!==n&&typeof e==`number`&&typeof n==`number`||e!==n&&typeof e==`string`&&typeof n==`string`?t===`horizontal`?n>e?`right`:`left`:n>e?`down`:`up`:`none`}function Ae(){return Bt(Pe)}var tt;var Me;var fi;var Re;var _e;var Ee;var we;var Pe;var gi;var Le=f(()=>{Kr();Kr();tn();rt();rt();g();[tt,Me]=Gn(`RdxTabsRootContext`,`components/tabs`);fi=(()=>{class e{constructor(){this.rootContext=tt(),this.elementRef=C(Pr),this.compositeRoot=C(z,{self:!0}),this.compositeRootContext=at(),this.compositeListContext=st(),this.activateOnFocus=jc(!1,{transform:Dj}),this.loopFocus=jc(!0,{transform:Dj}),this.tabMap=Ot$1(()=>{let i=new Map;return this.compositeRoot.itemMap().forEach((o,s)=>{De(o)&&i.set(s,o)}),i}),this.tabMetadata=Ot$1(()=>Array.from(this.tabMap().values())),this.disabledIndices=Ot$1(()=>this.tabMetadata().filter(i=>i.disabled).map(i=>i.index)),this.activeIndex=Ot$1(()=>{let i=this.rootContext.value();return this.tabMetadata().find(s=>s.value===i)?.index??-1});let t=this.rootContext.registerTabList(this.elementRef.nativeElement,this.compositeRootContext,this.compositeListContext);C(ve$1).onDestroy(t),this.compositeRoot.setEnableHomeAndEndKeys(!0),this.compositeRoot.setDisabledIndices([]),rf(()=>{this.compositeRoot.setOrientation(this.rootContext.orientation()),this.compositeRoot.setLoopFocus(this.loopFocus())}),rf(()=>{this.rootContext.setTabMap(this.tabMap())}),rf(()=>{let i=this.activeIndex();if(i===-1)return;let o=this.elementRef.nativeElement,s=o.ownerDocument.activeElement;if(!(s&&o.contains(s))){if(this.disabledIndices().includes(i)){let a=this.tabMetadata().find(l=>!l.disabled)?.index;a!==void 0&&this.compositeRoot.setHighlightedIndex(a);return}this.compositeRoot.setHighlightedIndex(i)}}),rf(()=>this.rootContext.setActivateOnFocus(this.activateOnFocus()))}static{this.ɵfac=function(i){return new(i||e)}}static{this.ɵdir=RI({type:e,selectors:[[``,`rdxTabsList`,``]],hostAttrs:[`role`,`tablist`],hostVars:3,hostBindings:function(i,o){i&2&&Br(`aria-orientation`,o.rootContext.orientation()===`vertical`?`vertical`:void 0)(`data-orientation`,o.rootContext.orientation())(`data-activation-direction`,o.rootContext.activationDirection())},inputs:{activateOnFocus:[1,`activateOnFocus`],loopFocus:[1,`loopFocus`]},exportAs:[`rdxTabsList`],features:[jI([z])]})}}return e})();Re=()=>({present:C(_e).present}),_e=(()=>{class e{constructor(){this.elementRef=C(Pr),this.listItem=C(O,{self:!0}),this.rootContext=tt(),this.value=jc.required(),this.keepMounted=jc(!1,{transform:Dj}),this.transition=ar(()=>{}),this.transitionStatus=this.transition.status,this.panelId=Ot$1(()=>Ut(this.rootContext.baseId,this.value())),this.tabId=Ot$1(()=>{let i=this.value();for(let o of this.rootContext.tabMap().values())if(o.value===i)return o.id;return qt(this.rootContext.baseId,i)}),this.active=Ot$1(()=>this.rootContext.value()===this.value()),this.hasPresence=wt(!1),this.present=Ot$1(()=>this.keepMounted()||this.active()),this.hidden=Ot$1(()=>!this.active()&&this.transitionStatus()!==`ending`&&(!this.hasPresence()||this.keepMounted())),this.index=this.listItem.index,this.previousActive=!1,this.isFirstRun=!0;let t=this.transition.registerElement(this.elementRef.nativeElement);C(ve$1).onDestroy(t),rf(()=>{this.listItem.setMetadata({id:this.panelId(),value:this.value()})}),rf(()=>{let i=this.active();if(this.isFirstRun){this.isFirstRun=!1,this.previousActive=i;return}i!==this.previousActive&&(this.previousActive=i,Tg(()=>this.transition.start(i)))})}markHasPresence(){this.hasPresence.set(!0)}static{this.ɵfac=function(i){return new(i||e)}}static{this.ɵdir=RI({type:e,selectors:[[``,`rdxTabsPanel`,``]],hostAttrs:[`role`,`tabpanel`],hostVars:10,hostBindings:function(i,o){i&2&&(Km(`hidden`,o.hidden()),Br(`id`,o.panelId())(`tabindex`,o.active()?0:-1)(`aria-labelledby`,o.tabId())(`data-orientation`,o.rootContext.orientation())(`data-activation-direction`,o.rootContext.activationDirection())(`data-index`,o.index())(`data-hidden`,o.active()?void 0:``)(`data-starting-style`,o.transitionStatus()===`starting`?``:void 0)(`data-ending-style`,o.transitionStatus()===`ending`?``:void 0))},inputs:{value:[1,`value`],keepMounted:[1,`keepMounted`]},exportAs:[`rdxTabsPanel`],features:[Ik([L(Re)]),jI([O])]})}}return e})(),Ee=()=>{let e=C(we);return{baseId:e.baseId,value:e.value,orientation:e.orientation,activationDirection:e.activationDirection.asReadonly(),activateOnFocus:e.activateOnFocus.asReadonly(),tabListElement:e.tabListElement.asReadonly(),tabMap:e.tabMap.asReadonly(),tabCompositeRoot:e.tabCompositeRoot.asReadonly(),tabCompositeList:e.tabCompositeList.asReadonly(),setValue:(n,t,i)=>e.setValue(n,t,i),setActivateOnFocus:n=>e.activateOnFocus.set(n),registerTabList:(n,t,i)=>e.registerTabList(n,t,i),setTabMap:n=>e.tabMap.set(n)}},we=(()=>{class e{constructor(){this.baseId=Tt(`rdx-tabs-`),this.value=mj(),this.defaultValue=jc(void 0),this.orientation=jc(`horizontal`),this.onValueChange=pj(),this.activateOnFocus=wt(!1),this.tabListElement=wt(null),this.tabMap=wt(new Map),this.tabCompositeRoot=wt(null),this.tabCompositeList=wt(null),this.activationDirection=wt(`none`),this.externallyControlled=wt(!1),this.hasObservedValue=!1,this.internalValueCommit=!1,this.hasAppliedDefaultValue=!1,this.shouldNotifyInitialValueChange=!0,this.shouldHonorDisabledDefaultValue=!1,this.didRegisterTabs=!1,rf(()=>{let t=this.value();if(this.internalValueCommit){this.internalValueCommit=!1,this.hasObservedValue=!0,this.previousObservedValue=t;return}if(!this.hasObservedValue){this.hasObservedValue=!0,this.previousObservedValue=t,t!==void 0&&this.externallyControlled.set(!0);return}t!==this.previousObservedValue&&(this.externallyControlled.set(!0),this.previousObservedValue=t)}),rf(()=>{if(this.hasAppliedDefaultValue||Tg(this.value)!==void 0)return;let t=this.defaultValue(),i=t!==void 0;this.hasAppliedDefaultValue=!0,this.initialDefaultValue=t??0,this.shouldNotifyInitialValueChange=!i,this.shouldHonorDisabledDefaultValue=i,Tg(()=>this.commitValue(this.initialDefaultValue))}),rf(()=>{let t=this.tabMap(),i=this.value();if(this.externallyControlled())return;if(t.size===0){this.didRegisterTabs&&i!==null&&!this.lastKnownTabElement?.isConnected&&Tg(()=>this.commitAutomaticValueChange(null,`missing`));return}this.didRegisterTabs=!0,this.lastKnownTabElement=t.keys().next().value;let o=Te(t,i),s=Ne(t),a=o?.disabled,l=o==null&&i!==null;if(!a&&i===this.initialDefaultValue&&(this.shouldHonorDisabledDefaultValue=!1),this.shouldHonorDisabledDefaultValue&&a&&i===this.initialDefaultValue)return;let r=this.shouldNotifyInitialValueChange;if(a||l){let d=s??null;if(i===d){this.shouldNotifyInitialValueChange=!1;return}let p=`missing`;r?p=`initial`:a&&(p=`disabled`),Tg(()=>this.commitAutomaticValueChange(d,p));return}r&&o!=null&&(Tg(()=>this.notifyAutomaticValueChange(i,`initial`)),this.shouldNotifyInitialValueChange=!1)})}setValue(t,i,o=`none`){let s=this.value();if(s===t)return;let a=i?.currentTarget instanceof HTMLElement?i.currentTarget:void 0,{eventDetails:l}=Zn(o,i??new Event(`tabs.value-change`),a),r=l,d=ke(s,t,this.orientation(),this.tabMap());r.activationDirection=d,this.onValueChange.emit({value:t,eventDetails:r}),!r.isCanceled()&&(this.activationDirection.set(d),this.commitValue(t))}registerTabList(t,i,o){return this.tabListElement.set(t),this.tabCompositeRoot.set(i),this.tabCompositeList.set(o),()=>{this.tabCompositeRoot()!==i||this.tabCompositeList()!==o||(this.tabListElement.set(null),this.tabCompositeRoot.set(null),this.tabCompositeList.set(null),this.activateOnFocus.set(!1))}}commitValue(t){this.internalValueCommit=!0,this.value.set(t)}commitAutomaticValueChange(t,i){this.activationDirection.set(`none`),this.commitValue(t),this.notifyAutomaticValueChange(t,i),this.shouldNotifyInitialValueChange=!1}notifyAutomaticValueChange(t,i){if(t===void 0)return;let{eventDetails:o}=Zn(i,new Event(`tabs.value-change`)),s=o;s.activationDirection=`none`,this.onValueChange.emit({value:t,eventDetails:s})}static{this.ɵfac=function(i){return new(i||e)}}static{this.ɵdir=RI({type:e,selectors:[[``,`rdxTabsRoot`,``]],hostVars:2,hostBindings:function(i,o){i&2&&Br(`data-orientation`,o.orientation())(`data-activation-direction`,o.activationDirection())},inputs:{value:[1,`value`],defaultValue:[1,`defaultValue`],orientation:[1,`orientation`]},outputs:{value:`valueChange`,onValueChange:`onValueChange`},exportAs:[`rdxTabsRoot`],features:[Ik([Me(Ee)]),jI([W])]})}}return e})();Pe=()=>{let e=tt();return{rootContext:e.tabCompositeRoot,listContext:e.tabCompositeList}};gi=(()=>{class e{constructor(){this.rootContext=tt(),this.compositeItem=C(Z,{self:!0}),this.elementRef=C(Pr),this.value=jc.required(),this.disabled=jc(!1,{transform:Dj}),this.nativeButton=jc(!0,{transform:Dj}),this.id=jc(void 0),this.tabId=Ot$1(()=>this.id()??qt(this.rootContext.baseId,this.value())),this.panelId=Ot$1(()=>Ut(this.rootContext.baseId,this.value())),this.active=Ot$1(()=>this.rootContext.value()===this.value()),this.isPressing=!1,this.isMainButton=!1,Ej()&&Cj(()=>{let t=this.rootContext.tabCompositeList();t&&!t.listElement.contains(this.elementRef.nativeElement)&&Bn(`tabs/tab-outside-list`,'`rdxTabsTab` is rendered outside its `rdxTabsList`, so it gets no roving tabindex, arrow keys cannot reach it, and its `role="tab"` sits outside the `role="tablist"`. Move the tab inside the list, or project it there with `<ng-content>`.',`components/tabs`)}),rf(()=>{this.compositeItem.setMetadata({disabled:this.disabled(),id:this.tabId(),value:this.value()})})}onClick(t){this.active()||this.disabled()||this.rootContext.setValue(this.value(),t,`none`)}onKeyDown(t){!this.disabled()&&(t.key===` `||t.key===`Enter`)&&this.rootContext.setValue(this.value(),t,`none`)}onPointerDown(t){if(this.active()||this.disabled())return;this.isPressing=!0,this.isMainButton=t.button===0;let i=t.currentTarget instanceof HTMLElement?t.currentTarget.ownerDocument:document;i.addEventListener(`pointerup`,()=>{this.isPressing=!1,this.isMainButton=!1},{once:!0}),i.addEventListener(`pointercancel`,()=>{this.isPressing=!1,this.isMainButton=!1},{once:!0}),i.addEventListener(`blur`,()=>{this.isPressing=!1,this.isMainButton=!1},{once:!0})}onFocus(t){this.active()||this.disabled()||this.rootContext.activateOnFocus()&&(!this.isPressing||this.isMainButton)&&this.rootContext.setValue(this.value(),t,`none`)}static{this.ɵfac=function(i){return new(i||e)}}static{this.ɵdir=RI({type:e,selectors:[[``,`rdxTabsTab`,``]],hostAttrs:[`role`,`tab`],hostVars:11,hostBindings:function(i,o){i&1&&Jm(`click`,function(a){return o.onClick(a)})(`keydown`,function(a){return o.onKeyDown(a)})(`pointerdown`,function(a){return o.onPointerDown(a)})(`focus`,function(a){return o.onFocus(a)}),i&2&&Br(`type`,o.nativeButton()?`button`:void 0)(`id`,o.tabId())(`aria-selected`,o.active())(`aria-controls`,o.panelId())(`aria-disabled`,o.disabled()?`true`:void 0)(`disabled`,null)(`data-composite-item-active`,o.active()?``:void 0)(`data-orientation`,o.rootContext.orientation())(`data-activation-direction`,o.rootContext.activationDirection())(`data-active`,o.active()?``:void 0)(`data-disabled`,o.disabled()?``:void 0)},inputs:{value:[1,`value`],disabled:[1,`disabled`],nativeButton:[1,`nativeButton`],id:[1,`id`]},exportAs:[`rdxTabsTab`],features:[Ik([Ae()]),jI([Z])]})}}return e})()});function Ve(e,n){if(e&1&&(Oi(0,`p`,8),fk(1),Nc()),e&2){let t=HE(2);ec(),pg(t.t().introHost)}}function Oe(e,n){if(e&1&&(Oi(0,`p`,8),fk(1),Nc()),e&2){let t=HE(2);ec(),pg(t.t().introContainer)}}function He(e,n){if(e&1&&kE(0,Ve,2,1,`p`,8)(1,Oe,2,1,`p`,8),e&2)SE(HE().containerId()===null?0:1)}function Se(e,n){if(e&1&&(Oi(0,`p`,9),fk(1),Nc()),e&2){let t=HE().$implicit;ec(),pg(t.text)}}function Ke(e,n){if(e&1&&Gm(0,`app-answer-text`,10),e&2){let t=HE().$implicit;Wm(`text`,t.text)}}function Be(e,n){if(e&1&&(Oi(0,`p`,11),Gm(1,`app-icon`,15),fk(2),Nc()),e&2){let t=HE().$implicit;ec(),Wm(`size`,12),ec(),Ac(` `,t.label,` `)}}function je(e,n){if(e&1&&(Oi(0,`pre`,17),fk(1),Nc()),e&2){let t=HE(2).$implicit;ec(),pg(t.proposal.command)}}function We(e,n){if(e&1&&(Oi(0,`span`,21),fk(1),Nc()),e&2){let t=HE(2).$implicit,i=HE();ec(),pg(t.proposal.kind===`command`?i.t().onPrompt:i.t().done)}}function ze(e,n){if(e&1&&(Oi(0,`span`,22),fk(1),Nc()),e&2){let t=HE(2).$implicit;ec(),pg(t.problem)}}function $e(e,n){if(e&1){let t=$E();Oi(0,`div`,12)(1,`p`,16),fk(2),Nc(),kE(3,je,2,1,`pre`,17),Oi(4,`div`,18)(5,`button`,19),Jm(`click`,function(){Ld(t);let o=HE(),s=o.$implicit,a=o.$index;return Od(HE().carryOut(a,s.proposal))}),Gm(6,`app-icon`,20),fk(7),Nc(),kE(8,We,2,1,`span`,21)(9,ze,2,1,`span`,22),Nc()()}if(e&2){let t=HE().$implicit,i=HE();ec(2),pg(t.proposal.reason),ec(),SE(t.proposal.kind===`command`?3:-1),ec(2),Wm(`disabled`,t.state===`busy`||t.state===`done`&&t.proposal.kind!==`command`),ec(),Wm(`name`,i.proposalIcon(t.proposal))(`size`,14),ec(),Ac(` `,i.proposalLabel(t.proposal),` `),ec(),SE(t.state===`done`?8:t.state===`failed`?9:-1)}}function qe(e,n){if(e&1&&(Oi(0,`p`,13),fk(1),Nc()),e&2){let t=HE().$implicit;ec(),pg(t.text)}}function Ue(e,n){if(e&1&&(Oi(0,`p`,14),fk(1),Nc()),e&2){let t=HE().$implicit;ec(),Ac(` `,t.problem,` `)}}function Qe(e,n){if(e&1&&kE(0,Se,2,1,`p`,9)(1,Ke,1,1,`app-answer-text`,10)(2,Be,3,2,`p`,11)(3,$e,10,7,`div`,12)(4,qe,2,1,`p`,13)(5,Ue,2,1,`p`,14),e&2){let t,i=n.$implicit;SE((t=i.kind)===`question`?0:t===`answer`?1:t===`tool`?2:t===`proposal`?3:t===`usage`?4:t===`error`?5:-1)}}function Xe(e,n){if(e&1&&(Oi(0,`p`,2),fk(1),Nc()),e&2){let t=HE();ec(),pg(t.t().thinking)}}function dt(e){return e.toLocaleString(iS())}var Qt;var Ye=f(()=>{Kr();lS();he$1();dS();sS();Kr();Qt=class e{containerId=jc(null);commandChosen=pj();entries=wt([]);busy=wt(!1);draft=wt(``);t=Ot$1(()=>oS().containers.assistant);defaultQuestion=Ot$1(()=>this.containerId()===null?this.t().defaultHostQuestion:this.t().defaultQuestion);conversationId=null;unsubscribe=null;destroyed=!1;constructor(){C(ve$1).onDestroy(()=>{this.destroyed=!0,this.unsubscribe?.(),this.conversationId!==null&&window.electron.assistant.close(this.conversationId)})}async submit(n){n.preventDefault();let t=this.draft().trim()||(this.entries().length===0?this.defaultQuestion():``);if(!(t===``||this.busy())){this.draft.set(``),this.busy.set(!0),this.append({kind:`question`,text:t});try{let i=await this.conversation();await window.electron.assistant.ask(i,t)}catch(i){this.append({kind:`error`,problem:eH(i)})}finally{this.busy.set(!1)}}}proposalLabel(n){let t=this.t();return n.kind===`command`?t.putInTerminal:n.kind===`compose`?t.composeUp(n.project):t[n.action](n.containerName)}proposalIcon(n){return n.kind===`command`?`terminal`:n.kind===`compose`?`play`:{start:`play`,stop:`stop`,restart:`refresh`}[n.action]}async carryOut(n,t){if(t.kind===`command`){this.commandChosen.emit(t.command),this.updateProposal(n,{state:`done`});return}this.updateProposal(n,{state:`busy`});try{let i=t.kind===`compose`?await window.electron.compose.up(t.project):await window.electron.containers.action(t.action,t.containerId);this.updateProposal(n,i.ok?{state:`done`}:{state:`failed`,problem:i.problem})}catch(i){this.updateProposal(n,{state:`failed`,problem:eH(i)})}}async conversation(){if(this.conversationId!==null)return this.conversationId;let n=await window.electron.assistant.start(this.containerId());if(this.destroyed)throw window.electron.assistant.close(n),new Error(this.t().panelClosed);return this.conversationId=n,this.unsubscribe=window.electron.assistant.onEvent(n,t=>this.receive(t)),n}receive(n){switch(n.type){case`text`:this.entries.update(t=>{let i=t.at(-1);return i?.kind===`answer`?[...t.slice(0,-1),{kind:`answer`,text:i.text+n.text}]:n.text.trim()===``?t:[...t,{kind:`answer`,text:n.text}]});break;case`tool`:this.append({kind:`tool`,label:n.label});break;case`proposal`:this.append({kind:`proposal`,proposal:n.proposal,state:`open`});break;case`done`:this.append({kind:`usage`,text:this.t().usage(dt(n.inputTokens),dt(n.cachedTokens),dt(n.outputTokens))});break;case`error`:this.append({kind:`error`,problem:n.problem});break}}append(n){this.entries.update(t=>[...t,n])}updateProposal(n,t){this.entries.update(i=>i.map((o,s)=>s===n&&o.kind===`proposal`?W$1(W$1({},o),t):o))}static ɵfac=function(t){return new(t||e)};static ɵcmp=wc({type:e,selectors:[[`app-assistant-view`]],hostAttrs:[1,`flex`,`h-full`,`flex-col`],inputs:{containerId:[1,`containerId`]},outputs:{commandChosen:`commandChosen`},decls:13,vars:9,consts:[[`data-testid`,`assistant-log`,1,`min-h-0`,`flex-1`,`overflow-y-auto`,`px-6`,`py-4`],[1,`max-w-3xl`,`space-y-3`],[1,`text-[12px]`,`text-ink-500`],[1,`flex`,`shrink-0`,`gap-2`,`border-t`,`border-ink-700`,`px-6`,`py-3`,3,`submit`],[`for`,`assistant-question`,1,`sr-only`],[`id`,`assistant-question`,`type`,`text`,`autocomplete`,`off`,1,`mx-focus`,`min-w-0`,`flex-1`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-800`,`px-3`,`py-1.5`,`text-[13px]`,`text-ink-100`,`placeholder:text-ink-500`,3,`input`,`placeholder`,`value`,`disabled`],[`type`,`submit`,`data-testid`,`assistant-ask`,1,`mx-btn`,`mx-focus`,3,`disabled`],[`name`,`sparkle`,3,`size`],[1,`max-w-2xl`,`text-[13px]`,`text-ink-400`],[1,`rounded-md`,`bg-ink-800`,`px-3`,`py-2`,`text-[13px]`,`text-ink-100`],[`data-testid`,`assistant-answer`,1,`text-[13px]`,`leading-relaxed`,`text-ink-200`,3,`text`],[`data-testid`,`assistant-tool`,1,`flex`,`items-center`,`gap-1.5`,`text-[12px]`,`text-ink-500`],[`data-testid`,`assistant-proposal`,1,`rounded-md`,`border`,`border-ink-700`,`bg-ink-850`,`px-3`,`py-2`],[`data-testid`,`assistant-usage`,1,`text-[11px]`,`text-ink-600`],[`data-testid`,`assistant-error`,1,`rounded-md`,`border`,`border-danger/40`,`bg-danger/10`,`px-3`,`py-2`,`text-[13px]`,`text-danger`],[`name`,`search`,3,`size`],[1,`text-[12px]`,`text-ink-400`],[1,`mt-2`,`overflow-x-auto`,`rounded`,`bg-ink-900`,`px-2`,`py-1`,`font-mono`,`text-[12px]`,`text-ink-100`],[1,`mt-2`,`flex`,`items-center`,`gap-2`],[`type`,`button`,1,`mx-btn`,`mx-focus`,3,`click`,`disabled`],[3,`name`,`size`],[1,`text-[12px]`,`text-ok`],[1,`text-[12px]`,`text-danger`]],template:function(t,i){t&1&&(Oi(0,`div`,0),kE(1,He,2,1),Oi(2,`div`,1),Sc(3,Qe,6,1,null,null,TE),kE(5,Xe,2,1,`p`,2),Nc()(),Oi(6,`form`,3),Jm(`submit`,function(s){return i.submit(s)}),Oi(7,`label`,4),fk(8),Nc(),Oi(9,`input`,5),Jm(`input`,function(s){return i.draft.set(s.target.value)}),Nc(),Oi(10,`button`,6),Gm(11,`app-icon`,7),fk(12),Nc()()),t&2&&(ec(),SE(i.entries().length===0?1:-1),ec(2),Tc(i.entries()),ec(2),SE(i.busy()?5:-1),ec(3),pg(i.t().questionLabel),ec(),Wm(`placeholder`,i.entries().length===0?i.defaultQuestion():i.t().followUp)(`value`,i.draft())(`disabled`,i.busy()),ec(),Wm(`disabled`,i.busy()),ec(),Wm(`size`,14),ec(),Ac(` `,i.t().ask,` `))},dependencies:[W$2,My],encapsulation:2})}});export{fi as a,_e as i,Qt as n,gi as o,Ye as r,we as s,Le as t};
|
|
1
|
+
import{$n as sS,A as HE,B as Kr,Bn as oS,Cn as iS,D as Gm,Dn as kE,F as Ik,Fn as mj,Gn as pg,H as Ld,K as My,Kn as pj,Nt as W$1,Pt as Wm,Q as OD,R as Jm,St as Tg,Tn as jc,U as M,Zn as rf,_r as wt,cn as f,cr as ve$1,et as Od,f as C,fn as fk,ft as RI,h as Cj,hr as wc,ht as Sc,jn as lS,mt as SE,o as Ac,on as eH,ot as Pk,q as Nc,rn as dS,rt as Ot$1,sn as ec,st as Pr,t as $E,tt as Oi,u as Br,w as G,wn as jI,x as Ej,xt as Tc,y as Dj,yt as TE,z as Km}from"./chunk-C3hTwhog.js";import{n as he$1,t as W$2}from"./chunk-7mU3uVaN.js";import{C as qn,E as tn,O as zn,d as Wn,f as Xn,h as ar,i as Gn,m as Zn,n as Bn,p as Yn,t as $n,u as Tt,y as ir}from"./chunk-xPy8hpGV.js";import{r as g,t as L}from"./chunk-B7xGbGa9.js";function Ft(e){let n=C(ie);return Ot$1(()=>e?.()??n())}var ie;var Pt=f(()=>{Kr();ie=new M(`RDX_DIRECTION`,{providedIn:`root`,factory:()=>Ot$1(()=>`ltr`)})});function Kt(){return C(St,{optional:!0,self:!0})}function Bt(e){return{provide:St,useFactory:e}}function Wt(e,n){let t=e.compareDocumentPosition(n);return t&Node.DOCUMENT_POSITION_FOLLOWING||t&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:t&Node.DOCUMENT_POSITION_PRECEDING||t&Node.DOCUMENT_POSITION_CONTAINS?1:0}function de(e){return[...e].filter(n=>n.element.isConnected).sort((n,t)=>Wt(n.element,t.element))}function le(e){let n=new Set;for(let t=1;t<e.length;t+=1){let i=ue(e[t-1],e[t]);i&&n.add(i)}return n}function ue(e,n){let t=e.parentElement;for(;t&&!t.contains(n);)t=t.parentElement;return t}function ce(e){let n=new Set;for(let t of e){for(let i=0;i<t.addedNodes.length;i+=1)if(n.has(t.addedNodes[i]))return!0;for(let i=0;i<t.removedNodes.length;i+=1)n.add(t.removedNodes[i])}for(let t of n)if(t.isConnected)return!0;return!1}function he(e,n){return re.some(t=>!n.includes(t)&&e.getModifierState(t))}function At(e){if(!(e instanceof HTMLElement))return!1;if(e.tagName===`TEXTAREA`)return!0;if(e.tagName!==`INPUT`)return!1;try{return e.selectionStart!=null}catch{return!1}}function zt(e,n){let t=n===`rtl`?$n:qn,i=n===`rtl`?qn:$n;return{forwardKeys:e===`horizontal`?[t]:e===`vertical`?[Wn]:[t,Wn],backwardKeys:e===`horizontal`?[i]:e===`vertical`?[zn]:[i,zn]}}function me(e,n,t,i){let{forwardKeys:o,backwardKeys:s}=zt(t,i),a=n.selectionStart,l=n.selectionEnd,r=n.value??``;return!!(a==null||l==null||e.shiftKey||a!==l||!s.includes(e.key)&&a<r.length||!o.includes(e.key)&&a>0)}function Lt(e,n){return n<0||n>=e.length}function Vt(e,n){return ot(e,{startingIndex:-1,disabledIndices:n})}function pe(e,n){return ot(e,{startingIndex:e.length,decrement:!0,disabledIndices:n})}function ot(e,n={}){let{startingIndex:t=-1,decrement:i=!1,disabledIndices:o}=n,s=i?-1:1;for(let a=t+s;a>=0&&a<e.length;a+=s)if(!$t(e,a,o))return a;return-1}function $t(e,n,t){if(t?.includes(n))return!0;let i=e[n];return i?!ge(i)||i.matches(`:disabled`)?!0:t===void 0&&(i.hasAttribute(`disabled`)||i.getAttribute(`aria-disabled`)===`true`):!1}function fe(e){return e===null||e.hasAttribute(`disabled`)||e.getAttribute(`aria-disabled`)===`true`}function ge(e){if(!e||!e.isConnected)return!1;if(typeof Element<`u`&&!(e instanceof Element))return!0;let n;try{n=getComputedStyle(e)}catch{return!0}return n.visibility!==`hidden`&&n.visibility!==`collapse`}function be(e,n,t,i){if(!e||!n||typeof e.scrollTo!=`function`)return;let o=e.clientWidth<e.scrollWidth,s=e.clientHeight<e.scrollHeight,a=e.scrollLeft,l=e.scrollTop;if(o&&i!==`vertical`){let r=Ot(e,n,`left`),d=J(e),p=J(n);t===`ltr`&&(r+n.offsetWidth+p.scrollMarginRight>e.scrollLeft+e.clientWidth-d.scrollPaddingRight?a=r+n.offsetWidth+p.scrollMarginRight-e.clientWidth+d.scrollPaddingRight:r-p.scrollMarginLeft<e.scrollLeft+d.scrollPaddingLeft&&(a=r-p.scrollMarginLeft-d.scrollPaddingLeft)),t===`rtl`&&(r-p.scrollMarginRight<e.scrollLeft+d.scrollPaddingLeft?a=r-p.scrollMarginLeft-d.scrollPaddingLeft:r+n.offsetWidth+p.scrollMarginRight>e.scrollLeft+e.clientWidth-d.scrollPaddingRight&&(a=r+n.offsetWidth+p.scrollMarginRight-e.clientWidth+d.scrollPaddingRight))}if(s&&i!==`horizontal`){let r=Ot(e,n,`top`),d=J(e),p=J(n);r-p.scrollMarginTop<e.scrollTop+d.scrollPaddingTop?l=r-p.scrollMarginTop-d.scrollPaddingTop:r+n.offsetHeight+p.scrollMarginBottom>e.scrollTop+e.clientHeight-d.scrollPaddingBottom&&(l=r+n.offsetHeight+p.scrollMarginBottom-e.clientHeight+d.scrollPaddingBottom)}e.scrollTo({left:a,top:l,behavior:`auto`})}function Ot(e,n,t){let i=t===`left`?`offsetLeft`:`offsetTop`,o=0,s=n;for(;s?.offsetParent&&(o+=s[i],s.offsetParent!==e);)s=s.offsetParent;return o}function J(e){let n=getComputedStyle(e);return{scrollMarginTop:parseFloat(n.scrollMarginTop)||0,scrollMarginRight:parseFloat(n.scrollMarginRight)||0,scrollMarginBottom:parseFloat(n.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(n.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(n.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(n.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(n.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(n.scrollPaddingLeft)||0}}var St;var se;var jt;var ae;var re;var ve;var st;var xe;var W;var O;var ye;var at;var Ie;var z;var Z;var rt=f(()=>{Kr();Kr();tn();Pt();St=new M(`RdxCompositeItemOwner`);se=`data-composite-item-active`,jt=new Set([zn,Wn,$n,qn]),ae=new Set([...jt,Xn,Yn]),re=[`Shift`,`Control`,`Alt`,`Meta`];ve=()=>{let e=C(W);return{listElement:e.elementRef.nativeElement,items:e.items,itemMap:e.itemMap,registerItem:n=>e.registerItem(n),indexOf:n=>e.indexOf(n)}},[st,xe]=Gn(`RdxCompositeListContext`,`utils/composite`),W=(()=>{class e{constructor(){this.elementRef=C(Pr),this.registrations=new Map,this.registrationTick=wt(0),this.reorderTick=wt(0),this.onMapChange=pj(),this.items=Ot$1(()=>(this.reorderTick(),this.registrationTick(),de([...this.registrations.values()]))),this.indexMap=Ot$1(()=>{let t=new Map;return this.items().forEach((i,o)=>{t.set(i.element,o)}),t}),this.itemMap=Ot$1(()=>{let t=new Map;return this.items().forEach((i,o)=>{t.set(i.element,G(W$1({},i.metadata()??{}),{index:o}))}),t}),rf(()=>{this.onMapChange.emit(this.itemMap())}),this.observeItemReordering()}observeItemReordering(){typeof MutationObserver==`function`&&rf(t=>{let i=this.items().map(a=>a.element);if(i.length<2)return;let o=le(i);if(o.size===0)return;let s=new MutationObserver(a=>{if(!ce(a))return;let l=null;for(let r of i)if(r.isConnected){if(l&&Wt(l,r)>0){s.disconnect(),this.reorderTick.update(d=>d+1);return}l=r}});o.forEach(a=>s.observe(a,{childList:!0})),t(()=>s.disconnect())})}registerItem(t){return this.registrations.set(t.element,t),this.registrationTick.update(i=>i+1),()=>{this.registrations.get(t.element)===t&&(this.registrations.delete(t.element),this.registrationTick.update(i=>i+1))}}indexOf(t){return this.indexMap().get(t)??-1}elements(){return this.items().map(t=>t.element)}static{this.ɵfac=function(i){return new(i||e)}}static{this.ɵdir=RI({type:e,selectors:[[``,`rdxCompositeList`,``]],outputs:{onMapChange:`onMapChange`},exportAs:[`rdxCompositeList`],features:[Ik([xe(ve)])]})}}return e})(),O=(()=>{class e{constructor(){this.owner=Kt(),this.injectedListContext=this.owner?null:st(!0),this.elementRef=C(Pr),this.hasRendered=wt(!1),this.listContext=Ot$1(()=>this.owner?this.owner.listContext():this.injectedListContext),this.metadataInput=jc(void 0,{alias:`metadata`}),this._metadata=Pk(()=>this.metadataInput()),this.index=Ot$1(()=>this.listContext()?.indexOf(this.elementRef.nativeElement)??-1),this.inListElement=Ot$1(()=>this.isInListElement(this.listContext())),OD(()=>{this.hasRendered.set(!0)}),rf(t=>{let i=this.listContext();if(!i||!this.hasRendered()||!this.isInListElement(i))return;let o=this.elementRef.nativeElement;t(Tg(()=>i.registerItem({element:o,metadata:this._metadata.asReadonly()})))})}setMetadata(t){this._metadata.set(t)}isInListElement(t){return!!t&&t.listElement.contains(this.elementRef.nativeElement)}static{this.ɵfac=function(i){return new(i||e)}}static{this.ɵdir=RI({type:e,selectors:[[``,`rdxCompositeListItem`,``]],inputs:{metadataInput:[1,`metadata`,`metadataInput`]},exportAs:[`rdxCompositeListItem`]})}}return e})(),ye=()=>{let e=C(z);return{rootElement:e.elementRef.nativeElement,highlightedIndex:e.highlightedIndex.asReadonly(),highlightItemOnHover:e.highlightItemOnHover,orientation:e.orientation,dir:e.dir,isIndexDisabled:n=>e.isIndexDisabled(n),setHighlightedIndex:(n,t)=>e.setHighlightedIndex(n,t),relayKeyboardEvent:n=>e.relayKeyboardEvent(n)}},[at,Ie]=Gn(`RdxCompositeRootContext`,`utils/composite`),z=(()=>{class e{constructor(){this.elementRef=C(Pr),this.compositeList=C(W,{self:!0}),this.hasSetInitialIndex=!1,this.orientationInput=jc(`both`,{alias:`orientation`}),this._orientation=Pk(()=>this.orientationInput()),this.orientation=this._orientation.asReadonly(),this.dirInput=jc(void 0,{alias:`dir`}),this.effectiveDir=Ft(this.dirInput),this._dir=Pk(()=>this.effectiveDir()),this.dir=this._dir.asReadonly(),this.loopFocusInput=jc(!0,{alias:`loopFocus`,transform:Dj}),this._loopFocus=Pk(()=>this.loopFocusInput()),this.loopFocus=this._loopFocus.asReadonly(),this.enableHomeAndEndKeysInput=jc(!1,{alias:`enableHomeAndEndKeys`,transform:Dj}),this._enableHomeAndEndKeys=Pk(()=>this.enableHomeAndEndKeysInput()),this.enableHomeAndEndKeys=this._enableHomeAndEndKeys.asReadonly(),this.disabledIndicesInput=jc(void 0,{alias:`disabledIndices`}),this._disabledIndices=Pk(()=>this.disabledIndicesInput()),this.disabledIndices=this._disabledIndices.asReadonly(),this.modifierKeysInput=jc([],{alias:`modifierKeys`}),this._modifierKeys=Pk(()=>this.modifierKeysInput()),this.modifierKeys=this._modifierKeys.asReadonly(),this.highlightItemOnHover=jc(!1,{transform:Dj}),this.stopEventPropagation=jc(!0,{transform:Dj}),this.highlightedIndex=mj(0),this.onHighlightedIndexChange=pj(),this.onMapChange=pj(),this.items=this.compositeList.items,this.itemMap=this.compositeList.itemMap,rf(()=>{let t=this.items();if(t.length!==0){if(!this.hasSetInitialIndex){this.hasSetInitialIndex=!0;let i=t.findIndex(o=>o.element.hasAttribute(se));if(i!==-1){this.setHighlightedIndex(i,!0);return}this.moveHighlightOffDisabledItem();return}this.disabledIndices()!=null&&this.moveHighlightOffDisabledItem()}}),rf(()=>{this.onMapChange.emit(this.itemMap())})}moveHighlightOffDisabledItem(){if(!this.isIndexDisabled(this.highlightedIndex()))return;let t=this.elements(),i=Vt(t,this.disabledIndices());Lt(t,i)||this.setHighlightedIndex(i)}indexOf(t){return this.compositeList.indexOf(t)}setOrientation(t){this._orientation.set(t)}setLoopFocus(t){this._loopFocus.set(t)}setDir(t){this._dir.set(t)}setEnableHomeAndEndKeys(t){this._enableHomeAndEndKeys.set(t)}setDisabledIndices(t){this._disabledIndices.set(t)}setModifierKeys(t){this._modifierKeys.set(t)}isIndexDisabled(t){return $t(this.elements(),t,this.disabledIndices())}setHighlightedIndex(t,i=!1){this.highlightedIndex()!==t&&(this.highlightedIndex.set(t),this.onHighlightedIndexChange.emit(t)),i&&be(this.elementRef.nativeElement,this.elements()[t],this.dir(),this.orientation())}relayKeyboardEvent(t){this.handleCompositeKeydown(t,!0)}handleKeydown(t){this.handleCompositeKeydown(t,!1)}handleFocusIn(t){let i=t.target;At(i)&&i.setSelectionRange(0,i.value.length)}handleCompositeKeydown(t,i){if(!(this.enableHomeAndEndKeys()?ae:jt).has(t.key)||he(t,this.modifierKeys()))return;let s=t.target,a=this.elementRef.nativeElement;if(!i&&s instanceof HTMLElement){let d=s.closest(`[rdxCompositeRoot]`);if(d&&d!==a)return}if(At(s)&&!fe(s))try{if(me(t,s,this.orientation(),this.dir()))return}catch{return}let l=this.elements();if(l.length===0)return;let r=this.getNextIndex(t,l);r===this.highlightedIndex()||Lt(l,r)||(this.stopEventPropagation()&&t.stopPropagation(),t.preventDefault(),this.setHighlightedIndex(r,!0),queueMicrotask(()=>{this.elements()[r]?.focus()}))}getNextIndex(t,i){let o=this.highlightedIndex(),s=Vt(i,this.disabledIndices()),a=pe(i,this.disabledIndices());if(this.enableHomeAndEndKeys()){if(t.key===`Home`)return s;if(t.key===`End`)return a}let{forwardKeys:l,backwardKeys:r}=zt(this.orientation(),this.dir()),d=l.includes(t.key),p=r.includes(t.key);if(!d&&!p)return o;let E=p,Xt=E?s:a,Yt=E?a:s;return this.loopFocus()&&o===Xt?Yt:ot(i,{startingIndex:o,decrement:E,disabledIndices:this.disabledIndices()})}elements(){return this.compositeList.elements()}static{this.ɵfac=function(i){return new(i||e)}}static{this.ɵdir=RI({type:e,selectors:[[``,`rdxCompositeRoot`,``]],hostBindings:function(i,o){i&1&&Jm(`keydown`,function(a){return o.handleKeydown(a)})(`focusin`,function(a){return o.handleFocusIn(a)})},inputs:{orientationInput:[1,`orientation`,`orientationInput`],dirInput:[1,`dir`,`dirInput`],loopFocusInput:[1,`loopFocus`,`loopFocusInput`],enableHomeAndEndKeysInput:[1,`enableHomeAndEndKeys`,`enableHomeAndEndKeysInput`],disabledIndicesInput:[1,`disabledIndices`,`disabledIndicesInput`],modifierKeysInput:[1,`modifierKeys`,`modifierKeysInput`],highlightItemOnHover:[1,`highlightItemOnHover`],stopEventPropagation:[1,`stopEventPropagation`],highlightedIndex:[1,`highlightedIndex`]},outputs:{highlightedIndex:`highlightedIndexChange`,onHighlightedIndexChange:`onHighlightedIndexChange`,onMapChange:`onMapChange`},exportAs:[`rdxCompositeRoot`],features:[Ik([Ie(ye)]),jI([W])]})}}return e})(),Z=(()=>{class e{constructor(){this.owner=Kt(),this.injectedRootContext=this.owner?null:at(!0),this.listItem=C(O,{self:!0}),this.elementRef=C(Pr),this.rootContext=Ot$1(()=>this.owner?this.owner.rootContext():this.injectedRootContext),this.index=this.listItem.index,this.tabIndex=Ot$1(()=>{let t=this.rootContext();if(!this.isInRootElement(t))return null;let i=this.index();return i!==-1&&t.highlightedIndex()===i&&!t.isIndexDisabled(i)?0:-1})}setMetadata(t){this.listItem.setMetadata(t)}handleFocus(){let t=this.rootContext(),i=this.index();i!==-1&&this.isInRootElement(t)&&t.setHighlightedIndex(i)}handleMouseMove(t){if(ir(t))return;let i=this.rootContext(),o=this.index();!this.isInRootElement(i)||o===-1||!i.highlightItemOnHover()||i.highlightedIndex()===o||i.isIndexDisabled(o)||this.elementRef.nativeElement.focus()}isInRootElement(t){return!!t&&t.rootElement.contains(this.elementRef.nativeElement)}static{this.ɵfac=function(i){return new(i||e)}}static{this.ɵdir=RI({type:e,selectors:[[``,`rdxCompositeItem`,``]],hostVars:1,hostBindings:function(i,o){i&1&&Jm(`focus`,function(){return o.handleFocus()})(`mousemove`,function(a){return o.handleMouseMove(a)}),i&2&&Br(`tabindex`,o.tabIndex())},exportAs:[`rdxCompositeItem`],features:[jI([{directive:O,inputs:[`metadata`,`metadata`]}])]})}}return e})()});function qt(e,n){return`${e}-tab-${n}`}function Ut(e,n){return`${e}-panel-${n}`}function De(e){return typeof e.disabled==`boolean`&&typeof e.id==`string`&&Object.prototype.hasOwnProperty.call(e,`value`)}function Te(e,n){for(let t of e.values())if(t.value===n)return t}function Ne(e){for(let n of e.values())if(!n.disabled)return n.value}function ke(e,n,t,i){if(e==null||n==null)return`none`;let o=null,s=null,a=-1,l=-1;for(let[p,E]of i.entries())if(E.value===e&&(o=p,a=E.index),E.value===n&&(s=p,l=E.index),o&&s)break;if(!o||!s||a===l)return Fe(e,n,t);let r=o.getBoundingClientRect(),d=s.getBoundingClientRect();return t===`horizontal`?d.left<r.left?`left`:d.left>r.left||l>a?`right`:`left`:d.top<r.top?`up`:d.top>r.top||l>a?`down`:`up`}function Fe(e,n,t){return e!==n&&typeof e==`number`&&typeof n==`number`||e!==n&&typeof e==`string`&&typeof n==`string`?t===`horizontal`?n>e?`right`:`left`:n>e?`down`:`up`:`none`}function Ae(){return Bt(Pe)}var tt;var Me;var fi;var Re;var _e;var Ee;var we;var Pe;var gi;var Le=f(()=>{Kr();Kr();tn();rt();rt();g();[tt,Me]=Gn(`RdxTabsRootContext`,`components/tabs`);fi=(()=>{class e{constructor(){this.rootContext=tt(),this.elementRef=C(Pr),this.compositeRoot=C(z,{self:!0}),this.compositeRootContext=at(),this.compositeListContext=st(),this.activateOnFocus=jc(!1,{transform:Dj}),this.loopFocus=jc(!0,{transform:Dj}),this.tabMap=Ot$1(()=>{let i=new Map;return this.compositeRoot.itemMap().forEach((o,s)=>{De(o)&&i.set(s,o)}),i}),this.tabMetadata=Ot$1(()=>Array.from(this.tabMap().values())),this.disabledIndices=Ot$1(()=>this.tabMetadata().filter(i=>i.disabled).map(i=>i.index)),this.activeIndex=Ot$1(()=>{let i=this.rootContext.value();return this.tabMetadata().find(s=>s.value===i)?.index??-1});let t=this.rootContext.registerTabList(this.elementRef.nativeElement,this.compositeRootContext,this.compositeListContext);C(ve$1).onDestroy(t),this.compositeRoot.setEnableHomeAndEndKeys(!0),this.compositeRoot.setDisabledIndices([]),rf(()=>{this.compositeRoot.setOrientation(this.rootContext.orientation()),this.compositeRoot.setLoopFocus(this.loopFocus())}),rf(()=>{this.rootContext.setTabMap(this.tabMap())}),rf(()=>{let i=this.activeIndex();if(i===-1)return;let o=this.elementRef.nativeElement,s=o.ownerDocument.activeElement;if(!(s&&o.contains(s))){if(this.disabledIndices().includes(i)){let a=this.tabMetadata().find(l=>!l.disabled)?.index;a!==void 0&&this.compositeRoot.setHighlightedIndex(a);return}this.compositeRoot.setHighlightedIndex(i)}}),rf(()=>this.rootContext.setActivateOnFocus(this.activateOnFocus()))}static{this.ɵfac=function(i){return new(i||e)}}static{this.ɵdir=RI({type:e,selectors:[[``,`rdxTabsList`,``]],hostAttrs:[`role`,`tablist`],hostVars:3,hostBindings:function(i,o){i&2&&Br(`aria-orientation`,o.rootContext.orientation()===`vertical`?`vertical`:void 0)(`data-orientation`,o.rootContext.orientation())(`data-activation-direction`,o.rootContext.activationDirection())},inputs:{activateOnFocus:[1,`activateOnFocus`],loopFocus:[1,`loopFocus`]},exportAs:[`rdxTabsList`],features:[jI([z])]})}}return e})();Re=()=>({present:C(_e).present}),_e=(()=>{class e{constructor(){this.elementRef=C(Pr),this.listItem=C(O,{self:!0}),this.rootContext=tt(),this.value=jc.required(),this.keepMounted=jc(!1,{transform:Dj}),this.transition=ar(()=>{}),this.transitionStatus=this.transition.status,this.panelId=Ot$1(()=>Ut(this.rootContext.baseId,this.value())),this.tabId=Ot$1(()=>{let i=this.value();for(let o of this.rootContext.tabMap().values())if(o.value===i)return o.id;return qt(this.rootContext.baseId,i)}),this.active=Ot$1(()=>this.rootContext.value()===this.value()),this.hasPresence=wt(!1),this.present=Ot$1(()=>this.keepMounted()||this.active()),this.hidden=Ot$1(()=>!this.active()&&this.transitionStatus()!==`ending`&&(!this.hasPresence()||this.keepMounted())),this.index=this.listItem.index,this.previousActive=!1,this.isFirstRun=!0;let t=this.transition.registerElement(this.elementRef.nativeElement);C(ve$1).onDestroy(t),rf(()=>{this.listItem.setMetadata({id:this.panelId(),value:this.value()})}),rf(()=>{let i=this.active();if(this.isFirstRun){this.isFirstRun=!1,this.previousActive=i;return}i!==this.previousActive&&(this.previousActive=i,Tg(()=>this.transition.start(i)))})}markHasPresence(){this.hasPresence.set(!0)}static{this.ɵfac=function(i){return new(i||e)}}static{this.ɵdir=RI({type:e,selectors:[[``,`rdxTabsPanel`,``]],hostAttrs:[`role`,`tabpanel`],hostVars:10,hostBindings:function(i,o){i&2&&(Km(`hidden`,o.hidden()),Br(`id`,o.panelId())(`tabindex`,o.active()?0:-1)(`aria-labelledby`,o.tabId())(`data-orientation`,o.rootContext.orientation())(`data-activation-direction`,o.rootContext.activationDirection())(`data-index`,o.index())(`data-hidden`,o.active()?void 0:``)(`data-starting-style`,o.transitionStatus()===`starting`?``:void 0)(`data-ending-style`,o.transitionStatus()===`ending`?``:void 0))},inputs:{value:[1,`value`],keepMounted:[1,`keepMounted`]},exportAs:[`rdxTabsPanel`],features:[Ik([L(Re)]),jI([O])]})}}return e})(),Ee=()=>{let e=C(we);return{baseId:e.baseId,value:e.value,orientation:e.orientation,activationDirection:e.activationDirection.asReadonly(),activateOnFocus:e.activateOnFocus.asReadonly(),tabListElement:e.tabListElement.asReadonly(),tabMap:e.tabMap.asReadonly(),tabCompositeRoot:e.tabCompositeRoot.asReadonly(),tabCompositeList:e.tabCompositeList.asReadonly(),setValue:(n,t,i)=>e.setValue(n,t,i),setActivateOnFocus:n=>e.activateOnFocus.set(n),registerTabList:(n,t,i)=>e.registerTabList(n,t,i),setTabMap:n=>e.tabMap.set(n)}},we=(()=>{class e{constructor(){this.baseId=Tt(`rdx-tabs-`),this.value=mj(),this.defaultValue=jc(void 0),this.orientation=jc(`horizontal`),this.onValueChange=pj(),this.activateOnFocus=wt(!1),this.tabListElement=wt(null),this.tabMap=wt(new Map),this.tabCompositeRoot=wt(null),this.tabCompositeList=wt(null),this.activationDirection=wt(`none`),this.externallyControlled=wt(!1),this.hasObservedValue=!1,this.internalValueCommit=!1,this.hasAppliedDefaultValue=!1,this.shouldNotifyInitialValueChange=!0,this.shouldHonorDisabledDefaultValue=!1,this.didRegisterTabs=!1,rf(()=>{let t=this.value();if(this.internalValueCommit){this.internalValueCommit=!1,this.hasObservedValue=!0,this.previousObservedValue=t;return}if(!this.hasObservedValue){this.hasObservedValue=!0,this.previousObservedValue=t,t!==void 0&&this.externallyControlled.set(!0);return}t!==this.previousObservedValue&&(this.externallyControlled.set(!0),this.previousObservedValue=t)}),rf(()=>{if(this.hasAppliedDefaultValue||Tg(this.value)!==void 0)return;let t=this.defaultValue(),i=t!==void 0;this.hasAppliedDefaultValue=!0,this.initialDefaultValue=t??0,this.shouldNotifyInitialValueChange=!i,this.shouldHonorDisabledDefaultValue=i,Tg(()=>this.commitValue(this.initialDefaultValue))}),rf(()=>{let t=this.tabMap(),i=this.value();if(this.externallyControlled())return;if(t.size===0){this.didRegisterTabs&&i!==null&&!this.lastKnownTabElement?.isConnected&&Tg(()=>this.commitAutomaticValueChange(null,`missing`));return}this.didRegisterTabs=!0,this.lastKnownTabElement=t.keys().next().value;let o=Te(t,i),s=Ne(t),a=o?.disabled,l=o==null&&i!==null;if(!a&&i===this.initialDefaultValue&&(this.shouldHonorDisabledDefaultValue=!1),this.shouldHonorDisabledDefaultValue&&a&&i===this.initialDefaultValue)return;let r=this.shouldNotifyInitialValueChange;if(a||l){let d=s??null;if(i===d){this.shouldNotifyInitialValueChange=!1;return}let p=`missing`;r?p=`initial`:a&&(p=`disabled`),Tg(()=>this.commitAutomaticValueChange(d,p));return}r&&o!=null&&(Tg(()=>this.notifyAutomaticValueChange(i,`initial`)),this.shouldNotifyInitialValueChange=!1)})}setValue(t,i,o=`none`){let s=this.value();if(s===t)return;let a=i?.currentTarget instanceof HTMLElement?i.currentTarget:void 0,{eventDetails:l}=Zn(o,i??new Event(`tabs.value-change`),a),r=l,d=ke(s,t,this.orientation(),this.tabMap());r.activationDirection=d,this.onValueChange.emit({value:t,eventDetails:r}),!r.isCanceled()&&(this.activationDirection.set(d),this.commitValue(t))}registerTabList(t,i,o){return this.tabListElement.set(t),this.tabCompositeRoot.set(i),this.tabCompositeList.set(o),()=>{this.tabCompositeRoot()!==i||this.tabCompositeList()!==o||(this.tabListElement.set(null),this.tabCompositeRoot.set(null),this.tabCompositeList.set(null),this.activateOnFocus.set(!1))}}commitValue(t){this.internalValueCommit=!0,this.value.set(t)}commitAutomaticValueChange(t,i){this.activationDirection.set(`none`),this.commitValue(t),this.notifyAutomaticValueChange(t,i),this.shouldNotifyInitialValueChange=!1}notifyAutomaticValueChange(t,i){if(t===void 0)return;let{eventDetails:o}=Zn(i,new Event(`tabs.value-change`)),s=o;s.activationDirection=`none`,this.onValueChange.emit({value:t,eventDetails:s})}static{this.ɵfac=function(i){return new(i||e)}}static{this.ɵdir=RI({type:e,selectors:[[``,`rdxTabsRoot`,``]],hostVars:2,hostBindings:function(i,o){i&2&&Br(`data-orientation`,o.orientation())(`data-activation-direction`,o.activationDirection())},inputs:{value:[1,`value`],defaultValue:[1,`defaultValue`],orientation:[1,`orientation`]},outputs:{value:`valueChange`,onValueChange:`onValueChange`},exportAs:[`rdxTabsRoot`],features:[Ik([Me(Ee)]),jI([W])]})}}return e})();Pe=()=>{let e=tt();return{rootContext:e.tabCompositeRoot,listContext:e.tabCompositeList}};gi=(()=>{class e{constructor(){this.rootContext=tt(),this.compositeItem=C(Z,{self:!0}),this.elementRef=C(Pr),this.value=jc.required(),this.disabled=jc(!1,{transform:Dj}),this.nativeButton=jc(!0,{transform:Dj}),this.id=jc(void 0),this.tabId=Ot$1(()=>this.id()??qt(this.rootContext.baseId,this.value())),this.panelId=Ot$1(()=>Ut(this.rootContext.baseId,this.value())),this.active=Ot$1(()=>this.rootContext.value()===this.value()),this.isPressing=!1,this.isMainButton=!1,Ej()&&Cj(()=>{let t=this.rootContext.tabCompositeList();t&&!t.listElement.contains(this.elementRef.nativeElement)&&Bn(`tabs/tab-outside-list`,'`rdxTabsTab` is rendered outside its `rdxTabsList`, so it gets no roving tabindex, arrow keys cannot reach it, and its `role="tab"` sits outside the `role="tablist"`. Move the tab inside the list, or project it there with `<ng-content>`.',`components/tabs`)}),rf(()=>{this.compositeItem.setMetadata({disabled:this.disabled(),id:this.tabId(),value:this.value()})})}onClick(t){this.active()||this.disabled()||this.rootContext.setValue(this.value(),t,`none`)}onKeyDown(t){!this.disabled()&&(t.key===` `||t.key===`Enter`)&&this.rootContext.setValue(this.value(),t,`none`)}onPointerDown(t){if(this.active()||this.disabled())return;this.isPressing=!0,this.isMainButton=t.button===0;let i=t.currentTarget instanceof HTMLElement?t.currentTarget.ownerDocument:document;i.addEventListener(`pointerup`,()=>{this.isPressing=!1,this.isMainButton=!1},{once:!0}),i.addEventListener(`pointercancel`,()=>{this.isPressing=!1,this.isMainButton=!1},{once:!0}),i.addEventListener(`blur`,()=>{this.isPressing=!1,this.isMainButton=!1},{once:!0})}onFocus(t){this.active()||this.disabled()||this.rootContext.activateOnFocus()&&(!this.isPressing||this.isMainButton)&&this.rootContext.setValue(this.value(),t,`none`)}static{this.ɵfac=function(i){return new(i||e)}}static{this.ɵdir=RI({type:e,selectors:[[``,`rdxTabsTab`,``]],hostAttrs:[`role`,`tab`],hostVars:11,hostBindings:function(i,o){i&1&&Jm(`click`,function(a){return o.onClick(a)})(`keydown`,function(a){return o.onKeyDown(a)})(`pointerdown`,function(a){return o.onPointerDown(a)})(`focus`,function(a){return o.onFocus(a)}),i&2&&Br(`type`,o.nativeButton()?`button`:void 0)(`id`,o.tabId())(`aria-selected`,o.active())(`aria-controls`,o.panelId())(`aria-disabled`,o.disabled()?`true`:void 0)(`disabled`,null)(`data-composite-item-active`,o.active()?``:void 0)(`data-orientation`,o.rootContext.orientation())(`data-activation-direction`,o.rootContext.activationDirection())(`data-active`,o.active()?``:void 0)(`data-disabled`,o.disabled()?``:void 0)},inputs:{value:[1,`value`],disabled:[1,`disabled`],nativeButton:[1,`nativeButton`],id:[1,`id`]},exportAs:[`rdxTabsTab`],features:[Ik([Ae()]),jI([Z])]})}}return e})()});function Ve(e,n){if(e&1&&(Oi(0,`p`,8),fk(1),Nc()),e&2){let t=HE(2);ec(),pg(t.t().introHost)}}function Oe(e,n){if(e&1&&(Oi(0,`p`,8),fk(1),Nc()),e&2){let t=HE(2);ec(),pg(t.t().introContainer)}}function He(e,n){if(e&1&&kE(0,Ve,2,1,`p`,8)(1,Oe,2,1,`p`,8),e&2)SE(HE().containerId()===null?0:1)}function Se(e,n){if(e&1&&(Oi(0,`p`,9),fk(1),Nc()),e&2){let t=HE().$implicit;ec(),pg(t.text)}}function Ke(e,n){if(e&1&&Gm(0,`app-answer-text`,10),e&2){let t=HE().$implicit;Wm(`text`,t.text)}}function Be(e,n){if(e&1&&(Oi(0,`p`,11),Gm(1,`app-icon`,15),fk(2),Nc()),e&2){let t=HE().$implicit;ec(),Wm(`size`,12),ec(),Ac(` `,t.label,` `)}}function je(e,n){if(e&1&&(Oi(0,`pre`,17),fk(1),Nc()),e&2){let t=HE(2).$implicit;ec(),pg(t.proposal.command)}}function We(e,n){if(e&1&&(Oi(0,`span`,21),fk(1),Nc()),e&2){let t=HE(2).$implicit,i=HE();ec(),pg(t.proposal.kind===`command`?i.t().onPrompt:i.t().done)}}function ze(e,n){if(e&1&&(Oi(0,`span`,22),fk(1),Nc()),e&2){let t=HE(2).$implicit;ec(),pg(t.problem)}}function $e(e,n){if(e&1){let t=$E();Oi(0,`div`,12)(1,`p`,16),fk(2),Nc(),kE(3,je,2,1,`pre`,17),Oi(4,`div`,18)(5,`button`,19),Jm(`click`,function(){Ld(t);let o=HE(),s=o.$implicit,a=o.$index;return Od(HE().carryOut(a,s.proposal))}),Gm(6,`app-icon`,20),fk(7),Nc(),kE(8,We,2,1,`span`,21)(9,ze,2,1,`span`,22),Nc()()}if(e&2){let t=HE().$implicit,i=HE();ec(2),pg(t.proposal.reason),ec(),SE(t.proposal.kind===`command`?3:-1),ec(2),Wm(`disabled`,t.state===`busy`||t.state===`done`&&t.proposal.kind!==`command`),ec(),Wm(`name`,i.proposalIcon(t.proposal))(`size`,14),ec(),Ac(` `,i.proposalLabel(t.proposal),` `),ec(),SE(t.state===`done`?8:t.state===`failed`?9:-1)}}function qe(e,n){if(e&1&&(Oi(0,`p`,13),fk(1),Nc()),e&2){let t=HE().$implicit;ec(),pg(t.text)}}function Ue(e,n){if(e&1&&(Oi(0,`p`,14),fk(1),Nc()),e&2){let t=HE().$implicit;ec(),Ac(` `,t.problem,` `)}}function Qe(e,n){if(e&1&&kE(0,Se,2,1,`p`,9)(1,Ke,1,1,`app-answer-text`,10)(2,Be,3,2,`p`,11)(3,$e,10,7,`div`,12)(4,qe,2,1,`p`,13)(5,Ue,2,1,`p`,14),e&2){let t,i=n.$implicit;SE((t=i.kind)===`question`?0:t===`answer`?1:t===`tool`?2:t===`proposal`?3:t===`usage`?4:t===`error`?5:-1)}}function Xe(e,n){if(e&1&&(Oi(0,`p`,2),fk(1),Nc()),e&2){let t=HE();ec(),pg(t.t().thinking)}}function dt(e){return e.toLocaleString(iS())}var Qt;var Ye=f(()=>{Kr();lS();he$1();dS();sS();Kr();Qt=class e{containerId=jc(null);commandChosen=pj();entries=wt([]);busy=wt(!1);draft=wt(``);t=Ot$1(()=>oS().containers.assistant);defaultQuestion=Ot$1(()=>this.containerId()===null?this.t().defaultHostQuestion:this.t().defaultQuestion);conversationId=null;unsubscribe=null;destroyed=!1;constructor(){C(ve$1).onDestroy(()=>{this.destroyed=!0,this.unsubscribe?.(),this.conversationId!==null&&window.electron.assistant.close(this.conversationId)})}async submit(n){n.preventDefault();let t=this.draft().trim()||(this.entries().length===0?this.defaultQuestion():``);if(!(t===``||this.busy())){this.draft.set(``),this.busy.set(!0),this.append({kind:`question`,text:t});try{let i=await this.conversation();await window.electron.assistant.ask(i,t)}catch(i){this.append({kind:`error`,problem:eH(i)})}finally{this.busy.set(!1)}}}proposalLabel(n){let t=this.t();return n.kind===`command`?t.putInTerminal:n.kind===`compose`?t.composeUp(n.project):t[n.action](n.containerName)}proposalIcon(n){return n.kind===`command`?`terminal`:n.kind===`compose`?`play`:{start:`play`,stop:`stop`,restart:`refresh`}[n.action]}async carryOut(n,t){if(t.kind===`command`){this.commandChosen.emit(t.command),this.updateProposal(n,{state:`done`});return}this.updateProposal(n,{state:`busy`});try{let i=t.kind===`compose`?await window.electron.compose.up(t.project):await window.electron.containers.action(t.action,t.containerId);this.updateProposal(n,i.ok?{state:`done`}:{state:`failed`,problem:i.problem})}catch(i){this.updateProposal(n,{state:`failed`,problem:eH(i)})}}async conversation(){if(this.conversationId!==null)return this.conversationId;let n=await window.electron.assistant.start(this.containerId());if(this.destroyed)throw window.electron.assistant.close(n),new Error(this.t().panelClosed);return this.conversationId=n,this.unsubscribe=window.electron.assistant.onEvent(n,t=>this.receive(t)),n}receive(n){switch(n.type){case`text`:this.entries.update(t=>{let i=t.at(-1);return i?.kind===`answer`?[...t.slice(0,-1),{kind:`answer`,text:i.text+n.text}]:n.text.trim()===``?t:[...t,{kind:`answer`,text:n.text}]});break;case`tool`:this.append({kind:`tool`,label:n.label});break;case`proposal`:this.append({kind:`proposal`,proposal:n.proposal,state:`open`});break;case`done`:this.append({kind:`usage`,text:this.t().usage(dt(n.inputTokens),dt(n.cachedTokens),dt(n.outputTokens))});break;case`error`:this.append({kind:`error`,problem:n.problem});break}}append(n){this.entries.update(t=>[...t,n])}updateProposal(n,t){this.entries.update(i=>i.map((o,s)=>s===n&&o.kind===`proposal`?W$1(W$1({},o),t):o))}static ɵfac=function(t){return new(t||e)};static ɵcmp=wc({type:e,selectors:[[`app-assistant-view`]],hostAttrs:[1,`flex`,`h-full`,`flex-col`],inputs:{containerId:[1,`containerId`]},outputs:{commandChosen:`commandChosen`},decls:13,vars:9,consts:[[`data-testid`,`assistant-log`,1,`min-h-0`,`flex-1`,`overflow-y-auto`,`px-6`,`py-4`],[1,`max-w-3xl`,`space-y-3`],[1,`text-[12px]`,`text-ink-500`],[1,`flex`,`shrink-0`,`gap-2`,`border-t`,`border-ink-700`,`px-6`,`py-3`,3,`submit`],[`for`,`assistant-question`,1,`sr-only`],[`id`,`assistant-question`,`type`,`text`,`autocomplete`,`off`,1,`mx-focus`,`min-w-0`,`flex-1`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-800`,`px-3`,`py-1.5`,`text-[13px]`,`text-ink-100`,`placeholder:text-ink-500`,3,`input`,`placeholder`,`value`,`disabled`],[`type`,`submit`,`data-testid`,`assistant-ask`,1,`mx-btn`,`mx-focus`,3,`disabled`],[`name`,`sparkle`,3,`size`],[1,`max-w-2xl`,`text-[13px]`,`text-ink-400`],[1,`rounded-md`,`bg-ink-800`,`px-3`,`py-2`,`text-[13px]`,`text-ink-100`],[`data-testid`,`assistant-answer`,1,`text-[13px]`,`leading-relaxed`,`text-ink-200`,3,`text`],[`data-testid`,`assistant-tool`,1,`flex`,`items-center`,`gap-1.5`,`text-[12px]`,`text-ink-500`],[`data-testid`,`assistant-proposal`,1,`rounded-md`,`border`,`border-ink-700`,`bg-ink-850`,`px-3`,`py-2`],[`data-testid`,`assistant-usage`,1,`text-[11px]`,`text-ink-600`],[`data-testid`,`assistant-error`,1,`rounded-md`,`border`,`border-danger/40`,`bg-danger/10`,`px-3`,`py-2`,`text-[13px]`,`text-danger`],[`name`,`search`,3,`size`],[1,`text-[12px]`,`text-ink-400`],[1,`mt-2`,`overflow-x-auto`,`rounded`,`bg-ink-900`,`px-2`,`py-1`,`font-mono`,`text-[12px]`,`text-ink-100`],[1,`mt-2`,`flex`,`items-center`,`gap-2`],[`type`,`button`,1,`mx-btn`,`mx-focus`,3,`click`,`disabled`],[3,`name`,`size`],[1,`text-[12px]`,`text-ok`],[1,`text-[12px]`,`text-danger`]],template:function(t,i){t&1&&(Oi(0,`div`,0),kE(1,He,2,1),Oi(2,`div`,1),Sc(3,Qe,6,1,null,null,TE),kE(5,Xe,2,1,`p`,2),Nc()(),Oi(6,`form`,3),Jm(`submit`,function(s){return i.submit(s)}),Oi(7,`label`,4),fk(8),Nc(),Oi(9,`input`,5),Jm(`input`,function(s){return i.draft.set(s.target.value)}),Nc(),Oi(10,`button`,6),Gm(11,`app-icon`,7),fk(12),Nc()()),t&2&&(ec(),SE(i.entries().length===0?1:-1),ec(2),Tc(i.entries()),ec(2),SE(i.busy()?5:-1),ec(3),pg(i.t().questionLabel),ec(),Wm(`placeholder`,i.entries().length===0?i.defaultQuestion():i.t().followUp)(`value`,i.draft())(`disabled`,i.busy()),ec(),Wm(`disabled`,i.busy()),ec(),Wm(`size`,14),ec(),Ac(` `,i.t().ask,` `))},dependencies:[W$2,My],encapsulation:2})}});export{fi as a,_e as i,Qt as n,gi as o,Ye as r,we as s,Le as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as Kr,E as Gi,En as k,F as Ik,Fn as mj,It as Ws,J as Ng,Kn as pj,Mn as lf,N as Ib,Nt as W,Q as OD,R as Jm,St as Tg,Tn as jc,U as M,Zn as rf,_r as wt,br as y$,c as Ar,cn as f,cr as ve$1,er as sg,f as C,ft as RI,g as Cr,kn as ke,ot as Pk,rt as Ot,st as Pr,tn as br,tr as sw,u as Br,vt as T,wn as jI,y as Dj,z as Km}from"./chunk-CpIMiI_l.js";import{n as $n$1,o as Ne}from"./chunk-DS3iAefP.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-gHmeiJFn.js";import{i as v,n as f$1,r as g,t as L$1}from"./chunk-xmDwFpQl.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(ke),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=RI({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:[Ik([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=RI({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:[Ik([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=y$(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 k(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=Pk(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(ke),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=RI({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=RI({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:[Ik([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=RI({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=RI({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=RI({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(ke);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=RI({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:[Ik([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=RI({type:e,selectors:[[`ng-template`,`rdxDialogPortal`,``]],inputs:{container:[1,`container`]},exportAs:[`rdxDialogPortal`],features:[Ik([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=RI({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=RI({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=RI({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=RI({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=RI({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=RI({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=RI({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=RI({type:e,selectors:[[``,`rdxAlertDialogRoot`,``]],exportAs:[`rdxAlertDialogRoot`],features:[Ik([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=RI({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=RI({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{B as Kr,E as Gi,En as k,F as Ik,Fn as mj,It as Ws,J as Ng,Kn as pj,Mn as lf,N as Ib,Nt as W,Q as OD,R as Jm,St as Tg,Tn as jc,U as M,Zn as rf,_r as wt,br as y$,c as Ar,cn as f,cr as ve$1,er as sg,f as C,ft as RI,g as Cr,kn as ke,ot as Pk,rt as Ot,st as Pr,tn as br,tr as sw,u as Br,vt as T,wn as jI,y as Dj,z as Km}from"./chunk-C3hTwhog.js";import{n as $n$1,o as Ne}from"./chunk-BG-O4Nb_.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-xPy8hpGV.js";import{i as v,n as f$1,r as g,t as L$1}from"./chunk-B7xGbGa9.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(ke),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=RI({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:[Ik([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=RI({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:[Ik([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=y$(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 k(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=Pk(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(ke),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=RI({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=RI({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:[Ik([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=RI({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=RI({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=RI({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(ke);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=RI({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:[Ik([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=RI({type:e,selectors:[[`ng-template`,`rdxDialogPortal`,``]],inputs:{container:[1,`container`]},exportAs:[`rdxDialogPortal`],features:[Ik([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=RI({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=RI({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=RI({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=RI({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=RI({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=RI({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=RI({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=RI({type:e,selectors:[[``,`rdxAlertDialogRoot`,``]],exportAs:[`rdxAlertDialogRoot`],features:[Ik([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=RI({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=RI({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 +1 @@
|
|
|
1
|
-
import{B as Kr,Rt as X,_r as wt,cn as f}from"./chunk-
|
|
1
|
+
import{B as Kr,Rt as X,_r as wt,cn as f}from"./chunk-C3hTwhog.js";function m(e){document.documentElement.dataset.theme=e}function h(){try{let e=localStorage.getItem(c);return e===`light`||e===`dark`?e:null}catch{return null}}function s(){try{return matchMedia(`(prefers-color-scheme: dark)`).matches}catch{return!1}}function d(){return h()??(s()?`dark`:`light`)}var c;var a;var u=f(()=>{Kr();Kr();c=`mx.theme`;a=class e{current=wt(d());theme=this.current.asReadonly();toggle(){let t=this.current()===`dark`?`light`:`dark`;this.current.set(t),m(t);try{localStorage.setItem(c,t)}catch{}}static ɵfac=function(i){return new(i||e)};static ɵprov=X({token:e,factory:e.ɵfac,providedIn:`root`})}});export{u as i,d as n,m as r,a as t};
|