docker-client-mx 1.37.1 → 1.39.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-0lzDD7VN.js +1 -0
- package/dist/docker-desktop-mx/browser/{chunk-CRsWWmSK.js → chunk-AYiAyx6i.js} +1 -1
- package/dist/docker-desktop-mx/browser/chunk-B-3JRBZY.js +1 -0
- package/dist/docker-desktop-mx/browser/{chunk-DO4UNcFG.js → chunk-BWEbjl8i.js} +1 -1
- package/dist/docker-desktop-mx/browser/chunk-BgPEkm-o.js +1 -0
- package/dist/docker-desktop-mx/browser/{chunk-D0yJpook.js → chunk-Bg_b-Jjw.js} +1 -1
- package/dist/docker-desktop-mx/browser/chunk-BhIIfV1H.js +1 -0
- package/dist/docker-desktop-mx/browser/{chunk-USWqj2oG.js → chunk-Bo6U-hOl.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-ARerY_u8.js → chunk-BoHvB94t.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-C5GyUjf6.js → chunk-BpGvpxhZ.js} +1 -1
- package/dist/docker-desktop-mx/browser/chunk-BuLmfnYb2.js +1 -0
- package/dist/docker-desktop-mx/browser/{chunk-DoJ0-JEW.js → chunk-BxCMq76L.js} +1 -1
- package/dist/docker-desktop-mx/browser/chunk-C5DLS5H5.js +1 -0
- package/dist/docker-desktop-mx/browser/chunk-CAMD3gZz.js +3 -0
- package/dist/docker-desktop-mx/browser/chunk-CEIzuD8m.js +5 -0
- package/dist/docker-desktop-mx/browser/chunk-CFdB_rJ_.js +6 -0
- package/dist/docker-desktop-mx/browser/{chunk-d9EuDpHJ.js → chunk-CG34bAfY.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-DoVE0m-M.js → chunk-CGtoxp5M.js} +1 -1
- package/dist/docker-desktop-mx/browser/chunk-CW5lS8he.js +1 -0
- package/dist/docker-desktop-mx/browser/chunk-C_5f0tVq.js +4 -0
- package/dist/docker-desktop-mx/browser/chunk-C_ouaGQt.js +1 -0
- package/dist/docker-desktop-mx/browser/chunk-CpkVTYEc.js +1 -0
- package/dist/docker-desktop-mx/browser/{chunk-Bd4WPFll.js → chunk-Cz39jf9o.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-BwYNpJJ1.js → chunk-D1Z6IQ-O.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-A5wKOcG7.js → chunk-D2Fy6Fo8.js} +1 -1
- package/dist/docker-desktop-mx/browser/chunk-DDNJaJAt2.js +2 -0
- package/dist/docker-desktop-mx/browser/{chunk-Ce9HPQaw.js → chunk-DfetwWmp.js} +2 -2
- package/dist/docker-desktop-mx/browser/{chunk-CSf-WGgq.js → chunk-Dh_teJNw.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-BiwCCNsK.js → chunk-DieHqkfe.js} +1 -1
- package/dist/docker-desktop-mx/browser/chunk-DnACbmqU.js +1 -0
- package/dist/docker-desktop-mx/browser/chunk-DtDLpTQP.js +1 -0
- package/dist/docker-desktop-mx/browser/{chunk-CUfTRCjA.js → chunk-Dw1WSpzf.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-Dc53d1I5.js → chunk-DzQ3NZEw.js} +1 -1
- package/dist/docker-desktop-mx/browser/{chunk-BrDsQn6L.js → chunk-PF0v2lXq.js} +1 -1
- package/dist/docker-desktop-mx/browser/chunk-S9IeOMe4.js +1 -0
- package/dist/docker-desktop-mx/browser/{chunk-sLP6RSjc.js → chunk-VLH5Jka4.js} +1 -1
- package/dist/docker-desktop-mx/browser/chunk-cblD6gvc.js +1 -0
- package/dist/docker-desktop-mx/browser/{chunk-CzxPdR3J.js → chunk-nJjV_Xqa.js} +1 -1
- package/dist/docker-desktop-mx/browser/chunk-zFBXm_xf2.js +1 -0
- package/dist/docker-desktop-mx/browser/index.html +2 -2
- package/dist/docker-desktop-mx/browser/main-ER3MV5C2.js +1 -0
- package/dist/docker-desktop-mx/browser/styles-PTUPDI7O.css +1 -0
- package/dist-electron/attention.js +22 -2
- package/dist-electron/attention.js.map +1 -1
- package/dist-electron/channels.js +4 -0
- package/dist-electron/channels.js.map +1 -1
- package/dist-electron/compose-drift.js +80 -0
- package/dist-electron/compose-drift.js.map +1 -0
- package/dist-electron/containers.js +3 -0
- package/dist-electron/containers.js.map +1 -1
- package/dist-electron/ipc.js +25 -3
- package/dist-electron/ipc.js.map +1 -1
- package/dist-electron/main.js +49 -0
- package/dist-electron/main.js.map +1 -1
- package/dist-electron/preload.js +9 -1
- package/dist-electron/preload.js.map +1 -1
- package/dist-electron/project-update.js +120 -0
- package/dist-electron/project-update.js.map +1 -0
- package/dist-electron/run-command.js +104 -1
- package/dist-electron/run-command.js.map +1 -1
- package/dist-electron/tray-menu.js +84 -0
- package/dist-electron/tray-menu.js.map +1 -0
- package/package.json +1 -1
- package/dist/docker-desktop-mx/browser/chunk-B2cyL9jQ.js +0 -1
- package/dist/docker-desktop-mx/browser/chunk-BD9SGPlI.js +0 -1
- package/dist/docker-desktop-mx/browser/chunk-BTUpw4iP.js +0 -1
- package/dist/docker-desktop-mx/browser/chunk-BU6WXUxF.js +0 -4
- package/dist/docker-desktop-mx/browser/chunk-B_LO2qP5.js +0 -1
- package/dist/docker-desktop-mx/browser/chunk-BrBZ51IY.js +0 -1
- package/dist/docker-desktop-mx/browser/chunk-C0CE-ryM.js +0 -1
- package/dist/docker-desktop-mx/browser/chunk-C218KaAr.js +0 -1
- package/dist/docker-desktop-mx/browser/chunk-CKZAnwkz.js +0 -1
- package/dist/docker-desktop-mx/browser/chunk-CN_jXmBu.js +0 -4
- package/dist/docker-desktop-mx/browser/chunk-CuB3SKfL.js +0 -1
- package/dist/docker-desktop-mx/browser/chunk-DO0iZtCc.js +0 -1
- package/dist/docker-desktop-mx/browser/chunk-DmLR4vjP.js +0 -1
- package/dist/docker-desktop-mx/browser/chunk-ai7J7l7m.js +0 -1
- package/dist/docker-desktop-mx/browser/chunk-d2Mr7W8C.js +0 -2
- package/dist/docker-desktop-mx/browser/chunk-wHjVeoVE.js +0 -1
- package/dist/docker-desktop-mx/browser/main-QH6OTQO6.js +0 -1
- package/dist/docker-desktop-mx/browser/styles-QQZVKMBI.css +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$n as sg,En as jc,Fn as mj,G as M,I as Jm,Kn as pj,L as Km,Lt as Ws,M as Ib,Pt as W,R as Kr,Tn as jI,Tr as zr,W as Lt$1,Z as Ng,Zn as rf,_ as Dj,_r as wt,a as Ar,at as Pr,br as yR,bt as T,ht as S,it as PS,j as IS,jn as lf,ln as f,lr as ve$1,m as Cr,nn as br,t as $I,tr as sw,u as C,w as Gi,wt as Tg,yt as Se$1,z as LD}from"./chunk-C_5f0tVq.js";import{n as $n$1,o as Ne}from"./chunk-0lzDD7VN.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-S9IeOMe4.js";import{i as v,n as f$1,r as g,t as L$1}from"./chunk-CG34bAfY.js";function F(e,o){let t=o;for(;t;){if(t===e)return!0;t=St(t)?t.host:t.parentNode}return!1}function En(e){return e.visibility===`hidden`||e.visibility===`collapse`}function wn(e,o){return!e.isConnected||!o||En(o)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():o.display!==`none`&&o.display!==`contents`}function Cn(e){let o=e.assignedSlot;if(o)return o;if(e.parentElement)return e.parentElement;let t=e.getRootNode();return St(t)?t.host:null}function He(e){for(let o of Array.from(e.children))if(L(o)===`summary`)return o;return null}function Tn(e,o){let t=He(o);return!!t&&(e===t||F(t,e))}function Lt(e){let o=e?L(e):``;return e!=null&&e.matches(bn)&&(o!==`summary`||e.parentElement!=null&&L(e.parentElement)===`details`&&He(e.parentElement)===e)&&(o!==`details`||He(e)==null)&&(o!==`input`||e.type!==`hidden`)}function Fn(e,o){let t=xn(e);return o?!!t&&t.display!==`none`:wn(e,t)}function On(e){if(!Lt(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let o=e;o;o=Cn(o)){let t=o!==e,n=L(o)===`slot`;if(o.hasAttribute(`inert`)||t&&L(o)===`details`&&!o.open&&!Tn(e,o)||o.hasAttribute(`hidden`)||!n&&!Fn(o,t))return!1}return!0}function Rn(e){let o=e.tabIndex;if(o<0){let t=L(e);if(t===`details`||t===`audio`||t===`video`||fe(e)&&e.isContentEditable)return 0}return o}function Se(e){if(L(e)!==`input`)return null;let o=e;return o.type===`radio`&&o.name!==``?o:null}function Mn(e,o){let t=Se(e);if(!t)return!0;let n=o.find(i=>{let s=Se(i);return s?.name===t.name&&s.form===t.form&&s.checked});return n?n===t:o.find(i=>{let s=Se(i);return s?.name===t.name&&s.form===t.form})===t}function Bt(e){if(fe(e)&&L(e)===`slot`){let o=e.assignedElements({flatten:!0});if(o.length>0)return o}return fe(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function Ht(e,o){Bt(e).forEach(t=>{Lt(t)&&o.push(t),Ht(t,o)})}function In(e,o){let t=[],n=i=>{Bt(i).forEach(s=>{fe(s)&&s.matches(o)&&t.push(s),n(s)})};return n(e),t}function An(e){let o=[];return Ht(e,o),o.filter(On)}function ge(e){let o=An(e);return o.filter(t=>Rn(t)>=0&&Mn(t,o))}function me(e){return ge(e)}function Nn(e){let o=ge(e);return[o[0],o[o.length-1]]}function jt(e,o){let t=ge(e);if(t.length===0)return;let n=rr(e.ownerDocument),i=n?t.indexOf(n):-1;return t[i===-1?o===1?0:t.length-1:i+o]}function je(e){let o=(e?.ownerDocument??document).body;return jt(o,1)??e}function Ge(e){let o=(e?.ownerDocument??document).body;return jt(o,-1)??e}function Pn(e){return e.composedPath?.()[0]??e.target}function kn(e,{select:o=!1,root:t}={}){let n=t??e[0]?.ownerDocument??document,i=rr(n);for(let s of e)if(x(s,{select:o}),rr(n)!==i)return!0}function Gt(e){return e instanceof(e?.ownerDocument?.defaultView?.HTMLElement??HTMLElement)&&e.matches(Sn)}function Ln(e){return e instanceof HTMLInputElement&&`select`in e}function x(e,{select:o=!1}={}){if(e&&e.focus){let n=rr((`ownerDocument`in e?e.ownerDocument:void 0)??document);e.focus({preventScroll:!0}),e!==n&&Ln(e)&&o&&e.select()}}function Ve(e){let o=e.createElement(`span`);return o.setAttribute(`tabindex`,`0`),o.setAttribute(ve,``),me$1.screenReader.voiceOver&&me$1.engine.webkit?o.setAttribute(`role`,`button`):o.setAttribute(`aria-hidden`,`true`),Object.assign(o.style,Bn),o}function Nt(e){for(let o of ge(e))o.setAttribute(le,o.getAttribute(`tabindex`)??``),o.setAttribute(`tabindex`,`-1`)}function pe(e){In(e,`[${le}]`).forEach(o=>{let t=o.getAttribute(le);o.removeAttribute(le),t?o.setAttribute(`tabindex`,t):o.removeAttribute(`tabindex`)})}function te(e,o){let t=e.relatedTarget;return!t||!F(o,t)}function Vt(e,o={}){let t=o.enabled??(()=>!0),n=!1;rf(i=>{let s=e();if(!s||!t())return;let r=s.ownerDocument,u=d=>{!d.relatedTarget||!te(d,s)||(d.type===`focusin`?n&&(pe(s),n=!1):(Nt(s),n=!0))};te(new FocusEvent(`focusin`,{relatedTarget:r.activeElement}),s)&&(Nt(s),n=!0),s.addEventListener(`focusin`,u,!0),s.addEventListener(`focusout`,u,!0),i(()=>{s.removeEventListener(`focusin`,u,!0),s.removeEventListener(`focusout`,u,!0),n&&(pe(s),n=!1)})})}function _t(e){return{provide:De,useFactory:e}}function Hn(e){let o=Pt.get(e);return o||(o=wt([]),Pt.set(e,o)),o}function jn(e){let o=Hn(e);return{add(t){let n=o(),i=n[0];t!==i&&i?.pause();let s=kt(n,t);s.unshift(t),o.set(s)},remove(t){let i=kt(o(),t);o.set(i),o()[0]?.resume()}}}function kt(e,o){let t=[...e],n=t.indexOf(o);return n!==-1&&t.splice(n,1),t}var bn;var L;var yn;var fe;var St;var xn;var Le;var Be;var At;var Sn;var ve;var le;var Bn;var De;var Pt;var Do;var Gn;var Vn;var V;var be=f(()=>{Kr();Kr();tn$1();bn=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`,L=e=>e.nodeName.toLowerCase(),yn=e=>e!=null&&typeof e.nodeType==`number`,fe=e=>{if(!yn(e))return!1;let o=e.ownerDocument?.defaultView;return o?e instanceof o.HTMLElement:e instanceof HTMLElement},St=e=>e!==null&&e.nodeType===11&&`host`in e,xn=e=>{let o=e.ownerDocument.defaultView;return o?o.getComputedStyle(e):null};Le=`focusScope.autoFocusOnMount`,Be=`focusScope.autoFocusOnUnmount`,At={bubbles:!1,cancelable:!0};Sn=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`;ve=`data-rdx-focus-guard`,le=`data-rdx-tabindex`,Bn={position:`fixed`,top:`0`,left:`0`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clipPath:`inset(50%)`,whiteSpace:`nowrap`,border:`0`};De=new M(`RdxFocusScopeConfig`,{factory:()=>({trapped:wt(!1)})});Pt=new WeakMap;[Do,Gn]=Gn$1(`FocusScope Context`,`utils/focus-scope`),Vn=()=>{let e=C(V);return{loop:e.loop,trapped:e.isTrapped}},V=(()=>{class e{constructor(){this.injector=C(Se$1),this.destroyRef=C(ve$1),this.elementRef=C(Pr),this.config=C(De),this.ownerDocument=this.elementRef.nativeElement.ownerDocument??document,this.loop=jc(!1,{transform:Dj}),this.trapped=jc(void 0,{transform:t=>t===void 0?void 0:Dj(t)}),this.isTrapped=Lt$1(()=>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}),LD(()=>{rf(t=>{let n=this.elementRef.nativeElement;if(this.isTrapped()){let i=d=>{if(this.focusScope.paused()||!n)return;let v=Pn(d);F(n,v)?this.lastFocusedElement.set(v):x(this.lastFocusedElement(),{select:!0})},s=d=>{if(this.focusScope.paused()||!n)return;let v=d.relatedTarget;v!==null&&(F(n,v)||x(this.lastFocusedElement(),{select:!0}))},r=()=>{F(n,this.lastFocusedElement())||x(n)},u=new MutationObserver(r);n&&u.observe(n,{childList:!0,subtree:!0}),this.ownerDocument.addEventListener(`focusin`,i),this.ownerDocument.addEventListener(`focusout`,s),t(()=>{this.ownerDocument.removeEventListener(`focusin`,i),this.ownerDocument.removeEventListener(`focusout`,s),u.disconnect()})}},{injector:this.injector}),rf(async t=>{let n=this.elementRef.nativeElement;if(await Promise.resolve(),!n||!this.alive)return;this.focusScopesStack.add(this.focusScope);let i=rr(this.ownerDocument),s=F(n,i),r=d=>{this.alive&&this.mountAutoFocus.emit(d)};if(!s){let d=new CustomEvent(Le,At);n.addEventListener(Le,r),n.dispatchEvent(d),d.defaultPrevented||(kn(me(n),{select:!0,root:this.ownerDocument}),rr(this.ownerDocument)===i&&x(n))}let u=d=>{this.alive&&this.unmountAutoFocus.emit(d)};n.addEventListener(Be,u),t(()=>{n.removeEventListener(Le,r);let d=new CustomEvent(Be,At);n.dispatchEvent(d),(this.ownerDocument.defaultView??globalThis).requestAnimationFrame(()=>{let O=this.config.returnFocus?.();O!==!1&&!d.defaultPrevented&&(O?x(O,{select:!0}):this.shouldPreserveMovedFocus()||x(i??this.ownerDocument.body,{select:!0})),n.removeEventListener(Be,u),this.focusScopesStack.remove(this.focusScope)})})},{injector:this.injector})})}shouldPreserveMovedFocus(){let t=rr(this.ownerDocument);return!!t&&t!==this.ownerDocument.body&&!F(this.elementRef.nativeElement,t)}handleKeyDown(t){if(!this.loop()&&!this.isTrapped()||this.focusScope.paused())return;let n=t.key===`Tab`&&!t.altKey&&!t.ctrlKey&&!t.metaKey,i=rr(this.ownerDocument);if(n&&i){let s=t.currentTarget,[r,u]=Nn(s);r&&u?!t.shiftKey&&i===u?(t.preventDefault(),this.loop()&&x(r,{select:!0})):t.shiftKey&&i===r&&(t.preventDefault(),this.loop()&&x(u,{select:!0})):i===s&&t.preventDefault()}}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$I({type:e,selectors:[[``,`rdxFocusScope`,``]],hostAttrs:[`tabindex`,`-1`],hostBindings:function(n,i){n&1&&Jm(`keydown`,function(r){return i.handleKeyDown(r)})},inputs:{loop:[1,`loop`],trapped:[1,`trapped`]},outputs:{mountAutoFocus:`mountAutoFocus`,unmountAutoFocus:`unmountAutoFocus`},features:[IS([Gn(Vn)])]})}}return e})()});function Yt(e){return e?e instanceof ShadowRoot?e.host:Yt(e.parentNode):null}function Kt(e,o){return o.map(t=>{if(e.contains(t))return t;let n=Yt(t);return n&&e.contains(n)?n:null}).filter(t=>t!=null)}function Ut(e){let o=new Set;return e.forEach(t=>{let n=t;for(;n&&!o.has(n);)o.add(n),n=n.parentNode}),o}function Xt(e,o,t){let n=[],i=s=>{!s||t.has(s)||Array.from(s.children).forEach(r=>{r.nodeName.toLowerCase()!==`script`&&(o.has(r)?i(r):n.push(r))})};return i(e),n}function qt(e,o={}){let{ariaHidden:t=!1,inert:n=!1,mark:i=!0}=o,s=e[0];if(!s)return()=>{};let r=s.ownerDocument.body,u=Kt(r,e),d=n?`inert`:t?`aria-hidden`:null,v=[],O=[];if(d){let E=ye[d],l=xe[d],D=Kt(r,Array.from(r.querySelectorAll(`[aria-live]`))),k=u.concat(D);Xt(r,Ut(k),new Set(k)).forEach(R=>{let S=R.getAttribute(d),b=S!==null&&S!==`false`,$=(E.get(R)??0)+1;E.set(R,$),v.push(R),$===1&&b&&l.add(R),b||R.setAttribute(d,d===`inert`?``:`true`)})}return i&&Xt(r,Ut(u),new Set(u)).forEach(l=>{let D=(ne.get(l)??0)+1;ne.set(l,D),O.push(l),D===1&&l.setAttribute(we,``)}),_e+=1,()=>{if(d){let E=ye[d],l=xe[d];v.forEach(D=>{let k=(E.get(D)??0)-1;E.set(D,k),k===0&&(l.has(D)||D.removeAttribute(d),l.delete(D))})}O.forEach(E=>{let l=(ne.get(E)??0)-1;ne.set(E,l),l===0&&E.removeAttribute(we)}),_e-=1,_e===0&&(ye.inert=new WeakMap,ye[`aria-hidden`]=new WeakMap,xe.inert=new WeakSet,xe[`aria-hidden`]=new WeakSet,ne=new WeakMap)}}function Ke(e){return e?typeof KeyboardEvent<`u`&&e instanceof KeyboardEvent?`keyboard`:`pointerType`in e&&typeof e.pointerType==`string`?e.pointerType||`mouse`:typeof MouseEvent<`u`&&e instanceof MouseEvent?e.detail===0?`keyboard`:`mouse`:``:null}function Ce(e){return typeof e==`function`?e():e}function Wt(e,o){let t=typeof e==`function`?e(o):e;return t===!1?!1:Ce(t)}function Kn(e,o){let t=typeof e==`function`?e(o):e;return typeof t==`boolean`?t:Ce(t)}function zt(e){return{provide:$t,useFactory:e}}function Ee(e){return e===void 0?void 0:Dj(e)}function Un(){return _t(()=>({trapped:wt(!1)}))}var we;var ye;var xe;var ne;var _e;var $t;var Te;var Fe=f(()=>{Ne();Kr();Kr();tn$1();be();be();we=`data-rdx-floating-inert`,ye={inert:new WeakMap,"aria-hidden":new WeakMap},xe={inert:new WeakSet,"aria-hidden":new WeakSet},ne=new WeakMap,_e=0;$t=new M(`RdxFloatingFocusManagerConfig`);Te=(()=>{class e{constructor(){this.enabled=jc(void 0,{transform:Ee}),this.modal=jc(void 0,{transform:Ee}),this.inert=jc(void 0,{transform:Ee}),this.initialFocus=jc(void 0),this.returnFocus=jc(void 0),this.restoreFocus=jc(void 0),this.previousFocusableElement=jc(void 0),this.nextFocusableElement=jc(void 0),this.beforeContentFocusGuardRef=jc(void 0),this.externalTree=jc(void 0),this.getInsideElements=jc(void 0),this.closeOnFocusOut=jc(void 0,{transform:Ee}),this.focusOut=pj(),this.config=C($t,{optional:!0}),this.effectiveEnabled=Lt$1(()=>this.enabled()??this.config?.enabled?.()??!0),this.effectiveModal=Lt$1(()=>this.modal()??this.config?.modal?.()??!1),this.effectiveInert=Lt$1(()=>this.inert()??this.config?.inert?.()??this.effectiveModal()),this.effectiveCloseOnFocusOut=Lt$1(()=>this.closeOnFocusOut()??this.config?.closeOnFocusOut?.()??!0),this.effectiveInitialFocus=Lt$1(()=>this.initialFocus()!==void 0?this.initialFocus():this.config?.initialFocus?.()??null),this.effectiveReturnFocus=Lt$1(()=>this.returnFocus()!==void 0?this.returnFocus():this.config?.returnFocus?.()??!0),this.effectiveRestoreFocus=Lt$1(()=>this.restoreFocus()??this.config?.restoreFocus?.()??!1),this.effectivePreviousFocusableElement=Lt$1(()=>this.previousFocusableElement()!==void 0?this.previousFocusableElement():this.config?.previousFocusableElement?.()),this.effectiveNextFocusableElement=Lt$1(()=>this.nextFocusableElement()!==void 0?this.nextFocusableElement():this.config?.nextFocusableElement?.()),this.effectiveBeforeContentFocusGuardRef=Lt$1(()=>this.beforeContentFocusGuardRef()??this.config?.beforeContentFocusGuardRef?.()),this.effectiveExternalTree=Lt$1(()=>this.externalTree()??this.config?.externalTree?.()??null),this.insideElements=Lt$1(()=>((this.getInsideElements()??this.config?.getInsideElements)?.()??[]).filter(n=>n!=null)),this.effectiveOpenInteractionType=Lt$1(()=>this.config?.openInteractionType?.()??this._interactionType()),this.effectiveCloseInteractionType=Lt$1(()=>this.config?.closeInteractionType?.()??this._interactionType()),this.trapped=Lt$1(()=>this.effectiveEnabled()&&this.effectiveModal()),this.focusScopeConfig=C(De),this.host=C(Pr).nativeElement,this.isBrowser=$n$1(C(sw)),this.rootContext=C(et,{optional:!0}),this.registration=C(Je$1,{optional:!0}),this._interactionType=wt(``),this.interactionType=this._interactionType.asReadonly(),rf(()=>this.focusScopeConfig.trapped.set(this.trapped())),this.focusScopeConfig.returnFocus=()=>this.resolveReturnFocusTarget(),this.isBrowser&&(rf(t=>{!this.effectiveEnabled()||!this.isFloatingOpen()||t(qt(this.avoidElements(),{ariaHidden:!1,mark:!0}))}),rf(t=>{!this.effectiveEnabled()||!this.isFloatingOpen()||!this.effectiveInert()||t(qt(this.avoidElements(),{inert:!0,mark:!1}))}),rf(()=>{if(!me$1.engine.webkit||this.isFloatingOpen())return;let t=this.rootContext?.floatingElement??this.host;if(!t)return;let n=rr(t.ownerDocument);Gt(n)&&F(t,n)&&n.blur()}),this.trackInteractionType(),Vt(()=>this.rootContext?.floatingElement??this.host,{enabled:()=>!!this.rootContext&&this.effectiveEnabled()&&this.isFloatingOpen()&&!this.effectiveModal()}),this.wireCloseOnFocusOut(),this.wireRestoreFocus(),this.wirePortalFocusBridge(),this.wireFocusOrchestration(),this.wireInitialFocusFallback())}trackInteractionType(){let t=this.host.ownerDocument,n=s=>{this._interactionType.set(s.pointerType||`mouse`)},i=()=>this._interactionType.set(`keyboard`);t.addEventListener(`pointerdown`,n,!0),t.addEventListener(`keydown`,i,!0),C(ve$1).onDestroy(()=>{t.removeEventListener(`pointerdown`,n,!0),t.removeEventListener(`keydown`,i,!0)})}wireFocusOrchestration(){C(V).mountAutoFocus.subscribe(n=>{let i=this.effectiveOpenInteractionType(),s=Wt(this.effectiveInitialFocus(),i)??this.defaultInitialFocus(i);if(s===!1){n.preventDefault();return}s&&(n.preventDefault(),s.focus())})}resolveReturnTarget(){return this.resolveReturnFocusTarget()}resolveReturnFocusTarget(){let t=Kn(this.effectiveReturnFocus(),this.effectiveCloseInteractionType());if(t===!1||t===void 0)return!1;if(!(t===!0||t==null))return t}defaultInitialFocus(t){if(t!==`touch`)return null;let n=this.rootContext?.floatingElement??this.host;return n.hasAttribute(`tabindex`)||n.setAttribute(`tabindex`,`-1`),n}wireInitialFocusFallback(){rf(()=>{!this.effectiveEnabled()||!this.isFloatingOpen()||this.scheduleInitialFocusFallback()})}scheduleInitialFocusFallback(t=0){(this.host.ownerDocument.defaultView??globalThis).requestAnimationFrame(()=>this.applyInitialFocusFallback(t))}applyInitialFocusFallback(t){if(!this.effectiveEnabled()||!this.isFloatingOpen())return;let n=this.rootContext?.floatingElement??this.host,i=this.host.ownerDocument.activeElement;if(i instanceof HTMLElement&&n.contains(i))return;let s=this.effectiveOpenInteractionType(),r=Wt(this.effectiveInitialFocus(),s);if(r===!1)return;let u=r??this.defaultInitialFocus(s);u&&i!==u&&u.focus({preventScroll:!0}),t<2&&this.scheduleInitialFocusFallback(t+1)}wireCloseOnFocusOut(){let t=this.host.ownerDocument,n=!1,i=()=>{n=!0},s=()=>{n=!1},r=u=>{if(!this.effectiveEnabled()||!this.effectiveCloseOnFocusOut()||this.effectiveModal()||n)return;let d=u.relatedTarget;d&&(d instanceof Element&&d.hasAttribute(ve)||this.isRelatedTargetInside(d)||this.focusOut.emit(u))};t.addEventListener(`pointerdown`,i,!0),t.addEventListener(`pointerup`,s,!0),t.addEventListener(`focusout`,r,!0),C(ve$1).onDestroy(()=>{t.removeEventListener(`pointerdown`,i,!0),t.removeEventListener(`pointerup`,s,!0),t.removeEventListener(`focusout`,r,!0)})}wireRestoreFocus(){let t=this.host.ownerDocument,n=i=>{if(!this.effectiveEnabled()||!this.effectiveRestoreFocus()||!this.isFloatingOpen())return;let s=i.target;if(!s||!this.isRelatedTargetInside(s))return;(t.defaultView??globalThis).requestAnimationFrame(()=>{if(!this.effectiveEnabled()||!this.effectiveRestoreFocus()||!this.isFloatingOpen()||t.activeElement!==t.body)return;let u=this.rootContext?.floatingElement??this.host;x(this.effectiveRestoreFocus()===`popup`?u:me(u).at(-1)??u)})};t.addEventListener(`focusout`,n,!0),C(ve$1).onDestroy(()=>t.removeEventListener(`focusout`,n,!0))}wirePortalFocusBridge(){rf(t=>{if(!this.effectiveEnabled()||!this.isFloatingOpen()){this.setBeforeContentFocusGuardRef(null);return}let n=this.host.ownerDocument,i=this.host.parentNode;if(!i)return;let s=Ve(n),r=Ve(n);s.setAttribute(`data-type`,`inside`),r.setAttribute(`data-type`,`inside`),i.insertBefore(s,this.host),i.insertBefore(r,this.host.nextSibling),this.setBeforeContentFocusGuardRef(s);let u=v=>{if(this.effectiveModal()){x(this.getTabbableContent().at(-1)??this.host);return}if(this.isFromOutsideFocusGuard(v)){pe(this.rootContext?.floatingElement??this.host),x(this.getTabbableContent()[0]??this.host);return}if(te(v,this.portalFocusContainer())){x(je(this.rootContext?.referenceElement??this.host));return}x(Ce(this.effectivePreviousFocusableElement())??this.defaultPreviousFocusable())},d=v=>{if(this.effectiveModal()){x(this.getTabbableContent()[0]??this.host);return}if(te(v,this.portalFocusContainer())){x(Ge(this.rootContext?.referenceElement??this.host));return}x(Ce(this.effectiveNextFocusableElement())??this.defaultNextFocusable())};s.addEventListener(`focus`,u),r.addEventListener(`focus`,d),t(()=>{s.removeEventListener(`focus`,u),r.removeEventListener(`focus`,d),s.remove(),r.remove(),this.setBeforeContentFocusGuardRef(null)})})}avoidElements(){return[this.host,...this.insideElements()].filter(t=>t!=null)}isFloatingOpen(){return this.rootContext?.open()??!0}isRelatedTargetInside(t){if(F(this.rootContext?.floatingElement??this.host,t)||this.rootContext&&this.contextContains(this.rootContext,t)||this.insideElements().some(s=>s===t||F(s,t)))return!0;let i=this.currentFloatingNode();if(i){for(let s of i.tree.ancestors(i))if(s.context&&this.contextContains(s.context,t))return!0;for(let s of i.tree.children(i,{onlyOpen:!0}))if(s.context&&this.contextContains(s.context,t))return!0}return!1}contextContains(t,n){return t.floatingElement&&F(t.floatingElement,n)||t.referenceElement&&F(t.referenceElement,n)?!0:t.triggers.contains(n)}currentFloatingNode(){return(this.registration?.node()??null)||(this.effectiveExternalTree()?.all.find(i=>i.context===this.rootContext)??null)}getTabbableContent(){return me(this.rootContext?.floatingElement??this.host)}portalFocusContainer(){let t=this.rootContext?.floatingElement??this.host,n=t.parentElement;return n&&n!==t.ownerDocument.body?n:t}defaultPreviousFocusable(){return Ge(this.rootContext?.referenceElement??this.host)}defaultNextFocusable(){return je(this.rootContext?.referenceElement??this.host)}setBeforeContentFocusGuardRef(t){let n=this.effectiveBeforeContentFocusGuardRef();n&&(typeof n==`function`?n(t):n.set(t))}isFromOutsideFocusGuard(t){let n=t.relatedTarget;return n instanceof Element&&n.hasAttribute(ve)&&n.getAttribute(`data-type`)===`outside`}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$I({type:e,selectors:[[``,`rdxFloatingFocusManager`,``]],inputs:{enabled:[1,`enabled`],modal:[1,`modal`],inert:[1,`inert`],initialFocus:[1,`initialFocus`],returnFocus:[1,`returnFocus`],restoreFocus:[1,`restoreFocus`],previousFocusableElement:[1,`previousFocusableElement`],nextFocusableElement:[1,`nextFocusableElement`],beforeContentFocusGuardRef:[1,`beforeContentFocusGuardRef`],externalTree:[1,`externalTree`],getInsideElements:[1,`getInsideElements`],closeOnFocusOut:[1,`closeOnFocusOut`]},outputs:{focusOut:`focusOut`},exportAs:[`rdxFloatingFocusManager`],features:[IS([Un()]),jI([{directive:V,inputs:[`loop`,`loop`]}])]})}}return e})()});function qn(e){e||(e=C(ve$1));let o=new T(t=>{if(e.destroyed){t.next();return}return e.onDestroy(t.next.bind(t))});return t=>t.pipe(Ib(o))}function Xe(e,o){return new Ue(e)}function qe(e){let o=yR(e);return new T(t=>{let n=o?.onDestroy(()=>t.complete()),i=e.subscribe(s=>t.next(s));return()=>{i.unsubscribe(),n?.()}})}var Ue;var Jt=f(()=>{Ws();lf();Cr();Ng();Ue=class{source;destroyed=!1;destroyRef=C(ve$1);constructor(o){this.source=o,this.destroyRef.onDestroy(()=>{this.destroyed=!0})}subscribe(o){if(this.destroyed)throw new S(953,!1);let t=this.source.pipe(qn(this.destroyRef)).subscribe({next:n=>o(n)});return{unsubscribe:()=>t.unsubscribe()}}}});function Oe(e){return e!==null&&typeof e.nodeType==`number`}function $n(e){if(!Oe(e))return!1;let o=e.ownerDocument?.defaultView;return o?e instanceof o.HTMLElement:e instanceof HTMLElement}function $e(e){if(!Oe(e))return!1;let o=e.ownerDocument?.defaultView;return o?e instanceof o.Element:e instanceof Element}function zn(e){return!(`button`in e)||e.button===0}function Qt(e){let o=e.ownerDocument;return e===o.documentElement||e===o.body}function ze(e){return e!==null&&e.nodeType===11&&`host`in e}function Jn(e){let o=e.parentNode;if(o)return o;let t=e.getRootNode();return ze(t)?t.host:null}function We(e){return e===null||e.nodeType===Node.DOCUMENT_NODE||ze(e)||$e(e)&&Qt(e)}function Qn(e){let o=e;for(;!We(o);){let t=Jn(o);if(We(t)||!$e(t))break;o=t}return o}function Zn(e,o){if(!$e(e)||Qt(e)||e.closest(`[data-rdx-internal-backdrop], [data-rdx-menu-internal-backdrop], [data-rdx-dialog-internal-backdrop]`))return!1;let t=e.getRootNode(),n=ze(t)?t:o.ownerDocument,i=Array.from(n.querySelectorAll(`[${we}]`));if(i.length===0)return!1;let s=o.floatingElement;if(s&&e.contains(s))return!1;let r=Qn(e);return i.every(u=>!r.contains(u))}function eo(e){let o=e.target;if(!$n(o)||`touches`in e||typeof e.offsetX!=`number`)return!1;let t=o.ownerDocument.defaultView;if(!t)return!1;let n=e,i=t.getComputedStyle(o),s=/auto|scroll/,r=We(o),u=r||s.test(i.overflowX),d=r||s.test(i.overflowY),v=u&&o.clientWidth>0&&o.scrollWidth>o.clientWidth,O=d&&o.clientHeight>0&&o.scrollHeight>o.clientHeight,E=i.direction===`rtl`,l=O&&(E?n.offsetX<=o.offsetWidth-o.clientWidth:n.offsetX>o.clientWidth),D=v&&n.offsetY>o.clientHeight;return l||D}function to(e,o){let t=Ye.get(e);return o===`escape-key`?t?t.escapeKey():!1:t?t.outsidePress():!0}var oe;var Wn;var Yn;var Ye;var Re;var Zt=f(()=>{Ne();Kr();tn$1();Fe();oe=()=>!0,Wn=()=>!1,Yn=()=>`sloppy`;Ye=new WeakMap;Re=class{constructor(o,t,n={}){this.context=o,this.node=t,this.branches=new Set;let i=n.enabled??oe,s=n.escapeKey??oe,r=n.escapeKeyBubbles??Wn,u=n.outsidePress??oe,d=n.outsidePressBubbles??oe,v=n.outsidePressEvent??Yn,O=n.focusOutside??oe;this.active=()=>this.context.open()&&i(),Ye.set(this.context,{escapeKey:r,outsidePress:d});let E=C(ve$1);if(E.onDestroy(()=>Ye.delete(this.context)),!$n$1(C(sw)))return;let l=this.context.ownerDocument,D=l.defaultView??globalThis,k=(c,N)=>{n.onDismiss?.(c,N)},se=!1,R=!1,S=``,b=null,$,Me,_=()=>{D.clearTimeout($),D.clearTimeout(Me)},K=()=>{let c=v();return typeof c==`string`?c:c[S===`pen`||S===``?`mouse`:S]??`sloppy`},Qe=c=>{c.key!==`Escape`||!this.active()||!s()||se||!r()&&this.hasBlockingChild(`escape-key`)||(n.onEscapeKeyDown?.(c),c.defaultPrevented||k(`escape-key`,c),r()||c.stopPropagation())},Ze=()=>{se=!0},et=()=>{D.setTimeout(()=>{se=!1},me$1.engine.webkit?5:0)},z=c=>{!this.active()||!zn(c)||this.isInside(c.target)||!u(c)||Zn(c.target,this.context)||eo(c)||!d()&&this.hasBlockingChild(`outside-press`)||(n.onPointerDownOutside?.(c),c.defaultPrevented||k(`outside-press`,c))},tt=c=>{R=this.isInside(c.target),S=c.pointerType||``},nt=()=>{R=!1},ot=c=>{K()===`sloppy`&&c.pointerType!==`touch`&&z(c)},it=c=>{if(K()===`intentional`){if(R){R=!1;return}z(c)}},st=c=>{if(S=`touch`,K()!==`sloppy`||!this.active()||this.isInside(c.target))return;let N=c.touches?.[0];N&&(_(),b={startX:N.clientX,startY:N.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},$=D.setTimeout(()=>{b&&(b.dismissOnTouchEnd=!1,b.dismissOnMouseDown=!1)},1e3))},rt=c=>{if(!b||K()!==`sloppy`||this.isInside(c.target))return;let N=c.touches?.[0];if(!N)return;let ct=N.clientX-b.startX,lt=N.clientY-b.startY,ft=Math.sqrt(ct*ct+lt*lt);ft>5&&(b.dismissOnTouchEnd=!0),ft>10&&(z(c),_(),b=null)},at=c=>{if(!(!b||K()!==`sloppy`||this.isInside(c.target))){if(b.dismissOnTouchEnd){z(c),_(),b=null;return}D.clearTimeout(Me),Me=D.setTimeout(()=>{b=null},400)}},ut=c=>{if(!(!b||K()!==`sloppy`)){if(!b.dismissOnMouseDown){b=null,_();return}z(c),_(),b=null}},dt=c=>{Promise.resolve().then(()=>Promise.resolve()).then(()=>{!this.active()||!O()||this.isInside(c.target)||(n.onFocusOutside?.(c),c.defaultPrevented||k(`focus-outside`,c))})};l.addEventListener(`keydown`,Qe,{capture:!0}),l.addEventListener(`compositionstart`,Ze,{capture:!0}),l.addEventListener(`compositionend`,et,{capture:!0}),l.addEventListener(`focusin`,dt),l.addEventListener(`pointerdown`,tt,{capture:!0}),l.addEventListener(`pointercancel`,nt,{capture:!0});let hn=D.setTimeout(()=>{l.addEventListener(`pointerdown`,ot),l.addEventListener(`click`,it),l.addEventListener(`touchstart`,st,{capture:!0,passive:!0}),l.addEventListener(`touchmove`,rt,{capture:!0,passive:!0}),l.addEventListener(`touchend`,at,{capture:!0,passive:!0}),l.addEventListener(`mousedown`,ut,{capture:!0})},0);E.onDestroy(()=>{D.clearTimeout(hn),l.removeEventListener(`keydown`,Qe,{capture:!0}),l.removeEventListener(`compositionstart`,Ze,{capture:!0}),l.removeEventListener(`compositionend`,et,{capture:!0}),l.removeEventListener(`focusin`,dt),l.removeEventListener(`pointerdown`,tt,{capture:!0}),l.removeEventListener(`pointercancel`,nt,{capture:!0}),l.removeEventListener(`pointerdown`,ot),l.removeEventListener(`click`,it),l.removeEventListener(`touchstart`,st,{capture:!0}),l.removeEventListener(`touchmove`,rt,{capture:!0}),l.removeEventListener(`touchend`,at,{capture:!0}),l.removeEventListener(`mousedown`,ut,{capture:!0}),_()})}isInside(o){if(this.contextContains(this.context,o))return!0;let t=this.node();if(t){for(let n of t.tree.children(t,{onlyOpen:!0}))if(n.context&&this.contextContains(n.context,o))return!0}if(Oe(o)){for(let n of this.branches)if(n.contains(o))return!0}return!1}contextContains(o,t){let n=o.floatingElement;return n&&Oe(t)&&n.contains(t)?!0:o.triggers.contains(t)}hasBlockingChild(o){let t=this.node();return t?t.tree.children(t,{onlyOpen:!0}).some(n=>n.context!==null&&!to(n.context,o)):!1}}});function no(e,o){return e?typeof e==`string`?o?.querySelector(e)??null:e instanceof Pr?e.nativeElement??null:e instanceof HTMLElement?e:null:null}var en;var tn=f(()=>{Ne();Kr();Kr();g();en=(()=>{class e{constructor(){this.viewContainerRef=C(Gi),this.templateRef=C(Ar),this.document=C(br,{optional:!0}),this.isBrowser=$n$1(C(sw)),this.container=jc(),this.keepMounted=jc(!1,{transform:Dj}),this.contextPresent=C(v).present,this.present=Lt$1(()=>this.contextPresent()||this.keepMounted()),this._computedContainer=PS(this.container),this.elementContainer=Lt$1(()=>no(this._computedContainer(),this.document)??this.document?.body??null),this.mountedNodes=wt([]),this.viewRef=null;let t=new f$1({present:this.present,isBrowser:this.isBrowser,injector:C(Se$1),mountView:()=>this.mountView(),destroyView:()=>this.destroyView()});rf(()=>{let n=this.elementContainer(),i=this.mountedNodes();if(!(!this.isBrowser||!n))for(let s of i)n.appendChild(s)}),C(ve$1).onDestroy(()=>t.dispose())}setContainer(t){this._computedContainer.set(t)}mountView(){this.viewRef=this.viewContainerRef.createEmbeddedView(this.templateRef);let t=this.viewRef.rootNodes;return this.mountedNodes.set(t),t.filter(n=>n instanceof HTMLElement)}destroyView(){this.viewRef?.destroy(),this.viewRef=null,this.mountedNodes.set([])}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$I({type:e,inputs:{container:[1,`container`],keepMounted:[1,`keepMounted`]}})}}return e})()});function sn(e){return{provide:on,useValue:W(W({},nn),e)}}function rn(e){return{contentId:e.contentId,titleId:e.titleId.asReadonly(),descriptionId:e.descriptionId.asReadonly(),isOpen:e.open,present:e.present,modal:e.effectiveModal,disablePointerDismissal:e.effectiveDisablePointerDismissal,role:e.role,transitionStatus:e.transitionStatus,trigger:e.trigger.asReadonly(),triggers:e.triggers.asReadonly(),payload:e.payload.asReadonly(),openInteractionType:e.openInteractionType.asReadonly(),closeInteractionType:e.closeInteractionType.asReadonly(),nested:e.nested,nestedDialogOpen:e.nestedDialogOpen,nestedOpenCount:e.nestedOpenCount.asReadonly(),setTitleId:o=>e.titleId.set(o),setDescriptionId:o=>e.descriptionId.set(o),registerTransitionElement:o=>e.registerTransitionElement(o),registerTrigger:(o,t,n)=>e.registerTrigger(o,t,n),setTriggerOpenInteractionType:o=>e.setTriggerOpenInteractionType(o),open:(o,t,n,i,s)=>e.show(o,t,n,i,s),close:(o,t)=>e.close(o,t),toggle:(o,t,n,i)=>e.toggle(o,t,n,i)}}var nn;var on;var ao;var uo;var B;var co;var ie;var an;var un;var dn;var lo;var fo;var cn;var ln;var fn;var pn;var Je=f(()=>{Kr();Kr();tn$1();tn$1();Fe();Fe();Jt();Zt();be();tn();g();nn={role:`dialog`,forceModal:!1,forcePointerDismissalDisabled:!1},on=new M(`RdxDialogVariant`,{factory:()=>nn});ao=e=>e===`trap-focus`?e:Dj(e),uo=()=>rn(C(ie)),[B,co]=Gn$1(`RdxDialogRootContext`,`components/dialog`),ie=(()=>{class e{constructor(){this.destroyRef=C(ve$1),this.parentRoot=C(e,{optional:!0,skipSelf:!0}),this.variant=C(on),this.hasAppliedDefaultOpen=!1,this.hasAppliedDefaultTriggerId=!1,this.registeredTriggers=new Map,this.transition=ar(n=>this.emitOpenChangeComplete(n)),this.transitionStatus=this.transition.status,this.registerTransitionElement=this.transition.registerElement,this.open=mj(!1),this.defaultOpen=jc(!1,{transform:Dj}),this.triggerId=mj(null),this.defaultTriggerId=jc(null),this.modal=jc(!0,{transform:ao}),this.disablePointerDismissal=jc(!1,{transform:Dj}),this.handle=jc(),this.onOpenChange=pj(),this.onOpenChangeComplete=pj(),this.contentId=Tt(`rdx-dialog-content-`),this.titleId=wt(void 0),this.descriptionId=wt(void 0),this.trigger=wt(void 0),this.triggers=wt([]),this.payload=wt(void 0),this.nestedOpenCount=wt(0),this.openInteractionType=wt(null),this.closeInteractionType=wt(null),this.preventUnmountOnClose=wt(!1),this.pendingTriggerOpenInteractionType=wt(null),this.present=Lt$1(()=>this.open()||this.preventUnmountOnClose()),this.nested=!!this.parentRoot,this.nestedDialogOpen=Lt$1(()=>this.nestedOpenCount()>0),this.role=this.variant.role,this.effectiveModal=Lt$1(()=>this.variant.forceModal?!0:this.modal()),this.effectiveDisablePointerDismissal=Lt$1(()=>this.disablePointerDismissal()||this.variant.forcePointerDismissalDisabled),this.floatingContext=tr({ownerDocument:C(Pr).nativeElement.ownerDocument,open:()=>this.open()}),rf(()=>this.floatingContext.setReferenceElement(this.trigger()??null)),rf(()=>{this.open()&&this.preventUnmountOnClose()&&this.preventUnmountOnClose.set(!1)});let t=this.open();rf(()=>{let n=this.defaultOpen();!this.hasAppliedDefaultOpen&&n&&(this.hasAppliedDefaultOpen=!0,this.open.set(n))}),rf(()=>{let n=this.defaultTriggerId();!this.hasAppliedDefaultTriggerId&&n!==null&&(this.hasAppliedDefaultTriggerId=!0,this.triggerId.set(n))}),rf(()=>{let n=this.triggerId();Tg(()=>this.syncTriggerId(n))}),rf(()=>{let n=this.open();n!==t&&(t=n,Tg(()=>this.transition.start(n)))}),rf(n=>{this.open()&&this.parentRoot&&n(Tg(()=>this.parentRoot.openNestedChild()))}),rf(n=>{let i=this.handle();i&&n(Tg(()=>i.registerRoot(rn(this))))})}show(t=this.trigger(),n,i,s=`none`,r){let u=t!==void 0||n!==void 0;if(this.open()){t&&this.trigger.set(t),i!==void 0&&this.triggerId.set(i),u&&this.payload.set(n);return}let d=r??new Event(`dialog.open-change`),v=this.createOpenChangeEvent(!0,s,d,t,i??this.triggerId());this.onOpenChange.emit(v.payload),!v.eventDetails.isCanceled()&&(this.openInteractionType.set(this.consumeOpenInteractionType(r)),t&&this.trigger.set(t),i!==void 0&&this.triggerId.set(i),u&&this.payload.set(n),this.preventUnmountOnClose.set(!1),this.open.set(!0),this.floatingContext.events.emit(`openchange`,{open:!0,reason:s,event:v.eventDetails.event}))}close(t=`none`,n){if(!this.open())return;let i=n??new Event(`dialog.open-change`),s=this.createOpenChangeEvent(!1,t,i,this.trigger(),this.triggerId());this.onOpenChange.emit(s.payload),!s.eventDetails.isCanceled()&&(this.pendingTriggerOpenInteractionType.set(null),this.closeInteractionType.set(Ke(n)),this.preventUnmountOnClose.set(s.shouldPreventUnmountOnClose()),this.open.set(!1),this.floatingContext.events.emit(`openchange`,{open:!1,reason:t,event:s.eventDetails.event}))}toggle(t,n,i,s=new Event(`dialog.open-change`)){if(this.open()&&this.trigger()===n){this.close(`trigger-press`,s);return}this.show(n,i,t,`trigger-press`,s)}setTriggerOpenInteractionType(t){this.pendingTriggerOpenInteractionType.set(t)}registerTrigger(t,n,i){return this.registeredTriggers.set(t,{element:n,payload:i}),this.triggers.update(s=>s.includes(n)?s:[...s,n]),this.floatingContext.triggers.add(n),(this.triggerId()===t||!this.trigger()&&this.triggerId()===null)&&(this.trigger.set(n),this.payload.set(i())),()=>{if(this.registeredTriggers.get(t)?.element===n&&this.registeredTriggers.delete(t),this.triggers.update(s=>s.filter(r=>r!==n)),this.floatingContext.triggers.delete(n),!this.destroyRef.destroyed&&this.trigger()===n){let s=this.registeredTriggers.entries().next().value;this.triggerId()!==null&&this.triggerId.set(s?.[0]??null),this.trigger.set(s?.[1].element),this.payload.set(s?.[1].payload())}}}openNestedChild(){return this.nestedOpenCount.update(t=>t+1),()=>this.nestedOpenCount.update(t=>t-1)}syncTriggerId(t){if(t===null){this.trigger.set(void 0),this.payload.set(void 0);return}let n=this.registeredTriggers.get(t);n&&n.element!==this.trigger()&&(this.trigger.set(n.element),this.payload.set(n.payload()))}createOpenChangeEvent(t,n,i,s,r){let u=Zn$1(n,i,s);return{eventDetails:u.eventDetails,shouldPreventUnmountOnClose:u.shouldPreventUnmountOnClose,payload:{open:t,triggerId:r,trigger:u.eventDetails.trigger,reason:u.eventDetails.reason,event:u.eventDetails.event,eventDetails:u.eventDetails}}}emitOpenChangeComplete(t){this.destroyRef.destroyed||this.onOpenChangeComplete.emit(t)}consumeOpenInteractionType(t){let n=this.pendingTriggerOpenInteractionType();return this.pendingTriggerOpenInteractionType.set(null),n??Ke(t)}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$I({type:e,selectors:[[``,`rdxDialogRoot`,``]],inputs:{open:[1,`open`],defaultOpen:[1,`defaultOpen`],triggerId:[1,`triggerId`],defaultTriggerId:[1,`defaultTriggerId`],modal:[1,`modal`],disablePointerDismissal:[1,`disablePointerDismissal`],handle:[1,`handle`]},outputs:{open:`openChange`,triggerId:`triggerIdChange`,onOpenChange:`onOpenChange`,onOpenChangeComplete:`onOpenChangeComplete`},exportAs:[`rdxDialogRoot`],features:[IS([co(uo),Jn$1(),Qn$1(()=>C(e).floatingContext)])]})}}return e})();an=(()=>{class e{constructor(){this.rootContext=B(),this.forceRender=jc(!1,{transform:Dj});let t=C(et,{optional:!0});if(t){let n=C(Pr).nativeElement;t.addFloatingElement(n),C(ve$1).onDestroy(()=>t.removeFloatingElement(n))}}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$I({type:e,selectors:[[``,`rdxDialogBackdrop`,``]],hostAttrs:[`role`,`presentation`],hostVars:7,hostBindings:function(n,i){n&2&&(Km(`hidden`,i.rootContext.nested&&!i.forceRender()),zr(`data-closed`,i.rootContext.isOpen()?void 0:``)(`data-ending-style`,i.rootContext.transitionStatus()===`ending`?``:void 0)(`data-open`,i.rootContext.isOpen()?``:void 0)(`data-starting-style`,i.rootContext.transitionStatus()===`starting`?``:void 0)(`data-nested`,i.rootContext.nested?``:void 0)(`data-nested-dialog-open`,i.rootContext.nestedDialogOpen()?``:void 0))},inputs:{forceRender:[1,`forceRender`]},exportAs:[`rdxDialogBackdrop`]})}}return e})(),un=(()=>{class e{constructor(){this.rootContext=B()}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$I({type:e,selectors:[[`button`,`rdxDialogClose`,``]],hostAttrs:[`type`,`button`],hostBindings:function(n,i){n&1&&Jm(`click`,function(r){return i.rootContext.close(`close-press`,r)})},exportAs:[`rdxDialogClose`]})}}return e})(),dn=(()=>{class e{constructor(){this.rootContext=B(),this.id=Tt(`rdx-dialog-description-`),this.rootContext.setDescriptionId(this.id),C(ve$1).onDestroy(()=>this.rootContext.setDescriptionId(void 0))}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$I({type:e,selectors:[[``,`rdxDialogDescription`,``]],hostVars:1,hostBindings:function(n,i){n&2&&Km(`id`,i.id)},exportAs:[`rdxDialogDescription`]})}}return e})(),lo=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`Home`,`End`]),fo=`data-rdx-dialog-internal-backdrop`,cn=(()=>{class e{constructor(){this.rootContext=B(),this.host=C(Pr).nativeElement,this.floatingContext=C(et),this.registration=C(Je$1,{optional:!0}),this.focusManager=C(Te),this.focusScope=C(V),this.escapeKeyDown=pj(),this.pointerDownOutside=pj(),this.focusOutside=pj(),this.interactOutside=pj(),this.openAutoFocus=Xe(qe(this.focusScope.mountAutoFocus)),this.closeAutoFocus=Xe(qe(this.focusScope.unmountAutoFocus)),this.floatingContext.setFloatingElement(this.host),sr(Lt$1(()=>this.rootContext.modal()===!0&&this.rootContext.isOpen()),{referenceElement:()=>this.host});let t=this.rootContext.registerTransitionElement(this.host);C(ve$1).onDestroy(t);let n=C(Se$1);LD(()=>nr(this.host,n,{marker:fo,isOpen:()=>this.rootContext.isOpen(),shouldRender:()=>this.rootContext.modal()===!0,cutout:()=>this.host.closest(`[rdxDialogViewport]`),passThrough:()=>this.host.closest(`[rdxDialogViewport]`)!==null})),new Re(this.floatingContext,()=>this.registration?.node()??null,{escapeKey:()=>!0,outsidePress:()=>this.isTopmost()&&!this.rootContext.disablePointerDismissal(),outsidePressEvent:()=>this.rootContext.modal()===!0?`intentional`:`sloppy`,focusOutside:()=>!1,onEscapeKeyDown:i=>this.escapeKeyDown.emit(i),onPointerDownOutside:i=>{this.pointerDownOutside.emit(i),this.interactOutside.emit(i)},onDismiss:(i,s)=>{this.rootContext.close(i===`escape-key`?`escape-key`:`outside-press`,s)}}),this.focusManager.focusOut.subscribe(i=>{this.focusOutside.emit(i),this.interactOutside.emit(i),i.defaultPrevented||this.rootContext.close(`focus-out`,i)})}isTopmost(){return this.rootContext.isOpen()&&!this.rootContext.nestedDialogOpen()}onKeyDown(t){lo.has(t.key)&&t.stopPropagation()}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$I({type:e,selectors:[[``,`rdxDialogPopup`,``]],hostVars:13,hostBindings:function(n,i){n&1&&Jm(`keydown`,function(r){return i.onKeyDown(r)}),n&2&&(Km(`id`,i.rootContext.contentId),zr(`role`,i.rootContext.role)(`aria-modal`,i.rootContext.modal()===!0?`true`:void 0)(`aria-describedby`,i.rootContext.descriptionId())(`aria-labelledby`,i.rootContext.titleId())(`data-closed`,i.rootContext.isOpen()?void 0:``)(`data-ending-style`,i.rootContext.transitionStatus()===`ending`?``:void 0)(`data-open`,i.rootContext.isOpen()?``:void 0)(`data-starting-style`,i.rootContext.transitionStatus()===`starting`?``:void 0)(`data-nested`,i.rootContext.nested?``:void 0)(`data-nested-dialog-open`,i.rootContext.nestedDialogOpen()?``:void 0),sg(`--%NS%nested-dialogs`,i.rootContext.nestedOpenCount()))},outputs:{escapeKeyDown:`escapeKeyDown`,pointerDownOutside:`pointerDownOutside`,focusOutside:`focusOutside`,interactOutside:`interactOutside`,openAutoFocus:`openAutoFocus`,closeAutoFocus:`closeAutoFocus`},exportAs:[`rdxDialogPopup`],features:[IS([zt(()=>{let t=B();return{modal:()=>t.modal()===!0||t.modal()===`trap-focus`,inert:()=>t.modal()===!0,enabled:()=>t.present(),restoreFocus:()=>`popup`,openInteractionType:()=>t.openInteractionType(),closeInteractionType:()=>t.closeInteractionType(),closeOnFocusOut:()=>!t.disablePointerDismissal()}})]),jI([er,Te])]})}}return e})(),ln=(()=>{class e{constructor(){this.container=jc()}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$I({type:e,selectors:[[`ng-template`,`rdxDialogPortal`,``]],inputs:{container:[1,`container`]},exportAs:[`rdxDialogPortal`],features:[IS([L$1(()=>({present:B().present}))]),jI([{directive:en,inputs:[`container`,`container`]}])]})}}return e})(),fn=(()=>{class e{constructor(){this.rootContext=B(),this.id=Tt(`rdx-dialog-title-`),this.rootContext.setTitleId(this.id),C(ve$1).onDestroy(()=>this.rootContext.setTitleId(void 0))}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$I({type:e,selectors:[[``,`rdxDialogTitle`,``]],hostVars:1,hostBindings:function(n,i){n&2&&Km(`id`,i.id)},exportAs:[`rdxDialogTitle`]})}}return e})(),pn=(()=>{class e{constructor(){this.rootContext=B()}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$I({type:e,selectors:[[``,`rdxDialogViewport`,``]],hostAttrs:[`role`,`presentation`],hostVars:8,hostBindings:function(n,i){n&2&&(zr(`data-closed`,i.rootContext.isOpen()?void 0:``)(`data-ending-style`,i.rootContext.transitionStatus()===`ending`?``:void 0)(`data-open`,i.rootContext.isOpen()?``:void 0)(`data-starting-style`,i.rootContext.transitionStatus()===`starting`?``:void 0)(`data-nested`,i.rootContext.nested?``:void 0)(`data-nested-dialog-open`,i.rootContext.nestedDialogOpen()?``:void 0),sg(`pointer-events`,i.rootContext.isOpen()?null:`none`))},exportAs:[`rdxDialogViewport`]})}}return e})()});var Oi;var Ri;var Mi;var Ii;var Ai;var Ni;var Pi;var ki;var ho=f(()=>{Kr();Kr();Je();Je();Oi=(()=>{class e{static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$I({type:e,selectors:[[``,`rdxAlertDialogBackdrop`,``]],exportAs:[`rdxAlertDialogBackdrop`],features:[jI([an])]})}}return e})(),Ri=(()=>{class e{static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$I({type:e,selectors:[[`button`,`rdxAlertDialogClose`,``]],exportAs:[`rdxAlertDialogClose`],features:[jI([un])]})}}return e})(),Mi=(()=>{class e{static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$I({type:e,selectors:[[``,`rdxAlertDialogDescription`,``]],exportAs:[`rdxAlertDialogDescription`],features:[jI([dn])]})}}return e})(),Ii=(()=>{class e{static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$I({type:e,selectors:[[``,`rdxAlertDialogPopup`,``]],exportAs:[`rdxAlertDialogPopup`],features:[jI([{directive:cn,outputs:[`escapeKeyDown`,`escapeKeyDown`,`pointerDownOutside`,`pointerDownOutside`,`focusOutside`,`focusOutside`,`interactOutside`,`interactOutside`,`openAutoFocus`,`openAutoFocus`,`closeAutoFocus`,`closeAutoFocus`]}])]})}}return e})(),Ai=(()=>{class e{static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$I({type:e,selectors:[[`ng-template`,`rdxAlertDialogPortal`,``]],exportAs:[`rdxAlertDialogPortal`],features:[jI([{directive:ln,inputs:[`container`,`container`]}])]})}}return e})(),Ni=(()=>{class e{constructor(){this.dialog=C(ie),this.open=this.dialog.open,this.triggerId=this.dialog.triggerId,this.payload=this.dialog.payload}static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$I({type:e,selectors:[[``,`rdxAlertDialogRoot`,``]],exportAs:[`rdxAlertDialogRoot`],features:[IS([sn({role:`alertdialog`,forceModal:!0,forcePointerDismissalDisabled:!0})]),jI([{directive:ie,inputs:[`open`,`open`,`defaultOpen`,`defaultOpen`,`triggerId`,`triggerId`,`defaultTriggerId`,`defaultTriggerId`,`handle`,`handle`],outputs:[`openChange`,`openChange`,`triggerIdChange`,`triggerIdChange`,`onOpenChange`,`onOpenChange`,`onOpenChangeComplete`,`onOpenChangeComplete`]}])]})}}return e})(),Pi=(()=>{class e{static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$I({type:e,selectors:[[``,`rdxAlertDialogTitle`,``]],exportAs:[`rdxAlertDialogTitle`],features:[jI([fn])]})}}return e})(),ki=(()=>{class e{static{this.ɵfac=function(n){return new(n||e)}}static{this.ɵdir=$I({type:e,selectors:[[``,`rdxAlertDialogViewport`,``]],exportAs:[`rdxAlertDialogViewport`],features:[jI([pn])]})}}return e})()});export{pn as _,Ni as a,Ri as c,dn as d,fn as f,ln as g,ki as h,Mi as i,an as l,ie as m,Ii as n,Oi as o,ho as p,Je as r,Pi as s,Ai as t,cn as u,un as v};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Ct as Tc,Dn as kE,Dt as Ty,F as J0,Ft as Wm,Gn as pg,Gt as _S,H as Li,I as Jm,In as nS,J as My,Jt as ag,Kt as _m,Mn as lk,O as HE,On as kc,Pt as W,R as Kr,S as G,Sn as hg,T as Gm,Tr as zr,V as Ld,Vn as ok,W as Lt,X as Nc,_r as wt,_t as SS,cn as ec,ct as Qm,er as sk,gt as SE,hr as wc,in as dk,ln as f,lr as ve,r as Ac,sn as eH,sr as vS,tt as Od,u as C,un as fS,ur as vg,ut as RE,wn as ik,wr as zE}from"./chunk-C_5f0tVq.js";import{n as u,t as f$1}from"./chunk-Bg_b-Jjw.js";import"./chunk-nJjV_Xqa.js";import{i as p,t as W$1}from"./chunk-Cz39jf9o.js";import{i as Ie$1,o as Ne$1}from"./chunk-0lzDD7VN.js";import"./chunk-S9IeOMe4.js";import"./chunk-CG34bAfY.js";import"./chunk-C_ouaGQt.js";import{n as x,t as u$1}from"./chunk-Dw1WSpzf.js";import{n as P,t as K}from"./chunk-CGtoxp5M.js";import{n as W$2,t as J}from"./chunk-Bo6U-hOl.js";var se;var le=f(()=>{se=[`claude-opus-5`,`claude-sonnet-5`,`claude-haiku-4-5`]});function Se(a,n){if(a&1&&(Li(0,`span`,34),fS(1),Nc()),a&2){let e=HE(2);ec(),pg(e.t().inUse)}}function Ce(a,n){if(a&1&&(Li(0,`span`,34),fS(1),Nc()),a&2){let e=HE(2);ec(),pg(e.t().cli)}}function ke(a,n){if(a&1&&(Li(0,`div`,36),fS(1),Nc()),a&2){let e=HE().$implicit;ec(),pg(e.description)}}function we(a,n){if(a&1&&(Li(0,`div`,37),fS(1),Nc()),a&2){let e=HE().$implicit;ec(),pg(e.reason)}}function Ee(a,n){a&1&&Qm(0)}function Te(a,n){if(a&1){let e=RE();Li(0,`li`,5)(1,`div`,30)(2,`div`,31)(3,`div`,32)(4,`span`,33),fS(5),Nc(),SE(6,Se,2,1,`span`,34),SE(7,Ce,2,1,`span`,34),Nc(),Li(8,`div`,35),fS(9),Nc(),SE(10,ke,2,1,`div`,36),SE(11,we,2,1,`div`,37),Nc(),Li(12,`button`,38),Jm(`click`,function(){let l=Od(e).$implicit;return Ld(HE().test(l.name,{context:l.name}))}),fS(13),Nc(),Li(14,`button`,39),Jm(`click`,function(){let l=Od(e).$implicit;return Ld(HE().askRemove(l.name))}),Gm(15,`app-icon`,40),Nc()(),_m(16,Ee,1,0,`ng-container`,28),Nc()}if(a&2){let e=n.$implicit,t=HE(),l=zE(48);zr(`data-testid`,`server-`+e.name),ec(5),pg(e.name),ec(),kE(e.active?6:-1),ec(),kE(e.currentInCli?7:-1),ec(2),pg(e.host),ec(),kE(e.description?10:-1),ec(),kE(!e.supported&&e.reason?11:-1),ec(),Wm(`disabled`,!e.supported||t.testing()!==null),ec(),Ac(` `,t.testing()===e.name?t.t().testing:t.t().test,` `),ec(),Wm(`title`,e.active||e.currentInCli?t.t().removeBlocked:t.t().remove)(`disabled`,e.active||e.currentInCli),zr(`aria-label`,t.t().remove),ec(),Wm(`size`,14),ec(),Wm(`ngTemplateOutlet`,l)(`ngTemplateOutletContext`,SS(15,de,e.name))}}function Ie(a,n){if(a&1&&(Li(0,`li`,6),fS(1),Nc()),a&2){let e=HE();ec(),pg(e.t().empty)}}function Pe(a,n){if(a&1){let e=RE();Li(0,`label`,15)(1,`span`,10),fS(2),Nc(),Li(3,`input`,41),Jm(`input`,function(l){Od(e);return Ld(HE().username.set(l.target.value))}),Nc()()}if(a&2){let e=HE();ec(2),pg(e.t().add.username),ec(),nS(e.input),Wm(`placeholder`,e.t().add.usernamePlaceholder)(`value`,e.username())}}function De(a,n){if(a&1&&(Li(0,`p`,22),fS(1),Nc()),a&2){let e=HE();ec(),pg(e.t().add.tcpWarning)}}function Me(a,n){a&1&&(Li(0,`p`,23),fS(1),Nc()),a&2&&(ec(),pg(n))}function Ve(a,n){a&1&&Qm(0)}function Ae(a,n){if(a&1&&(Li(0,`p`,43),fS(1),Nc()),a&2){let e=HE(),t=HE(2);ec(),pg(t.t().connected(e.version,e.os,e.arch))}}function Ne(a,n){if(a&1){let e=RE();Li(0,`p`,45),fS(1),Nc(),Li(2,`div`,46)(3,`code`,47),fS(4),Nc(),Li(5,`button`,48),Jm(`click`,function(){let l=Od(e),s=HE(3).$implicit;return Ld(HE().trust(s,l.name,l.fingerprint))}),fS(6),Nc()()}if(a&2){let e=n,t=HE(4);ec(),pg(t.t().unknownHostKey(e.name,e.type)),ec(3),pg(e.fingerprint),ec(),Wm(`disabled`,t.testing()!==null),ec(),Ac(` `,t.t().trust,` `)}}function Ue(a,n){if(a&1&&(Li(0,`p`,44),fS(1),Nc(),SE(2,Ne,7,4)),a&2){let e,t=HE();ec(),pg(t.problem),ec(),kE((e=t.unknownHostKey)?2:-1,e)}}function Oe(a,n){a&1&&(Li(0,`div`,42),SE(1,Ae,2,1,`p`,43)(2,Ue,3,2),Nc()),a&2&&(ec(),kE(n.ok?1:2))}function Fe(a,n){if(a&1&&SE(0,Oe,3,1,`div`,42),a&2){let e,t=n.$implicit;kE((e=HE().results()[t])?0:-1,e)}}var de;var he;var F;var Le;var L;var pe=f(()=>{Ne$1();Kr();W$1();lk();sk();J();dk();f$1();Kr();de=a=>({$implicit:a}),he=(a,n)=>n.name;F=`:form`,Le=`mx-focus mt-1 w-full rounded-md border border-ink-700 bg-ink-800 px-3 py-1.5 text-[13px] text-ink-100 placeholder:text-ink-500`,L=class a{contexts=C(p);toast=C(u);t=Lt(()=>ok().settings.servers);form=F;input=Le;servers=Lt(()=>this.contexts.contexts().filter(n=>n.name!=="default"));name=wt(``);kind=wt(`ssh`);username=wt(``);host=wt(``);port=wt(``);description=wt(``);formProblem=wt(null);saving=wt(!1);testing=wt(null);results=wt({});confirmOpen=wt(!1);removing=wt(null);filledIn=Lt(()=>this.name().trim()!==``&&this.host().trim()!==``);constructor(){this.contexts.load()}async test(n,e){this.testing.set(n);try{let t=await window.electron.contexts.test(e);this.results.update(l=>G(W({},l),{[n]:t}))}catch(t){this.results.update(l=>G(W({},l),{[n]:{ok:!1,problem:eH(t),unknownHostKey:null}}))}finally{this.testing.set(null)}}async testForm(){let n=this.server();n!==null&&(this.formProblem.set(null),await this.test(F,{server:n}))}async trust(n,e,t){try{let s=await window.electron.contexts.trustHostKey(e,t);if(!s.ok){this.results.update(_=>G(W({},_),{[n]:{ok:!1,problem:s.problem,unknownHostKey:null}}));return}}catch(s){this.results.update(_=>G(W({},_),{[n]:{ok:!1,problem:eH(s),unknownHostKey:null}}));return}let l=n===F?this.server():null;await this.test(n,l===null?{context:n}:{server:l})}async add(n){n.preventDefault();let e=this.server();if(!(e===null||this.saving())){this.saving.set(!0);try{let t=await window.electron.contexts.create(e);if(!t.ok){this.formProblem.set(t.problem);return}this.toast.success(this.t().add.added(e.name)),this.reset(),await this.contexts.load()}catch(t){this.formProblem.set(eH(t))}finally{this.saving.set(!1)}}}askRemove(n){this.removing.set(n),this.confirmOpen.set(!0)}async remove(){let n=this.removing();if(n!==null)try{let e=await window.electron.contexts.remove(n);if(!e.ok){this.toast.error(e.problem);return}this.forgetResult(n),await this.contexts.load()}catch(e){this.toast.error(eH(e))}finally{this.removing.set(null)}}server(){let n=this.port().trim(),e=n===``?null:Number(n);if(e!==null&&(!Number.isInteger(e)||e<1||e>65535))return this.formProblem.set(ok().settings.servers.add.port+`: 1–65535`),null;let t=this.username().trim(),l=this.description().trim();return{name:this.name().trim(),description:l===``?null:l,kind:this.kind(),host:this.host().trim(),port:e,username:this.kind()===`ssh`&&t!==``?t:null}}reset(){this.name.set(``),this.username.set(``),this.host.set(``),this.port.set(``),this.description.set(``),this.formProblem.set(null),this.forgetResult(F)}forgetResult(n){this.results.update(e=>Object.fromEntries(Object.entries(e).filter(([t])=>t!==n)))}static ɵfac=function(e){return new(e||a)};static ɵcmp=wc({type:a,selectors:[[`app-servers-settings`]],decls:50,vars:50,consts:[[`outcome`,``],[`data-testid`,`servers-settings`,1,`rounded-lg`,`border`,`border-ink-700`,`bg-ink-850`,`px-4`,`py-3`],[1,`text-[13px]`,`font-medium`,`text-ink-200`],[1,`mt-1`,`text-[12px]`,`text-ink-500`],[1,`mt-3`,`divide-y`,`divide-ink-700`,`border-y`,`border-ink-700`],[1,`py-2.5`],[1,`py-2.5`,`text-[13px]`,`text-ink-400`],[`data-testid`,`server-form`,1,`mt-4`,3,`submit`],[1,`mt-2`,`grid`,`grid-cols-6`,`gap-3`],[1,`col-span-3`,`block`],[1,`text-[12px]`,`text-ink-400`],[`type`,`text`,`data-testid`,`server-name`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`placeholder`,`value`],[`data-testid`,`server-kind`,3,`change`],[`value`,`ssh`,3,`selected`],[`value`,`tcp`,3,`selected`],[1,`col-span-2`,`block`],[1,`block`],[`type`,`text`,`data-testid`,`server-host`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`placeholder`,`value`],[1,`col-span-1`,`block`],[`type`,`text`,`inputmode`,`numeric`,`data-testid`,`server-port`,`autocomplete`,`off`,3,`input`,`placeholder`,`value`],[1,`col-span-6`,`block`],[`type`,`text`,`data-testid`,`server-description`,`autocomplete`,`off`,3,`input`,`placeholder`,`value`],[1,`mt-2`,`text-[12px]`,`text-warn`],[`data-testid`,`server-form-problem`,1,`mt-2`,`text-[12px]`,`text-danger`],[1,`mt-3`,`flex`,`justify-end`,`gap-2`],[`type`,`button`,`data-testid`,`server-form-test`,1,`mx-btn`,`mx-focus`,3,`click`,`disabled`],[`type`,`submit`,`data-testid`,`server-add`,1,`mx-btn`,`mx-focus`,3,`disabled`],[`name`,`plus`,3,`size`],[4,`ngTemplateOutlet`,`ngTemplateOutletContext`],[3,`openChange`,`confirmed`,`open`,`title`,`description`],[1,`flex`,`items-center`,`gap-3`],[1,`min-w-0`,`flex-1`],[1,`flex`,`items-center`,`gap-2`],[1,`text-[13px]`,`text-ink-100`],[1,`rounded`,`bg-ink-700`,`px-1.5`,`text-[11px]`,`text-ink-200`],[1,`truncate`,`font-mono`,`text-[12px]`,`text-ink-400`],[1,`text-[12px]`,`text-ink-500`],[1,`text-[12px]`,`text-danger`],[`type`,`button`,`data-testid`,`server-test`,1,`mx-btn`,`mx-focus`,3,`click`,`disabled`],[`type`,`button`,`data-testid`,`server-remove`,1,`mx-btn`,`mx-focus`,3,`click`,`title`,`disabled`],[`name`,`trash`,3,`size`],[`type`,`text`,`data-testid`,`server-username`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`placeholder`,`value`],[`data-testid`,`server-test-result`,1,`mt-2`,`text-[12px]`],[1,`text-ok`],[1,`text-danger`],[1,`mt-2`,`text-ink-300`],[1,`mt-1`,`flex`,`items-center`,`gap-3`],[`data-testid`,`server-fingerprint`,1,`min-w-0`,`flex-1`,`truncate`,`font-mono`,`text-ink-100`],[`type`,`button`,`data-testid`,`server-trust`,1,`mx-btn`,`mx-focus`,3,`click`,`disabled`]],template:function(e,t){if(e&1){let l=RE();Li(0,`div`,1)(1,`h2`,2),fS(2),Nc(),Li(3,`p`,3),fS(4),Nc(),Li(5,`ul`,4),kc(6,Te,17,17,`li`,5,he,!1,Ie,2,1,`li`,6),Nc(),Li(9,`form`,7),Jm(`submit`,function(_){return t.add(_)}),Li(10,`h3`,2),fS(11),Nc(),Li(12,`div`,8)(13,`label`,9)(14,`span`,10),fS(15),Nc(),Li(16,`input`,11),Jm(`input`,function(_){return t.name.set(_.target.value)}),Nc()(),Li(17,`label`,9)(18,`span`,10),fS(19),Nc(),Li(20,`select`,12),Jm(`change`,function(_){return t.kind.set(_.target.value)}),Li(21,`option`,13),fS(22),Nc(),Li(23,`option`,14),fS(24),Nc()()(),SE(25,Pe,4,5,`label`,15),Li(26,`label`,16)(27,`span`,10),fS(28),Nc(),Li(29,`input`,17),Jm(`input`,function(_){return t.host.set(_.target.value)}),Nc()(),Li(30,`label`,18)(31,`span`,10),fS(32),Nc(),Li(33,`input`,19),Jm(`input`,function(_){return t.port.set(_.target.value)}),Nc()(),Li(34,`label`,20)(35,`span`,10),fS(36),Nc(),Li(37,`input`,21),Jm(`input`,function(_){return t.description.set(_.target.value)}),Nc()()(),SE(38,De,2,1,`p`,22),SE(39,Me,2,1,`p`,23),Li(40,`div`,24)(41,`button`,25),Jm(`click`,function(){return t.testForm()}),fS(42),Nc(),Li(43,`button`,26),Gm(44,`app-icon`,27),fS(45),Nc()(),_m(46,Ve,1,0,`ng-container`,28),Nc()(),_m(47,Fe,1,1,`ng-template`,null,0,_S),Li(49,`app-confirm-dialog`,29),vg(`openChange`,function(_){return Od(l),vS(t.confirmOpen,_)||(t.confirmOpen=_),Ld(_)}),Jm(`confirmed`,function(){return t.remove()}),Nc()}if(e&2){let l,s=zE(48);ec(2),pg(t.t().heading),ec(2),pg(t.t().hint),ec(2),Tc(t.servers()),ec(5),pg(t.t().add.heading),ec(4),pg(t.t().add.name),ec(),nS(t.input),Wm(`placeholder`,t.t().add.namePlaceholder)(`value`,t.name()),ec(3),pg(t.t().add.kind),ec(),nS(t.input),ec(),Wm(`selected`,t.kind()===`ssh`),ec(),pg(t.t().add.ssh),ec(),Wm(`selected`,t.kind()===`tcp`),ec(),pg(t.t().add.tcp),ec(),kE(t.kind()===`ssh`?25:-1),ec(),ag(`col-span-3`,t.kind()===`ssh`)(`col-span-5`,t.kind()===`tcp`),ec(2),pg(t.t().add.host),ec(),nS(t.input),Wm(`placeholder`,t.t().add.hostPlaceholder)(`value`,t.host()),ec(3),pg(t.t().add.port),ec(),nS(t.input),Wm(`placeholder`,t.kind()===`ssh`?`22`:`2375`)(`value`,t.port()),ec(3),pg(t.t().add.description),ec(),nS(t.input),Wm(`placeholder`,t.t().add.descriptionPlaceholder)(`value`,t.description()),ec(),kE(t.kind()===`tcp`?38:-1),ec(),kE((l=t.formProblem())?39:-1,l),ec(2),Wm(`disabled`,!t.filledIn()||t.testing()!==null),ec(),Ac(` `,t.testing()===t.form?t.t().testing:t.t().test,` `),ec(),Wm(`disabled`,!t.filledIn()||t.saving()),ec(),Wm(`size`,14),ec(),Ac(` `,t.t().add.submit,` `),ec(),Wm(`ngTemplateOutlet`,s)(`ngTemplateOutletContext`,SS(48,de,t.form)),ec(3),hg(`open`,t.confirmOpen),Wm(`title`,t.t().removeTitle(t.removing()??``))(`description`,t.t().removeDescription)}},dependencies:[W$2,My,Ie$1],encapsulation:2})}});function Ke(a,n){if(a&1&&(Li(0,`option`,10),fS(1),Nc()),a&2){let e=n.$implicit,t=HE();Wm(`value`,e.value)(`selected`,e.value===t.language),zr(`lang`,e.value),ec(),pg(e.name)}}function Re(a,n){if(a&1&&(Li(0,`p`,17),fS(1),Nc()),a&2){let e=HE(2);ec(),pg(e.t().startup.shortcutTaken)}}function $e(a,n){if(a&1&&(Li(0,`span`,24),fS(1),Nc()),a&2){let e=HE(2);ec(),pg(e.t().update.version(n.current))}}function He(a,n){if(a&1){let e=RE();Li(0,`button`,33),Jm(`click`,function(){Od(e);return Ld(HE(2).install())}),fS(1),Nc()}if(a&2){let e=HE(2);ec(),Ac(` `,e.t().update.install,` `)}}function je(a,n){if(a&1){let e=RE();Li(0,`button`,34),Jm(`click`,function(){Od(e);return Ld(HE(2).check())}),fS(1),Nc()}if(a&2){let e=HE(2);Wm(`disabled`,e.updateState()===`checking`||e.updateState()===`downloading`),ec(),Ac(` `,e.t().update.check,` `)}}function ze(a,n){if(a&1){let e=RE();Li(0,`div`,27)(1,`app-filter-switch`,16),Jm(`onChange`,function(l){Od(e);return Ld(HE(2).update({autoUpdate:l}))}),Nc()()}if(a&2){let e=HE(),t=HE();ec(),Wm(`label`,t.t().update.auto)(`on`,e.autoUpdate)}}function We(a,n){if(a&1&&(Li(0,`option`,10),fS(1),Nc()),a&2){let e=n.$implicit,t=HE();Wm(`value`,e.value)(`selected`,e.value===t.assistantModel),ec(),pg(e.name)}}function Be(a,n){if(a&1){let e=RE();Li(0,`div`,7)(1,`span`,37),fS(2),Nc(),Li(3,`button`,38),Jm(`click`,function(){Od(e);return Ld(HE(3).clearKey())}),Gm(4,`app-icon`,39),fS(5),Nc()()}if(a&2){let e=HE(3);ec(2),pg(e.t().assistant.configured),ec(2),Wm(`size`,14),ec(),Ac(` `,e.t().assistant.clearKey,` `)}}function Ge(a,n){if(a&1){let e=RE();Li(0,`form`,40),Jm(`submit`,function(l){Od(e);return Ld(HE(3).saveKey(l))}),Li(1,`label`,41),fS(2),Nc(),Li(3,`input`,42),Jm(`input`,function(l){Od(e);return Ld(HE(3).keyDraft.set(l.target.value))}),Nc(),Li(4,`button`,43),fS(5),Nc()()}if(a&2){let e=HE(),t=HE(2);ec(2),pg(t.t().assistant.keyLabel),ec(),Wm(`value`,t.keyDraft())(`disabled`,!e.storageAvailable),ec(),Wm(`disabled`,!e.storageAvailable||t.keyDraft().trim()===``),ec(),Ac(` `,t.common().save,` `)}}function qe(a,n){a&1&&(Li(0,`p`,36),fS(1),Nc()),a&2&&(ec(),pg(n))}function Je(a,n){if(a&1&&(SE(0,Be,6,3,`div`,7)(1,Ge,6,5,`form`,35),SE(2,qe,2,1,`p`,36),Li(3,`p`,11),fS(4),Nc()),a&2){let e,t=HE(2);kE(n.configured?0:1),ec(2),kE((e=t.keyProblem())?2:-1,e),ec(2),pg(t.t().assistant.hint)}}function Qe(a,n){if(a&1){let e=RE();Li(0,`div`,3)(1,`div`,4)(2,`div`,5)(3,`h2`,6),fS(4),Nc(),Li(5,`div`,7)(6,`label`,8),fS(7),Nc(),Li(8,`select`,9),Jm(`change`,function(l){Od(e);return Ld(HE().chooseLanguage(l.target.value))}),kc(9,Ke,2,4,`option`,10,ce),Nc()(),Li(11,`p`,11),fS(12),Nc()(),Li(13,`div`,12)(14,`h2`,6),fS(15),Nc(),Li(16,`div`,13)(17,`app-filter-switch`,14),Jm(`onChange`,function(l){Od(e);return Ld(HE().update({startAtLogin:l}))}),Nc()(),Li(18,`p`,11),fS(19),Nc(),Li(20,`div`,15)(21,`app-filter-switch`,16),Jm(`onChange`,function(l){Od(e);return Ld(HE().update({paletteShortcut:l}))}),Nc()(),SE(22,Re,2,1,`p`,17),Nc(),Li(23,`div`,12)(24,`h2`,6),fS(25),Nc(),Li(26,`div`,18)(27,`div`,19)(28,`app-filter-switch`,16),Jm(`onChange`,function(l){Od(e);return Ld(HE().update({notifyCrash:l}))}),Nc()(),Li(29,`div`,20)(30,`app-filter-switch`,16),Jm(`onChange`,function(l){Od(e);return Ld(HE().update({notifyUnhealthy:l}))}),Nc()(),Li(31,`div`,21)(32,`app-filter-switch`,16),Jm(`onChange`,function(l){Od(e);return Ld(HE().update({notifyWiring:l}))}),Nc()()(),Li(33,`p`,11),fS(34),Nc()(),Li(35,`div`,22)(36,`div`,23)(37,`h2`,6),fS(38),Nc(),SE(39,$e,2,1,`span`,24),SE(40,He,2,1,`button`,25)(41,je,2,2,`button`,26),Nc(),SE(42,ze,2,2,`div`,27),Li(43,`p`,28),fS(44),Nc()(),Li(45,`div`,29)(46,`h2`,6),fS(47,`Claude`),Nc(),Li(48,`div`,30)(49,`label`,31),fS(50),Nc(),Li(51,`select`,32),Jm(`change`,function(l){Od(e);return Ld(HE().update({assistantModel:l.target.value}))}),kc(52,We,2,3,`option`,10,ce),Nc()(),Li(54,`p`,11),fS(55),Nc(),SE(56,Je,5,3),Nc()(),Gm(57,`app-servers-settings`),Nc()}if(a&2){let e,t,l=n,s=HE();ec(4),pg(s.t().language.heading),ec(3),pg(s.t().language.label),ec(2),Tc(s.languages),ec(3),pg(s.t().language.hint),ec(3),pg(s.t().startup.heading),ec(2),Wm(`label`,s.t().startup.startAtLogin)(`on`,l.startAtLogin)(`disabled`,!l.startAtLoginAvailable),ec(2),Ac(` `,l.startAtLoginAvailable?s.t().startup.hintAvailable:s.t().startup.hintUnavailable,` `),ec(2),Wm(`label`,s.t().startup.paletteShortcut)(`on`,l.paletteShortcut),ec(),kE(l.paletteShortcut&&!l.paletteShortcutActive?22:-1),ec(3),pg(s.t().notifications.heading),ec(3),Wm(`label`,s.t().notifications.crash)(`on`,l.notifyCrash),ec(2),Wm(`label`,s.t().notifications.unhealthy)(`on`,l.notifyUnhealthy),ec(2),Wm(`label`,s.t().notifications.wiring)(`on`,l.notifyWiring),ec(2),pg(s.t().notifications.hint),ec(4),pg(s.t().update.heading),ec(),kE((e=s.appUpdate())?39:-1,e),ec(),kE(s.updateState()===`ready`?40:s.updateState()!==`unavailable`?41:-1),ec(2),kE(s.updateState()!==`unavailable`?42:-1),ec(2),pg(s.updateText()),ec(6),pg(s.t().assistant.model),ec(2),Tc(s.models),ec(3),pg(s.t().assistant.modelHint),ec(),kE((t=s.assistant())?56:-1,t)}}var ce;var Xe;var me;f(()=>{Kr();le();sk();lk();K();dk();x();pe();Kr();ce=(a,n)=>n.value;Xe={"claude-opus-5":`Opus 5`,"claude-sonnet-5":`Sonnet 5`,"claude-haiku-4-5":`Haiku 4.5`},me=class a{t=Lt(()=>ok().settings);common=Lt(()=>ok().common);languages=Object.keys(J0).map(n=>({value:n,name:J0[n]}));models=se.map(n=>({value:n,name:Xe[n]}));settings=wt(null);problem=wt(null);appUpdate=wt(null);assistant=wt(null);keyDraft=wt(``);keyProblem=wt(null);updateState=Lt(()=>this.appUpdate()?.status.state??`unavailable`);updateText=Lt(()=>{let n=this.appUpdate()?.status??{state:`unavailable`},e=this.t().update;switch(n.state){case`unavailable`:return e.unavailable;case`idle`:return e.idle;case`checking`:return e.checking;case`upToDate`:return e.upToDate(new Date(n.checkedAt).toLocaleTimeString(ik(),{hour:`2-digit`,minute:`2-digit`}));case`downloading`:return e.downloading(n.version,n.percent);case`ready`:return e.ready(n.version);case`error`:return e.error(n.problem)}});constructor(){this.load(),this.loadAppUpdate(),this.loadAssistant();let n=window.electron.appUpdate.onChange(e=>this.appUpdate.set(e));C(ve).onDestroy(n)}async check(){try{this.appUpdate.set(await window.electron.appUpdate.check())}catch(n){this.problem.set(eH(n))}}async install(){try{await window.electron.appUpdate.install()}catch(n){this.problem.set(eH(n))}}async update(n){try{this.settings.set(await window.electron.settings.update(n)),this.problem.set(null)}catch(e){this.problem.set(eH(e)),await this.load()}}async chooseLanguage(n){Ty(n),await this.update({language:n}),Ty(this.settings()?.language??n)}async saveKey(n){n.preventDefault();try{let e=await window.electron.assistant.setKey(this.keyDraft());if(!e.ok){this.keyProblem.set(e.problem);return}this.keyDraft.set(``),this.keyProblem.set(null),await this.loadAssistant()}catch(e){this.keyProblem.set(eH(e))}}async clearKey(){try{this.assistant.set(await window.electron.assistant.clearKey()),this.keyProblem.set(null)}catch(n){this.keyProblem.set(eH(n))}}async loadAssistant(){try{this.assistant.set(await window.electron.assistant.status())}catch(n){this.problem.set(eH(n))}}async loadAppUpdate(){try{this.appUpdate.set(await window.electron.appUpdate.get())}catch(n){this.problem.set(eH(n))}}async load(){try{this.settings.set(await window.electron.settings.get())}catch(n){this.problem.set(eH(n))}}static ɵfac=function(e){return new(e||a)};static ɵcmp=wc({type:a,selectors:[[`app-settings-page`]],decls:5,vars:3,consts:[[1,`h-full`,`overflow-y-auto`,`px-6`,`pt-5`,`pb-8`],[1,`text-xl`,`font-semibold`,`tracking-tight`,`text-ink-100`],[3,`problem`],[1,`mt-4`,`grid`,`max-w-6xl`,`items-start`,`gap-4`,`lg:grid-cols-2`],[1,`space-y-4`],[`data-testid`,`setting-language`,1,`rounded-lg`,`border`,`border-ink-700`,`bg-ink-850`,`px-4`,`py-3`],[1,`text-[13px]`,`font-medium`,`text-ink-200`],[1,`mt-3`,`flex`,`items-center`,`gap-3`],[`for`,`setting-language`,1,`text-[13px]`,`text-ink-300`],[`id`,`setting-language`,1,`mx-focus`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-800`,`px-2.5`,`py-1.5`,`text-[13px]`,`text-ink-100`,3,`change`],[3,`value`,`selected`],[1,`mt-2`,`text-[12px]`,`text-ink-500`],[1,`rounded-lg`,`border`,`border-ink-700`,`bg-ink-850`,`px-4`,`py-3`],[`data-testid`,`setting-start-at-login`,1,`mt-3`],[3,`onChange`,`label`,`on`,`disabled`],[`data-testid`,`setting-palette-shortcut`,1,`mt-3`],[3,`onChange`,`label`,`on`],[`data-testid`,`shortcut-taken`,1,`mt-2`,`text-[12px]`,`text-warn`],[1,`mt-3`,`space-y-2.5`],[`data-testid`,`setting-notify-crash`],[`data-testid`,`setting-notify-unhealthy`],[`data-testid`,`setting-notify-wiring`],[`data-testid`,`app-update`,1,`rounded-lg`,`border`,`border-ink-700`,`bg-ink-850`,`px-4`,`py-3`],[1,`flex`,`items-center`,`gap-3`],[1,`font-mono`,`text-[12px]`,`text-ink-500`],[`type`,`button`,`data-testid`,`app-update-install`,1,`mx-btn`,`mx-focus`,`ml-auto`],[`type`,`button`,`data-testid`,`app-update-check`,1,`mx-btn`,`mx-focus`,`ml-auto`,3,`disabled`],[`data-testid`,`setting-auto-update`,1,`mt-3`],[`data-testid`,`app-update-status`,1,`mt-2`,`text-[12px]`,`text-ink-500`],[`data-testid`,`assistant-settings`,1,`rounded-lg`,`border`,`border-ink-700`,`bg-ink-850`,`px-4`,`py-3`],[`data-testid`,`setting-assistant-model`,1,`mt-3`,`flex`,`items-center`,`gap-3`],[`for`,`setting-assistant-model`,1,`text-[13px]`,`text-ink-300`],[`id`,`setting-assistant-model`,1,`mx-focus`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-800`,`px-2.5`,`py-1.5`,`text-[13px]`,`text-ink-100`,3,`change`],[`type`,`button`,`data-testid`,`app-update-install`,1,`mx-btn`,`mx-focus`,`ml-auto`,3,`click`],[`type`,`button`,`data-testid`,`app-update-check`,1,`mx-btn`,`mx-focus`,`ml-auto`,3,`click`,`disabled`],[1,`mt-3`,`flex`,`gap-2`],[1,`mt-2`,`text-[12px]`,`text-danger`],[1,`text-[13px]`,`text-ink-300`],[`type`,`button`,`data-testid`,`assistant-clear-key`,1,`mx-btn`,`mx-focus`,`ml-auto`,3,`click`],[`name`,`trash`,3,`size`],[1,`mt-3`,`flex`,`gap-2`,3,`submit`],[`for`,`assistant-key`,1,`sr-only`],[`id`,`assistant-key`,`type`,`password`,`placeholder`,`sk-ant-…`,`autocomplete`,`off`,`spellcheck`,`false`,1,`mx-focus`,`min-w-0`,`flex-1`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-800`,`px-3`,`py-1.5`,`font-mono`,`text-[13px]`,`text-ink-100`,`placeholder:text-ink-500`,3,`input`,`value`,`disabled`],[`type`,`submit`,`data-testid`,`assistant-save-key`,1,`mx-btn`,`mx-focus`,3,`disabled`]],template:function(e,t){if(e&1&&(Li(0,`section`,0)(1,`h1`,1),fS(2),Nc(),Gm(3,`app-page-messages`,2),SE(4,Qe,58,27,`div`,3),Nc()),e&2){let l;ec(2),pg(t.t().title),ec(),Wm(`problem`,t.problem()),ec(),kE((l=t.settings())?4:-1,l)}},dependencies:[P,u$1,My,L],encapsulation:2})}})();export{me as SettingsPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Mn as lk,R as Kr,Vn as ok,W as Lt,_r as wt,er as sk,ln as f,sn as eH,u as C,zt as X}from"./chunk-C_5f0tVq.js";import{n as u,t as f$1}from"./chunk-Bg_b-Jjw.js";import{n as y,t as c}from"./chunk-nJjV_Xqa.js";var d;var h=f(()=>{Kr();lk();Kr();d=class a{state=wt(null);busy=wt(!1);startingWsl=wt(!1);wslFailure=wt(null);startedWsl=wt(!1);status=this.state.asReadonly();loading=this.busy.asReadonly();wslStarting=this.startingWsl.asReadonly();wslProblem=this.wslFailure.asReadonly();wslStartedBefore=this.startedWsl.asReadonly();async refresh(){this.busy.set(!0);try{this.state.set(await window.electron.engine.status())}finally{this.busy.set(!1)}}async startWsl(e){return this.start(()=>window.electron.engine.startWsl(e),!0)}async startWslDaemon(e){return this.start(()=>window.electron.engine.startWslDaemon(e),!1)}async start(e,t){this.startingWsl.set(!0),this.wslFailure.set(null);try{let r=await e();return r.ok?this.startedWsl.set(t):this.wslFailure.set(r.problem),await this.refresh(),r.ok}catch(r){return this.wslFailure.set(eH(r)),!1}finally{this.startingWsl.set(!1)}}static ɵfac=function(t){return new(t||a)};static ɵprov=X({token:a,factory:a.ɵfac,providedIn:`root`})}});var p;var W=f(()=>{Kr();y();h();lk();sk();f$1();Kr();p=class a{engine=C(d);compose=C(c);toast=C(u);items=wt([]);busy=wt(!1);failure=wt(null);contexts=this.items.asReadonly();switching=this.busy.asReadonly();problem=this.failure.asReadonly();active=Lt(()=>this.items().find(e=>e.active)??null);async load(){try{this.items.set(await window.electron.contexts.list()),this.failure.set(null)}catch(e){this.failure.set(eH(e))}}async use(e){if(!(this.busy()||e===this.active()?.name)){this.busy.set(!0);try{let t=await window.electron.contexts.use(e);if(!t.ok){this.toast.error(t.problem,ok().dashboard.contexts.switchFailed(e));return}await Promise.all([this.load(),this.engine.refresh(),this.compose.loadStatus()])}catch(t){this.toast.error(eH(t),ok().dashboard.contexts.switchFailed(e))}finally{this.busy.set(!1)}}}static ɵfac=function(t){return new(t||a)};static ɵprov=X({token:a,factory:a.ɵfac,providedIn:`root`})}});export{p as i,d as n,h as r,W as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ln as f}from"./chunk-
|
|
1
|
+
import{ln as f}from"./chunk-C_5f0tVq.js";function i(e,r,t){e.navigate([],{relativeTo:r,queryParams:{[t]:null},queryParamsHandling:`merge`,replaceUrl:!0})}var o=f(()=>{});export{o as n,i as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Mn as lk,R as Kr,Vn as ok,W as Lt,_r as wt,er as sk,ln as f,lr as ve,sn as eH,u as C,zt as X}from"./chunk-C_5f0tVq.js";import{n as u,t as f$1}from"./chunk-Bg_b-Jjw.js";import{i as h$1,r as d}from"./chunk-DzQ3NZEw.js";function M(n){let e=ok().images.check,t=p=>n.filter(f=>f.state===p).length,s=t(`update`),o=[s===0?e.allCurrent:e.updates(s)];return t(`unknown`)>0&&o.push(e.notInRegistry(t(`unknown`))),t(`error`)>0&&o.push(e.uncheckable(t(`error`))),e.summary(o.join(`, `),n.length)}var h;var P=f(()=>{Kr();h$1();lk();f$1();sk();Kr();h=class n{toast=C(u);items=wt([]);busy=wt(!1);loadProblem=wt(null);running=wt(new Set);updateResults=wt(null);checking=wt(!1);images=this.items.asReadonly();loading=this.busy.asReadonly();problem=this.loadProblem.asReadonly();pending=this.running.asReadonly();updates=this.updateResults.asReadonly();checkingUpdates=this.checking.asReadonly();totalBytes=Lt(()=>[...new Map(this.items().map(e=>[e.id,e.sizeBytes]))].reduce((e,[,t])=>e+t,0));unusedCount=Lt(()=>this.items().filter(e=>e.inUseBy===0).length);constructor(){C(ve).onDestroy(window.electron.events.subscribe(e=>{e.includes(`image`)&&this.refresh()}))}async refresh(){this.busy.set(!0);try{this.items.set(await window.electron.images.list()),this.loadProblem.set(null)}catch(e){this.loadProblem.set(eH(e))}finally{this.busy.set(!1)}}async remove(e,t){this.running.update(s=>new Set(s).add(e));try{let s=await window.electron.images.remove(e,t);s.ok||this.toast.error(s.problem)}finally{this.running.update(s=>{let o=new Set(s);return o.delete(e),o})}await this.refresh()}async removeMany(e,t){await Promise.all(e.map(s=>this.remove(s,t)))}async prune(e){this.busy.set(!0);try{let t=await window.electron.images.prune(e);t.ok?this.toast.success(t.removed===0?ok().common.nothingToPrune:ok().images.pruned(t.removed,d(t.reclaimedBytes))):this.toast.error(t.problem)}finally{this.busy.set(!1)}await this.refresh()}async checkUpdates(){this.checking.set(!0);try{let e=await window.electron.images.checkUpdates();this.updateResults.set(new Map(e.map(t=>[t.reference,t]))),this.toast.success(M(e))}catch(e){this.toast.error(eH(e))}finally{this.checking.set(!1)}}async recheckIfChecked(){this.updateResults()!==null&&await this.checkUpdates()}static ɵfac=function(t){return new(t||n)};static ɵprov=X({token:n,factory:n.ɵfac,providedIn:`root`})}});export{h as n,P as t};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{$n as sg,Ct as Tc,Dn as kE,En as jc,Fn as mj,Ft as Wm,Gn as pg,H as Li$1,Ht as Zd,I as Jm,In as nS,J as My,Jt as ag,Kn as pj,Kt as _m,Mn as lk,O as HE,On as kc,Pn as mg,Qn as rg,R as Kr,Sn as hg,T as Gm,Tr as zr,V as Ld,Vn as ok,W as Lt,X as Nc,Y as NS,Zn as rf,Zt as bS,_n as gj,_r as wt$1,_t as SS,cn as ec,d as CE,en as bg,er as sk,fr as vr,gt as SE,h as DE,hr as wc,in as dk,j as IS,ln as f,lr as ve$1,o as BE,pt as Rm,r as Ac,sn as eH,sr as vS,tt as Od,u as C,un as fS,ur as vg,ut as RE,vr as xS,vt as Sc,wt as Tg,xr as yS,xt as TE,zt as X}from"./chunk-C_5f0tVq.js";import{n as u,t as f$1}from"./chunk-Bg_b-Jjw.js";import{n as y,t as c}from"./chunk-nJjV_Xqa.js";import{a as Me$1,o as Ne$1}from"./chunk-0lzDD7VN.js";import"./chunk-CEIzuD8m.js";import{a as x,i as h,r as d,t as A}from"./chunk-DzQ3NZEw.js";import{n as p,t as M}from"./chunk-VLH5Jka4.js";import"./chunk-S9IeOMe4.js";import"./chunk-CG34bAfY.js";import{_ as pn$1,d as dn$1,f as fn$1,g as ln$1,l as an$1,m as ie,r as Je,u as cn$1,v as un$1}from"./chunk-C_ouaGQt.js";import{n as v,t as u$1}from"./chunk-PF0v2lXq.js";import{n as x$1,t as u$2}from"./chunk-Dw1WSpzf.js";import{a as Yt$1,s as fe$1,u as ra$1}from"./chunk-CW5lS8he.js";import{n as u$3,t as c$1}from"./chunk-DieHqkfe.js";import{n as V,t as G}from"./chunk-BpGvpxhZ.js";import{n as W,t as J}from"./chunk-Bo6U-hOl.js";import{a as T,i as H,n as B,o as U,r as G$1,s as V$1,t as $}from"./chunk-BoHvB94t.js";import{a as fi$1,i as _e,n as Qt$1,o as gi$1,r as Ye,s as we$1,t as Le}from"./chunk-C5DLS5H5.js";function qt(n,t){if(n&1&&(Li$1(0,`pre`,15),fS(1),Nc(),Li$1(2,`p`,16),fS(3),Nc()),n&2){let e=HE(2);ec(),pg(e.markdown()),ec(2),pg(e.redactionText())}}function Ut(n,t){if(n&1&&(Li$1(0,`p`,7),fS(1),Nc()),n&2){let e=HE(2);ec(),Ac(` `,e.problem(),` `)}}function Kt(n,t){if(n&1&&(Li$1(0,`p`,8),fS(1),Nc()),n&2){let e=HE(2);ec(),pg(e.t().collecting)}}function Qt(n,t){n&1&&(Li$1(0,`span`,10),fS(1),Nc()),n&2&&(ec(),pg(t))}function Xt(n,t){if(n&1){let e=RE();Gm(0,`div`,2),Li$1(1,`div`,3)(2,`div`,4)(3,`h2`,5),fS(4),Nc(),Li$1(5,`p`,6),fS(6),Nc(),SE(7,qt,4,2)(8,Ut,2,1,`p`,7)(9,Kt,2,1,`p`,8),Li$1(10,`div`,9),SE(11,Qt,2,1,`span`,10),Li$1(12,`button`,11),Gm(13,`app-icon`,12),fS(14),Nc(),Li$1(15,`button`,13),Jm(`click`,function(){Od(e);return Ld(HE().copy())}),Gm(16,`app-icon`,14),fS(17),Nc()()()()}if(n&2){let e,i,l=HE();ec(4),pg(l.t().title),ec(2),pg(l.t().description),ec(),kE((e=l.result()?.ok)===!0?7:e===!1?8:9),ec(4),kE((i=l.copyProblem())?11:-1,i),ec(2),Wm(`size`,14),ec(),Ac(` `,l.common().close,` `),ec(),Wm(`disabled`,l.result()?.ok!==!0),ec(),Wm(`name`,l.copied()?`check`:`copy`)(`size`,14),ec(),Ac(` `,l.copied()?l.common().copied:l.common().copy,` `)}}var ye;var yt=f(()=>{Kr();Je();lk();dk();sk();Kr();ye=class n{open=mj(!1);containerId=jc.required();t=Lt(()=>ok().containers.diagnosis);common=Lt(()=>ok().common);result=wt$1(null);copied=wt$1(!1);copyProblem=wt$1(null);constructor(){rf(()=>{if(!this.open())return;let t=this.containerId();Tg(()=>{this.load(t)})})}markdown(){let t=this.result();return t?.ok===!0?t.markdown:``}problem(){let t=this.result();return t?.ok===!1?t.problem:``}redactionText(){let t=this.result(),e=t?.ok===!0?t.redactions:0;return e===0?this.t().noRedactions:this.t().redactions(e)}async copy(){let t=this.result();if(t?.ok===!0)try{await navigator.clipboard.writeText(t.markdown),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.result.set(null),this.copied.set(!1),this.copyProblem.set(null);try{this.result.set(await window.electron.containers.diagnose(t))}catch(e){this.result.set({ok:!1,problem:eH(e)})}}static ɵfac=function(e){return new(e||n)};static ɵcmp=wc({type:n,selectors:[[`app-diagnosis-dialog`]],inputs:{open:[1,`open`],containerId:[1,`containerId`]},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`,`diagnosis-dialog`,1,`flex`,`max-h-[85vh]`,`w-full`,`max-w-3xl`,`flex-col`,`rounded-lg`,`border`,`border-ink-700`,`bg-ink-850`,`p-5`,`shadow-2xl`],[`rdxDialogTitle`,``,1,`text-[15px]`,`font-semibold`,`text-ink-100`],[`rdxDialogDescription`,``,1,`mt-1`,`text-[13px]`,`text-ink-400`],[1,`mt-4`,`rounded-md`,`border`,`border-danger/40`,`bg-danger/10`,`px-3`,`py-2`,`text-[13px]`,`text-danger`],[1,`mt-4`,`text-[13px]`,`text-ink-400`],[1,`mt-4`,`flex`,`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`,`diagnosis-copy`,1,`mx-btn`,`mx-focus`,3,`click`,`disabled`],[3,`name`,`size`],[`data-testid`,`diagnosis-text`,1,`mt-4`,`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-wrap`,`text-ink-200`],[`data-testid`,`diagnosis-redactions`,1,`mt-2`,`text-[12px]`,`text-ink-500`]],template:function(e,i){e&1&&(Li$1(0,`div`,0),vg(`openChange`,function(c){return vS(i.open,c)||(i.open=c),c}),_m(1,Xt,18,10,`ng-template`,1),Nc()),e&2&&hg(`open`,i.open)},dependencies:[ie,ln$1,an$1,pn$1,cn$1,fn$1,dn$1,un$1,My],encapsulation:2})}});function Yt(n,t){if(n&1&&(Li$1(0,`p`,7),fS(1),Nc()),n&2){let e=HE(2);ec(),pg(e.t().loading)}}function Zt(n,t){if(n&1&&(Li$1(0,`p`,23),fS(1),Nc()),n&2){let e=HE(3);ec(),pg(e.t().compose)}}function en(n,t){if(n&1){let e=RE();Li$1(0,`p`,14),fS(1),Nc(),Li$1(2,`div`,15)(3,`label`,16)(4,`span`,17),fS(5),Nc(),Li$1(6,`input`,18),Jm(`input`,function(l){Od(e);return Ld(HE(2).amount.set(l.target.value))}),Nc()(),Li$1(7,`select`,19),Jm(`change`,function(l){Od(e);return Ld(HE(2).unit.set(l.target.value))}),Li$1(8,`option`,20),fS(9,`MB`),Nc(),Li$1(10,`option`,21),fS(11,`GB`),Nc()()(),Li$1(12,`p`,22),fS(13),Nc(),SE(14,Zt,2,1,`p`,23)}if(n&2){let e=HE(2);ec(),Ac(` `,e.current()===null?e.t().none:e.t().current(e.format(e.current()??0)),` `),ec(4),pg(e.t().label),ec(),nS(e.field+` mt-1.5 w-full`),Wm(`value`,e.amount()),zr(`aria-label`,e.t().label),ec(),nS(e.field),zr(`aria-label`,e.t().unit),ec(),Wm(`selected`,e.unit()===`MB`),ec(2),Wm(`selected`,e.unit()===`GB`),ec(3),pg(e.t().noRemove),ec(),kE(e.compose()?14:-1)}}function tn(n,t){n&1&&(Li$1(0,`p`,8),fS(1),Nc()),n&2&&(ec(),pg(t))}function nn(n,t){if(n&1){let e=RE();Gm(0,`div`,2),Li$1(1,`div`,3)(2,`div`,4)(3,`h2`,5),fS(4),Nc(),Li$1(5,`p`,6),fS(6),Nc(),SE(7,Yt,2,1,`p`,7)(8,en,15,13),SE(9,tn,2,1,`p`,8),Li$1(10,`div`,9)(11,`button`,10),Gm(12,`app-icon`,11),fS(13),Nc(),Li$1(14,`button`,12),Jm(`click`,function(){Od(e);return Ld(HE().save())}),Gm(15,`app-icon`,13),fS(16),Nc()()()()}if(n&2){let e,i=HE();ec(4),pg(i.t().title),ec(2),pg(i.t().description),ec(),kE(i.loading()?7:8),ec(2),kE((e=i.problem())?9:-1,e),ec(3),Wm(`size`,14),ec(),Ac(` `,i.common().close,` `),ec(),Wm(`disabled`,i.loading()||i.saving()),ec(),Wm(`size`,14),ec(),Ac(` `,i.saving()?i.t().saving:i.t().save,` `)}}function on(n,t){let e=Number(n.replace(`,`,`.`));return!Number.isFinite(e)||e<=0?null:Math.round(e*(t===`GB`?Me:Ve))}var Ve;var Me;var an;var fe;var ft=f(()=>{Kr();Je();lk();h();dk();f$1();sk();Kr();Ve=1024*1024,Me=1024*Ve,an=`mx-focus min-w-0 rounded-md border border-ink-700 bg-ink-800 px-2.5 py-1.5 text-[13px] text-ink-100 placeholder:text-ink-500`;fe=class n{open=mj(!1);containerId=jc.required();compose=jc(!1);saved=pj();toast=C(u);t=Lt(()=>ok().containers.memoryLimit);common=Lt(()=>ok().common);field=an;current=wt$1(null);amount=wt$1(``);unit=wt$1(`MB`);loading=wt$1(!0);saving=wt$1(!1);problem=wt$1(null);constructor(){rf(()=>{if(!this.open())return;let t=this.containerId();Tg(()=>{this.load(t)})})}format(t){return d(t)}async save(){let t=on(this.amount(),this.unit());if(t===null){this.problem.set(this.t().invalid);return}this.saving.set(!0),this.problem.set(null);try{let e=await window.electron.containers.setMemoryLimit(this.containerId(),t);e.ok?(this.toast.success(this.t().saved(d(t))),this.saved.emit(),this.open.set(!1)):this.problem.set(e.problem)}catch(e){this.problem.set(eH(e))}finally{this.saving.set(!1)}}async load(t){this.loading.set(!0),this.problem.set(null);try{let e=await window.electron.containers.memoryLimit(t);if(e.ok){this.current.set(e.limitBytes);let i=e.limitBytes;i!==null&&i%Me===0?(this.unit.set(`GB`),this.amount.set(String(i/Me))):(this.unit.set(`MB`),this.amount.set(i===null?``:String(Math.round(i/Ve))))}else this.problem.set(e.problem)}catch(e){this.problem.set(eH(e))}finally{this.loading.set(!1)}}static ɵfac=function(e){return new(e||n)};static ɵcmp=wc({type:n,selectors:[[`app-memory-limit-dialog`]],inputs:{open:[1,`open`],containerId:[1,`containerId`],compose:[1,`compose`]},outputs:{open:`openChange`,saved:`saved`},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`,`memory-limit-dialog`,1,`w-full`,`max-w-md`,`rounded-lg`,`border`,`border-ink-700`,`bg-ink-850`,`p-5`,`shadow-2xl`],[`rdxDialogTitle`,``,1,`text-[15px]`,`font-semibold`,`text-ink-100`],[`rdxDialogDescription`,``,1,`mt-1`,`text-[13px]`,`text-ink-400`],[1,`mt-4`,`text-[13px]`,`text-ink-400`],[`role`,`alert`,1,`mt-3`,`rounded-md`,`border`,`border-danger/40`,`bg-danger/10`,`px-3`,`py-2`,`text-[13px]`,`text-danger`],[1,`mt-5`,`flex`,`items-center`,`justify-end`,`gap-2`],[`type`,`button`,`rdxDialogClose`,``,1,`mx-btn`,`mx-focus`],[`name`,`close`,3,`size`],[`type`,`button`,`data-testid`,`memory-limit-save`,1,`mx-btn`,`mx-focus`,`border-accent`,`text-accent`,3,`click`,`disabled`],[`name`,`check`,3,`size`],[`data-testid`,`memory-limit-current`,1,`mt-4`,`text-[13px]`,`text-ink-200`],[1,`mt-3`,`flex`,`items-end`,`gap-2`],[1,`block`,`flex-1`],[1,`text-[13px]`,`font-medium`,`text-ink-200`],[`type`,`number`,`min`,`1`,`step`,`any`,3,`input`,`value`],[3,`change`],[`value`,`MB`,3,`selected`],[`value`,`GB`,3,`selected`],[1,`mt-3`,`text-[12px]`,`text-ink-500`],[1,`mt-1`,`text-[12px]`,`text-ink-500`]],template:function(e,i){e&1&&(Li$1(0,`div`,0),vg(`openChange`,function(c){return vS(i.open,c)||(i.open=c),c}),_m(1,nn,17,9,`ng-template`,1),Nc()),e&2&&hg(`open`,i.open)},dependencies:[ie,ln$1,an$1,pn$1,cn$1,fn$1,dn$1,un$1,My],encapsulation:2})}});function rn(n,t){if(n&1&&(Li$1(0,`p`,7),fS(1),Nc()),n&2){let e=HE(2);ec(),pg(e.t().loading)}}function ln(n,t){if(n&1&&(Li$1(0,`option`,17),fS(1),Nc()),n&2){let e=t.$implicit,i=HE(3);Wm(`value`,e)(`selected`,i.name()===e),ec(),pg(i.t().names[e])}}function sn(n,t){if(n&1){let e=RE();Li$1(0,`label`,18)(1,`span`,15),fS(2),Nc(),Li$1(3,`input`,19),Jm(`input`,function(l){Od(e);return Ld(HE(3).setMaximum(l.target.value))}),Nc(),Li$1(4,`span`,20),fS(5),Nc()()}if(n&2){let e=HE(3);ec(2),pg(e.t().maximum),ec(),nS(e.field+` mt-1.5 w-full`),Wm(`value`,e.maximum()),zr(`aria-label`,e.t().maximum),ec(2),pg(e.t().maximumHint)}}function dn(n,t){if(n&1){let e=RE();Li$1(0,`label`,14)(1,`span`,15),fS(2),Nc(),Li$1(3,`select`,16),Jm(`change`,function(l){Od(e);return Ld(HE(2).choose(l.target.value))}),kc(4,ln,2,3,`option`,17,Sc),Nc()(),SE(6,sn,6,6,`label`,18)}if(n&2){let e=HE(2);ec(2),pg(e.t().label),ec(),nS(e.field+` mt-1.5 w-full`),zr(`aria-label`,e.t().label),ec(),Tc(e.names),ec(2),kE(e.name()===`on-failure`?6:-1)}}function cn(n,t){n&1&&(Li$1(0,`p`,8),fS(1),Nc()),n&2&&(ec(),Ac(` `,t,` `))}function mn(n,t){if(n&1){let e=RE();Gm(0,`div`,2),Li$1(1,`div`,3)(2,`div`,4)(3,`h2`,5),fS(4),Nc(),Li$1(5,`p`,6),fS(6),Nc(),SE(7,rn,2,1,`p`,7)(8,dn,7,5),SE(9,cn,2,1,`p`,8),Li$1(10,`div`,9)(11,`button`,10),Gm(12,`app-icon`,11),fS(13),Nc(),Li$1(14,`button`,12),Jm(`click`,function(){Od(e);return Ld(HE().save())}),Gm(15,`app-icon`,13),fS(16),Nc()()()()}if(n&2){let e,i=HE();ec(4),pg(i.t().title),ec(2),pg(i.t().description),ec(),kE(i.loading()?7:8),ec(2),kE((e=i.problem())?9:-1,e),ec(3),Wm(`size`,14),ec(),Ac(` `,i.common().close,` `),ec(),Wm(`disabled`,i.loading()||i.saving()),ec(),Wm(`size`,14),ec(),Ac(` `,i.saving()?i.t().saving:i.t().save,` `)}}var ht;var pn;var he;var vt=f(()=>{Kr();Je();lk();dk();f$1();sk();Kr();ht=[`no`,`always`,`unless-stopped`,`on-failure`],pn=`mx-focus min-w-0 rounded-md border border-ink-700 bg-ink-800 px-2.5 py-1.5 text-[13px] text-ink-100 placeholder:text-ink-500`,he=class n{open=mj(!1);containerId=jc.required();toast=C(u);t=Lt(()=>ok().containers.restartPolicy);common=Lt(()=>ok().common);field=pn;names=ht;name=wt$1(`no`);maximum=wt$1(0);loading=wt$1(!0);saving=wt$1(!1);problem=wt$1(null);constructor(){rf(()=>{if(!this.open())return;let t=this.containerId();Tg(()=>{this.load(t)})})}choose(t){this.name.set(ht.find(e=>e===t)??`no`)}setMaximum(t){let e=Number.parseInt(t,10);this.maximum.set(Number.isNaN(e)?0:Math.min(100,Math.max(0,e)))}async save(){this.saving.set(!0),this.problem.set(null);try{let t={name:this.name(),maximumRetryCount:this.maximum()},e=await window.electron.containers.setRestartPolicy(this.containerId(),t);e.ok?(this.toast.success(this.t().saved(this.t().names[t.name])),this.open.set(!1)):this.problem.set(e.problem)}catch(t){this.problem.set(eH(t))}finally{this.saving.set(!1)}}async load(t){this.loading.set(!0),this.problem.set(null);try{let e=await window.electron.containers.restartPolicy(t);e.ok?(this.name.set(e.policy.name),this.maximum.set(e.policy.maximumRetryCount)):this.problem.set(e.problem)}catch(e){this.problem.set(eH(e))}finally{this.loading.set(!1)}}static ɵfac=function(e){return new(e||n)};static ɵcmp=wc({type:n,selectors:[[`app-restart-policy-dialog`]],inputs:{open:[1,`open`],containerId:[1,`containerId`]},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`,`restart-policy-dialog`,1,`w-full`,`max-w-md`,`rounded-lg`,`border`,`border-ink-700`,`bg-ink-850`,`p-5`,`shadow-2xl`],[`rdxDialogTitle`,``,1,`text-[15px]`,`font-semibold`,`text-ink-100`],[`rdxDialogDescription`,``,1,`mt-1`,`text-[13px]`,`text-ink-400`],[1,`mt-4`,`text-[13px]`,`text-ink-400`],[`role`,`alert`,1,`mt-3`,`rounded-md`,`border`,`border-danger/40`,`bg-danger/10`,`px-3`,`py-2`,`text-[13px]`,`text-danger`],[1,`mt-5`,`flex`,`items-center`,`justify-end`,`gap-2`],[`type`,`button`,`rdxDialogClose`,``,1,`mx-btn`,`mx-focus`],[`name`,`close`,3,`size`],[`type`,`button`,`data-testid`,`restart-policy-save`,1,`mx-btn`,`mx-focus`,`border-accent`,`text-accent`,3,`click`,`disabled`],[`name`,`check`,3,`size`],[1,`mt-4`,`block`],[1,`text-[13px]`,`font-medium`,`text-ink-200`],[3,`change`],[3,`value`,`selected`],[1,`mt-3`,`block`],[`type`,`number`,`min`,`0`,`max`,`100`,3,`input`,`value`],[1,`mt-1`,`block`,`text-[12px]`,`text-ink-500`]],template:function(e,i){e&1&&(Li$1(0,`div`,0),vg(`openChange`,function(c){return vS(i.open,c)||(i.open=c),c}),_m(1,mn,17,9,`ng-template`,1),Nc()),e&2&&hg(`open`,i.open)},dependencies:[ie,ln$1,an$1,pn$1,cn$1,fn$1,dn$1,un$1,My],encapsulation:2})}});function un(n,t){if(n&1){let e=RE();Li$1(0,`button`,18),Jm(`click`,function(){let l=Od(e).$implicit;return Ld(HE(2).format.set(l))}),fS(1),Nc()}if(n&2){let e=t.$implicit,i=HE(2);nS(i.format()===e?`bg-ink-700 text-ink-100`:`text-ink-400 hover:text-ink-200`),zr(`aria-pressed`,i.format()===e)(`data-testid`,`run-command-format-`+e),ec(),Ac(` `,e===`run`?i.t().formatRun:i.t().formatCompose,` `)}}function xn(n,t){if(n&1&&(Li$1(0,`p`,9),fS(1),Nc()),n&2){let e=HE(2);ec(),Ac(` `,e.t().composeNote(t),` `)}}function gn(n,t){if(n&1&&(Li$1(0,`pre`,19),fS(1),Nc(),Li$1(2,`p`,20),fS(3),Nc()),n&2){let e=HE(2);ec(),pg(e.command()),ec(2),pg(e.envText())}}function _n(n,t){if(n&1&&(Li$1(0,`p`,10),fS(1),Nc()),n&2){let e=HE(2);ec(),Ac(` `,e.problem(),` `)}}function yn(n,t){if(n&1&&(Li$1(0,`p`,11),fS(1),Nc()),n&2){let e=HE(2);ec(),pg(e.t().building)}}function fn(n,t){n&1&&(Li$1(0,`span`,13),fS(1),Nc()),n&2&&(ec(),pg(t))}function hn(n,t){if(n&1){let e=RE();Gm(0,`div`,2),Li$1(1,`div`,3)(2,`div`,4)(3,`h2`,5),fS(4),Nc(),Li$1(5,`p`,6),fS(6),Nc(),Li$1(7,`div`,7),kc(8,un,2,5,`button`,8,Sc),Nc(),SE(10,xn,2,1,`p`,9),SE(11,gn,4,2)(12,_n,2,1,`p`,10)(13,yn,2,1,`p`,11),Li$1(14,`div`,12),SE(15,fn,2,1,`span`,13),Li$1(16,`button`,14),Gm(17,`app-icon`,15),fS(18),Nc(),Li$1(19,`button`,16),Jm(`click`,function(){Od(e);return Ld(HE().copy())}),Gm(20,`app-icon`,17),fS(21),Nc()()()()}if(n&2){let e,i,l,c=HE();ec(4),pg(c.format()===`compose`?c.t().composeTitle:c.t().title),ec(2),pg(c.format()===`compose`?c.t().composeDescription:c.t().description),ec(2),Tc(c.formats),ec(2),kE((e=c.composeProject())?10:-1,e),ec(),kE((i=c.result()?.ok)===!0?11:i===!1?12:13),ec(4),kE((l=c.copyProblem())?15:-1,l),ec(2),Wm(`size`,14),ec(),Ac(` `,c.common().close,` `),ec(),Wm(`disabled`,c.result()?.ok!==!0),ec(),Wm(`name`,c.copied()?`check`:`copy`)(`size`,14),ec(),Ac(` `,c.copied()?c.common().copied:c.common().copy,` `)}}var ve;var bt=f(()=>{Kr();Je();lk();dk();sk();Kr();ve=class n{open=mj(!1);containerId=jc.required();composeProject=jc(null);format=mj(`run`);formats=[`run`,`compose`];t=Lt(()=>ok().containers.runCommand);common=Lt(()=>ok().common);result=wt$1(null);copied=wt$1(!1);copyProblem=wt$1(null);constructor(){rf(()=>{if(!this.open())return;let t=this.containerId();Tg(()=>{this.load(t)})})}command(){let t=this.result();return t?.ok!==!0?``:this.format()===`compose`?t.compose:t.command}problem(){let t=this.result();return t?.ok===!1?t.problem:``}envText(){let t=this.result(),e=t?.ok===!0?t.envCount:0;return e===0?this.t().noEnv:this.format()===`compose`?this.t().composeEnvWarning(e):this.t().envWarning(e)}async copy(){if(this.result()?.ok===!0)try{await navigator.clipboard.writeText(this.command()),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.result.set(null),this.copied.set(!1),this.copyProblem.set(null);try{this.result.set(await window.electron.containers.runCommand(t))}catch(e){this.result.set({ok:!1,problem:eH(e)})}}static ɵfac=function(e){return new(e||n)};static ɵcmp=wc({type:n,selectors:[[`app-run-command-dialog`]],inputs:{open:[1,`open`],containerId:[1,`containerId`],composeProject:[1,`composeProject`],format:[1,`format`]},outputs:{open:`openChange`,format:`formatChange`},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`,`run-command-dialog`,1,`flex`,`max-h-[85vh]`,`w-full`,`max-w-3xl`,`flex-col`,`rounded-lg`,`border`,`border-ink-700`,`bg-ink-850`,`p-5`,`shadow-2xl`],[`rdxDialogTitle`,``,1,`text-[15px]`,`font-semibold`,`text-ink-100`],[`rdxDialogDescription`,``,1,`mt-1`,`text-[13px]`,`text-ink-400`],[`role`,`group`,1,`mt-3`,`inline-flex`,`self-start`,`rounded-md`,`border`,`border-ink-700`,`p-0.5`,`text-[12px]`],[`type`,`button`,1,`mx-focus`,`rounded`,`px-2.5`,`py-1`,3,`class`],[1,`mt-3`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-900`,`px-3`,`py-2`,`text-[12px]`,`text-ink-400`],[1,`mt-4`,`rounded-md`,`border`,`border-danger/40`,`bg-danger/10`,`px-3`,`py-2`,`text-[13px]`,`text-danger`],[1,`mt-4`,`text-[13px]`,`text-ink-400`],[1,`mt-4`,`flex`,`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`,`run-command-copy`,1,`mx-btn`,`mx-focus`,3,`click`,`disabled`],[3,`name`,`size`],[`type`,`button`,1,`mx-focus`,`rounded`,`px-2.5`,`py-1`,3,`click`],[`data-testid`,`run-command-text`,1,`mt-4`,`min-h-0`,`flex-1`,`overflow-auto`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-900`,`p-3`,`font-mono`,`text-[12px]`,`leading-relaxed`,`break-all`,`whitespace-pre-wrap`,`text-ink-200`],[`data-testid`,`run-command-env`,1,`mt-2`,`text-[12px]`,`text-ink-500`]],template:function(e,i){e&1&&(Li$1(0,`div`,0),vg(`openChange`,function(c){return vS(i.open,c)||(i.open=c),c}),_m(1,hn,22,11,`ng-template`,1),Nc()),e&2&&hg(`open`,i.open)},dependencies:[ie,ln$1,an$1,pn$1,cn$1,fn$1,dn$1,un$1,My],encapsulation:2})}});function bn(n,t){if(n&1){let e=RE();Li$1(0,`button`,10),Jm(`click`,function(){Od(e);let l=HE().$implicit;return Ld(HE().toggle(l.path))}),Gm(1,`app-icon`,11),Nc()}if(n&2){let e=HE().$implicit,i=HE();zr(`aria-expanded`,i.isOpen(e.path))(`aria-label`,i.isOpen(e.path)?i.t().collapse(e.key):i.t().expand(e.key)),ec(),Wm(`name`,i.isOpen(e.path)?`chevronDown`:`chevronRight`)(`size`,12)}}function Cn(n,t){n&1&&Gm(0,`span`,5)}function wn(n,t){if(n&1&&(Li$1(0,`span`,8),fS(1),Nc()),n&2){let e=HE().$implicit;ec(),pg(e.preview)}}function kn(n,t){if(n&1&&(Li$1(0,`span`,9),fS(1),Nc()),n&2){let e=HE().$implicit;ec(),pg(e.preview)}}function Dn(n,t){if(n&1&&(Li$1(0,`div`,3),SE(1,bn,2,4,`button`,4)(2,Cn,1,0,`span`,5),Li$1(3,`span`,6),fS(4),Nc(),Li$1(5,`span`,7),fS(6,`:`),Nc(),SE(7,wn,2,1,`span`,8)(8,kn,2,1,`span`,9),Nc()),n&2){let e=t.$implicit;sg(`padding-left`,e.depth*14+4,`px`),ec(),kE(e.hasChildren?1:2),ec(3),pg(e.key),ec(3),kE(e.kind===`value`?7:8)}}function Sn(n,t){if(n&1&&(Li$1(0,`p`,2),fS(1),Nc()),n&2){let e=HE();ec(),pg(e.t().empty)}}function Ne(n){return Array.isArray(n)?n.map((t,e)=>[String(e),t]):n!==null&&typeof n==`object`?Object.entries(n):[]}function In(n){return Array.isArray(n)?`array`:n!==null&&typeof n==`object`?`object`:`value`}function Tn(n,t){if(t===`array`){let e=n.length;return e===0?`[]`:`[${String(e)}]`}if(t===`object`){let e=Object.keys(n).length;return e===0?`{}`:`{${String(e)}}`}return JSON.stringify(n)??`null`}function En(n,t){let e=[];function i(l,c,C,Pe){let Re=In(c),Ie=Ne(c);if(e.push({path:C,key:l,depth:Pe,kind:Re,preview:Tn(c,Re),hasChildren:Ie.length>0}),!(Ie.length===0||!t.has(C)))for(let[Le,Rt]of Ie)i(Le,Rt,`${C}.${Le}`,Pe+1)}for(let[l,c]of Ne(n))i(l,c,l,0);return e}function Mn(n){return new Set(Ne(n).map(([t])=>t))}var vn;var be;var Ct=f(()=>{Kr();dk();sk();Kr();vn=(n,t)=>t.path;be=class n{value=jc.required();t=Lt(()=>ok().shell.jsonView);overrides=wt$1(new Map);defaults=Lt(()=>Mn(this.value()));rows=Lt(()=>En(this.value(),this.openPaths()));openPaths=Lt(()=>{let t=new Set(this.defaults());for(let[e,i]of this.overrides())i?t.add(e):t.delete(e);return t});isOpen(t){return this.openPaths().has(t)}toggle(t){let e=new Map(this.overrides());e.set(t,!this.isOpen(t)),this.overrides.set(e)}static ɵfac=function(e){return new(e||n)};static ɵcmp=wc({type:n,selectors:[[`app-json-view`]],inputs:{value:[1,`value`]},decls:4,vars:1,consts:[[1,`font-mono`,`text-[12px]`,`leading-[1.7]`],[`data-testid`,`json-row`,1,`flex`,`gap-1.5`,`rounded-sm`,`px-1`,`hover:bg-ink-850`,3,`padding-left`],[1,`text-ink-400`],[`data-testid`,`json-row`,1,`flex`,`gap-1.5`,`rounded-sm`,`px-1`,`hover:bg-ink-850`],[`type`,`button`,1,`mx-focus`,`w-3`,`shrink-0`,`cursor-pointer`,`text-ink-500`,`hover:text-ink-100`],[1,`w-3`,`shrink-0`],[1,`shrink-0`,`text-accent`],[1,`text-ink-600`],[1,`break-all`,`text-ink-200`],[1,`text-ink-500`],[`type`,`button`,1,`mx-focus`,`w-3`,`shrink-0`,`cursor-pointer`,`text-ink-500`,`hover:text-ink-100`,3,`click`],[3,`name`,`size`]],template:function(e,i){e&1&&(Li$1(0,`div`,0),kc(1,Dn,9,5,`div`,1,vn,!1,Sn,2,1,`p`,2),Nc()),e&2&&(ec(),Tc(i.rows()))},dependencies:[My],encapsulation:2})}});var wt;var Vn;var se;var kt=f(()=>{Kr();lk();Kr();wt=2e3,Vn=500,se=class n{buffer=wt$1([]);busy=wt$1(!1);failure=wt$1(null);dropped=wt$1(!1);streamId=null;unsubscribe=null;disposed=!1;lines=this.buffer.asReadonly();loading=this.busy.asReadonly();problem=this.failure.asReadonly();truncated=this.dropped.asReadonly();constructor(){C(ve$1).onDestroy(()=>this.close())}async open(t,e=Vn){this.close(),this.disposed=!1,this.busy.set(!0),this.buffer.set([]),this.dropped.set(!1);try{let i=await window.electron.logs.open(t,e);if(this.disposed){window.electron.logs.close(i);return}this.streamId=i,this.unsubscribe=window.electron.logs.onLines(i,l=>this.append(l)),this.failure.set(null)}catch(i){this.failure.set(eH(i))}finally{this.busy.set(!1)}}close(){this.disposed=!0,this.unsubscribe?.(),this.unsubscribe=null,this.streamId!==null&&(window.electron.logs.close(this.streamId),this.streamId=null)}clear(){this.buffer.set([]),this.dropped.set(!1)}append(t){let e=[...this.buffer(),...t];if(e.length>wt){this.dropped.set(!0),this.buffer.set(e.slice(e.length-wt));return}this.buffer.set(e)}static ɵfac=function(e){return new(e||n)};static ɵprov=X({token:n,factory:n.ɵfac})}});function Pn(n,t){if(n&1&&fS(0),n&2)Ac(` `,HE().t().connecting,` `)}function Rn(n,t){if(n&1&&(Li$1(0,`span`,21),fS(1),Nc()),n&2){let e=HE(2);ec(),Ac(` · `,e.t().truncated)}}function Ln(n,t){if(n&1&&(fS(0),SE(1,Rn,2,1,`span`,21)),n&2){let e=HE();Ac(` `,e.t().count(e.visible().length,e.session.lines().length),` `),ec(),kE(e.session.truncated()?1:-1)}}function Fn(n,t){n&1&&(Li$1(0,`p`,17),fS(1),Nc()),n&2&&(ec(),Ac(` `,t,` `))}function zn(n,t){if(n&1&&(Li$1(0,`span`,23),fS(1),Nc()),n&2){let e=HE().$implicit;ec(),pg(e.line.timestamp)}}function On(n,t){if(n&1&&(Li$1(0,`div`,22),SE(1,zn,2,1,`span`,23),Li$1(2,`span`,24),fS(3),Nc()()),n&2){let e=t.$implicit,i=HE();ag(`text-danger`,e.line.stream===`stderr`&&e.level===null),ec(),kE(i.showTimestamps()&&e.line.timestamp?1:-1),ec(),nS(i.colorOf(e)),ec(),pg(e.line.text)}}function Bn(n,t){if(n&1&&(Li$1(0,`p`,20),fS(1),Nc()),n&2){let e=HE();ec(),Ac(` `,e.session.loading()?``:e.filter()===``&&e.levels().size===0?e.t().empty:e.t().noMatches,` `)}}var Nn;var Ce;var Dt=f(()=>{Kr();V$1();kt();M();dk();$();f$1();sk();Kr();Nn=[`scroller`];Ce=class n{containerId=jc.required();name=jc(``);session=C(se);preferences=C(p);t=Lt(()=>ok().containers.logs);common=Lt(()=>ok().common);filter=wt$1(``);follow=this.preferences.flag(`logs.follow`,!0);showTimestamps=this.preferences.flag(`logs.showTimestamps`);copied=wt$1(!1);saving=wt$1(!1);toast=C(u);scroller=gj(`scroller`);levels=wt$1(new Set);leveled=Lt(()=>this.session.lines().map(t=>({line:t,level:B(t.text)})));matching=Lt(()=>{let t=this.filter().trim().toLowerCase();return t===``?this.leveled():this.leveled().filter(e=>e.line.text.toLowerCase().includes(t))});counts=Lt(()=>U(this.matching().map(t=>t.level)));visible=Lt(()=>{let t=this.levels();return t.size===0?this.matching():this.matching().filter(e=>H(e.level,t))});constructor(){rf(()=>{this.session.open(this.containerId())}),rf(()=>{let t=this.visible(),e=this.scroller()?.nativeElement;!this.follow()||e===void 0||t.length===0||queueMicrotask(()=>{e.scrollTop=e.scrollHeight})})}colorOf(t){return t.level!==null?G$1[t.level]:t.line.stream===`stdout`?`text-ink-200`:``}async save(){this.saving.set(!0);try{let t=await window.electron.containers.saveLogs(this.containerId(),this.name()||this.containerId().slice(0,12));t.ok?this.toast.success(this.t().saved(t.lines,t.path)):t.canceled||this.toast.error(t.problem)}finally{this.saving.set(!1)}}async copy(){let t=this.visible().map(({line:e})=>this.showTimestamps()&&e.timestamp!==null?`${e.timestamp} ${e.text}`:e.text).join(`
|
|
2
|
+
`);try{await navigator.clipboard.writeText(t),this.copied.set(!0),setTimeout(()=>this.copied.set(!1),1500)}catch{}}static ɵfac=function(e){return new(e||n)};static ɵcmp=wc({type:n,selectors:[[`app-logs-view`]],viewQuery:function(e,i){e&1&&rg(i.scroller,Nn,5),e&2&&BE()},inputs:{containerId:[1,`containerId`],name:[1,`name`]},features:[IS([se])],decls:33,vars:33,consts:[[`scroller`,``],[1,`flex`,`h-full`,`flex-col`],[1,`flex`,`flex-wrap`,`items-center`,`gap-3`,`border-b`,`border-ink-700`,`px-4`,`py-2`],[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-64`,`rounded-md`,`border`,`border-ink-700`,`bg-ink-850`,`py-1`,`pr-3`,`pl-8`,`text-[12px]`,`text-ink-100`,`placeholder:text-ink-500`,3,`input`,`placeholder`,`value`],[3,`chosenChange`,`chosen`,`errors`,`warnings`],[`type`,`button`,1,`mx-btn`,`mx-focus`,3,`click`],[`name`,`play`,3,`size`],[`name`,`clock`,3,`size`],[3,`name`,`size`],[`type`,`button`,`data-testid`,`logs-save`,1,`mx-btn`,`mx-focus`,3,`click`,`title`,`disabled`],[`name`,`download`,3,`size`],[`name`,`eraser`,3,`size`],[1,`ml-auto`,`text-[12px]`,`text-ink-500`],[1,`m-4`,`rounded-md`,`border`,`border-danger/40`,`bg-danger/10`,`px-3`,`py-2`,`text-[13px]`,`text-danger`],[`data-testid`,`log-pane`,1,`min-h-0`,`flex-1`,`overflow-auto`,`bg-ink-950`,`px-4`,`py-2`,`font-mono`,`text-[12px]`,`leading-[1.6]`],[`data-testid`,`log-line`,1,`flex`,`gap-2`,`whitespace-pre-wrap`,3,`text-danger`],[1,`text-ink-500`],[1,`text-warn`],[`data-testid`,`log-line`,1,`flex`,`gap-2`,`whitespace-pre-wrap`],[1,`shrink-0`,`text-ink-500`],[1,`break-all`]],template:function(e,i){if(e&1){let l=RE();Li$1(0,`div`,1)(1,`div`,2)(2,`label`,3)(3,`span`,4),Gm(4,`app-icon`,5),Nc(),Li$1(5,`span`,6),fS(6),Nc(),Li$1(7,`input`,7),Jm(`input`,function(C){return i.filter.set(C.target.value)}),Nc()(),Li$1(8,`app-level-filter`,8),vg(`chosenChange`,function(C){return Od(l),vS(i.levels,C)||(i.levels=C),Ld(C)}),Nc(),Li$1(9,`button`,9),Jm(`click`,function(){return i.follow.set(!i.follow())}),Gm(10,`app-icon`,10),fS(11),Nc(),Li$1(12,`button`,9),Jm(`click`,function(){return i.showTimestamps.set(!i.showTimestamps())}),Gm(13,`app-icon`,11),fS(14),Nc(),Li$1(15,`button`,9),Jm(`click`,function(){return i.copy()}),Gm(16,`app-icon`,12),fS(17),Nc(),Li$1(18,`button`,13),Jm(`click`,function(){return i.save()}),Gm(19,`app-icon`,14),fS(20),Nc(),Li$1(21,`button`,9),Jm(`click`,function(){return i.session.clear()}),Gm(22,`app-icon`,15),fS(23),Nc(),Li$1(24,`span`,16),SE(25,Pn,1,1)(26,Ln,2,2),Nc()(),SE(27,Fn,2,1,`p`,17),Li$1(28,`div`,18,0),kc(30,On,4,6,`div`,19,TE,!1,Bn,2,1,`p`,20),Nc()()}if(e&2){let l;ec(4),Wm(`size`,14),ec(2),pg(i.t().filter),ec(),Wm(`placeholder`,i.t().filter)(`value`,i.filter()),ec(),hg(`chosen`,i.levels),Wm(`errors`,i.counts().error)(`warnings`,i.counts().warn),ec(),ag(`border-accent`,i.follow())(`text-accent`,i.follow()),zr(`aria-pressed`,i.follow()),ec(),Wm(`size`,14),ec(),Ac(` `,i.t().follow,` `),ec(),ag(`border-accent`,i.showTimestamps())(`text-accent`,i.showTimestamps()),zr(`aria-pressed`,i.showTimestamps()),ec(),Wm(`size`,14),ec(),Ac(` `,i.t().timestamps,` `),ec(2),Wm(`name`,i.copied()?`check`:`copy`)(`size`,14),ec(),Ac(` `,i.copied()?i.common().copied:i.common().copy,` `),ec(),Wm(`title`,i.t().saveHint)(`disabled`,i.saving()),ec(),Wm(`size`,14),ec(),Ac(` `,i.t().save,` `),ec(2),Wm(`size`,14),ec(),Ac(` `,i.t().clear,` `),ec(2),kE(i.session.loading()?25:26),ec(2),kE((l=i.session.problem())?27:-1,l),ec(3),Tc(i.visible())}},dependencies:[My,T],encapsulation:2})}});function Wn(n,t){if(n&1){let e=RE();Li$1(0,`button`,7),Jm(`click`,function(){Od(e);let l=HE();return Ld(l.go(l.parentOf(l.path())))}),Gm(1,`app-icon`,13),Nc()}if(n&2){let e=HE();Wm(`disabled`,e.path()===`/`||e.busy()),zr(`aria-label`,e.t().up),ec(),Wm(`size`,14)}}function Hn(n,t){if(n&1&&(Li$1(0,`p`,3),fS(1),Nc()),n&2){let e=HE();ec(),mg(` `,e.t().changesTitle,` · `,e.t().changesCount(e.changes().length),` `)}}function An(n,t){if(n&1&&(Li$1(0,`span`,14),fS(1),Nc()),n&2){let e=HE().$implicit;ec(),pg(e.label)}}function $n(n,t){n&1&&(Li$1(0,`span`,16),fS(1,`/`),Nc())}function Jn(n,t){if(n&1){let e=RE();Li$1(0,`button`,15),Jm(`click`,function(){Od(e);let l=HE().$implicit;return Ld(HE(2).go(l.path))}),fS(1),Nc(),SE(2,$n,2,0,`span`,16)}if(n&2){let e=HE().$implicit;ec(),Ac(` `,e.label,` `),ec(),kE(e.path!==`/`?2:-1)}}function Gn(n,t){if(n&1&&SE(0,An,2,1,`span`,14)(1,Jn,3,2),n&2){let e=t.$index,i=t.$count;kE(e===i-1?0:1)}}function qn(n,t){if(n&1&&(Li$1(0,`nav`,4),kc(1,Gn,2,1,null,null,St),Nc()),n&2){let e=HE();zr(`aria-label`,e.t().path),ec(),Tc(e.crumbs())}}function Un(n,t){if(n&1){let e=RE();Li$1(0,`button`,7),Jm(`click`,function(){Od(e);return Ld(HE().chooseAndUpload())}),Gm(1,`app-icon`,17),fS(2),Nc()}if(n&2){let e=HE();Wm(`disabled`,e.busy()),ec(),Wm(`size`,14),ec(),Ac(` `,e.t().upload,` `)}}function Kn(n,t){if(n&1&&(Li$1(0,`p`,18),fS(1),Nc()),n&2){let e=HE(2);ec(),pg(e.t().changesEmpty)}}function Qn(n,t){if(n&1){let e=RE();Li$1(0,`li`,20)(1,`span`,21),fS(2),Nc(),Li$1(3,`button`,22),Jm(`click`,function(){let l=Od(e).$implicit;return Ld(HE(2).openFolderOf(l))}),fS(4),Nc()()}if(n&2){let e=t.$implicit,i=HE(2);ec(),nS(i.kindTone(e)),ec(),pg(i.t().changeKind[e.kind]),ec(),zr(`aria-label`,i.t().openFolderOf(e.path)),ec(),Ac(` `,e.path,` `)}}function Xn(n,t){if(n&1&&(SE(0,Kn,2,1,`p`,18),Li$1(1,`ul`,19),kc(2,Qn,5,5,`li`,20,St),Nc()),n&2){let e=HE();kE(e.changes().length===0&&!e.busy()&&e.problem()===null?0:-1),ec(2),Tc(e.changes())}}function Yn(n,t){if(n&1&&(Li$1(0,`p`,18),fS(1),Nc()),n&2){let e=HE(2);ec(),pg(e.t().empty)}}function Zn(n,t){if(n&1){let e=RE();Li$1(0,`button`,30),Jm(`click`,function(){Od(e);let l=HE().$implicit,c=HE(2);return Ld(c.go(c.childOf(l)))}),fS(1),Nc()}if(n&2){let e=HE().$implicit;ec(),Ac(` `,e.name,` `)}}function ei(n,t){if(n&1&&(Li$1(0,`span`,27),fS(1),Nc()),n&2){let e=HE().$implicit;ec(),pg(e.name)}}function ti(n,t){if(n&1){let e=RE();Li$1(0,`li`,24),Gm(1,`app-icon`,25),SE(2,Zn,2,1,`button`,26)(3,ei,2,1,`span`,27),Li$1(4,`button`,28),Jm(`click`,function(){let l=Od(e).$implicit;return Ld(HE(2).download(l))}),Gm(5,`app-icon`,29),Nc()()}if(n&2){let e=t.$implicit,i=HE(2);ec(),ag(`text-accent`,e.kind===`dir`)(`text-ink-500`,e.kind===`file`),Wm(`name`,e.kind===`dir`?`folder`:`file`)(`size`,15),ec(),kE(e.kind===`dir`?2:3),ec(2),Wm(`disabled`,i.busy()),zr(`aria-label`,e.kind===`dir`?i.t().downloadFolder(e.name):i.t().downloadFile(e.name)),ec(),Wm(`size`,14)}}function ni(n,t){if(n&1&&(SE(0,Yn,2,1,`p`,18),Li$1(1,`ul`,23),kc(2,ti,6,10,`li`,24,jn),Nc()),n&2){let e=HE();kE(e.entries().length===0&&!e.busy()&&e.problem()===null?0:-1),ec(2),Tc(e.entries())}}function ii(n,t){return n.endsWith(`/`)?`${n}${t}`:`${n}/${t}`}var St;var jn;var we;var It=f(()=>{Kr();lk();dk();x$1();f$1();sk();Kr();St=(n,t)=>t.path,jn=(n,t)=>t.name;we=class n{containerId=jc.required();active=jc(!0);toast=C(u);t=Lt(()=>ok().containers.files);path=wt$1(`/`);entries=wt$1([]);busy=wt$1(!1);problem=wt$1(null);dragging=wt$1(!1);changed=wt$1(!1);changes=wt$1([]);loaded=!1;crumbs=Lt(()=>{let t=this.path().split(`/`).filter(e=>e!==``);return[{label:`/`,path:`/`},...t.map((e,i)=>({label:e,path:`/${t.slice(0,i+1).join(`/`)}`}))]});constructor(){rf(()=>{this.active()&&!this.loaded&&(this.loaded=!0,Tg(()=>{this.load()}))})}async load(){if(this.changed()){await this.loadChanges();return}this.busy.set(!0);try{let t=await window.electron.files.list(this.containerId(),this.path());this.path.set(t.path),t.ok?(this.entries.set(t.entries),this.problem.set(null)):(this.entries.set([]),this.problem.set(t.problem))}catch(t){this.problem.set(eH(t))}finally{this.busy.set(!1)}}openFolderOf(t){this.changed.set(!1),this.go(this.parentOf(t.path))}toggleChanged(){this.changed.update(t=>!t),this.load()}kindTone(t){return t.kind===`added`?`text-ok`:t.kind===`deleted`?`text-danger`:`text-warn`}go(t){this.path.set(t),this.load()}async loadChanges(){this.busy.set(!0);try{let t=await window.electron.files.changes(this.containerId());t.ok?(this.changes.set(t.changes),this.problem.set(null)):(this.changes.set([]),this.problem.set(t.problem))}catch(t){this.problem.set(eH(t))}finally{this.busy.set(!1)}}parentOf(t){return`/${t.split(`/`).filter(i=>i!==``).slice(0,-1).join(`/`)}`}childOf(t){return ii(this.path(),t.name)}async download(t){try{let e=await window.electron.files.download(this.containerId(),this.childOf(t),t.kind);e.ok?e.savedTo!==null&&this.toast.success(this.t().savedAs(e.savedTo)):this.toast.error(e.problem)}catch(e){this.toast.error(eH(e))}}async chooseAndUpload(){await this.afterUpload(window.electron.files.chooseAndUpload(this.containerId(),this.path()))}onDragOver(t){t.preventDefault(),this.dragging.set(!0)}async onDrop(t){t.preventDefault(),this.dragging.set(!1);let e=[...t.dataTransfer?.files??[]];e.length>0&&await this.afterUpload(window.electron.files.upload(this.containerId(),this.path(),e))}async afterUpload(t){this.busy.set(!0);try{let e=await t;if(!e.ok){this.toast.error(e.problem);return}e.count>0&&this.toast.success(this.t().uploaded(e.count,this.path()))}catch(e){this.toast.error(eH(e))}finally{this.busy.set(!1)}await this.load()}static ɵfac=function(e){return new(e||n)};static ɵcmp=wc({type:n,selectors:[[`app-files-view`]],hostAttrs:[1,`block`,`h-full`],inputs:{containerId:[1,`containerId`],active:[1,`active`]},decls:19,vars:19,consts:[[1,`flex`,`h-full`,`min-h-0`,`flex-col`,3,`dragover`,`dragleave`,`drop`],[1,`flex`,`shrink-0`,`flex-wrap`,`items-center`,`gap-2`,`border-b`,`border-ink-700`,`px-6`,`py-2.5`],[`type`,`button`,1,`mx-btn`,`mx-focus`,3,`disabled`],[1,`min-w-0`,`flex-1`,`text-[12px]`,`text-ink-400`],[1,`flex`,`min-w-0`,`flex-1`,`flex-wrap`,`items-center`,`font-mono`,`text-[12px]`],[`type`,`button`,`data-testid`,`files-changed`,1,`mx-btn`,`mx-focus`,3,`click`,`disabled`],[`name`,`pencil`,3,`size`],[`type`,`button`,1,`mx-btn`,`mx-focus`,3,`click`,`disabled`],[`name`,`refresh`,3,`size`],[1,`px-6`],[3,`problem`],[1,`min-h-0`,`flex-1`,`overflow-auto`,`px-6`,`py-3`],[1,`shrink-0`,`border-t`,`border-ink-800`,`px-6`,`py-2`,`text-[11px]`,`text-ink-500`],[`name`,`arrow-up`,3,`size`],[`aria-current`,`location`,1,`text-ink-100`],[`type`,`button`,1,`mx-focus`,`cursor-pointer`,`text-ink-400`,`hover:text-ink-100`,3,`click`],[1,`px-1`,`text-ink-600`],[`name`,`upload`,3,`size`],[1,`text-[13px]`,`text-ink-400`],[`data-testid`,`change-list`,1,`divide-y`,`divide-ink-800`,`text-[13px]`],[1,`flex`,`items-center`,`gap-3`,`py-1.5`],[1,`w-24`,`shrink-0`,`text-[11px]`],[`type`,`button`,1,`mx-focus`,`min-w-0`,`flex-1`,`cursor-pointer`,`truncate`,`text-left`,`font-mono`,`text-[12px]`,`text-ink-200`,`hover:underline`,3,`click`],[`data-testid`,`file-list`,1,`divide-y`,`divide-ink-800`,`text-[13px]`],[1,`group`,`flex`,`items-center`,`gap-2`,`py-1.5`],[3,`name`,`size`],[`type`,`button`,1,`mx-focus`,`min-w-0`,`flex-1`,`cursor-pointer`,`truncate`,`text-left`,`text-ink-100`,`hover:underline`],[1,`min-w-0`,`flex-1`,`truncate`,`text-ink-200`],[`type`,`button`,1,`mx-focus`,`cursor-pointer`,`rounded`,`p-1`,`text-ink-500`,`opacity-0`,`group-hover:opacity-100`,`focus:opacity-100`,`hover:text-ink-100`,3,`click`,`disabled`],[`name`,`download`,3,`size`],[`type`,`button`,1,`mx-focus`,`min-w-0`,`flex-1`,`cursor-pointer`,`truncate`,`text-left`,`text-ink-100`,`hover:underline`,3,`click`]],template:function(e,i){e&1&&(Li$1(0,`section`,0),Jm(`dragover`,function(c){return i.onDragOver(c)})(`dragleave`,function(){return i.dragging.set(!1)})(`drop`,function(c){return i.onDrop(c)}),Li$1(1,`div`,1),SE(2,Wn,2,3,`button`,2),SE(3,Hn,2,2,`p`,3)(4,qn,3,1,`nav`,4),Li$1(5,`button`,5),Jm(`click`,function(){return i.toggleChanged()}),Gm(6,`app-icon`,6),fS(7),Nc(),Li$1(8,`button`,7),Jm(`click`,function(){return i.load()}),Gm(9,`app-icon`,8),fS(10),Nc(),SE(11,Un,3,3,`button`,2),Nc(),Li$1(12,`div`,9),Gm(13,`app-page-messages`,10),Nc(),Li$1(14,`div`,11),SE(15,Xn,4,1)(16,ni,4,1),Nc(),Li$1(17,`p`,12),fS(18),Nc()()),e&2&&(ag(`bg-accent/5`,i.dragging()),ec(2),kE(i.changed()?-1:2),ec(),kE(i.changed()?3:4),ec(2),ag(`border-accent`,i.changed())(`text-accent`,i.changed()),Wm(`disabled`,i.busy()),zr(`aria-pressed`,i.changed()),ec(),Wm(`size`,14),ec(),Ac(` `,i.t().changed,` `),ec(),Wm(`disabled`,i.busy()),ec(),Wm(`size`,14),ec(),Ac(` `,i.t().refresh,` `),ec(),kE(i.changed()?-1:11),ec(2),Wm(`problem`,i.problem()),ec(2),kE(i.changed()?15:16),ec(3),Ac(` `,i.changed()?i.t().changesHint:i.t().hint(i.path()),` `))},dependencies:[My,u$2],encapsulation:2})}});function ai(n,t){if(n&1&&(Li$1(0,`p`,2),Gm(1,`app-icon`,4),fS(2),Nc()),n&2){let e=HE();ec(),Wm(`size`,14),ec(),Ac(` `,e.t().crashLoop(e.crashes()),` `)}}function oi(n,t){if(n&1&&(Li$1(0,`p`,3),fS(1),Nc()),n&2){let e=HE();ec(),pg(e.t().loading)}}function ri(n,t){if(n&1&&(Li$1(0,`p`,3),fS(1),Nc()),n&2){let e=HE();ec(),pg(e.t().empty)}}function li(n,t){n&1&&(Li$1(0,`span`,11),fS(1),Nc()),n&2&&(ec(),Ac(`— `,t))}function si(n,t){if(n&1&&(Li$1(0,`li`,6)(1,`span`,8),fS(2),Nc(),Gm(3,`app-icon`,9),Li$1(4,`span`,10),fS(5),SE(6,li,2,1,`span`,11),Nc()()),n&2){let e,i=t.$implicit,l=HE(2);ec(),Wm(`title`,l.fullTime(i)),ec(),pg(l.when(i)),ec(),Wm(`name`,l.icon(i))(`size`,13),ec(),nS(l.tone(i)),ec(),Ac(` `,l.describe(i),` `),ec(),kE((e=l.hint(i))?6:-1,e)}}function di(n,t){if(n&1&&(Li$1(0,`ol`,5),kc(1,si,7,8,`li`,6,TE),Nc(),Li$1(3,`p`,7),fS(4),Nc()),n&2){let e=HE();ec(),Tc(e.events()),ec(3),pg(e.t().scope)}}function Tt(n){let t=[...n].sort((l,c)=>l.time-c.time),e=new Set,i=-Infinity;for(let l of t)l.action===`kill`?i=l.time:l.action===`die`&&l.time-i<=pi&&e.add(l);return e}function _i(n,t){let e=Tt(n);return n.filter(i=>i.time>=t-ci&&(i.action===`oom`||i.action===`die`&&i.exitCode!==0&&!e.has(i))).length}var ci;var mi;var pi;var ui;var xi;var gi;var ke;var Et=f(()=>{Kr();v();dk();sk();Kr();ci=3600*1e3,mi=4,pi=3e4,ui={1:`SIGHUP`,2:`SIGINT`,9:`SIGKILL`,15:`SIGTERM`},xi={oom:`text-danger`,start:`text-ok`},gi={start:`play`,restart:`refresh`,stop:`stop`,kill:`stop`,die:`stop`,oom:`warning`,health:`pulse`,destroy:`trash`,create:`plus`};ke=class n{name=jc.required();active=jc(!1);store=C(u$1);t=Lt(()=>ok().containers.detail.events);crashLoopAt=mi;events=wt$1(null);crashes=Lt(()=>_i(this.events()??[],Date.now()));stopped=Lt(()=>Tt(this.events()??[]));constructor(){rf(()=>{let t=this.name();this.store.containers(),this.active()&&Tg(()=>{this.load(t)})})}when(t){let e=new Date(t.time);return new Date().toDateString()===e.toDateString()?e.toLocaleTimeString():`${e.toLocaleDateString()} ${e.toLocaleTimeString()}`}fullTime(t){return new Date(t.time).toISOString()}icon(t){return gi[t.action]??`lines`}tone(t){return t.action===`die`?t.exitCode===0||this.stopped().has(t)?`text-ink-200`:`text-danger`:t.action===`health`?t.health===`unhealthy`?`text-danger`:t.health===`healthy`?`text-ok`:`text-ink-200`:xi[t.action]??`text-ink-200`}describe(t){let e=this.t();switch(t.action){case`die`:return t.exitCode===null?e.exitedUnknown:e.exited(t.exitCode);case`kill`:return e.kill(ui[t.signal??``]??t.signal??`?`);case`health`:return t.health===null?e.health.starting:e.health[t.health];case`rename`:return t.oldName===null?e.renamed:e.rename(t.oldName);default:return e[t.action]}}hint(t){return t.action!==`die`||this.stopped().has(t)?null:t.exitCode===137?this.t().exitHint137:t.exitCode===143?this.t().exitHint143:null}async load(t){try{this.events.set(await window.electron.containers.events(t))}catch{this.events.set([])}}static ɵfac=function(e){return new(e||n)};static ɵcmp=wc({type:n,selectors:[[`app-events-view`]],inputs:{name:[1,`name`],active:[1,`active`]},decls:6,vars:2,consts:[[1,`h-full`,`overflow-auto`,`px-6`,`py-5`],[1,`max-w-3xl`],[`role`,`status`,`data-testid`,`events-crash-loop`,1,`mb-4`,`flex`,`items-center`,`gap-2`,`rounded-md`,`border`,`border-danger/40`,`bg-danger/10`,`px-3`,`py-2`,`text-[13px]`,`text-danger`],[1,`text-[13px]`,`text-ink-400`],[`name`,`warning`,3,`size`],[`data-testid`,`events-list`,1,`divide-y`,`divide-ink-800`],[1,`flex`,`items-baseline`,`gap-3`,`py-1.5`,`text-[13px]`],[1,`mt-4`,`text-[12px]`,`text-ink-500`],[1,`w-36`,`shrink-0`,`font-mono`,`text-[12px]`,`text-ink-500`,3,`title`],[1,`shrink-0`,`self-center`,`text-ink-500`,3,`name`,`size`],[1,`min-w-0`,`flex-1`],[1,`ml-1`,`text-[12px]`,`text-ink-500`]],template:function(e,i){e&1&&(Li$1(0,`div`,0)(1,`section`,1),SE(2,ai,3,2,`p`,2),SE(3,oi,2,1,`p`,3)(4,ri,2,1,`p`,3)(5,di,5,1),Nc()()),e&2&&(ec(2),kE(i.crashes()>=i.crashLoopAt?2:-1),ec(),kE(i.events()===null?3:i.events()?.length===0?4:5))},dependencies:[My],encapsulation:2})}});function yi(n,t){if(n&1&&(Li$1(0,`span`,4),fS(1),Nc()),n&2){let e=HE();ec(),pg(e.t().failingStreak(e.health().failingStreak))}}function fi(n,t){n&1&&(Li$1(0,`code`,10),fS(1),Nc()),n&2&&(ec(),pg(t))}function hi(n,t){if(n&1&&(Li$1(0,`span`,11),fS(1),Nc()),n&2){let e=HE();ec(),pg(e.t().fromImage)}}function vi(n,t){if(n&1&&(Li$1(0,`p`,14),fS(1),Nc()),n&2){let e=HE();ec(),pg(e.t().noProbes)}}function bi(n,t){n&1&&(Li$1(0,`pre`,20),fS(1),Nc()),n&2&&(ec(),pg(t))}function Ci(n,t){if(n&1&&(Li$1(0,`p`,21),fS(1),Nc()),n&2){let e=HE(3);ec(),pg(e.t().noOutput)}}function wi(n,t){if(n&1&&(Li$1(0,`li`,16)(1,`div`,17)(2,`span`,18),fS(3),Nc(),Li$1(4,`span`,19),fS(5),Nc()(),SE(6,bi,2,1,`pre`,20)(7,Ci,2,1,`p`,21),Nc()),n&2){let e,i=t.$implicit,l=HE(2);ec(3),pg(l.clock(i)),ec(),nS(i.exitCode===0?`text-ok`:`text-danger`),ec(),Ac(` `,l.exitCode(i),` `),ec(),kE((e=i.output.trim())?6:7,e)}}function ki(n,t){if(n&1&&(Li$1(0,`ul`,15),kc(1,wi,8,5,`li`,16,TE),Nc()),n&2){let e=HE();ec(),Tc(e.health().probes)}}var Di;var De;var Mt=f(()=>{Kr();h();dk();sk();Kr();Di={healthy:`border-ok/40 bg-ok/10 text-ok`,unhealthy:`border-danger/40 bg-danger/10 text-danger`,starting:`border-warn/40 bg-warn/10 text-warn`},De=class n{health=jc.required();busy=jc(!1);refresh=pj();t=Lt(()=>ok().containers.detail.health);tone=Lt(()=>Di[this.health().status??``]??`border-ink-700 bg-ink-800 text-ink-300`);statusLabel=Lt(()=>{let t=this.health().status;return t===null?this.t().status.unknown:this.t().status[t]});command=Lt(()=>this.health().test.join(` `));rhythm=Lt(()=>{let t=this.health(),e=this.t(),i=[];return t.intervalMs!==null&&i.push(e.every(x(t.intervalMs))),t.timeoutMs!==null&&i.push(e.timeout(x(t.timeoutMs))),t.startPeriodMs!==null&&i.push(e.startPeriod(x(t.startPeriodMs))),t.retries!==null&&i.push(e.retries(t.retries)),i.length===0?e.defaults:i.join(` · `)});clock(t){return A(t.finishedAt)||`—`}exitCode(t){return t.exitCode===null?this.t().unknownExitCode:this.t().exitCode(t.exitCode)}static ɵfac=function(e){return new(e||n)};static ɵcmp=wc({type:n,selectors:[[`app-health-view`]],hostAttrs:[1,`block`,`h-full`,`min-h-0`],inputs:{health:[1,`health`],busy:[1,`busy`]},outputs:{refresh:`refresh`},decls:26,vars:13,consts:[[1,`h-full`,`overflow-auto`,`px-6`,`py-5`],[1,`max-w-3xl`],[1,`flex`,`flex-wrap`,`items-center`,`gap-3`],[1,`rounded-md`,`border`,`px-2`,`py-0.5`,`font-mono`,`text-[12px]`],[1,`text-[13px]`,`text-ink-400`],[`type`,`button`,1,`mx-btn`,`mx-focus`,`ml-auto`,3,`click`,`disabled`],[`name`,`refresh`,3,`size`],[1,`mt-5`,`space-y-3`],[1,`text-[12px]`,`text-ink-500`],[1,`mt-0.5`,`text-[13px]`,`text-ink-100`],[1,`font-mono`,`break-all`],[1,`text-ink-400`],[1,`mt-8`,`max-w-3xl`],[1,`text-[13px]`,`font-medium`,`text-ink-200`],[1,`mt-2`,`text-[13px]`,`text-ink-400`],[1,`mt-3`,`space-y-2`],[1,`rounded-lg`,`border`,`border-ink-700`,`bg-ink-850`,`px-4`,`py-3`],[1,`flex`,`flex-wrap`,`items-baseline`,`gap-3`],[1,`font-mono`,`text-[12px]`,`text-ink-300`],[1,`text-[12px]`],[1,`mt-2`,`font-mono`,`text-[12px]`,`whitespace-pre-wrap`,`text-ink-200`],[1,`mt-2`,`text-[12px]`,`text-ink-500`]],template:function(e,i){if(e&1&&(Li$1(0,`div`,0)(1,`section`,1)(2,`div`,2)(3,`span`,3),fS(4),Nc(),SE(5,yi,2,1,`span`,4),Li$1(6,`button`,5),Jm(`click`,function(){return i.refresh.emit()}),Gm(7,`app-icon`,6),fS(8),Nc()(),Li$1(9,`dl`,7)(10,`div`)(11,`dt`,8),fS(12),Nc(),Li$1(13,`dd`,9),SE(14,fi,2,1,`code`,10)(15,hi,2,1,`span`,11),Nc()(),Li$1(16,`div`)(17,`dt`,8),fS(18),Nc(),Li$1(19,`dd`,9),fS(20),Nc()()()(),Li$1(21,`section`,12)(22,`h3`,13),fS(23),Nc(),SE(24,vi,2,1,`p`,14)(25,ki,3,0,`ul`,15),Nc()()),e&2){let l;ec(3),nS(i.tone()),ec(),pg(i.statusLabel()),ec(),kE(i.health().failingStreak>0?5:-1),ec(),Wm(`disabled`,i.busy()),ec(),Wm(`size`,14),ec(),Ac(` `,i.busy()?i.t().loading:i.t().refresh,` `),ec(4),pg(i.t().command),ec(2),kE((l=i.command())?14:15,l),ec(4),pg(i.t().rhythm),ec(2),pg(i.rhythm()),ec(3),pg(i.t().probes),ec(),kE(i.health().probes.length===0?24:25)}},dependencies:[My],encapsulation:2})}});function Ti(n,t){if(n&1&&(Li$1(0,`p`,3),fS(1),Nc()),n&2){let e=HE();ec(),pg(e.t().loading)}}function Ei(n,t){if(n&1&&(Li$1(0,`p`,3),fS(1),Nc()),n&2){let e=HE();ec(),pg(e.t().empty)}}function Mi(n,t){if(n&1&&fS(0),n&2){let e=HE().$implicit;Ac(` · `,HE(2).t().alsoKnownAs(e.aliases.join(`, `)),` `)}}function Vi(n,t){if(n&1){let e=RE();Li$1(0,`li`,10)(1,`div`,11)(2,`div`,12),fS(3),Nc(),Li$1(4,`div`,6),fS(5),SE(6,Mi,1,1),Nc()(),Li$1(7,`button`,13),Jm(`click`,function(){let l=Od(e).$implicit;return Ld(HE(2).disconnect(l.name))}),Gm(8,`app-icon`,14),fS(9),Nc()()}if(n&2){let e=t.$implicit,i=HE(2);ec(3),pg(e.name),ec(2),Ac(` `,e.ipAddress??i.t().noAddress,` `),ec(),kE(e.aliases.length>0?6:-1),ec(),Wm(`disabled`,i.busy()),zr(`aria-label`,i.t().disconnectFrom(e.name)),ec(),Wm(`size`,14),ec(),Ac(` `,i.t().disconnect,` `)}}function Ni(n,t){if(n&1&&(Li$1(0,`ul`,4),kc(1,Vi,10,7,`li`,10,Si),Nc()),n&2){let e=HE();ec(),Tc(e.attached())}}function Pi(n,t){if(n&1&&(Li$1(0,`p`,7),fS(1),Nc()),n&2){let e=HE();ec(),pg(e.t().allConnected)}}function Ri(n,t){if(n&1&&(Li$1(0,`option`,18),fS(1),Nc()),n&2){let e=t.$implicit,i=HE(2);Wm(`value`,e.name)(`selected`,i.chosen()===e.name),ec(),pg(e.name)}}function Li(n,t){if(n&1){let e=RE();Li$1(0,`label`,19)(1,`span`,2),fS(2),Nc(),Li$1(3,`input`,22),Jm(`input`,function(l){Od(e);return Ld(HE(2).alias.set(l.target.value))}),Nc(),Li$1(4,`span`,23),fS(5),Nc()()}if(n&2){let e=HE(2);ec(2),pg(e.t().alias),ec(),nS(e.field+` mt-1.5 w-full`),Wm(`placeholder`,e.t().aliasPlaceholder)(`value`,e.alias()),zr(`aria-label`,e.t().alias),ec(2),pg(e.t().aliasHint)}}function Fi(n,t){if(n&1){let e=RE();Li$1(0,`form`,15),Jm(`submit`,function(l){Od(e);return Ld(HE().connect(l))}),Li$1(1,`select`,16),Jm(`change`,function(l){Od(e);return Ld(HE().choose(l.target.value))}),Li$1(2,`option`,17),fS(3),Nc(),kc(4,Ri,2,3,`option`,18,Ii),Nc(),SE(6,Li,6,7,`label`,19),Li$1(7,`button`,20),Gm(8,`app-icon`,21),fS(9),Nc()()}if(n&2){let e=HE();ec(),nS(e.field+` w-full`),zr(`aria-label`,e.t().networkLabel),ec(),Wm(`selected`,e.chosen()===``),ec(),pg(e.t().choose),ec(),Tc(e.available()),ec(2),kE(e.canAlias()?6:-1),ec(),Wm(`disabled`,e.chosen()===``||e.busy()),ec(),Wm(`size`,14),ec(),Ac(` `,e.busy()?e.t().working:e.t().connect,` `)}}function zi(n,t){n&1&&(Li$1(0,`p`,9),fS(1),Nc()),n&2&&(ec(),Ac(` `,t,` `))}var Si;var Ii;var Oi;var Bi;var Se;var Vt=f(()=>{Kr();lk();dk();sk();Kr();Si=(n,t)=>t.name,Ii=(n,t)=>t.id;Oi=/^[\w][\w.-]*$/,Bi=`mx-focus min-w-0 rounded-md border border-ink-700 bg-ink-800 px-2.5 py-1.5 text-[13px] text-ink-100 placeholder:text-ink-500`,Se=class n{containerId=jc.required();t=Lt(()=>ok().containers.detail.networks);field=Bi;attached=wt$1([]);all=wt$1([]);chosen=wt$1(``);alias=wt$1(``);problem=wt$1(null);loading=wt$1(!0);busy=wt$1(!1);available=Lt(()=>{let t=new Set(this.attached().map(e=>e.name));return this.all().filter(e=>!t.has(e.name))});canAlias=Lt(()=>{let t=this.chosen();return t!==``&&this.all().some(e=>e.name===t&&!e.builtIn)});constructor(){rf(()=>{this.load(this.containerId())})}async load(t){this.loading.set(!0);try{let[e,i]=await Promise.all([window.electron.networks.ofContainer(t),window.electron.networks.list()]);this.attached.set(e),this.all.set(i)}catch(e){this.problem.set(eH(e))}finally{this.loading.set(!1)}}choose(t){this.chosen.set(t),this.canAlias()||this.alias.set(``)}async connect(t){t.preventDefault();let e=this.chosen(),i=this.canAlias()?this.alias().trim():``;if(e===``||this.busy())return;if(i!==``&&!Oi.test(i)){this.problem.set(this.t().invalidAlias(i));return}await this.attach(()=>window.electron.networks.connect(e,this.containerId(),i===``?null:i))&&(this.chosen.set(``),this.alias.set(``))}async disconnect(t){await this.attach(()=>window.electron.networks.disconnect(t,this.containerId()))}async attach(t){this.busy.set(!0),this.problem.set(null);try{let e=await t();return e.ok?(await this.load(this.containerId()),!0):(this.problem.set(e.problem),!1)}catch(e){return this.problem.set(eH(e)),!1}finally{this.busy.set(!1)}}static ɵfac=function(e){return new(e||n)};static ɵcmp=wc({type:n,selectors:[[`app-networks-view`]],hostAttrs:[1,`block`,`h-full`,`min-h-0`],inputs:{containerId:[1,`containerId`]},decls:15,vars:6,consts:[[1,`h-full`,`overflow-auto`,`px-6`,`py-5`],[1,`max-w-3xl`],[1,`text-[13px]`,`font-medium`,`text-ink-200`],[1,`mt-2`,`text-[13px]`,`text-ink-400`],[1,`mt-3`,`divide-y`,`divide-ink-800`,`rounded-lg`,`border`,`border-ink-700`,`bg-ink-850`],[1,`mt-8`,`max-w-3xl`],[1,`mt-0.5`,`text-[12px]`,`text-ink-500`],[1,`mt-3`,`text-[13px]`,`text-ink-400`],[1,`mt-3`,`space-y-3`],[`role`,`alert`,1,`mt-3`,`rounded-md`,`border`,`border-danger/40`,`bg-danger/10`,`px-3`,`py-2`,`text-[13px]`,`text-danger`],[1,`flex`,`items-center`,`gap-4`,`px-4`,`py-3`],[1,`min-w-0`,`flex-1`],[1,`truncate`,`text-[13px]`,`text-ink-100`],[`type`,`button`,1,`mx-btn`,`mx-focus`,3,`click`,`disabled`],[`name`,`close`,3,`size`],[1,`mt-3`,`space-y-3`,3,`submit`],[3,`change`],[`value`,``,3,`selected`],[3,`value`,`selected`],[1,`block`],[`type`,`submit`,1,`mx-btn`,`mx-focus`,`border-accent`,`text-accent`,3,`disabled`],[`name`,`plus`,3,`size`],[`type`,`text`,`autocomplete`,`off`,`spellcheck`,`false`,3,`input`,`placeholder`,`value`],[1,`mt-1`,`block`,`text-[12px]`,`text-ink-500`]],template:function(e,i){if(e&1&&(Li$1(0,`div`,0)(1,`section`,1)(2,`h3`,2),fS(3),Nc(),SE(4,Ti,2,1,`p`,3)(5,Ei,2,1,`p`,3)(6,Ni,3,0,`ul`,4),Nc(),Li$1(7,`section`,5)(8,`h3`,2),fS(9),Nc(),Li$1(10,`p`,6),fS(11),Nc(),SE(12,Pi,2,1,`p`,7)(13,Fi,10,9,`form`,8),SE(14,zi,2,1,`p`,9),Nc()()),e&2){let l;ec(3),pg(i.t().title),ec(),kE(i.loading()?4:i.attached().length===0?5:6),ec(5),pg(i.t().addTitle),ec(2),pg(i.t().addHint),ec(),kE(i.available().length===0?12:13),ec(2),kE((l=i.problem())?14:-1,l)}},dependencies:[My],encapsulation:2})}});function Hi(n,t){if(n&1){let e=RE();Li$1(0,`button`,24),Jm(`click`,function(){Od(e);return Ld(HE(4).recreate())}),Gm(1,`app-icon`,25),fS(2),Nc()}if(n&2){let e=HE(4);Wm(`disabled`,e.recreateBusy()),ec(),Wm(`size`,14),ec(),Ac(` `,e.a().recreate,` `)}}function Ai(n,t){if(n&1){let e=RE();Li$1(0,`div`,15),Gm(1,`app-icon`,17),Li$1(2,`div`,18)(3,`p`,19),fS(4),Nc(),Li$1(5,`p`,20),fS(6),Nc()(),SE(7,Hi,3,3,`button`,21),Li$1(8,`button`,22),Jm(`click`,function(){let l=Od(e);return Ld(HE(3).reconnect(l))}),Gm(9,`app-icon`,23),fS(10),Nc()()}if(n&2){let e=t,i=HE(3);ec(),Wm(`size`,14),ec(3),pg(i.w().network(e)),ec(2),pg(i.w().networkWhy),ec(),kE(i.canRecreate()?7:-1),ec(),Wm(`disabled`,i.wiringBusy()),ec(),Wm(`size`,14),ec(),Ac(` `,i.w().connect(e),` `)}}function $i(n,t){if(n&1){let e=RE();Li$1(0,`button`,22),Jm(`click`,function(){Od(e);return Ld(HE(5).recreate())}),Gm(1,`app-icon`,25),fS(2),Nc()}if(n&2){let e=HE(5);Wm(`disabled`,e.recreateBusy()),ec(),Wm(`size`,14),ec(),Ac(` `,e.a().recreate,` `)}}function Ji(n,t){if(n&1){let e=RE();Li$1(0,`button`,22),Jm(`click`,function(){Od(e);return Ld(HE(5).restartForPorts())}),Gm(1,`app-icon`,25),fS(2),Nc()}if(n&2){let e=HE(5);Wm(`disabled`,e.wiringBusy()||e.pending()),ec(),Wm(`size`,14),ec(),Ac(` `,e.w().restart,` `)}}function Gi(n,t){if(n&1&&SE(0,$i,3,3,`button`,27)(1,Ji,3,3,`button`,27),n&2)kE(HE(4).canRecreate()?0:1)}function qi(n,t){if(n&1&&(Li$1(0,`div`,16),Gm(1,`app-icon`,26),Li$1(2,`div`,18)(3,`p`,19),fS(4),Nc(),Li$1(5,`p`,20),fS(6),Nc()(),SE(7,Gi,2,1),Nc()),n&2){let e=HE(),i=HE(2);ec(),Wm(`size`,14),ec(3),pg(i.w().ports(i.portList(e.missingPorts))),ec(2),pg(e.missingNetwork===null?i.w().portsWhy:i.w().portsFromNetwork),ec(),kE(e.missingNetwork===null?7:-1)}}function Ui(n,t){if(n&1&&(SE(0,Ai,11,7,`div`,15),SE(1,qi,8,4,`div`,16)),n&2){let e,i=t;kE((e=i.missingNetwork)?0:-1,e),ec(),kE(i.missingPorts.length>0?1:-1)}}function Ki(n,t){if(n&1){let e=RE();Li$1(0,`div`,8),Gm(1,`app-state-dot`,9),Li$1(2,`h1`,10),fS(3),Nc(),Li$1(4,`span`,11),fS(5),Nc(),Li$1(6,`span`,12),fS(7),Nc(),Li$1(8,`span`,11),fS(9),Nc(),Li$1(10,`div`,13)(11,`app-action-menu`,14),Jm(`picked`,function(l){Od(e);return Ld(HE().onMenu(l))}),Nc()()(),SE(12,Ui,2,2)}if(n&2){let e,i=HE(),l=bS(0);ec(),Wm(`state`,l.state),ec(2),pg(l.name),ec(2),pg(l.status),ec(2),pg(l.shortId),ec(2),pg(l.image),ec(2),Wm(`label`,i.t().menu)(`items`,i.menuItems()),ec(),kE((e=i.wiring())?12:-1,e)}}function Qi(n,t){if(n&1&&(Li$1(0,`a`,28),fS(1),Nc()),n&2){let e=t,i=HE(3);Wm(`routerLink`,SS(2,Wi,e.id)),ec(),Ac(` `,i.t().successor(e.name,e.status),` `)}}function Xi(n,t){if(n&1&&(Li$1(0,`p`)(1,`span`,19),fS(2),Nc(),fS(3),Nc(),SE(4,Qi,2,4,`a`,28)),n&2){let e,i=HE(2);ec(2),pg(t),ec(),Ac(``,i.t().gone,` `),ec(),kE((e=i.successor())?4:-1,e)}}function Yi(n,t){if(n&1&&(Li$1(0,`p`),fS(1),Nc()),n&2){let e=HE(2);ec(),pg(e.t().goneUnnamed)}}function Zi(n,t){if(n&1&&(Li$1(0,`div`,2),SE(1,Xi,5,3)(2,Yi,2,1,`p`),Nc()),n&2){let e,i=HE();ec(),kE((e=i.name())?1:2,e)}}function ea(n,t){if(n&1&&(Li$1(0,`button`,31),Gm(1,`app-icon`,53),fS(2),Nc()),n&2){let e=t.$implicit,i=HE(2);Wm(`value`,e),ec(),Wm(`name`,i.tabIcons[e])(`size`,14),ec(),Ac(``,i.tabLabel(e),` `)}}function ta(n,t){if(n&1){let e=RE();Li$1(0,`div`,34)(1,`app-health-view`,54),Jm(`refresh`,function(){Od(e);return Ld(HE(2).onHealthRefresh())}),Nc()()}if(n&2){let e=HE(2);ec(),Wm(`health`,t)(`busy`,e.healthBusy())}}function na(n,t){n&1&&(Li$1(0,`p`,36),fS(1),Nc()),n&2&&(ec(),pg(t))}function ia(n,t){n&1&&Gm(0,`app-json-view`,37),n&2&&Wm(`value`,t)}function aa(n,t){if(n&1&&(Li$1(0,`p`,11),fS(1),Nc()),n&2){let e=HE(2);ec(),pg(e.t().fetching)}}function oa(n,t){if(n&1&&Gm(0,`app-terminal-view`,43),n&2){let e=HE(3);Wm(`containerId`,e.id())(`active`,e.tab()===`terminal`)}}function ra(n,t){if(n&1&&(Li$1(0,`p`,41),fS(1),Nc()),n&2){let e=HE(3);ec(),pg(e.t().terminalLoading)}}function la(n,t){if(n&1&&(Rm(0,oa,1,2)(1,ra,2,1),DE(2,0,ji,1)),n&2){let e=HE(2);ec(2),CE(e.visited().has(`terminal`))}}function sa(n,t){if(n&1&&(Li$1(0,`p`,41),fS(1),Nc()),n&2){let e=HE(2);ec(),pg(e.t().shellOnlyRunning)}}function da(n,t){if(n&1&&(Li$1(0,`div`,44),Gm(1,`app-networks-view`,55),Nc()),n&2){let e=HE(2);ec(),Wm(`containerId`,e.id())}}function ca(n,t){if(n&1&&(Li$1(0,`div`,45),Gm(1,`app-assistant-view`,55),Nc()),n&2){let e=HE(2);ec(),Wm(`containerId`,e.id())}}function ma(n,t){if(n&1&&(vr(),Li$1(0,`svg`,56),Gm(1,`polyline`,57),Nc(),Zd(),Li$1(2,`div`,58),fS(3),NS(4,`number`),Nc()),n&2){let e=HE(2);ec(),zr(`points`,e.cpuPath()),ec(2),Ac(` `,e.t().lastMinute(xS(4,2,e.cpuPeak(),`1.2-2`)??``),` `)}}function pa(n,t){if(n&1&&(Gm(0,`div`,59),Li$1(1,`div`,58),fS(2),Nc()),n&2){let e=HE(2);ec(2),pg(e.t().chartPending)}}function ua(n,t){if(n&1&&(Li$1(0,`p`,63),fS(1),Nc()),n&2){let e=HE(3);ec(),pg(e.t().nearLimit)}}function xa(n,t){if(n&1&&(Li$1(0,`div`,60),Gm(1,`div`,61),Nc(),Li$1(2,`div`,62),fS(3),NS(4,`number`),Nc(),SE(5,ua,2,1,`p`,63)),n&2){let e=HE(2);ec(),nS(e.memoryPercent()>=90?`bg-danger`:`bg-accent`),sg(`width`,e.memoryPercent(),`%`),ec(2),Ac(` `,e.t().ofLimit(xS(4,6,e.memoryPercent(),`1.1-1`)??``),` `),ec(2),kE(e.memoryPercent()>=90?5:-1)}}function ga(n,t){if(n&1&&(Li$1(0,`div`,51),fS(1),Nc()),n&2){let e=HE(2);ec(),pg(e.t().noLimit)}}function _a(n,t){if(n&1&&(Li$1(0,`p`,52),fS(1),Nc()),n&2){let e=HE(2);ec(),pg(e.t().statsOnlyRunning)}}function ya(n,t){if(n&1){let e=RE();Li$1(0,`div`,29),vg(`valueChange`,function(l){Od(e);let c=HE();return vS(c.tab,l)||(c.tab=l),Ld(l)}),Li$1(1,`div`,30),kc(2,ea,3,4,`button`,31,Sc),Nc(),Li$1(4,`div`,32),Gm(5,`app-logs-view`,33),Nc(),SE(6,ta,2,2,`div`,34),Li$1(7,`div`,35),SE(8,na,2,1,`p`,36)(9,ia,1,1,`app-json-view`,37)(10,aa,2,1,`p`,11),Nc(),Li$1(11,`div`,38),Gm(12,`app-events-view`,39),Nc(),Li$1(13,`div`,40),SE(14,la,4,1)(15,sa,2,1,`p`,41),Nc(),Li$1(16,`div`,42),Gm(17,`app-files-view`,43),Nc(),SE(18,da,2,1,`div`,44),SE(19,ca,2,1,`div`,45),Li$1(20,`div`,46)(21,`div`,47)(22,`div`,48)(23,`div`,20),fS(24),Nc(),Li$1(25,`div`,49),fS(26),NS(27,`number`),Li$1(28,`span`,50),fS(29,`%`),Nc()(),SE(30,ma,5,5)(31,pa,3,1),Nc(),Li$1(32,`div`,48)(33,`div`,20),fS(34),Nc(),Li$1(35,`div`,49),fS(36),Nc(),SE(37,xa,6,9)(38,ga,2,1,`div`,51),Nc()(),SE(39,_a,2,1,`p`,52),Nc()()}if(n&2){let e,i,l=HE(),c=bS(0);hg(`value`,l.tab),ec(),zr(`aria-label`,l.t().tabsLabel),ec(),Tc(l.tabNames()),ec(3),Wm(`containerId`,l.id())(`name`,c.name),ec(),kE((e=l.health())?6:-1,e),ec(2),kE((i=l.inspectProblem())?8:(i=l.inspect())?9:10,i),ec(4),Wm(`name`,c.name)(`active`,l.tab()===`events`),ec(2),kE(c.state===`running`?14:15),ec(3),Wm(`containerId`,l.id())(`active`,l.tab()===`files`),ec(),kE(l.visited().has(`networks`)?18:-1),ec(),kE(l.assistantConfigured()&&l.visited().has(`assistant`)?19:-1);let C=l.sample();ec(5),pg(l.t().cpu),ec(2),Ac(` `,C?xS(27,20,C.cpuPercent,`1.2-2`):`—`),ec(4),kE(l.cpuPath()?30:31),ec(4),pg(l.t().memory),ec(2),pg(l.memoryLabel()),ec(),kE(l.memoryLimit()!==null?37:38),ec(2),kE(C?-1:39)}}var ji;var Wi;var Nt;var Pt;f(()=>{Kr();Ne$1();ra$1();Le();y();v();lk();h();G();J();f$1();Ye();yt();ft();vt();bt();dk();Ct();u$3();Dt();It();Et();Mt();Vt();sk();Kr();ji=()=>[import(`./chunk-BhIIfV1H.js`).then(n=>n.TerminalView)],Wi=n=>[`/containers`,n];Nt=60,Pt=class n{id=jc.required();name=jc(void 0);diagnose=jc(void 0);tabblad=jc(void 0);geheugen=jc(void 0);yaml=jc(void 0);store=C(u$1);router=C(fe$1);toast=C(u);compose=C(c);t=Lt(()=>ok().containers.detail);tabIcons={logs:`lines`,health:`pulse`,inspect:`code`,stats:`chart`,terminal:`terminal`,files:`folder`,networks:`networks`,events:`clock`,assistant:`sparkle`};assistantConfigured=wt$1(!1);tabNames=Lt(()=>{let t=[`logs`,`inspect`,`stats`,`events`,`terminal`,`files`,`networks`],e=this.health()===null?t:[`logs`,`health`,...t.slice(1)];return this.assistantConfigured()?[...e,`assistant`]:e});tab=wt$1(`logs`);visited=wt$1(new Set([`logs`]));health=wt$1(null);healthBusy=wt$1(!1);inspect=wt$1(null);inspectProblem=wt$1(null);confirmOpen=wt$1(!1);diagnosisOpen=wt$1(!1);runCommandOpen=wt$1(!1);runCommandFormat=wt$1(`run`);restartPolicyOpen=wt$1(!1);memoryLimitOpen=wt$1(!1);memoryLimit=Lt(()=>{let e=this.inspect()?.HostConfig?.Memory;return typeof e==`number`&&e>0?e:null});cpuHistory=wt$1([]);wiring=wt$1(null);wiringBusy=wt$1(!1);w=Lt(()=>ok().containers.detail.wiring);a=Lt(()=>ok().containers.actions);canRecreate=Lt(()=>{let t=this.container();return t!==null&&t.composeProject!==null&&t.composeService!==null&&t.composeWorkingDir!==null&&this.compose.status()?.cliAvailable===!0});recreateBusy=Lt(()=>{let t=this.container()?.composeProject;return t==null||this.compose.pending().has(t)});wiringKey=Lt(()=>{let t=this.container();return t===null?null:`${t.id}|${t.state}|${t.missingNetwork??``}`});container=Lt(()=>this.store.containers().find(t=>t.id===this.id())??null);successor=Lt(()=>{let t=this.name();return t===void 0?null:this.store.containers().find(e=>e.name===t&&e.id!==this.id())??null});loaded=Lt(()=>this.store.containers().length>0||!this.store.loading());sample=Lt(()=>this.store.stats().get(this.id())??null);pending=Lt(()=>this.store.pending().has(this.id()));menuItems=Lt(()=>{let t=this.container(),e=this.pending();if(t===null)return[];let i=ok().common,l=ok().containers.actions;return[...t.state===`running`?[{id:`stop`,label:i.stop,icon:`stop`,disabled:e},{id:`restart`,label:i.restart,icon:`refresh`,disabled:e},{id:`pause`,label:l.pause,icon:`pause`,disabled:e}]:t.state===`paused`?[{id:`unpause`,label:l.resume,icon:`play`,disabled:e}]:[{id:`start`,label:i.start,icon:`play`,disabled:e}],...this.canRecreate()?[{id:`recreate`,label:l.recreate,icon:`refresh`,disabled:e||this.recreateBusy(),hint:`docker compose up -d --force-recreate`}]:[],{id:`diagnose`,label:l.copyDiagnosis,icon:`copy`,separated:!0},{id:`runCommand`,label:l.copyRunCommand,icon:`copy`},{id:`composeService`,label:l.copyComposeService,icon:`file`},{id:`restartPolicy`,label:l.restartPolicy,icon:`refresh`},{id:`memoryLimit`,label:l.memoryLimit,icon:`sliders`},{id:`remove`,label:i.remove,icon:`trash`,danger:!0,disabled:e,separated:!0}]});cpuPath=Lt(()=>{let t=this.cpuHistory();if(t.length<2)return``;let e=Math.max(...t,1),i=100/(Nt-1);return t.map((l,c)=>`${(c*i).toFixed(2)},${(30-l/e*28).toFixed(2)}`).join(` `)});cpuPeak=Lt(()=>Math.max(...this.cpuHistory(),0));constructor(){rf(()=>{let t=this.tab();this.visited.update(e=>e.has(t)?e:new Set(e).add(t))}),rf(()=>{this.store.watchStats([this.id()])}),rf(()=>{let t=this.sample();t!==null&&this.cpuHistory.update(e=>[...e,t.cpuPercent].slice(-Nt))}),rf(()=>{this.loadInspect(this.id())}),rf(()=>{this.wiringKey()!==null&&this.loadWiring(this.id())}),rf(()=>{if((this.container()?.status??``)===``){this.health.set(null);return}this.loadHealth(this.id())}),rf(()=>{this.diagnose()!==void 0&&this.diagnosisOpen.set(!0)}),rf(()=>{let t=this.tabblad();t!==void 0&&this.tabNames().includes(t)&&Tg(()=>this.tab.set(t))}),rf(()=>{this.geheugen()!==void 0&&Tg(()=>this.memoryLimitOpen.set(!0))}),rf(()=>{this.yaml()!==void 0&&Tg(()=>{this.runCommandFormat.set(`compose`),this.runCommandOpen.set(!0)})}),C(ve$1).onDestroy(()=>this.store.watchStats([])),window.electron.assistant.status().then(t=>this.assistantConfigured.set(t.configured)).catch(()=>this.assistantConfigured.set(!1)),this.store.refresh(),this.compose.status()===null&&this.compose.loadStatus().catch(()=>{})}tabLabel(t){return this.t().tabs[t]}memoryLabel(){let t=this.sample();if(t===null)return`—`;let e=this.memoryLimit();return e===null?d(t.memoryBytes):`${d(t.memoryBytes)} / ${d(e)}`}memoryPercent(){let t=this.sample(),e=this.memoryLimit();return t===null||e===null?0:Math.min(100,t.memoryBytes/e*100)}onMemoryLimitSaved(){this.loadInspect(this.id())}onMenu(t){t===`diagnose`?this.diagnosisOpen.set(!0):t===`runCommand`?(this.runCommandFormat.set(`run`),this.runCommandOpen.set(!0)):t===`composeService`?(this.runCommandFormat.set(`compose`),this.runCommandOpen.set(!0)):t===`restartPolicy`?this.restartPolicyOpen.set(!0):t===`memoryLimit`?this.memoryLimitOpen.set(!0):t===`remove`?this.askRemove():t===`recreate`?this.recreate():this.store.run(t,this.id())}askRemove(){this.confirmOpen.set(!0)}async confirmRemove(){await this.store.run(`remove`,this.id()),await this.router.navigate([`/containers`])}onHealthRefresh(){this.loadHealth(this.id())}async loadHealth(t){this.healthBusy.set(!0);try{this.health.set(await window.electron.containers.health(t))}catch{this.health.set(null)}finally{this.healthBusy.set(!1)}}portList(t){return t.map(e=>{let i=e.hostPort===null?String(e.containerPort):String(e.hostPort);return e.hostIp===null?i:`${e.hostIp}:${i}`}).join(`, `)}async reconnect(t){this.wiringBusy.set(!0);try{let e=await window.electron.networks.connect(t,this.id(),null);e.ok||this.toast.error(e.problem)}catch(e){this.toast.error(eH(e))}finally{this.wiringBusy.set(!1)}await this.store.refresh(),await this.loadWiring(this.id())}async recreate(){let t=this.container();if(t===null||t.composeProject===null||t.composeService===null||!await this.compose.recreate(t.composeProject,t.composeService))return;await this.store.refresh();let i=this.store.containers().find(l=>l.name===t.name&&l.id!==t.id);i!==void 0&&await this.router.navigate([`/containers`,i.id],{replaceUrl:!0})}async restartForPorts(){await this.store.run(`restart`,this.id()),await this.loadWiring(this.id())}async loadWiring(t){try{this.wiring.set(await window.electron.containers.wiring(t))}catch{this.wiring.set(null)}}async loadInspect(t){try{this.inspect.set(await window.electron.containers.inspect(t)),this.inspectProblem.set(null)}catch(e){this.inspect.set(null),this.inspectProblem.set(eH(e))}}static ɵfac=function(e){return new(e||n)};static ɵcmp=wc({type:n,selectors:[[`app-container-detail`]],hostAttrs:[1,`flex`,`h-full`,`flex-col`],inputs:{id:[1,`id`],name:[1,`name`],diagnose:[1,`diagnose`],tabblad:[1,`tabblad`],geheugen:[1,`geheugen`],yaml:[1,`yaml`]},decls:12,vars:18,consts:[[1,`shrink-0`,`border-b`,`border-ink-700`,`px-6`,`pt-4`,`pb-3`],[`routerLink`,`/containers`,1,`mx-focus`,`inline-flex`,`items-center`,`gap-1`,`text-[12px]`,`text-ink-400`,`hover:text-ink-100`],[`data-testid`,`container-gone`,1,`mt-3`,`text-[13px]`,`text-ink-400`],[`rdxTabsRoot`,``,1,`flex`,`min-h-0`,`flex-1`,`flex-col`,3,`value`],[3,`openChange`,`open`,`containerId`],[3,`openChange`,`formatChange`,`open`,`format`,`containerId`,`composeProject`],[3,`openChange`,`saved`,`open`,`containerId`,`compose`],[3,`openChange`,`confirmed`,`open`,`title`,`description`],[1,`mt-2`,`flex`,`flex-wrap`,`items-center`,`gap-3`],[`size`,`md`,`aria-hidden`,`true`,3,`state`],[1,`text-lg`,`font-semibold`,`tracking-tight`,`text-ink-100`],[1,`text-[13px]`,`text-ink-400`],[1,`font-mono`,`text-[12px]`,`text-ink-500`],[1,`ml-auto`],[3,`picked`,`label`,`items`],[`role`,`status`,`data-testid`,`wiring-network`,1,`mt-3`,`flex`,`flex-wrap`,`items-center`,`gap-3`,`rounded-md`,`border`,`border-danger/40`,`bg-danger/10`,`px-3`,`py-2`,`text-[13px]`],[`role`,`status`,`data-testid`,`wiring-ports`,1,`mt-3`,`flex`,`flex-wrap`,`items-center`,`gap-3`,`rounded-md`,`border`,`border-danger/40`,`bg-danger/10`,`px-3`,`py-2`,`text-[13px]`],[`name`,`networks`,1,`text-danger`,3,`size`],[1,`min-w-0`,`flex-1`],[1,`text-ink-100`],[1,`text-[12px]`,`text-ink-400`],[`type`,`button`,`data-testid`,`wiring-recreate`,1,`mx-btn`,`mx-focus`,3,`disabled`],[`type`,`button`,1,`mx-btn`,`mx-focus`,3,`click`,`disabled`],[`name`,`plus`,3,`size`],[`type`,`button`,`data-testid`,`wiring-recreate`,1,`mx-btn`,`mx-focus`,3,`click`,`disabled`],[`name`,`refresh`,3,`size`],[`name`,`warning`,1,`text-danger`,3,`size`],[`type`,`button`,1,`mx-btn`,`mx-focus`,3,`disabled`],[1,`mx-focus`,`mt-2`,`inline-flex`,`items-center`,`gap-1`,`text-accent`,`hover:underline`,3,`routerLink`],[`rdxTabsRoot`,``,1,`flex`,`min-h-0`,`flex-1`,`flex-col`,3,`valueChange`,`value`],[`rdxTabsList`,``,1,`flex`,`shrink-0`,`gap-1`,`border-b`,`border-ink-700`,`px-6`],[`type`,`button`,`rdxTabsTab`,``,1,`mx-focus`,`-mb-px`,`cursor-pointer`,`border-b-2`,`border-transparent`,`px-3`,`py-2`,`text-[13px]`,`text-ink-400`,`transition-colors`,`hover:text-ink-100`,`data-[active]:border-accent`,`data-[active]:text-ink-100`,3,`value`],[`rdxTabsPanel`,``,`value`,`logs`,1,`min-h-0`,`flex-1`],[3,`containerId`,`name`],[`rdxTabsPanel`,``,`value`,`health`,1,`min-h-0`,`flex-1`],[`rdxTabsPanel`,``,`value`,`inspect`,1,`min-h-0`,`flex-1`,`overflow-auto`,`px-6`,`py-4`],[1,`rounded-md`,`border`,`border-danger/40`,`bg-danger/10`,`px-3`,`py-2`,`text-[13px]`,`text-danger`],[3,`value`],[`rdxTabsPanel`,``,`value`,`events`,1,`min-h-0`,`flex-1`],[3,`name`,`active`],[`rdxTabsPanel`,``,`value`,`terminal`,1,`min-h-0`,`flex-1`],[1,`px-6`,`py-5`,`text-[13px]`,`text-ink-400`],[`rdxTabsPanel`,``,`value`,`files`,1,`min-h-0`,`flex-1`],[3,`containerId`,`active`],[`rdxTabsPanel`,``,`value`,`networks`,1,`min-h-0`,`flex-1`],[`rdxTabsPanel`,``,`value`,`assistant`,1,`min-h-0`,`flex-1`],[`rdxTabsPanel`,``,`value`,`stats`,1,`min-h-0`,`flex-1`,`overflow-auto`,`px-6`,`py-5`],[1,`grid`,`max-w-3xl`,`gap-6`,`sm:grid-cols-2`],[1,`rounded-lg`,`border`,`border-ink-700`,`bg-ink-850`,`p-4`],[1,`mt-1`,`text-2xl`,`font-semibold`,`tabular-nums`,`text-ink-100`],[1,`text-base`,`text-ink-400`],[`data-testid`,`memory-no-limit`,1,`mt-4`,`text-[11px]`,`text-ink-500`],[1,`mt-6`,`text-[13px]`,`text-ink-400`],[1,`mr-1.5`,`-mt-0.5`,`inline-flex`,`align-middle`,3,`name`,`size`],[3,`refresh`,`health`,`busy`],[3,`containerId`],[`viewBox`,`0 0 100 30`,`preserveAspectRatio`,`none`,`aria-hidden`,`true`,1,`mt-3`,`h-16`,`w-full`],[`fill`,`none`,`stroke`,`currentColor`,`stroke-width`,`1`,`vector-effect`,`non-scaling-stroke`,1,`text-accent`],[1,`mt-1`,`text-[11px]`,`text-ink-500`],[1,`mt-3`,`h-16`],[1,`mt-4`,`h-2`,`w-full`,`overflow-hidden`,`rounded-full`,`bg-ink-800`],[1,`h-full`,`rounded-full`,`transition-[width]`],[`data-testid`,`memory-of-limit`,1,`mt-1`,`text-[11px]`,`text-ink-500`],[`role`,`status`,`data-testid`,`memory-near-limit`,1,`mt-2`,`text-[12px]`,`text-danger`]],template:function(e,i){if(e&1){let l=RE();bg(0),Li$1(1,`header`,0)(2,`a`,1),fS(3),Nc(),SE(4,Ki,13,8)(5,Zi,3,1,`div`,2),Nc(),SE(6,ya,40,23,`div`,3),Li$1(7,`app-diagnosis-dialog`,4),vg(`openChange`,function(C){return Od(l),vS(i.diagnosisOpen,C)||(i.diagnosisOpen=C),Ld(C)}),Nc(),Li$1(8,`app-run-command-dialog`,5),vg(`openChange`,function(C){return Od(l),vS(i.runCommandOpen,C)||(i.runCommandOpen=C),Ld(C)})(`formatChange`,function(C){return Od(l),vS(i.runCommandFormat,C)||(i.runCommandFormat=C),Ld(C)}),Nc(),Li$1(9,`app-restart-policy-dialog`,4),vg(`openChange`,function(C){return Od(l),vS(i.restartPolicyOpen,C)||(i.restartPolicyOpen=C),Ld(C)}),Nc(),Li$1(10,`app-memory-limit-dialog`,6),vg(`openChange`,function(C){return Od(l),vS(i.memoryLimitOpen,C)||(i.memoryLimitOpen=C),Ld(C)}),Jm(`saved`,function(){return i.onMemoryLimitSaved()}),Nc(),Li$1(11,`app-confirm-dialog`,7),vg(`openChange`,function(C){return Od(l),vS(i.confirmOpen,C)||(i.confirmOpen=C),Ld(C)}),Jm(`confirmed`,function(){return i.confirmRemove()}),Nc()}if(e&2){let l=yS(i.container());ec(3),Ac(` `,i.t().back,` `),ec(),kE(l?4:i.loaded()?5:-1),ec(2),kE(l?6:-1),ec(),hg(`open`,i.diagnosisOpen),Wm(`containerId`,i.id()),ec(),hg(`open`,i.runCommandOpen)(`format`,i.runCommandFormat),Wm(`containerId`,i.id())(`composeProject`,i.container()?.composeProject??null),ec(),hg(`open`,i.restartPolicyOpen),Wm(`containerId`,i.id()),ec(),hg(`open`,i.memoryLimitOpen),Wm(`containerId`,i.id())(`compose`,!!i.container()?.composeProject),ec(),hg(`open`,i.confirmOpen),Wm(`title`,i.t().confirmTitle)(`description`,i.t().confirmDescription)}},dependencies:[Yt$1,we$1,fi$1,gi$1,_e,My,be,Ce,we,De,ke,Se,W,ye,ve,he,fe,Qt$1,V,c$1,Me$1],encapsulation:2})}})();export{Pt as ContainerDetail};
|